Merge lp:~vanvugt/unity/remove-gtkloader into lp:unity

Proposed by Daniel van Vugt
Status: Merged
Merged at revision: 2396
Proposed branch: lp:~vanvugt/unity/remove-gtkloader
Merge into: lp:unity
Diff against target: 172 lines (+0/-107)
8 files modified
CMakeLists.txt (+0/-1)
plugins/gtkloader/CMakeLists.txt (+0/-5)
plugins/gtkloader/gtkloader.xml.in (+0/-7)
plugins/gtkloader/src/gtkloader.cpp (+0/-46)
plugins/gtkloader/src/gtkloader.h (+0/-42)
po/POTFILES.in (+0/-1)
tools/apply_unity_formatting.sh (+0/-2)
tools/unity.cmake (+0/-3)
To merge this branch: bzr merge lp:~vanvugt/unity/remove-gtkloader
Reviewer Review Type Date Requested Status
Sam Spilsbury (community) Disapprove
Andrea Azzarone (community) Approve
Review via email: mp+109316@code.launchpad.net

Commit message

Remove dead code: gtkloader plugin

gtkloader has never been used AFAIK. Instead, in Unity 4.x the GTK init
happened in compiz' main(). And in Unity 5.x, the GTK init happens in
unityshell.cpp: UnityPluginVTable::init(). gtkloader is not even mentioned
in the Unity compizconfig profile. It's dead code, and redundant too.

To post a comment you must log in.
Revision history for this message
Andrea Azzarone (azzar1) wrote :

+1

review: Approve
Revision history for this message
Sam Spilsbury (smspillaz) wrote :

We'll need this for sheet style dialogues

review: Disapprove
Revision history for this message
Sam Spilsbury (smspillaz) wrote :

To clarify - we can only initialize gtk+ once, and I'd prefer that we don't do it in a distro patch. Because we'll be enabling sheet style dialogues this cycle in a separate plugin, we need to have gtkloader in a plugin that is guarunteed to load once, and before unityshell and unitydialog.

The reason why it existed in unityshell and in a distro patch in compiz was purely historical - there was difficulty in enabling new plugins on upgrades. That reason no longer exists - we have settings upgrades in compizconfig to mantion that.

Revision history for this message
Sam Spilsbury (smspillaz) wrote :

*to handle that

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Sheet style dialogs shouldn't relate to gtk at all. That's just a window animation and a change to window management.

Revision history for this message
Sam Spilsbury (smspillaz) wrote :

It uses gtksettings to get the window dim color. Have a chat to me before removing it.

Sent from Samsung Mobile

 Daniel van Vugt <email address hidden> wrote:

Sheet style dialogs shouldn't relate to gtk at all. That's just a window animation and a change to window management.
--
https://code.launchpad.net/~vanvugt/unity/remove-gtkloader/+merge/109316
You are reviewing the proposed merge of lp:~vanvugt/unity/remove-gtkloader into lp:unity.

Revision history for this message
Sam Spilsbury (smspillaz) wrote :

I'm surpised this was merged in without much consultation. Nevertheless, I'll be happy to reintroduce similar functionality once we get the ball rolling on sheet style dialogues in the coming weeks.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Wow, I'm surprised this was merged too. It seems no human is to blame. Tarmac did it (!?)

revno: 2396 [merge]
author: Daniel van Vugt <email address hidden>
committer: Tarmac <---

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

BTW Sam, it now occurs to me that even if we do introduce any new feature that requires gtk initialization, keeping gtkloader would not make sense in any scenario:

1. The new feature was in lp:unity. In that case, gtk initialization is already done in unityshell and gtkloader is not required.

or

2. The new feature goes outside of lp:unity, like lp:compiz or somewhere else. In that case, gtk initialization should go in the project where the new feature is. And still, there is no reason to keep gtkloader in lp:unity.

Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

It has been merged because Andrea changed the status:

The proposal to merge lp:~vanvugt/unity/remove-gtkloader into lp:unity has been updated.

    Status: Needs review => Approved

