[glade3] * gladeui/glade-command.c: Ensure that menus can be added to menutoolbuttons.
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glade3] * gladeui/glade-command.c: Ensure that menus can be added to menutoolbuttons.
- Date: Sat, 8 Jan 2011 15:11:49 +0000 (UTC)
commit 0b39338e4d86af38108cec86d691bf762a630915
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date: Sun Jan 9 00:14:35 2011 +0900
* gladeui/glade-command.c: Ensure that menus can be added to menutoolbuttons.
ChangeLog | 2 ++
gladeui/glade-command.c | 25 +++++++++++--------------
2 files changed, 13 insertions(+), 14 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 738fa02..460d3fc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -21,6 +21,8 @@
optional property to discourage its use and gave it similar treatment as the
toolbar-style property.
+ * gladeui/glade-command.c: Ensure that menus can be added to menutoolbuttons.
+
2011-01-07 Emilio Pozuelo Monfort <pochu27 gmail com>
* configure.ac: Bump the minimum GTK+ version to 2.99.0.
diff --git a/gladeui/glade-command.c b/gladeui/glade-command.c
index d90e59b..f3ed30d 100644
--- a/gladeui/glade-command.c
+++ b/gladeui/glade-command.c
@@ -1066,11 +1066,11 @@ glade_command_add (GList *widgets,
/* Parent */
if (parent == NULL)
- cdata->parent = glade_widget_get_parent (widget);
+ cdata->parent = glade_widget_get_parent (widget);
else if (placeholder && GWA_IS_TOPLEVEL (adaptor) == FALSE)
- cdata->parent = glade_placeholder_get_parent (placeholder);
- else if (GWA_IS_TOPLEVEL (adaptor) == FALSE)
- cdata->parent = parent;
+ cdata->parent = glade_placeholder_get_parent (placeholder);
+ else
+ cdata->parent = parent;
/* Placeholder */
if (placeholder != NULL && g_list_length (widgets) == 1)
@@ -1352,17 +1352,13 @@ glade_command_add_execute (GladeCommandAddRemove * me)
* there is only one widget.
*/
if (cdata->placeholder)
- {
- glade_widget_replace (cdata->parent,
- G_OBJECT (cdata->placeholder),
- glade_widget_get_object (cdata->widget));
- }
+ glade_widget_replace (cdata->parent,
+ G_OBJECT (cdata->placeholder),
+ glade_widget_get_object (cdata->widget));
else
- {
- glade_widget_add_child (cdata->parent,
- cdata->widget,
- cdata->props_recorded == FALSE);
- }
+ glade_widget_add_child (cdata->parent,
+ cdata->widget,
+ cdata->props_recorded == FALSE);
glade_command_transfer_props (cdata->widget, saved_props);
@@ -1584,6 +1580,7 @@ glade_command_create (GladeWidgetAdaptor * adaptor, GladeWidget * parent,
{
return NULL;
}
+
widgets = g_list_prepend (widgets, widget);
glade_command_push_group (_("Create %s"), glade_widget_get_name (widget));
glade_command_add (widgets, parent, placeholder, project, FALSE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]