Merge lp:~robert-ancell/unity-control-center/always-menubar into lp:unity-control-center

Proposed by Robert Ancell on 2016-03-09
Status: Merged
Approved by: Sebastien Bacher on 2016-03-15
Approved revision: 12852
Merged at revision: 12857
Proposed branch: lp:~robert-ancell/unity-control-center/always-menubar
Merge into: lp:unity-control-center
Diff against target: 58 lines (+16/-32)
1 file modified
shell/control-center.c (+16/-32)
To merge this branch: bzr merge lp:~robert-ancell/unity-control-center/always-menubar
Reviewer Review Type Date Requested Status
Sebastien Bacher 2016-03-09 Approve on 2016-03-15
Review via email: mp+288586@code.launchpad.net

Commit message

Always use a menubar.

To post a comment you must log in.
Sebastien Bacher (seb128) wrote :

That makes sense

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'shell/control-center.c'
2--- shell/control-center.c 2014-04-10 11:08:20 +0000
3+++ shell/control-center.c 2016-03-09 22:33:09 +0000
4@@ -266,38 +266,22 @@
5 g_action_map_add_action (G_ACTION_MAP (application), action);
6 g_signal_connect (action, "activate", G_CALLBACK (quit_activated), shell);
7
8- if (!g_strcmp0(g_getenv("XDG_CURRENT_DESKTOP"), "Unity"))
9- {
10- menubar = g_menu_new ();
11- menu = g_menu_new ();
12-
13- section = g_menu_new ();
14- g_menu_append (section, _("Contents"), "app.contents");
15- g_menu_append_section (menu, NULL, G_MENU_MODEL (section));
16-
17- g_menu_append (menu, _("Quit"), "app.quit");
18-
19- g_menu_append_submenu (menubar, _("Help"), G_MENU_MODEL (menu));
20-
21- gtk_application_set_menubar (GTK_APPLICATION (application),
22- G_MENU_MODEL (menubar));
23-
24- g_signal_connect (shell, "notify::active-panel",
25- G_CALLBACK (active_panel_changed_cb), section);
26- }
27- else
28- {
29- menu = g_menu_new ();
30-
31- section = g_menu_new ();
32- g_menu_append (section, _("Help"), "app.help");
33- g_menu_append (section, _("Quit"), "app.quit");
34-
35- g_menu_append_section (menu, NULL, G_MENU_MODEL (section));
36-
37- gtk_application_set_app_menu (GTK_APPLICATION (application),
38- G_MENU_MODEL (menu));
39- }
40+ menubar = g_menu_new ();
41+ menu = g_menu_new ();
42+
43+ section = g_menu_new ();
44+ g_menu_append (section, _("Contents"), "app.contents");
45+ g_menu_append_section (menu, NULL, G_MENU_MODEL (section));
46+
47+ g_menu_append (menu, _("Quit"), "app.quit");
48+
49+ g_menu_append_submenu (menubar, _("Help"), G_MENU_MODEL (menu));
50+
51+ gtk_application_set_menubar (GTK_APPLICATION (application),
52+ G_MENU_MODEL (menubar));
53+
54+ g_signal_connect (shell, "notify::active-panel",
55+ G_CALLBACK (active_panel_changed_cb), section);
56
57 gtk_application_add_accelerator (GTK_APPLICATION (application),
58 "F1", "app.help", NULL);

Subscribers

People subscribed via source and target branches