]> git.pld-linux.org Git - packages/xfce4-panel.git/blame - xfce4-panel-handle-option.patch
- adjusted to 4.2.2
[packages/xfce4-panel.git] / xfce4-panel-handle-option.patch
CommitLineData
42b0f702
RK
1Only in xfce4-panel-4.2.1.1: Makefile
2Only in xfce4-panel-4.2.1.1: config.h
3Only in xfce4-panel-4.2.1.1: config.log
4Only in xfce4-panel-4.2.1.1: config.status
5Only in xfce4-panel-4.2.1.1: configure.lineno
6Only in xfce4-panel-4.2.1.1/doc/C: Makefile
7Only in xfce4-panel-4.2.1.1/doc/C/images: Makefile
8Only in xfce4-panel-4.2.1.1/doc: Makefile
9Only in xfce4-panel-4.2.1.1/icons: Makefile
10Only in xfce4-panel-4.2.1.1: libtool
11Only in xfce4-panel-4.2.1.1/panel: .deps
12Only in xfce4-panel-4.2.1.1/panel: Makefile
13diff -rup /xfce4-panel-4.2.1.1/panel/global.h xfce4-panel-4.2.1.1/panel/global.h
14--- /xfce4-panel-4.2.1.1/panel/global.h Mon Sep 13 22:31:39 2004
15+++ xfce4-panel-4.2.1.1/panel/global.h Tue Apr 12 16:32:42 2005
16@@ -52,7 +52,11 @@ typedef struct _Item Item;
17 typedef struct _Settings Settings;
18 typedef struct _Position Position;
19
20-/* panel sides / popup orientation */
21+/* handle position */
22+enum
23+{ BOTH, NONE };
24+
25+/* panel sides / popup position */
26 enum
27 { LEFT, RIGHT, TOP, BOTTOM };
28
29@@ -98,6 +102,7 @@ struct _Settings
30
31 int size;
32 int popup_position;
33+ int handle_position;
34
35 int autohide;
36
37diff -rup /xfce4-panel-4.2.1.1/panel/groups.h xfce4-panel-4.2.1.1/panel/groups.h
38--- /xfce4-panel-4.2.1.1/panel/groups.h Mon Sep 13 22:31:39 2004
39+++ xfce4-panel-4.2.1.1/panel/groups.h Tue Apr 12 13:29:56 2005
40@@ -41,6 +41,7 @@ G_MODULE_IMPORT void groups_set_layer (i
41
42 G_MODULE_IMPORT void groups_set_size (int size);
43 G_MODULE_IMPORT void groups_set_popup_position (int position);
44+/*G_MODULE_IMPORT void groups_set_handle_position (int position);*/
45 G_MODULE_IMPORT void groups_set_theme (const char *theme);
46
47 /* arrow direction */
48diff -rup /xfce4-panel-4.2.1.1/panel/mcs_client.c xfce4-panel-4.2.1.1/panel/mcs_client.c
49--- /xfce4-panel-4.2.1.1/panel/mcs_client.c Mon Sep 13 22:31:39 2004
50+++ xfce4-panel-4.2.1.1/panel/mcs_client.c Tue Apr 12 13:02:12 2005
51@@ -56,6 +56,7 @@ static gpointer settings_callbacks[] = {
52 panel_set_layer,
53 panel_set_size,
54 panel_set_popup_position,
55+ panel_set_handle_position,
56 panel_set_theme,
57 panel_set_autohide,
58 };
59diff -rup /xfce4-panel-4.2.1.1/panel/panel.c xfce4-panel-4.2.1.1/panel/panel.c
60--- /xfce4-panel-4.2.1.1/panel/panel.c Tue Dec 7 21:02:00 2004
61+++ xfce4-panel-4.2.1.1/panel/panel.c Tue Apr 12 16:56:44 2005
62@@ -1101,11 +1101,9 @@ create_panel_framework (Panel * p)
63
64 /* pack the widgets into the main frame */
65 gtk_container_add (GTK_CONTAINER (p->main_frame), p->panel_box);
66- gtk_box_pack_start (GTK_BOX (p->panel_box), p->handles[LEFT], FALSE,
67- FALSE, 0);
68+ gtk_box_pack_start (GTK_BOX (p->panel_box), p->handles[LEFT], FALSE, FALSE, 0);
69 gtk_box_pack_start (GTK_BOX (p->panel_box), p->group_box, TRUE, TRUE, 0);
70- gtk_box_pack_start (GTK_BOX (p->panel_box), p->handles[RIGHT], FALSE,
71- FALSE, 0);
72+ gtk_box_pack_start (GTK_BOX (p->panel_box), p->handles[RIGHT], FALSE, FALSE, 0);
73 }
74
75 G_MODULE_EXPORT /* EXPORT:panel_cleanup */
76@@ -1171,9 +1169,9 @@ create_panel (void)
77 gtk_widget_realize (p->toplevel);
78
79 p->priv->is_created = TRUE;
80-
81
82 panel_set_position (p);
83+ panel_set_handle_position (p->priv->settings.handle_position);
84
85 DBG (" ++ position: %d, %d\n", panel.position.x, panel.position.y);
86
87@@ -1410,6 +1408,41 @@ panel_set_popup_position (int position)
88 panel_set_size (settings.size);
89 }
90
91+G_MODULE_EXPORT /* EXPORT:panel_set_handle_position */
92+void
93+panel_set_handle_position (int position)
94+{
95+ panel.priv->settings.handle_position = position;
96+
97+ /* backwards compat */
98+ settings = panel.priv->settings;
99+
100+ if (!panel.priv->is_created)
101+ return;
102+ switch (position)
103+ {
104+ case 0:
105+ gtk_widget_show_now (panel.handles[LEFT]);
106+ gtk_widget_hide (panel.handles[RIGHT]);
107+ break;
108+ case 1:
109+ gtk_widget_hide (panel.handles[LEFT]);
110+ gtk_widget_show_now (panel.handles[RIGHT]);
111+ break;
112+ case 2:
113+ gtk_widget_show_now (panel.handles[LEFT]);
114+ gtk_widget_show_now (panel.handles[RIGHT]);
115+ break;
116+ case 3:
117+ gtk_widget_hide (panel.handles[LEFT]);
118+ gtk_widget_hide (panel.handles[RIGHT]);
119+ break;
120+ }
121+ /* this is necessary to get the right proportions */
122+ panel_set_size (settings.size);
123+
124+}
125+
126 G_MODULE_EXPORT /* EXPORT:panel_set_theme */
127 void
128 panel_set_theme (const char *theme)
129@@ -1436,6 +1469,7 @@ panel_set_settings (void)
130 {
131 panel_set_size (settings.size);
132 panel_set_popup_position (settings.popup_position);
133+ panel_set_handle_position (settings.handle_position);
134
135 panel_set_theme (settings.theme);
136 }
137@@ -1493,6 +1527,7 @@ init_settings (Panel * p)
138
139 p->priv->settings.size = SMALL;
140 p->priv->settings.popup_position = RIGHT;
141+ p->priv->settings.handle_position = BOTH;
142
143 p->priv->settings.autohide = FALSE;
144
145@@ -1553,6 +1588,18 @@ panel_parse_xml (xmlNodePtr node)
146 n = (int) strtol (value, NULL, 0);
147
148 if (n >= LEFT && n <= BOTTOM)
149+ settings.popup_position = n;
150+
151+ g_free (value);
152+ }
153+
154+ value = xmlGetProp (node, (const xmlChar *) "handleposition");
155+
156+ if (value)
157+ {
158+ n = (int) strtol (value, NULL, 0);
159+
160+ if (n >= LEFT && n <= NONE)
161 settings.popup_position = n;
162
163 g_free (value);
164diff -rup /xfce4-panel-4.2.1.1/panel/panel.h xfce4-panel-4.2.1.1/panel/panel.h
165--- /xfce4-panel-4.2.1.1/panel/panel.h Mon Sep 13 22:31:39 2004
166+++ xfce4-panel-4.2.1.1/panel/panel.h Tue Apr 12 13:20:46 2005
167@@ -72,6 +72,7 @@ G_MODULE_IMPORT void panel_set_layer (in
168
169 G_MODULE_IMPORT void panel_set_size (int size);
170 G_MODULE_IMPORT void panel_set_popup_position (int position);
171+G_MODULE_IMPORT void panel_set_handle_position (int position);
172 G_MODULE_IMPORT void panel_set_theme (const char *theme);
173
174 G_MODULE_IMPORT void panel_set_autohide (gboolean hide);
175Only in xfce4-panel-4.2.1.1/panel: xfce4-panel-1.0.pc
176Only in xfce4-panel-4.2.1.1/plugins: Makefile
177Only in xfce4-panel-4.2.1.1/plugins/clock: .deps
178Only in xfce4-panel-4.2.1.1/plugins/clock: Makefile
179Only in xfce4-panel-4.2.1.1/plugins/mailcheck: .deps
180Only in xfce4-panel-4.2.1.1/plugins/mailcheck: Makefile
181Only in xfce4-panel-4.2.1.1/plugins/pager: .deps
182Only in xfce4-panel-4.2.1.1/plugins/pager: Makefile
183Only in xfce4-panel-4.2.1.1/plugins/sample-plugin: .deps
184Only in xfce4-panel-4.2.1.1/plugins/sample-plugin: Makefile
185Only in xfce4-panel-4.2.1.1/plugins/separator: .deps
186Only in xfce4-panel-4.2.1.1/plugins/separator: Makefile
187Only in xfce4-panel-4.2.1.1/plugins/switcher: .deps
188Only in xfce4-panel-4.2.1.1/plugins/switcher: Makefile
189Only in xfce4-panel-4.2.1.1/plugins/systembuttons: .deps
190Only in xfce4-panel-4.2.1.1/plugins/systembuttons: Makefile
191Only in xfce4-panel-4.2.1.1/po: Makefile
192Only in xfce4-panel-4.2.1.1/po: Makefile.in
193Only in xfce4-panel-4.2.1.1/po: POTFILES
194diff -rup /xfce4-panel-4.2.1.1/po/xfce4-panel.pot xfce4-panel-4.2.1.1/po/xfce4-panel.pot
195--- /xfce4-panel-4.2.1.1/po/xfce4-panel.pot Thu Mar 17 21:45:17 2005
196+++ xfce4-panel-4.2.1.1/po/xfce4-panel.pot Tue Apr 12 13:14:33 2005
197@@ -260,10 +260,26 @@ msgid "Right"
198 msgstr ""
199
200 #: settings/xfce_settings_dialog.c:229
201-msgid "Top"
202+msgid "Both"
203 msgstr ""
204
205 #: settings/xfce_settings_dialog.c:233
206+msgid "None"
207+msgstr ""
208+
209+#: settings/xfce_settings_dialog.c:275
210+msgid "Left"
211+msgstr ""
212+
213+#: settings/xfce_settings_dialog.c:279
214+msgid "Right"
215+msgstr ""
216+
217+#: settings/xfce_settings_dialog.c:283
218+msgid "Top"
219+msgstr ""
220+
221+#: settings/xfce_settings_dialog.c:287
222 msgid "Bottom"
223 msgstr ""
224
225@@ -277,6 +293,10 @@ msgstr ""
226
227 #: settings/xfce_settings_dialog.c:303
228 msgid "Popup position:"
229+msgstr ""
230+
231+#: settings/xfce_settings_dialog.c:373
232+msgid "Handle position:"
233 msgstr ""
234
235 #: settings/xfce_settings_dialog.c:343
236Only in xfce4-panel-4.2.1.1/settings: .deps
237Only in xfce4-panel-4.2.1.1/settings: Makefile
238diff -rup /xfce4-panel-4.2.1.1/settings/xfce_settings.h xfce4-panel-4.2.1.1/settings/xfce_settings.h
239--- /xfce4-panel-4.2.1.1/settings/xfce_settings.h Mon Aug 30 14:55:43 2004
240+++ xfce4-panel-4.2.1.1/settings/xfce_settings.h Tue Apr 12 12:43:08 2005
241@@ -29,6 +29,7 @@ enum
242 XFCE_LAYER,
243 XFCE_SIZE,
244 XFCE_POPUPPOSITION,
245+ XFCE_HANDLEPOSITION,
246 XFCE_THEME,
247 XFCE_AUTOHIDE,
248 XFCE_OPTIONS
249@@ -39,6 +40,7 @@ static char *xfce_settings_names[] = {
250 "layer",
251 "size",
252 "popupposition",
253+ "handleposition",
254 "theme",
255 "autohide",
256 };
257diff -rup /xfce4-panel-4.2.1.1/settings/xfce_settings_dialog.c xfce4-panel-4.2.1.1/settings/xfce_settings_dialog.c
258--- /xfce4-panel-4.2.1.1/settings/xfce_settings_dialog.c Mon Dec 27 20:05:37 2004
259+++ xfce4-panel-4.2.1.1/settings/xfce_settings_dialog.c Tue Apr 12 18:23:23 2005
260@@ -41,6 +41,8 @@
261
262 #define STREQUAL(s1,s2) !strcmp(s1, s2)
263 #define BORDER 6
264+enum
265+{ BOTH, NONE };
266
267 enum
268 { LEFT, RIGHT, TOP, BOTTOM };
269@@ -251,10 +253,64 @@ add_popup_position_menu (GtkWidget * opt
270 G_CALLBACK (popup_position_changed), NULL);
271 }
272
273+/* handle position */
274+
275+static void
276+handle_position_changed (GtkOptionMenu * menu)
277+{
278+ int n = gtk_option_menu_get_history (menu);
279+
280+ mcs_manager_set_int (mcs_manager, xfce_settings_names[XFCE_HANDLEPOSITION],
281+ CHANNEL, n);
282+ mcs_manager_notify (mcs_manager, CHANNEL);
283+}
284+
285+static void
286+add_handle_position_menu (GtkWidget * option_menu)
287+{
288+ GtkWidget *menu;
289+ GtkWidget *item;
290+ McsSetting *setting;
291+
292+ menu = gtk_menu_new ();
293+
294+ item = gtk_menu_item_new_with_label (_("Left"));
295+ gtk_widget_show (item);
296+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
297+
298+ item = gtk_menu_item_new_with_label (_("Right"));
299+ gtk_widget_show (item);
300+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
301+
302+ item = gtk_menu_item_new_with_label (_("Both"));
303+ gtk_widget_show (item);
304+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
305+
306+ item = gtk_menu_item_new_with_label (_("None"));
307+ gtk_widget_show (item);
308+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
309+
310+ gtk_option_menu_set_menu (GTK_OPTION_MENU (option_menu), menu);
311+
312+ setting =
313+ mcs_manager_setting_lookup (mcs_manager,
314+ xfce_settings_names[XFCE_HANDLEPOSITION],
315+ CHANNEL);
316+
317+ if (setting)
318+ {
319+ gtk_option_menu_set_history (GTK_OPTION_MENU (option_menu),
320+ setting->data.v_int);
321+ }
322+
323+ g_signal_connect (option_menu, "changed",
324+ G_CALLBACK (handle_position_changed), NULL);
325+}
326+
327 static void
328 add_style_box (GtkBox * box, GtkSizeGroup * sg)
329 {
330- GtkWidget *vbox, *hbox, *label, *omenu, *popup_menu;
331+ GtkWidget *vbox, *hbox, *label, *omenu, *popup_menu, *handle_menu;
332
333 vbox = gtk_vbox_new (FALSE, BORDER);
334 gtk_widget_show (vbox);
335@@ -289,6 +345,7 @@ add_style_box (GtkBox * box, GtkSizeGrou
336
337 /* needed here already */
338 popup_menu = gtk_option_menu_new ();
339+ handle_menu = gtk_option_menu_new();
340
341 omenu = gtk_option_menu_new ();
342 gtk_widget_show (omenu);
343@@ -309,6 +366,22 @@ add_style_box (GtkBox * box, GtkSizeGrou
344 omenu = popup_menu;
345 gtk_widget_show (omenu);
346 add_popup_position_menu (omenu);
347+ gtk_box_pack_start (GTK_BOX (hbox), omenu, TRUE, TRUE, 0);
348+
349+ /* handle button */
350+ hbox = gtk_hbox_new (FALSE, BORDER);
351+ gtk_widget_show (hbox);
352+ gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, TRUE, 0);
353+
354+ label = gtk_label_new (_("Handle position:"));
355+ gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
356+ gtk_widget_show (label);
357+ gtk_size_group_add_widget (sg, label);
358+ gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
359+
360+ omenu = handle_menu;
361+ gtk_widget_show (omenu);
362+ add_handle_position_menu (omenu);
363 gtk_box_pack_start (GTK_BOX (hbox), omenu, TRUE, TRUE, 0);
364 }
365
366diff -rup /xfce4-panel-4.2.1.1/settings/xfce_settings_plugin.c xfce4-panel-4.2.1.1/settings/xfce_settings_plugin.c
367--- /xfce4-panel-4.2.1.1/settings/xfce_settings_plugin.c Tue Feb 1 08:30:36 2005
368+++ xfce4-panel-4.2.1.1/settings/xfce_settings_plugin.c Tue Apr 12 18:14:15 2005
369@@ -211,6 +211,9 @@ old_xml_start_element (GMarkupParseConte
370 case XFCE_POPUPPOSITION:
371 opt.type = MCS_TYPE_INT;
372 break;
373+ case XFCE_HANDLEPOSITION:
374+ opt.type = MCS_TYPE_INT;
375+ break;
376 case XFCE_THEME:
377 opt.type = MCS_TYPE_STRING;
378 break;
379@@ -323,6 +326,10 @@ xfce_init_options (void)
380 case XFCE_POPUPPOSITION:
381 opt.type = MCS_TYPE_INT;
382 opt.data.v_int = 1;
383+ break;
384+ case XFCE_HANDLEPOSITION:
385+ opt.type = MCS_TYPE_INT;
386+ opt.data.v_int = 2;
387 break;
388 case XFCE_THEME:
389 opt.type = MCS_TYPE_STRING;
390Only in xfce4-panel-4.2.1.1: stamp-h1
This page took 0.089752 seconds and 4 git commands to generate.