Merge lp:~matttbe/ubuntu/trusty/nautilus/lp1274740 into lp:ubuntu/trusty/nautilus

Proposed by Matthieu Baerts
Status: Rejected
Rejected by: Iain Lane
Proposed branch: lp:~matttbe/ubuntu/trusty/nautilus/lp1274740
Merge into: lp:ubuntu/trusty/nautilus
Diff against target: 102 lines (+22/-11)
5 files modified
.pc/ubuntu_titlebar_css.patch/src/nautilus-toolbar.c (+1/-1)
debian/changelog (+7/-0)
debian/patches/ubuntu_show_titlebar.patch (+12/-8)
src/nautilus-toolbar.c (+1/-1)
src/nautilus-window.c (+1/-1)
To merge this branch: bzr merge lp:~matttbe/ubuntu/trusty/nautilus/lp1274740
Reviewer Review Type Date Requested Status
Tim Lunn (community) Needs Fixing
Ubuntu branches Pending
Review via email: mp+204130@code.launchpad.net

Description of the change

Hello,

This branch fixes the bug #1274740 (Re-enable traditional titlebar on 'gnome-but-not-shell' sessions too).

With this new modification, we only have the new titlebar (CSD) on Gnome-Shell session (where DESKTOP_SESSION environment variable is set to 'gnome')

To post a comment you must log in.
Revision history for this message
Tim Lunn (darkxst) wrote :

It is not suitable to use DESKTOP_SESSION for this purpose. It really just specifies the session name, it is possible for a user to change this by installing a custom session file etc.

review: Needs Fixing
Revision history for this message
Iain Lane (laney) wrote :

I'll reject this MP because of the comments in the bug - let's revisit when the changes mentioned there land.

Revision history for this message
Iain Lane (laney) wrote :

p.s. thanks for working on this!

Unmerged revisions

345. By Matthieu Baerts

