[GnomeMeeting-devel-list] Audio Test button sensitivity



It feels that the "Test Audio" button in the druid will always be
clickable, as long as there are *some* input devices, even if there are
*no* output devices. Consider the case with an USB camera with an
internal microphone but no sound card :)

I think I did manage to really stumble upon this bug while splitting the
input and output plugins.

Actually, attaching two patches. The longer one is the one that I think
is prettier, but I haven't tested it.

-- 
\    Georgi Georgiev   \   "But Huey, you PROMISED!" "Tell 'em I       \
/     chutz gg3 net    /  lied."                                       /
\   +81(90)2877-8845   \                                               \
diff -ru gnomemeeting/src/druid.cpp gnomemeeting-work/src/druid.cpp
--- gnomemeeting/src/druid.cpp	2004-11-21 01:42:36.000000000 +0900
+++ gnomemeeting-work/src/druid.cpp	2005-04-08 16:29:12.000000000 +0900
@@ -1709,8 +1709,6 @@
     devices += PString (_("No device found"));
     gtk_widget_set_sensitive (GTK_WIDGET (dw->audio_test_button), FALSE);
   }
-  else 
-    gtk_widget_set_sensitive (GTK_WIDGET (dw->audio_test_button), TRUE);
   
   array = devices.ToCharArray ();
   gm_dw_option_menu_update (dw->audio_recorder, array, recorder);
diff -ru gnomemeeting/src/druid.cpp gnomemeeting-work/src/druid.cpp
--- gnomemeeting/src/druid.cpp	2004-11-21 01:42:36.000000000 +0900
+++ gnomemeeting-work/src/druid.cpp	2005-04-08 16:36:20.000000000 +0900
@@ -1687,13 +1687,14 @@
   else
     devices = PSoundChannel::GetDeviceNames (audio_manager,
 					     PSoundChannel::Player);
+
+  gtk_widget_set_sensitive (GTK_WIDGET (dw->audio_test_button), TRUE);
+
   if (devices.GetSize () == 0) {
     
     devices += PString (_("No device found"));
     gtk_widget_set_sensitive (GTK_WIDGET (dw->audio_test_button), FALSE);
   }
-  else
-    gtk_widget_set_sensitive (GTK_WIDGET (dw->audio_test_button), TRUE);
   
   array = devices.ToCharArray ();
   gm_dw_option_menu_update (dw->audio_player, array, player);
@@ -1709,8 +1710,6 @@
     devices += PString (_("No device found"));
     gtk_widget_set_sensitive (GTK_WIDGET (dw->audio_test_button), FALSE);
   }
-  else 
-    gtk_widget_set_sensitive (GTK_WIDGET (dw->audio_test_button), TRUE);
   
   array = devices.ToCharArray ();
   gm_dw_option_menu_update (dw->audio_recorder, array, recorder);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]