summaryrefslogtreecommitdiffstats
path: root/meta-xfce
diff options
context:
space:
mode:
Diffstat (limited to 'meta-xfce')
-rw-r--r--meta-xfce/recipes-xfce/xfce4-settings/xfce4-settings/0003-Remember-the-settings-manager-window-size-bug-9384.patch155
-rw-r--r--meta-xfce/recipes-xfce/xfce4-settings/xfce4-settings_4.10.0.bb3
2 files changed, 157 insertions, 1 deletions
diff --git a/meta-xfce/recipes-xfce/xfce4-settings/xfce4-settings/0003-Remember-the-settings-manager-window-size-bug-9384.patch b/meta-xfce/recipes-xfce/xfce4-settings/xfce4-settings/0003-Remember-the-settings-manager-window-size-bug-9384.patch
new file mode 100644
index 000000000..8c1d1d9aa
--- /dev/null
+++ b/meta-xfce/recipes-xfce/xfce4-settings/xfce4-settings/0003-Remember-the-settings-manager-window-size-bug-9384.patch
@@ -0,0 +1,155 @@
1From b3b1986327b9b42ac6f9442443ff103f6565a323 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Guelfucci?= <jeromeg@xfce.org>
3Date: Wed, 19 Dec 2012 09:53:58 +0100
4Subject: [PATCH] Remember the settings manager window size (bug #9384).
5
6Handy with pluggable dialogs, allows the user to get rid of most of the
7scrollbars.
8
9Upstream-Status: applied
10---
11 xfce4-settings-manager/Makefile.am | 2 +
12 xfce4-settings-manager/main.c | 13 +++++++
13 .../xfce-settings-manager-dialog.c | 38 +++++++++++++++-----
14 3 files changed, 44 insertions(+), 9 deletions(-)
15
16diff --git a/xfce4-settings-manager/Makefile.am b/xfce4-settings-manager/Makefile.am
17index c6bdc2d..99f9b3f 100644
18--- a/xfce4-settings-manager/Makefile.am
19+++ b/xfce4-settings-manager/Makefile.am
20@@ -20,6 +20,7 @@ xfce4_settings_manager_CFLAGS = \
21 $(LIBXFCE4UTIL_CFLAGS) \
22 $(LIBXFCE4UI_CFLAGS) \
23 $(GARCON_CFLAGS) \
24+ $(XFCONF_CFLAGS) \
25 $(EXO_CFLAGS) \
26 $(PLATFORM_CFLAGS)
27
28@@ -31,6 +32,7 @@ xfce4_settings_manager_LDADD = \
29 $(GTK_LIBS) \
30 $(LIBXFCE4UTIL_LIBS) \
31 $(LIBXFCE4UI_LIBS) \
32+ $(XFCONF_LIBS) \
33 $(EXO_LIBS) \
34 $(GARCON_LIBS)
35
36diff --git a/xfce4-settings-manager/main.c b/xfce4-settings-manager/main.c
37index 3a65879..42bec66 100644
38--- a/xfce4-settings-manager/main.c
39+++ b/xfce4-settings-manager/main.c
40@@ -28,6 +28,7 @@
41 #include <gtk/gtk.h>
42 #include <libxfce4util/libxfce4util.h>
43 #include <garcon/garcon.h>
44+#include <xfconf/xfconf.h>
45
46 #include "xfce-settings-manager-dialog.h"
47
48@@ -79,6 +80,16 @@ main(int argc,
49 return EXIT_SUCCESS;
50 }
51
52+ /* initialize xfconf */
53+ if (G_UNLIKELY (!xfconf_init (&error)))
54+ {
55+ /* print error and leave */
56+ g_critical ("Failed to connect to Xfconf daemon: %s", error->message);
57+ g_error_free (error);
58+
59+ return EXIT_FAILURE;
60+ }
61+
62 garcon_set_environment ("XFCE");
63
64 dialog = xfce_settings_manager_dialog_new ();
65@@ -95,5 +106,7 @@ main(int argc,
66
67 gtk_main();
68
69+ xfconf_shutdown ();
70+
71 return EXIT_SUCCESS;
72 }
73diff --git a/xfce4-settings-manager/xfce-settings-manager-dialog.c b/xfce4-settings-manager/xfce-settings-manager-dialog.c
74index 043b143..39e33ff 100644
75--- a/xfce4-settings-manager/xfce-settings-manager-dialog.c
76+++ b/xfce4-settings-manager/xfce-settings-manager-dialog.c
77@@ -35,6 +35,7 @@
78
79 #include <libxfce4util/libxfce4util.h>
80 #include <libxfce4ui/libxfce4ui.h>
81+#include <xfconf/xfconf.h>
82 #include <garcon/garcon.h>
83 #include <exo/exo.h>
84
85@@ -55,6 +56,7 @@ struct _XfceSettingsManagerDialog
86 {
87 XfceTitledDialog __parent__;
88
89+ XfconfChannel *channel;
90 GarconMenu *menu;
91
92 GtkListStore *store;
93@@ -156,17 +158,19 @@ xfce_settings_manager_dialog_class_init (XfceSettingsManagerDialogClass *klass)
94 static void
95 xfce_settings_manager_dialog_init (XfceSettingsManagerDialog *dialog)
96 {
97- GtkWidget *scroll;
98+ GtkWidget *align;
99+ GtkWidget *bbox;
100 GtkWidget *dialog_vbox;
101- GtkWidget *viewport;
102- gchar *path;
103- GtkWidget *hbox;
104+ GtkWidget *ebox;
105 GtkWidget *entry;
106- GtkWidget *align;
107- GList *children;
108+ GtkWidget *hbox;
109 GtkWidget *header;
110- GtkWidget *ebox;
111- GtkWidget *bbox;
112+ GtkWidget *scroll;
113+ GtkWidget *viewport;
114+ GList *children;
115+ gchar *path;
116+
117+ dialog->channel = xfconf_channel_get ("xfce4-settings-manager");
118
119 dialog->store = gtk_list_store_new (N_COLUMNS,
120 G_TYPE_STRING,
121@@ -180,7 +184,9 @@ xfce_settings_manager_dialog_init (XfceSettingsManagerDialog *dialog)
122 dialog->menu = garcon_menu_new_for_path (path != NULL ? path : MENUFILE);
123 g_free (path);
124
125- gtk_window_set_default_size (GTK_WINDOW (dialog), 640, 500);
126+ gtk_window_set_default_size (GTK_WINDOW (dialog),
127+ xfconf_channel_get_int (dialog->channel, "/last/window-width", 640),
128+ xfconf_channel_get_int (dialog->channel, "/last/window-height", 500));
129 xfce_settings_manager_dialog_set_title (dialog, NULL, NULL, NULL);
130
131 dialog->button_back = xfce_gtk_button_new_mixed (GTK_STOCK_GO_BACK, _("All _Settings"));
132@@ -334,6 +340,20 @@ xfce_settings_manager_dialog_response (GtkDialog *widget,
133 }
134 else
135 {
136+ GdkWindowState state;
137+ gint width, height;
138+
139+ /* Don't save the state for full-screen windows */
140+ state = gdk_window_get_state (GTK_WIDGET (widget)->window);
141+
142+ if ((state & (GDK_WINDOW_STATE_MAXIMIZED | GDK_WINDOW_STATE_FULLSCREEN)) == 0)
143+ {
144+ /* Save window size */
145+ gtk_window_get_size (GTK_WINDOW (widget), &width, &height);
146+ xfconf_channel_set_int (dialog->channel, "/last/window-width", width),
147+ xfconf_channel_set_int (dialog->channel, "/last/window-height", height);
148+ }
149+
150 gtk_widget_destroy (GTK_WIDGET (widget));
151 gtk_main_quit ();
152 }
153--
1541.7.4.4
155
diff --git a/meta-xfce/recipes-xfce/xfce4-settings/xfce4-settings_4.10.0.bb b/meta-xfce/recipes-xfce/xfce4-settings/xfce4-settings_4.10.0.bb
index 9b6205b2d..aa878ae48 100644
--- a/meta-xfce/recipes-xfce/xfce4-settings/xfce4-settings_4.10.0.bb
+++ b/meta-xfce/recipes-xfce/xfce4-settings/xfce4-settings_4.10.0.bb
@@ -3,12 +3,13 @@ SECTION = "x11/wm"
3LICENSE = "GPLv2" 3LICENSE = "GPLv2"
4LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" 4LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
5DEPENDS = "exo garcon gtk+ libxfce4util libxfce4ui xfconf dbus-glib libxi virtual/libx11 xrandr libnotify libxcursor libxklavier" 5DEPENDS = "exo garcon gtk+ libxfce4util libxfce4ui xfconf dbus-glib libxi virtual/libx11 xrandr libnotify libxcursor libxklavier"
6PR = "r2" 6PR = "r3"
7 7
8inherit xfce 8inherit xfce
9 9
10SRC_URI += "file://0001-xsettings.xml-remove-trouble-causing-comment.patch \ 10SRC_URI += "file://0001-xsettings.xml-remove-trouble-causing-comment.patch \
11 file://0002-xsettings.xml-Set-default-themes.patch \ 11 file://0002-xsettings.xml-Set-default-themes.patch \
12 file://0003-Remember-the-settings-manager-window-size-bug-9384.patch \
12 file://touchscreen/invisible \ 13 file://touchscreen/invisible \
13 file://touchscreen/wait \ 14 file://touchscreen/wait \
14 file://touchscreen/0001-add-cursor-theme-xfce-invisible.patch \ 15 file://touchscreen/0001-add-cursor-theme-xfce-invisible.patch \