----

then, he rolled it back:

The proposal to merge lp:~vanvugt/unity/remove-gtkloader into lp:unity has been updated.

    Status: Approved => Needs review

But the merger was already building/testing the branch by then.

Aren't you subscribed to the emails of all merge requests? This is pretty clear there.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Sorry didrocks. My email filter wasn't good enough to pick up your comment. I've now fixed my filters.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2012-05-28 03:19:35 +0000
3+++ CMakeLists.txt 2012-06-08 09:15:24 +0000
4@@ -138,7 +138,6 @@
5 add_subdirectory(shortcuts)
6 add_subdirectory(unity-standalone)
7 add_subdirectory(plugins/unityshell)
8-add_subdirectory(plugins/gtkloader)
9 add_subdirectory(plugins/networkarearegion)
10 add_subdirectory(plugins/unitydialog)
11 add_subdirectory(plugins/unity-mt-grab-handles)
12
13=== removed directory 'plugins/gtkloader'
14=== removed file 'plugins/gtkloader/CMakeLists.txt'
15--- plugins/gtkloader/CMakeLists.txt 2011-06-24 04:35:33 +0000
16+++ plugins/gtkloader/CMakeLists.txt 1970-01-01 00:00:00 +0000
17@@ -1,5 +0,0 @@
18-find_package (Compiz REQUIRED)
19-
20-include (CompizPlugin)
21-
22-compiz_plugin (gtkloader PKGDEPS gtk+-3.0)
23
24=== removed file 'plugins/gtkloader/gtkloader.xml.in'
25--- plugins/gtkloader/gtkloader.xml.in 2011-06-24 04:35:33 +0000
26+++ plugins/gtkloader/gtkloader.xml.in 1970-01-01 00:00:00 +0000
27@@ -1,7 +0,0 @@
28-<compiz>
29- <plugin name="gtkloader" useBcop="true">
30- <_short>GTK Loader</_short>
31- <_long>Initializes GTK once</_long>
32- <category>Utility</category>
33- </plugin>
34-</compiz>
35
36=== removed directory 'plugins/gtkloader/src'
37=== removed file 'plugins/gtkloader/src/gtkloader.cpp'
38--- plugins/gtkloader/src/gtkloader.cpp 2011-07-21 14:59:25 +0000
39+++ plugins/gtkloader/src/gtkloader.cpp 1970-01-01 00:00:00 +0000
40@@ -1,46 +0,0 @@
41-/*
42- * Copyright (C) 2010 Canonical Ltd
43- *
44- * This program is free software: you can redistribute it and/or modify
45- * it under the terms of the GNU General Public License version 3 as
46- * published by the Free Software Foundation.
47- *
48- * This program is distributed in the hope that it will be useful,
49- * but WITHOUT ANY WARRANTY; without even the implied warranty of
50- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
51- * GNU General Public License for more details.
52- *
53- * You should have received a copy of the GNU General Public License
54- * along with this program. If not, see <http://www.gnu.org/licenses/>.
55- *
56- * Authored by: Sam Spilsbury <sam.spilsbury@canonical.com>
57- */
58-
59-#include "gtkloader.h"
60-
61-COMPIZ_PLUGIN_20090315(gtkloader, GTKLoaderPluginVTable);
62-
63-GTKLoaderScreen::GTKLoaderScreen(CompScreen* screen) :
64- PluginClassHandler <GTKLoaderScreen, CompScreen> (screen)
65-{
66-}
67-
68-bool
69-GTKLoaderPluginVTable::init()
70-{
71- int (*old_handler)(Display*, XErrorEvent*);
72- old_handler = XSetErrorHandler(NULL);
73-
74- XSetErrorHandler(old_handler);
75-
76- if (!CompPlugin::checkPluginABI("core", CORE_ABIVERSION))
77- return false;
78-
79- if (!gtk_init_check(&programArgc, &programArgv))
80- {
81- compLogMessage("gtkloader", CompLogLevelError, "Couldn't initialize gtk");
82- return false;
83- }
84-
85- return true;
86-}
87
88=== removed file 'plugins/gtkloader/src/gtkloader.h'
89--- plugins/gtkloader/src/gtkloader.h 2011-07-21 14:59:25 +0000
90+++ plugins/gtkloader/src/gtkloader.h 1970-01-01 00:00:00 +0000
91@@ -1,42 +0,0 @@
92-/*
93- * Copyright (C) 2010 Canonical Ltd
94- *
95- * This program is free software: you can redistribute it and/or modify
96- * it under the terms of the GNU General Public License version 3 as
97- * published by the Free Software Foundation.
98- *
99- * This program is distributed in the hope that it will be useful,
100- * but WITHOUT ANY WARRANTY; without even the implied warranty of
101- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
102- * GNU General Public License for more details.
103- *
104- * You should have received a copy of the GNU General Public License
105- * along with this program. If not, see <http://www.gnu.org/licenses/>.
106- *
107- * Authored by: Sam Spilsbury <sam.spilsbury@canonical.com>
108- */
109-
110-#include <gtk/gtk.h>
111-#include <core/core.h>
112-#include <X11/Xatom.h>
113-#include <X11/Xproto.h>
114-#include <core/pluginclasshandler.h>
115-
116-#include "gtkloader_options.h"
117-
118-class GTKLoaderScreen :
119- public PluginClassHandler <GTKLoaderScreen, CompScreen>,
120- public GtkloaderOptions
121-{
122-public:
123-
124- GTKLoaderScreen(CompScreen*);
125-};
126-
127-class GTKLoaderPluginVTable :
128- public CompPlugin::VTableForScreen <GTKLoaderScreen>
129-{
130-public:
131-
132- bool init();
133-};
134
135=== modified file 'po/POTFILES.in'
136--- po/POTFILES.in 2012-05-07 22:28:17 +0000
137+++ po/POTFILES.in 2012-06-08 09:15:24 +0000
138@@ -19,7 +19,6 @@
139 launcher/SpacerLauncherIcon.cpp
140 launcher/TrashLauncherIcon.cpp
141 panel/PanelMenuView.cpp
142-plugins/gtkloader/gtkloader.xml.in
143 plugins/networkarearegion/networkarearegion.xml.in
144 plugins/unity-mt-grab-handles/unitymtgrabhandles.xml.in
145 plugins/unitydialog/unitydialog.xml.in
146
147=== modified file 'tools/apply_unity_formatting.sh'
148--- tools/apply_unity_formatting.sh 2011-07-21 14:59:25 +0000
149+++ tools/apply_unity_formatting.sh 2012-06-08 09:15:24 +0000
150@@ -1,8 +1,6 @@
151 astyle --options=astyle-formatter \
152 ../UnityCore/*.cpp \
153 ../UnityCore/*.h \
154- ../plugins/gtkloader/src/*.cpp \
155- ../plugins/gtkloader/src/*.h \
156 ../plugins/networkarearegion/src/*.cpp \
157 ../plugins/networkarearegion/src/*.h \
158 ../plugins/unitydialog/src/*.cpp \
159
160=== modified file 'tools/unity.cmake'
161--- tools/unity.cmake 2012-04-19 11:26:26 +0000
162+++ tools/unity.cmake 2012-06-08 09:15:24 +0000
163@@ -38,9 +38,6 @@
164 "%s/bin/*unity*" % supported_prefix,
165 "%s/include/Unity*" % supported_prefix,
166 "%s/lib/pkgconfig/unity*" % supported_prefix,
167- "%s/.compiz-1/*/*gtkloader*" % home_dir,
168- "%s/.config/compiz-1/gsettings/schemas/*gtkloader*" % home_dir,
169- "%s/.gconf/schemas/*gtkloader*" % home_dir,
170 "%s/.compiz-1/*/*networkarearegion*" % home_dir,
171 "%s/.config/compiz-1/gsettings/schemas/*networkarearegion*" % home_dir,
172 "%s/.gconf/schemas/*networkarearegion*" % home_dir,