Merge lp:~xnox/appmenu-qt5/correct-suggests into lp:appmenu-qt5

Proposed by Dimitri John Ledkov
Status: Needs review
Proposed branch: lp:~xnox/appmenu-qt5/correct-suggests
Merge into: lp:appmenu-qt5
Diff against target: 139 lines (+57/-7)
5 files modified
debian/changelog (+9/-0)
debian/control (+3/-6)
debian/rules (+3/-0)
src/appmenuplatformmenubar.cpp (+41/-0)
src/src.pro (+1/-1)
To merge this branch: bzr merge lp:~xnox/appmenu-qt5/correct-suggests
Reviewer Review Type Date Requested Status
Ted Gould (community) Needs Information
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+216059@code.launchpad.net

Commit message

Make all shlib depends become suggests, to avoid pulling in every generation of every toolkit on to all images.

Description of the change

Make all shlib depends become suggests, to avoid pulling in every generation of every toolkit on to all images.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Ted Gould (ted) wrote :

It seems like there's two different branches here?

review: Needs Information
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

On 18 April 2014 03:16, Ted Gould <email address hidden> wrote:
> Review: Needs Information
>
> It seems like there's two different branches here?

No, this is one commit on top of ci-train branch which is/was in -proposed.

--
Regards,

Dimitri.

Unmerged revisions

19. By Dimitri John Ledkov

Make all shlib depends become suggests, to avoid pulling in every generation of every toolkit on to all images.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2014-03-14 15:04:01 +0000
3+++ debian/changelog 2014-04-16 10:44:22 +0000
4@@ -1,3 +1,12 @@
5+appmenu-qt5 (0.3.0+14.04.20140415-0ubuntu1) trusty; urgency=low
6+
7+ [ Łukasz 'sil2100' Zemczak ]
8+ * When working with a Gnome/GTK theme, do the same thing as the gtk2
9+ platformtheme plugin does - fetch the SystemIconThemeName (and its
10+ fallback) from settings in the system (LP: #1306472)
11+
12+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Tue, 15 Apr 2014 10:27:05 +0000
13+
14 appmenu-qt5 (0.3.0+14.04.20140314-0ubuntu1) trusty; urgency=low
15
16 [ Łukasz 'sil2100' Zemczak ]
17
18=== modified file 'debian/control'
19--- debian/control 2014-02-03 14:51:17 +0000
20+++ debian/control 2014-04-16 10:44:22 +0000
21@@ -14,6 +14,7 @@
22 qtbase5-dev (>= 5.2.0),
23 qtbase5-private-dev (>= 5.2.0),
24 pkg-config,
25+ libgtk2.0-dev,
26 Standards-Version: 3.9.5
27 Homepage: https://launchpad.net/appmenu-qt5
28 # if you don't have have commit access to this branch but would like to upload
29@@ -23,12 +24,8 @@
30
31 Package: appmenu-qt5
32 Architecture: any
33-Depends: ${misc:Depends},
34- ${shlibs:Depends},
35-Suggests: libqt5core5,
36- libqt5dbus5,
37- libqt5gui5,
38- libqt5widgets5,
39+Depends: ${misc:Depends}
40+Suggests: ${shlibs:Suggests},
41 Description: application menu for Qt5
42 appmenu provides you with an integrated application menu in your global
43 menu bar. It functions as a QPA platformtheme plugin.
44
45=== modified file 'debian/rules'
46--- debian/rules 2014-03-14 09:00:30 +0000
47+++ debian/rules 2014-04-16 10:44:22 +0000
48@@ -9,3 +9,6 @@
49
50 override_dh_auto_configure:
51 qmake CONFIG+=enable-by-default
52+
53+override_dh_shlibdeps:
54+ dh_shlibdeps -- -dSuggests
55
56=== modified file 'src/appmenuplatformmenubar.cpp'
57--- src/appmenuplatformmenubar.cpp 2014-01-10 16:14:17 +0000
58+++ src/appmenuplatformmenubar.cpp 2014-04-16 10:44:22 +0000
59@@ -32,6 +32,12 @@
60 #include <QMenu>
61 #include <QDebug>
62 #include <QList>
63+#include <QVariant>
64+
65+#undef signals // Needed to make sure we can include gtk.h
66+#include <gtk/gtk.h>
67+#include <X11/Xlib.h>
68+
69
70 #define LOG qDebug() << "appmenu-qt:" << __FUNCTION__ << __LINE__
71 #define LOG_VAR(x) qDebug() << "appmenu-qt:" << __FUNCTION__ << __LINE__ << #x ":" << x
72@@ -210,6 +216,17 @@
73
74 ///////////////////////////////////////////////////////////
75
76+/* Helper function, as copy-pasted from Qt 5.2.1 gtk2 platformthemeplugin */
77+static QString gtkSetting(const gchar *propertyName)
78+{
79+ GtkSettings *settings = gtk_settings_get_default();
80+ gchararray value;
81+ g_object_get(settings, propertyName, &value, NULL);
82+ QString str = QString::fromUtf8(value);
83+ g_free(value);
84+ return str;
85+}
86+
87 /*
88 * The GnomeAppMenuPlatformTheme is a platform theme providing the platform
89 * menubar functionality with the Qt5 QGnomeTheme look
90@@ -217,12 +234,36 @@
91 class GnomeAppMenuPlatformTheme : public QGnomeTheme
92 {
93 public:
94+ GnomeAppMenuPlatformTheme();
95 virtual QPlatformMenuItem* createPlatformMenuItem() const { return 0; }
96 virtual QPlatformMenu* createPlatformMenu() const { return 0; }
97 virtual QPlatformMenuBar* createPlatformMenuBar() const;
98+
99+ virtual QVariant themeHint(QPlatformTheme::ThemeHint hint) const;
100 };
101
102
103+GnomeAppMenuPlatformTheme::GnomeAppMenuPlatformTheme()
104+ : QGnomeTheme()
105+{
106+ int (*oldErrorHandler)(Display *, XErrorEvent *) = XSetErrorHandler(NULL);
107+ gtk_init(0, 0);
108+ XSetErrorHandler(oldErrorHandler);
109+}
110+
111+QVariant GnomeAppMenuPlatformTheme::themeHint(QPlatformTheme::ThemeHint hint) const
112+{
113+ switch (hint) {
114+ case QPlatformTheme::SystemIconThemeName:
115+ return QVariant(gtkSetting("gtk-icon-theme-name"));
116+ case QPlatformTheme::SystemIconFallbackThemeName:
117+ return QVariant(gtkSetting("gtk-fallback-icon-theme"));
118+ default:
119+ return QGnomeTheme::themeHint(hint);
120+ }
121+}
122+
123+
124 QPlatformMenuBar *
125 GnomeAppMenuPlatformTheme::createPlatformMenuBar() const
126 {
127
128=== modified file 'src/src.pro'
129--- src/src.pro 2014-01-13 16:53:07 +0000
130+++ src/src.pro 2014-04-16 10:44:22 +0000
131@@ -8,7 +8,7 @@
132 DBUS_INTERFACES += com.canonical.AppMenu.Registrar.xml
133
134 CONFIG += X11 link_pkgconfig debug
135-PKGCONFIG += dbusmenu-qt5
136+PKGCONFIG += dbusmenu-qt5 gtk+-2.0
137 DESTDIR = ./
138
139 HEADERS += \

Subscribers

People subscribed via source and target branches