Put demo window in another process to prevent some bugs of gtk+.
[lxde/lxappearance.git] / src / main-dlg-ui.c
CommitLineData
f57233d5
HJYP
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
29GtkWidget*
30create_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;
a0647843
HJYP
40 GtkWidget *hbox4;
41 GtkWidget *label17;
42 GtkWidget *font;
f57233d5
HJYP
43 GtkWidget *label2;
44 GtkWidget *vbox3;
45 GtkWidget *label7;
46 GtkWidget *scrolledwindow2;
47 GtkWidget *icon_theme_view;
48 GtkWidget *label3;
f57233d5
HJYP
49 GtkWidget *empty_notebook_page;
50 GtkWidget *label5;
51 GtkWidget *vbox1;
52 GtkWidget *label15;
53 GtkWidget *frame1;
a0647843 54 GtkWidget *demo_box;
f57233d5
HJYP
55 GtkWidget *dialog_action_area1;
56 GtkWidget *apply;
57 GtkWidget *closebutton1;
f57233d5
HJYP
58
59 dlg = gtk_dialog_new ();
60 gtk_window_set_title (GTK_WINDOW (dlg), _("Appearance Settings"));
61 gtk_window_set_type_hint (GTK_WINDOW (dlg), GDK_WINDOW_TYPE_HINT_DIALOG);
62
63 dialog_vbox1 = GTK_DIALOG (dlg)->vbox;
64 gtk_widget_show (dialog_vbox1);
65
66 hbox1 = gtk_hbox_new (FALSE, 0);
67 gtk_widget_show (hbox1);
68 gtk_box_pack_start (GTK_BOX (dialog_vbox1), hbox1, TRUE, TRUE, 0);
69
70 notebook1 = gtk_notebook_new ();
71 gtk_widget_show (notebook1);
72 gtk_box_pack_start (GTK_BOX (hbox1), notebook1, FALSE, TRUE, 0);
73
74 vbox4 = gtk_vbox_new (FALSE, 0);
75 gtk_widget_show (vbox4);
76 gtk_container_add (GTK_CONTAINER (notebook1), vbox4);
77
78 label8 = gtk_label_new (_("Available Window Themes"));
79 gtk_widget_show (label8);
80 gtk_box_pack_start (GTK_BOX (vbox4), label8, FALSE, FALSE, 0);
81
82 scrolledwindow1 = gtk_scrolled_window_new (NULL, NULL);
83 gtk_widget_show (scrolledwindow1);
84 gtk_box_pack_start (GTK_BOX (vbox4), scrolledwindow1, TRUE, TRUE, 0);
85 gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow1), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
86
87 gtk_theme_view = gtk_tree_view_new ();
88 gtk_widget_show (gtk_theme_view);
89 gtk_container_add (GTK_CONTAINER (scrolledwindow1), gtk_theme_view);
c0c2320a 90 gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (gtk_theme_view), FALSE);
f57233d5 91
a0647843
HJYP
92 hbox4 = gtk_hbox_new (FALSE, 0);
93 gtk_widget_show (hbox4);
94 gtk_box_pack_start (GTK_BOX (vbox4), hbox4, FALSE, FALSE, 4);
95
96 label17 = gtk_label_new_with_mnemonic (_("_Font:"));
97 gtk_widget_show (label17);
98 gtk_box_pack_start (GTK_BOX (hbox4), label17, FALSE, TRUE, 4);
99
100 font = gtk_font_button_new ();
101 gtk_widget_show (font);
102 gtk_box_pack_start (GTK_BOX (hbox4), font, TRUE, TRUE, 0);
103 gtk_widget_set_size_request (font, 64, -1);
104 gtk_container_set_border_width (GTK_CONTAINER (font), 2);
105 gtk_font_button_set_use_font (GTK_FONT_BUTTON (font), TRUE);
106 gtk_font_button_set_use_size (GTK_FONT_BUTTON (font), TRUE);
107
f57233d5
HJYP
108 label2 = gtk_label_new (_("Window"));
109 gtk_widget_show (label2);
110 gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 0), label2);
111
112 vbox3 = gtk_vbox_new (FALSE, 0);
113 gtk_widget_show (vbox3);
114 gtk_container_add (GTK_CONTAINER (notebook1), vbox3);
115
116 label7 = gtk_label_new (_("Available Icon Themes"));
117 gtk_widget_show (label7);
118 gtk_box_pack_start (GTK_BOX (vbox3), label7, FALSE, FALSE, 0);
119
120 scrolledwindow2 = gtk_scrolled_window_new (NULL, NULL);
121 gtk_widget_show (scrolledwindow2);
122 gtk_box_pack_start (GTK_BOX (vbox3), scrolledwindow2, TRUE, TRUE, 0);
123 gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow2), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
124 gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow2), GTK_SHADOW_IN);
125
126 icon_theme_view = gtk_tree_view_new ();
127 gtk_widget_show (icon_theme_view);
128 gtk_container_add (GTK_CONTAINER (scrolledwindow2), icon_theme_view);
c0c2320a 129 gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (icon_theme_view), FALSE);
f57233d5
HJYP
130
131 label3 = gtk_label_new (_("Icon"));
132 gtk_widget_show (label3);
133 gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 1), label3);
134
f57233d5
HJYP
135 empty_notebook_page = gtk_vbox_new (FALSE, 0);
136 gtk_widget_show (empty_notebook_page);
137 gtk_container_add (GTK_CONTAINER (notebook1), empty_notebook_page);
138
139 label5 = gtk_label_new (_("Other"));
140 gtk_widget_show (label5);
a0647843 141 gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 2), label5);
f57233d5
HJYP
142
143 vbox1 = gtk_vbox_new (FALSE, 0);
144 gtk_widget_show (vbox1);
145 gtk_box_pack_start (GTK_BOX (hbox1), vbox1, TRUE, TRUE, 0);
146
147 label15 = gtk_label_new (_("<b>Preview</b>"));
148 gtk_widget_show (label15);
149 gtk_box_pack_start (GTK_BOX (vbox1), label15, FALSE, FALSE, 0);
150 gtk_label_set_use_markup (GTK_LABEL (label15), TRUE);
151
152 frame1 = gtk_frame_new (NULL);
153 gtk_widget_show (frame1);
154 gtk_box_pack_start (GTK_BOX (vbox1), frame1, TRUE, TRUE, 0);
155 gtk_container_set_border_width (GTK_CONTAINER (frame1), 6);
156
a0647843
HJYP
157 demo_box = gtk_alignment_new (0.5, 0.5, 1, 1);
158 gtk_widget_show (demo_box);
159 gtk_container_add (GTK_CONTAINER (frame1), demo_box);
160 gtk_alignment_set_padding (GTK_ALIGNMENT (demo_box), 0, 0, 4, 4);
f57233d5 161
f57233d5
HJYP
162 dialog_action_area1 = GTK_DIALOG (dlg)->action_area;
163 gtk_widget_show (dialog_action_area1);
164 gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area1), GTK_BUTTONBOX_END);
165
166 apply = gtk_button_new_from_stock ("gtk-apply");
167 gtk_widget_show (apply);
168 gtk_dialog_add_action_widget (GTK_DIALOG (dlg), apply, GTK_RESPONSE_APPLY);
169 GTK_WIDGET_SET_FLAGS (apply, GTK_CAN_DEFAULT);
170
171 closebutton1 = gtk_button_new_from_stock ("gtk-close");
172 gtk_widget_show (closebutton1);
173 gtk_dialog_add_action_widget (GTK_DIALOG (dlg), closebutton1, GTK_RESPONSE_CLOSE);
174 GTK_WIDGET_SET_FLAGS (closebutton1, GTK_CAN_DEFAULT);
175
176 g_signal_connect ((gpointer) dlg, "delete_event",
177 G_CALLBACK (gtk_main_quit),
178 NULL);
a0647843
HJYP
179 g_signal_connect ((gpointer) font, "font_set",
180 G_CALLBACK (on_font_changed),
181 NULL);
f57233d5
HJYP
182 g_signal_connect ((gpointer) apply, "clicked",
183 G_CALLBACK (on_apply_clicked),
184 NULL);
185 g_signal_connect ((gpointer) closebutton1, "clicked",
186 G_CALLBACK (gtk_main_quit),
187 NULL);
188
a0647843
HJYP
189 gtk_label_set_mnemonic_widget (GTK_LABEL (label17), font);
190
f57233d5
HJYP
191 /* Store pointers to all widgets, for use by lookup_widget(). */
192 GLADE_HOOKUP_OBJECT_NO_REF (dlg, dlg, "dlg");
193 GLADE_HOOKUP_OBJECT_NO_REF (dlg, dialog_vbox1, "dialog_vbox1");
194 GLADE_HOOKUP_OBJECT (dlg, hbox1, "hbox1");
195 GLADE_HOOKUP_OBJECT (dlg, notebook1, "notebook1");
196 GLADE_HOOKUP_OBJECT (dlg, vbox4, "vbox4");
197 GLADE_HOOKUP_OBJECT (dlg, label8, "label8");
198 GLADE_HOOKUP_OBJECT (dlg, scrolledwindow1, "scrolledwindow1");
199 GLADE_HOOKUP_OBJECT (dlg, gtk_theme_view, "gtk_theme_view");
a0647843
HJYP
200 GLADE_HOOKUP_OBJECT (dlg, hbox4, "hbox4");
201 GLADE_HOOKUP_OBJECT (dlg, label17, "label17");
202 GLADE_HOOKUP_OBJECT (dlg, font, "font");
f57233d5
HJYP
203 GLADE_HOOKUP_OBJECT (dlg, label2, "label2");
204 GLADE_HOOKUP_OBJECT (dlg, vbox3, "vbox3");
205 GLADE_HOOKUP_OBJECT (dlg, label7, "label7");
206 GLADE_HOOKUP_OBJECT (dlg, scrolledwindow2, "scrolledwindow2");
207 GLADE_HOOKUP_OBJECT (dlg, icon_theme_view, "icon_theme_view");
208 GLADE_HOOKUP_OBJECT (dlg, label3, "label3");
f57233d5
HJYP
209 GLADE_HOOKUP_OBJECT (dlg, label5, "label5");
210 GLADE_HOOKUP_OBJECT (dlg, vbox1, "vbox1");
211 GLADE_HOOKUP_OBJECT (dlg, label15, "label15");
212 GLADE_HOOKUP_OBJECT (dlg, frame1, "frame1");
a0647843 213 GLADE_HOOKUP_OBJECT (dlg, demo_box, "demo_box");
f57233d5
HJYP
214 GLADE_HOOKUP_OBJECT_NO_REF (dlg, dialog_action_area1, "dialog_action_area1");
215 GLADE_HOOKUP_OBJECT (dlg, apply, "apply");
216 GLADE_HOOKUP_OBJECT (dlg, closebutton1, "closebutton1");
f57233d5
HJYP
217
218 return dlg;
219}
220