[nautilus/wip/gaction_] Formatting cleanups
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/gaction_] Formatting cleanups
- Date: Wed, 21 Jan 2015 04:12:06 +0000 (UTC)
commit 4d71bc0090eaf5dcd58bcd03f52b893fcea0e6d2
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Tue Jan 20 14:18:15 2015 -0800
Formatting cleanups
libnautilus-private/nautilus-ui-utilities.c | 14 +++++++++-----
src/nautilus-canvas-view.c | 2 --
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 f766b6f..a8f6fc4 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 92701d3..b453c30 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 ce86ebf..15c99bb 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));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]