[glade3] * plugins/gtk+/glade-gtk.c, plugins/gtk+/gtk+.xml.in: Fixed GtkComboBox/GtkIconView popup action
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glade3] * plugins/gtk+/glade-gtk.c, plugins/gtk+/gtk+.xml.in: Fixed GtkComboBox/GtkIconView popup action
- Date: Sun, 29 Aug 2010 16:30:31 +0000 (UTC)
commit 39ab6597769a68a0fbf006a940865c4b622f49c0
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date: Mon Aug 30 01:31:11 2010 +0900
* plugins/gtk+/glade-gtk.c, plugins/gtk+/gtk+.xml.in:
Fixed GtkComboBox/GtkIconView popup actions (was missing
the GtkWidgetClass actions such as add/remove parent)
Fixes bug 628146.
ChangeLog | 7 ++++-
plugins/gtk+/glade-gtk.c | 66 +++++++++++++++++++++++++++++----------------
plugins/gtk+/gtk+.xml.in | 4 +-
3 files changed, 50 insertions(+), 27 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index e86bf7a..1acf4fc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,9 +7,14 @@
or a frame's label or notebook's tab).
* gladeui/glade-inspector.c: Fixed regression in the inspector; inspector
- was failing to display information about frame labels and internal action
+ was failing to display information about frame labels and internal action
areas and such.
+ * plugins/gtk+/glade-gtk.c, plugins/gtk+/gtk+.xml.in:
+ Fixed GtkComboBox/GtkIconView popup actions (was missing
+ the GtkWidgetClass actions such as add/remove parent)
+ Fixes bug 628146.
+
2010-08-26 Tristan Van Berkom <tristanvb openismus com>
* plugins/gtk+/glade-gtk.c: Fixed glade_gtk_frame_add_child() to remove any previous
diff --git a/plugins/gtk+/glade-gtk.c b/plugins/gtk+/glade-gtk.c
index 9463cdf..3342e3d 100644
--- a/plugins/gtk+/glade-gtk.c
+++ b/plugins/gtk+/glade-gtk.c
@@ -8803,6 +8803,8 @@ glade_gtk_combo_box_set_property (GladeWidgetAdaptor *adaptor,
id, value);
}
+
+
/* ----------------------------- GtkComboBoxEntry ------------------------------ */
void
glade_gtk_combo_box_entry_post_create (GladeWidgetAdaptor *adaptor,
@@ -11192,42 +11194,58 @@ glade_gtk_cell_layout_launch_editor (GObject *layout)
}
+static void
+glade_gtk_cell_layout_launch_editor_action (GObject *object)
+{
+ GladeWidget *w = glade_widget_get_from_gobject (object);
+
+ do
+ {
+ if (GTK_IS_TREE_VIEW (w->object))
+ {
+ glade_gtk_treeview_launch_editor (w->object);
+ break;
+ }
+ else if (GTK_IS_ICON_VIEW (w->object))
+ {
+ glade_gtk_cell_layout_launch_editor (w->object);
+ break;
+ }
+ else if (GTK_IS_COMBO_BOX (w->object))
+ {
+ glade_gtk_cell_layout_launch_editor (w->object);
+ break;
+ }
+
+ } while ((w = glade_widget_get_parent (w)));
+}
+
void
glade_gtk_cell_layout_action_activate (GladeWidgetAdaptor *adaptor,
GObject *object,
const gchar *action_path)
{
if (strcmp (action_path, "launch_editor") == 0)
- {
- GladeWidget *w = glade_widget_get_from_gobject (object);
-
- do
- {
- if (GTK_IS_TREE_VIEW (w->object))
- {
- glade_gtk_treeview_launch_editor (w->object);
- break;
- }
- else if (GTK_IS_ICON_VIEW (w->object))
- {
- glade_gtk_cell_layout_launch_editor (w->object);
- break;
- }
- else if (GTK_IS_COMBO_BOX (w->object))
- {
- glade_gtk_cell_layout_launch_editor (w->object);
- break;
- }
-
- } while ((w = glade_widget_get_parent (w)));
-
- }
+ glade_gtk_cell_layout_launch_editor_action (object);
else
GWA_GET_CLASS (G_TYPE_OBJECT)->action_activate (adaptor,
object,
action_path);
}
+void
+glade_gtk_cell_layout_action_activate_as_widget (GladeWidgetAdaptor *adaptor,
+ GObject *object,
+ const gchar *action_path)
+{
+ if (strcmp (action_path, "launch_editor") == 0)
+ glade_gtk_cell_layout_launch_editor_action (object);
+ else
+ GWA_GET_CLASS (GTK_TYPE_WIDGET)->action_activate (adaptor,
+ object,
+ action_path);
+}
+
/*--------------------------- GtkTreeView ---------------------------------*/
diff --git a/plugins/gtk+/gtk+.xml.in b/plugins/gtk+/gtk+.xml.in
index 7d5f4b4..9aef1c1 100644
--- a/plugins/gtk+/gtk+.xml.in
+++ b/plugins/gtk+/gtk+.xml.in
@@ -1105,7 +1105,7 @@ embedded in another object</_tooltip>
<get-children-function>glade_gtk_cell_layout_get_children</get-children-function>
<read-child-function>glade_gtk_cell_layout_read_child</read-child-function>
<write-child-function>glade_gtk_cell_layout_write_child</write-child-function>
- <action-activate-function>glade_gtk_cell_layout_action_activate</action-activate-function>
+ <action-activate-function>glade_gtk_cell_layout_action_activate_as_widget</action-activate-function>
<child-set-property-function>glade_gtk_cell_layout_set_child_property</child-set-property-function>
<child-get-property-function>glade_gtk_cell_layout_get_child_property</child-get-property-function>
@@ -2058,7 +2058,7 @@ embedded in another object</_tooltip>
<get-children-function>glade_gtk_cell_layout_get_children</get-children-function>
<read-child-function>glade_gtk_cell_layout_read_child</read-child-function>
<write-child-function>glade_gtk_cell_layout_write_child</write-child-function>
- <action-activate-function>glade_gtk_cell_layout_action_activate</action-activate-function>
+ <action-activate-function>glade_gtk_cell_layout_action_activate_as_widget</action-activate-function>
<child-set-property-function>glade_gtk_cell_layout_set_child_property</child-set-property-function>
<child-get-property-function>glade_gtk_cell_layout_get_child_property</child-get-property-function>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]