[gnome-photos/menu-retirement: 9/9] application, main-toolbar: Rename "app.gear-menu" as "app.preview-menu"
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos/menu-retirement: 9/9] application, main-toolbar: Rename "app.gear-menu" as "app.preview-menu"
- Date: Sun, 3 Feb 2019 09:13:50 +0000 (UTC)
commit 6a280af7f3eed13d1739f952ed384688ce8c6e5c
Author: Yi-Soo An <yisooan gmail com>
Date: Mon Jan 21 12:21:27 2019 +0900
application, main-toolbar: Rename "app.gear-menu" as "app.preview-menu"
There hasn't been a gear since commit 1d3532dd32e90a5d and 3.15.2, and
the icon was changed again in commit f284aa3c604916a1 when dropping
the application menu. Therefore, it's better to use a name that
describes the menu's purpose and not how the icon looks.
https://gitlab.gnome.org/GNOME/gnome-photos/merge_requests/83
src/photos-application.c | 16 ++++++++--------
src/photos-main-toolbar.c | 2 +-
2 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/src/photos-application.c b/src/photos-application.c
index 26a71af6..9bfcca36 100644
--- a/src/photos-application.c
+++ b/src/photos-application.c
@@ -91,13 +91,13 @@ struct _PhotosApplication
GSimpleAction *edit_done_action;
GSimpleAction *edit_revert_action;
GSimpleAction *fs_action;
- GSimpleAction *gear_action;
GSimpleAction *import_action;
GSimpleAction *import_cancel_action;
GSimpleAction *insta_action;
GSimpleAction *load_next_action;
GSimpleAction *load_previous_action;
GSimpleAction *open_action;
+ GSimpleAction *preview_menu_action;
GSimpleAction *primary_menu_action;
GSimpleAction *print_action;
GSimpleAction *properties_action;
@@ -527,7 +527,7 @@ photos_application_actions_update (PhotosApplication *self)
g_simple_action_set_enabled (self->load_previous_action, enable);
enable = (load_state == PHOTOS_LOAD_STATE_FINISHED && mode == PHOTOS_WINDOW_MODE_PREVIEW);
- g_simple_action_set_enabled (self->gear_action, enable);
+ g_simple_action_set_enabled (self->preview_menu_action, enable);
g_simple_action_set_enabled (self->set_bg_action, enable);
g_simple_action_set_enabled (self->set_ss_action, enable);
g_simple_action_set_enabled (self->zoom_begin_action, enable);
@@ -2727,10 +2727,6 @@ photos_application_startup (GApplication *application)
G_CALLBACK (photos_application_can_fullscreen_changed),
self);
- state = g_variant_new ("b", FALSE);
- self->gear_action = g_simple_action_new_stateful ("gear-menu", NULL, state);
- g_action_map_add_action (G_ACTION_MAP (self), G_ACTION (self->gear_action));
-
self->import_action = g_simple_action_new ("import-current", NULL);
g_signal_connect_swapped (self->import_action, "activate", G_CALLBACK (photos_application_import), self);
g_action_map_add_action (G_ACTION_MAP (self), G_ACTION (self->import_action));
@@ -2755,6 +2751,10 @@ photos_application_startup (GApplication *application)
g_signal_connect_swapped (self->open_action, "activate", G_CALLBACK (photos_application_open_current),
self);
g_action_map_add_action (G_ACTION_MAP (self), G_ACTION (self->open_action));
+ state = g_variant_new ("b", FALSE);
+ self->preview_menu_action = g_simple_action_new_stateful ("preview-menu", NULL, state);
+ g_action_map_add_action (G_ACTION_MAP (self), G_ACTION (self->preview_menu_action));
+
state = g_variant_new ("b", FALSE);
self->primary_menu_action = g_simple_action_new_stateful ("primary-menu", NULL, state);
g_action_map_add_action (G_ACTION_MAP (self), G_ACTION (self->primary_menu_action));
@@ -2882,8 +2882,8 @@ photos_application_startup (GApplication *application)
gtk_application_set_accels_for_action (GTK_APPLICATION (self), "app.delete", delete_accels);
gtk_application_set_accels_for_action (GTK_APPLICATION (self), "app.edit-current", edit_accels);
gtk_application_set_accels_for_action (GTK_APPLICATION (self), "app.fullscreen", fullscreen_accels);
- gtk_application_set_accels_for_action (GTK_APPLICATION (self), "app.gear-menu", menu_accels);
gtk_application_set_accels_for_action (GTK_APPLICATION (self), "app.help", help_menu_accels);
+ gtk_application_set_accels_for_action (GTK_APPLICATION (self), "app.preview-menu", menu_accels);
gtk_application_set_accels_for_action (GTK_APPLICATION (self), "app.primary-menu", menu_accels);
gtk_application_set_accels_for_action (GTK_APPLICATION (self), "app.print-current", print_current_accels);
gtk_application_set_accels_for_action (GTK_APPLICATION (self), "app.save-current", save_accels);
@@ -2969,13 +2969,13 @@ photos_application_dispose (GObject *object)
g_clear_object (&self->edit_done_action);
g_clear_object (&self->edit_revert_action);
g_clear_object (&self->fs_action);
- g_clear_object (&self->gear_action);
g_clear_object (&self->import_action);
g_clear_object (&self->import_cancel_action);
g_clear_object (&self->insta_action);
g_clear_object (&self->load_next_action);
g_clear_object (&self->load_previous_action);
g_clear_object (&self->open_action);
+ g_clear_object (&self->preview_menu_action);
g_clear_object (&self->primary_menu_action);
g_clear_object (&self->print_action);
g_clear_object (&self->properties_action);
diff --git a/src/photos-main-toolbar.c b/src/photos-main-toolbar.c
index df0ef79b..3040e07c 100644
--- a/src/photos-main-toolbar.c
+++ b/src/photos-main-toolbar.c
@@ -570,7 +570,7 @@ photos_main_toolbar_populate_for_preview (PhotosMainToolbar *self)
preview_menu = photos_main_toolbar_create_preview_menu (self);
image = gtk_image_new_from_icon_name ("view-more-symbolic", GTK_ICON_SIZE_BUTTON);
menu_button = gtk_menu_button_new ();
- gtk_actionable_set_action_name (GTK_ACTIONABLE (menu_button), "app.gear-menu");
+ gtk_actionable_set_action_name (GTK_ACTIONABLE (menu_button), "app.preview-menu");
gtk_button_set_image (GTK_BUTTON (menu_button), image);
gtk_menu_button_set_menu_model (GTK_MENU_BUTTON (menu_button), G_MENU_MODEL (preview_menu));
gtk_header_bar_pack_end (GTK_HEADER_BAR (self->header_bar), menu_button);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]