diff options
author | Cosimo Cecchi <cosimoc@gnome.org> | 2015-01-20 14:18:15 -0800 |
---|---|---|
committer | Carlos Soriano <csoriano@gnome.org> | 2015-01-24 02:06:03 +0100 |
commit | 27858e6b691b9434ce1d922ce7e46b89066141b7 (patch) | |
tree | d3f25ce09a2f503226f22cb522aee6eff0398aa1 | |
parent | 77dfdd3d392af21b6b8d6cc17bd2375457161e6a (diff) | |
download | nautilus-27858e6b691b9434ce1d922ce7e46b89066141b7.tar.gz |
Formatting cleanups
-rw-r--r-- | libnautilus-private/nautilus-ui-utilities.c | 14 | ||||
-rw-r--r-- | src/nautilus-canvas-view.c | 2 | ||||
-rw-r--r-- | src/nautilus-toolbar.c | 5 |
3 files changed, 12 insertions, 9 deletions
diff --git a/libnautilus-private/nautilus-ui-utilities.c b/libnautilus-private/nautilus-ui-utilities.c index f766b6fd6..a8f6fc470 100644 --- a/libnautilus-private/nautilus-ui-utilities.c +++ b/libnautilus-private/nautilus-ui-utilities.c @@ -54,17 +54,20 @@ find_gmenu_model (GMenuModel *model, submodel = g_menu_model_get_item_link (model, i, G_MENU_LINK_SECTION); - if (!submodel) { + if (!submodel) submodel = g_menu_model_get_item_link (model, i, G_MENU_LINK_SUBMENU); - if (!submodel) - continue; - } + + if (!submodel) + continue; j_items = g_menu_model_get_n_items (submodel); - for (j = 0; j < j_items && !insertion_model; j++) { + for (j = 0; j < j_items; j++) { submenu = g_menu_model_get_item_link (submodel, j, G_MENU_LINK_SUBMENU); if (submenu) insertion_model = find_gmenu_model (submenu, model_id); + + if (insertion_model) + break; } } @@ -146,6 +149,7 @@ nautilus_pop_up_context_menu (GtkWidget *parent, gtk_menu = gtk_menu_new_from_model (G_MENU_MODEL (menu)); gtk_menu_attach_to_widget (GTK_MENU (gtk_menu), parent, NULL); + /* The event button needs to be 0 if we're popping up this menu from * a button release, else a 2nd click outside the menu with any button * other than the one that invoked the menu will be ignored (instead diff --git a/src/nautilus-canvas-view.c b/src/nautilus-canvas-view.c index 92701d376..b453c30f2 100644 --- a/src/nautilus-canvas-view.c +++ b/src/nautilus-canvas-view.c @@ -1066,8 +1066,6 @@ nautilus_canvas_view_update_toolbar_menus (NautilusView *view) toolbar = NAUTILUS_TOOLBAR (nautilus_window_get_toolbar (nautilus_view_get_window (view))); - - nautilus_toolbar_show_sort_menu (toolbar); file = nautilus_view_get_directory_as_file (NAUTILUS_VIEW (view)); diff --git a/src/nautilus-toolbar.c b/src/nautilus-toolbar.c index ce86ebfdf..15c99bba2 100644 --- a/src/nautilus-toolbar.c +++ b/src/nautilus-toolbar.c @@ -633,8 +633,9 @@ nautilus_toolbar_hide_reload (NautilusToolbar *self) gtk_widget_hide (self->priv->reload); } -void nautilus_toolbar_view_menu_widget_set_zoom_level (NautilusToolbar *self, - gdouble level) +void +nautilus_toolbar_view_menu_widget_set_zoom_level (NautilusToolbar *self, + gdouble level) { g_return_if_fail (NAUTILUS_IS_TOOLBAR (self)); |