update label patch, and gtktoolbar patch



On Fri, 2001-11-09 at 17:54, Owen Taylor wrote:
> 
> jacob berkman <jacob ximian com> writes:
> 
> > this patch makes GtkLabel actually default to what the properties say it
> > should default to.
> > 
> > i've noticed things like this in the past - it begs for GObject to set
> > the defaults itself somehow.
> 
> You need to fix what the property reports, not change the defaults.

ok, here's a fixed gtklabel patch, and is this gtktoolbar patch ok?

jacob
-- 
"Beat mixing is 10000 times more fun than even video games."
	-- bt
Index: gtklabel.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtklabel.c,v
retrieving revision 1.108
diff -u -r1.108 gtklabel.c
--- gtklabel.c	2001/11/08 18:56:23	1.108
+++ gtklabel.c	2001/11/13 01:06:28
@@ -312,7 +312,7 @@
                                                       _("Justification"),
                                                       _("The alignment of the lines in the text of the label relative to each other. This does NOT affect the alignment of the label within its allocation. See GtkMisc::xalign for that."),
 						      GTK_TYPE_JUSTIFICATION,
-						      GTK_JUSTIFY_LEFT,
+						      GTK_JUSTIFY_CENTER,
                                                       G_PARAM_READWRITE));
 
   g_object_class_install_property (gobject_class,
@@ -328,7 +328,7 @@
                                    g_param_spec_boolean ("wrap",
                                                         _("Line wrap"),
                                                         _("If set, wrap lines if the text becomes too wide."),
-                                                        TRUE,
+                                                        FALSE,
                                                         G_PARAM_READWRITE));
   g_object_class_install_property (gobject_class,
                                    PROP_SELECTABLE,
Index: gtktoolbar.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtktoolbar.c,v
retrieving revision 1.64
diff -u -r1.64 gtktoolbar.c
--- gtktoolbar.c	2001/10/15 13:59:34	1.64
+++ gtktoolbar.c	2001/11/13 01:09:55
@@ -53,6 +53,7 @@
   PROP_0,
   PROP_ORIENTATION,
   PROP_TOOLBAR_STYLE,
+  PROP_TOOLTIPS
 };
 
 enum {
@@ -235,6 +236,13 @@
  						      GTK_TOOLBAR_ICONS,
  						      G_PARAM_READWRITE));
 
+   g_object_class_install_property (gobject_class,
+				    PROP_TOOLTIPS,
+				    g_param_spec_boolean ("tooltips",
+							  _("Tooltips"),
+							  _("Sets if the tooltips of a toolbar should be active or not."),
+							  TRUE,
+							  G_PARAM_READWRITE));
 
   gtk_widget_class_install_style_property (widget_class,
 					   g_param_spec_int ("space_size",
@@ -395,6 +403,9 @@
     case PROP_TOOLBAR_STYLE:
       gtk_toolbar_set_style (toolbar, g_value_get_enum (value));
       break;
+    case PROP_TOOLTIPS:
+      gtk_toolbar_set_tooltips (toolbar, g_value_get_boolean (value));
+      break;
     }
 }
 
@@ -414,6 +425,9 @@
     case PROP_TOOLBAR_STYLE:
       g_value_set_enum (value, toolbar->style);
       break;
+    case PROP_TOOLTIPS:
+      g_value_set_boolean (value, toolbar->tooltips->enabled);
+      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;
@@ -1482,10 +1496,15 @@
 {
   g_return_if_fail (GTK_IS_TOOLBAR (toolbar));
 
+  if (enable == toolbar->tooltips->enabled)
+    return;
+
   if (enable)
     gtk_tooltips_enable (toolbar->tooltips);
   else
     gtk_tooltips_disable (toolbar->tooltips);
+
+  g_object_notify (G_OBJECT (toolbar), "tooltips");
 }
 
 /**


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