[cheese] Make webcam and resolution settings not sensitive if just 1 option is available



commit 063ed0abbd42c4f3cfabe3b819e5063ddb07ef0f
Author: daniel g. siegel <dgsiegel gnome org>
Date:   Mon Jul 27 01:53:59 2009 +0200

    Make webcam and resolution settings not sensitive if just 1 option is available
    
    If there are no options to choose, make the webcam and resolution combo box
    insensitive. Fixes bug #588353

 src/cheese-prefs-resolution-combo.c |    2 ++
 src/cheese-prefs-webcam-combo.c     |    2 +-
 2 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/cheese-prefs-resolution-combo.c b/src/cheese-prefs-resolution-combo.c
index fab4a45..a766539 100644
--- a/src/cheese-prefs-resolution-combo.c
+++ b/src/cheese-prefs-resolution-combo.c
@@ -175,6 +175,8 @@ cheese_prefs_resolution_combo_synchronize (CheesePrefsWidget *prefs_widget)
   g_signal_connect (G_OBJECT (combo_box), "changed",
                     G_CALLBACK (combo_selection_changed),
                     self);
+
+  gtk_widget_set_sensitive (GTK_COMBO_BOX (combo_box), formats->len > 1);
 }
 
 static void
diff --git a/src/cheese-prefs-webcam-combo.c b/src/cheese-prefs-webcam-combo.c
index 0d518ed..0b9ce1f 100644
--- a/src/cheese-prefs-webcam-combo.c
+++ b/src/cheese-prefs-webcam-combo.c
@@ -177,7 +177,7 @@ cheese_prefs_webcam_combo_synchronize (CheesePrefsWidget *prefs_widget)
 
   /* Set sensitive or not depending on whether or not there are webcam devices
    * available */
-  gtk_widget_set_sensitive (combo_box, num_devices > 0);
+  gtk_widget_set_sensitive (GTK_COMBO_BOX (combo_box), num_devices > 1);
 
   g_array_free (webcam_devices, TRUE);
 }



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