[gnome-dictionary] app: Remove Edit submenu
- From: Juan R. Garcia Blanco <juanrgar src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-dictionary] app: Remove Edit submenu
- Date: Sun, 14 Jun 2015 15:25:58 +0000 (UTC)
commit e2e7e181a3e87f72d698dae1eaffef7892d16b2b
Author: Juan R. GarcĂa Blanco <juanrgar gmail com>
Date: Sat Jun 13 19:29:40 2015 +0200
app: Remove Edit submenu
Simplify window menu by removing Find Next and Find Previous
entries. Now only a Find top-level entry is available.
See https://bugzilla.gnome.org/show_bug.cgi?id=334866
src/gdict-app-menus.ui | 147 ++++++++++++++++++++++--------------------------
src/gdict-window.c | 30 +----------
2 files changed, 69 insertions(+), 108 deletions(-)
---
diff --git a/src/gdict-app-menus.ui b/src/gdict-app-menus.ui
index 6a6f955..390fe78 100644
--- a/src/gdict-app-menus.ui
+++ b/src/gdict-app-menus.ui
@@ -59,84 +59,73 @@
</item>
</section>
</submenu>
- <submenu>
- <attribute name="label" translatable="yes">_Edit</attribute>
- <section>
- <item>
- <attribute name="label" translatable="yes">_Find</attribute>
- <attribute name="action">win.find</attribute>
- <attribute name="accel"><Primary>f</attribute>
- </item>
- <item>
- <attribute name="label" translatable="yes">Find Ne_xt</attribute>
- <attribute name="action">win.find-next</attribute>
- <attribute name="accel"><Primary>g</attribute>
- </item>
- <item>
- <attribute name="label" translatable="yes">Find Pre_vious</attribute>
- <attribute name="action">win.find-previous</attribute>
- <attribute name="accel"><Shift><Primary>g</attribute>
- </item>
- </section>
- </submenu>
- <submenu>
- <attribute name="label" translatable="yes">_View</attribute>
- <section>
- <item>
- <attribute name="label" translatable="yes">_Sidebar</attribute>
- <attribute name="action">win.view-sidebar</attribute>
- <attribute name="accel">F9</attribute>
- </item>
- </section>
- <section>
- <item>
- <attribute name="label" translatable="yes">Similar _Words</attribute>
- <attribute name="action">win.view-speller</attribute>
- <attribute name="accel"><Primary>t</attribute>
- </item>
- <item>
- <attribute name="label" translatable="yes">Dictionary Sources</attribute>
- <attribute name="action">win.view-source</attribute>
- <attribute name="accel"><Primary>d</attribute>
- </item>
- <item>
- <attribute name="label" translatable="yes">Available _Dictionaries</attribute>
- <attribute name="action">win.view-db</attribute>
- <attribute name="accel"><Primary>b</attribute>
- </item>
- <item>
- <attribute name="label" translatable="yes">Available St_rategies</attribute>
- <attribute name="action">win.view-strat</attribute>
- <attribute name="accel"><Primary>r</attribute>
- </item>
- </section>
- </submenu>
- <submenu>
- <attribute name="label" translatable="yes">_Go</attribute>
- <section>
- <item>
- <attribute name="label" translatable="yes">_Previous Definition</attribute>
- <attribute name="action">win.previous-def</attribute>
- <attribute name="accel"><Primary>Page_Up</attribute>
- </item>
- <item>
- <attribute name="label" translatable="yes">_Next Definition</attribute>
- <attribute name="action">win.next-def</attribute>
- <attribute name="accel"><Primary>Page_Down</attribute>
- </item>
- </section>
- <section>
- <item>
- <attribute name="label" translatable="yes">_First Definition</attribute>
- <attribute name="action">win.first-def</attribute>
- <attribute name="accel"><Primary>Home</attribute>
- </item>
- <item>
- <attribute name="label" translatable="yes">_Last Definition</attribute>
- <attribute name="action">win.last-def</attribute>
- <attribute name="accel"><Primary>End</attribute>
- </item>
- </section>
- </submenu>
+ <section>
+ <item>
+ <attribute name="label" translatable="yes">_Find</attribute>
+ <attribute name="action">win.find</attribute>
+ <attribute name="accel"><Primary>f</attribute>
+ </item>
+ </section>
+ <section>
+ <submenu>
+ <attribute name="label" translatable="yes">_View</attribute>
+ <section>
+ <item>
+ <attribute name="label" translatable="yes">_Sidebar</attribute>
+ <attribute name="action">win.view-sidebar</attribute>
+ <attribute name="accel">F9</attribute>
+ </item>
+ </section>
+ <section>
+ <item>
+ <attribute name="label" translatable="yes">Similar _Words</attribute>
+ <attribute name="action">win.view-speller</attribute>
+ <attribute name="accel"><Primary>t</attribute>
+ </item>
+ <item>
+ <attribute name="label" translatable="yes">Dictionary Sources</attribute>
+ <attribute name="action">win.view-source</attribute>
+ <attribute name="accel"><Primary>d</attribute>
+ </item>
+ <item>
+ <attribute name="label" translatable="yes">Available _Dictionaries</attribute>
+ <attribute name="action">win.view-db</attribute>
+ <attribute name="accel"><Primary>b</attribute>
+ </item>
+ <item>
+ <attribute name="label" translatable="yes">Available St_rategies</attribute>
+ <attribute name="action">win.view-strat</attribute>
+ <attribute name="accel"><Primary>r</attribute>
+ </item>
+ </section>
+ </submenu>
+ <submenu>
+ <attribute name="label" translatable="yes">_Go</attribute>
+ <section>
+ <item>
+ <attribute name="label" translatable="yes">_Previous Definition</attribute>
+ <attribute name="action">win.previous-def</attribute>
+ <attribute name="accel"><Primary>Page_Up</attribute>
+ </item>
+ <item>
+ <attribute name="label" translatable="yes">_Next Definition</attribute>
+ <attribute name="action">win.next-def</attribute>
+ <attribute name="accel"><Primary>Page_Down</attribute>
+ </item>
+ </section>
+ <section>
+ <item>
+ <attribute name="label" translatable="yes">_First Definition</attribute>
+ <attribute name="action">win.first-def</attribute>
+ <attribute name="accel"><Primary>Home</attribute>
+ </item>
+ <item>
+ <attribute name="label" translatable="yes">_Last Definition</attribute>
+ <attribute name="action">win.last-def</attribute>
+ <attribute name="accel"><Primary>End</attribute>
+ </item>
+ </section>
+ </submenu>
+ </section>
</menu>
</interface>
diff --git a/src/gdict-window.c b/src/gdict-window.c
index 45baa54..a3519fc 100644
--- a/src/gdict-window.c
+++ b/src/gdict-window.c
@@ -159,8 +159,6 @@ static const gchar *toggle_actions[] = {
"first-def",
"last-def",
"find",
- "find-next",
- "find-previous",
};
static gint n_toggle_state = G_N_ELEMENTS (toggle_actions);
@@ -924,30 +922,6 @@ gdict_window_cmd_edit_find (GSimpleAction *action,
}
static void
-gdict_window_cmd_edit_find_next (GSimpleAction *action,
- GVariant *parameter,
- gpointer user_data)
-{
- GdictWindow *window = user_data;
-
- g_assert (GDICT_IS_WINDOW (window));
-
- gdict_defbox_find_next (GDICT_DEFBOX (window->defbox));
-}
-
-static void
-gdict_window_cmd_edit_find_previous (GSimpleAction *action,
- GVariant *parameter,
- gpointer user_data)
-{
- GdictWindow *window = user_data;
-
- g_assert (GDICT_IS_WINDOW (window));
-
- gdict_defbox_find_previous (GDICT_DEFBOX (window->defbox));
-}
-
-static void
gdict_window_cmd_change_view_sidebar (GSimpleAction *action,
GVariant *state,
gpointer user_data)
@@ -1134,10 +1108,8 @@ static const GActionEntry entries[] =
{ "print", gdict_window_cmd_file_print, NULL, NULL, NULL },
{ "close", gdict_window_cmd_file_close_window, NULL, NULL, NULL },
- /* Edit menu */
+ /* Find item */
{ "find", gdict_window_cmd_edit_find, NULL, NULL, NULL },
- { "find-next", gdict_window_cmd_edit_find_next, NULL, NULL, NULL },
- { "find-previous", gdict_window_cmd_edit_find_previous, NULL, NULL, NULL },
/* Go menu */
{ "previous-def", gdict_window_cmd_go_previous_def, NULL, NULL, NULL },
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]