[gnome-dictionary] app: Remove Close menu entry
- From: Juan R. Garcia Blanco <juanrgar src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-dictionary] app: Remove Close menu entry
- Date: Sun, 14 Jun 2015 15:26:03 +0000 (UTC)
commit c6bb5fd79290addd3f700d73a019ba1de1da7505
Author: Juan R. GarcĂa Blanco <juanrgar gmail com>
Date: Sat Jun 13 19:35:53 2015 +0200
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
src/gdict-app-menus.ui | 7 -------
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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]