#include <unistd.h>
#include <string.h>
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
#include <liberregxml/erregapi.h>
#include <libergtk/ergtk.h>
#include "connectionMgrLog.h"
#include "displayStatus.h"
#include "commonData.h"
#include "connectScreenData.h"
#include "connectScan.h"
#include "connectPing.h"
#include "gtkSettingItem.h"
#include "widgetUtils.h"
#include "connectScreen.h"
#include "connectScreenOptions.h"
#include "connectScreenProfiles.h"
#include "background.h"
#include "connectionMgr.h"
#include "languages.h"
#include "erbusy.h"
#include "pagebar.h"
Go to the source code of this file.
Functions | |
static GtkWidget * | create_connect_with (void) |
static GtkWidget * | create_server_type (void) |
static GtkWidget * | create_network_type (void) |
static GtkWidget * | create_infomation (void) |
static gboolean | on_button_press (GtkWidget *button, GdkEventButton *event, gpointer data) |
static void | on_servertype_update (erGtkSelectionGroup *selection, gpointer button, gpointer data) |
static void | on_networktype_update (erGtkSelectionGroup *selection, gpointer button, gpointer data) |
static void | connect_options_update_info (scanStatus_t status) |
GtkWidget * | connect_options_create (void) |
void | connect_options_set_text (void) |
void | connect_options_display (void) |
static void | remove_timeout_ids (void) |
static gboolean | delay_servertype_udpate (gpointer data) |
static gboolean | delay_networktype_udpate (gpointer data) |
static gboolean | connect_ping_during_idle (gpointer data) |
static gboolean | on_delayed_scan_networks_done (gpointer data) |
void | connect_options_scan_networks_done (void) |
void | connect_options_restore_scan_ctxt (void) |
gboolean | on_connect_options_keypress (GdkEventKey *event) |
Variables | |
static GtkWidget * | g_connect_options = NULL |
static GtkWidget * | g_connect_with = NULL |
static bkWdtLabelButton * | g_server_type = NULL |
static bkWdtLabelButton * | g_network_type = NULL |
static GtkWidget * | g_info = NULL |
static GtkWidget * | g_info_label = NULL |
static guint | g_scan_timeout_id = 0 |
static guint | g_scan_done_timeout_id = 0 |
static gboolean | g_first_display = TRUE |
Copyright (C) 2007 iRex Technologies BV.
Definition in file connectScreenOptions.c.
GtkWidget* connect_options_create | ( | void | ) |
Definition at line 106 of file connectScreenOptions.c.
00107 { 00108 CN_LOGPRINTF ("entry"); 00109 00110 GtkWidget *vbox; 00111 GtkWidget *itemConnectWith; 00112 GtkWidget *itemInfo; 00113 00114 vbox = gtk_vbox_new (FALSE, VBOX_SPACING); 00115 gtk_widget_show(vbox); 00116 g_connect_options = vbox; 00117 00118 itemConnectWith = create_connect_with (); 00119 gtk_box_pack_start (GTK_BOX (vbox), itemConnectWith, FALSE, FALSE, 0); 00120 gtk_widget_show(itemConnectWith); 00121 00122 itemInfo = create_infomation (); 00123 gtk_box_pack_start (GTK_BOX (vbox), itemInfo, FALSE, FALSE, 0); 00124 gtk_widget_show(itemInfo); 00125 00126 return vbox; 00127 }
void connect_options_display | ( | void | ) |
Definition at line 335 of file connectScreenOptions.c.
00336 { 00337 CN_LOGPRINTF ("entry"); 00338 00339 GtkWidget* widget; 00340 GtkToggleButton* button; 00341 00342 if (g_server_type) 00343 { 00344 // Display choice iDS / Computer 00345 // - select which button must be selected 00346 switch (connect_data_get_connect_type()) 00347 { 00348 case cmgrConnectIDS_e: 00349 widget = GTK_WIDGET(g_server_type->details->buttonList[0]); 00350 break; 00351 case cmgrConnectPCShare_e: 00352 widget = GTK_WIDGET(g_server_type->details->buttonList[1]); 00353 break; 00354 default: 00355 // nothing selected (yet) 00356 widget = GTK_WIDGET(g_server_type->details->buttonList[0]); 00357 connect_data_set_connect_type(cmgrConnectIDS_e); 00358 break; 00359 } 00360 // - and select this button 00361 // Note: when the button is already selected, 00362 // we de-select then select again; 00363 // this ensures the signal handlers are called 00364 // regardless the old button state. 00365 button = GTK_TOGGLE_BUTTON(widget); 00366 if (g_first_display && gtk_toggle_button_get_active(button)) 00367 { 00368 // button is selected, so first deselect it 00369 // to make sure signal handler is called 00370 gtk_toggle_button_set_active(button, FALSE); 00371 } 00372 gtk_toggle_button_set_active(button, TRUE); 00373 } 00374 00375 if (g_network_type) 00376 { 00377 // Display choice wired / wireless / dialup 00378 switch (connect_data_get_network_type()) 00379 { 00380 case wired_t: 00381 widget = GTK_WIDGET(g_network_type->details->buttonList[0]); 00382 break; 00383 case wireless_t: 00384 widget = GTK_WIDGET(g_network_type->details->buttonList[1]); 00385 break; 00386 case dialup_t: 00387 widget = GTK_WIDGET(g_network_type->details->buttonList[2]); 00388 break; 00389 default: 00390 // nothing selected (yet), using the default setting 00391 // default is wireless, unless the device does not have wireless, then the default is wired 00392 widget = GTK_WIDGET(g_network_type->details->buttonList[main_get_wifi_disabled() ? 0 : 1]); 00393 connect_data_set_network_type (main_get_wifi_disabled() ? wired_t : wireless_t); 00394 break; 00395 } 00396 // - and select this button 00397 // Note: when the button is already selected, 00398 // we de-select then select again; 00399 // this ensures the signal handlers are called 00400 // regardless the old button state. 00401 button = GTK_TOGGLE_BUTTON(widget); 00402 if (g_first_display && gtk_toggle_button_get_active(button)) 00403 { 00404 // button is selected, so first deselect it 00405 // to make sure signal handler is called 00406 gtk_toggle_button_set_active(button, FALSE); 00407 } 00408 gtk_toggle_button_set_active(button, TRUE); 00409 } 00410 00411 // force connect to iDS when no PC profile in registry 00412 const regPCProfile_t *pcshare = NULL; 00413 pcshare = connect_data_get_pcsharedata(); 00414 if (pcshare == NULL 00415 || (pcshare->pcname == NULL || pcshare->pcname[0] == '\0') 00416 || (pcshare->sharename == NULL || pcshare->sharename[0] == '\0')) 00417 { 00418 CN_WARNPRINTF ("no PC profile in registry: force connect to iDS"); 00419 00420 if (g_server_type) 00421 { 00422 widget = GTK_WIDGET(g_server_type->details->buttonList[1]); 00423 gtk_widget_set_sensitive(widget, FALSE); 00424 00425 widget = GTK_WIDGET(g_server_type->details->buttonList[0]); 00426 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(widget), TRUE); 00427 } 00428 00429 connect_data_set_connect_type (cmgrConnectIDS_e); 00430 } 00431 00432 if (main_get_wifi_disabled()) 00433 { 00434 // set wifi button insensitive when wifi is disabled 00435 widget = GTK_WIDGET(g_network_type->details->buttonList[1]); 00436 gtk_widget_set_sensitive(widget, FALSE); 00437 } 00438 00439 if (main_get_dialup_disabled()) 00440 { 00441 // set dialup button insensitive when dialup is disabled 00442 widget = GTK_WIDGET(g_network_type->details->buttonList[2]); 00443 gtk_widget_set_sensitive(widget, FALSE); 00444 } 00445 00446 connect_options_update_info(scanRunning_e); 00447 00448 g_first_display = FALSE; 00449 }
void connect_options_restore_scan_ctxt | ( | void | ) |
Definition at line 779 of file connectScreenOptions.c.
00780 { 00781 scanContext_t *ctxt; 00782 connection_t networkType; 00783 char *ssidList; 00784 00785 CN_LOGPRINTF("entry"); 00786 00787 ctxt = cmgr_get_scan_ctxt(); 00788 if (ctxt) 00789 { 00790 connect_scan_ctxt_set_mode(ctxt, connectScan_e); 00791 00792 networkType = connect_data_get_network_type(); 00793 connect_scan_ctxt_set_network_type(ctxt, networkType); 00794 00795 connect_scan_ctxt_set_done_callbacks(ctxt, 00796 connect_data_init_network_profiles, 00797 connect_options_scan_networks_done); 00798 00799 ssidList = connect_data_get_hidden_ssid_list(); 00800 connect_scan_ctxt_set_ssidlist(ctxt, ssidList); 00801 g_free(ssidList); 00802 } 00803 }
void connect_options_scan_networks_done | ( | void | ) |
Definition at line 770 of file connectScreenOptions.c.
00771 { 00772 CN_LOGPRINTF("entry"); 00773 00774 g_scan_done_timeout_id = g_timeout_add(5000, 00775 on_delayed_scan_networks_done, 00776 NULL); 00777 }
void connect_options_set_text | ( | void | ) |
Definition at line 284 of file connectScreenOptions.c.
00285 { 00286 GtkWidget *widget; 00287 00288 CN_LOGPRINTF ("entry"); 00289 00290 if (g_connect_with) 00291 { 00292 // selection iDS / PC 00293 gtk_settingitem_set_header_text (GTK_SETTINGITEM (g_connect_with), 00294 _("Connection settings")); 00295 } 00296 00297 if (g_server_type) 00298 { 00299 widget = g_server_type->details->label; 00300 gtk_label_set_text (GTK_LABEL (widget), 00301 _("Select to connect to the iDS " 00302 "(iRex Delivery Service) or to " 00303 "your computer.")); 00304 00305 widget = GTK_WIDGET(g_server_type->details->buttonList[0]); 00306 gtk_button_set_label (GTK_BUTTON (widget), _("iDS")); 00307 00308 widget = GTK_WIDGET(g_server_type->details->buttonList[1]); 00309 gtk_button_set_label (GTK_BUTTON (widget), _("Computer")); 00310 } 00311 00312 if (g_network_type) 00313 { 00314 widget = g_network_type->details->label; 00315 gtk_label_set_text (GTK_LABEL (widget), 00316 _("Select a connection type or accept " 00317 "the default.")); 00318 00319 widget = GTK_WIDGET(g_network_type->details->buttonList[0]); 00320 gtk_button_set_label (GTK_BUTTON (widget), _("Wired")); 00321 00322 widget = GTK_WIDGET(g_network_type->details->buttonList[1]); 00323 gtk_button_set_label (GTK_BUTTON (widget), _("Wireless")); 00324 00325 widget = GTK_WIDGET(g_network_type->details->buttonList[2]); 00326 gtk_button_set_label (GTK_BUTTON (widget), _("Dial-up")); 00327 } 00328 }
static void connect_options_update_info | ( | scanStatus_t | status | ) | [static] |
Definition at line 451 of file connectScreenOptions.c.
00452 { 00453 CN_LOGPRINTF("entry"); 00454 00455 connection_t networkType; 00456 char* cpTitle = NULL, *cpDetails = NULL; 00457 00458 networkType = connect_data_get_network_type(); 00459 switch(networkType) 00460 { 00461 case wired_t: 00462 cpTitle = _("Available wired networks"); 00463 if (status == rescanNeed_e) 00464 { 00465 cpDetails = _("No wired networks found.\n" 00466 "Click the Wired button above " 00467 "to scan again."); 00468 } 00469 else if (status == scanRunning_e) 00470 { 00471 cpDetails = _("Please wait while the iLiad scans for " 00472 "wired networks ..."); 00473 } 00474 else 00475 { 00476 cpDetails = ""; 00477 } 00478 break; 00479 case dialup_t: 00480 cpTitle = _("Available dial-up networks"); 00481 if (status == rescanNeed_e) 00482 { 00483 cpDetails = _("No dial-up networks found.\n" 00484 "Click the Dial-up button above " 00485 "to scan again."); 00486 } 00487 else if (status == scanRunning_e) 00488 { 00489 cpDetails = _("Please wait while the iLiad scans for " 00490 "dial-up networks ..."); 00491 } 00492 else 00493 { 00494 cpDetails = ""; 00495 } 00496 break; 00497 case wireless_t: 00498 cpTitle = _("Available wireless networks"); 00499 if (status == rescanNeed_e) 00500 { 00501 cpDetails = _("No wireless networks found.\n" 00502 "Click the Wireless button above " 00503 "to scan again."); 00504 } 00505 else if (status == scanRunning_e) 00506 { 00507 cpDetails = _("Please wait while the iLiad is scanning " 00508 "for wireless networks ..."); 00509 } 00510 else 00511 { 00512 cpDetails = ""; 00513 } 00514 break; 00515 default: 00516 CN_WARNPRINTF("Invalid network type[%d].", networkType); 00517 break; 00518 } 00519 00520 // show the information wiget with the correct text 00521 if (g_info) 00522 { 00523 gtk_settingitem_set_header_text(GTK_SETTINGITEM(g_info), cpTitle); 00524 gtk_label_set_text(GTK_LABEL(g_info_label), cpDetails); 00525 } 00526 }
static gboolean connect_ping_during_idle | ( | gpointer | data | ) | [static] |
Definition at line 699 of file connectScreenOptions.c.
00700 { 00701 CN_LOGPRINTF("entry"); 00702 00703 pingContext_t *ctxt; 00704 gboolean delay = (gboolean)data; 00705 00706 connect_profiles_restore_ping_ctxt(); 00707 00708 ctxt = cmgr_get_ping_ctxt(); 00709 connect_ping_select_initial_profile(ctxt); 00710 connect_ping(ctxt, delay); 00711 00712 return FALSE; 00713 }
static GtkWidget * create_connect_with | ( | void | ) | [static] |
Definition at line 135 of file connectScreenOptions.c.
00136 { 00137 GtkWidget *item = NULL; 00138 GtkWidget *vbox = NULL; 00139 GtkWidget *server = NULL; 00140 GtkWidget *network = NULL; 00141 00142 // item 00143 item = gtk_settingitem_new (""); 00144 gtk_widget_set_size_request (item, -1, -1); 00145 g_connect_with = item; 00146 00147 // vbox 00148 vbox = gtk_vbox_new (FALSE, VBOX_SPACING); 00149 gtk_settingitem_add_details (GTK_SETTINGITEM (item), vbox); 00150 gtk_widget_show (vbox); 00151 00152 // server 00153 server = create_server_type (); 00154 gtk_box_pack_start (GTK_BOX (vbox), server, FALSE, FALSE, 0); 00155 gtk_widget_show (server); 00156 00157 // network 00158 network = create_network_type (); 00159 gtk_box_pack_start (GTK_BOX (vbox), network, FALSE, FALSE, 0); 00160 gtk_widget_show (network); 00161 00162 return item; 00163 }
static GtkWidget * create_infomation | ( | void | ) | [static] |
Definition at line 235 of file connectScreenOptions.c.
00236 { 00237 GtkWidget *item = NULL; 00238 GtkWidget *background = NULL; 00239 GtkWidget *alignment = NULL; 00240 GtkWidget *vbox = NULL; 00241 GtkWidget *label = NULL; 00242 00243 // item 00244 item = gtk_settingitem_new (""); 00245 gtk_widget_set_size_request (item, -1, -1); 00246 gtk_widget_hide (item); 00247 g_info = item; 00248 00249 // background 00250 background = gtk_event_box_new (); 00251 gtk_widget_set_name (background, "bk_grey_666_75"); 00252 gtk_widget_set_size_request(background, 00253 SITEM_BK_WIDTH, SITEM_BK_HEIGHT); 00254 gtk_settingitem_add_details (GTK_SETTINGITEM (item), background); 00255 00256 // alignment 00257 alignment = gtk_alignment_new (0.0, 0.5, 0.0, 0.0); 00258 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 00259 PADDING_TOP, PADDING_BOTTOM, PADDING_LEFT, PADDING_RIGHT); 00260 gtk_container_add (GTK_CONTAINER (background), alignment); 00261 00262 // vbox 00263 vbox = gtk_vbox_new (FALSE, VBOX_SPACING); 00264 gtk_container_add (GTK_CONTAINER (alignment), vbox); 00265 00266 // label 00267 label = gtk_label_new (""); 00268 gtk_widget_set_name (label, "info_label"); 00269 gtk_widget_set_size_request(GTK_WIDGET(label), 00270 SITEM_BK_WIDTH - PADDING_LEFT - PADDING_RIGHT, -1); 00271 gtk_label_set_single_line_mode(GTK_LABEL(label), FALSE); 00272 gtk_label_set_line_wrap(GTK_LABEL(label), TRUE); 00273 gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0); 00274 g_info_label = label; 00275 00276 gtk_widget_show_all (background); 00277 00278 return item; 00279 }
static GtkWidget * create_network_type | ( | void | ) | [static] |
Definition at line 198 of file connectScreenOptions.c.
00199 { 00200 bkWdtLabelButton *item; 00201 GtkWidget *widget; 00202 00203 item = bk_wdt_label_button_new(3, FALSE, 1, 1); 00204 00205 // signal handlers 00206 widget = GTK_WIDGET(item->details->buttonList[0]); 00207 g_signal_connect(G_OBJECT(widget), "button-press-event", 00208 G_CALLBACK(on_button_press), NULL); 00209 00210 widget = GTK_WIDGET(item->details->buttonList[1]); 00211 g_signal_connect(G_OBJECT(widget), "button-press-event", 00212 G_CALLBACK(on_button_press), NULL); 00213 00214 widget = GTK_WIDGET(item->details->buttonList[2]); 00215 g_signal_connect(G_OBJECT(widget), "button-press-event", 00216 G_CALLBACK(on_button_press), NULL); 00217 00218 widget = item->details->selection; 00219 g_signal_connect (G_OBJECT (widget), "selection-update", 00220 G_CALLBACK (on_networktype_update), NULL); 00221 00222 // global variables 00223 g_network_type = item; 00224 00225 return item->background; 00226 }
static GtkWidget * create_server_type | ( | void | ) | [static] |
Definition at line 168 of file connectScreenOptions.c.
00169 { 00170 bkWdtLabelButton *item; 00171 GtkWidget *widget; 00172 00173 item = bk_wdt_label_button_new(2, FALSE, 1, 1); 00174 00175 // signal handlers 00176 widget = GTK_WIDGET(item->details->buttonList[0]); 00177 g_signal_connect(G_OBJECT(widget), "button-press-event", 00178 G_CALLBACK(on_button_press), NULL); 00179 00180 widget = GTK_WIDGET(item->details->buttonList[1]); 00181 g_signal_connect(G_OBJECT(widget), "button-press-event", 00182 G_CALLBACK(on_button_press), NULL); 00183 00184 widget = item->details->selection; 00185 g_signal_connect (G_OBJECT (widget), "selection-update", 00186 G_CALLBACK (on_servertype_update), NULL); 00187 00188 // global variables 00189 g_server_type = item; 00190 00191 // return 00192 return item->background; 00193 }
static gboolean delay_networktype_udpate | ( | gpointer | data | ) | [static] |
Definition at line 629 of file connectScreenOptions.c.
00630 { 00631 int selectedId; 00632 erGtkSelectionGroup *selection; 00633 scanContext_t *ctxt; 00634 00635 if (connect_scan_freeze_ui(cmgr_get_scan_ctxt())) 00636 { 00637 CN_WARNPRINTF("call me later ..."); 00638 connect_options_update_info(scanAborting_e); 00639 display_update_request_screen_refresh(SETTING_ITEM_CHANGE, 00640 WAVEFORM_TYPING); 00641 return TRUE; // TRUE = please call again 00642 } 00643 00644 selection = ERGTK_SELECTION_GROUP(data); 00645 ergtk_selection_group_get_selected_buttons(selection, &selectedId, 1); 00646 if (selectedId == 0) 00647 { 00648 // wired selected 00649 connect_data_set_network_type(wired_t); 00650 } 00651 else if (selectedId == 1) 00652 { 00653 // wireless selected 00654 connect_data_set_network_type (wireless_t); 00655 } 00656 else if (selectedId == 2) 00657 { 00658 // dialup selected 00659 connect_data_set_network_type(dialup_t); 00660 } 00661 00662 // update the GUI, give some feedback to users 00663 connect_options_update_info(scanRunning_e); 00664 display_update_request_screen_refresh(SETTING_ITEM_CHANGE, 00665 WAVEFORM_TYPING); 00666 00667 connect_options_restore_scan_ctxt(); 00668 ctxt = cmgr_get_scan_ctxt(); 00669 connect_scan(ctxt, FALSE); 00670 00671 g_scan_timeout_id = 0; 00672 00673 return FALSE; // FALSE = don't call me again 00674 }
static gboolean delay_servertype_udpate | ( | gpointer | data | ) | [static] |
Definition at line 563 of file connectScreenOptions.c.
00564 { 00565 int selectedId; 00566 erGtkSelectionGroup *selection; 00567 scanContext_t *ctxt; 00568 00569 if (connect_scan_freeze_ui(cmgr_get_scan_ctxt())) 00570 { 00571 CN_WARNPRINTF("call me later ..."); 00572 00573 connect_options_update_info(scanAborting_e); 00574 display_update_request_screen_refresh(SETTING_ITEM_CHANGE, 00575 WAVEFORM_TYPING); 00576 return TRUE; // TRUE = please call again 00577 } 00578 00579 selection = ERGTK_SELECTION_GROUP(data); 00580 ergtk_selection_group_get_selected_buttons(selection, &selectedId, 1); 00581 if (selectedId == 0) 00582 { 00583 // ids connection selected, set mode 00584 connect_data_set_connect_type (cmgrConnectIDS_e); 00585 } 00586 else if (selectedId == 1) 00587 { 00588 // computer connection selected, set mode 00589 connect_data_set_connect_type (cmgrConnectPCShare_e); 00590 } 00591 00592 // update the GUI, give some feedback to users 00593 connect_options_update_info(scanRunning_e); 00594 display_update_request_screen_refresh(SETTING_ITEM_CHANGE, 00595 WAVEFORM_TYPING); 00596 00597 connect_options_restore_scan_ctxt(); 00598 ctxt = cmgr_get_scan_ctxt(); 00599 connect_scan(ctxt, FALSE); 00600 00601 g_scan_timeout_id = 0; 00602 00603 return FALSE; // FALSE = don't call me again 00604 }
static gboolean on_button_press | ( | GtkWidget * | button, | |
GdkEventButton * | event, | |||
gpointer | data | |||
) | [static] |
Definition at line 548 of file connectScreenOptions.c.
00551 { 00552 CN_LOGPRINTF("entry"); 00553 00554 if (connect_scan_freeze_ui(cmgr_get_scan_ctxt())) 00555 { 00556 CN_WARNPRINTF("Please wait when freezing UI ..."); 00557 return TRUE; 00558 } 00559 00560 return FALSE; 00561 }
gboolean on_connect_options_keypress | ( | GdkEventKey * | event | ) |
Definition at line 805 of file connectScreenOptions.c.
00806 { 00807 scanContext_t *ctxt; 00808 gboolean ret = FALSE; 00809 00810 CN_LOGPRINTF("entry"); 00811 00812 switch (event->keyval) 00813 { 00814 case GDK_Return: 00815 // 'Enter' key is pressed 00816 ret = TRUE; 00817 break; 00818 00819 case GDK_F5: 00820 // 'UP' key is pressed 00821 // goto the one top level page 00822 remove_timeout_ids(); 00823 00824 ctxt = cmgr_get_scan_ctxt(); 00825 connect_scan_abort(ctxt); 00826 00827 cmgr_up_page(); 00828 00829 ret = TRUE; 00830 break; 00831 00832 default: 00833 erbusy_off(); 00834 } 00835 00836 return ret; 00837 }
static gboolean on_delayed_scan_networks_done | ( | gpointer | data | ) | [static] |
Definition at line 716 of file connectScreenOptions.c.
00717 { 00718 int nProfiles; 00719 connection_t networkType; 00720 gboolean nextPage = FALSE; 00721 00722 nProfiles = connect_data_get_n_network_profiles(); 00723 networkType = connect_data_get_network_type(); 00724 00725 switch (networkType) 00726 { 00727 case wireless_t: 00728 if (nProfiles > 0) 00729 { 00730 nextPage = TRUE; 00731 } 00732 break; 00733 case dialup_t: 00734 nextPage = TRUE; 00735 break; 00736 case wired_t: 00737 nextPage = TRUE; 00738 break; 00739 default: 00740 break; 00741 } 00742 00743 if (nextPage) 00744 { 00745 display_update_increase_level(MAIN_WINDOW_EXPOSE_LEVEL); 00746 00747 // go to the profiles page 00748 connect_profiles_display(); 00749 connect_goto_page(connectScreenProfiles_e); 00750 00751 if (nProfiles > 0) 00752 { 00753 // call connect_ping during idle 00754 // in order to show the profiles page firstly, 00755 // then start to ping 00756 gtk_idle_add(connect_ping_during_idle, (gpointer)TRUE); 00757 } 00758 } 00759 else 00760 { 00761 connect_options_update_info(rescanNeed_e); 00762 display_update_request_screen_refresh(SETTING_ITEM_CHANGE, 00763 WAVEFORM_TYPING); 00764 } 00765 00766 g_scan_done_timeout_id = 0; 00767 return FALSE; 00768 }
static void on_networktype_update | ( | erGtkSelectionGroup * | selection, | |
gpointer | button, | |||
gpointer | data | |||
) | [static] |
Definition at line 676 of file connectScreenOptions.c.
00678 { 00679 CN_LOGPRINTF ("entry selection[%p], button[%p], data[%p]", 00680 selection, button, data); 00681 00682 GtkToggleButton* btn = GTK_TOGGLE_BUTTON(button); 00683 gboolean active = gtk_toggle_button_get_active(btn); 00684 00685 if (active) 00686 { 00687 remove_timeout_ids(); 00688 00689 g_timeout_add(1000, delay_erbusy_blink, NULL); 00690 connect_scan_abort(cmgr_get_scan_ctxt()); 00691 00692 // wait for scan aborting done, then further actions 00693 g_scan_timeout_id = g_timeout_add(200, 00694 delay_networktype_udpate, 00695 (gpointer)selection); 00696 } 00697 }
static void on_servertype_update | ( | erGtkSelectionGroup * | selection, | |
gpointer | button, | |||
gpointer | data | |||
) | [static] |
Definition at line 606 of file connectScreenOptions.c.
00608 { 00609 CN_LOGPRINTF ("entry selection[%p], button[%p], data[%p]", 00610 selection, button, data); 00611 00612 GtkToggleButton* btn = GTK_TOGGLE_BUTTON(button); 00613 gboolean active = gtk_toggle_button_get_active(btn); 00614 00615 if (active) 00616 { 00617 remove_timeout_ids(); 00618 00619 g_timeout_add(1000, delay_erbusy_blink, NULL); 00620 connect_scan_abort(cmgr_get_scan_ctxt()); 00621 00622 // wait for scan aborting done, then further actions 00623 g_scan_timeout_id = g_timeout_add(200, 00624 delay_servertype_udpate, 00625 (gpointer)selection); 00626 } 00627 }
static void remove_timeout_ids | ( | void | ) | [static] |
Definition at line 531 of file connectScreenOptions.c.
00532 { 00533 if (g_scan_timeout_id > 0) 00534 { 00535 CN_WARNPRINTF("remove the old timeout function for scanning"); 00536 g_source_remove(g_scan_timeout_id); 00537 g_scan_timeout_id = 0; 00538 } 00539 00540 if (g_scan_done_timeout_id) 00541 { 00542 CN_WARNPRINTF("remove the old timeout function for scanning done"); 00543 g_source_remove(g_scan_done_timeout_id); 00544 g_scan_done_timeout_id = 0; 00545 } 00546 }
GtkWidget* g_connect_options = NULL [static] |
Definition at line 60 of file connectScreenOptions.c.
GtkWidget* g_connect_with = NULL [static] |
Definition at line 63 of file connectScreenOptions.c.
gboolean g_first_display = TRUE [static] |
Definition at line 79 of file connectScreenOptions.c.
GtkWidget* g_info = NULL [static] |
Definition at line 72 of file connectScreenOptions.c.
GtkWidget* g_info_label = NULL [static] |
Definition at line 73 of file connectScreenOptions.c.
bkWdtLabelButton* g_network_type = NULL [static] |
Definition at line 69 of file connectScreenOptions.c.
guint g_scan_done_timeout_id = 0 [static] |
Definition at line 77 of file connectScreenOptions.c.
guint g_scan_timeout_id = 0 [static] |
Definition at line 75 of file connectScreenOptions.c.
bkWdtLabelButton* g_server_type = NULL [static] |
Definition at line 66 of file connectScreenOptions.c.