[maemo-commits] [maemo-commits] r9682 - in projects/haf/branches/gtk+/maemo-gtk-2-10: . gtk

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Tue Feb 6 15:34:00 EET 2007
Author: timj
Date: 2007-02-06 15:33:58 +0200 (Tue, 06 Feb 2007)
New Revision: 9682

Modified:
   projects/haf/branches/gtk+/maemo-gtk-2-10/ChangeLog
   projects/haf/branches/gtk+/maemo-gtk-2-10/gtk/gtkcombobox.c
Log:
Tue Feb  6 14:06:07 2007  Tim Janik  <timj at imendio.com>

        * gtk/gtkcombobox.c (gtk_combo_box_class_init): added missing 
        ::autodimmed-button registration.




Modified: projects/haf/branches/gtk+/maemo-gtk-2-10/ChangeLog
===================================================================
--- projects/haf/branches/gtk+/maemo-gtk-2-10/ChangeLog	2007-02-06 13:13:17 UTC (rev 9681)
+++ projects/haf/branches/gtk+/maemo-gtk-2-10/ChangeLog	2007-02-06 13:33:58 UTC (rev 9682)
@@ -1,3 +1,8 @@
+Tue Feb  6 14:06:07 2007  Tim Janik  <timj at imendio.com>
+
+	* gtk/gtkcombobox.c (gtk_combo_box_class_init): added missing 
+	::autodimmed-button registration.
+
 2007-02-06  Kristian Rietveld  <kris at imendio.com>
 
 	Merge from upstream trunk:

Modified: projects/haf/branches/gtk+/maemo-gtk-2-10/gtk/gtkcombobox.c
===================================================================
--- projects/haf/branches/gtk+/maemo-gtk-2-10/gtk/gtkcombobox.c	2007-02-06 13:13:17 UTC (rev 9681)
+++ projects/haf/branches/gtk+/maemo-gtk-2-10/gtk/gtkcombobox.c	2007-02-06 13:33:58 UTC (rev 9682)
@@ -774,7 +774,23 @@
 							     G_MAXINT,
 							     15,
 							     GTK_PARAM_READABLE));
-
+  
+#ifdef MAEMO_CHANGES
+  /**
+   * GtkComboBox:autodimmed-button:
+   *
+   * When TRUE, automatically dims the button if the list is empty.
+   *
+   * Since: maemo 1.0
+   */
+  gtk_widget_class_install_style_property (widget_class,
+                                           g_param_spec_boolean ("autodimmed-button",
+                                                                 P_("Autodimmed button"),
+                                                                 P_("Automatically dims the button if the list is empty"),
+                                                                 FALSE,
+                                                                 GTK_PARAM_READABLE));
+#endif /* MAEMO_CHANGES */
+  
   g_type_class_add_private (object_class, sizeof (GtkComboBoxPrivate));
 }
 
@@ -1029,8 +1045,8 @@
     {
       GtkTreeModel *model = combo_box->priv->model;
       GtkTreeIter iter;
-      gboolean autodimmed_button;
-      gtk_widget_style_get (GTK_WIDGET (combo_box), "autodimmed_button", &autodimmed_button, NULL);
+      gboolean autodimmed_button = TRUE;
+      gtk_widget_style_get (GTK_WIDGET (combo_box), "autodimmed-button", &autodimmed_button, NULL);
       if (autodimmed_button && (!model || !gtk_tree_model_get_iter_first (model, &iter)))
         gtk_widget_set_sensitive (combo_box->priv->button, FALSE);
       else


More information about the maemo-commits mailing list