Adding debian version 0.3.0+svn20091218-1.
[debian/lxappearance.git] / src / main-dlg-ui.c
1 /*
2 * DO NOT EDIT THIS FILE - it is generated by Glade.
3 */
4
5 #ifdef HAVE_CONFIG_H
6 # include <config.h>
7 #endif
8
9 #include <sys/types.h>
10 #include <sys/stat.h>
11 #include <unistd.h>
12 #include <string.h>
13 #include <stdio.h>
14
15 #include <gdk/gdkkeysyms.h>
16 #include <gtk/gtk.h>
17
18 #include "main-dlg.h"
19 #include "main-dlg-ui.h"
20 #include "glade-support.h"
21
22 #define GLADE_HOOKUP_OBJECT(component,widget,name) \
23 g_object_set_data_full (G_OBJECT (component), name, \
24 gtk_widget_ref (widget), (GDestroyNotify) gtk_widget_unref)
25
26 #define GLADE_HOOKUP_OBJECT_NO_REF(component,widget,name) \
27 g_object_set_data (G_OBJECT (component), name, widget)
28
29 GtkWidget*
30 create_dlg (void)
31 {
32 GtkWidget *dlg;
33 GtkWidget *dialog_vbox1;
34 GtkWidget *hbox1;
35 GtkWidget *notebook1;
36 GtkWidget *vbox4;
37 GtkWidget *label8;
38 GtkWidget *scrolledwindow1;
39 GtkWidget *gtk_theme_view;
40 GtkWidget *hbox4;
41 GtkWidget *label17;
42 GtkWidget *font;
43 GtkWidget *label2;
44 GtkWidget *vbox3;
45 GtkWidget *label7;
46 GtkWidget *scrolledwindow2;
47 GtkWidget *icon_theme_view;
48 GtkWidget *hbox5;
49 GtkWidget *install_theme;
50 GtkWidget *alignment1;
51 GtkWidget *hbox6;
52 GtkWidget *image1;
53 GtkWidget *label18;
54 GtkWidget *remove_theme;
55 GtkWidget *label3;
56 GtkWidget *vbox2;
57 GtkWidget *label4;
58 GtkWidget *scrolledwindow3;
59 GtkWidget *cursor_theme_view;
60 GtkWidget *hbox2;
61 GtkWidget *label6;
62 GtkWidget *label9;
63 GtkWidget *cursor_theme_size;
64 GtkWidget *label10;
65 GtkWidget *label1;
66 GtkWidget *vbox5;
67 GtkWidget *vbox6;
68 GtkWidget *label19;
69 GtkWidget *tb_style;
70 GtkWidget *label5;
71 GtkWidget *vbox1;
72 GtkWidget *label15;
73 GtkWidget *frame1;
74 GtkWidget *demo_box;
75 GtkWidget *dialog_action_area1;
76 GtkWidget *apply;
77 GtkWidget *closebutton1;
78
79 dlg = gtk_dialog_new ();
80 gtk_window_set_title (GTK_WINDOW (dlg), _("Appearance Settings"));
81 gtk_window_set_default_size (GTK_WINDOW (dlg), 640, 450);
82 gtk_window_set_type_hint (GTK_WINDOW (dlg), GDK_WINDOW_TYPE_HINT_DIALOG);
83
84 dialog_vbox1 = GTK_DIALOG (dlg)->vbox;
85 gtk_widget_show (dialog_vbox1);
86
87 hbox1 = gtk_hbox_new (FALSE, 0);
88 gtk_widget_show (hbox1);
89 gtk_box_pack_start (GTK_BOX (dialog_vbox1), hbox1, TRUE, TRUE, 0);
90
91 notebook1 = gtk_notebook_new ();
92 gtk_widget_show (notebook1);
93 gtk_box_pack_start (GTK_BOX (hbox1), notebook1, FALSE, TRUE, 0);
94
95 vbox4 = gtk_vbox_new (FALSE, 0);
96 gtk_widget_show (vbox4);
97 gtk_container_add (GTK_CONTAINER (notebook1), vbox4);
98
99 label8 = gtk_label_new (_("Available Window Themes"));
100 gtk_widget_show (label8);
101 gtk_box_pack_start (GTK_BOX (vbox4), label8, FALSE, FALSE, 0);
102 gtk_misc_set_padding (GTK_MISC (label8), 4, 4);
103
104 scrolledwindow1 = gtk_scrolled_window_new (NULL, NULL);
105 gtk_widget_show (scrolledwindow1);
106 gtk_box_pack_start (GTK_BOX (vbox4), scrolledwindow1, TRUE, TRUE, 0);
107 gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow1), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
108
109 gtk_theme_view = gtk_tree_view_new ();
110 gtk_widget_show (gtk_theme_view);
111 gtk_container_add (GTK_CONTAINER (scrolledwindow1), gtk_theme_view);
112 gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (gtk_theme_view), FALSE);
113
114 hbox4 = gtk_hbox_new (FALSE, 0);
115 gtk_widget_show (hbox4);
116 gtk_box_pack_start (GTK_BOX (vbox4), hbox4, FALSE, FALSE, 4);
117
118 label17 = gtk_label_new_with_mnemonic (_("_Font:"));
119 gtk_widget_show (label17);
120 gtk_box_pack_start (GTK_BOX (hbox4), label17, FALSE, TRUE, 4);
121
122 font = gtk_font_button_new ();
123 gtk_widget_show (font);
124 gtk_box_pack_start (GTK_BOX (hbox4), font, TRUE, TRUE, 0);
125 gtk_widget_set_size_request (font, 100, -1);
126 gtk_container_set_border_width (GTK_CONTAINER (font), 2);
127 gtk_font_button_set_use_font (GTK_FONT_BUTTON (font), TRUE);
128 gtk_font_button_set_use_size (GTK_FONT_BUTTON (font), TRUE);
129
130 label2 = gtk_label_new (_("Window"));
131 gtk_widget_show (label2);
132 gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 0), label2);
133
134 vbox3 = gtk_vbox_new (FALSE, 0);
135 gtk_widget_show (vbox3);
136 gtk_container_add (GTK_CONTAINER (notebook1), vbox3);
137
138 label7 = gtk_label_new (_("Available Icon Themes"));
139 gtk_widget_show (label7);
140 gtk_box_pack_start (GTK_BOX (vbox3), label7, FALSE, FALSE, 0);
141 gtk_misc_set_padding (GTK_MISC (label7), 4, 4);
142
143 scrolledwindow2 = gtk_scrolled_window_new (NULL, NULL);
144 gtk_widget_show (scrolledwindow2);
145 gtk_box_pack_start (GTK_BOX (vbox3), scrolledwindow2, TRUE, TRUE, 0);
146 gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow2), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
147
148 icon_theme_view = gtk_tree_view_new ();
149 gtk_widget_show (icon_theme_view);
150 gtk_container_add (GTK_CONTAINER (scrolledwindow2), icon_theme_view);
151 gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (icon_theme_view), FALSE);
152
153 hbox5 = gtk_hbox_new (FALSE, 4);
154 gtk_widget_show (hbox5);
155 gtk_box_pack_start (GTK_BOX (vbox3), hbox5, FALSE, TRUE, 2);
156 gtk_container_set_border_width (GTK_CONTAINER (hbox5), 2);
157
158 install_theme = gtk_button_new ();
159 gtk_widget_show (install_theme);
160 gtk_box_pack_start (GTK_BOX (hbox5), install_theme, TRUE, TRUE, 0);
161
162 alignment1 = gtk_alignment_new (0.5, 0.5, 0, 0);
163 gtk_widget_show (alignment1);
164 gtk_container_add (GTK_CONTAINER (install_theme), alignment1);
165
166 hbox6 = gtk_hbox_new (FALSE, 2);
167 gtk_widget_show (hbox6);
168 gtk_container_add (GTK_CONTAINER (alignment1), hbox6);
169
170 image1 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_BUTTON);
171 gtk_widget_show (image1);
172 gtk_box_pack_start (GTK_BOX (hbox6), image1, FALSE, FALSE, 0);
173
174 label18 = gtk_label_new_with_mnemonic (_("_Install"));
175 gtk_widget_show (label18);
176 gtk_box_pack_start (GTK_BOX (hbox6), label18, FALSE, FALSE, 0);
177
178 remove_theme = gtk_button_new_from_stock ("gtk-remove");
179 gtk_box_pack_start (GTK_BOX (hbox5), remove_theme, TRUE, TRUE, 0);
180
181 label3 = gtk_label_new (_("Icon"));
182 gtk_widget_show (label3);
183 gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 1), label3);
184
185 #if CURSOR_THEME
186 vbox2 = gtk_vbox_new (FALSE, 0);
187 gtk_widget_show (vbox2);
188 gtk_container_add (GTK_CONTAINER (notebook1), vbox2);
189
190 label4 = gtk_label_new (_("Available Cursor Themes"));
191 gtk_widget_show (label4);
192 gtk_box_pack_start (GTK_BOX (vbox2), label4, FALSE, FALSE, 0);
193 gtk_misc_set_padding (GTK_MISC (label4), 4, 4);
194
195 scrolledwindow3 = gtk_scrolled_window_new (NULL, NULL);
196 gtk_widget_show (scrolledwindow3);
197 gtk_box_pack_start (GTK_BOX (vbox2), scrolledwindow3, TRUE, TRUE, 0);
198 gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow3), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
199
200 cursor_theme_view = gtk_tree_view_new ();
201 gtk_widget_show (cursor_theme_view);
202 gtk_container_add (GTK_CONTAINER (scrolledwindow3), cursor_theme_view);
203 gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (cursor_theme_view), FALSE);
204
205 hbox2 = gtk_hbox_new (FALSE, 0);
206 gtk_widget_show (hbox2);
207 gtk_box_pack_start (GTK_BOX (vbox2), hbox2, FALSE, TRUE, 8);
208
209 label6 = gtk_label_new (_("Size"));
210 gtk_widget_show (label6);
211 gtk_box_pack_start (GTK_BOX (hbox2), label6, FALSE, FALSE, 4);
212
213 label9 = gtk_label_new (_("Small"));
214 gtk_widget_show (label9);
215 gtk_box_pack_start (GTK_BOX (hbox2), label9, FALSE, FALSE, 4);
216
217 cursor_theme_size = gtk_hscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (0, 16, 64, 1, 0, 0)));
218 gtk_widget_show (cursor_theme_size);
219 gtk_box_pack_start (GTK_BOX (hbox2), cursor_theme_size, TRUE, TRUE, 0);
220 gtk_scale_set_draw_value (GTK_SCALE (cursor_theme_size), FALSE);
221 gtk_scale_set_digits (GTK_SCALE (cursor_theme_size), 0);
222
223 label10 = gtk_label_new (_("Large"));
224 gtk_widget_show (label10);
225 gtk_box_pack_start (GTK_BOX (hbox2), label10, FALSE, FALSE, 4);
226
227 label1 = gtk_label_new (_("Cursor"));
228 gtk_widget_show (label1);
229 gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 2), label1);
230 #endif
231
232 vbox5 = gtk_vbox_new (FALSE, 4);
233 gtk_widget_show (vbox5);
234 gtk_container_add (GTK_CONTAINER (notebook1), vbox5);
235
236 vbox6 = gtk_vbox_new (FALSE, 0);
237 gtk_widget_show (vbox6);
238 gtk_box_pack_start (GTK_BOX (vbox5), vbox6, FALSE, TRUE, 0);
239 gtk_container_set_border_width (GTK_CONTAINER (vbox6), 4);
240
241 label19 = gtk_label_new (_("Toolbar Style: "));
242 gtk_widget_show (label19);
243 gtk_box_pack_start (GTK_BOX (vbox6), label19, FALSE, FALSE, 0);
244 gtk_misc_set_alignment (GTK_MISC (label19), 0, 0.5);
245
246 tb_style = gtk_combo_box_new_text ();
247 gtk_widget_show (tb_style);
248 gtk_box_pack_start (GTK_BOX (vbox6), tb_style, TRUE, TRUE, 0);
249 gtk_combo_box_append_text (GTK_COMBO_BOX (tb_style), _("Icons only"));
250 gtk_combo_box_append_text (GTK_COMBO_BOX (tb_style), _("Text only"));
251 gtk_combo_box_append_text (GTK_COMBO_BOX (tb_style), _("Text below icons"));
252 gtk_combo_box_append_text (GTK_COMBO_BOX (tb_style), _("Text beside icons"));
253
254 label5 = gtk_label_new (_("Other"));
255 gtk_widget_show (label5);
256 #if CURSOR_THEME
257 gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 3), label5);
258 #else
259 gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 2), label5);
260 #endif
261
262 vbox1 = gtk_vbox_new (FALSE, 0);
263 gtk_widget_show (vbox1);
264 gtk_box_pack_start (GTK_BOX (hbox1), vbox1, TRUE, TRUE, 0);
265
266 label15 = gtk_label_new (_("<b>Preview</b>"));
267 gtk_widget_show (label15);
268 gtk_box_pack_start (GTK_BOX (vbox1), label15, FALSE, FALSE, 0);
269 gtk_label_set_use_markup (GTK_LABEL (label15), TRUE);
270
271 frame1 = gtk_frame_new (NULL);
272 gtk_widget_show (frame1);
273 gtk_box_pack_start (GTK_BOX (vbox1), frame1, TRUE, TRUE, 0);
274 gtk_container_set_border_width (GTK_CONTAINER (frame1), 6);
275
276 demo_box = gtk_alignment_new (0.5, 0.5, 1, 1);
277 gtk_widget_show (demo_box);
278 gtk_container_add (GTK_CONTAINER (frame1), demo_box);
279 gtk_alignment_set_padding (GTK_ALIGNMENT (demo_box), 0, 0, 4, 4);
280
281 dialog_action_area1 = GTK_DIALOG (dlg)->action_area;
282 gtk_widget_show (dialog_action_area1);
283 gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area1), GTK_BUTTONBOX_END);
284
285 apply = gtk_button_new_from_stock ("gtk-apply");
286 gtk_widget_show (apply);
287 gtk_dialog_add_action_widget (GTK_DIALOG (dlg), apply, GTK_RESPONSE_APPLY);
288 GTK_WIDGET_SET_FLAGS (apply, GTK_CAN_DEFAULT);
289
290 closebutton1 = gtk_button_new_from_stock ("gtk-close");
291 gtk_widget_show (closebutton1);
292 gtk_dialog_add_action_widget (GTK_DIALOG (dlg), closebutton1, GTK_RESPONSE_CLOSE);
293 GTK_WIDGET_SET_FLAGS (closebutton1, GTK_CAN_DEFAULT);
294
295 g_signal_connect ((gpointer) dlg, "delete_event",
296 G_CALLBACK (gtk_main_quit),
297 NULL);
298 g_signal_connect ((gpointer) font, "font_set",
299 G_CALLBACK (on_font_changed),
300 NULL);
301 g_signal_connect ((gpointer) install_theme, "clicked",
302 G_CALLBACK (on_install_theme_clicked),
303 NULL);
304 g_signal_connect ((gpointer) remove_theme, "clicked",
305 G_CALLBACK (on_remove_theme_clicked),
306 NULL);
307 #if CURSOR_THEME
308 g_signal_connect ((gpointer) cursor_theme_size, "value_changed",
309 G_CALLBACK (on_cursor_size_changed),
310 NULL);
311 #endif
312 g_signal_connect ((gpointer) tb_style, "changed",
313 G_CALLBACK (on_tb_style_changed),
314 NULL);
315 g_signal_connect ((gpointer) apply, "clicked",
316 G_CALLBACK (on_apply_clicked),
317 NULL);
318 g_signal_connect ((gpointer) closebutton1, "clicked",
319 G_CALLBACK (gtk_main_quit),
320 NULL);
321
322 gtk_label_set_mnemonic_widget (GTK_LABEL (label17), font);
323
324 /* Store pointers to all widgets, for use by lookup_widget(). */
325 GLADE_HOOKUP_OBJECT_NO_REF (dlg, dlg, "dlg");
326 GLADE_HOOKUP_OBJECT_NO_REF (dlg, dialog_vbox1, "dialog_vbox1");
327 GLADE_HOOKUP_OBJECT (dlg, hbox1, "hbox1");
328 GLADE_HOOKUP_OBJECT (dlg, notebook1, "notebook1");
329 GLADE_HOOKUP_OBJECT (dlg, vbox4, "vbox4");
330 GLADE_HOOKUP_OBJECT (dlg, label8, "label8");
331 GLADE_HOOKUP_OBJECT (dlg, scrolledwindow1, "scrolledwindow1");
332 GLADE_HOOKUP_OBJECT (dlg, gtk_theme_view, "gtk_theme_view");
333 GLADE_HOOKUP_OBJECT (dlg, hbox4, "hbox4");
334 GLADE_HOOKUP_OBJECT (dlg, label17, "label17");
335 GLADE_HOOKUP_OBJECT (dlg, font, "font");
336 GLADE_HOOKUP_OBJECT (dlg, label2, "label2");
337 GLADE_HOOKUP_OBJECT (dlg, vbox3, "vbox3");
338 GLADE_HOOKUP_OBJECT (dlg, label7, "label7");
339 GLADE_HOOKUP_OBJECT (dlg, scrolledwindow2, "scrolledwindow2");
340 GLADE_HOOKUP_OBJECT (dlg, icon_theme_view, "icon_theme_view");
341 GLADE_HOOKUP_OBJECT (dlg, hbox5, "hbox5");
342 GLADE_HOOKUP_OBJECT (dlg, install_theme, "install_theme");
343 GLADE_HOOKUP_OBJECT (dlg, alignment1, "alignment1");
344 GLADE_HOOKUP_OBJECT (dlg, hbox6, "hbox6");
345 GLADE_HOOKUP_OBJECT (dlg, image1, "image1");
346 GLADE_HOOKUP_OBJECT (dlg, label18, "label18");
347 GLADE_HOOKUP_OBJECT (dlg, remove_theme, "remove_theme");
348 GLADE_HOOKUP_OBJECT (dlg, label3, "label3");
349 GLADE_HOOKUP_OBJECT (dlg, vbox2, "vbox2");
350 GLADE_HOOKUP_OBJECT (dlg, label4, "label4");
351 GLADE_HOOKUP_OBJECT (dlg, scrolledwindow3, "scrolledwindow3");
352 GLADE_HOOKUP_OBJECT (dlg, cursor_theme_view, "cursor_theme_view");
353 GLADE_HOOKUP_OBJECT (dlg, hbox2, "hbox2");
354 GLADE_HOOKUP_OBJECT (dlg, label6, "label6");
355 GLADE_HOOKUP_OBJECT (dlg, label9, "label9");
356 GLADE_HOOKUP_OBJECT (dlg, cursor_theme_size, "cursor_theme_size");
357 GLADE_HOOKUP_OBJECT (dlg, label10, "label10");
358 GLADE_HOOKUP_OBJECT (dlg, label1, "label1");
359 GLADE_HOOKUP_OBJECT (dlg, vbox5, "vbox5");
360 GLADE_HOOKUP_OBJECT (dlg, vbox6, "vbox6");
361 GLADE_HOOKUP_OBJECT (dlg, label19, "label19");
362 GLADE_HOOKUP_OBJECT (dlg, tb_style, "tb_style");
363 GLADE_HOOKUP_OBJECT (dlg, label5, "label5");
364 GLADE_HOOKUP_OBJECT (dlg, vbox1, "vbox1");
365 GLADE_HOOKUP_OBJECT (dlg, label15, "label15");
366 GLADE_HOOKUP_OBJECT (dlg, frame1, "frame1");
367 GLADE_HOOKUP_OBJECT (dlg, demo_box, "demo_box");
368 GLADE_HOOKUP_OBJECT_NO_REF (dlg, dialog_action_area1, "dialog_action_area1");
369 GLADE_HOOKUP_OBJECT (dlg, apply, "apply");
370 GLADE_HOOKUP_OBJECT (dlg, closebutton1, "closebutton1");
371
372 return dlg;
373 }
374