Mercurial > cropper
annotate interface.c @ 6:f53ce3b28bb4
mercurial ignores JPG and PNG now, so I can store them in this directory for testing
author | meillo@marmaro.de |
---|---|
date | Fri, 07 Dec 2007 21:38:25 +0100 |
parents | 61e5a1727231 |
children | ec2d11d96fb0 |
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 | |
5
61e5a1727231
added image widget, that displays the image
meillo@marmaro.de
parents:
4
diff
changeset
|
10 #include "main.h" |
0 | 11 #include "callbacks.h" |
12 #include "interface.h" | |
13 #include "support.h" | |
14 | |
15 #define GLADE_HOOKUP_OBJECT(component,widget,name) \ | |
16 g_object_set_data_full (G_OBJECT (component), name, \ | |
17 gtk_widget_ref (widget), (GDestroyNotify) gtk_widget_unref) | |
18 | |
19 #define GLADE_HOOKUP_OBJECT_NO_REF(component,widget,name) \ | |
20 g_object_set_data (G_OBJECT (component), name, widget) | |
21 | |
22 GtkWidget* | |
23 create_cropper_window (void) | |
24 { | |
25 GtkWidget *cropper_window; | |
26 GtkWidget *dialog_vbox1; | |
27 GtkWidget *hbox1; | |
28 GtkWidget *vbox1; | |
29 GtkWidget *vbox2; | |
30 GtkWidget *label1; | |
31 GtkWidget *hbox2; | |
32 GtkWidget *label2; | |
33 GtkWidget *table2; | |
34 GtkWidget *label3; | |
35 GtkWidget *label5; | |
36 GtkWidget *label4; | |
37 GtkWidget *label6; | |
38 GtkWidget *hbox5; | |
39 GtkObject *crop_x_spinbutton_adj; | |
40 GtkWidget *crop_x_spinbutton; | |
41 GtkWidget *hbox6; | |
42 GtkObject *crop_y_spinbutton_adj; | |
43 GtkWidget *crop_y_spinbutton; | |
44 GtkWidget *hbox7; | |
45 GtkObject *crop_width_spinbutton_adj; | |
46 GtkWidget *crop_width_spinbutton; | |
47 GtkWidget *hbox8; | |
48 GtkObject *crop_height_spinbutton_adj; | |
49 GtkWidget *crop_height_spinbutton; | |
50 GtkWidget *vbox4; | |
51 GtkWidget *label7; | |
52 GtkWidget *hbox3; | |
53 GtkWidget *label8; | |
54 GtkWidget *table3; | |
55 GtkWidget *hbox10; | |
56 GtkWidget *custom_ratio_box; | |
57 GtkObject *ratio_w_spinbutton_adj; | |
58 GtkWidget *ratio_w_spinbutton; | |
59 GtkWidget *ratio_swap_button; | |
60 GtkWidget *eventbox1; | |
61 GtkWidget *ratio_swap_image; | |
62 GtkObject *ratio_h_spinbutton_adj; | |
63 GtkWidget *ratio_h_spinbutton; | |
64 GtkWidget *ratio_optionmenu; | |
65 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
|
66 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
|
67 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
|
68 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
|
69 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
|
70 GtkWidget *ratio_custom; |
0 | 71 GtkWidget *vbox5; |
72 GtkWidget *frame1; | |
73 GtkWidget *vbox7; | |
74 GtkWidget *nav_container; | |
5
61e5a1727231
added image widget, that displays the image
meillo@marmaro.de
parents:
4
diff
changeset
|
75 GtkWidget *image_area; |
0 | 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; | |
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
|
86 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
|
87 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
|
88 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
|
89 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
|
90 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
|
91 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
|
92 |
0 | 93 |
94 cropper_window = gtk_window_new (GTK_WINDOW_TOPLEVEL); | |
95 gtk_widget_set_name (cropper_window, "cropper_window"); | |
96 gtk_container_set_border_width (GTK_CONTAINER (cropper_window), 6); | |
97 gtk_window_set_title (GTK_WINDOW (cropper_window), "Cropper"); | |
98 | |
99 dialog_vbox1 = gtk_vbox_new (FALSE, 6); | |
100 gtk_widget_set_name (dialog_vbox1, "dialog_vbox1"); | |
101 gtk_widget_show (dialog_vbox1); | |
102 gtk_container_add (GTK_CONTAINER (cropper_window), dialog_vbox1); | |
103 | |
104 hbox1 = gtk_hbox_new (FALSE, 12); | |
105 gtk_widget_set_name (hbox1, "hbox1"); | |
106 gtk_widget_show (hbox1); | |
107 gtk_box_pack_start (GTK_BOX (dialog_vbox1), hbox1, TRUE, TRUE, 0); | |
108 gtk_container_set_border_width (GTK_CONTAINER (hbox1), 5); | |
109 | |
110 vbox1 = gtk_vbox_new (FALSE, 12); | |
111 gtk_widget_set_name (vbox1, "vbox1"); | |
112 gtk_widget_show (vbox1); | |
113 gtk_box_pack_start (GTK_BOX (hbox1), vbox1, FALSE, TRUE, 0); | |
114 | |
115 vbox2 = gtk_vbox_new (FALSE, 6); | |
116 gtk_widget_set_name (vbox2, "vbox2"); | |
117 gtk_widget_show (vbox2); | |
118 gtk_box_pack_start (GTK_BOX (vbox1), vbox2, FALSE, TRUE, 0); | |
119 | |
120 label1 = gtk_label_new ("<b>Selection</b>"); | |
121 gtk_widget_set_name (label1, "label1"); | |
122 gtk_widget_show (label1); | |
123 gtk_box_pack_start (GTK_BOX (vbox2), label1, FALSE, FALSE, 0); | |
124 gtk_label_set_use_markup (GTK_LABEL (label1), TRUE); | |
125 gtk_misc_set_alignment (GTK_MISC (label1), 0, 0.5); | |
126 | |
127 hbox2 = gtk_hbox_new (FALSE, 0); | |
128 gtk_widget_set_name (hbox2, "hbox2"); | |
129 gtk_widget_show (hbox2); | |
130 gtk_box_pack_start (GTK_BOX (vbox2), hbox2, FALSE, TRUE, 0); | |
131 | |
132 label2 = gtk_label_new (" "); | |
133 gtk_widget_set_name (label2, "label2"); | |
134 gtk_widget_show (label2); | |
135 gtk_box_pack_start (GTK_BOX (hbox2), label2, FALSE, FALSE, 0); | |
136 | |
137 table2 = gtk_table_new (4, 2, FALSE); | |
138 gtk_widget_set_name (table2, "table2"); | |
139 gtk_widget_show (table2); | |
140 gtk_box_pack_start (GTK_BOX (hbox2), table2, TRUE, TRUE, 0); | |
141 gtk_table_set_row_spacings (GTK_TABLE (table2), 6); | |
142 gtk_table_set_col_spacings (GTK_TABLE (table2), 6); | |
143 | |
144 label3 = gtk_label_new_with_mnemonic ("_X:"); | |
145 gtk_widget_set_name (label3, "label3"); | |
146 gtk_widget_show (label3); | |
147 gtk_table_attach (GTK_TABLE (table2), label3, 0, 1, 0, 1, | |
148 (GtkAttachOptions) (GTK_FILL), | |
149 (GtkAttachOptions) (0), 0, 0); | |
150 gtk_misc_set_alignment (GTK_MISC (label3), 0, 0.5); | |
151 | |
152 label5 = gtk_label_new_with_mnemonic ("_Y:"); | |
153 gtk_widget_set_name (label5, "label5"); | |
154 gtk_widget_show (label5); | |
155 gtk_table_attach (GTK_TABLE (table2), label5, 0, 1, 1, 2, | |
156 (GtkAttachOptions) (GTK_FILL), | |
157 (GtkAttachOptions) (0), 0, 0); | |
158 gtk_misc_set_alignment (GTK_MISC (label5), 0, 0.5); | |
159 | |
160 label4 = gtk_label_new_with_mnemonic ("_Width:"); | |
161 gtk_widget_set_name (label4, "label4"); | |
162 gtk_widget_show (label4); | |
163 gtk_table_attach (GTK_TABLE (table2), label4, 0, 1, 2, 3, | |
164 (GtkAttachOptions) (GTK_FILL), | |
165 (GtkAttachOptions) (0), 0, 0); | |
166 gtk_misc_set_alignment (GTK_MISC (label4), 0, 0.5); | |
167 | |
168 label6 = gtk_label_new_with_mnemonic ("_Height:"); | |
169 gtk_widget_set_name (label6, "label6"); | |
170 gtk_widget_show (label6); | |
171 gtk_table_attach (GTK_TABLE (table2), label6, 0, 1, 3, 4, | |
172 (GtkAttachOptions) (GTK_FILL), | |
173 (GtkAttachOptions) (0), 0, 0); | |
174 gtk_misc_set_alignment (GTK_MISC (label6), 0, 0.5); | |
175 | |
176 hbox5 = gtk_hbox_new (FALSE, 0); | |
177 gtk_widget_set_name (hbox5, "hbox5"); | |
178 gtk_widget_show (hbox5); | |
179 gtk_table_attach (GTK_TABLE (table2), hbox5, 1, 2, 0, 1, | |
180 (GtkAttachOptions) (GTK_FILL), | |
181 (GtkAttachOptions) (GTK_FILL), 0, 0); | |
182 | |
183 crop_x_spinbutton_adj = gtk_adjustment_new (1, 0, 300, 1, 10, 1); | |
184 crop_x_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (crop_x_spinbutton_adj), 1, 0); | |
185 gtk_widget_set_name (crop_x_spinbutton, "crop_x_spinbutton"); | |
186 gtk_widget_show (crop_x_spinbutton); | |
187 gtk_box_pack_start (GTK_BOX (hbox5), crop_x_spinbutton, FALSE, TRUE, 0); | |
188 | |
189 hbox6 = gtk_hbox_new (FALSE, 0); | |
190 gtk_widget_set_name (hbox6, "hbox6"); | |
191 gtk_widget_show (hbox6); | |
192 gtk_table_attach (GTK_TABLE (table2), hbox6, 1, 2, 1, 2, | |
193 (GtkAttachOptions) (GTK_FILL), | |
194 (GtkAttachOptions) (GTK_FILL), 0, 0); | |
195 | |
196 crop_y_spinbutton_adj = gtk_adjustment_new (1, 0, 300, 1, 10, 1); | |
197 crop_y_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (crop_y_spinbutton_adj), 1, 0); | |
198 gtk_widget_set_name (crop_y_spinbutton, "crop_y_spinbutton"); | |
199 gtk_widget_show (crop_y_spinbutton); | |
200 gtk_box_pack_start (GTK_BOX (hbox6), crop_y_spinbutton, FALSE, TRUE, 0); | |
201 | |
202 hbox7 = gtk_hbox_new (FALSE, 0); | |
203 gtk_widget_set_name (hbox7, "hbox7"); | |
204 gtk_widget_show (hbox7); | |
205 gtk_table_attach (GTK_TABLE (table2), hbox7, 1, 2, 2, 3, | |
206 (GtkAttachOptions) (GTK_FILL), | |
207 (GtkAttachOptions) (GTK_FILL), 0, 0); | |
208 | |
209 crop_width_spinbutton_adj = gtk_adjustment_new (1, 0, 300, 1, 10, 1); | |
210 crop_width_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (crop_width_spinbutton_adj), 1, 0); | |
211 gtk_widget_set_name (crop_width_spinbutton, "crop_width_spinbutton"); | |
212 gtk_widget_show (crop_width_spinbutton); | |
213 gtk_box_pack_start (GTK_BOX (hbox7), crop_width_spinbutton, FALSE, FALSE, 0); | |
214 | |
215 hbox8 = gtk_hbox_new (FALSE, 0); | |
216 gtk_widget_set_name (hbox8, "hbox8"); | |
217 gtk_widget_show (hbox8); | |
218 gtk_table_attach (GTK_TABLE (table2), hbox8, 1, 2, 3, 4, | |
219 (GtkAttachOptions) (GTK_FILL), | |
220 (GtkAttachOptions) (GTK_FILL), 0, 0); | |
221 | |
222 crop_height_spinbutton_adj = gtk_adjustment_new (1, 0, 300, 1, 10, 1); | |
223 crop_height_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (crop_height_spinbutton_adj), 1, 0); | |
224 gtk_widget_set_name (crop_height_spinbutton, "crop_height_spinbutton"); | |
225 gtk_widget_show (crop_height_spinbutton); | |
226 gtk_box_pack_start (GTK_BOX (hbox8), crop_height_spinbutton, FALSE, FALSE, 0); | |
227 | |
228 vbox4 = gtk_vbox_new (FALSE, 6); | |
229 gtk_widget_set_name (vbox4, "vbox4"); | |
230 gtk_widget_show (vbox4); | |
231 gtk_box_pack_start (GTK_BOX (vbox1), vbox4, FALSE, TRUE, 0); | |
232 | |
233 label7 = gtk_label_new ("<b>Aspect ratio</b>"); | |
234 gtk_widget_set_name (label7, "label7"); | |
235 gtk_widget_show (label7); | |
236 gtk_box_pack_start (GTK_BOX (vbox4), label7, FALSE, FALSE, 0); | |
237 gtk_label_set_use_markup (GTK_LABEL (label7), TRUE); | |
238 gtk_misc_set_alignment (GTK_MISC (label7), 0, 0.5); | |
239 | |
240 hbox3 = gtk_hbox_new (FALSE, 0); | |
241 gtk_widget_set_name (hbox3, "hbox3"); | |
242 gtk_widget_show (hbox3); | |
243 gtk_box_pack_start (GTK_BOX (vbox4), hbox3, FALSE, FALSE, 0); | |
244 | |
245 label8 = gtk_label_new (" "); | |
246 gtk_widget_set_name (label8, "label8"); | |
247 gtk_widget_show (label8); | |
248 gtk_box_pack_start (GTK_BOX (hbox3), label8, FALSE, FALSE, 0); | |
249 | |
250 table3 = gtk_table_new (2, 2, FALSE); | |
251 gtk_widget_set_name (table3, "table3"); | |
252 gtk_widget_show (table3); | |
253 gtk_box_pack_start (GTK_BOX (hbox3), table3, TRUE, TRUE, 0); | |
254 gtk_table_set_row_spacings (GTK_TABLE (table3), 6); | |
255 gtk_table_set_col_spacings (GTK_TABLE (table3), 6); | |
256 | |
257 hbox10 = gtk_hbox_new (FALSE, 6); | |
258 gtk_widget_set_name (hbox10, "hbox10"); | |
259 gtk_widget_show (hbox10); | |
260 gtk_table_attach (GTK_TABLE (table3), hbox10, 0, 2, 1, 2, | |
261 (GtkAttachOptions) (GTK_FILL), | |
262 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); | |
263 | |
264 custom_ratio_box = gtk_hbox_new (FALSE, 6); | |
265 gtk_widget_set_name (custom_ratio_box, "custom_ratio_box"); | |
266 gtk_widget_show (custom_ratio_box); | |
267 gtk_box_pack_start (GTK_BOX (hbox10), custom_ratio_box, TRUE, TRUE, 0); | |
268 | |
269 ratio_w_spinbutton_adj = gtk_adjustment_new (1, 1, 9999, 1, 10, 10); | |
270 ratio_w_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (ratio_w_spinbutton_adj), 1, 0); | |
271 gtk_widget_set_name (ratio_w_spinbutton, "ratio_w_spinbutton"); | |
272 gtk_widget_show (ratio_w_spinbutton); | |
273 gtk_box_pack_start (GTK_BOX (custom_ratio_box), ratio_w_spinbutton, FALSE, TRUE, 0); | |
274 | |
275 ratio_swap_button = gtk_button_new (); | |
276 gtk_widget_set_name (ratio_swap_button, "ratio_swap_button"); | |
277 gtk_widget_show (ratio_swap_button); | |
278 gtk_box_pack_start (GTK_BOX (custom_ratio_box), ratio_swap_button, FALSE, FALSE, 0); | |
279 gtk_button_set_relief (GTK_BUTTON (ratio_swap_button), GTK_RELIEF_NONE); | |
280 | |
281 eventbox1 = gtk_event_box_new (); | |
282 gtk_widget_set_name (eventbox1, "eventbox1"); | |
283 gtk_widget_show (eventbox1); | |
284 gtk_container_add (GTK_CONTAINER (ratio_swap_button), eventbox1); | |
285 | |
286 ratio_swap_image = gtk_image_new_from_stock ("gtk-refresh", GTK_ICON_SIZE_BUTTON); | |
287 gtk_widget_set_name (ratio_swap_image, "ratio_swap_image"); | |
288 gtk_widget_show (ratio_swap_image); | |
289 gtk_container_add (GTK_CONTAINER (eventbox1), ratio_swap_image); | |
290 | |
291 ratio_h_spinbutton_adj = gtk_adjustment_new (1, 1, 9999, 1, 10, 10); | |
292 ratio_h_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (ratio_h_spinbutton_adj), 1, 0); | |
293 gtk_widget_set_name (ratio_h_spinbutton, "ratio_h_spinbutton"); | |
294 gtk_widget_show (ratio_h_spinbutton); | |
295 gtk_box_pack_start (GTK_BOX (custom_ratio_box), ratio_h_spinbutton, FALSE, TRUE, 0); | |
296 gtk_spin_button_set_update_policy (GTK_SPIN_BUTTON (ratio_h_spinbutton), GTK_UPDATE_IF_VALID); | |
297 | |
298 ratio_optionmenu = gtk_option_menu_new (); | |
299 gtk_widget_set_name (ratio_optionmenu, "ratio_optionmenu"); | |
300 gtk_widget_show (ratio_optionmenu); | |
301 gtk_table_attach (GTK_TABLE (table3), ratio_optionmenu, 0, 2, 0, 1, | |
302 (GtkAttachOptions) (GTK_FILL), | |
303 (GtkAttachOptions) (0), 0, 0); | |
304 | |
305 menu1 = gtk_menu_new (); | |
306 gtk_widget_set_name (menu1, "menu1"); | |
307 | |
2
e359bea4c8ac
added code for ratio swap; new names for ratio operations; added main.h; some more
meillo@marmaro.de
parents:
1
diff
changeset
|
308 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
|
309 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
|
310 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
|
311 gtk_container_add (GTK_CONTAINER (menu1), ratio_none); |
0 | 312 |
2
e359bea4c8ac
added code for ratio swap; new names for ratio operations; added main.h; some more
meillo@marmaro.de
parents:
1
diff
changeset
|
313 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
|
314 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
|
315 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
|
316 gtk_container_add (GTK_CONTAINER (menu1), ratio_square); |
0 | 317 |
2
e359bea4c8ac
added code for ratio swap; new names for ratio operations; added main.h; some more
meillo@marmaro.de
parents:
1
diff
changeset
|
318 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
|
319 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
|
320 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
|
321 gtk_container_add (GTK_CONTAINER (menu1), ratio_4x3); |
0 | 322 |
2
e359bea4c8ac
added code for ratio swap; new names for ratio operations; added main.h; some more
meillo@marmaro.de
parents:
1
diff
changeset
|
323 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
|
324 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
|
325 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
|
326 gtk_container_add (GTK_CONTAINER (menu1), ratio_3x2); |
0 | 327 |
2
e359bea4c8ac
added code for ratio swap; new names for ratio operations; added main.h; some more
meillo@marmaro.de
parents:
1
diff
changeset
|
328 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
|
329 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
|
330 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
|
331 gtk_container_add (GTK_CONTAINER (menu1), ratio_custom); |
0 | 332 |
333 gtk_option_menu_set_menu (GTK_OPTION_MENU (ratio_optionmenu), menu1); | |
334 | |
335 vbox5 = gtk_vbox_new (FALSE, 0); | |
336 gtk_widget_set_name (vbox5, "vbox5"); | |
337 gtk_widget_show (vbox5); | |
338 gtk_box_pack_start (GTK_BOX (hbox1), vbox5, TRUE, TRUE, 0); | |
339 | |
340 frame1 = gtk_frame_new (NULL); | |
341 gtk_widget_set_name (frame1, "frame1"); | |
342 gtk_widget_show (frame1); | |
343 gtk_box_pack_start (GTK_BOX (vbox5), frame1, TRUE, TRUE, 0); | |
344 gtk_frame_set_shadow_type (GTK_FRAME (frame1), GTK_SHADOW_NONE); | |
345 | |
346 vbox7 = gtk_vbox_new (FALSE, 6); | |
347 gtk_widget_set_name (vbox7, "vbox7"); | |
348 gtk_widget_show (vbox7); | |
349 gtk_container_add (GTK_CONTAINER (frame1), vbox7); | |
350 | |
351 nav_container = gtk_hbox_new (FALSE, 0); | |
352 gtk_widget_set_name (nav_container, "nav_container"); | |
353 gtk_widget_show (nav_container); | |
354 gtk_box_pack_start (GTK_BOX (vbox7), nav_container, TRUE, TRUE, 0); | |
355 | |
5
61e5a1727231
added image widget, that displays the image
meillo@marmaro.de
parents:
4
diff
changeset
|
356 /* image_area */ |
61e5a1727231
added image widget, that displays the image
meillo@marmaro.de
parents:
4
diff
changeset
|
357 image_area = gtk_image_new_from_file (image_filename); |
61e5a1727231
added image widget, that displays the image
meillo@marmaro.de
parents:
4
diff
changeset
|
358 gtk_widget_set_name (image_area, "image_area"); |
61e5a1727231
added image widget, that displays the image
meillo@marmaro.de
parents:
4
diff
changeset
|
359 gtk_widget_show (image_area); |
61e5a1727231
added image widget, that displays the image
meillo@marmaro.de
parents:
4
diff
changeset
|
360 gtk_box_pack_start (GTK_BOX (nav_container), image_area, TRUE, TRUE, 0); |
61e5a1727231
added image widget, that displays the image
meillo@marmaro.de
parents:
4
diff
changeset
|
361 |
0 | 362 hbox16 = gtk_hbox_new (FALSE, 6); |
363 gtk_widget_set_name (hbox16, "hbox16"); | |
364 gtk_widget_show (hbox16); | |
365 gtk_box_pack_start (GTK_BOX (vbox7), hbox16, FALSE, TRUE, 0); | |
366 | |
367 hbox17 = gtk_hbox_new (FALSE, 0); | |
368 gtk_widget_set_name (hbox17, "hbox17"); | |
369 gtk_widget_show (hbox17); | |
370 gtk_box_pack_end (GTK_BOX (hbox16), hbox17, FALSE, TRUE, 0); | |
371 | |
372 crop_zoom_in_button = gtk_button_new (); | |
373 gtk_widget_set_name (crop_zoom_in_button, "crop_zoom_in_button"); | |
374 gtk_widget_show (crop_zoom_in_button); | |
375 gtk_box_pack_start (GTK_BOX (hbox17), crop_zoom_in_button, FALSE, FALSE, 0); | |
376 gtk_button_set_relief (GTK_BUTTON (crop_zoom_in_button), GTK_RELIEF_NONE); | |
377 | |
378 image2 = gtk_image_new_from_stock ("gtk-zoom-in", GTK_ICON_SIZE_BUTTON); | |
379 gtk_widget_set_name (image2, "image2"); | |
380 gtk_widget_show (image2); | |
381 gtk_container_add (GTK_CONTAINER (crop_zoom_in_button), image2); | |
382 | |
383 crop_zoom_out_button = gtk_button_new (); | |
384 gtk_widget_set_name (crop_zoom_out_button, "crop_zoom_out_button"); | |
385 gtk_widget_show (crop_zoom_out_button); | |
386 gtk_box_pack_start (GTK_BOX (hbox17), crop_zoom_out_button, FALSE, FALSE, 0); | |
387 gtk_button_set_relief (GTK_BUTTON (crop_zoom_out_button), GTK_RELIEF_NONE); | |
388 | |
389 image4 = gtk_image_new_from_stock ("gtk-zoom-out", GTK_ICON_SIZE_BUTTON); | |
390 gtk_widget_set_name (image4, "image4"); | |
391 gtk_widget_show (image4); | |
392 gtk_container_add (GTK_CONTAINER (crop_zoom_out_button), image4); | |
393 | |
394 crop_zoom_100_button = gtk_button_new (); | |
395 gtk_widget_set_name (crop_zoom_100_button, "crop_zoom_100_button"); | |
396 gtk_widget_show (crop_zoom_100_button); | |
397 gtk_box_pack_start (GTK_BOX (hbox17), crop_zoom_100_button, FALSE, FALSE, 0); | |
398 gtk_button_set_relief (GTK_BUTTON (crop_zoom_100_button), GTK_RELIEF_NONE); | |
399 | |
400 image3 = gtk_image_new_from_stock ("gtk-zoom-100", GTK_ICON_SIZE_BUTTON); | |
401 gtk_widget_set_name (image3, "image3"); | |
402 gtk_widget_show (image3); | |
403 gtk_container_add (GTK_CONTAINER (crop_zoom_100_button), image3); | |
404 | |
405 crop_zoom_fit_button = gtk_button_new (); | |
406 gtk_widget_set_name (crop_zoom_fit_button, "crop_zoom_fit_button"); | |
407 gtk_widget_show (crop_zoom_fit_button); | |
408 gtk_box_pack_start (GTK_BOX (hbox17), crop_zoom_fit_button, FALSE, FALSE, 0); | |
409 gtk_button_set_relief (GTK_BUTTON (crop_zoom_fit_button), GTK_RELIEF_NONE); | |
410 | |
411 image1 = gtk_image_new_from_stock ("gtk-zoom-fit", GTK_ICON_SIZE_BUTTON); | |
412 gtk_widget_set_name (image1, "image1"); | |
413 gtk_widget_show (image1); | |
414 gtk_container_add (GTK_CONTAINER (crop_zoom_fit_button), image1); | |
415 | |
1 | 416 |
2
e359bea4c8ac
added code for ratio swap; new names for ratio operations; added main.h; some more
meillo@marmaro.de
parents:
1
diff
changeset
|
417 |
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
|
418 /* |
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 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
|
420 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
|
421 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
|
422 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
|
423 */ |
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 |
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 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
|
426 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
|
427 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
|
428 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
|
429 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
|
430 |
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 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
|
432 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
|
433 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
|
434 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
|
435 |
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 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
|
437 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
|
438 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
|
439 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
|
440 |
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 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
|
442 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
|
443 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
|
444 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
|
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 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
|
447 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
|
448 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
|
449 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
|
450 |
e359bea4c8ac
added code for ratio swap; new names for ratio operations; added main.h; some more
meillo@marmaro.de
parents:
1
diff
changeset
|
451 |
e359bea4c8ac
added code for ratio swap; new names for ratio operations; added main.h; some more
meillo@marmaro.de
parents:
1
diff
changeset
|
452 |
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
|
453 |
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 |
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 /* 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
|
456 g_signal_connect (G_OBJECT (cropper_window), "destroy", |
0 | 457 G_CALLBACK (on_cropper_window_destroy), |
458 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
|
459 |
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
|
460 |
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 /* 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
|
462 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
|
463 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
|
464 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
|
465 |
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
|
466 |
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
|
467 |
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 /* 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
|
469 /* |
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
|
470 g_signal_connect (G_OBJECT (ratio_w_spinbutton), "value_changed", |
0 | 471 G_CALLBACK (on_ratio_w_spinbutton_value_changed), |
472 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
|
473 g_signal_connect (G_OBJECT (ratio_swap_button), "clicked", |
0 | 474 G_CALLBACK (on_ratio_swap_button_clicked), |
475 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
|
476 g_signal_connect (G_OBJECT (ratio_h_spinbutton), "value_changed", |
0 | 477 G_CALLBACK (on_ratio_h_spinbutton_value_changed), |
478 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
|
479 |
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
|
480 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
|
481 G_CALLBACK (on_ratio_none_activate), |
0 | 482 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
|
483 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
|
484 G_CALLBACK (on_ratio_square_activate), |
0 | 485 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
|
486 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
|
487 G_CALLBACK (on_ratio_4x3_activate), |
0 | 488 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
|
489 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
|
490 G_CALLBACK (on_ratio_3x2_activate), |
0 | 491 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
|
492 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
|
493 G_CALLBACK (on_ratio_custom_activate), |
0 | 494 NULL); |
495 | |
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
|
496 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
|
497 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
|
498 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
|
499 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
|
500 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
|
501 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
|
502 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
|
503 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
|
504 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
|
505 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
|
506 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
|
507 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
|
508 */ |
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 |
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 |
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 /* 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
|
512 /* |
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 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
|
514 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
|
515 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
|
516 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
|
517 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
|
518 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
|
519 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
|
520 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
|
521 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
|
522 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
|
523 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
|
524 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
|
525 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
|
526 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
|
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 */ |
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 |
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 |
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 /* 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
|
532 /* |
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 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
|
534 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
|
535 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
|
536 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
|
537 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
|
538 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
|
539 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
|
540 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
|
541 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
|
542 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
|
543 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
|
544 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
|
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 |
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
|
552 |
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
|
553 |
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
|
554 |
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
|
555 |
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
|
556 |
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
|
557 |
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
|
558 |
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
|
559 |
2
e359bea4c8ac
added code for ratio swap; new names for ratio operations; added main.h; some more
meillo@marmaro.de
parents:
1
diff
changeset
|
560 |
0 | 561 /* Store pointers to all widgets, for use by lookup_widget(). */ |
562 GLADE_HOOKUP_OBJECT_NO_REF (cropper_window, cropper_window, "cropper_window"); | |
563 GLADE_HOOKUP_OBJECT (cropper_window, dialog_vbox1, "dialog_vbox1"); | |
564 GLADE_HOOKUP_OBJECT (cropper_window, hbox1, "hbox1"); | |
565 GLADE_HOOKUP_OBJECT (cropper_window, vbox1, "vbox1"); | |
566 GLADE_HOOKUP_OBJECT (cropper_window, vbox2, "vbox2"); | |
567 GLADE_HOOKUP_OBJECT (cropper_window, label1, "label1"); | |
568 GLADE_HOOKUP_OBJECT (cropper_window, hbox2, "hbox2"); | |
569 GLADE_HOOKUP_OBJECT (cropper_window, label2, "label2"); | |
570 GLADE_HOOKUP_OBJECT (cropper_window, table2, "table2"); | |
571 GLADE_HOOKUP_OBJECT (cropper_window, label3, "label3"); | |
572 GLADE_HOOKUP_OBJECT (cropper_window, label5, "label5"); | |
573 GLADE_HOOKUP_OBJECT (cropper_window, label4, "label4"); | |
574 GLADE_HOOKUP_OBJECT (cropper_window, label6, "label6"); | |
575 GLADE_HOOKUP_OBJECT (cropper_window, hbox5, "hbox5"); | |
576 GLADE_HOOKUP_OBJECT (cropper_window, crop_x_spinbutton, "crop_x_spinbutton"); | |
577 GLADE_HOOKUP_OBJECT (cropper_window, hbox6, "hbox6"); | |
578 GLADE_HOOKUP_OBJECT (cropper_window, crop_y_spinbutton, "crop_y_spinbutton"); | |
579 GLADE_HOOKUP_OBJECT (cropper_window, hbox7, "hbox7"); | |
580 GLADE_HOOKUP_OBJECT (cropper_window, crop_width_spinbutton, "crop_width_spinbutton"); | |
581 GLADE_HOOKUP_OBJECT (cropper_window, hbox8, "hbox8"); | |
582 GLADE_HOOKUP_OBJECT (cropper_window, crop_height_spinbutton, "crop_height_spinbutton"); | |
583 GLADE_HOOKUP_OBJECT (cropper_window, vbox4, "vbox4"); | |
584 GLADE_HOOKUP_OBJECT (cropper_window, label7, "label7"); | |
585 GLADE_HOOKUP_OBJECT (cropper_window, hbox3, "hbox3"); | |
586 GLADE_HOOKUP_OBJECT (cropper_window, label8, "label8"); | |
587 GLADE_HOOKUP_OBJECT (cropper_window, table3, "table3"); | |
588 GLADE_HOOKUP_OBJECT (cropper_window, hbox10, "hbox10"); | |
589 GLADE_HOOKUP_OBJECT (cropper_window, custom_ratio_box, "custom_ratio_box"); | |
590 GLADE_HOOKUP_OBJECT (cropper_window, ratio_w_spinbutton, "ratio_w_spinbutton"); | |
591 GLADE_HOOKUP_OBJECT (cropper_window, ratio_swap_button, "ratio_swap_button"); | |
592 GLADE_HOOKUP_OBJECT (cropper_window, eventbox1, "eventbox1"); | |
593 GLADE_HOOKUP_OBJECT (cropper_window, ratio_swap_image, "ratio_swap_image"); | |
594 GLADE_HOOKUP_OBJECT (cropper_window, ratio_h_spinbutton, "ratio_h_spinbutton"); | |
595 GLADE_HOOKUP_OBJECT (cropper_window, ratio_optionmenu, "ratio_optionmenu"); | |
596 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
|
597 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
|
598 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
|
599 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
|
600 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
|
601 GLADE_HOOKUP_OBJECT (cropper_window, ratio_custom, "ratio_custom"); |
0 | 602 GLADE_HOOKUP_OBJECT (cropper_window, vbox5, "vbox5"); |
603 GLADE_HOOKUP_OBJECT (cropper_window, frame1, "frame1"); | |
604 GLADE_HOOKUP_OBJECT (cropper_window, vbox7, "vbox7"); | |
605 GLADE_HOOKUP_OBJECT (cropper_window, nav_container, "nav_container"); | |
5
61e5a1727231
added image widget, that displays the image
meillo@marmaro.de
parents:
4
diff
changeset
|
606 GLADE_HOOKUP_OBJECT (cropper_window, image_area, "image_area"); |
0 | 607 GLADE_HOOKUP_OBJECT (cropper_window, hbox16, "hbox16"); |
608 GLADE_HOOKUP_OBJECT (cropper_window, hbox17, "hbox17"); | |
609 GLADE_HOOKUP_OBJECT (cropper_window, crop_zoom_in_button, "crop_zoom_in_button"); | |
610 GLADE_HOOKUP_OBJECT (cropper_window, image2, "image2"); | |
611 GLADE_HOOKUP_OBJECT (cropper_window, crop_zoom_out_button, "crop_zoom_out_button"); | |
612 GLADE_HOOKUP_OBJECT (cropper_window, image4, "image4"); | |
613 GLADE_HOOKUP_OBJECT (cropper_window, crop_zoom_100_button, "crop_zoom_100_button"); | |
614 GLADE_HOOKUP_OBJECT (cropper_window, image3, "image3"); | |
615 GLADE_HOOKUP_OBJECT (cropper_window, crop_zoom_fit_button, "crop_zoom_fit_button"); | |
616 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
|
617 /*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
|
618 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
|
619 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
|
620 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
|
621 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
|
622 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
|
623 |
0 | 624 |
625 return cropper_window; | |
626 } | |
627 |