Commit 6a280af7 authored by Leesoo Ahn's avatar Leesoo Ahn Committed by Debarshi Ray

application, main-toolbar: Rename "app.gear-menu" as "app.preview-menu"

There hasn't been a gear since commit 1d3532dd and 3.15.2, and
the icon was changed again in commit f284aa3c 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.

!83
parent 354f925d
Pipeline #55691 passed with stage
in 9 minutes and 29 seconds
......@@ -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);
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment