[nautilus/origin/2070-menu-item-re-organization: 1/5] remove-100percent
- From: António Fernandes <antoniof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/origin/2070-menu-item-re-organization: 1/5] remove-100percent
- Date: Mon, 10 Jan 2022 13:10:39 +0000 (UTC)
commit db67fab16a06d866bada5c7fe6d7ff02f21bd0dc
Author: António Fernandes <antoniof gnome org>
Date: Mon Jan 10 12:48:15 2022 +0000
remove-100percent
src/nautilus-files-view.c | 9 ---------
src/resources/ui/nautilus-toolbar-view-menu.ui | 6 ------
src/resources/ui/nautilus-toolbar.ui | 3 ++-
3 files changed, 2 insertions(+), 16 deletions(-)
---
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
index eb07d9f95..7c995aaca 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -8175,21 +8175,12 @@ nautilus_files_view_reset_view_menu (NautilusFilesView *view)
{
NautilusFilesViewPrivate *priv = nautilus_files_view_get_instance_private (view);
NautilusFile *file;
- GMenuModel *zoom_section = priv->toolbar_menu_sections->zoom_section;
GMenuModel *sort_section = priv->toolbar_menu_sections->sort_section;
- g_autofree gchar *zoom_level_percent = NULL;
const gchar *trashed_action;
gint i;
file = nautilus_files_view_get_directory_as_file (NAUTILUS_FILES_VIEW (view));
- /* We want to show the percentage like this: [ - | 100% | + ] */
- zoom_level_percent = g_strdup_printf ("%.0f%%", nautilus_files_view_get_zoom_level_percentage (view) *
100.0);
- i = nautilus_g_menu_model_find_by_string (zoom_section, "action", "view.zoom-standard");
- g_return_if_fail (i != -1);
- nautilus_g_menu_replace_string_in_item (G_MENU (zoom_section), i,
- "label", zoom_level_percent);
-
/* When not in Trash, set an inexistant action to hide the menu item. This
* works under the assumptiont that the menu item has its "hidden-when"
* attribute set to "action-disabled", and that an inexistant action is
diff --git a/src/resources/ui/nautilus-toolbar-view-menu.ui b/src/resources/ui/nautilus-toolbar-view-menu.ui
index a951047cf..2d0260ee5 100644
--- a/src/resources/ui/nautilus-toolbar-view-menu.ui
+++ b/src/resources/ui/nautilus-toolbar-view-menu.ui
@@ -7,12 +7,6 @@
<attribute name="action">view.zoom-out</attribute>
<attribute name="verb-icon">zoom-out-symbolic</attribute>
</item>
- <item>
- <!-- This label is a placeholder. The view is going to replace it with a
- percentage, like this: [ - | 100% | + ] -->
- <attribute name="label" translatable="yes">Reset zoom</attribute>
- <attribute name="action">view.zoom-standard</attribute>
- </item>
<item>
<attribute name="label" translatable="yes">Zoom in</attribute>
<attribute name="action">view.zoom-in</attribute>
diff --git a/src/resources/ui/nautilus-toolbar.ui b/src/resources/ui/nautilus-toolbar.ui
index 139764612..2deaa9c8b 100644
--- a/src/resources/ui/nautilus-toolbar.ui
+++ b/src/resources/ui/nautilus-toolbar.ui
@@ -5,7 +5,8 @@
<object class="GtkPopoverMenu" id="forward_menu"/>
<menu id="view_menu">
<section>
- <attribute name="display-hint">horizontal-buttons</attribute>
+ <attribute name="label" translatable="yes">Icon size</attribute>
+ <attribute name="display-hint">inline-buttons</attribute>
<!--
Zoom section.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]