]> Dogcows Code - chaz/tint2/blob - src/tint2conf/properties.c
Center the tooltip correctly when the text changes while the tooltip is visible
[chaz/tint2] / src / tint2conf / properties.c
1
2 #include "main.h"
3 #include "properties.h"
4
5 #define ROW_SPACING 10
6 #define COL_SPACING 8
7 #define DEFAULT_HOR_SPACING 5
8
9 void change_paragraph(GtkWidget *widget);
10 void create_general(GtkWidget *parent);
11 void create_panel(GtkWidget *parent);
12 void create_taskbar(GtkWidget *parent);
13 void create_task(GtkWidget *parent);
14 void create_clock(GtkWidget *parent);
15 void create_systemtray(GtkWidget *parent);
16 void create_battery(GtkWidget *parent);
17 void create_tooltip(GtkWidget *parent);
18 void create_background(GtkWidget *parent);
19
20
21 GtkWidget *create_properties()
22 {
23 GtkWidget *view, *dialog_vbox3, *button, *notebook;
24 GtkTooltips *tooltips;
25 GtkWidget *page_panel, *page_taskbar, *page_battery, *page_clock, *page_tooltip, *page_systemtray, *page_task, *page_background;
26 GtkWidget *label;
27
28 tooltips = gtk_tooltips_new ();
29
30 // global layer
31 view = gtk_dialog_new ();
32 gtk_window_set_title (GTK_WINDOW (view), _("Properties"));
33 gtk_window_set_modal (GTK_WINDOW (view), TRUE);
34 gtk_window_set_skip_pager_hint (GTK_WINDOW (view), TRUE);
35 gtk_window_set_type_hint (GTK_WINDOW (view), GDK_WINDOW_TYPE_HINT_DIALOG);
36
37 dialog_vbox3 = GTK_DIALOG (view)->vbox;
38 gtk_widget_show (dialog_vbox3);
39
40 notebook = gtk_notebook_new ();
41 gtk_widget_show (notebook);
42 gtk_container_set_border_width(GTK_CONTAINER(notebook), 5);
43 gtk_box_pack_start (GTK_BOX (dialog_vbox3), notebook, TRUE, TRUE, 6);
44 gtk_notebook_set_tab_pos (GTK_NOTEBOOK (notebook), GTK_POS_LEFT);
45
46 button = gtk_button_new_from_stock ("gtk-apply");
47 gtk_widget_show (button);
48 gtk_dialog_add_action_widget (GTK_DIALOG (view), button, GTK_RESPONSE_APPLY);
49 GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
50
51 button = gtk_button_new_from_stock ("gtk-cancel");
52 gtk_widget_show (button);
53 gtk_dialog_add_action_widget (GTK_DIALOG (view), button, GTK_RESPONSE_CANCEL);
54 GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
55
56 button = gtk_button_new_from_stock ("gtk-ok");
57 gtk_widget_show (button);
58 gtk_dialog_add_action_widget (GTK_DIALOG (view), button, GTK_RESPONSE_OK);
59 GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
60
61 // notebook
62 /*
63 label = gtk_label_new (_("General"));
64 gtk_widget_show (label);
65 page_general = gtk_vbox_new (FALSE, DEFAULT_HOR_SPACING);
66 gtk_container_set_border_width(GTK_CONTAINER(page_general), 10);
67 gtk_widget_show (page_general);
68 gtk_notebook_append_page (GTK_NOTEBOOK (notebook), page_general, label);
69 create_general(page_general);
70 */
71 label = gtk_label_new (_("Panel"));
72 gtk_widget_show (label);
73 page_panel = gtk_vbox_new (FALSE, DEFAULT_HOR_SPACING);
74 gtk_container_set_border_width(GTK_CONTAINER(page_panel), 10);
75 gtk_widget_show (page_panel);
76 gtk_notebook_append_page (GTK_NOTEBOOK (notebook), page_panel, label);
77 create_panel(page_panel);
78
79 label = gtk_label_new (_("Taskbar"));
80 gtk_widget_show (label);
81 page_taskbar = gtk_vbox_new (FALSE, DEFAULT_HOR_SPACING);
82 gtk_container_set_border_width(GTK_CONTAINER(page_taskbar), 10);
83 gtk_widget_show (page_taskbar);
84 gtk_notebook_append_page (GTK_NOTEBOOK (notebook), page_taskbar, label);
85 create_taskbar(page_taskbar);
86
87 label = gtk_label_new (_("Task"));
88 gtk_widget_show (label);
89 page_task = gtk_vbox_new (FALSE, DEFAULT_HOR_SPACING);
90 gtk_container_set_border_width(GTK_CONTAINER(page_task), 10);
91 gtk_widget_show (page_task);
92 gtk_notebook_append_page (GTK_NOTEBOOK (notebook), page_task, label);
93 create_task(page_task);
94
95 label = gtk_label_new (_("Clock"));
96 gtk_widget_show (label);
97 page_clock = gtk_vbox_new (FALSE, DEFAULT_HOR_SPACING);
98 gtk_container_set_border_width(GTK_CONTAINER(page_clock), 10);
99 gtk_widget_show (page_clock);
100 gtk_notebook_append_page (GTK_NOTEBOOK (notebook), page_clock, label);
101 create_clock(page_clock);
102
103 label = gtk_label_new (_("Notification"));
104 gtk_widget_show (label);
105 page_systemtray = gtk_vbox_new (FALSE, DEFAULT_HOR_SPACING);
106 gtk_container_set_border_width(GTK_CONTAINER(page_systemtray), 10);
107 gtk_widget_show (page_systemtray);
108 gtk_notebook_append_page (GTK_NOTEBOOK (notebook), page_systemtray, label);
109 create_systemtray(page_systemtray);
110
111 label = gtk_label_new (_("Battery"));
112 gtk_widget_show (label);
113 page_battery = gtk_vbox_new (FALSE, DEFAULT_HOR_SPACING);
114 gtk_container_set_border_width(GTK_CONTAINER(page_battery), 10);
115 gtk_widget_show (page_battery);
116 gtk_notebook_append_page (GTK_NOTEBOOK (notebook), page_battery, label);
117 create_battery(page_battery);
118
119 label = gtk_label_new (_("Tooltip"));
120 gtk_widget_show (label);
121 page_tooltip = gtk_vbox_new (FALSE, DEFAULT_HOR_SPACING);
122 gtk_container_set_border_width(GTK_CONTAINER(page_tooltip), 10);
123 gtk_widget_show (page_tooltip);
124 gtk_notebook_append_page (GTK_NOTEBOOK (notebook), page_tooltip, label);
125 create_tooltip(page_tooltip);
126
127 label = gtk_label_new (_("Background"));
128 gtk_widget_show (label);
129 page_background = gtk_vbox_new (FALSE, DEFAULT_HOR_SPACING);
130 gtk_container_set_border_width(GTK_CONTAINER(page_background), 10);
131 gtk_widget_show (page_background);
132 gtk_notebook_append_page (GTK_NOTEBOOK (notebook), page_background, label);
133 create_background(page_background);
134
135 printf("create_properties : fin\n");
136 return view;
137 }
138
139
140 void change_paragraph(GtkWidget *widget)
141 {
142 GtkWidget *hbox;
143 hbox = gtk_hbox_new (FALSE, 0);
144 gtk_widget_show (hbox);
145 gtk_box_pack_start(GTK_BOX (widget), hbox, FALSE, FALSE, 0);
146 gtk_container_set_border_width (GTK_CONTAINER (hbox), 6);
147 }
148
149
150 void create_general(GtkWidget *parent)
151 {
152 }
153
154
155 void create_panel(GtkWidget *parent)
156 {
157 int i;
158 GtkWidget *screen_position[12];
159 GtkWidget *table, *hbox, *frame;
160 GtkWidget *margin_x, *margin_y, *combo_strut_policy, *combo_layer, *combo_width_type, *combo_height_type, *combo_monitor, *combo_background;
161 GtkWidget *label;
162
163 label = gtk_label_new (_("<b>Position and size</b>"));
164 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
165 gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
166 gtk_widget_show (label);
167 gtk_box_pack_start(GTK_BOX (parent), label, FALSE, FALSE, 0);
168 hbox = gtk_hbox_new (FALSE, 20);
169 gtk_widget_show (hbox);
170 gtk_box_pack_start (GTK_BOX (parent), hbox, FALSE, FALSE, 0);
171
172 table = gtk_table_new (2, 10, FALSE);
173 gtk_widget_show (table);
174 gtk_box_pack_start (GTK_BOX (hbox), table, FALSE, FALSE, 0);
175 gtk_table_set_row_spacings (GTK_TABLE (table), ROW_SPACING);
176 gtk_table_set_col_spacings (GTK_TABLE (table), COL_SPACING);
177
178 label = gtk_label_new (_("Width"));
179 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
180 gtk_widget_show (label);
181 gtk_table_attach (GTK_TABLE (table), label, 2, 3, 0, 1, GTK_FILL, 0, 0, 0);
182
183 margin_x = gtk_spin_button_new_with_range (0, 9000, 1);
184 gtk_widget_show (margin_x);
185 gtk_table_attach (GTK_TABLE (table), margin_x, 3, 4, 0, 1, GTK_FILL, 0, 0, 0);
186
187 combo_width_type = gtk_combo_box_new_text ();
188 gtk_widget_show (combo_width_type);
189 gtk_table_attach (GTK_TABLE (table), combo_width_type, 4, 5, 0, 1, GTK_FILL, 0, 0, 0);
190 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_width_type), _("Percent"));
191 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_width_type), _("Pixels"));
192
193 label = gtk_label_new (_("Marging x"));
194 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
195 gtk_widget_show (label);
196 gtk_table_attach (GTK_TABLE (table), label, 7, 8, 0, 1, GTK_FILL, 0, 0, 0);
197
198 margin_x = gtk_spin_button_new_with_range (0, 500, 1);
199 gtk_widget_show (margin_x);
200 gtk_entry_set_max_length (GTK_ENTRY (margin_x), 3);
201 gtk_table_attach (GTK_TABLE (table), margin_x, 8, 9, 0, 1, GTK_FILL, 0, 0, 0);
202
203 label = gtk_label_new (_("Height"));
204 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
205 gtk_widget_show (label);
206 gtk_table_attach (GTK_TABLE (table), label, 2, 3, 1, 2, GTK_FILL, 0, 0, 0);
207
208 margin_y = gtk_spin_button_new_with_range (0, 9000, 1);
209 gtk_widget_show (margin_y);
210 gtk_table_attach (GTK_TABLE (table), margin_y, 3, 4, 1, 2, GTK_FILL, 0, 0, 0);
211
212 combo_height_type = gtk_combo_box_new_text ();
213 gtk_widget_show (combo_height_type);
214 gtk_table_attach (GTK_TABLE (table), combo_height_type, 4, 5, 1, 2, GTK_FILL, 0, 0, 0);
215 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_height_type), _("Percent"));
216 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_height_type), _("Pixels"));
217
218 label = gtk_label_new (_("Marging y"));
219 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
220 gtk_widget_show (label);
221 gtk_table_attach (GTK_TABLE (table), label, 7, 8, 1, 2, GTK_FILL, 0, 0, 0);
222
223 margin_y = gtk_spin_button_new_with_range (0, 500, 1);
224 gtk_widget_show (margin_y);
225 gtk_entry_set_max_length (GTK_ENTRY (margin_y), 3);
226 gtk_table_attach (GTK_TABLE (table), margin_y, 8, 9, 1, 2, GTK_FILL, 0, 0, 0);
227
228 table = gtk_table_new (5, 5, FALSE);
229 gtk_widget_show (table);
230 gtk_box_pack_start (GTK_BOX (hbox), table, FALSE, FALSE, 0);
231
232 for (i = 0; i < 12; ++i) {
233 screen_position[i] = gtk_toggle_button_new ();
234 gtk_widget_show (screen_position[i]);
235
236 if (i <= 2 || i >= 9)
237 gtk_widget_set_size_request (screen_position[i], 30, 15);
238 else
239 gtk_widget_set_size_request (screen_position[i], 15, 25);
240
241 // g_signal_connect (G_OBJECT (screen_position[i]), "button-press-event", G_CALLBACK (screen_position_pressed));
242 // g_signal_connect (G_OBJECT (screen_position[i]), "key-press-event", G_CALLBACK (screen_position_pressed));
243 }
244 gtk_table_attach_defaults (GTK_TABLE (table), screen_position[0], 1, 2, 0, 1);
245 gtk_table_attach_defaults (GTK_TABLE (table), screen_position[1], 2, 3, 0, 1);
246 gtk_table_attach_defaults (GTK_TABLE (table), screen_position[2], 3, 4, 0, 1);
247 gtk_table_attach_defaults (GTK_TABLE (table), screen_position[3], 0, 1, 1, 2);
248 gtk_table_attach_defaults (GTK_TABLE (table), screen_position[4], 0, 1, 2, 3);
249 gtk_table_attach_defaults (GTK_TABLE (table), screen_position[5], 0, 1, 3, 4);
250 gtk_table_attach_defaults (GTK_TABLE (table), screen_position[6], 4, 5, 1, 2);
251 gtk_table_attach_defaults (GTK_TABLE (table), screen_position[7], 4, 5, 2, 3);
252 gtk_table_attach_defaults (GTK_TABLE (table), screen_position[8], 4, 5, 3, 4);
253 gtk_table_attach_defaults (GTK_TABLE (table), screen_position[9], 1, 2, 4, 5);
254 gtk_table_attach_defaults (GTK_TABLE (table), screen_position[10], 2, 3, 4, 5);
255 gtk_table_attach_defaults (GTK_TABLE (table), screen_position[11], 3, 4, 4, 5);
256
257 frame = gtk_frame_new (NULL);
258 gtk_widget_show (frame);
259 gtk_box_pack_start (GTK_BOX (hbox), frame, FALSE, TRUE, 0);
260 gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_NONE);
261
262 label = gtk_label_new (_("<b>Autohide</b>"));
263 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
264 gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
265 gtk_widget_show (label);
266 gtk_box_pack_start(GTK_BOX (parent), label, FALSE, FALSE, 0);
267
268 table = gtk_table_new (2, 10, FALSE);
269 gtk_widget_show (table);
270 gtk_box_pack_start (GTK_BOX (parent), table, FALSE, FALSE, 0);
271 gtk_table_set_row_spacings (GTK_TABLE (table), ROW_SPACING);
272 gtk_table_set_col_spacings (GTK_TABLE (table), COL_SPACING);
273
274 label = gtk_label_new (_("Autohide"));
275 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
276 gtk_widget_show (label);
277 gtk_table_attach (GTK_TABLE (table), label, 2, 3, 0, 1, GTK_FILL, 0, 0, 0);
278
279 margin_x = gtk_check_button_new ();
280 gtk_widget_show (margin_x);
281 gtk_table_attach (GTK_TABLE (table), margin_x, 3, 4, 0, 1, GTK_FILL, 0, 0, 0);
282
283 label = gtk_label_new (_("Show panel after"));
284 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
285 gtk_widget_show (label);
286 gtk_table_attach (GTK_TABLE (table), label, 6, 7, 0, 1, GTK_FILL, 0, 0, 0);
287
288 margin_x = gtk_spin_button_new_with_range (0, 10000, 0.1);
289 gtk_widget_show (margin_x);
290 gtk_table_attach (GTK_TABLE (table), margin_x, 7, 8, 0, 1, GTK_FILL, 0, 0, 0);
291
292 label = gtk_label_new (_("seconds"));
293 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
294 gtk_widget_show (label);
295 gtk_table_attach (GTK_TABLE (table), label, 8, 9, 0, 1, GTK_FILL, 0, 0, 0);
296
297 label = gtk_label_new (_("Hidden size"));
298 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
299 gtk_widget_show (label);
300 gtk_table_attach (GTK_TABLE (table), label, 2, 3, 1, 2, GTK_FILL, 0, 0, 0);
301
302 margin_x = gtk_spin_button_new_with_range (0, 500, 1);
303 gtk_widget_show (margin_x);
304 gtk_entry_set_max_length (GTK_ENTRY (margin_x), 3);
305 gtk_table_attach (GTK_TABLE (table), margin_x, 3, 4, 1, 2, GTK_FILL, 0, 0, 0);
306
307 label = gtk_label_new (_("Hide panel after"));
308 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
309 gtk_widget_show (label);
310 gtk_table_attach (GTK_TABLE (table), label, 6, 7, 1, 2, GTK_FILL, 0, 0, 0);
311
312 margin_y = gtk_spin_button_new_with_range (0, 10000, 0.1);
313 gtk_widget_show (margin_y);
314 gtk_table_attach (GTK_TABLE (table), margin_y, 7, 8, 1, 2, GTK_FILL, 0, 0, 0);
315
316 label = gtk_label_new (_("seconds"));
317 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
318 gtk_widget_show (label);
319 gtk_table_attach (GTK_TABLE (table), label, 8, 9, 1, 2, GTK_FILL, 0, 0, 0);
320
321 change_paragraph(parent);
322
323 label = gtk_label_new (_("<b>Appearance</b>"));
324 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
325 gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
326 gtk_widget_show (label);
327 gtk_box_pack_start(GTK_BOX (parent), label, FALSE, FALSE, 0);
328
329 table = gtk_table_new (2, 10, FALSE);
330 gtk_widget_show (table);
331 gtk_box_pack_start (GTK_BOX (parent), table, FALSE, FALSE, 0);
332 gtk_table_set_row_spacings (GTK_TABLE (table), ROW_SPACING);
333 gtk_table_set_col_spacings (GTK_TABLE (table), COL_SPACING);
334
335 label = gtk_label_new (_("Padding horizontal"));
336 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
337 gtk_widget_show (label);
338 gtk_table_attach (GTK_TABLE (table), label, 2, 3, 0, 1, GTK_FILL, 0, 0, 0);
339
340 margin_x = gtk_spin_button_new_with_range (0, 500, 1);
341 gtk_widget_show (margin_x);
342 gtk_entry_set_max_length (GTK_ENTRY (margin_x), 3);
343 gtk_table_attach (GTK_TABLE (table), margin_x, 3, 4, 0, 1, GTK_FILL, 0, 0, 0);
344
345 label = gtk_label_new (_("Background"));
346 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
347 gtk_widget_show (label);
348 gtk_table_attach (GTK_TABLE (table), label, 6, 7, 0, 1, GTK_FILL, 0, 0, 0);
349
350 combo_background = gtk_combo_box_new_text ();
351 gtk_widget_show (combo_background);
352 gtk_table_attach (GTK_TABLE (table), combo_background, 7, 8, 0, 1, GTK_FILL, 0, 0, 0);
353 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_background), _("Back 1"));
354 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_background), _("Back 2"));
355 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_background), _("Back 3"));
356
357 label = gtk_label_new (_("Padding vertical"));
358 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
359 gtk_widget_show (label);
360 gtk_table_attach (GTK_TABLE (table), label, 2, 3, 1, 2, GTK_FILL, 0, 0, 0);
361
362 margin_y = gtk_spin_button_new_with_range (0, 500, 1);
363 gtk_widget_show (margin_y);
364 gtk_entry_set_max_length (GTK_ENTRY (margin_y), 3);
365 gtk_table_attach (GTK_TABLE (table), margin_y, 3, 4, 1, 2, GTK_FILL, 0, 0, 0);
366
367 label = gtk_label_new (_("Spacing"));
368 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
369 gtk_widget_show (label);
370 gtk_table_attach (GTK_TABLE (table), label, 6, 7, 1, 2, GTK_FILL, 0, 0, 0);
371
372 margin_x = gtk_spin_button_new_with_range (0, 500, 1);
373 gtk_widget_show (margin_x);
374 gtk_entry_set_max_length (GTK_ENTRY (margin_x), 3);
375 gtk_table_attach (GTK_TABLE (table), margin_x, 7, 8, 1, 2, GTK_FILL, 0, 0, 0);
376
377 change_paragraph(parent);
378
379 label = gtk_label_new (_("<b>Window manager</b>"));
380 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
381 gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
382 gtk_widget_show (label);
383 gtk_box_pack_start(GTK_BOX (parent), label, FALSE, FALSE, 0);
384
385 table = gtk_table_new (2, 12, FALSE);
386 gtk_widget_show (table);
387 gtk_box_pack_start (GTK_BOX (parent), table, FALSE, FALSE, 0);
388 gtk_table_set_row_spacings (GTK_TABLE (table), ROW_SPACING);
389 gtk_table_set_col_spacings (GTK_TABLE (table), COL_SPACING);
390
391 label = gtk_label_new (_("WM menu"));
392 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
393 gtk_widget_show (label);
394 gtk_table_attach (GTK_TABLE (table), label, 2, 3, 0, 1, GTK_FILL, 0, 0, 0);
395
396 margin_x = gtk_check_button_new ();
397 gtk_widget_show (margin_x);
398 gtk_entry_set_max_length (GTK_ENTRY (margin_x), 3);
399 gtk_table_attach (GTK_TABLE (table), margin_x, 3, 4, 0, 1, GTK_FILL, 0, 0, 0);
400
401 label = gtk_label_new (_("Place in dock"));
402 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
403 gtk_widget_show (label);
404 gtk_table_attach (GTK_TABLE (table), label, 2, 3, 1, 2, GTK_FILL, 0, 0, 0);
405
406 margin_x = gtk_check_button_new ();
407 gtk_widget_show (margin_x);
408 gtk_entry_set_max_length (GTK_ENTRY (margin_x), 3);
409 gtk_table_attach (GTK_TABLE (table), margin_x, 3, 4, 1, 2, GTK_FILL, 0, 0, 0);
410
411 label = gtk_label_new (_("Layer"));
412 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
413 gtk_widget_show (label);
414 gtk_table_attach (GTK_TABLE (table), label, 6, 7, 0, 1, GTK_FILL, 0, 0, 0);
415
416 combo_layer = gtk_combo_box_new_text ();
417 gtk_widget_show (combo_layer);
418 gtk_entry_set_max_length (GTK_ENTRY (combo_layer), 3);
419 gtk_table_attach (GTK_TABLE (table), combo_layer, 7, 8, 0, 1, GTK_FILL, 0, 0, 0);
420 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_layer), _("Top"));
421 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_layer), _("Normal"));
422 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_layer), _("Bottom"));
423
424 label = gtk_label_new (_("Strut policy"));
425 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
426 gtk_widget_show (label);
427 gtk_table_attach (GTK_TABLE (table), label, 6, 7, 1, 2, GTK_FILL, 0, 0, 0);
428
429 combo_strut_policy = gtk_combo_box_new_text ();
430 gtk_widget_show (combo_strut_policy);
431 gtk_entry_set_max_length (GTK_ENTRY (combo_strut_policy), 3);
432 gtk_table_attach (GTK_TABLE (table), combo_strut_policy, 7, 8, 1, 2, GTK_FILL, 0, 0, 0);
433 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_strut_policy), _("Follow size"));
434 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_strut_policy), _("Minimum"));
435 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_strut_policy), _("None"));
436
437 label = gtk_label_new (_("Monitor"));
438 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
439 gtk_widget_show (label);
440 gtk_table_attach (GTK_TABLE (table), label, 10, 11, 0, 1, GTK_FILL, 0, 0, 0);
441
442 combo_monitor = gtk_combo_box_new_text ();
443 gtk_widget_show (combo_monitor);
444 gtk_table_attach (GTK_TABLE (table), combo_monitor, 11, 12, 0, 1, GTK_FILL, 0, 0, 0);
445 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_monitor), _("All"));
446
447 change_paragraph(parent);
448 }
449
450
451 void create_taskbar(GtkWidget *parent)
452 {
453 GtkWidget *table, *label;
454 GtkWidget *margin_x, *margin_y, *combo_background;
455
456 table = gtk_table_new (1, 2, FALSE);
457 gtk_widget_show (table);
458 gtk_box_pack_start (GTK_BOX (parent), table, FALSE, FALSE, 0);
459 gtk_table_set_row_spacings (GTK_TABLE (table), ROW_SPACING);
460 gtk_table_set_col_spacings (GTK_TABLE (table), COL_SPACING);
461
462 label = gtk_label_new (_("Show all desktop"));
463 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
464 gtk_widget_show (label);
465 gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, GTK_FILL, 0, 0, 0);
466
467 margin_x = gtk_check_button_new ();
468 gtk_widget_show (margin_x);
469 gtk_entry_set_max_length (GTK_ENTRY (margin_x), 3);
470 gtk_table_attach (GTK_TABLE (table), margin_x, 1, 2, 0, 1, GTK_FILL, 0, 0, 0);
471
472 change_paragraph(parent);
473
474 label = gtk_label_new (_("<b>Appearance</b>"));
475 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
476 gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
477 gtk_widget_show (label);
478 gtk_box_pack_start(GTK_BOX (parent), label, FALSE, FALSE, 0);
479
480 table = gtk_table_new (2, 12, FALSE);
481 gtk_widget_show (table);
482 gtk_box_pack_start (GTK_BOX (parent), table, FALSE, FALSE, 0);
483 gtk_table_set_row_spacings (GTK_TABLE (table), ROW_SPACING);
484 gtk_table_set_col_spacings (GTK_TABLE (table), COL_SPACING);
485
486 label = gtk_label_new (_("Padding horizontal"));
487 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
488 gtk_widget_show (label);
489 gtk_table_attach (GTK_TABLE (table), label, 2, 3, 0, 1, GTK_FILL, 0, 0, 0);
490
491 margin_x = gtk_spin_button_new_with_range (0, 500, 1);
492 gtk_widget_show (margin_x);
493 gtk_entry_set_max_length (GTK_ENTRY (margin_x), 3);
494 gtk_table_attach (GTK_TABLE (table), margin_x, 3, 4, 0, 1, GTK_FILL, 0, 0, 0);
495
496 label = gtk_label_new (_("Padding vertical"));
497 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
498 gtk_widget_show (label);
499 gtk_table_attach (GTK_TABLE (table), label, 2, 3, 1, 2, GTK_FILL, 0, 0, 0);
500
501 margin_y = gtk_spin_button_new_with_range (0, 500, 1);
502 gtk_widget_show (margin_y);
503 gtk_entry_set_max_length (GTK_ENTRY (margin_y), 3);
504 gtk_table_attach (GTK_TABLE (table), margin_y, 3, 4, 1, 2, GTK_FILL, 0, 0, 0);
505
506 label = gtk_label_new (_("Spacing"));
507 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
508 gtk_widget_show (label);
509 gtk_table_attach (GTK_TABLE (table), label, 2, 3, 2, 3, GTK_FILL, 0, 0, 0);
510
511 margin_x = gtk_spin_button_new_with_range (0, 500, 1);
512 gtk_widget_show (margin_x);
513 gtk_entry_set_max_length (GTK_ENTRY (margin_x), 3);
514 gtk_table_attach (GTK_TABLE (table), margin_x, 3, 4, 2, 3, GTK_FILL, 0, 0, 0);
515
516 label = gtk_label_new (_("Background active"));
517 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
518 gtk_widget_show (label);
519 gtk_table_attach (GTK_TABLE (table), label, 6, 7, 0, 1, GTK_FILL, 0, 0, 0);
520
521 combo_background = gtk_combo_box_new_text ();
522 gtk_widget_show (combo_background);
523 gtk_table_attach (GTK_TABLE (table), combo_background, 7, 8, 0, 1, GTK_FILL, 0, 0, 0);
524 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_background), _("Back 1"));
525 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_background), _("Back 2"));
526 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_background), _("Back 3"));
527
528 label = gtk_label_new (_("Background inactive"));
529 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
530 gtk_widget_show (label);
531 gtk_table_attach (GTK_TABLE (table), label, 6, 7, 1, 2, GTK_FILL, 0, 0, 0);
532
533 combo_background = gtk_combo_box_new_text ();
534 gtk_widget_show (combo_background);
535 gtk_table_attach (GTK_TABLE (table), combo_background, 7, 8, 1, 2, GTK_FILL, 0, 0, 0);
536 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_background), _("Back 1"));
537 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_background), _("Back 2"));
538 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_background), _("Back 3"));
539
540 change_paragraph(parent);
541 }
542
543
544 void create_task(GtkWidget *parent)
545 {
546 GtkWidget *table, *label, *notebook, *page_task;
547 GtkWidget *margin_x, *combo_background;
548
549 label = gtk_label_new (_("<b>Mouse action</b>"));
550 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
551 gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
552 gtk_widget_show (label);
553 gtk_box_pack_start(GTK_BOX (parent), label, FALSE, FALSE, 0);
554
555 table = gtk_table_new (2, 10, FALSE);
556 gtk_widget_show (table);
557 gtk_box_pack_start (GTK_BOX (parent), table, FALSE, FALSE, 0);
558 gtk_table_set_row_spacings (GTK_TABLE (table), ROW_SPACING);
559 gtk_table_set_col_spacings (GTK_TABLE (table), COL_SPACING);
560
561 label = gtk_label_new (_("Middle click"));
562 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
563 gtk_widget_show (label);
564 gtk_table_attach (GTK_TABLE (table), label, 2, 3, 0, 1, GTK_FILL, 0, 0, 0);
565
566 combo_background = gtk_combo_box_new_text ();
567 gtk_widget_show (combo_background);
568 gtk_table_attach (GTK_TABLE (table), combo_background, 3, 4, 0, 1, GTK_FILL, 0, 0, 0);
569 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_background), _("None"));
570 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_background), _("Close"));
571 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_background), _("Toggle"));
572 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_background), _("Iconify"));
573 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_background), _("Shade"));
574 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_background), _("Toggle iconify"));
575 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_background), _("Maximize restore"));
576 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_background), _("Desktop left"));
577 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_background), _("Next task"));
578 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_background), _("Previous task"));
579
580 label = gtk_label_new (_("Wheel scroll up"));
581 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
582 gtk_widget_show (label);
583 gtk_table_attach (GTK_TABLE (table), label, 6, 7, 0, 1, GTK_FILL, 0, 0, 0);
584
585 combo_background = gtk_combo_box_new_text ();
586 gtk_widget_show (combo_background);
587 gtk_table_attach (GTK_TABLE (table), combo_background, 7, 8, 0, 1, GTK_FILL, 0, 0, 0);
588 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_background), _("None"));
589 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_background), _("Close"));
590 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_background), _("Toggle"));
591 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_background), _("Iconify"));
592 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_background), _("Shade"));
593 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_background), _("Toggle iconify"));
594 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_background), _("Maximize restore"));
595 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_background), _("Desktop left"));
596 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_background), _("Next task"));
597 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_background), _("Previous task"));
598
599 label = gtk_label_new (_("Right click"));
600 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
601 gtk_widget_show (label);
602 gtk_table_attach (GTK_TABLE (table), label, 2, 3, 1, 2, GTK_FILL, 0, 0, 0);
603
604 combo_background = gtk_combo_box_new_text ();
605 gtk_widget_show (combo_background);
606 gtk_table_attach (GTK_TABLE (table), combo_background, 3, 4, 1, 2, GTK_FILL, 0, 0, 0);
607 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_background), _("None"));
608 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_background), _("Close"));
609 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_background), _("Toggle"));
610 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_background), _("Iconify"));
611 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_background), _("Shade"));
612 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_background), _("Toggle iconify"));
613 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_background), _("Maximize restore"));
614 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_background), _("Desktop left"));
615 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_background), _("Next task"));
616 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_background), _("Previous task"));
617
618 label = gtk_label_new (_("Wheel scroll down"));
619 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
620 gtk_widget_show (label);
621 gtk_table_attach (GTK_TABLE (table), label, 6, 7, 1, 2, GTK_FILL, 0, 0, 0);
622
623 combo_background = gtk_combo_box_new_text ();
624 gtk_widget_show (combo_background);
625 gtk_table_attach (GTK_TABLE (table), combo_background, 7, 8, 1, 2, GTK_FILL, 0, 0, 0);
626 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_background), _("None"));
627 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_background), _("Close"));
628 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_background), _("Toggle"));
629 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_background), _("Iconify"));
630 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_background), _("Shade"));
631 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_background), _("Toggle iconify"));
632 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_background), _("Maximize restore"));
633 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_background), _("Desktop left"));
634 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_background), _("Next task"));
635 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_background), _("Previous task"));
636
637 change_paragraph(parent);
638
639 label = gtk_label_new (_("<b>Appearance</b>"));
640 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
641 gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
642 gtk_widget_show (label);
643 gtk_box_pack_start(GTK_BOX (parent), label, FALSE, FALSE, 0);
644
645 table = gtk_table_new (4, 10, FALSE);
646 gtk_widget_show (table);
647 gtk_box_pack_start (GTK_BOX (parent), table, FALSE, FALSE, 0);
648 gtk_table_set_row_spacings (GTK_TABLE (table), ROW_SPACING);
649 gtk_table_set_col_spacings (GTK_TABLE (table), COL_SPACING);
650
651 label = gtk_label_new (_("Show icon"));
652 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
653 gtk_widget_show (label);
654 gtk_table_attach (GTK_TABLE (table), label, 2, 3, 0, 1, GTK_FILL, 0, 0, 0);
655
656 margin_x = gtk_check_button_new ();
657 gtk_widget_show (margin_x);
658 gtk_entry_set_max_length (GTK_ENTRY (margin_x), 3);
659 gtk_table_attach (GTK_TABLE (table), margin_x, 3, 4, 0, 1, GTK_FILL, 0, 0, 0);
660
661 label = gtk_label_new (_("Show text"));
662 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
663 gtk_widget_show (label);
664 gtk_table_attach (GTK_TABLE (table), label, 2, 3, 1, 2, GTK_FILL, 0, 0, 0);
665
666 margin_x = gtk_check_button_new ();
667 gtk_widget_show (margin_x);
668 gtk_entry_set_max_length (GTK_ENTRY (margin_x), 3);
669 gtk_table_attach (GTK_TABLE (table), margin_x, 3, 4, 1, 2, GTK_FILL, 0, 0, 0);
670
671 label = gtk_label_new (_("Align center"));
672 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
673 gtk_widget_show (label);
674 gtk_table_attach (GTK_TABLE (table), label, 2, 3, 2, 3, GTK_FILL, 0, 0, 0);
675
676 margin_x = gtk_check_button_new ();
677 gtk_widget_show (margin_x);
678 gtk_entry_set_max_length (GTK_ENTRY (margin_x), 3);
679 gtk_table_attach (GTK_TABLE (table), margin_x, 3, 4, 2, 3, GTK_FILL, 0, 0, 0);
680
681 label = gtk_label_new (_("Font shadow"));
682 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
683 gtk_widget_show (label);
684 gtk_table_attach (GTK_TABLE (table), label, 2, 3, 3, 4, GTK_FILL, 0, 0, 0);
685
686 margin_x = gtk_check_button_new ();
687 gtk_widget_show (margin_x);
688 gtk_entry_set_max_length (GTK_ENTRY (margin_x), 3);
689 gtk_table_attach (GTK_TABLE (table), margin_x, 3, 4, 3, 4, GTK_FILL, 0, 0, 0);
690
691 // tasks
692 notebook = gtk_notebook_new ();
693 gtk_widget_show (notebook);
694 gtk_container_set_border_width(GTK_CONTAINER(notebook), 0);
695 gtk_box_pack_start (GTK_BOX (parent), notebook, TRUE, TRUE, 0);
696
697 // notebook
698 label = gtk_label_new (_("Normal task"));
699 gtk_widget_show (label);
700 page_task = gtk_vbox_new (FALSE, DEFAULT_HOR_SPACING);
701 gtk_container_set_border_width(GTK_CONTAINER(page_task), 10);
702 gtk_widget_show (page_task);
703 gtk_notebook_append_page (GTK_NOTEBOOK (notebook), page_task, label);
704
705 label = gtk_label_new (_("Active task"));
706 gtk_widget_show (label);
707 page_task = gtk_vbox_new (FALSE, DEFAULT_HOR_SPACING);
708 gtk_container_set_border_width(GTK_CONTAINER(page_task), 10);
709 gtk_widget_show (page_task);
710 gtk_notebook_append_page (GTK_NOTEBOOK (notebook), page_task, label);
711
712 label = gtk_label_new (_("Urgent task"));
713 gtk_widget_show (label);
714 page_task = gtk_vbox_new (FALSE, DEFAULT_HOR_SPACING);
715 gtk_container_set_border_width(GTK_CONTAINER(page_task), 10);
716 gtk_widget_show (page_task);
717 gtk_notebook_append_page (GTK_NOTEBOOK (notebook), page_task, label);
718
719 label = gtk_label_new (_("Iconified task"));
720 gtk_widget_show (label);
721 page_task = gtk_vbox_new (FALSE, DEFAULT_HOR_SPACING);
722 gtk_container_set_border_width(GTK_CONTAINER(page_task), 10);
723 gtk_widget_show (page_task);
724 gtk_notebook_append_page (GTK_NOTEBOOK (notebook), page_task, label);
725 }
726
727
728 void create_clock(GtkWidget *parent)
729 {
730 GtkWidget *table;
731 GtkWidget *margin_x, *margin_y, *combo_background;
732 GtkWidget *label;
733
734 table = gtk_table_new (1, 2, FALSE);
735 gtk_widget_show (table);
736 gtk_box_pack_start (GTK_BOX (parent), table, FALSE, FALSE, 0);
737 gtk_table_set_row_spacings (GTK_TABLE (table), ROW_SPACING);
738 gtk_table_set_col_spacings (GTK_TABLE (table), COL_SPACING);
739
740 label = gtk_label_new (_("Show clock"));
741 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
742 gtk_widget_show (label);
743 gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, GTK_FILL, 0, 0, 0);
744
745 margin_x = gtk_check_button_new ();
746 gtk_widget_show (margin_x);
747 gtk_table_attach (GTK_TABLE (table), margin_x, 1, 2, 0, 1, GTK_FILL, 0, 0, 0);
748
749 change_paragraph(parent);
750
751 label = gtk_label_new (_("<b>Format and timezone</b>"));
752 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
753 gtk_label_set_use_markup (GTK_LABEL (label), TRUE); gtk_widget_show (label);
754 gtk_box_pack_start(GTK_BOX (parent), label, FALSE, FALSE, 0);
755
756 table = gtk_table_new (3, 10, FALSE);
757 gtk_widget_show (table);
758 gtk_box_pack_start (GTK_BOX (parent), table, FALSE, FALSE, 0);
759 gtk_table_set_row_spacings (GTK_TABLE (table), ROW_SPACING);
760 gtk_table_set_col_spacings (GTK_TABLE (table), COL_SPACING);
761
762 label = gtk_label_new (_("First line"));
763 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
764 gtk_widget_show (label);
765 gtk_table_attach (GTK_TABLE (table), label, 2, 3, 0, 1, GTK_FILL, 0, 0, 0);
766
767 margin_x = gtk_entry_new ();
768 gtk_widget_show (margin_x);
769 gtk_entry_set_width_chars (GTK_ENTRY (margin_x), 15);
770 gtk_table_attach (GTK_TABLE (table), margin_x, 3, 4, 0, 1, GTK_FILL, 0, 0, 0);
771
772 label = gtk_label_new (_("Second line"));
773 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
774 gtk_widget_show (label);
775 gtk_table_attach (GTK_TABLE (table), label, 2, 3, 1, 2, GTK_FILL, 0, 0, 0);
776
777 margin_x = gtk_entry_new ();
778 gtk_widget_show (margin_x);
779 gtk_entry_set_width_chars (GTK_ENTRY (margin_x), 15);
780 gtk_table_attach (GTK_TABLE (table), margin_x, 3, 4, 1, 2, GTK_FILL, 0, 0, 0);
781
782 label = gtk_label_new (_("Tooltip"));
783 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
784 gtk_widget_show (label);
785 gtk_table_attach (GTK_TABLE (table), label, 2, 3, 2, 3, GTK_FILL, 0, 0, 0);
786
787 margin_x = gtk_entry_new ();
788 gtk_widget_show (margin_x);
789 gtk_entry_set_width_chars (GTK_ENTRY (margin_x), 15);
790 gtk_table_attach (GTK_TABLE (table), margin_x, 3, 4, 2, 3, GTK_FILL, 0, 0, 0);
791
792 label = gtk_label_new (_("First line"));
793 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
794 gtk_widget_show (label);
795 gtk_table_attach (GTK_TABLE (table), label, 6, 7, 0, 1, GTK_FILL, 0, 0, 0);
796
797 margin_x = gtk_entry_new ();
798 gtk_widget_show (margin_x);
799 gtk_entry_set_width_chars (GTK_ENTRY (margin_x), 20);
800 gtk_table_attach (GTK_TABLE (table), margin_x, 7, 8, 0, 1, GTK_FILL, 0, 0, 0);
801
802 label = gtk_label_new (_("Second line"));
803 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
804 gtk_widget_show (label);
805 gtk_table_attach (GTK_TABLE (table), label, 6, 7, 1, 2, GTK_FILL, 0, 0, 0);
806
807 margin_x = gtk_entry_new ();
808 gtk_widget_show (margin_x);
809 gtk_entry_set_width_chars (GTK_ENTRY (margin_x), 20);
810 gtk_table_attach (GTK_TABLE (table), margin_x, 7, 8, 1, 2, GTK_FILL, 0, 0, 0);
811
812 label = gtk_label_new (_("Tooltip"));
813 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
814 gtk_widget_show (label);
815 gtk_table_attach (GTK_TABLE (table), label, 6, 7, 2, 3, GTK_FILL, 0, 0, 0);
816
817 margin_x = gtk_entry_new ();
818 gtk_widget_show (margin_x);
819 gtk_entry_set_width_chars (GTK_ENTRY (margin_x), 20);
820 gtk_table_attach (GTK_TABLE (table), margin_x, 7, 8, 2, 3, GTK_FILL, 0, 0, 0);
821
822 change_paragraph(parent);
823
824 label = gtk_label_new (_("<b>Mouse action</b>"));
825 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
826 gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
827 gtk_widget_show (label);
828 gtk_box_pack_start(GTK_BOX (parent), label, FALSE, FALSE, 0);
829
830 table = gtk_table_new (2, 10, FALSE);
831 gtk_widget_show (table);
832 gtk_box_pack_start (GTK_BOX (parent), table, FALSE, FALSE, 0);
833 gtk_table_set_row_spacings (GTK_TABLE (table), ROW_SPACING);
834 gtk_table_set_col_spacings (GTK_TABLE (table), COL_SPACING);
835
836 label = gtk_label_new (_("Left click command"));
837 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
838 gtk_widget_show (label);
839 gtk_table_attach (GTK_TABLE (table), label, 2, 3, 0, 1, GTK_FILL, 0, 0, 0);
840
841 margin_x = gtk_entry_new ();
842 gtk_widget_show (margin_x);
843 gtk_entry_set_width_chars (GTK_ENTRY (margin_x), 12);
844 gtk_table_attach (GTK_TABLE (table), margin_x, 3, 4, 0, 1, GTK_FILL, 0, 0, 0);
845
846 label = gtk_label_new (_("Right click command"));
847 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
848 gtk_widget_show (label);
849 gtk_table_attach (GTK_TABLE (table), label, 6, 7, 0, 1, GTK_FILL, 0, 0, 0);
850
851 margin_x = gtk_entry_new ();
852 gtk_widget_show (margin_x);
853 gtk_entry_set_width_chars (GTK_ENTRY (margin_x), 12);
854 gtk_table_attach (GTK_TABLE (table), margin_x, 7, 8, 0, 1, GTK_FILL, 0, 0, 0);
855
856 change_paragraph(parent);
857
858 label = gtk_label_new (_("<b>Appearance</b>"));
859 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
860 gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
861 gtk_widget_show (label);
862 gtk_box_pack_start(GTK_BOX (parent), label, FALSE, FALSE, 0);
863
864 table = gtk_table_new (3, 10, FALSE);
865 gtk_widget_show (table);
866 gtk_box_pack_start (GTK_BOX (parent), table, FALSE, FALSE, 0);
867 gtk_table_set_row_spacings (GTK_TABLE (table), ROW_SPACING);
868 gtk_table_set_col_spacings (GTK_TABLE (table), COL_SPACING);
869
870 label = gtk_label_new (_("Padding horizontal"));
871 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
872 gtk_widget_show (label);
873 gtk_table_attach (GTK_TABLE (table), label, 2, 3, 0, 1, GTK_FILL, 0, 0, 0);
874
875 margin_x = gtk_spin_button_new_with_range (0, 500, 1);
876 gtk_widget_show (margin_x);
877 gtk_entry_set_max_length (GTK_ENTRY (margin_x), 3);
878 gtk_table_attach (GTK_TABLE (table), margin_x, 3, 4, 0, 1, GTK_FILL, 0, 0, 0);
879
880 label = gtk_label_new (_("Padding vertical"));
881 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
882 gtk_widget_show (label);
883 gtk_table_attach (GTK_TABLE (table), label, 2, 3, 1, 2, GTK_FILL, 0, 0, 0);
884
885 margin_y = gtk_spin_button_new_with_range (0, 500, 1);
886 gtk_widget_show (margin_y);
887 gtk_entry_set_max_length (GTK_ENTRY (margin_y), 3);
888 gtk_table_attach (GTK_TABLE (table), margin_y, 3, 4, 1, 2, GTK_FILL, 0, 0, 0);
889
890 label = gtk_label_new (_("Background"));
891 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
892 gtk_widget_show (label);
893 gtk_table_attach (GTK_TABLE (table), label, 2, 3, 2, 3, GTK_FILL, 0, 0, 0);
894
895 combo_background = gtk_combo_box_new_text ();
896 gtk_widget_show (combo_background);
897 gtk_table_attach (GTK_TABLE (table), combo_background, 3, 4, 2, 3, GTK_FILL, 0, 0, 0);
898 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_background), _("Back 1"));
899 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_background), _("Back 2"));
900 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_background), _("Back 3"));
901
902 label = gtk_label_new (_("Font first line"));
903 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
904 gtk_widget_show (label);
905 gtk_table_attach (GTK_TABLE (table), label, 6, 7, 0, 1, GTK_FILL, 0, 0, 0);
906
907 margin_x = gtk_font_button_new ();
908 gtk_widget_show (margin_x);
909 gtk_table_attach (GTK_TABLE (table), margin_x, 7, 8, 0, 1, GTK_FILL, 0, 0, 0);
910 // gtk_font_button_set_show_style (GTK_FONT_BUTTON (margin_x), FALSE);
911
912 label = gtk_label_new (_("Font second line"));
913 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
914 gtk_widget_show (label);
915 gtk_table_attach (GTK_TABLE (table), label, 6, 7, 1, 2, GTK_FILL, 0, 0, 0);
916
917 margin_x = gtk_font_button_new ();
918 gtk_widget_show (margin_x);
919 gtk_table_attach (GTK_TABLE (table), margin_x, 7, 8, 1, 2, GTK_FILL, 0, 0, 0);
920 // gtk_font_button_set_show_style (GTK_FONT_BUTTON (margin_x), FALSE);
921
922 label = gtk_label_new (_("Font color"));
923 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
924 gtk_widget_show (label);
925 gtk_table_attach (GTK_TABLE (table), label, 6, 7, 2, 3, GTK_FILL, 0, 0, 0);
926
927 margin_x = gtk_color_button_new();
928 gtk_color_button_set_use_alpha(GTK_COLOR_BUTTON(margin_x), TRUE);
929 gtk_widget_show (margin_x);
930 gtk_table_attach (GTK_TABLE (table), margin_x, 7, 8, 2, 3, GTK_FILL, 0, 0, 0);
931
932 change_paragraph(parent);
933 }
934
935
936 void create_systemtray(GtkWidget *parent)
937 {
938 GtkWidget *table;
939 GtkWidget *margin_x, *margin_y, *combo_background;
940 GtkWidget *label;
941
942 table = gtk_table_new (2, 2, FALSE);
943 gtk_widget_show (table);
944 gtk_box_pack_start (GTK_BOX (parent), table, FALSE, FALSE, 0);
945 gtk_table_set_row_spacings (GTK_TABLE (table), ROW_SPACING);
946 gtk_table_set_col_spacings (GTK_TABLE (table), COL_SPACING);
947
948 label = gtk_label_new (_("Show notification"));
949 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
950 gtk_widget_show (label);
951 gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, GTK_FILL, 0, 0, 0);
952
953 margin_x = gtk_check_button_new ();
954 gtk_widget_show (margin_x);
955 gtk_table_attach (GTK_TABLE (table), margin_x, 1, 2, 0, 1, GTK_FILL, 0, 0, 0);
956
957 label = gtk_label_new (_("Icon ordering"));
958 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
959 gtk_widget_show (label);
960 gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2, GTK_FILL, 0, 0, 0);
961
962 combo_background = gtk_combo_box_new_text ();
963 gtk_widget_show (combo_background);
964 gtk_table_attach (GTK_TABLE (table), combo_background, 1, 2, 1, 2, GTK_FILL, 0, 0, 0);
965 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_background), _("Ascending"));
966 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_background), _("Descending"));
967 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_background), _("Left to right"));
968 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_background), _("Right to left"));
969
970 change_paragraph(parent);
971
972 label = gtk_label_new (_("<b>Appearance</b>"));
973 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
974 gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
975 gtk_widget_show (label);
976 gtk_box_pack_start(GTK_BOX (parent), label, FALSE, FALSE, 0);
977
978 table = gtk_table_new (6, 10, FALSE);
979 gtk_widget_show (table);
980 gtk_box_pack_start (GTK_BOX (parent), table, FALSE, FALSE, 0);
981 gtk_table_set_row_spacings (GTK_TABLE (table), ROW_SPACING);
982 gtk_table_set_col_spacings (GTK_TABLE (table), COL_SPACING);
983
984 label = gtk_label_new (_("Padding horizontal"));
985 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
986 gtk_widget_show (label);
987 gtk_table_attach (GTK_TABLE (table), label, 2, 3, 0, 1, GTK_FILL, 0, 0, 0);
988
989 margin_x = gtk_spin_button_new_with_range (0, 500, 1);
990 gtk_widget_show (margin_x);
991 gtk_entry_set_max_length (GTK_ENTRY (margin_x), 3);
992 gtk_table_attach (GTK_TABLE (table), margin_x, 3, 4, 0, 1, GTK_FILL, 0, 0, 0);
993
994 label = gtk_label_new (_("Padding vertical"));
995 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
996 gtk_widget_show (label);
997 gtk_table_attach (GTK_TABLE (table), label, 2, 3, 1, 2, GTK_FILL, 0, 0, 0);
998
999 margin_y = gtk_spin_button_new_with_range (0, 500, 1);
1000 gtk_widget_show (margin_y);
1001 gtk_entry_set_max_length (GTK_ENTRY (margin_y), 3);
1002 gtk_table_attach (GTK_TABLE (table), margin_y, 3, 4, 1, 2, GTK_FILL, 0, 0, 0);
1003
1004 label = gtk_label_new (_("Spacing"));
1005 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
1006 gtk_widget_show (label);
1007 gtk_table_attach (GTK_TABLE (table), label, 2, 3, 2, 3, GTK_FILL, 0, 0, 0);
1008
1009 margin_x = gtk_spin_button_new_with_range (0, 500, 1);
1010 gtk_widget_show (margin_x);
1011 gtk_entry_set_max_length (GTK_ENTRY (margin_x), 3);
1012 gtk_table_attach (GTK_TABLE (table), margin_x, 3, 4, 2, 3, GTK_FILL, 0, 0, 0);
1013
1014 label = gtk_label_new (_("Background"));
1015 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
1016 gtk_widget_show (label);
1017 gtk_table_attach (GTK_TABLE (table), label, 2, 3, 3, 4, GTK_FILL, 0, 0, 0);
1018
1019 combo_background = gtk_combo_box_new_text ();
1020 gtk_widget_show (combo_background);
1021 gtk_table_attach (GTK_TABLE (table), combo_background, 3, 4, 3, 4, GTK_FILL, 0, 0, 0);
1022 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_background), _("Back 1"));
1023 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_background), _("Back 2"));
1024 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_background), _("Back 3"));
1025
1026 label = gtk_label_new (_("Icon size"));
1027 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
1028 gtk_widget_show (label);
1029 gtk_table_attach (GTK_TABLE (table), label, 6, 7, 0, 1, GTK_FILL, 0, 0, 0);
1030
1031 margin_x = gtk_spin_button_new_with_range (0, 500, 1);
1032 gtk_widget_show (margin_x);
1033 gtk_entry_set_max_length (GTK_ENTRY (margin_x), 3);
1034 gtk_table_attach (GTK_TABLE (table), margin_x, 7, 8, 0, 1, GTK_FILL, 0, 0, 0);
1035
1036 label = gtk_label_new (_("Icon opacity"));
1037 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
1038 gtk_widget_show (label);
1039 gtk_table_attach (GTK_TABLE (table), label, 6, 7, 1, 2, GTK_FILL, 0, 0, 0);
1040
1041 margin_x = gtk_spin_button_new_with_range (0, 100, 1);
1042 gtk_widget_show (margin_x);
1043 gtk_entry_set_max_length (GTK_ENTRY (margin_x), 3);
1044 gtk_table_attach (GTK_TABLE (table), margin_x, 7, 8, 1, 2, GTK_FILL, 0, 0, 0);
1045
1046 label = gtk_label_new (_("Icon saturation"));
1047 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
1048 gtk_widget_show (label);
1049 gtk_table_attach (GTK_TABLE (table), label, 6, 7, 2, 3, GTK_FILL, 0, 0, 0);
1050
1051 margin_x = gtk_spin_button_new_with_range (-100, 100, 1);
1052 gtk_widget_show (margin_x);
1053 gtk_entry_set_max_length (GTK_ENTRY (margin_x), 3);
1054 gtk_table_attach (GTK_TABLE (table), margin_x, 7, 8, 2, 3, GTK_FILL, 0, 0, 0);
1055
1056 label = gtk_label_new (_("Icon brightness"));
1057 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
1058 gtk_widget_show (label);
1059 gtk_table_attach (GTK_TABLE (table), label, 6, 7, 3, 4, GTK_FILL, 0, 0, 0);
1060
1061 margin_x = gtk_spin_button_new_with_range (-100, 100, 1);
1062 gtk_widget_show (margin_x);
1063 gtk_entry_set_max_length (GTK_ENTRY (margin_x), 3);
1064 gtk_table_attach (GTK_TABLE (table), margin_x, 7, 8, 3, 4, GTK_FILL, 0, 0, 0);
1065
1066 }
1067
1068
1069 void create_battery(GtkWidget *parent)
1070 {
1071 GtkWidget *table;
1072 GtkWidget *margin_x, *margin_y, *combo_background;
1073 GtkWidget *label;
1074
1075 table = gtk_table_new (1, 2, FALSE);
1076 gtk_widget_show (table);
1077 gtk_box_pack_start (GTK_BOX (parent), table, FALSE, FALSE, 0);
1078 gtk_table_set_row_spacings (GTK_TABLE (table), ROW_SPACING);
1079 gtk_table_set_col_spacings (GTK_TABLE (table), COL_SPACING);
1080
1081 label = gtk_label_new (_("Show battery"));
1082 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
1083 gtk_widget_show (label);
1084 gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, GTK_FILL, 0, 0, 0);
1085
1086 margin_x = gtk_check_button_new ();
1087 gtk_widget_show (margin_x);
1088 gtk_table_attach (GTK_TABLE (table), margin_x, 1, 2, 0, 1, GTK_FILL, 0, 0, 0);
1089
1090 change_paragraph(parent);
1091
1092 label = gtk_label_new (_("<b>Event</b>"));
1093 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
1094 gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
1095 gtk_widget_show (label);
1096 gtk_box_pack_start(GTK_BOX (parent), label, FALSE, FALSE, 0);
1097
1098 table = gtk_table_new (2, 10, FALSE);
1099 gtk_widget_show (table);
1100 gtk_box_pack_start (GTK_BOX (parent), table, FALSE, FALSE, 0);
1101 gtk_table_set_row_spacings (GTK_TABLE (table), ROW_SPACING);
1102 gtk_table_set_col_spacings (GTK_TABLE (table), COL_SPACING);
1103
1104 label = gtk_label_new (_("Hide if charge higher than"));
1105 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
1106 gtk_widget_show (label);
1107 gtk_table_attach (GTK_TABLE (table), label, 2, 3, 0, 1, GTK_FILL, 0, 0, 0);
1108
1109 margin_x = gtk_spin_button_new_with_range (0, 100, 1);
1110 gtk_widget_show (margin_x);
1111 gtk_entry_set_max_length (GTK_ENTRY (margin_x), 3);
1112 gtk_table_attach (GTK_TABLE (table), margin_x, 3, 4, 0, 1, GTK_FILL, 0, 0, 0);
1113
1114 label = gtk_label_new (_("%"));
1115 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
1116 gtk_widget_show (label);
1117 gtk_table_attach (GTK_TABLE (table), label, 4, 5, 0, 1, GTK_FILL, 0, 0, 0);
1118
1119 label = gtk_label_new (_("Alert if charge lower than"));
1120 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
1121 gtk_widget_show (label);
1122 gtk_table_attach (GTK_TABLE (table), label, 2, 3, 1, 2, GTK_FILL, 0, 0, 0);
1123
1124 margin_x = gtk_spin_button_new_with_range (0, 100, 1);
1125 gtk_widget_show (margin_x);
1126 gtk_entry_set_max_length (GTK_ENTRY (margin_x), 3);
1127 gtk_table_attach (GTK_TABLE (table), margin_x, 3, 4, 1, 2, GTK_FILL, 0, 0, 0);
1128
1129 label = gtk_label_new (_("%"));
1130 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
1131 gtk_widget_show (label);
1132 gtk_table_attach (GTK_TABLE (table), label, 4, 5, 1, 2, GTK_FILL, 0, 0, 0);
1133
1134 change_paragraph(parent);
1135
1136 label = gtk_label_new (_("<b>Appearance</b>"));
1137 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
1138 gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
1139 gtk_widget_show (label);
1140 gtk_box_pack_start(GTK_BOX (parent), label, FALSE, FALSE, 0);
1141
1142 table = gtk_table_new (4, 10, FALSE);
1143 gtk_widget_show (table);
1144 gtk_box_pack_start (GTK_BOX (parent), table, FALSE, FALSE, 0);
1145 gtk_table_set_row_spacings (GTK_TABLE (table), ROW_SPACING);
1146 gtk_table_set_col_spacings (GTK_TABLE (table), COL_SPACING);
1147
1148 label = gtk_label_new (_("Padding horizontal"));
1149 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
1150 gtk_widget_show (label);
1151 gtk_table_attach (GTK_TABLE (table), label, 2, 3, 0, 1, GTK_FILL, 0, 0, 0);
1152
1153 margin_x = gtk_spin_button_new_with_range (0, 500, 1);
1154 gtk_widget_show (margin_x);
1155 gtk_entry_set_max_length (GTK_ENTRY (margin_x), 3);
1156 gtk_table_attach (GTK_TABLE (table), margin_x, 3, 4, 0, 1, GTK_FILL, 0, 0, 0);
1157
1158 label = gtk_label_new (_("Padding vertical"));
1159 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
1160 gtk_widget_show (label);
1161 gtk_table_attach (GTK_TABLE (table), label, 2, 3, 1, 2, GTK_FILL, 0, 0, 0);
1162
1163 margin_y = gtk_spin_button_new_with_range (0, 500, 1);
1164 gtk_widget_show (margin_y);
1165 gtk_entry_set_max_length (GTK_ENTRY (margin_y), 3);
1166 gtk_table_attach (GTK_TABLE (table), margin_y, 3, 4, 1, 2, GTK_FILL, 0, 0, 0);
1167
1168 label = gtk_label_new (_("Background"));
1169 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
1170 gtk_widget_show (label);
1171 gtk_table_attach (GTK_TABLE (table), label, 2, 3, 2, 3, GTK_FILL, 0, 0, 0);
1172
1173 combo_background = gtk_combo_box_new_text ();
1174 gtk_widget_show (combo_background);
1175 gtk_table_attach (GTK_TABLE (table), combo_background, 3, 4, 2, 3, GTK_FILL, 0, 0, 0);
1176 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_background), _("Back 1"));
1177 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_background), _("Back 2"));
1178 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_background), _("Back 3"));
1179
1180 label = gtk_label_new (_("Font first line"));
1181 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
1182 gtk_widget_show (label);
1183 gtk_table_attach (GTK_TABLE (table), label, 6, 7, 0, 1, GTK_FILL, 0, 0, 0);
1184
1185 margin_x = gtk_font_button_new ();
1186 gtk_widget_show (margin_x);
1187 gtk_table_attach (GTK_TABLE (table), margin_x, 7, 8, 0, 1, GTK_FILL, 0, 0, 0);
1188 // gtk_font_button_set_show_style (GTK_FONT_BUTTON (margin_x), FALSE);
1189
1190 label = gtk_label_new (_("Font second line"));
1191 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
1192 gtk_widget_show (label);
1193 gtk_table_attach (GTK_TABLE (table), label, 6, 7, 1, 2, GTK_FILL, 0, 0, 0);
1194
1195 margin_x = gtk_font_button_new ();
1196 gtk_widget_show (margin_x);
1197 gtk_table_attach (GTK_TABLE (table), margin_x, 7, 8, 1, 2, GTK_FILL, 0, 0, 0);
1198 // gtk_font_button_set_show_style (GTK_FONT_BUTTON (margin_x), FALSE);
1199
1200 label = gtk_label_new (_("Font color"));
1201 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
1202 gtk_widget_show (label);
1203 gtk_table_attach (GTK_TABLE (table), label, 6, 7, 2, 3, GTK_FILL, 0, 0, 0);
1204
1205 margin_x = gtk_color_button_new();
1206 gtk_color_button_set_use_alpha(GTK_COLOR_BUTTON(margin_x), TRUE);
1207 gtk_widget_show (margin_x);
1208 gtk_table_attach (GTK_TABLE (table), margin_x, 7, 8, 2, 3, GTK_FILL, 0, 0, 0);
1209
1210 change_paragraph(parent);
1211 }
1212
1213
1214 void create_tooltip(GtkWidget *parent)
1215 {
1216 GtkWidget *table;
1217 GtkWidget *margin_x, *margin_y, *combo_background;
1218 GtkWidget *label;
1219
1220 table = gtk_table_new (1, 2, FALSE);
1221 gtk_widget_show (table);
1222 gtk_box_pack_start (GTK_BOX (parent), table, FALSE, FALSE, 0);
1223 gtk_table_set_row_spacings (GTK_TABLE (table), ROW_SPACING);
1224 gtk_table_set_col_spacings (GTK_TABLE (table), COL_SPACING);
1225
1226 label = gtk_label_new (_("Show tooltip"));
1227 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
1228 gtk_widget_show (label);
1229 gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, GTK_FILL, 0, 0, 0);
1230
1231 margin_x = gtk_check_button_new ();
1232 gtk_widget_show (margin_x);
1233 gtk_table_attach (GTK_TABLE (table), margin_x, 1, 2, 0, 1, GTK_FILL, 0, 0, 0);
1234
1235 change_paragraph(parent);
1236
1237 label = gtk_label_new (_("<b>Timing</b>"));
1238 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
1239 gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
1240 gtk_widget_show (label);
1241 gtk_box_pack_start(GTK_BOX (parent), label, FALSE, FALSE, 0);
1242
1243 table = gtk_table_new (2, 10, FALSE);
1244 gtk_widget_show (table);
1245 gtk_box_pack_start (GTK_BOX (parent), table, FALSE, FALSE, 0);
1246 gtk_table_set_row_spacings (GTK_TABLE (table), ROW_SPACING);
1247 gtk_table_set_col_spacings (GTK_TABLE (table), COL_SPACING);
1248
1249 label = gtk_label_new (_("Show tooltip after"));
1250 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
1251 gtk_widget_show (label);
1252 gtk_table_attach (GTK_TABLE (table), label, 2, 3, 0, 1, GTK_FILL, 0, 0, 0);
1253
1254 margin_x = gtk_spin_button_new_with_range (0, 10000, 0.1);
1255 gtk_widget_show (margin_x);
1256 gtk_table_attach (GTK_TABLE (table), margin_x, 3, 4, 0, 1, GTK_FILL, 0, 0, 0);
1257
1258 label = gtk_label_new (_("seconds"));
1259 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
1260 gtk_widget_show (label);
1261 gtk_table_attach (GTK_TABLE (table), label, 4, 5, 0, 1, GTK_FILL, 0, 0, 0);
1262
1263 label = gtk_label_new (_("Hide tooltip after"));
1264 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
1265 gtk_widget_show (label);
1266 gtk_table_attach (GTK_TABLE (table), label, 2, 3, 1, 2, GTK_FILL, 0, 0, 0);
1267
1268 margin_y = gtk_spin_button_new_with_range (0, 10000, 0.1);
1269 gtk_widget_show (margin_y);
1270 gtk_table_attach (GTK_TABLE (table), margin_y, 3, 4, 1, 2, GTK_FILL, 0, 0, 0);
1271
1272 label = gtk_label_new (_("seconds"));
1273 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
1274 gtk_widget_show (label);
1275 gtk_table_attach (GTK_TABLE (table), label, 4, 5, 1, 2, GTK_FILL, 0, 0, 0);
1276
1277 change_paragraph(parent);
1278
1279 label = gtk_label_new (_("<b>Appearance</b>"));
1280 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
1281 gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
1282 gtk_widget_show (label);
1283 gtk_box_pack_start(GTK_BOX (parent), label, FALSE, FALSE, 0);
1284
1285 table = gtk_table_new (3, 10, FALSE);
1286 gtk_widget_show (table);
1287 gtk_box_pack_start (GTK_BOX (parent), table, FALSE, FALSE, 0);
1288 gtk_table_set_row_spacings (GTK_TABLE (table), ROW_SPACING);
1289 gtk_table_set_col_spacings (GTK_TABLE (table), COL_SPACING);
1290
1291 label = gtk_label_new (_("Padding horizontal"));
1292 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
1293 gtk_widget_show (label);
1294 gtk_table_attach (GTK_TABLE (table), label, 2, 3, 0, 1, GTK_FILL, 0, 0, 0);
1295
1296 margin_x = gtk_spin_button_new_with_range (0, 500, 1);
1297 gtk_widget_show (margin_x);
1298 gtk_entry_set_max_length (GTK_ENTRY (margin_x), 3);
1299 gtk_table_attach (GTK_TABLE (table), margin_x, 3, 4, 0, 1, GTK_FILL, 0, 0, 0);
1300
1301 label = gtk_label_new (_("Padding vertical"));
1302 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
1303 gtk_widget_show (label);
1304 gtk_table_attach (GTK_TABLE (table), label, 2, 3, 1, 2, GTK_FILL, 0, 0, 0);
1305
1306 margin_y = gtk_spin_button_new_with_range (0, 500, 1);
1307 gtk_widget_show (margin_y);
1308 gtk_entry_set_max_length (GTK_ENTRY (margin_y), 3);
1309 gtk_table_attach (GTK_TABLE (table), margin_y, 3, 4, 1, 2, GTK_FILL, 0, 0, 0);
1310
1311 label = gtk_label_new (_("Background"));
1312 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
1313 gtk_widget_show (label);
1314 gtk_table_attach (GTK_TABLE (table), label, 2, 3, 2, 3, GTK_FILL, 0, 0, 0);
1315
1316 combo_background = gtk_combo_box_new_text ();
1317 gtk_widget_show (combo_background);
1318 gtk_table_attach (GTK_TABLE (table), combo_background, 3, 4, 2, 3, GTK_FILL, 0, 0, 0);
1319 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_background), _("Back 1"));
1320 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_background), _("Back 2"));
1321 gtk_combo_box_append_text (GTK_COMBO_BOX (combo_background), _("Back 3"));
1322
1323 label = gtk_label_new (_("Font"));
1324 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
1325 gtk_widget_show (label);
1326 gtk_table_attach (GTK_TABLE (table), label, 6, 7, 0, 1, GTK_FILL, 0, 0, 0);
1327
1328 margin_x = gtk_font_button_new ();
1329 gtk_widget_show (margin_x);
1330 gtk_table_attach (GTK_TABLE (table), margin_x, 7, 8, 0, 1, GTK_FILL, 0, 0, 0);
1331 // gtk_font_button_set_show_style (GTK_FONT_BUTTON (margin_x), FALSE);
1332
1333 label = gtk_label_new (_("Font color"));
1334 gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
1335 gtk_widget_show (label);
1336 gtk_table_attach (GTK_TABLE (table), label, 6, 7, 1, 2, GTK_FILL, 0, 0, 0);
1337
1338 margin_x = gtk_color_button_new();
1339 gtk_color_button_set_use_alpha(GTK_COLOR_BUTTON(margin_x), TRUE);
1340 gtk_widget_show (margin_x);
1341 gtk_table_attach (GTK_TABLE (table), margin_x, 7, 8, 1, 2, GTK_FILL, 0, 0, 0);
1342
1343 change_paragraph(parent);
1344
1345 }
1346
1347
1348 void create_background(GtkWidget *parent)
1349 {
1350 }
1351
This page took 0.112224 seconds and 4 git commands to generate.