cropper

view interface.c @ 0:ca9155129253

initial commit code base: gthumb_crop.glade and generated code from it with glade
author meillo@marmaro.de
date Tue, 04 Dec 2007 16:48:51 +0100
parents
children 80535e4deaa4
line source
1 /*
2 * DO NOT EDIT THIS FILE - it is generated by Glade.
3 */
5 #ifdef HAVE_CONFIG_H
6 # include <config.h>
7 #endif
9 #include <sys/types.h>
10 #include <sys/stat.h>
11 #include <unistd.h>
12 #include <string.h>
13 #include <stdio.h>
15 #include <gdk/gdkkeysyms.h>
16 #include <gtk/gtk.h>
18 #include "callbacks.h"
19 #include "interface.h"
20 #include "support.h"
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)
26 #define GLADE_HOOKUP_OBJECT_NO_REF(component,widget,name) \
27 g_object_set_data (G_OBJECT (component), name, widget)
29 GtkWidget*
30 create_cropper_window (void)
31 {
32 GtkWidget *cropper_window;
33 GtkWidget *dialog_vbox1;
34 GtkWidget *hbox1;
35 GtkWidget *vbox1;
36 GtkWidget *vbox2;
37 GtkWidget *label1;
38 GtkWidget *hbox2;
39 GtkWidget *label2;
40 GtkWidget *table2;
41 GtkWidget *label3;
42 GtkWidget *label5;
43 GtkWidget *label4;
44 GtkWidget *label6;
45 GtkWidget *hbox5;
46 GtkObject *crop_x_spinbutton_adj;
47 GtkWidget *crop_x_spinbutton;
48 GtkWidget *hbox6;
49 GtkObject *crop_y_spinbutton_adj;
50 GtkWidget *crop_y_spinbutton;
51 GtkWidget *hbox7;
52 GtkObject *crop_width_spinbutton_adj;
53 GtkWidget *crop_width_spinbutton;
54 GtkWidget *hbox8;
55 GtkObject *crop_height_spinbutton_adj;
56 GtkWidget *crop_height_spinbutton;
57 GtkWidget *vbox4;
58 GtkWidget *label7;
59 GtkWidget *hbox3;
60 GtkWidget *label8;
61 GtkWidget *table3;
62 GtkWidget *hbox10;
63 GtkWidget *custom_ratio_box;
64 GtkObject *ratio_w_spinbutton_adj;
65 GtkWidget *ratio_w_spinbutton;
66 GtkWidget *ratio_swap_button;
67 GtkWidget *eventbox1;
68 GtkWidget *ratio_swap_image;
69 GtkObject *ratio_h_spinbutton_adj;
70 GtkWidget *ratio_h_spinbutton;
71 GtkWidget *ratio_optionmenu;
72 GtkWidget *menu1;
73 GtkWidget *none1;
74 GtkWidget *square1;
75 GtkWidget *_4x3__book__dvd_1;
76 GtkWidget *_4x6__postcard_1;
77 GtkWidget *_5x1;
78 GtkWidget *_8x1;
79 GtkWidget *custom1;
80 GtkWidget *vbox5;
81 GtkWidget *frame1;
82 GtkWidget *vbox7;
83 GtkWidget *nav_container;
84 GtkWidget *hbox16;
85 GtkWidget *hbox17;
86 GtkWidget *crop_zoom_in_button;
87 GtkWidget *image2;
88 GtkWidget *crop_zoom_out_button;
89 GtkWidget *image4;
90 GtkWidget *crop_zoom_100_button;
91 GtkWidget *image3;
92 GtkWidget *crop_zoom_fit_button;
93 GtkWidget *image1;
95 cropper_window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
96 gtk_widget_set_name (cropper_window, "cropper_window");
97 gtk_container_set_border_width (GTK_CONTAINER (cropper_window), 6);
98 gtk_window_set_title (GTK_WINDOW (cropper_window), "Cropper");
100 dialog_vbox1 = gtk_vbox_new (FALSE, 6);
101 gtk_widget_set_name (dialog_vbox1, "dialog_vbox1");
102 gtk_widget_show (dialog_vbox1);
103 gtk_container_add (GTK_CONTAINER (cropper_window), dialog_vbox1);
105 hbox1 = gtk_hbox_new (FALSE, 12);
106 gtk_widget_set_name (hbox1, "hbox1");
107 gtk_widget_show (hbox1);
108 gtk_box_pack_start (GTK_BOX (dialog_vbox1), hbox1, TRUE, TRUE, 0);
109 gtk_container_set_border_width (GTK_CONTAINER (hbox1), 5);
111 vbox1 = gtk_vbox_new (FALSE, 12);
112 gtk_widget_set_name (vbox1, "vbox1");
113 gtk_widget_show (vbox1);
114 gtk_box_pack_start (GTK_BOX (hbox1), vbox1, FALSE, TRUE, 0);
116 vbox2 = gtk_vbox_new (FALSE, 6);
117 gtk_widget_set_name (vbox2, "vbox2");
118 gtk_widget_show (vbox2);
119 gtk_box_pack_start (GTK_BOX (vbox1), vbox2, FALSE, TRUE, 0);
121 label1 = gtk_label_new ("<b>Selection</b>");
122 gtk_widget_set_name (label1, "label1");
123 gtk_widget_show (label1);
124 gtk_box_pack_start (GTK_BOX (vbox2), label1, FALSE, FALSE, 0);
125 gtk_label_set_use_markup (GTK_LABEL (label1), TRUE);
126 gtk_misc_set_alignment (GTK_MISC (label1), 0, 0.5);
128 hbox2 = gtk_hbox_new (FALSE, 0);
129 gtk_widget_set_name (hbox2, "hbox2");
130 gtk_widget_show (hbox2);
131 gtk_box_pack_start (GTK_BOX (vbox2), hbox2, FALSE, TRUE, 0);
133 label2 = gtk_label_new (" ");
134 gtk_widget_set_name (label2, "label2");
135 gtk_widget_show (label2);
136 gtk_box_pack_start (GTK_BOX (hbox2), label2, FALSE, FALSE, 0);
138 table2 = gtk_table_new (4, 2, FALSE);
139 gtk_widget_set_name (table2, "table2");
140 gtk_widget_show (table2);
141 gtk_box_pack_start (GTK_BOX (hbox2), table2, TRUE, TRUE, 0);
142 gtk_table_set_row_spacings (GTK_TABLE (table2), 6);
143 gtk_table_set_col_spacings (GTK_TABLE (table2), 6);
145 label3 = gtk_label_new_with_mnemonic ("_X:");
146 gtk_widget_set_name (label3, "label3");
147 gtk_widget_show (label3);
148 gtk_table_attach (GTK_TABLE (table2), label3, 0, 1, 0, 1,
149 (GtkAttachOptions) (GTK_FILL),
150 (GtkAttachOptions) (0), 0, 0);
151 gtk_misc_set_alignment (GTK_MISC (label3), 0, 0.5);
153 label5 = gtk_label_new_with_mnemonic ("_Y:");
154 gtk_widget_set_name (label5, "label5");
155 gtk_widget_show (label5);
156 gtk_table_attach (GTK_TABLE (table2), label5, 0, 1, 1, 2,
157 (GtkAttachOptions) (GTK_FILL),
158 (GtkAttachOptions) (0), 0, 0);
159 gtk_misc_set_alignment (GTK_MISC (label5), 0, 0.5);
161 label4 = gtk_label_new_with_mnemonic ("_Width:");
162 gtk_widget_set_name (label4, "label4");
163 gtk_widget_show (label4);
164 gtk_table_attach (GTK_TABLE (table2), label4, 0, 1, 2, 3,
165 (GtkAttachOptions) (GTK_FILL),
166 (GtkAttachOptions) (0), 0, 0);
167 gtk_misc_set_alignment (GTK_MISC (label4), 0, 0.5);
169 label6 = gtk_label_new_with_mnemonic ("_Height:");
170 gtk_widget_set_name (label6, "label6");
171 gtk_widget_show (label6);
172 gtk_table_attach (GTK_TABLE (table2), label6, 0, 1, 3, 4,
173 (GtkAttachOptions) (GTK_FILL),
174 (GtkAttachOptions) (0), 0, 0);
175 gtk_misc_set_alignment (GTK_MISC (label6), 0, 0.5);
177 hbox5 = gtk_hbox_new (FALSE, 0);
178 gtk_widget_set_name (hbox5, "hbox5");
179 gtk_widget_show (hbox5);
180 gtk_table_attach (GTK_TABLE (table2), hbox5, 1, 2, 0, 1,
181 (GtkAttachOptions) (GTK_FILL),
182 (GtkAttachOptions) (GTK_FILL), 0, 0);
184 crop_x_spinbutton_adj = gtk_adjustment_new (1, 0, 300, 1, 10, 1);
185 crop_x_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (crop_x_spinbutton_adj), 1, 0);
186 gtk_widget_set_name (crop_x_spinbutton, "crop_x_spinbutton");
187 gtk_widget_show (crop_x_spinbutton);
188 gtk_box_pack_start (GTK_BOX (hbox5), crop_x_spinbutton, FALSE, TRUE, 0);
190 hbox6 = gtk_hbox_new (FALSE, 0);
191 gtk_widget_set_name (hbox6, "hbox6");
192 gtk_widget_show (hbox6);
193 gtk_table_attach (GTK_TABLE (table2), hbox6, 1, 2, 1, 2,
194 (GtkAttachOptions) (GTK_FILL),
195 (GtkAttachOptions) (GTK_FILL), 0, 0);
197 crop_y_spinbutton_adj = gtk_adjustment_new (1, 0, 300, 1, 10, 1);
198 crop_y_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (crop_y_spinbutton_adj), 1, 0);
199 gtk_widget_set_name (crop_y_spinbutton, "crop_y_spinbutton");
200 gtk_widget_show (crop_y_spinbutton);
201 gtk_box_pack_start (GTK_BOX (hbox6), crop_y_spinbutton, FALSE, TRUE, 0);
203 hbox7 = gtk_hbox_new (FALSE, 0);
204 gtk_widget_set_name (hbox7, "hbox7");
205 gtk_widget_show (hbox7);
206 gtk_table_attach (GTK_TABLE (table2), hbox7, 1, 2, 2, 3,
207 (GtkAttachOptions) (GTK_FILL),
208 (GtkAttachOptions) (GTK_FILL), 0, 0);
210 crop_width_spinbutton_adj = gtk_adjustment_new (1, 0, 300, 1, 10, 1);
211 crop_width_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (crop_width_spinbutton_adj), 1, 0);
212 gtk_widget_set_name (crop_width_spinbutton, "crop_width_spinbutton");
213 gtk_widget_show (crop_width_spinbutton);
214 gtk_box_pack_start (GTK_BOX (hbox7), crop_width_spinbutton, FALSE, FALSE, 0);
216 hbox8 = gtk_hbox_new (FALSE, 0);
217 gtk_widget_set_name (hbox8, "hbox8");
218 gtk_widget_show (hbox8);
219 gtk_table_attach (GTK_TABLE (table2), hbox8, 1, 2, 3, 4,
220 (GtkAttachOptions) (GTK_FILL),
221 (GtkAttachOptions) (GTK_FILL), 0, 0);
223 crop_height_spinbutton_adj = gtk_adjustment_new (1, 0, 300, 1, 10, 1);
224 crop_height_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (crop_height_spinbutton_adj), 1, 0);
225 gtk_widget_set_name (crop_height_spinbutton, "crop_height_spinbutton");
226 gtk_widget_show (crop_height_spinbutton);
227 gtk_box_pack_start (GTK_BOX (hbox8), crop_height_spinbutton, FALSE, FALSE, 0);
229 vbox4 = gtk_vbox_new (FALSE, 6);
230 gtk_widget_set_name (vbox4, "vbox4");
231 gtk_widget_show (vbox4);
232 gtk_box_pack_start (GTK_BOX (vbox1), vbox4, FALSE, TRUE, 0);
234 label7 = gtk_label_new ("<b>Aspect ratio</b>");
235 gtk_widget_set_name (label7, "label7");
236 gtk_widget_show (label7);
237 gtk_box_pack_start (GTK_BOX (vbox4), label7, FALSE, FALSE, 0);
238 gtk_label_set_use_markup (GTK_LABEL (label7), TRUE);
239 gtk_misc_set_alignment (GTK_MISC (label7), 0, 0.5);
241 hbox3 = gtk_hbox_new (FALSE, 0);
242 gtk_widget_set_name (hbox3, "hbox3");
243 gtk_widget_show (hbox3);
244 gtk_box_pack_start (GTK_BOX (vbox4), hbox3, FALSE, FALSE, 0);
246 label8 = gtk_label_new (" ");
247 gtk_widget_set_name (label8, "label8");
248 gtk_widget_show (label8);
249 gtk_box_pack_start (GTK_BOX (hbox3), label8, FALSE, FALSE, 0);
251 table3 = gtk_table_new (2, 2, FALSE);
252 gtk_widget_set_name (table3, "table3");
253 gtk_widget_show (table3);
254 gtk_box_pack_start (GTK_BOX (hbox3), table3, TRUE, TRUE, 0);
255 gtk_table_set_row_spacings (GTK_TABLE (table3), 6);
256 gtk_table_set_col_spacings (GTK_TABLE (table3), 6);
258 hbox10 = gtk_hbox_new (FALSE, 6);
259 gtk_widget_set_name (hbox10, "hbox10");
260 gtk_widget_show (hbox10);
261 gtk_table_attach (GTK_TABLE (table3), hbox10, 0, 2, 1, 2,
262 (GtkAttachOptions) (GTK_FILL),
263 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
265 custom_ratio_box = gtk_hbox_new (FALSE, 6);
266 gtk_widget_set_name (custom_ratio_box, "custom_ratio_box");
267 gtk_widget_show (custom_ratio_box);
268 gtk_box_pack_start (GTK_BOX (hbox10), custom_ratio_box, TRUE, TRUE, 0);
270 ratio_w_spinbutton_adj = gtk_adjustment_new (1, 1, 9999, 1, 10, 10);
271 ratio_w_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (ratio_w_spinbutton_adj), 1, 0);
272 gtk_widget_set_name (ratio_w_spinbutton, "ratio_w_spinbutton");
273 gtk_widget_show (ratio_w_spinbutton);
274 gtk_box_pack_start (GTK_BOX (custom_ratio_box), ratio_w_spinbutton, FALSE, TRUE, 0);
276 ratio_swap_button = gtk_button_new ();
277 gtk_widget_set_name (ratio_swap_button, "ratio_swap_button");
278 gtk_widget_show (ratio_swap_button);
279 gtk_box_pack_start (GTK_BOX (custom_ratio_box), ratio_swap_button, FALSE, FALSE, 0);
280 gtk_button_set_relief (GTK_BUTTON (ratio_swap_button), GTK_RELIEF_NONE);
282 eventbox1 = gtk_event_box_new ();
283 gtk_widget_set_name (eventbox1, "eventbox1");
284 gtk_widget_show (eventbox1);
285 gtk_container_add (GTK_CONTAINER (ratio_swap_button), eventbox1);
287 ratio_swap_image = gtk_image_new_from_stock ("gtk-refresh", GTK_ICON_SIZE_BUTTON);
288 gtk_widget_set_name (ratio_swap_image, "ratio_swap_image");
289 gtk_widget_show (ratio_swap_image);
290 gtk_container_add (GTK_CONTAINER (eventbox1), ratio_swap_image);
292 ratio_h_spinbutton_adj = gtk_adjustment_new (1, 1, 9999, 1, 10, 10);
293 ratio_h_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (ratio_h_spinbutton_adj), 1, 0);
294 gtk_widget_set_name (ratio_h_spinbutton, "ratio_h_spinbutton");
295 gtk_widget_show (ratio_h_spinbutton);
296 gtk_box_pack_start (GTK_BOX (custom_ratio_box), ratio_h_spinbutton, FALSE, TRUE, 0);
297 gtk_spin_button_set_update_policy (GTK_SPIN_BUTTON (ratio_h_spinbutton), GTK_UPDATE_IF_VALID);
299 ratio_optionmenu = gtk_option_menu_new ();
300 gtk_widget_set_name (ratio_optionmenu, "ratio_optionmenu");
301 gtk_widget_show (ratio_optionmenu);
302 gtk_table_attach (GTK_TABLE (table3), ratio_optionmenu, 0, 2, 0, 1,
303 (GtkAttachOptions) (GTK_FILL),
304 (GtkAttachOptions) (0), 0, 0);
306 menu1 = gtk_menu_new ();
307 gtk_widget_set_name (menu1, "menu1");
309 none1 = gtk_menu_item_new_with_mnemonic ("None");
310 gtk_widget_set_name (none1, "none1");
311 gtk_widget_show (none1);
312 gtk_container_add (GTK_CONTAINER (menu1), none1);
314 square1 = gtk_menu_item_new_with_mnemonic ("Square");
315 gtk_widget_set_name (square1, "square1");
316 gtk_widget_show (square1);
317 gtk_container_add (GTK_CONTAINER (menu1), square1);
319 _4x3__book__dvd_1 = gtk_menu_item_new_with_mnemonic ("4 x 3 (Book, DVD)");
320 gtk_widget_set_name (_4x3__book__dvd_1, "_4x3__book__dvd_1");
321 gtk_widget_show (_4x3__book__dvd_1);
322 gtk_container_add (GTK_CONTAINER (menu1), _4x3__book__dvd_1);
324 _4x6__postcard_1 = gtk_menu_item_new_with_mnemonic ("4 x 6 (Postcard)");
325 gtk_widget_set_name (_4x6__postcard_1, "_4x6__postcard_1");
326 gtk_widget_show (_4x6__postcard_1);
327 gtk_container_add (GTK_CONTAINER (menu1), _4x6__postcard_1);
329 _5x1 = gtk_menu_item_new_with_mnemonic ("5 x 7");
330 gtk_widget_set_name (_5x1, "_5x1");
331 gtk_widget_show (_5x1);
332 gtk_container_add (GTK_CONTAINER (menu1), _5x1);
334 _8x1 = gtk_menu_item_new_with_mnemonic ("8 x 10");
335 gtk_widget_set_name (_8x1, "_8x1");
336 gtk_widget_show (_8x1);
337 gtk_container_add (GTK_CONTAINER (menu1), _8x1);
339 custom1 = gtk_menu_item_new_with_mnemonic ("Custom");
340 gtk_widget_set_name (custom1, "custom1");
341 gtk_widget_show (custom1);
342 gtk_container_add (GTK_CONTAINER (menu1), custom1);
344 gtk_option_menu_set_menu (GTK_OPTION_MENU (ratio_optionmenu), menu1);
346 vbox5 = gtk_vbox_new (FALSE, 0);
347 gtk_widget_set_name (vbox5, "vbox5");
348 gtk_widget_show (vbox5);
349 gtk_box_pack_start (GTK_BOX (hbox1), vbox5, TRUE, TRUE, 0);
351 frame1 = gtk_frame_new (NULL);
352 gtk_widget_set_name (frame1, "frame1");
353 gtk_widget_show (frame1);
354 gtk_box_pack_start (GTK_BOX (vbox5), frame1, TRUE, TRUE, 0);
355 gtk_frame_set_shadow_type (GTK_FRAME (frame1), GTK_SHADOW_NONE);
357 vbox7 = gtk_vbox_new (FALSE, 6);
358 gtk_widget_set_name (vbox7, "vbox7");
359 gtk_widget_show (vbox7);
360 gtk_container_add (GTK_CONTAINER (frame1), vbox7);
362 nav_container = gtk_hbox_new (FALSE, 0);
363 gtk_widget_set_name (nav_container, "nav_container");
364 gtk_widget_show (nav_container);
365 gtk_box_pack_start (GTK_BOX (vbox7), nav_container, TRUE, TRUE, 0);
367 hbox16 = gtk_hbox_new (FALSE, 6);
368 gtk_widget_set_name (hbox16, "hbox16");
369 gtk_widget_show (hbox16);
370 gtk_box_pack_start (GTK_BOX (vbox7), hbox16, FALSE, TRUE, 0);
372 hbox17 = gtk_hbox_new (FALSE, 0);
373 gtk_widget_set_name (hbox17, "hbox17");
374 gtk_widget_show (hbox17);
375 gtk_box_pack_end (GTK_BOX (hbox16), hbox17, FALSE, TRUE, 0);
377 crop_zoom_in_button = gtk_button_new ();
378 gtk_widget_set_name (crop_zoom_in_button, "crop_zoom_in_button");
379 gtk_widget_show (crop_zoom_in_button);
380 gtk_box_pack_start (GTK_BOX (hbox17), crop_zoom_in_button, FALSE, FALSE, 0);
381 gtk_button_set_relief (GTK_BUTTON (crop_zoom_in_button), GTK_RELIEF_NONE);
383 image2 = gtk_image_new_from_stock ("gtk-zoom-in", GTK_ICON_SIZE_BUTTON);
384 gtk_widget_set_name (image2, "image2");
385 gtk_widget_show (image2);
386 gtk_container_add (GTK_CONTAINER (crop_zoom_in_button), image2);
388 crop_zoom_out_button = gtk_button_new ();
389 gtk_widget_set_name (crop_zoom_out_button, "crop_zoom_out_button");
390 gtk_widget_show (crop_zoom_out_button);
391 gtk_box_pack_start (GTK_BOX (hbox17), crop_zoom_out_button, FALSE, FALSE, 0);
392 gtk_button_set_relief (GTK_BUTTON (crop_zoom_out_button), GTK_RELIEF_NONE);
394 image4 = gtk_image_new_from_stock ("gtk-zoom-out", GTK_ICON_SIZE_BUTTON);
395 gtk_widget_set_name (image4, "image4");
396 gtk_widget_show (image4);
397 gtk_container_add (GTK_CONTAINER (crop_zoom_out_button), image4);
399 crop_zoom_100_button = gtk_button_new ();
400 gtk_widget_set_name (crop_zoom_100_button, "crop_zoom_100_button");
401 gtk_widget_show (crop_zoom_100_button);
402 gtk_box_pack_start (GTK_BOX (hbox17), crop_zoom_100_button, FALSE, FALSE, 0);
403 gtk_button_set_relief (GTK_BUTTON (crop_zoom_100_button), GTK_RELIEF_NONE);
405 image3 = gtk_image_new_from_stock ("gtk-zoom-100", GTK_ICON_SIZE_BUTTON);
406 gtk_widget_set_name (image3, "image3");
407 gtk_widget_show (image3);
408 gtk_container_add (GTK_CONTAINER (crop_zoom_100_button), image3);
410 crop_zoom_fit_button = gtk_button_new ();
411 gtk_widget_set_name (crop_zoom_fit_button, "crop_zoom_fit_button");
412 gtk_widget_show (crop_zoom_fit_button);
413 gtk_box_pack_start (GTK_BOX (hbox17), crop_zoom_fit_button, FALSE, FALSE, 0);
414 gtk_button_set_relief (GTK_BUTTON (crop_zoom_fit_button), GTK_RELIEF_NONE);
416 image1 = gtk_image_new_from_stock ("gtk-zoom-fit", GTK_ICON_SIZE_BUTTON);
417 gtk_widget_set_name (image1, "image1");
418 gtk_widget_show (image1);
419 gtk_container_add (GTK_CONTAINER (crop_zoom_fit_button), image1);
421 g_signal_connect ((gpointer) cropper_window, "delete_event",
422 G_CALLBACK (on_cropper_window_delete_event),
423 NULL);
424 g_signal_connect ((gpointer) cropper_window, "destroy",
425 G_CALLBACK (on_cropper_window_destroy),
426 NULL);
427 g_signal_connect ((gpointer) ratio_w_spinbutton, "value_changed",
428 G_CALLBACK (on_ratio_w_spinbutton_value_changed),
429 NULL);
430 g_signal_connect ((gpointer) ratio_w_spinbutton, "change_value",
431 G_CALLBACK (on_ratio_w_spinbutton_change_value),
432 NULL);
433 g_signal_connect ((gpointer) ratio_swap_button, "clicked",
434 G_CALLBACK (on_ratio_swap_button_clicked),
435 NULL);
436 g_signal_connect ((gpointer) ratio_h_spinbutton, "change_value",
437 G_CALLBACK (on_ratio_h_spinbutton_change_value),
438 NULL);
439 g_signal_connect ((gpointer) ratio_h_spinbutton, "value_changed",
440 G_CALLBACK (on_ratio_h_spinbutton_value_changed),
441 NULL);
442 g_signal_connect ((gpointer) none1, "activate",
443 G_CALLBACK (on_none1_activate),
444 NULL);
445 g_signal_connect ((gpointer) square1, "activate",
446 G_CALLBACK (on_square1_activate),
447 NULL);
448 g_signal_connect ((gpointer) _4x3__book__dvd_1, "activate",
449 G_CALLBACK (on_4x3__book__dvd_1_activate),
450 NULL);
451 g_signal_connect ((gpointer) _4x6__postcard_1, "activate",
452 G_CALLBACK (on_4x6__postcard_1_activate),
453 NULL);
454 g_signal_connect ((gpointer) _5x1, "activate",
455 G_CALLBACK (on_5x1_activate),
456 NULL);
457 g_signal_connect ((gpointer) _8x1, "activate",
458 G_CALLBACK (on_8x1_activate),
459 NULL);
460 g_signal_connect ((gpointer) custom1, "activate",
461 G_CALLBACK (on_custom1_activate),
462 NULL);
464 /* Store pointers to all widgets, for use by lookup_widget(). */
465 GLADE_HOOKUP_OBJECT_NO_REF (cropper_window, cropper_window, "cropper_window");
466 GLADE_HOOKUP_OBJECT (cropper_window, dialog_vbox1, "dialog_vbox1");
467 GLADE_HOOKUP_OBJECT (cropper_window, hbox1, "hbox1");
468 GLADE_HOOKUP_OBJECT (cropper_window, vbox1, "vbox1");
469 GLADE_HOOKUP_OBJECT (cropper_window, vbox2, "vbox2");
470 GLADE_HOOKUP_OBJECT (cropper_window, label1, "label1");
471 GLADE_HOOKUP_OBJECT (cropper_window, hbox2, "hbox2");
472 GLADE_HOOKUP_OBJECT (cropper_window, label2, "label2");
473 GLADE_HOOKUP_OBJECT (cropper_window, table2, "table2");
474 GLADE_HOOKUP_OBJECT (cropper_window, label3, "label3");
475 GLADE_HOOKUP_OBJECT (cropper_window, label5, "label5");
476 GLADE_HOOKUP_OBJECT (cropper_window, label4, "label4");
477 GLADE_HOOKUP_OBJECT (cropper_window, label6, "label6");
478 GLADE_HOOKUP_OBJECT (cropper_window, hbox5, "hbox5");
479 GLADE_HOOKUP_OBJECT (cropper_window, crop_x_spinbutton, "crop_x_spinbutton");
480 GLADE_HOOKUP_OBJECT (cropper_window, hbox6, "hbox6");
481 GLADE_HOOKUP_OBJECT (cropper_window, crop_y_spinbutton, "crop_y_spinbutton");
482 GLADE_HOOKUP_OBJECT (cropper_window, hbox7, "hbox7");
483 GLADE_HOOKUP_OBJECT (cropper_window, crop_width_spinbutton, "crop_width_spinbutton");
484 GLADE_HOOKUP_OBJECT (cropper_window, hbox8, "hbox8");
485 GLADE_HOOKUP_OBJECT (cropper_window, crop_height_spinbutton, "crop_height_spinbutton");
486 GLADE_HOOKUP_OBJECT (cropper_window, vbox4, "vbox4");
487 GLADE_HOOKUP_OBJECT (cropper_window, label7, "label7");
488 GLADE_HOOKUP_OBJECT (cropper_window, hbox3, "hbox3");
489 GLADE_HOOKUP_OBJECT (cropper_window, label8, "label8");
490 GLADE_HOOKUP_OBJECT (cropper_window, table3, "table3");
491 GLADE_HOOKUP_OBJECT (cropper_window, hbox10, "hbox10");
492 GLADE_HOOKUP_OBJECT (cropper_window, custom_ratio_box, "custom_ratio_box");
493 GLADE_HOOKUP_OBJECT (cropper_window, ratio_w_spinbutton, "ratio_w_spinbutton");
494 GLADE_HOOKUP_OBJECT (cropper_window, ratio_swap_button, "ratio_swap_button");
495 GLADE_HOOKUP_OBJECT (cropper_window, eventbox1, "eventbox1");
496 GLADE_HOOKUP_OBJECT (cropper_window, ratio_swap_image, "ratio_swap_image");
497 GLADE_HOOKUP_OBJECT (cropper_window, ratio_h_spinbutton, "ratio_h_spinbutton");
498 GLADE_HOOKUP_OBJECT (cropper_window, ratio_optionmenu, "ratio_optionmenu");
499 GLADE_HOOKUP_OBJECT (cropper_window, menu1, "menu1");
500 GLADE_HOOKUP_OBJECT (cropper_window, none1, "none1");
501 GLADE_HOOKUP_OBJECT (cropper_window, square1, "square1");
502 GLADE_HOOKUP_OBJECT (cropper_window, _4x3__book__dvd_1, "_4x3__book__dvd_1");
503 GLADE_HOOKUP_OBJECT (cropper_window, _4x6__postcard_1, "_4x6__postcard_1");
504 GLADE_HOOKUP_OBJECT (cropper_window, _5x1, "_5x1");
505 GLADE_HOOKUP_OBJECT (cropper_window, _8x1, "_8x1");
506 GLADE_HOOKUP_OBJECT (cropper_window, custom1, "custom1");
507 GLADE_HOOKUP_OBJECT (cropper_window, vbox5, "vbox5");
508 GLADE_HOOKUP_OBJECT (cropper_window, frame1, "frame1");
509 GLADE_HOOKUP_OBJECT (cropper_window, vbox7, "vbox7");
510 GLADE_HOOKUP_OBJECT (cropper_window, nav_container, "nav_container");
511 GLADE_HOOKUP_OBJECT (cropper_window, hbox16, "hbox16");
512 GLADE_HOOKUP_OBJECT (cropper_window, hbox17, "hbox17");
513 GLADE_HOOKUP_OBJECT (cropper_window, crop_zoom_in_button, "crop_zoom_in_button");
514 GLADE_HOOKUP_OBJECT (cropper_window, image2, "image2");
515 GLADE_HOOKUP_OBJECT (cropper_window, crop_zoom_out_button, "crop_zoom_out_button");
516 GLADE_HOOKUP_OBJECT (cropper_window, image4, "image4");
517 GLADE_HOOKUP_OBJECT (cropper_window, crop_zoom_100_button, "crop_zoom_100_button");
518 GLADE_HOOKUP_OBJECT (cropper_window, image3, "image3");
519 GLADE_HOOKUP_OBJECT (cropper_window, crop_zoom_fit_button, "crop_zoom_fit_button");
520 GLADE_HOOKUP_OBJECT (cropper_window, image1, "image1");
522 return cropper_window;
523 }