debian/patches/ubuntu_show_titlebar.patch:
Disable CSD titlebar on GNOME-but-not-shell sessions too (LP: #1274740)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file '.pc/ubuntu_titlebar_css.patch/src/nautilus-toolbar.c'
2--- .pc/ubuntu_titlebar_css.patch/src/nautilus-toolbar.c 2014-01-02 16:50:06 +0000
3+++ .pc/ubuntu_titlebar_css.patch/src/nautilus-toolbar.c 2014-01-30 23:35:37 +0000
4@@ -513,7 +513,7 @@
5 }
6
7 /* Separator and Close */
8- if (!g_strcmp0(g_getenv("XDG_CURRENT_DESKTOP"), "GNOME")) {
9+ if (g_strcmp0(g_getenv("DESKTOP_SESSION"), "gnome") == 0) {
10 separator = gtk_separator_new (GTK_ORIENTATION_VERTICAL);
11 gtk_container_add (GTK_CONTAINER (toolbar), separator);
12
13
14=== modified file 'debian/changelog'
15--- debian/changelog 2014-01-28 17:33:38 +0000
16+++ debian/changelog 2014-01-30 23:35:37 +0000
17@@ -1,3 +1,10 @@
18+nautilus (1:3.10.1-0ubuntu3) trusty; urgency=medium
19+
20+ * debian/patches/ubuntu_show_titlebar.patch:
21+ Disable CSD titlebar on GNOME-but-not-shell sessions too (LP: #1274740)
22+
23+ -- Matthieu Baerts (matttbe) <matttbe@ubuntu.com> Fri, 31 Jan 2014 00:18:39 +0100
24+
25 nautilus (1:3.10.1-0ubuntu2) trusty; urgency=medium
26
27 * debian/patches/interactive_search.patch:
28
29=== modified file 'debian/patches/ubuntu_show_titlebar.patch'
30--- debian/patches/ubuntu_show_titlebar.patch 2014-01-02 16:50:06 +0000
31+++ debian/patches/ubuntu_show_titlebar.patch 2014-01-30 23:35:37 +0000
32@@ -2,17 +2,19 @@
33 Date: Fri, 24 Jan 2014 08:24:31 +1100
34 Subject: [PATCH] Show Titlebars when running non-GNOME Session
35 Description: This patch re-enables traditional titlebars and removes the CSD close
36-button for all non-GNOME Sessions.
37+button for all non-GNOME-Shell Sessions.
38
39---- a/src/nautilus-toolbar.c
40-+++ b/src/nautilus-toolbar.c
41+Index: nautilus/src/nautilus-toolbar.c
42+===================================================================
43+--- nautilus.orig/src/nautilus-toolbar.c 2014-01-30 23:46:25.671983000 +0100
44++++ nautilus/src/nautilus-toolbar.c 2014-01-31 00:17:25.509536134 +0100
45 @@ -513,30 +513,31 @@
46 }
47
48 /* Separator and Close */
49 - separator = gtk_separator_new (GTK_ORIENTATION_VERTICAL);
50 - gtk_container_add (GTK_CONTAINER (toolbar), separator);
51-+ if (!g_strcmp0(g_getenv("XDG_CURRENT_DESKTOP"), "GNOME")) {
52++ if (g_strcmp0(g_getenv("DESKTOP_SESSION"), "gnome") == 0) {
53 + separator = gtk_separator_new (GTK_ORIENTATION_VERTICAL);
54 + gtk_container_add (GTK_CONTAINER (toolbar), separator);
55
56@@ -58,14 +60,16 @@
57 g_signal_connect_swapped (nautilus_preferences,
58 "changed::" NAUTILUS_PREFERENCES_ALWAYS_USE_LOCATION_ENTRY,
59 G_CALLBACK (toolbar_update_appearance), self);
60---- a/src/nautilus-window.c
61-+++ b/src/nautilus-window.c
62-@@ -1499,7 +1499,14 @@
63+Index: nautilus/src/nautilus-window.c
64+===================================================================
65+--- nautilus.orig/src/nautilus-window.c 2014-01-30 23:46:25.671983000 +0100
66++++ nautilus/src/nautilus-window.c 2014-01-31 00:17:09.557536357 +0100
67+@@ -1512,7 +1512,14 @@
68 G_CALLBACK (nautilus_window_load_extension_menus), window, G_CONNECT_SWAPPED);
69
70 window->details->toolbar = create_toolbar (window);
71 - gtk_window_set_titlebar (GTK_WINDOW (window), window->details->toolbar);
72-+ if (g_strcmp0(g_getenv("XDG_CURRENT_DESKTOP"), "GNOME")) {
73++ if (g_strcmp0(g_getenv("DESKTOP_SESSION"), "gnome") != 0) {
74 + gtk_container_add (GTK_CONTAINER (grid), window->details->toolbar);
75 + gtk_widget_set_hexpand (window->details->toolbar, TRUE);
76 + gtk_widget_set_vexpand (window->details->toolbar, FALSE);
77
78=== modified file 'src/nautilus-toolbar.c'
79--- src/nautilus-toolbar.c 2014-01-02 16:50:06 +0000
80+++ src/nautilus-toolbar.c 2014-01-30 23:35:37 +0000
81@@ -558,7 +558,7 @@
82 }
83
84 /* Separator and Close */
85- if (!g_strcmp0(g_getenv("XDG_CURRENT_DESKTOP"), "GNOME")) {
86+ if (g_strcmp0(g_getenv("DESKTOP_SESSION"), "gnome") == 0) {
87 separator = gtk_separator_new (GTK_ORIENTATION_VERTICAL);
88 gtk_container_add (GTK_CONTAINER (toolbar), separator);
89
90
91=== modified file 'src/nautilus-window.c'
92--- src/nautilus-window.c 2014-01-02 16:50:06 +0000
93+++ src/nautilus-window.c 2014-01-30 23:35:37 +0000
94@@ -1512,7 +1512,7 @@
95 G_CALLBACK (nautilus_window_load_extension_menus), window, G_CONNECT_SWAPPED);
96
97 window->details->toolbar = create_toolbar (window);
98- if (g_strcmp0(g_getenv("XDG_CURRENT_DESKTOP"), "GNOME")) {
99+ if (g_strcmp0(g_getenv("DESKTOP_SESSION"), "gnome") != 0) {
100 gtk_container_add (GTK_CONTAINER (grid), window->details->toolbar);
101 gtk_widget_set_hexpand (window->details->toolbar, TRUE);
102 gtk_widget_set_vexpand (window->details->toolbar, FALSE);

Subscribers

People subscribed via source and target branches