Mercurial > cropper
annotate interface.c @ 4:2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
author | meillo@marmaro.de |
---|---|
date | Fri, 07 Dec 2007 17:40:08 +0100 |
parents | e359bea4c8ac |
children | 61e5a1727231 |
rev | line source |
---|---|
0 | 1 #include <sys/types.h> |
2 #include <sys/stat.h> | |
3 #include <unistd.h> | |
4 #include <string.h> | |
5 #include <stdio.h> | |
6 | |
7 #include <gdk/gdkkeysyms.h> | |
8 #include <gtk/gtk.h> | |
9 | |
10 #include "callbacks.h" | |
11 #include "interface.h" | |
12 #include "support.h" | |
13 | |
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) | |
17 | |
18 #define GLADE_HOOKUP_OBJECT_NO_REF(component,widget,name) \ | |
19 g_object_set_data (G_OBJECT (component), name, widget) | |
20 | |
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; | |
2
e359bea4c8ac
added code for ratio swap; new names for ratio operations; added main.h; some more
meillo@marmaro.de
parents:
1
diff
changeset
|
65 GtkWidget *ratio_none; |
e359bea4c8ac
added code for ratio swap; new names for ratio operations; added main.h; some more
meillo@marmaro.de
parents:
1
diff
changeset
|
66 GtkWidget *ratio_square; |
e359bea4c8ac
added code for ratio swap; new names for ratio operations; added main.h; some more
meillo@marmaro.de
parents:
1
diff
changeset
|
67 GtkWidget *ratio_4x3; |
e359bea4c8ac
added code for ratio swap; new names for ratio operations; added main.h; some more
meillo@marmaro.de
parents:
1
diff
changeset
|
68 GtkWidget *ratio_3x2; |
e359bea4c8ac
added code for ratio swap; new names for ratio operations; added main.h; some more
meillo@marmaro.de
parents:
1
diff
changeset
|
69 GtkWidget *ratio_custom; |
0 | 70 GtkWidget *vbox5; |
71 GtkWidget *frame1; | |
72 GtkWidget *vbox7; | |
73 GtkWidget *nav_container; | |
74 GtkWidget *hbox16; | |
75 GtkWidget *hbox17; | |
76 GtkWidget *crop_zoom_in_button; | |
77 GtkWidget *image2; | |
78 GtkWidget *crop_zoom_out_button; | |
79 GtkWidget *image4; | |
80 GtkWidget *crop_zoom_100_button; | |
81 GtkWidget *image3; | |
82 GtkWidget *crop_zoom_fit_button; | |
83 GtkWidget *image1; | |
4
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
84 GtkWidget *dialog_action_area1; |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
85 GtkWidget *crop_okbutton; |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
86 GtkWidget *alignment1; |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
87 GtkWidget *hbox11; |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
88 GtkWidget *crop_image; |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
89 GtkWidget *label12; |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
90 |
0 | 91 |
92 cropper_window = gtk_window_new (GTK_WINDOW_TOPLEVEL); | |
93 gtk_widget_set_name (cropper_window, "cropper_window"); | |
94 gtk_container_set_border_width (GTK_CONTAINER (cropper_window), 6); | |
95 gtk_window_set_title (GTK_WINDOW (cropper_window), "Cropper"); | |
96 | |
97 dialog_vbox1 = gtk_vbox_new (FALSE, 6); | |
98 gtk_widget_set_name (dialog_vbox1, "dialog_vbox1"); | |
99 gtk_widget_show (dialog_vbox1); | |
100 gtk_container_add (GTK_CONTAINER (cropper_window), dialog_vbox1); | |
101 | |
102 hbox1 = gtk_hbox_new (FALSE, 12); | |
103 gtk_widget_set_name (hbox1, "hbox1"); | |
104 gtk_widget_show (hbox1); | |
105 gtk_box_pack_start (GTK_BOX (dialog_vbox1), hbox1, TRUE, TRUE, 0); | |
106 gtk_container_set_border_width (GTK_CONTAINER (hbox1), 5); | |
107 | |
108 vbox1 = gtk_vbox_new (FALSE, 12); | |
109 gtk_widget_set_name (vbox1, "vbox1"); | |
110 gtk_widget_show (vbox1); | |
111 gtk_box_pack_start (GTK_BOX (hbox1), vbox1, FALSE, TRUE, 0); | |
112 | |
113 vbox2 = gtk_vbox_new (FALSE, 6); | |
114 gtk_widget_set_name (vbox2, "vbox2"); | |
115 gtk_widget_show (vbox2); | |
116 gtk_box_pack_start (GTK_BOX (vbox1), vbox2, FALSE, TRUE, 0); | |
117 | |
118 label1 = gtk_label_new ("<b>Selection</b>"); | |
119 gtk_widget_set_name (label1, "label1"); | |
120 gtk_widget_show (label1); | |
121 gtk_box_pack_start (GTK_BOX (vbox2), label1, FALSE, FALSE, 0); | |
122 gtk_label_set_use_markup (GTK_LABEL (label1), TRUE); | |
123 gtk_misc_set_alignment (GTK_MISC (label1), 0, 0.5); | |
124 | |
125 hbox2 = gtk_hbox_new (FALSE, 0); | |
126 gtk_widget_set_name (hbox2, "hbox2"); | |
127 gtk_widget_show (hbox2); | |
128 gtk_box_pack_start (GTK_BOX (vbox2), hbox2, FALSE, TRUE, 0); | |
129 | |
130 label2 = gtk_label_new (" "); | |
131 gtk_widget_set_name (label2, "label2"); | |
132 gtk_widget_show (label2); | |
133 gtk_box_pack_start (GTK_BOX (hbox2), label2, FALSE, FALSE, 0); | |
134 | |
135 table2 = gtk_table_new (4, 2, FALSE); | |
136 gtk_widget_set_name (table2, "table2"); | |
137 gtk_widget_show (table2); | |
138 gtk_box_pack_start (GTK_BOX (hbox2), table2, TRUE, TRUE, 0); | |
139 gtk_table_set_row_spacings (GTK_TABLE (table2), 6); | |
140 gtk_table_set_col_spacings (GTK_TABLE (table2), 6); | |
141 | |
142 label3 = gtk_label_new_with_mnemonic ("_X:"); | |
143 gtk_widget_set_name (label3, "label3"); | |
144 gtk_widget_show (label3); | |
145 gtk_table_attach (GTK_TABLE (table2), label3, 0, 1, 0, 1, | |
146 (GtkAttachOptions) (GTK_FILL), | |
147 (GtkAttachOptions) (0), 0, 0); | |
148 gtk_misc_set_alignment (GTK_MISC (label3), 0, 0.5); | |
149 | |
150 label5 = gtk_label_new_with_mnemonic ("_Y:"); | |
151 gtk_widget_set_name (label5, "label5"); | |
152 gtk_widget_show (label5); | |
153 gtk_table_attach (GTK_TABLE (table2), label5, 0, 1, 1, 2, | |
154 (GtkAttachOptions) (GTK_FILL), | |
155 (GtkAttachOptions) (0), 0, 0); | |
156 gtk_misc_set_alignment (GTK_MISC (label5), 0, 0.5); | |
157 | |
158 label4 = gtk_label_new_with_mnemonic ("_Width:"); | |
159 gtk_widget_set_name (label4, "label4"); | |
160 gtk_widget_show (label4); | |
161 gtk_table_attach (GTK_TABLE (table2), label4, 0, 1, 2, 3, | |
162 (GtkAttachOptions) (GTK_FILL), | |
163 (GtkAttachOptions) (0), 0, 0); | |
164 gtk_misc_set_alignment (GTK_MISC (label4), 0, 0.5); | |
165 | |
166 label6 = gtk_label_new_with_mnemonic ("_Height:"); | |
167 gtk_widget_set_name (label6, "label6"); | |
168 gtk_widget_show (label6); | |
169 gtk_table_attach (GTK_TABLE (table2), label6, 0, 1, 3, 4, | |
170 (GtkAttachOptions) (GTK_FILL), | |
171 (GtkAttachOptions) (0), 0, 0); | |
172 gtk_misc_set_alignment (GTK_MISC (label6), 0, 0.5); | |
173 | |
174 hbox5 = gtk_hbox_new (FALSE, 0); | |
175 gtk_widget_set_name (hbox5, "hbox5"); | |
176 gtk_widget_show (hbox5); | |
177 gtk_table_attach (GTK_TABLE (table2), hbox5, 1, 2, 0, 1, | |
178 (GtkAttachOptions) (GTK_FILL), | |
179 (GtkAttachOptions) (GTK_FILL), 0, 0); | |
180 | |
181 crop_x_spinbutton_adj = gtk_adjustment_new (1, 0, 300, 1, 10, 1); | |
182 crop_x_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (crop_x_spinbutton_adj), 1, 0); | |
183 gtk_widget_set_name (crop_x_spinbutton, "crop_x_spinbutton"); | |
184 gtk_widget_show (crop_x_spinbutton); | |
185 gtk_box_pack_start (GTK_BOX (hbox5), crop_x_spinbutton, FALSE, TRUE, 0); | |
186 | |
187 hbox6 = gtk_hbox_new (FALSE, 0); | |
188 gtk_widget_set_name (hbox6, "hbox6"); | |
189 gtk_widget_show (hbox6); | |
190 gtk_table_attach (GTK_TABLE (table2), hbox6, 1, 2, 1, 2, | |
191 (GtkAttachOptions) (GTK_FILL), | |
192 (GtkAttachOptions) (GTK_FILL), 0, 0); | |
193 | |
194 crop_y_spinbutton_adj = gtk_adjustment_new (1, 0, 300, 1, 10, 1); | |
195 crop_y_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (crop_y_spinbutton_adj), 1, 0); | |
196 gtk_widget_set_name (crop_y_spinbutton, "crop_y_spinbutton"); | |
197 gtk_widget_show (crop_y_spinbutton); | |
198 gtk_box_pack_start (GTK_BOX (hbox6), crop_y_spinbutton, FALSE, TRUE, 0); | |
199 | |
200 hbox7 = gtk_hbox_new (FALSE, 0); | |
201 gtk_widget_set_name (hbox7, "hbox7"); | |
202 gtk_widget_show (hbox7); | |
203 gtk_table_attach (GTK_TABLE (table2), hbox7, 1, 2, 2, 3, | |
204 (GtkAttachOptions) (GTK_FILL), | |
205 (GtkAttachOptions) (GTK_FILL), 0, 0); | |
206 | |
207 crop_width_spinbutton_adj = gtk_adjustment_new (1, 0, 300, 1, 10, 1); | |
208 crop_width_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (crop_width_spinbutton_adj), 1, 0); | |
209 gtk_widget_set_name (crop_width_spinbutton, "crop_width_spinbutton"); | |
210 gtk_widget_show (crop_width_spinbutton); | |
211 gtk_box_pack_start (GTK_BOX (hbox7), crop_width_spinbutton, FALSE, FALSE, 0); | |
212 | |
213 hbox8 = gtk_hbox_new (FALSE, 0); | |
214 gtk_widget_set_name (hbox8, "hbox8"); | |
215 gtk_widget_show (hbox8); | |
216 gtk_table_attach (GTK_TABLE (table2), hbox8, 1, 2, 3, 4, | |
217 (GtkAttachOptions) (GTK_FILL), | |
218 (GtkAttachOptions) (GTK_FILL), 0, 0); | |
219 | |
220 crop_height_spinbutton_adj = gtk_adjustment_new (1, 0, 300, 1, 10, 1); | |
221 crop_height_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (crop_height_spinbutton_adj), 1, 0); | |
222 gtk_widget_set_name (crop_height_spinbutton, "crop_height_spinbutton"); | |
223 gtk_widget_show (crop_height_spinbutton); | |
224 gtk_box_pack_start (GTK_BOX (hbox8), crop_height_spinbutton, FALSE, FALSE, 0); | |
225 | |
226 vbox4 = gtk_vbox_new (FALSE, 6); | |
227 gtk_widget_set_name (vbox4, "vbox4"); | |
228 gtk_widget_show (vbox4); | |
229 gtk_box_pack_start (GTK_BOX (vbox1), vbox4, FALSE, TRUE, 0); | |
230 | |
231 label7 = gtk_label_new ("<b>Aspect ratio</b>"); | |
232 gtk_widget_set_name (label7, "label7"); | |
233 gtk_widget_show (label7); | |
234 gtk_box_pack_start (GTK_BOX (vbox4), label7, FALSE, FALSE, 0); | |
235 gtk_label_set_use_markup (GTK_LABEL (label7), TRUE); | |
236 gtk_misc_set_alignment (GTK_MISC (label7), 0, 0.5); | |
237 | |
238 hbox3 = gtk_hbox_new (FALSE, 0); | |
239 gtk_widget_set_name (hbox3, "hbox3"); | |
240 gtk_widget_show (hbox3); | |
241 gtk_box_pack_start (GTK_BOX (vbox4), hbox3, FALSE, FALSE, 0); | |
242 | |
243 label8 = gtk_label_new (" "); | |
244 gtk_widget_set_name (label8, "label8"); | |
245 gtk_widget_show (label8); | |
246 gtk_box_pack_start (GTK_BOX (hbox3), label8, FALSE, FALSE, 0); | |
247 | |
248 table3 = gtk_table_new (2, 2, FALSE); | |
249 gtk_widget_set_name (table3, "table3"); | |
250 gtk_widget_show (table3); | |
251 gtk_box_pack_start (GTK_BOX (hbox3), table3, TRUE, TRUE, 0); | |
252 gtk_table_set_row_spacings (GTK_TABLE (table3), 6); | |
253 gtk_table_set_col_spacings (GTK_TABLE (table3), 6); | |
254 | |
255 hbox10 = gtk_hbox_new (FALSE, 6); | |
256 gtk_widget_set_name (hbox10, "hbox10"); | |
257 gtk_widget_show (hbox10); | |
258 gtk_table_attach (GTK_TABLE (table3), hbox10, 0, 2, 1, 2, | |
259 (GtkAttachOptions) (GTK_FILL), | |
260 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); | |
261 | |
262 custom_ratio_box = gtk_hbox_new (FALSE, 6); | |
263 gtk_widget_set_name (custom_ratio_box, "custom_ratio_box"); | |
264 gtk_widget_show (custom_ratio_box); | |
265 gtk_box_pack_start (GTK_BOX (hbox10), custom_ratio_box, TRUE, TRUE, 0); | |
266 | |
267 ratio_w_spinbutton_adj = gtk_adjustment_new (1, 1, 9999, 1, 10, 10); | |
268 ratio_w_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (ratio_w_spinbutton_adj), 1, 0); | |
269 gtk_widget_set_name (ratio_w_spinbutton, "ratio_w_spinbutton"); | |
270 gtk_widget_show (ratio_w_spinbutton); | |
271 gtk_box_pack_start (GTK_BOX (custom_ratio_box), ratio_w_spinbutton, FALSE, TRUE, 0); | |
272 | |
273 ratio_swap_button = gtk_button_new (); | |
274 gtk_widget_set_name (ratio_swap_button, "ratio_swap_button"); | |
275 gtk_widget_show (ratio_swap_button); | |
276 gtk_box_pack_start (GTK_BOX (custom_ratio_box), ratio_swap_button, FALSE, FALSE, 0); | |
277 gtk_button_set_relief (GTK_BUTTON (ratio_swap_button), GTK_RELIEF_NONE); | |
278 | |
279 eventbox1 = gtk_event_box_new (); | |
280 gtk_widget_set_name (eventbox1, "eventbox1"); | |
281 gtk_widget_show (eventbox1); | |
282 gtk_container_add (GTK_CONTAINER (ratio_swap_button), eventbox1); | |
283 | |
284 ratio_swap_image = gtk_image_new_from_stock ("gtk-refresh", GTK_ICON_SIZE_BUTTON); | |
285 gtk_widget_set_name (ratio_swap_image, "ratio_swap_image"); | |
286 gtk_widget_show (ratio_swap_image); | |
287 gtk_container_add (GTK_CONTAINER (eventbox1), ratio_swap_image); | |
288 | |
289 ratio_h_spinbutton_adj = gtk_adjustment_new (1, 1, 9999, 1, 10, 10); | |
290 ratio_h_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (ratio_h_spinbutton_adj), 1, 0); | |
291 gtk_widget_set_name (ratio_h_spinbutton, "ratio_h_spinbutton"); | |
292 gtk_widget_show (ratio_h_spinbutton); | |
293 gtk_box_pack_start (GTK_BOX (custom_ratio_box), ratio_h_spinbutton, FALSE, TRUE, 0); | |
294 gtk_spin_button_set_update_policy (GTK_SPIN_BUTTON (ratio_h_spinbutton), GTK_UPDATE_IF_VALID); | |
295 | |
296 ratio_optionmenu = gtk_option_menu_new (); | |
297 gtk_widget_set_name (ratio_optionmenu, "ratio_optionmenu"); | |
298 gtk_widget_show (ratio_optionmenu); | |
299 gtk_table_attach (GTK_TABLE (table3), ratio_optionmenu, 0, 2, 0, 1, | |
300 (GtkAttachOptions) (GTK_FILL), | |
301 (GtkAttachOptions) (0), 0, 0); | |
302 | |
303 menu1 = gtk_menu_new (); | |
304 gtk_widget_set_name (menu1, "menu1"); | |
305 | |
2
e359bea4c8ac
added code for ratio swap; new names for ratio operations; added main.h; some more
meillo@marmaro.de
parents:
1
diff
changeset
|
306 ratio_none = gtk_menu_item_new_with_mnemonic ("None"); |
e359bea4c8ac
added code for ratio swap; new names for ratio operations; added main.h; some more
meillo@marmaro.de
parents:
1
diff
changeset
|
307 gtk_widget_set_name (ratio_none, "ratio_none"); |
e359bea4c8ac
added code for ratio swap; new names for ratio operations; added main.h; some more
meillo@marmaro.de
parents:
1
diff
changeset
|
308 gtk_widget_show (ratio_none); |
e359bea4c8ac
added code for ratio swap; new names for ratio operations; added main.h; some more
meillo@marmaro.de
parents:
1
diff
changeset
|
309 gtk_container_add (GTK_CONTAINER (menu1), ratio_none); |
0 | 310 |
2
e359bea4c8ac
added code for ratio swap; new names for ratio operations; added main.h; some more
meillo@marmaro.de
parents:
1
diff
changeset
|
311 ratio_square = gtk_menu_item_new_with_mnemonic ("Square"); |
e359bea4c8ac
added code for ratio swap; new names for ratio operations; added main.h; some more
meillo@marmaro.de
parents:
1
diff
changeset
|
312 gtk_widget_set_name (ratio_square, "ratio_square"); |
e359bea4c8ac
added code for ratio swap; new names for ratio operations; added main.h; some more
meillo@marmaro.de
parents:
1
diff
changeset
|
313 gtk_widget_show (ratio_square); |
e359bea4c8ac
added code for ratio swap; new names for ratio operations; added main.h; some more
meillo@marmaro.de
parents:
1
diff
changeset
|
314 gtk_container_add (GTK_CONTAINER (menu1), ratio_square); |
0 | 315 |
2
e359bea4c8ac
added code for ratio swap; new names for ratio operations; added main.h; some more
meillo@marmaro.de
parents:
1
diff
changeset
|
316 ratio_4x3 = gtk_menu_item_new_with_mnemonic ("4 x 3 (Book, DVD)"); |
e359bea4c8ac
added code for ratio swap; new names for ratio operations; added main.h; some more
meillo@marmaro.de
parents:
1
diff
changeset
|
317 gtk_widget_set_name (ratio_4x3, "ratio_4x3"); |
e359bea4c8ac
added code for ratio swap; new names for ratio operations; added main.h; some more
meillo@marmaro.de
parents:
1
diff
changeset
|
318 gtk_widget_show (ratio_4x3); |
e359bea4c8ac
added code for ratio swap; new names for ratio operations; added main.h; some more
meillo@marmaro.de
parents:
1
diff
changeset
|
319 gtk_container_add (GTK_CONTAINER (menu1), ratio_4x3); |
0 | 320 |
2
e359bea4c8ac
added code for ratio swap; new names for ratio operations; added main.h; some more
meillo@marmaro.de
parents:
1
diff
changeset
|
321 ratio_3x2 = gtk_menu_item_new_with_mnemonic ("4 x 6 (Postcard)"); |
e359bea4c8ac
added code for ratio swap; new names for ratio operations; added main.h; some more
meillo@marmaro.de
parents:
1
diff
changeset
|
322 gtk_widget_set_name (ratio_3x2, "ratio_3x2"); |
e359bea4c8ac
added code for ratio swap; new names for ratio operations; added main.h; some more
meillo@marmaro.de
parents:
1
diff
changeset
|
323 gtk_widget_show (ratio_3x2); |
e359bea4c8ac
added code for ratio swap; new names for ratio operations; added main.h; some more
meillo@marmaro.de
parents:
1
diff
changeset
|
324 gtk_container_add (GTK_CONTAINER (menu1), ratio_3x2); |
0 | 325 |
2
e359bea4c8ac
added code for ratio swap; new names for ratio operations; added main.h; some more
meillo@marmaro.de
parents:
1
diff
changeset
|
326 ratio_custom = gtk_menu_item_new_with_mnemonic ("Custom"); |
e359bea4c8ac
added code for ratio swap; new names for ratio operations; added main.h; some more
meillo@marmaro.de
parents:
1
diff
changeset
|
327 gtk_widget_set_name (ratio_custom, "ratio_custom"); |
e359bea4c8ac
added code for ratio swap; new names for ratio operations; added main.h; some more
meillo@marmaro.de
parents:
1
diff
changeset
|
328 gtk_widget_show (ratio_custom); |
e359bea4c8ac
added code for ratio swap; new names for ratio operations; added main.h; some more
meillo@marmaro.de
parents:
1
diff
changeset
|
329 gtk_container_add (GTK_CONTAINER (menu1), ratio_custom); |
0 | 330 |
331 gtk_option_menu_set_menu (GTK_OPTION_MENU (ratio_optionmenu), menu1); | |
332 | |
333 vbox5 = gtk_vbox_new (FALSE, 0); | |
334 gtk_widget_set_name (vbox5, "vbox5"); | |
335 gtk_widget_show (vbox5); | |
336 gtk_box_pack_start (GTK_BOX (hbox1), vbox5, TRUE, TRUE, 0); | |
337 | |
338 frame1 = gtk_frame_new (NULL); | |
339 gtk_widget_set_name (frame1, "frame1"); | |
340 gtk_widget_show (frame1); | |
341 gtk_box_pack_start (GTK_BOX (vbox5), frame1, TRUE, TRUE, 0); | |
342 gtk_frame_set_shadow_type (GTK_FRAME (frame1), GTK_SHADOW_NONE); | |
343 | |
344 vbox7 = gtk_vbox_new (FALSE, 6); | |
345 gtk_widget_set_name (vbox7, "vbox7"); | |
346 gtk_widget_show (vbox7); | |
347 gtk_container_add (GTK_CONTAINER (frame1), vbox7); | |
348 | |
349 nav_container = gtk_hbox_new (FALSE, 0); | |
350 gtk_widget_set_name (nav_container, "nav_container"); | |
351 gtk_widget_show (nav_container); | |
352 gtk_box_pack_start (GTK_BOX (vbox7), nav_container, TRUE, TRUE, 0); | |
353 | |
354 hbox16 = gtk_hbox_new (FALSE, 6); | |
355 gtk_widget_set_name (hbox16, "hbox16"); | |
356 gtk_widget_show (hbox16); | |
357 gtk_box_pack_start (GTK_BOX (vbox7), hbox16, FALSE, TRUE, 0); | |
358 | |
359 hbox17 = gtk_hbox_new (FALSE, 0); | |
360 gtk_widget_set_name (hbox17, "hbox17"); | |
361 gtk_widget_show (hbox17); | |
362 gtk_box_pack_end (GTK_BOX (hbox16), hbox17, FALSE, TRUE, 0); | |
363 | |
364 crop_zoom_in_button = gtk_button_new (); | |
365 gtk_widget_set_name (crop_zoom_in_button, "crop_zoom_in_button"); | |
366 gtk_widget_show (crop_zoom_in_button); | |
367 gtk_box_pack_start (GTK_BOX (hbox17), crop_zoom_in_button, FALSE, FALSE, 0); | |
368 gtk_button_set_relief (GTK_BUTTON (crop_zoom_in_button), GTK_RELIEF_NONE); | |
369 | |
370 image2 = gtk_image_new_from_stock ("gtk-zoom-in", GTK_ICON_SIZE_BUTTON); | |
371 gtk_widget_set_name (image2, "image2"); | |
372 gtk_widget_show (image2); | |
373 gtk_container_add (GTK_CONTAINER (crop_zoom_in_button), image2); | |
374 | |
375 crop_zoom_out_button = gtk_button_new (); | |
376 gtk_widget_set_name (crop_zoom_out_button, "crop_zoom_out_button"); | |
377 gtk_widget_show (crop_zoom_out_button); | |
378 gtk_box_pack_start (GTK_BOX (hbox17), crop_zoom_out_button, FALSE, FALSE, 0); | |
379 gtk_button_set_relief (GTK_BUTTON (crop_zoom_out_button), GTK_RELIEF_NONE); | |
380 | |
381 image4 = gtk_image_new_from_stock ("gtk-zoom-out", GTK_ICON_SIZE_BUTTON); | |
382 gtk_widget_set_name (image4, "image4"); | |
383 gtk_widget_show (image4); | |
384 gtk_container_add (GTK_CONTAINER (crop_zoom_out_button), image4); | |
385 | |
386 crop_zoom_100_button = gtk_button_new (); | |
387 gtk_widget_set_name (crop_zoom_100_button, "crop_zoom_100_button"); | |
388 gtk_widget_show (crop_zoom_100_button); | |
389 gtk_box_pack_start (GTK_BOX (hbox17), crop_zoom_100_button, FALSE, FALSE, 0); | |
390 gtk_button_set_relief (GTK_BUTTON (crop_zoom_100_button), GTK_RELIEF_NONE); | |
391 | |
392 image3 = gtk_image_new_from_stock ("gtk-zoom-100", GTK_ICON_SIZE_BUTTON); | |
393 gtk_widget_set_name (image3, "image3"); | |
394 gtk_widget_show (image3); | |
395 gtk_container_add (GTK_CONTAINER (crop_zoom_100_button), image3); | |
396 | |
397 crop_zoom_fit_button = gtk_button_new (); | |
398 gtk_widget_set_name (crop_zoom_fit_button, "crop_zoom_fit_button"); | |
399 gtk_widget_show (crop_zoom_fit_button); | |
400 gtk_box_pack_start (GTK_BOX (hbox17), crop_zoom_fit_button, FALSE, FALSE, 0); | |
401 gtk_button_set_relief (GTK_BUTTON (crop_zoom_fit_button), GTK_RELIEF_NONE); | |
402 | |
403 image1 = gtk_image_new_from_stock ("gtk-zoom-fit", GTK_ICON_SIZE_BUTTON); | |
404 gtk_widget_set_name (image1, "image1"); | |
405 gtk_widget_show (image1); | |
406 gtk_container_add (GTK_CONTAINER (crop_zoom_fit_button), image1); | |
407 | |
1 | 408 |
2
e359bea4c8ac
added code for ratio swap; new names for ratio operations; added main.h; some more
meillo@marmaro.de
parents:
1
diff
changeset
|
409 |
4
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
410 /* |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
411 okay_box = gtk_hbox_new (FALSE, 0); |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
412 gtk_widget_set_name (okay_box, "okay_box"); |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
413 gtk_widget_show (okay_box); |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
414 gtk_box_pack_end (GTK_BOX (hbox16), okay_box, FALSE, TRUE, 0); |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
415 */ |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
416 |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
417 crop_okbutton = gtk_button_new (); |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
418 gtk_widget_set_name (crop_okbutton, "crop_okbutton"); |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
419 gtk_widget_show (crop_okbutton); |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
420 gtk_box_pack_end (GTK_BOX (dialog_vbox1), crop_okbutton, FALSE, FALSE, 0); |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
421 GTK_WIDGET_SET_FLAGS (crop_okbutton, GTK_CAN_DEFAULT); |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
422 |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
423 alignment1 = gtk_alignment_new (0.5, 0.5, 0, 0); |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
424 gtk_widget_set_name (alignment1, "alignment1"); |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
425 gtk_widget_show (alignment1); |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
426 gtk_container_add (GTK_CONTAINER (crop_okbutton), alignment1); |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
427 |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
428 hbox11 = gtk_hbox_new (FALSE, 2); |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
429 gtk_widget_set_name (hbox11, "hbox11"); |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
430 gtk_widget_show (hbox11); |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
431 gtk_container_add (GTK_CONTAINER (alignment1), hbox11); |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
432 |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
433 crop_image = gtk_image_new_from_stock ("gtk-ok", GTK_ICON_SIZE_BUTTON); |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
434 gtk_widget_set_name (crop_image, "crop_image"); |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
435 gtk_widget_show (crop_image); |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
436 gtk_box_pack_start (GTK_BOX (hbox11), crop_image, FALSE, FALSE, 0); |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
437 |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
438 label12 = gtk_label_new_with_mnemonic ("_Crop"); |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
439 gtk_widget_set_name (label12, "label12"); |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
440 gtk_widget_show (label12); |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
441 gtk_box_pack_start (GTK_BOX (hbox11), label12, FALSE, FALSE, 0); |
2
e359bea4c8ac
added code for ratio swap; new names for ratio operations; added main.h; some more
meillo@marmaro.de
parents:
1
diff
changeset
|
442 |
e359bea4c8ac
added code for ratio swap; new names for ratio operations; added main.h; some more
meillo@marmaro.de
parents:
1
diff
changeset
|
443 |
e359bea4c8ac
added code for ratio swap; new names for ratio operations; added main.h; some more
meillo@marmaro.de
parents:
1
diff
changeset
|
444 |
4
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
445 |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
446 |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
447 /* destroy */ |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
448 g_signal_connect (G_OBJECT (cropper_window), "destroy", |
0 | 449 G_CALLBACK (on_cropper_window_destroy), |
450 NULL); | |
2
e359bea4c8ac
added code for ratio swap; new names for ratio operations; added main.h; some more
meillo@marmaro.de
parents:
1
diff
changeset
|
451 |
4
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
452 |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
453 /* crop */ |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
454 g_signal_connect (G_OBJECT (crop_okbutton), "clicked", |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
455 G_CALLBACK (on_crop_clicked), |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
456 NULL); |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
457 |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
458 |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
459 |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
460 /* aspect ratio */ |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
461 /* |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
462 g_signal_connect (G_OBJECT (ratio_w_spinbutton), "value_changed", |
0 | 463 G_CALLBACK (on_ratio_w_spinbutton_value_changed), |
464 NULL); | |
4
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
465 g_signal_connect (G_OBJECT (ratio_swap_button), "clicked", |
0 | 466 G_CALLBACK (on_ratio_swap_button_clicked), |
467 NULL); | |
4
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
468 g_signal_connect (G_OBJECT (ratio_h_spinbutton), "value_changed", |
0 | 469 G_CALLBACK (on_ratio_h_spinbutton_value_changed), |
470 NULL); | |
2
e359bea4c8ac
added code for ratio swap; new names for ratio operations; added main.h; some more
meillo@marmaro.de
parents:
1
diff
changeset
|
471 |
4
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
472 g_signal_connect (G_OBJECT (ratio_none), "activate", |
2
e359bea4c8ac
added code for ratio swap; new names for ratio operations; added main.h; some more
meillo@marmaro.de
parents:
1
diff
changeset
|
473 G_CALLBACK (on_ratio_none_activate), |
0 | 474 NULL); |
4
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
475 g_signal_connect (G_OBJECT (ratio_square), "activate", |
2
e359bea4c8ac
added code for ratio swap; new names for ratio operations; added main.h; some more
meillo@marmaro.de
parents:
1
diff
changeset
|
476 G_CALLBACK (on_ratio_square_activate), |
0 | 477 NULL); |
4
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
478 g_signal_connect (G_OBJECT (ratio_4x3), "activate", |
2
e359bea4c8ac
added code for ratio swap; new names for ratio operations; added main.h; some more
meillo@marmaro.de
parents:
1
diff
changeset
|
479 G_CALLBACK (on_ratio_4x3_activate), |
0 | 480 NULL); |
4
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
481 g_signal_connect (G_OBJECT (ratio_3x2), "activate", |
2
e359bea4c8ac
added code for ratio swap; new names for ratio operations; added main.h; some more
meillo@marmaro.de
parents:
1
diff
changeset
|
482 G_CALLBACK (on_ratio_3x2_activate), |
0 | 483 NULL); |
4
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
484 g_signal_connect (G_OBJECT (ratio_custom), "activate", |
2
e359bea4c8ac
added code for ratio swap; new names for ratio operations; added main.h; some more
meillo@marmaro.de
parents:
1
diff
changeset
|
485 G_CALLBACK (on_ratio_custom_activate), |
0 | 486 NULL); |
487 | |
4
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
488 g_signal_connect (G_OBJECT (lookup_widget(cropper_window, "ratio_optionmenu")), "changed", |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
489 G_CALLBACK (ratio_optionmenu_changed_cb), |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
490 NULL); |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
491 g_signal_connect (G_OBJECT (lookup_widget(cropper_window, "ratio_w_spinbutton")), "value_changed", |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
492 G_CALLBACK (ratio_value_changed_cb), |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
493 NULL); |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
494 g_signal_connect (G_OBJECT (lookup_widget(cropper_window, "ratio_h_spinbutton")), "value_changed", |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
495 G_CALLBACK (ratio_value_changed_cb), |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
496 NULL); |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
497 g_signal_connect (G_OBJECT (lookup_widget(cropper_window, "ratio_swap_button")), "clicked", |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
498 G_CALLBACK (ratio_swap_button_cb), |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
499 NULL); |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
500 */ |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
501 |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
502 |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
503 /* selection */ |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
504 /* |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
505 g_signal_connect (G_OBJECT (lookup_widget(cropper_window, "crop_x_spinbutton")), "value_changed", |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
506 G_CALLBACK (selection_x_value_changed_cb), |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
507 data); |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
508 g_signal_connect (G_OBJECT (lookup_widget(cropper_window, "crop_y_spinbutton")), "value_changed", |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
509 G_CALLBACK (selection_y_value_changed_cb), |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
510 data); |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
511 g_signal_connect (G_OBJECT (lookup_widget(cropper_window, "crop_width_spinbutton")), "value_changed", |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
512 G_CALLBACK (selection_width_value_changed_cb), |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
513 data); |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
514 g_signal_connect (G_OBJECT (lookup_widget(cropper_window, "crop_height_spinbutton")), "value_changed", |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
515 G_CALLBACK (selection_height_value_changed_cb), |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
516 data); |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
517 g_signal_connect (G_OBJECT (lookup_widget(cropper_window, "crop_image")), "selection_changed", |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
518 G_CALLBACK (selection_changed_cb), |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
519 data); |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
520 */ |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
521 |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
522 |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
523 /* zoom */ |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
524 /* |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
525 g_signal_connect (G_OBJECT (zoom_in_button), "clicked", |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
526 G_CALLBACK (zoom_in_button_clicked_cb), |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
527 data); |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
528 g_signal_connect (G_OBJECT (zoom_out_button), "clicked", |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
529 G_CALLBACK (zoom_out_button_clicked_cb), |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
530 data); |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
531 g_signal_connect (G_OBJECT (zoom_100_button), "clicked", |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
532 G_CALLBACK (zoom_100_button_clicked_cb), |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
533 data); |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
534 g_signal_connect (G_OBJECT (zoom_fit_button), "clicked", |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
535 G_CALLBACK (zoom_fit_button_clicked_cb), |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
536 data); |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
537 */ |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
538 |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
539 |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
540 |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
541 |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
542 |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
543 |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
544 |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
545 |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
546 |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
547 |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
548 |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
549 |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
550 |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
551 |
2
e359bea4c8ac
added code for ratio swap; new names for ratio operations; added main.h; some more
meillo@marmaro.de
parents:
1
diff
changeset
|
552 |
0 | 553 /* Store pointers to all widgets, for use by lookup_widget(). */ |
554 GLADE_HOOKUP_OBJECT_NO_REF (cropper_window, cropper_window, "cropper_window"); | |
555 GLADE_HOOKUP_OBJECT (cropper_window, dialog_vbox1, "dialog_vbox1"); | |
556 GLADE_HOOKUP_OBJECT (cropper_window, hbox1, "hbox1"); | |
557 GLADE_HOOKUP_OBJECT (cropper_window, vbox1, "vbox1"); | |
558 GLADE_HOOKUP_OBJECT (cropper_window, vbox2, "vbox2"); | |
559 GLADE_HOOKUP_OBJECT (cropper_window, label1, "label1"); | |
560 GLADE_HOOKUP_OBJECT (cropper_window, hbox2, "hbox2"); | |
561 GLADE_HOOKUP_OBJECT (cropper_window, label2, "label2"); | |
562 GLADE_HOOKUP_OBJECT (cropper_window, table2, "table2"); | |
563 GLADE_HOOKUP_OBJECT (cropper_window, label3, "label3"); | |
564 GLADE_HOOKUP_OBJECT (cropper_window, label5, "label5"); | |
565 GLADE_HOOKUP_OBJECT (cropper_window, label4, "label4"); | |
566 GLADE_HOOKUP_OBJECT (cropper_window, label6, "label6"); | |
567 GLADE_HOOKUP_OBJECT (cropper_window, hbox5, "hbox5"); | |
568 GLADE_HOOKUP_OBJECT (cropper_window, crop_x_spinbutton, "crop_x_spinbutton"); | |
569 GLADE_HOOKUP_OBJECT (cropper_window, hbox6, "hbox6"); | |
570 GLADE_HOOKUP_OBJECT (cropper_window, crop_y_spinbutton, "crop_y_spinbutton"); | |
571 GLADE_HOOKUP_OBJECT (cropper_window, hbox7, "hbox7"); | |
572 GLADE_HOOKUP_OBJECT (cropper_window, crop_width_spinbutton, "crop_width_spinbutton"); | |
573 GLADE_HOOKUP_OBJECT (cropper_window, hbox8, "hbox8"); | |
574 GLADE_HOOKUP_OBJECT (cropper_window, crop_height_spinbutton, "crop_height_spinbutton"); | |
575 GLADE_HOOKUP_OBJECT (cropper_window, vbox4, "vbox4"); | |
576 GLADE_HOOKUP_OBJECT (cropper_window, label7, "label7"); | |
577 GLADE_HOOKUP_OBJECT (cropper_window, hbox3, "hbox3"); | |
578 GLADE_HOOKUP_OBJECT (cropper_window, label8, "label8"); | |
579 GLADE_HOOKUP_OBJECT (cropper_window, table3, "table3"); | |
580 GLADE_HOOKUP_OBJECT (cropper_window, hbox10, "hbox10"); | |
581 GLADE_HOOKUP_OBJECT (cropper_window, custom_ratio_box, "custom_ratio_box"); | |
582 GLADE_HOOKUP_OBJECT (cropper_window, ratio_w_spinbutton, "ratio_w_spinbutton"); | |
583 GLADE_HOOKUP_OBJECT (cropper_window, ratio_swap_button, "ratio_swap_button"); | |
584 GLADE_HOOKUP_OBJECT (cropper_window, eventbox1, "eventbox1"); | |
585 GLADE_HOOKUP_OBJECT (cropper_window, ratio_swap_image, "ratio_swap_image"); | |
586 GLADE_HOOKUP_OBJECT (cropper_window, ratio_h_spinbutton, "ratio_h_spinbutton"); | |
587 GLADE_HOOKUP_OBJECT (cropper_window, ratio_optionmenu, "ratio_optionmenu"); | |
588 GLADE_HOOKUP_OBJECT (cropper_window, menu1, "menu1"); | |
2
e359bea4c8ac
added code for ratio swap; new names for ratio operations; added main.h; some more
meillo@marmaro.de
parents:
1
diff
changeset
|
589 GLADE_HOOKUP_OBJECT (cropper_window, ratio_none, "ratio_none"); |
e359bea4c8ac
added code for ratio swap; new names for ratio operations; added main.h; some more
meillo@marmaro.de
parents:
1
diff
changeset
|
590 GLADE_HOOKUP_OBJECT (cropper_window, ratio_square, "ratio_square"); |
e359bea4c8ac
added code for ratio swap; new names for ratio operations; added main.h; some more
meillo@marmaro.de
parents:
1
diff
changeset
|
591 GLADE_HOOKUP_OBJECT (cropper_window, ratio_4x3, "ratio_4x3"); |
e359bea4c8ac
added code for ratio swap; new names for ratio operations; added main.h; some more
meillo@marmaro.de
parents:
1
diff
changeset
|
592 GLADE_HOOKUP_OBJECT (cropper_window, ratio_3x2, "ratio_3x2"); |
e359bea4c8ac
added code for ratio swap; new names for ratio operations; added main.h; some more
meillo@marmaro.de
parents:
1
diff
changeset
|
593 GLADE_HOOKUP_OBJECT (cropper_window, ratio_custom, "ratio_custom"); |
0 | 594 GLADE_HOOKUP_OBJECT (cropper_window, vbox5, "vbox5"); |
595 GLADE_HOOKUP_OBJECT (cropper_window, frame1, "frame1"); | |
596 GLADE_HOOKUP_OBJECT (cropper_window, vbox7, "vbox7"); | |
597 GLADE_HOOKUP_OBJECT (cropper_window, nav_container, "nav_container"); | |
598 GLADE_HOOKUP_OBJECT (cropper_window, hbox16, "hbox16"); | |
599 GLADE_HOOKUP_OBJECT (cropper_window, hbox17, "hbox17"); | |
600 GLADE_HOOKUP_OBJECT (cropper_window, crop_zoom_in_button, "crop_zoom_in_button"); | |
601 GLADE_HOOKUP_OBJECT (cropper_window, image2, "image2"); | |
602 GLADE_HOOKUP_OBJECT (cropper_window, crop_zoom_out_button, "crop_zoom_out_button"); | |
603 GLADE_HOOKUP_OBJECT (cropper_window, image4, "image4"); | |
604 GLADE_HOOKUP_OBJECT (cropper_window, crop_zoom_100_button, "crop_zoom_100_button"); | |
605 GLADE_HOOKUP_OBJECT (cropper_window, image3, "image3"); | |
606 GLADE_HOOKUP_OBJECT (cropper_window, crop_zoom_fit_button, "crop_zoom_fit_button"); | |
607 GLADE_HOOKUP_OBJECT (cropper_window, image1, "image1"); | |
4
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
608 /*GLADE_HOOKUP_OBJECT_NO_REF (cropper_window, dialog_action_area1, "dialog_action_area1"); */ |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
609 GLADE_HOOKUP_OBJECT (cropper_window, crop_okbutton, "crop_okbutton"); |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
610 GLADE_HOOKUP_OBJECT (cropper_window, alignment1, "alignment1"); |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
611 GLADE_HOOKUP_OBJECT (cropper_window, hbox11, "hbox11"); |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
612 GLADE_HOOKUP_OBJECT (cropper_window, crop_image, "crop_image"); |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
613 GLADE_HOOKUP_OBJECT (cropper_window, label12, "label12"); |
2f11ab3e6047
added option handling; added output for convert; commented all ratio code cause it is not really important now
meillo@marmaro.de
parents:
2
diff
changeset
|
614 |
0 | 615 |
616 return cropper_window; | |
617 } | |
618 |