Adding upstream version 0.2.
[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 *vbox5;
57 GtkWidget *vbox6;
58 GtkWidget *label19;
59 GtkWidget *tb_style;
60 GtkWidget *label5;
61 GtkWidget *vbox1;
62 GtkWidget *label15;
63 GtkWidget *frame1;
64 GtkWidget *demo_box;
65 GtkWidget *dialog_action_area1;
66 GtkWidget *apply;
67 GtkWidget *closebutton1;
68
69 dlg = gtk_dialog_new ();
70 gtk_window_set_title (GTK_WINDOW (dlg), _("Appearance Settings"));
71 gtk_window_set_position (GTK_WINDOW (dlg), GTK_WIN_POS_CENTER);
72 gtk_window_set_default_size (GTK_WINDOW (dlg), 640, 450);
73 gtk_window_set_type_hint (GTK_WINDOW (dlg), GDK_WINDOW_TYPE_HINT_DIALOG);
74
75 dialog_vbox1 = GTK_DIALOG (dlg)->vbox;
76 gtk_widget_show (dialog_vbox1);
77
78 hbox1 = gtk_hbox_new (FALSE, 0);
79 gtk_widget_show (hbox1);
80 gtk_box_pack_start (GTK_BOX (dialog_vbox1), hbox1, TRUE, TRUE, 0);
81
82 notebook1 = gtk_notebook_new ();
83 gtk_widget_show (notebook1);
84 gtk_box_pack_start (GTK_BOX (hbox1), notebook1, FALSE, TRUE, 0);
85
86 vbox4 = gtk_vbox_new (FALSE, 0);
87 gtk_widget_show (vbox4);
88 gtk_container_add (GTK_CONTAINER (notebook1), vbox4);
89
90 label8 = gtk_label_new (_("Available Window Themes"));
91 gtk_widget_show (label8);
92 gtk_box_pack_start (GTK_BOX (vbox4), label8, FALSE, FALSE, 0);
93 gtk_misc_set_padding (GTK_MISC (label8), 4, 4);
94
95 scrolledwindow1 = gtk_scrolled_window_new (NULL, NULL);
96 gtk_widget_show (scrolledwindow1);
97 gtk_box_pack_start (GTK_BOX (vbox4), scrolledwindow1, TRUE, TRUE, 0);
98 gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow1), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
99 gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow1), GTK_SHADOW_IN);
100
101 gtk_theme_view = gtk_tree_view_new ();
102 gtk_widget_show (gtk_theme_view);
103 gtk_container_add (GTK_CONTAINER (scrolledwindow1), gtk_theme_view);
104 gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (gtk_theme_view), FALSE);
105
106 hbox4 = gtk_hbox_new (FALSE, 0);
107 gtk_widget_show (hbox4);
108 gtk_box_pack_start (GTK_BOX (vbox4), hbox4, FALSE, FALSE, 4);
109
110 label17 = gtk_label_new_with_mnemonic (_("_Font:"));
111 gtk_widget_show (label17);
112 gtk_box_pack_start (GTK_BOX (hbox4), label17, FALSE, TRUE, 4);
113
114 font = gtk_font_button_new ();
115 gtk_widget_show (font);
116 gtk_box_pack_start (GTK_BOX (hbox4), font, TRUE, TRUE, 0);
117 gtk_widget_set_size_request (font, 100, -1);
118 gtk_container_set_border_width (GTK_CONTAINER (font), 2);
119 gtk_font_button_set_use_font (GTK_FONT_BUTTON (font), TRUE);
120 gtk_font_button_set_use_size (GTK_FONT_BUTTON (font), TRUE);
121
122 label2 = gtk_label_new (_("Window"));
123 gtk_widget_show (label2);
124 gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 0), label2);
125
126 vbox3 = gtk_vbox_new (FALSE, 0);
127 gtk_widget_show (vbox3);
128 gtk_container_add (GTK_CONTAINER (notebook1), vbox3);
129
130 label7 = gtk_label_new (_("Available Icon Themes"));
131 gtk_widget_show (label7);
132 gtk_box_pack_start (GTK_BOX (vbox3), label7, FALSE, FALSE, 0);
133 gtk_misc_set_padding (GTK_MISC (label7), 4, 4);
134
135 scrolledwindow2 = gtk_scrolled_window_new (NULL, NULL);
136 gtk_widget_show (scrolledwindow2);
137 gtk_box_pack_start (GTK_BOX (vbox3), scrolledwindow2, TRUE, TRUE, 0);
138 gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow2), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
139 gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow2), GTK_SHADOW_IN);
140
141 icon_theme_view = gtk_tree_view_new ();
142 gtk_widget_show (icon_theme_view);
143 gtk_container_add (GTK_CONTAINER (scrolledwindow2), icon_theme_view);
144 gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (icon_theme_view), FALSE);
145
146 hbox5 = gtk_hbox_new (FALSE, 4);
147 gtk_widget_show (hbox5);
148 gtk_box_pack_start (GTK_BOX (vbox3), hbox5, FALSE, TRUE, 2);
149 gtk_container_set_border_width (GTK_CONTAINER (hbox5), 2);
150
151 install_theme = gtk_button_new ();
152 gtk_widget_show (install_theme);
153 gtk_box_pack_start (GTK_BOX (hbox5), install_theme, TRUE, TRUE, 0);
154
155 alignment1 = gtk_alignment_new (0.5, 0.5, 0, 0);
156 gtk_widget_show (alignment1);
157 gtk_container_add (GTK_CONTAINER (install_theme), alignment1);
158
159 hbox6 = gtk_hbox_new (FALSE, 2);
160 gtk_widget_show (hbox6);
161 gtk_container_add (GTK_CONTAINER (alignment1), hbox6);
162
163 image1 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_BUTTON);
164 gtk_widget_show (image1);
165 gtk_box_pack_start (GTK_BOX (hbox6), image1, FALSE, FALSE, 0);
166
167 label18 = gtk_label_new_with_mnemonic (_("_Install"));
168 gtk_widget_show (label18);
169 gtk_box_pack_start (GTK_BOX (hbox6), label18, FALSE, FALSE, 0);
170
171 remove_theme = gtk_button_new_from_stock ("gtk-remove");
172 gtk_box_pack_start (GTK_BOX (hbox5), remove_theme, TRUE, TRUE, 0);
173
174 label3 = gtk_label_new (_("Icon"));
175 gtk_widget_show (label3);
176 gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 1), label3);
177
178 vbox5 = gtk_vbox_new (FALSE, 4);
179 gtk_widget_show (vbox5);
180 gtk_container_add (GTK_CONTAINER (notebook1), vbox5);
181
182 vbox6 = gtk_vbox_new (FALSE, 0);
183 gtk_widget_show (vbox6);
184 gtk_box_pack_start (GTK_BOX (vbox5), vbox6, FALSE, TRUE, 0);
185 gtk_container_set_border_width (GTK_CONTAINER (vbox6), 4);
186
187 label19 = gtk_label_new (_("Toolbar Style: "));
188 gtk_widget_show (label19);
189 gtk_box_pack_start (GTK_BOX (vbox6), label19, FALSE, FALSE, 0);
190 gtk_misc_set_alignment (GTK_MISC (label19), 0, 0.5);
191
192 tb_style = gtk_combo_box_new_text ();
193 gtk_widget_show (tb_style);
194 gtk_box_pack_start (GTK_BOX (vbox6), tb_style, TRUE, TRUE, 0);
195 gtk_combo_box_append_text (GTK_COMBO_BOX (tb_style), _("Icons only"));
196 gtk_combo_box_append_text (GTK_COMBO_BOX (tb_style), _("Text only"));
197 gtk_combo_box_append_text (GTK_COMBO_BOX (tb_style), _("Text below icons"));
198 gtk_combo_box_append_text (GTK_COMBO_BOX (tb_style), _("Text beside icons"));
199
200 label5 = gtk_label_new (_("Other"));
201 gtk_widget_show (label5);
202 gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 2), label5);
203
204 vbox1 = gtk_vbox_new (FALSE, 0);
205 gtk_widget_show (vbox1);
206 gtk_box_pack_start (GTK_BOX (hbox1), vbox1, TRUE, TRUE, 0);
207
208 label15 = gtk_label_new (_("<b>Preview</b>"));
209 gtk_widget_show (label15);
210 gtk_box_pack_start (GTK_BOX (vbox1), label15, FALSE, FALSE, 0);
211 gtk_label_set_use_markup (GTK_LABEL (label15), TRUE);
212
213 frame1 = gtk_frame_new (NULL);
214 gtk_widget_show (frame1);
215 gtk_box_pack_start (GTK_BOX (vbox1), frame1, TRUE, TRUE, 0);
216 gtk_container_set_border_width (GTK_CONTAINER (frame1), 6);
217
218 demo_box = gtk_alignment_new (0.5, 0.5, 1, 1);
219 gtk_widget_show (demo_box);
220 gtk_container_add (GTK_CONTAINER (frame1), demo_box);
221 gtk_alignment_set_padding (GTK_ALIGNMENT (demo_box), 0, 0, 4, 4);
222
223 dialog_action_area1 = GTK_DIALOG (dlg)->action_area;
224 gtk_widget_show (dialog_action_area1);
225 gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area1), GTK_BUTTONBOX_END);
226
227 apply = gtk_button_new_from_stock ("gtk-apply");
228 gtk_widget_show (apply);
229 gtk_dialog_add_action_widget (GTK_DIALOG (dlg), apply, GTK_RESPONSE_APPLY);
230 GTK_WIDGET_SET_FLAGS (apply, GTK_CAN_DEFAULT);
231
232 closebutton1 = gtk_button_new_from_stock ("gtk-close");
233 gtk_widget_show (closebutton1);
234 gtk_dialog_add_action_widget (GTK_DIALOG (dlg), closebutton1, GTK_RESPONSE_CLOSE);
235 GTK_WIDGET_SET_FLAGS (closebutton1, GTK_CAN_DEFAULT);
236
237 g_signal_connect ((gpointer) dlg, "delete_event",
238 G_CALLBACK (gtk_main_quit),
239 NULL);
240 g_signal_connect ((gpointer) font, "font_set",
241 G_CALLBACK (on_font_changed),
242 NULL);
243 g_signal_connect ((gpointer) install_theme, "clicked",
244 G_CALLBACK (on_install_theme_clicked),
245 NULL);
246 g_signal_connect ((gpointer) remove_theme, "clicked",
247 G_CALLBACK (on_remove_theme_clicked),
248 NULL);
249 g_signal_connect ((gpointer) tb_style, "changed",
250 G_CALLBACK (on_tb_style_changed),
251 NULL);
252 g_signal_connect ((gpointer) apply, "clicked",
253 G_CALLBACK (on_apply_clicked),
254 NULL);
255 g_signal_connect ((gpointer) closebutton1, "clicked",
256 G_CALLBACK (gtk_main_quit),
257 NULL);
258
259 gtk_label_set_mnemonic_widget (GTK_LABEL (label17), font);
260
261 /* Store pointers to all widgets, for use by lookup_widget(). */
262 GLADE_HOOKUP_OBJECT_NO_REF (dlg, dlg, "dlg");
263 GLADE_HOOKUP_OBJECT_NO_REF (dlg, dialog_vbox1, "dialog_vbox1");
264 GLADE_HOOKUP_OBJECT (dlg, hbox1, "hbox1");
265 GLADE_HOOKUP_OBJECT (dlg, notebook1, "notebook1");
266 GLADE_HOOKUP_OBJECT (dlg, vbox4, "vbox4");
267 GLADE_HOOKUP_OBJECT (dlg, label8, "label8");
268 GLADE_HOOKUP_OBJECT (dlg, scrolledwindow1, "scrolledwindow1");
269 GLADE_HOOKUP_OBJECT (dlg, gtk_theme_view, "gtk_theme_view");
270 GLADE_HOOKUP_OBJECT (dlg, hbox4, "hbox4");
271 GLADE_HOOKUP_OBJECT (dlg, label17, "label17");
272 GLADE_HOOKUP_OBJECT (dlg, font, "font");
273 GLADE_HOOKUP_OBJECT (dlg, label2, "label2");
274 GLADE_HOOKUP_OBJECT (dlg, vbox3, "vbox3");
275 GLADE_HOOKUP_OBJECT (dlg, label7, "label7");
276 GLADE_HOOKUP_OBJECT (dlg, scrolledwindow2, "scrolledwindow2");
277 GLADE_HOOKUP_OBJECT (dlg, icon_theme_view, "icon_theme_view");
278 GLADE_HOOKUP_OBJECT (dlg, hbox5, "hbox5");
279 GLADE_HOOKUP_OBJECT (dlg, install_theme, "install_theme");
280 GLADE_HOOKUP_OBJECT (dlg, alignment1, "alignment1");
281 GLADE_HOOKUP_OBJECT (dlg, hbox6, "hbox6");
282 GLADE_HOOKUP_OBJECT (dlg, image1, "image1");
283 GLADE_HOOKUP_OBJECT (dlg, label18, "label18");
284 GLADE_HOOKUP_OBJECT (dlg, remove_theme, "remove_theme");
285 GLADE_HOOKUP_OBJECT (dlg, label3, "label3");
286 GLADE_HOOKUP_OBJECT (dlg, vbox5, "vbox5");
287 GLADE_HOOKUP_OBJECT (dlg, vbox6, "vbox6");
288 GLADE_HOOKUP_OBJECT (dlg, label19, "label19");
289 GLADE_HOOKUP_OBJECT (dlg, tb_style, "tb_style");
290 GLADE_HOOKUP_OBJECT (dlg, label5, "label5");
291 GLADE_HOOKUP_OBJECT (dlg, vbox1, "vbox1");
292 GLADE_HOOKUP_OBJECT (dlg, label15, "label15");
293 GLADE_HOOKUP_OBJECT (dlg, frame1, "frame1");
294 GLADE_HOOKUP_OBJECT (dlg, demo_box, "demo_box");
295 GLADE_HOOKUP_OBJECT_NO_REF (dlg, dialog_action_area1, "dialog_action_area1");
296 GLADE_HOOKUP_OBJECT (dlg, apply, "apply");
297 GLADE_HOOKUP_OBJECT (dlg, closebutton1, "closebutton1");
298
299 return dlg;
300 }
301