[Goodies-commits] r6971 - in gigolo/trunk: . src

Enrico Troeger enrico at xfce.org
Sun Mar 22 01:06:46 CET 2009


Author: enrico
Date: 2009-03-22 00:06:46 +0000 (Sun, 22 Mar 2009)
New Revision: 6971

Modified:
   gigolo/trunk/ChangeLog
   gigolo/trunk/src/main.c
   gigolo/trunk/src/preferencesdialog.c
Log:
Disable the 'Start Minimized' checkbox when showing the Status Icon is disabled to prevent a window-less process.

Modified: gigolo/trunk/ChangeLog
===================================================================
--- gigolo/trunk/ChangeLog	2009-03-22 00:06:40 UTC (rev 6970)
+++ gigolo/trunk/ChangeLog	2009-03-22 00:06:46 UTC (rev 6971)
@@ -7,6 +7,9 @@
    object to so many other classes.
  * src/window.c:
    Add a View menu to quickly change GUI preferences.
+ * src/main.c, src/preferencesdialog.c:
+   Disable the 'Start Minimized' checkbox when showing the Status Icon
+   is disabled to prevent a window-less process.
 
 
 2009-03-20  Enrico Tröger  <enrico(at)xfce(dot)org>

Modified: gigolo/trunk/src/main.c
===================================================================
--- gigolo/trunk/src/main.c	2009-03-22 00:06:40 UTC (rev 6970)
+++ gigolo/trunk/src/main.c	2009-03-22 00:06:46 UTC (rev 6971)
@@ -160,8 +160,11 @@
 	if (gis != NULL)
 		gigolo_single_instance_set_parent(gis, GTK_WINDOW(window));
 
-	if (gigolo_settings_get_boolean(settings, "start-in-systray"))
+	if (gigolo_settings_get_boolean(settings, "start-in-systray") &&
+		gigolo_settings_get_boolean(settings, "show-in-systray"))
+	{
 		gdk_notify_startup_complete();
+	}
 	else
 		gtk_widget_show(window);
 

Modified: gigolo/trunk/src/preferencesdialog.c
===================================================================
--- gigolo/trunk/src/preferencesdialog.c	2009-03-22 00:06:40 UTC (rev 6970)
+++ gigolo/trunk/src/preferencesdialog.c	2009-03-22 00:06:46 UTC (rev 6971)
@@ -99,6 +99,14 @@
 }
 
 
+static void check_button_toggle_sensitive_cb(GtkToggleButton *button, GtkWidget *widget)
+{
+    gboolean toggled = gtk_toggle_button_get_active(button);
+
+	gtk_widget_set_sensitive(widget, toggled);
+}
+
+
 static void check_toolbar_show_toggle_cb(GtkToggleButton *button, G_GNUC_UNUSED gpointer data)
 {
     gboolean toggled = gtk_toggle_button_get_active(button);
@@ -302,7 +310,7 @@
 static void set_settings(GigoloPreferencesDialog *dialog, GigoloSettings *settings)
 {
 	GtkWidget *frame_vbox, *notebook_vbox, *vbox, *hbox, *notebook;
-	GtkWidget *radio1, *radio2, *checkbox, *combo, *entry, *combo_toolbar_style;
+	GtkWidget *radio1, *radio2, *checkbox, *combo, *entry, *combo_toolbar_style, *tmp_box;
 	GtkWidget *combo_toolbar_orient, *spinbutton;
 	GtkWidget *label1, *label2, *label3, *label4, *label_volman, *image;
 	GSList *rlist;
@@ -398,11 +406,13 @@
 	gtk_widget_set_tooltip_text(checkbox, _("Saves the window position and geometry and restores it at the start"));
 	gtk_box_pack_start(GTK_BOX(frame_vbox), checkbox, FALSE, FALSE, 0);
 
-	checkbox = add_check_button(settings, "show-in-systray", _("Show status _icon in the Notification Area"));
+	tmp_box = checkbox = add_check_button(settings, "show-in-systray", _("Show status _icon in the Notification Area"));
 	gtk_box_pack_start(GTK_BOX(frame_vbox), checkbox, FALSE, FALSE, 0);
 
 	checkbox = add_check_button(settings, "start-in-systray", _("Start _minimized in the Notification Area"));
 	gtk_box_pack_start(GTK_BOX(frame_vbox), checkbox, FALSE, FALSE, 0);
+	g_signal_connect(tmp_box, "toggled", G_CALLBACK(check_button_toggle_sensitive_cb), checkbox);
+	check_button_toggle_sensitive_cb(GTK_TOGGLE_BUTTON(tmp_box), checkbox);
 
 	checkbox = add_check_button(settings, "show-panel", _("Show 'Browse Network' side panel"));
 	gtk_widget_set_tooltip_text(checkbox, _("Whether to show a side panel for browsing the local network for available Samba shares"));




More information about the Goodies-commits mailing list