diff options
author | Juan R. García Blanco <juanrgar@gmail.com> | 2015-06-13 19:35:53 +0200 |
---|---|---|
committer | Juan R. García Blanco <juanrgar@gmail.com> | 2015-06-13 19:35:53 +0200 |
commit | c6bb5fd79290addd3f700d73a019ba1de1da7505 (patch) | |
tree | fd9a4e7752fc881e7b1469cb3751688b2aaca6ee | |
parent | e2e7e181a3e87f72d698dae1eaffef7892d16b2b (diff) | |
download | gnome-dictionary-c6bb5fd79290addd3f700d73a019ba1de1da7505.tar.gz |
app: Remove Close menu entry
We rely on the window decorator for providing a close button.
See https://bugzilla.gnome.org/show_bug.cgi?id=334866
-rw-r--r-- | src/gdict-app-menus.ui | 7 | ||||
-rw-r--r-- | src/gdict-window.c | 26 |
2 files changed, 5 insertions, 28 deletions
diff --git a/src/gdict-app-menus.ui b/src/gdict-app-menus.ui index 390fe78..699e865 100644 --- a/src/gdict-app-menus.ui +++ b/src/gdict-app-menus.ui @@ -51,13 +51,6 @@ <attribute name="accel"><Primary>p</attribute> </item> </section> - <section> - <item> - <attribute name="label" translatable="yes">_Close</attribute> - <attribute name="action">win.close</attribute> - <attribute name="accel"><Primary>w</attribute> - </item> - </section> </submenu> <section> <item> diff --git a/src/gdict-window.c b/src/gdict-window.c index a3519fc..130904e 100644 --- a/src/gdict-window.c +++ b/src/gdict-window.c @@ -891,25 +891,6 @@ gdict_window_cmd_file_print (GSimpleAction *action, } static void -gdict_window_cmd_file_close_window (GSimpleAction *action, - GVariant *parameter, - gpointer user_data) -{ - GdictWindow *window = user_data; - - g_assert (GDICT_IS_WINDOW (window)); - - gdict_window_store_state (window); - - /* if this was called from the uimanager, destroy the widget; - * otherwise, if it was called from the delete_event, the widget - * will destroy itself. - */ - if (action) - gtk_widget_destroy (GTK_WIDGET (window)); -} - -static void gdict_window_cmd_edit_find (GSimpleAction *action, GVariant *parameter, gpointer user_data) @@ -1106,7 +1087,6 @@ static const GActionEntry entries[] = { "save-as", gdict_window_cmd_save_as, NULL, NULL, NULL }, { "preview", gdict_window_cmd_file_preview, NULL, NULL, NULL }, { "print", gdict_window_cmd_file_print, NULL, NULL, NULL }, - { "close", gdict_window_cmd_file_close_window, NULL, NULL, NULL }, /* Find item */ { "find", gdict_window_cmd_edit_find, NULL, NULL, NULL }, @@ -1135,7 +1115,11 @@ gdict_window_delete_event_cb (GtkWidget *widget, GdkEvent *event, gpointer user_data) { - gdict_window_cmd_file_close_window (NULL, NULL, GDICT_WINDOW (widget)); + GdictWindow *window = GDICT_WINDOW (widget); + + g_assert (GDICT_IS_WINDOW (window)); + + gdict_window_store_state (window); return FALSE; } |