[seahorse] Fix ordering of top level menu items
- From: Stefan Walter <stefw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [seahorse] Fix ordering of top level menu items
- Date: Tue, 13 Dec 2011 14:23:47 +0000 (UTC)
commit c1631da7c6d4b463c0f6dd10253ec4db092915a9
Author: Stef Walter <stefw collabora co uk>
Date: Tue Dec 13 09:55:47 2011 +0100
Fix ordering of top level menu items
libseahorse/seahorse-catalog.c | 4 ++--
pgp/seahorse-keyserver-results.c | 22 +++++-----------------
pgp/seahorse-keyserver-results.ui | 8 +++++---
ssh/seahorse-ssh-actions.c | 8 +++++---
4 files changed, 17 insertions(+), 25 deletions(-)
---
diff --git a/libseahorse/seahorse-catalog.c b/libseahorse/seahorse-catalog.c
index b016d11..acb7815 100644
--- a/libseahorse/seahorse-catalog.c
+++ b/libseahorse/seahorse-catalog.c
@@ -353,9 +353,9 @@ seahorse_catalog_real_selection_changed (SeahorseCatalog *self)
self->pv->selection_actions = groups;
for (l = self->pv->selection_actions; l != NULL; l = g_list_next (l))
- gtk_ui_manager_insert_action_group (self->pv->ui_manager, l->data, 5);
+ gtk_action_group_set_visible (l->data, TRUE);
for (l = previous; l != NULL; l = g_list_next (l))
- gtk_ui_manager_remove_action_group (self->pv->ui_manager, l->data);
+ gtk_action_group_set_visible (l->data, FALSE);
g_list_free_full (previous, g_object_unref);
}
diff --git a/pgp/seahorse-keyserver-results.c b/pgp/seahorse-keyserver-results.c
index b225fb5..4489c3b 100644
--- a/pgp/seahorse-keyserver-results.c
+++ b/pgp/seahorse-keyserver-results.c
@@ -270,26 +270,16 @@ seahorse_keyserver_results_get_focused_place (SeahorseCatalog *catalog)
return SEAHORSE_PLACE (keyring);
}
-/**
-* type: The type identifying this object
-* n_props: Number of properties
-* props: Properties
-*
-* Creates a new SeahorseKeyserverResults object, shows the resulting window
-*
-* Returns The SeahorseKeyserverResults object as GObject
-**/
-static GObject*
-seahorse_keyserver_results_constructor (GType type, guint n_props, GObjectConstructParam *props)
+static void
+seahorse_keyserver_results_constructed (GObject *obj)
{
- SeahorseKeyserverResults *self = SEAHORSE_KEYSERVER_RESULTS (G_OBJECT_CLASS (seahorse_keyserver_results_parent_class)->constructor(type, n_props, props));
+ SeahorseKeyserverResults *self = SEAHORSE_KEYSERVER_RESULTS (obj);
GtkActionGroup* actions;
GtkTreeSelection *selection;
GtkWindow *window;
char* title;
- g_return_val_if_fail (self, NULL);
-
+ G_OBJECT_CLASS (seahorse_keyserver_results_parent_class)->constructed (obj);
if (g_utf8_strlen (self->pv->search_string, -1) == 0) {
title = g_strdup (_("Remote Keys"));
@@ -347,8 +337,6 @@ seahorse_keyserver_results_constructor (GType type, guint n_props, GObjectConstr
g_object_get (seahorse_pgp_backend_get (), "actions", &actions, NULL);
seahorse_catalog_include_actions (SEAHORSE_CATALOG (self), actions);
g_object_unref (actions);
-
- return G_OBJECT (self);
}
/**
@@ -468,7 +456,7 @@ seahorse_keyserver_results_class_init (SeahorseKeyserverResultsClass *klass)
seahorse_keyserver_results_parent_class = g_type_class_peek_parent (klass);
g_type_class_add_private (klass, sizeof (SeahorseKeyserverResultsPrivate));
- gobject_class->constructor = seahorse_keyserver_results_constructor;
+ gobject_class->constructed = seahorse_keyserver_results_constructed;
gobject_class->finalize = seahorse_keyserver_results_finalize;
gobject_class->set_property = seahorse_keyserver_results_set_property;
gobject_class->get_property = seahorse_keyserver_results_get_property;
diff --git a/pgp/seahorse-keyserver-results.ui b/pgp/seahorse-keyserver-results.ui
index d30c2b8..16a56bb 100644
--- a/pgp/seahorse-keyserver-results.ui
+++ b/pgp/seahorse-keyserver-results.ui
@@ -11,9 +11,11 @@
</menu>
<menu name="Edit" action="edit-menu">
</menu>
- <menu name="Remote" action="remote-menu">
- <menuitem action="remote-find"/>
- </menu>
+ <placeholder name="RemoteMenu">
+ <menu name="Remote" action="remote-menu">
+ <menuitem action="remote-find"/>
+ </menu>
+ </placeholder>
<menu name="Help" action="help-menu">
<menuitem action="help-show"/>
</menu>
diff --git a/ssh/seahorse-ssh-actions.c b/ssh/seahorse-ssh-actions.c
index cf8137c..a9504fd 100644
--- a/ssh/seahorse-ssh-actions.c
+++ b/ssh/seahorse-ssh-actions.c
@@ -61,9 +61,11 @@ G_DEFINE_TYPE (SeahorseSshActions, seahorse_ssh_actions, SEAHORSE_TYPE_ACTIONS);
static const char* UI_DEFINITION = ""\
"<ui>"\
" <menubar>"\
-" <menu name='Remote' action='remote-menu'>"\
-" <menuitem action='remote-ssh-upload'/>"\
-" </menu>"\
+" <placeholder name='RemoteMenu'>"\
+" <menu name='Remote' action='remote-menu'>"\
+" <menuitem action='remote-ssh-upload'/>"\
+" </menu>"\
+" </placeholder>"\
" </menubar>"\
" <popup name='ObjectPopup'>"\
" <menuitem action='remote-ssh-upload'/>"\
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]