impl. (gtk_tool_item_class_init): hook it up.
2004-02-20 Michael Meeks <michael@ximian.com> * gtk/gtktoolitem.c (gtk_tool_item_property_notify): impl. (gtk_tool_item_class_init): hook it up. (gtk_tool_item_set_proxy_menu_item): synchronize sensitivity. * gtk/gtktoolbutton.c (gtk_tool_button_property_notify): chain to parent, fix strcmp bug.
This commit is contained in:
parent
c19aa6739d
commit
ecb4df1307
@ -1,5 +1,12 @@
|
|||||||
2004-02-20 Michael Meeks <michael@ximian.com>
|
2004-02-20 Michael Meeks <michael@ximian.com>
|
||||||
|
|
||||||
|
* gtk/gtktoolitem.c (gtk_tool_item_property_notify): impl.
|
||||||
|
(gtk_tool_item_class_init): hook it up.
|
||||||
|
(gtk_tool_item_set_proxy_menu_item): synchronize sensitivity.
|
||||||
|
|
||||||
|
* gtk/gtktoolbutton.c (gtk_tool_button_property_notify):
|
||||||
|
chain to parent, fix strcmp bug.
|
||||||
|
|
||||||
* tests/testtoolbar.c (main): re-arrange widgets to allow
|
* tests/testtoolbar.c (main): re-arrange widgets to allow
|
||||||
more overflowing toolbar goodness.
|
more overflowing toolbar goodness.
|
||||||
|
|
||||||
|
@ -1,5 +1,12 @@
|
|||||||
2004-02-20 Michael Meeks <michael@ximian.com>
|
2004-02-20 Michael Meeks <michael@ximian.com>
|
||||||
|
|
||||||
|
* gtk/gtktoolitem.c (gtk_tool_item_property_notify): impl.
|
||||||
|
(gtk_tool_item_class_init): hook it up.
|
||||||
|
(gtk_tool_item_set_proxy_menu_item): synchronize sensitivity.
|
||||||
|
|
||||||
|
* gtk/gtktoolbutton.c (gtk_tool_button_property_notify):
|
||||||
|
chain to parent, fix strcmp bug.
|
||||||
|
|
||||||
* tests/testtoolbar.c (main): re-arrange widgets to allow
|
* tests/testtoolbar.c (main): re-arrange widgets to allow
|
||||||
more overflowing toolbar goodness.
|
more overflowing toolbar goodness.
|
||||||
|
|
||||||
|
@ -1,5 +1,12 @@
|
|||||||
2004-02-20 Michael Meeks <michael@ximian.com>
|
2004-02-20 Michael Meeks <michael@ximian.com>
|
||||||
|
|
||||||
|
* gtk/gtktoolitem.c (gtk_tool_item_property_notify): impl.
|
||||||
|
(gtk_tool_item_class_init): hook it up.
|
||||||
|
(gtk_tool_item_set_proxy_menu_item): synchronize sensitivity.
|
||||||
|
|
||||||
|
* gtk/gtktoolbutton.c (gtk_tool_button_property_notify):
|
||||||
|
chain to parent, fix strcmp bug.
|
||||||
|
|
||||||
* tests/testtoolbar.c (main): re-arrange widgets to allow
|
* tests/testtoolbar.c (main): re-arrange widgets to allow
|
||||||
more overflowing toolbar goodness.
|
more overflowing toolbar goodness.
|
||||||
|
|
||||||
|
@ -1,5 +1,12 @@
|
|||||||
2004-02-20 Michael Meeks <michael@ximian.com>
|
2004-02-20 Michael Meeks <michael@ximian.com>
|
||||||
|
|
||||||
|
* gtk/gtktoolitem.c (gtk_tool_item_property_notify): impl.
|
||||||
|
(gtk_tool_item_class_init): hook it up.
|
||||||
|
(gtk_tool_item_set_proxy_menu_item): synchronize sensitivity.
|
||||||
|
|
||||||
|
* gtk/gtktoolbutton.c (gtk_tool_button_property_notify):
|
||||||
|
chain to parent, fix strcmp bug.
|
||||||
|
|
||||||
* tests/testtoolbar.c (main): re-arrange widgets to allow
|
* tests/testtoolbar.c (main): re-arrange widgets to allow
|
||||||
more overflowing toolbar goodness.
|
more overflowing toolbar goodness.
|
||||||
|
|
||||||
|
@ -1,5 +1,12 @@
|
|||||||
2004-02-20 Michael Meeks <michael@ximian.com>
|
2004-02-20 Michael Meeks <michael@ximian.com>
|
||||||
|
|
||||||
|
* gtk/gtktoolitem.c (gtk_tool_item_property_notify): impl.
|
||||||
|
(gtk_tool_item_class_init): hook it up.
|
||||||
|
(gtk_tool_item_set_proxy_menu_item): synchronize sensitivity.
|
||||||
|
|
||||||
|
* gtk/gtktoolbutton.c (gtk_tool_button_property_notify):
|
||||||
|
chain to parent, fix strcmp bug.
|
||||||
|
|
||||||
* tests/testtoolbar.c (main): re-arrange widgets to allow
|
* tests/testtoolbar.c (main): re-arrange widgets to allow
|
||||||
more overflowing toolbar goodness.
|
more overflowing toolbar goodness.
|
||||||
|
|
||||||
|
@ -442,8 +442,11 @@ static void
|
|||||||
gtk_tool_button_property_notify (GObject *object,
|
gtk_tool_button_property_notify (GObject *object,
|
||||||
GParamSpec *pspec)
|
GParamSpec *pspec)
|
||||||
{
|
{
|
||||||
if (strcmp (pspec->name, "is_important"))
|
if (strcmp (pspec->name, "is-important") == 0)
|
||||||
gtk_tool_button_construct_contents (GTK_TOOL_ITEM (object));
|
gtk_tool_button_construct_contents (GTK_TOOL_ITEM (object));
|
||||||
|
|
||||||
|
if (parent_class->notify)
|
||||||
|
parent_class->notify (object, pspec);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -76,6 +76,8 @@ static void gtk_tool_item_get_property (GObject *object,
|
|||||||
guint prop_id,
|
guint prop_id,
|
||||||
GValue *value,
|
GValue *value,
|
||||||
GParamSpec *pspec);
|
GParamSpec *pspec);
|
||||||
|
static void gtk_tool_item_property_notify (GObject *object,
|
||||||
|
GParamSpec *pspec);
|
||||||
static void gtk_tool_item_realize (GtkWidget *widget);
|
static void gtk_tool_item_realize (GtkWidget *widget);
|
||||||
static void gtk_tool_item_unrealize (GtkWidget *widget);
|
static void gtk_tool_item_unrealize (GtkWidget *widget);
|
||||||
static void gtk_tool_item_map (GtkWidget *widget);
|
static void gtk_tool_item_map (GtkWidget *widget);
|
||||||
@ -136,6 +138,7 @@ gtk_tool_item_class_init (GtkToolItemClass *klass)
|
|||||||
object_class->set_property = gtk_tool_item_set_property;
|
object_class->set_property = gtk_tool_item_set_property;
|
||||||
object_class->get_property = gtk_tool_item_get_property;
|
object_class->get_property = gtk_tool_item_get_property;
|
||||||
object_class->finalize = gtk_tool_item_finalize;
|
object_class->finalize = gtk_tool_item_finalize;
|
||||||
|
object_class->notify = gtk_tool_item_property_notify;
|
||||||
|
|
||||||
widget_class->realize = gtk_tool_item_realize;
|
widget_class->realize = gtk_tool_item_realize;
|
||||||
widget_class->unrealize = gtk_tool_item_unrealize;
|
widget_class->unrealize = gtk_tool_item_unrealize;
|
||||||
@ -337,6 +340,17 @@ gtk_tool_item_get_property (GObject *object,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gtk_tool_item_property_notify (GObject *object,
|
||||||
|
GParamSpec *pspec)
|
||||||
|
{
|
||||||
|
GtkToolItem *tool_item = GTK_TOOL_ITEM (object);
|
||||||
|
|
||||||
|
if (tool_item->priv->menu_item && strcmp (pspec->name, "sensitive") == 0)
|
||||||
|
gtk_widget_set_sensitive (tool_item->priv->menu_item,
|
||||||
|
GTK_WIDGET_SENSITIVE (tool_item));
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
create_drag_window (GtkToolItem *toolitem)
|
create_drag_window (GtkToolItem *toolitem)
|
||||||
{
|
{
|
||||||
@ -1059,6 +1073,9 @@ gtk_tool_item_set_proxy_menu_item (GtkToolItem *tool_item,
|
|||||||
{
|
{
|
||||||
g_object_ref (menu_item);
|
g_object_ref (menu_item);
|
||||||
gtk_object_sink (GTK_OBJECT (menu_item));
|
gtk_object_sink (GTK_OBJECT (menu_item));
|
||||||
|
|
||||||
|
gtk_widget_set_sensitive (menu_item,
|
||||||
|
GTK_WIDGET_SENSITIVE (tool_item));
|
||||||
}
|
}
|
||||||
|
|
||||||
tool_item->priv->menu_item = menu_item;
|
tool_item->priv->menu_item = menu_item;
|
||||||
|
Loading…
Reference in New Issue
Block a user