cropper

view interface.c @ 1:80535e4deaa4

nicer code formating
author meillo@marmaro.de
date Tue, 04 Dec 2007 20:23:25 +0100
parents ca9155129253
children e359bea4c8ac
line source
1 #include <sys/types.h>
2 #include <sys/stat.h>
3 #include <unistd.h>
4 #include <string.h>
5 #include <stdio.h>
7 #include <gdk/gdkkeysyms.h>
8 #include <gtk/gtk.h>
10 #include "callbacks.h"
11 #include "interface.h"
12 #include "support.h"
14 #define GLADE_HOOKUP_OBJECT(component,widget,name) \
15 g_object_set_data_full (G_OBJECT (component), name, \
16 gtk_widget_ref (widget), (GDestroyNotify) gtk_widget_unref)
18 #define GLADE_HOOKUP_OBJECT_NO_REF(component,widget,name) \
19 g_object_set_data (G_OBJECT (component), name, widget)
21 GtkWidget*
22 create_cropper_window (void)
23 {
24 GtkWidget *cropper_window;
25 GtkWidget *dialog_vbox1;
26 GtkWidget *hbox1;
27 GtkWidget *vbox1;
28 GtkWidget *vbox2;
29 GtkWidget *label1;
30 GtkWidget *hbox2;
31 GtkWidget *label2;
32 GtkWidget *table2;
33 GtkWidget *label3;
34 GtkWidget *label5;
35 GtkWidget *label4;
36 GtkWidget *label6;
37 GtkWidget *hbox5;
38 GtkObject *crop_x_spinbutton_adj;
39 GtkWidget *crop_x_spinbutton;
40 GtkWidget *hbox6;
41 GtkObject *crop_y_spinbutton_adj;
42 GtkWidget *crop_y_spinbutton;
43 GtkWidget *hbox7;
44 GtkObject *crop_width_spinbutton_adj;
45 GtkWidget *crop_width_spinbutton;
46 GtkWidget *hbox8;
47 GtkObject *crop_height_spinbutton_adj;
48 GtkWidget *crop_height_spinbutton;
49 GtkWidget *vbox4;
50 GtkWidget *label7;
51 GtkWidget *hbox3;
52 GtkWidget *label8;
53 GtkWidget *table3;
54 GtkWidget *hbox10;
55 GtkWidget *custom_ratio_box;
56 GtkObject *ratio_w_spinbutton_adj;
57 GtkWidget *ratio_w_spinbutton;
58 GtkWidget *ratio_swap_button;
59 GtkWidget *eventbox1;
60 GtkWidget *ratio_swap_image;
61 GtkObject *ratio_h_spinbutton_adj;
62 GtkWidget *ratio_h_spinbutton;
63 GtkWidget *ratio_optionmenu;
64 GtkWidget *menu1;
65 GtkWidget *none1;
66 GtkWidget *square1;
67 GtkWidget *_4x3__book__dvd_1;
68 GtkWidget *_4x6__postcard_1;
69 GtkWidget *_5x1;
70 GtkWidget *_8x1;
71 GtkWidget *custom1;
72 GtkWidget *vbox5;
73 GtkWidget *frame1;
74 GtkWidget *vbox7;
75 GtkWidget *nav_container;
76 GtkWidget *hbox16;
77 GtkWidget *hbox17;
78 GtkWidget *crop_zoom_in_button;
79 GtkWidget *image2;
80 GtkWidget *crop_zoom_out_button;
81 GtkWidget *image4;
82 GtkWidget *crop_zoom_100_button;
83 GtkWidget *image3;
84 GtkWidget *crop_zoom_fit_button;
85 GtkWidget *image1;
87 cropper_window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
88 gtk_widget_set_name (cropper_window, "cropper_window");
89 gtk_container_set_border_width (GTK_CONTAINER (cropper_window), 6);
90 gtk_window_set_title (GTK_WINDOW (cropper_window), "Cropper");
92 dialog_vbox1 = gtk_vbox_new (FALSE, 6);
93 gtk_widget_set_name (dialog_vbox1, "dialog_vbox1");
94 gtk_widget_show (dialog_vbox1);
95 gtk_container_add (GTK_CONTAINER (cropper_window), dialog_vbox1);
97 hbox1 = gtk_hbox_new (FALSE, 12);
98 gtk_widget_set_name (hbox1, "hbox1");
99 gtk_widget_show (hbox1);
100 gtk_box_pack_start (GTK_BOX (dialog_vbox1), hbox1, TRUE, TRUE, 0);
101 gtk_container_set_border_width (GTK_CONTAINER (hbox1), 5);
103 vbox1 = gtk_vbox_new (FALSE, 12);
104 gtk_widget_set_name (vbox1, "vbox1");
105 gtk_widget_show (vbox1);
106 gtk_box_pack_start (GTK_BOX (hbox1), vbox1, FALSE, TRUE, 0);
108 vbox2 = gtk_vbox_new (FALSE, 6);
109 gtk_widget_set_name (vbox2, "vbox2");
110 gtk_widget_show (vbox2);
111 gtk_box_pack_start (GTK_BOX (vbox1), vbox2, FALSE, TRUE, 0);
113 label1 = gtk_label_new ("<b>Selection</b>");
114 gtk_widget_set_name (label1, "label1");
115 gtk_widget_show (label1);
116 gtk_box_pack_start (GTK_BOX (vbox2), label1, FALSE, FALSE, 0);
117 gtk_label_set_use_markup (GTK_LABEL (label1), TRUE);
118 gtk_misc_set_alignment (GTK_MISC (label1), 0, 0.5);
120 hbox2 = gtk_hbox_new (FALSE, 0);
121 gtk_widget_set_name (hbox2, "hbox2");
122 gtk_widget_show (hbox2);
123 gtk_box_pack_start (GTK_BOX (vbox2), hbox2, FALSE, TRUE, 0);
125 label2 = gtk_label_new (" ");
126 gtk_widget_set_name (label2, "label2");
127 gtk_widget_show (label2);
128 gtk_box_pack_start (GTK_BOX (hbox2), label2, FALSE, FALSE, 0);
130 table2 = gtk_table_new (4, 2, FALSE);
131 gtk_widget_set_name (table2, "table2");
132 gtk_widget_show (table2);
133 gtk_box_pack_start (GTK_BOX (hbox2), table2, TRUE, TRUE, 0);
134 gtk_table_set_row_spacings (GTK_TABLE (table2), 6);
135 gtk_table_set_col_spacings (GTK_TABLE (table2), 6);
137 label3 = gtk_label_new_with_mnemonic ("_X:");
138 gtk_widget_set_name (label3, "label3");
139 gtk_widget_show (label3);
140 gtk_table_attach (GTK_TABLE (table2), label3, 0, 1, 0, 1,
141 (GtkAttachOptions) (GTK_FILL),
142 (GtkAttachOptions) (0), 0, 0);
143 gtk_misc_set_alignment (GTK_MISC (label3), 0, 0.5);
145 label5 = gtk_label_new_with_mnemonic ("_Y:");
146 gtk_widget_set_name (label5, "label5");
147 gtk_widget_show (label5);
148 gtk_table_attach (GTK_TABLE (table2), label5, 0, 1, 1, 2,
149 (GtkAttachOptions) (GTK_FILL),
150 (GtkAttachOptions) (0), 0, 0);
151 gtk_misc_set_alignment (GTK_MISC (label5), 0, 0.5);
153 label4 = gtk_label_new_with_mnemonic ("_Width:");
154 gtk_widget_set_name (label4, "label4");
155 gtk_widget_show (label4);
156 gtk_table_attach (GTK_TABLE (table2), label4, 0, 1, 2, 3,
157 (GtkAttachOptions) (GTK_FILL),
158 (GtkAttachOptions) (0), 0, 0);
159 gtk_misc_set_alignment (GTK_MISC (label4), 0, 0.5);
161 label6 = gtk_label_new_with_mnemonic ("_Height:");
162 gtk_widget_set_name (label6, "label6");
163 gtk_widget_show (label6);
164 gtk_table_attach (GTK_TABLE (table2), label6, 0, 1, 3, 4,
165 (GtkAttachOptions) (GTK_FILL),
166 (GtkAttachOptions) (0), 0, 0);
167 gtk_misc_set_alignment (GTK_MISC (label6), 0, 0.5);
169 hbox5 = gtk_hbox_new (FALSE, 0);
170 gtk_widget_set_name (hbox5, "hbox5");
171 gtk_widget_show (hbox5);
172 gtk_table_attach (GTK_TABLE (table2), hbox5, 1, 2, 0, 1,
173 (GtkAttachOptions) (GTK_FILL),
174 (GtkAttachOptions) (GTK_FILL), 0, 0);
176 crop_x_spinbutton_adj = gtk_adjustment_new (1, 0, 300, 1, 10, 1);
177 crop_x_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (crop_x_spinbutton_adj), 1, 0);
178 gtk_widget_set_name (crop_x_spinbutton, "crop_x_spinbutton");
179 gtk_widget_show (crop_x_spinbutton);
180 gtk_box_pack_start (GTK_BOX (hbox5), crop_x_spinbutton, FALSE, TRUE, 0);
182 hbox6 = gtk_hbox_new (FALSE, 0);
183 gtk_widget_set_name (hbox6, "hbox6");
184 gtk_widget_show (hbox6);
185 gtk_table_attach (GTK_TABLE (table2), hbox6, 1, 2, 1, 2,
186 (GtkAttachOptions) (GTK_FILL),
187 (GtkAttachOptions) (GTK_FILL), 0, 0);
189 crop_y_spinbutton_adj = gtk_adjustment_new (1, 0, 300, 1, 10, 1);
190 crop_y_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (crop_y_spinbutton_adj), 1, 0);
191 gtk_widget_set_name (crop_y_spinbutton, "crop_y_spinbutton");
192 gtk_widget_show (crop_y_spinbutton);
193 gtk_box_pack_start (GTK_BOX (hbox6), crop_y_spinbutton, FALSE, TRUE, 0);
195 hbox7 = gtk_hbox_new (FALSE, 0);
196 gtk_widget_set_name (hbox7, "hbox7");
197 gtk_widget_show (hbox7);
198 gtk_table_attach (GTK_TABLE (table2), hbox7, 1, 2, 2, 3,
199 (GtkAttachOptions) (GTK_FILL),
200 (GtkAttachOptions) (GTK_FILL), 0, 0);
202 crop_width_spinbutton_adj = gtk_adjustment_new (1, 0, 300, 1, 10, 1);
203 crop_width_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (crop_width_spinbutton_adj), 1, 0);
204 gtk_widget_set_name (crop_width_spinbutton, "crop_width_spinbutton");
205 gtk_widget_show (crop_width_spinbutton);
206 gtk_box_pack_start (GTK_BOX (hbox7), crop_width_spinbutton, FALSE, FALSE, 0);
208 hbox8 = gtk_hbox_new (FALSE, 0);
209 gtk_widget_set_name (hbox8, "hbox8");
210 gtk_widget_show (hbox8);
211 gtk_table_attach (GTK_TABLE (table2), hbox8, 1, 2, 3, 4,
212 (GtkAttachOptions) (GTK_FILL),
213 (GtkAttachOptions) (GTK_FILL), 0, 0);
215 crop_height_spinbutton_adj = gtk_adjustment_new (1, 0, 300, 1, 10, 1);
216 crop_height_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (crop_height_spinbutton_adj), 1, 0);
217 gtk_widget_set_name (crop_height_spinbutton, "crop_height_spinbutton");
218 gtk_widget_show (crop_height_spinbutton);
219 gtk_box_pack_start (GTK_BOX (hbox8), crop_height_spinbutton, FALSE, FALSE, 0);
221 vbox4 = gtk_vbox_new (FALSE, 6);
222 gtk_widget_set_name (vbox4, "vbox4");
223 gtk_widget_show (vbox4);
224 gtk_box_pack_start (GTK_BOX (vbox1), vbox4, FALSE, TRUE, 0);
226 label7 = gtk_label_new ("<b>Aspect ratio</b>");
227 gtk_widget_set_name (label7, "label7");
228 gtk_widget_show (label7);
229 gtk_box_pack_start (GTK_BOX (vbox4), label7, FALSE, FALSE, 0);
230 gtk_label_set_use_markup (GTK_LABEL (label7), TRUE);
231 gtk_misc_set_alignment (GTK_MISC (label7), 0, 0.5);
233 hbox3 = gtk_hbox_new (FALSE, 0);
234 gtk_widget_set_name (hbox3, "hbox3");
235 gtk_widget_show (hbox3);
236 gtk_box_pack_start (GTK_BOX (vbox4), hbox3, FALSE, FALSE, 0);
238 label8 = gtk_label_new (" ");
239 gtk_widget_set_name (label8, "label8");
240 gtk_widget_show (label8);
241 gtk_box_pack_start (GTK_BOX (hbox3), label8, FALSE, FALSE, 0);
243 table3 = gtk_table_new (2, 2, FALSE);
244 gtk_widget_set_name (table3, "table3");
245 gtk_widget_show (table3);
246 gtk_box_pack_start (GTK_BOX (hbox3), table3, TRUE, TRUE, 0);
247 gtk_table_set_row_spacings (GTK_TABLE (table3), 6);
248 gtk_table_set_col_spacings (GTK_TABLE (table3), 6);
250 hbox10 = gtk_hbox_new (FALSE, 6);
251 gtk_widget_set_name (hbox10, "hbox10");
252 gtk_widget_show (hbox10);
253 gtk_table_attach (GTK_TABLE (table3), hbox10, 0, 2, 1, 2,
254 (GtkAttachOptions) (GTK_FILL),
255 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
257 custom_ratio_box = gtk_hbox_new (FALSE, 6);
258 gtk_widget_set_name (custom_ratio_box, "custom_ratio_box");
259 gtk_widget_show (custom_ratio_box);
260 gtk_box_pack_start (GTK_BOX (hbox10), custom_ratio_box, TRUE, TRUE, 0);
262 ratio_w_spinbutton_adj = gtk_adjustment_new (1, 1, 9999, 1, 10, 10);
263 ratio_w_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (ratio_w_spinbutton_adj), 1, 0);
264 gtk_widget_set_name (ratio_w_spinbutton, "ratio_w_spinbutton");
265 gtk_widget_show (ratio_w_spinbutton);
266 gtk_box_pack_start (GTK_BOX (custom_ratio_box), ratio_w_spinbutton, FALSE, TRUE, 0);
268 ratio_swap_button = gtk_button_new ();
269 gtk_widget_set_name (ratio_swap_button, "ratio_swap_button");
270 gtk_widget_show (ratio_swap_button);
271 gtk_box_pack_start (GTK_BOX (custom_ratio_box), ratio_swap_button, FALSE, FALSE, 0);
272 gtk_button_set_relief (GTK_BUTTON (ratio_swap_button), GTK_RELIEF_NONE);
274 eventbox1 = gtk_event_box_new ();
275 gtk_widget_set_name (eventbox1, "eventbox1");
276 gtk_widget_show (eventbox1);
277 gtk_container_add (GTK_CONTAINER (ratio_swap_button), eventbox1);
279 ratio_swap_image = gtk_image_new_from_stock ("gtk-refresh", GTK_ICON_SIZE_BUTTON);
280 gtk_widget_set_name (ratio_swap_image, "ratio_swap_image");
281 gtk_widget_show (ratio_swap_image);
282 gtk_container_add (GTK_CONTAINER (eventbox1), ratio_swap_image);
284 ratio_h_spinbutton_adj = gtk_adjustment_new (1, 1, 9999, 1, 10, 10);
285 ratio_h_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (ratio_h_spinbutton_adj), 1, 0);
286 gtk_widget_set_name (ratio_h_spinbutton, "ratio_h_spinbutton");
287 gtk_widget_show (ratio_h_spinbutton);
288 gtk_box_pack_start (GTK_BOX (custom_ratio_box), ratio_h_spinbutton, FALSE, TRUE, 0);
289 gtk_spin_button_set_update_policy (GTK_SPIN_BUTTON (ratio_h_spinbutton), GTK_UPDATE_IF_VALID);
291 ratio_optionmenu = gtk_option_menu_new ();
292 gtk_widget_set_name (ratio_optionmenu, "ratio_optionmenu");
293 gtk_widget_show (ratio_optionmenu);
294 gtk_table_attach (GTK_TABLE (table3), ratio_optionmenu, 0, 2, 0, 1,
295 (GtkAttachOptions) (GTK_FILL),
296 (GtkAttachOptions) (0), 0, 0);
298 menu1 = gtk_menu_new ();
299 gtk_widget_set_name (menu1, "menu1");
301 none1 = gtk_menu_item_new_with_mnemonic ("None");
302 gtk_widget_set_name (none1, "none1");
303 gtk_widget_show (none1);
304 gtk_container_add (GTK_CONTAINER (menu1), none1);
306 square1 = gtk_menu_item_new_with_mnemonic ("Square");
307 gtk_widget_set_name (square1, "square1");
308 gtk_widget_show (square1);
309 gtk_container_add (GTK_CONTAINER (menu1), square1);
311 _4x3__book__dvd_1 = gtk_menu_item_new_with_mnemonic ("4 x 3 (Book, DVD)");
312 gtk_widget_set_name (_4x3__book__dvd_1, "_4x3__book__dvd_1");
313 gtk_widget_show (_4x3__book__dvd_1);
314 gtk_container_add (GTK_CONTAINER (menu1), _4x3__book__dvd_1);
316 _4x6__postcard_1 = gtk_menu_item_new_with_mnemonic ("4 x 6 (Postcard)");
317 gtk_widget_set_name (_4x6__postcard_1, "_4x6__postcard_1");
318 gtk_widget_show (_4x6__postcard_1);
319 gtk_container_add (GTK_CONTAINER (menu1), _4x6__postcard_1);
321 _5x1 = gtk_menu_item_new_with_mnemonic ("5 x 7");
322 gtk_widget_set_name (_5x1, "_5x1");
323 gtk_widget_show (_5x1);
324 gtk_container_add (GTK_CONTAINER (menu1), _5x1);
326 _8x1 = gtk_menu_item_new_with_mnemonic ("8 x 10");
327 gtk_widget_set_name (_8x1, "_8x1");
328 gtk_widget_show (_8x1);
329 gtk_container_add (GTK_CONTAINER (menu1), _8x1);
331 custom1 = gtk_menu_item_new_with_mnemonic ("Custom");
332 gtk_widget_set_name (custom1, "custom1");
333 gtk_widget_show (custom1);
334 gtk_container_add (GTK_CONTAINER (menu1), custom1);
336 gtk_option_menu_set_menu (GTK_OPTION_MENU (ratio_optionmenu), menu1);
338 vbox5 = gtk_vbox_new (FALSE, 0);
339 gtk_widget_set_name (vbox5, "vbox5");
340 gtk_widget_show (vbox5);
341 gtk_box_pack_start (GTK_BOX (hbox1), vbox5, TRUE, TRUE, 0);
343 frame1 = gtk_frame_new (NULL);
344 gtk_widget_set_name (frame1, "frame1");
345 gtk_widget_show (frame1);
346 gtk_box_pack_start (GTK_BOX (vbox5), frame1, TRUE, TRUE, 0);
347 gtk_frame_set_shadow_type (GTK_FRAME (frame1), GTK_SHADOW_NONE);
349 vbox7 = gtk_vbox_new (FALSE, 6);
350 gtk_widget_set_name (vbox7, "vbox7");
351 gtk_widget_show (vbox7);
352 gtk_container_add (GTK_CONTAINER (frame1), vbox7);
354 nav_container = gtk_hbox_new (FALSE, 0);
355 gtk_widget_set_name (nav_container, "nav_container");
356 gtk_widget_show (nav_container);
357 gtk_box_pack_start (GTK_BOX (vbox7), nav_container, TRUE, TRUE, 0);
359 hbox16 = gtk_hbox_new (FALSE, 6);
360 gtk_widget_set_name (hbox16, "hbox16");
361 gtk_widget_show (hbox16);
362 gtk_box_pack_start (GTK_BOX (vbox7), hbox16, FALSE, TRUE, 0);
364 hbox17 = gtk_hbox_new (FALSE, 0);
365 gtk_widget_set_name (hbox17, "hbox17");
366 gtk_widget_show (hbox17);
367 gtk_box_pack_end (GTK_BOX (hbox16), hbox17, FALSE, TRUE, 0);
369 crop_zoom_in_button = gtk_button_new ();
370 gtk_widget_set_name (crop_zoom_in_button, "crop_zoom_in_button");
371 gtk_widget_show (crop_zoom_in_button);
372 gtk_box_pack_start (GTK_BOX (hbox17), crop_zoom_in_button, FALSE, FALSE, 0);
373 gtk_button_set_relief (GTK_BUTTON (crop_zoom_in_button), GTK_RELIEF_NONE);
375 image2 = gtk_image_new_from_stock ("gtk-zoom-in", GTK_ICON_SIZE_BUTTON);
376 gtk_widget_set_name (image2, "image2");
377 gtk_widget_show (image2);
378 gtk_container_add (GTK_CONTAINER (crop_zoom_in_button), image2);
380 crop_zoom_out_button = gtk_button_new ();
381 gtk_widget_set_name (crop_zoom_out_button, "crop_zoom_out_button");
382 gtk_widget_show (crop_zoom_out_button);
383 gtk_box_pack_start (GTK_BOX (hbox17), crop_zoom_out_button, FALSE, FALSE, 0);
384 gtk_button_set_relief (GTK_BUTTON (crop_zoom_out_button), GTK_RELIEF_NONE);
386 image4 = gtk_image_new_from_stock ("gtk-zoom-out", GTK_ICON_SIZE_BUTTON);
387 gtk_widget_set_name (image4, "image4");
388 gtk_widget_show (image4);
389 gtk_container_add (GTK_CONTAINER (crop_zoom_out_button), image4);
391 crop_zoom_100_button = gtk_button_new ();
392 gtk_widget_set_name (crop_zoom_100_button, "crop_zoom_100_button");
393 gtk_widget_show (crop_zoom_100_button);
394 gtk_box_pack_start (GTK_BOX (hbox17), crop_zoom_100_button, FALSE, FALSE, 0);
395 gtk_button_set_relief (GTK_BUTTON (crop_zoom_100_button), GTK_RELIEF_NONE);
397 image3 = gtk_image_new_from_stock ("gtk-zoom-100", GTK_ICON_SIZE_BUTTON);
398 gtk_widget_set_name (image3, "image3");
399 gtk_widget_show (image3);
400 gtk_container_add (GTK_CONTAINER (crop_zoom_100_button), image3);
402 crop_zoom_fit_button = gtk_button_new ();
403 gtk_widget_set_name (crop_zoom_fit_button, "crop_zoom_fit_button");
404 gtk_widget_show (crop_zoom_fit_button);
405 gtk_box_pack_start (GTK_BOX (hbox17), crop_zoom_fit_button, FALSE, FALSE, 0);
406 gtk_button_set_relief (GTK_BUTTON (crop_zoom_fit_button), GTK_RELIEF_NONE);
408 image1 = gtk_image_new_from_stock ("gtk-zoom-fit", GTK_ICON_SIZE_BUTTON);
409 gtk_widget_set_name (image1, "image1");
410 gtk_widget_show (image1);
411 gtk_container_add (GTK_CONTAINER (crop_zoom_fit_button), image1);
414 g_signal_connect ((gpointer) cropper_window, "delete_event",
415 G_CALLBACK (on_cropper_window_delete_event),
416 NULL);
417 g_signal_connect ((gpointer) cropper_window, "destroy",
418 G_CALLBACK (on_cropper_window_destroy),
419 NULL);
420 g_signal_connect ((gpointer) ratio_w_spinbutton, "value_changed",
421 G_CALLBACK (on_ratio_w_spinbutton_value_changed),
422 NULL);
423 g_signal_connect ((gpointer) ratio_w_spinbutton, "change_value",
424 G_CALLBACK (on_ratio_w_spinbutton_change_value),
425 NULL);
426 g_signal_connect ((gpointer) ratio_swap_button, "clicked",
427 G_CALLBACK (on_ratio_swap_button_clicked),
428 NULL);
429 g_signal_connect ((gpointer) ratio_h_spinbutton, "change_value",
430 G_CALLBACK (on_ratio_h_spinbutton_change_value),
431 NULL);
432 g_signal_connect ((gpointer) ratio_h_spinbutton, "value_changed",
433 G_CALLBACK (on_ratio_h_spinbutton_value_changed),
434 NULL);
435 g_signal_connect ((gpointer) none1, "activate",
436 G_CALLBACK (on_none1_activate),
437 NULL);
438 g_signal_connect ((gpointer) square1, "activate",
439 G_CALLBACK (on_square1_activate),
440 NULL);
441 g_signal_connect ((gpointer) _4x3__book__dvd_1, "activate",
442 G_CALLBACK (on_4x3__book__dvd_1_activate),
443 NULL);
444 g_signal_connect ((gpointer) _4x6__postcard_1, "activate",
445 G_CALLBACK (on_4x6__postcard_1_activate),
446 NULL);
447 g_signal_connect ((gpointer) _5x1, "activate",
448 G_CALLBACK (on_5x1_activate),
449 NULL);
450 g_signal_connect ((gpointer) _8x1, "activate",
451 G_CALLBACK (on_8x1_activate),
452 NULL);
453 g_signal_connect ((gpointer) custom1, "activate",
454 G_CALLBACK (on_custom1_activate),
455 NULL);
457 /* Store pointers to all widgets, for use by lookup_widget(). */
458 GLADE_HOOKUP_OBJECT_NO_REF (cropper_window, cropper_window, "cropper_window");
459 GLADE_HOOKUP_OBJECT (cropper_window, dialog_vbox1, "dialog_vbox1");
460 GLADE_HOOKUP_OBJECT (cropper_window, hbox1, "hbox1");
461 GLADE_HOOKUP_OBJECT (cropper_window, vbox1, "vbox1");
462 GLADE_HOOKUP_OBJECT (cropper_window, vbox2, "vbox2");
463 GLADE_HOOKUP_OBJECT (cropper_window, label1, "label1");
464 GLADE_HOOKUP_OBJECT (cropper_window, hbox2, "hbox2");
465 GLADE_HOOKUP_OBJECT (cropper_window, label2, "label2");
466 GLADE_HOOKUP_OBJECT (cropper_window, table2, "table2");
467 GLADE_HOOKUP_OBJECT (cropper_window, label3, "label3");
468 GLADE_HOOKUP_OBJECT (cropper_window, label5, "label5");
469 GLADE_HOOKUP_OBJECT (cropper_window, label4, "label4");
470 GLADE_HOOKUP_OBJECT (cropper_window, label6, "label6");
471 GLADE_HOOKUP_OBJECT (cropper_window, hbox5, "hbox5");
472 GLADE_HOOKUP_OBJECT (cropper_window, crop_x_spinbutton, "crop_x_spinbutton");
473 GLADE_HOOKUP_OBJECT (cropper_window, hbox6, "hbox6");
474 GLADE_HOOKUP_OBJECT (cropper_window, crop_y_spinbutton, "crop_y_spinbutton");
475 GLADE_HOOKUP_OBJECT (cropper_window, hbox7, "hbox7");
476 GLADE_HOOKUP_OBJECT (cropper_window, crop_width_spinbutton, "crop_width_spinbutton");
477 GLADE_HOOKUP_OBJECT (cropper_window, hbox8, "hbox8");
478 GLADE_HOOKUP_OBJECT (cropper_window, crop_height_spinbutton, "crop_height_spinbutton");
479 GLADE_HOOKUP_OBJECT (cropper_window, vbox4, "vbox4");
480 GLADE_HOOKUP_OBJECT (cropper_window, label7, "label7");
481 GLADE_HOOKUP_OBJECT (cropper_window, hbox3, "hbox3");
482 GLADE_HOOKUP_OBJECT (cropper_window, label8, "label8");
483 GLADE_HOOKUP_OBJECT (cropper_window, table3, "table3");
484 GLADE_HOOKUP_OBJECT (cropper_window, hbox10, "hbox10");
485 GLADE_HOOKUP_OBJECT (cropper_window, custom_ratio_box, "custom_ratio_box");
486 GLADE_HOOKUP_OBJECT (cropper_window, ratio_w_spinbutton, "ratio_w_spinbutton");
487 GLADE_HOOKUP_OBJECT (cropper_window, ratio_swap_button, "ratio_swap_button");
488 GLADE_HOOKUP_OBJECT (cropper_window, eventbox1, "eventbox1");
489 GLADE_HOOKUP_OBJECT (cropper_window, ratio_swap_image, "ratio_swap_image");
490 GLADE_HOOKUP_OBJECT (cropper_window, ratio_h_spinbutton, "ratio_h_spinbutton");
491 GLADE_HOOKUP_OBJECT (cropper_window, ratio_optionmenu, "ratio_optionmenu");
492 GLADE_HOOKUP_OBJECT (cropper_window, menu1, "menu1");
493 GLADE_HOOKUP_OBJECT (cropper_window, none1, "none1");
494 GLADE_HOOKUP_OBJECT (cropper_window, square1, "square1");
495 GLADE_HOOKUP_OBJECT (cropper_window, _4x3__book__dvd_1, "_4x3__book__dvd_1");
496 GLADE_HOOKUP_OBJECT (cropper_window, _4x6__postcard_1, "_4x6__postcard_1");
497 GLADE_HOOKUP_OBJECT (cropper_window, _5x1, "_5x1");
498 GLADE_HOOKUP_OBJECT (cropper_window, _8x1, "_8x1");
499 GLADE_HOOKUP_OBJECT (cropper_window, custom1, "custom1");
500 GLADE_HOOKUP_OBJECT (cropper_window, vbox5, "vbox5");
501 GLADE_HOOKUP_OBJECT (cropper_window, frame1, "frame1");
502 GLADE_HOOKUP_OBJECT (cropper_window, vbox7, "vbox7");
503 GLADE_HOOKUP_OBJECT (cropper_window, nav_container, "nav_container");
504 GLADE_HOOKUP_OBJECT (cropper_window, hbox16, "hbox16");
505 GLADE_HOOKUP_OBJECT (cropper_window, hbox17, "hbox17");
506 GLADE_HOOKUP_OBJECT (cropper_window, crop_zoom_in_button, "crop_zoom_in_button");
507 GLADE_HOOKUP_OBJECT (cropper_window, image2, "image2");
508 GLADE_HOOKUP_OBJECT (cropper_window, crop_zoom_out_button, "crop_zoom_out_button");
509 GLADE_HOOKUP_OBJECT (cropper_window, image4, "image4");
510 GLADE_HOOKUP_OBJECT (cropper_window, crop_zoom_100_button, "crop_zoom_100_button");
511 GLADE_HOOKUP_OBJECT (cropper_window, image3, "image3");
512 GLADE_HOOKUP_OBJECT (cropper_window, crop_zoom_fit_button, "crop_zoom_fit_button");
513 GLADE_HOOKUP_OBJECT (cropper_window, image1, "image1");
515 return cropper_window;
516 }