Mercurial > audlegacy-plugins
changeset 2885:7a1bc6c600e0
Disable rescan/connect while scanning / when no device is selected
author | Paula Stanciu <paula.stanciu@gmail.com> |
---|---|
date | Sat, 09 Aug 2008 21:00:39 +0300 |
parents | 4128ae5633e4 |
children | 62026eb53bde |
files | src/bluetooth/gui.c src/bluetooth/scan_gui.c |
diffstat | 2 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/bluetooth/gui.c Sat Aug 09 20:46:49 2008 +0300 +++ b/src/bluetooth/gui.c Sat Aug 09 21:00:39 2008 +0300 @@ -186,14 +186,14 @@ }else gtk_label_set_text(GTK_LABEL(label_prod),status); g_free(status); - + gtk_widget_set_sensitive(connect_button,TRUE); } } void refresh_resultsui(){ gtk_widget_destroy (window); window = NULL; - selected_dev = NULL; +selected_dev = NULL; refresh_call(); } @@ -231,6 +231,8 @@ connect_button = gtk_button_new_with_mnemonic(_("_Connect")); g_signal_connect(connect_button,"clicked",G_CALLBACK (connect_call), NULL); gtk_container_add(GTK_CONTAINER(hbox_bottom),connect_button); + gtk_widget_set_sensitive(connect_button,FALSE); + close_button = gtk_button_new_with_mnemonic(_("_Close")); g_signal_connect(close_button,"clicked",G_CALLBACK (close_call),NULL);
--- a/src/bluetooth/scan_gui.c Sat Aug 09 20:46:49 2008 +0300 +++ b/src/bluetooth/scan_gui.c Sat Aug 09 21:00:39 2008 +0300 @@ -43,6 +43,7 @@ if(discover_finish == 2 ) { if(window){ gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(progress_bar),1); + gtk_widget_set_sensitive(rescan_buttton,TRUE); } return 0; } @@ -136,6 +137,7 @@ if(usage == 0){ rescan_buttton = gtk_button_new_with_mnemonic(_("Rescan")); g_signal_connect(rescan_buttton,"clicked",G_CALLBACK (refresh_call),NULL); + gtk_widget_set_sensitive(rescan_buttton,FALSE); }else{ rescan_buttton = gtk_button_new_with_mnemonic(_("Play")); g_signal_connect(rescan_buttton,"clicked",G_CALLBACK (play_call),NULL);