cropper
changeset 11:c18ba4ea1514
just cosmetic changes
author | meillo@marmaro.de |
---|---|
date | Thu, 04 Mar 2010 14:18:19 +0100 |
parents | 5e282003f0c1 |
children | 75a30c850ea0 |
files | callbacks.c callbacks.h interface.c main.c main.h support.c |
diffstat | 6 files changed, 558 insertions(+), 490 deletions(-) [+] |
line diff
1.1 --- a/callbacks.c Thu Mar 04 13:54:17 2010 +0100 1.2 +++ b/callbacks.c Thu Mar 04 14:18:19 2010 +0100 1.3 @@ -1,6 +1,5 @@ 1.4 #include <gtk/gtk.h> 1.5 #include <gdk-pixbuf/gdk-pixbuf.h> 1.6 - 1.7 #include "main.h" 1.8 #include "callbacks.h" 1.9 #include "support.h" 1.10 @@ -8,42 +7,54 @@ 1.11 int image_width; 1.12 int image_height; 1.13 float inc = 0.3; 1.14 + 1.15 + 1.16 /* 1.17 -void update_spin_button_ratio(GtkWidget* spinbutton) { 1.18 +void 1.19 +update_spin_button_ratio(GtkWidget* spinbutton) 1.20 +{ 1.21 g_print("ratio change: %f\n", ratio); 1.22 on_ratio_w_spinbutton_value_changed(spinbutton, NULL); 1.23 } 1.24 1.25 1.26 - 1.27 - 1.28 - 1.29 -void on_ratio_none_activate (GtkMenuItem* menuitem, gpointer user_data) { 1.30 +void 1.31 +on_ratio_none_activate(GtkMenuItem* menuitem, gpointer user_data) 1.32 +{ 1.33 ratio = 1; 1.34 update_spin_button_ratio(lookup_widget(cropper_window, "ratio_w_spinbutton")); 1.35 } 1.36 1.37 1.38 -void on_ratio_square_activate (GtkMenuItem* menuitem, gpointer user_data) { 1.39 +void 1.40 +on_ratio_square_activate(GtkMenuItem* menuitem, gpointer user_data) 1.41 +{ 1.42 ratio = 1; 1.43 update_spin_button_ratio(lookup_widget(cropper_window, "ratio_w_spinbutton")); 1.44 } 1.45 1.46 1.47 -void on_ratio_4x3_activate (GtkMenuItem* menuitem, gpointer user_data) { 1.48 +void 1.49 +on_ratio_4x3_activate(GtkMenuItem* menuitem, gpointer user_data) 1.50 +{ 1.51 ratio = 4.0/3.0; 1.52 update_spin_button_ratio(lookup_widget(cropper_window, "ratio_w_spinbutton")); 1.53 } 1.54 1.55 1.56 -void on_ratio_3x2_activate (GtkMenuItem* menuitem, gpointer user_data) { 1.57 +void 1.58 +on_ratio_3x2_activate(GtkMenuItem* menuitem, gpointer user_data) 1.59 +{ 1.60 ratio = 1.5; 1.61 update_spin_button_ratio(lookup_widget(cropper_window, "ratio_w_spinbutton")); 1.62 } 1.63 1.64 1.65 -void on_ratio_custom_activate (GtkMenuItem* menuitem, gpointer user_data) { 1.66 - ratio = gtk_spin_button_get_value(lookup_widget(cropper_window, "ratio_w_spinbutton")) / gtk_spin_button_get_value(lookup_widget(cropper_window, "ratio_h_spinbutton")); 1.67 +void 1.68 +on_ratio_custom_activate(GtkMenuItem* menuitem, gpointer user_data) 1.69 +{ 1.70 + ratio = gtk_spin_button_get_value(lookup_widget(cropper_window, "ratio_w_spinbutton")) 1.71 + / gtk_spin_button_get_value(lookup_widget(cropper_window, "ratio_h_spinbutton")); 1.72 update_spin_button_ratio(lookup_widget(cropper_window, "ratio_w_spinbutton")); 1.73 } 1.74 */ 1.75 @@ -57,8 +68,10 @@ 1.76 1.77 1.78 /* 1.79 -static void ratio_optionmenu_changed_cb (GtkOptionMenu* optionmenu, gpointer unser_data) { 1.80 - int idx = gtk_option_menu_get_history (optionmenu); 1.81 +static void 1.82 +ratio_optionmenu_changed_cb(GtkOptionMenu* optionmenu, gpointer unser_data) 1.83 +{ 1.84 + int idx = gtk_option_menu_get_history(optionmenu); 1.85 int w = 1, h = 1; 1.86 gboolean use_ratio = TRUE; 1.87 1.88 @@ -87,30 +100,39 @@ 1.89 break; 1.90 case GTH_CROP_RATIO_CUSTOM: 1.91 default: 1.92 - w = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (lookup_widget(cropper_window, "ratio_w_spinbutton"))); 1.93 - h = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (lookup_widget(cropper_window, "ratio_h_spinbutton"))); 1.94 + w = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON( 1.95 + lookup_widget(cropper_window, "ratio_w_spinbutton"))); 1.96 + h = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON( 1.97 + lookup_widget(cropper_window, "ratio_h_spinbutton"))); 1.98 break; 1.99 } 1.100 1.101 - gtk_widget_set_sensitive (lookup_widget(cropper_window, "custom_ratio_box"), idx == GTH_CROP_RATIO_CUSTOM); 1.102 - set_spin_value (cropper_window, lookup_widget(cropper_window, "ratio_w_spinbutton"), w); 1.103 - set_spin_value (cropper_window, lookup_widget(cropper_window, "ratio_h_spinbutton"), h); 1.104 + gtk_widget_set_sensitive(lookup_widget(cropper_window, "custom_ratio_box"), 1.105 + idx == GTH_CROP_RATIO_CUSTOM); 1.106 + set_spin_value(cropper_window, lookup_widget(cropper_window, "ratio_w_spinbutton"), w); 1.107 + set_spin_value(cropper_window, lookup_widget(cropper_window, "ratio_h_spinbutton"), h); 1.108 1.109 - gth_image_selector_set_ratio (GTH_IMAGE_SELECTOR (lookup_widget(cropper_window, "crop_image")), use_ratio, (double) w / h); 1.110 + gth_image_selector_set_ratio(GTH_IMAGE_SELECTOR(lookup_widget(cropper_window, "crop_image")), 1.111 + use_ratio, (double) w / h); 1.112 } 1.113 1.114 1.115 -static void ratio_value_changed_cb (GtkSpinButton* spin, gpointer unser_data) { 1.116 +static void 1.117 +ratio_value_changed_cb(GtkSpinButton* spin, gpointer unser_data) 1.118 +{ 1.119 int w, h; 1.120 1.121 - w = gtk_spin_button_get_value_as_int (lookup_widget(cropper_window, "ratio_w_spinbutton")); 1.122 - h = gtk_spin_button_get_value_as_int (lookup_widget(cropper_window, "ratio_h_spinbutton")); 1.123 + w = gtk_spin_button_get_value_as_int(lookup_widget(cropper_window, "ratio_w_spinbutton")); 1.124 + h = gtk_spin_button_get_value_as_int(lookup_widget(cropper_window, "ratio_h_spinbutton")); 1.125 1.126 - gth_image_selector_set_ratio (GTH_IMAGE_SELECTOR (lookup_widget(cropper_window, "crop_image")), TRUE, (double) w / h); 1.127 + gth_image_selector_set_ratio(GTH_IMAGE_SELECTOR( 1.128 + lookup_widget(cropper_window, "crop_image")), TRUE, (double) w / h); 1.129 } 1.130 1.131 1.132 -static void ratio_swap_button_cb (GtkButton* button, gpointer unser_data) { 1.133 +static void 1.134 +ratio_swap_button_cb(GtkButton* button, gpointer unser_data) 1.135 +{ 1.136 int w, h; 1.137 1.138 w = gtk_spin_button_get_value_as_int(lookup_widget(cropper_window, "ratio_w_spinbutton")); 1.139 @@ -119,7 +141,8 @@ 1.140 set_spin_value(cropper_window, lookup_widget(cropper_window, "ratio_w_spinbutton"), h); 1.141 set_spin_value(cropper_window, lookup_widget(cropper_window, "ratio_h_spinbutton"), w); 1.142 1.143 - gth_image_selector_set_ratio(GTH_IMAGE_SELECTOR (lookup_widget(cropper_window, "crop_image")), TRUE, (double) h / w); 1.144 + gth_image_selector_set_ratio(GTH_IMAGE_SELECTOR(lookup_widget(cropper_window, 1.145 + "crop_image")), TRUE, (double) h / w); 1.146 } 1.147 1.148 */ 1.149 @@ -132,31 +155,45 @@ 1.150 1.151 1.152 /* 1.153 -void on_ratio_w_spinbutton_value_changed (GtkSpinButton* spinbutton, gpointer user_data) { 1.154 +void 1.155 +on_ratio_w_spinbutton_value_changed(GtkSpinButton* spinbutton, gpointer user_data) 1.156 +{ 1.157 g_print("spinbutton W - ratio: %f\n", ratio); 1.158 - gtk_spin_button_set_value(lookup_widget(cropper_window, "ratio_h_spinbutton"), gtk_spin_button_get_value(spinbutton) / ratio); 1.159 + gtk_spin_button_set_value(lookup_widget(cropper_window, "ratio_h_spinbutton"), 1.160 + gtk_spin_button_get_value(spinbutton) / ratio); 1.161 } 1.162 1.163 1.164 -void on_ratio_w_spinbutton_change_value (GtkSpinButton* spinbutton, GtkScrollType scroll, gpointer user_data) { 1.165 +void 1.166 +on_ratio_w_spinbutton_change_value(GtkSpinButton* spinbutton, GtkScrollType scroll, gpointer user_data) 1.167 +{ 1.168 } 1.169 1.170 1.171 -void on_ratio_h_spinbutton_change_value (GtkSpinButton* spinbutton, GtkScrollType scroll, gpointer user_data) { 1.172 +void 1.173 +on_ratio_h_spinbutton_change_value(GtkSpinButton* spinbutton, GtkScrollType scroll, gpointer user_data) 1.174 +{ 1.175 } 1.176 1.177 1.178 -void on_ratio_h_spinbutton_value_changed (GtkSpinButton* spinbutton, gpointer user_data) { 1.179 +void 1.180 +on_ratio_h_spinbutton_value_changed(GtkSpinButton* spinbutton, gpointer user_data) 1.181 +{ 1.182 g_print("spinbutton H - ratio: %f\n", ratio); 1.183 - gtk_spin_button_set_value(lookup_widget(cropper_window, "ratio_w_spinbutton"), gtk_spin_button_get_value(spinbutton) * ratio); 1.184 + gtk_spin_button_set_value(lookup_widget(cropper_window, "ratio_w_spinbutton"), 1.185 + gtk_spin_button_get_value(spinbutton) * ratio); 1.186 1.187 } 1.188 1.189 1.190 -void on_ratio_swap_button_clicked (GtkButton* button, gpointer user_data) { 1.191 +void 1.192 +on_ratio_swap_button_clicked(GtkButton* button, gpointer user_data) 1.193 +{ 1.194 1.195 ratio = 1.0 / ratio; 1.196 - gtk_spin_button_set_value(lookup_widget(cropper_window, "ratio_w_spinbutton"), gtk_spin_button_get_value(lookup_widget(cropper_window, "ratio_h_spinbutton"))); 1.197 + gtk_spin_button_set_value(lookup_widget(cropper_window, "ratio_w_spinbutton"), 1.198 + gtk_spin_button_get_value(lookup_widget(cropper_window, 1.199 + "ratio_h_spinbutton"))); 1.200 gtk_spin_button_update(lookup_widget(cropper_window, "ratio_w_spinbutton")); 1.201 1.202 } 1.203 @@ -165,7 +202,9 @@ 1.204 1.205 1.206 /* zoom */ 1.207 -void set_zoom() { 1.208 +void 1.209 +set_zoom() 1.210 +{ 1.211 static GdkPixbuf* pixbuf_new; 1.212 g_object_unref(pixbuf_new); 1.213 1.214 @@ -173,30 +212,38 @@ 1.215 gtk_image_set_from_pixbuf((GtkImage*) lookup_widget(cropper_window, "image_area"), pixbuf_new); 1.216 } 1.217 1.218 -void on_zoom_in_button_clicked(GtkObject* object, gpointer user_data) { 1.219 +void 1.220 +on_zoom_in_button_clicked(GtkObject* object, gpointer user_data) 1.221 +{ 1.222 image_width *= 1 + inc; 1.223 image_height *= 1 + inc; 1.224 set_zoom(); 1.225 } 1.226 1.227 -void on_zoom_out_button_clicked(GtkObject* object, gpointer user_data) { 1.228 +void 1.229 +on_zoom_out_button_clicked(GtkObject* object, gpointer user_data) 1.230 +{ 1.231 image_width *= 1 - inc; 1.232 image_height *= 1 - inc; 1.233 set_zoom(); 1.234 } 1.235 1.236 -void on_zoom_100_button_clicked(GtkObject* object, gpointer user_data) { 1.237 +void 1.238 +on_zoom_100_button_clicked(GtkObject* object, gpointer user_data) 1.239 +{ 1.240 image_width = gdk_pixbuf_get_width(image_buffer); 1.241 image_height = gdk_pixbuf_get_height(image_buffer); 1.242 set_zoom(); 1.243 } 1.244 1.245 -void on_zoom_fit_button_clicked(GtkObject* object, gpointer user_data) { 1.246 +void 1.247 +on_zoom_fit_button_clicked(GtkObject* object, gpointer user_data) 1.248 +{ 1.249 int w, h; 1.250 GtkWidget* image_a; 1.251 1.252 image_a = (GtkWidget*) lookup_widget(cropper_window, "image_area"); 1.253 - gdk_drawable_get_size (image_a->window, &w, &h); 1.254 + gdk_drawable_get_size(image_a->window, &w, &h); 1.255 1.256 image_width = w - 200; 1.257 image_height = h - 150; 1.258 @@ -209,14 +256,20 @@ 1.259 1.260 1.261 1.262 -void on_crop_clicked(GtkButton* button, gpointer user_data) { 1.263 +void 1.264 +on_crop_clicked(GtkButton* button, gpointer user_data) 1.265 +{ 1.266 char crop_call[256]; 1.267 1.268 sprintf(crop_call, "echo \"convert -crop %ix%i+%i+%i %s cropped_%s\"", 1.269 - gtk_spin_button_get_value_as_int((GtkSpinButton*) lookup_widget(cropper_window, "crop_width_spinbutton")), 1.270 - gtk_spin_button_get_value_as_int((GtkSpinButton*) lookup_widget(cropper_window, "crop_height_spinbutton")), 1.271 - gtk_spin_button_get_value_as_int((GtkSpinButton*) lookup_widget(cropper_window, "crop_x_spinbutton")), 1.272 - gtk_spin_button_get_value_as_int((GtkSpinButton*) lookup_widget(cropper_window, "crop_y_spinbutton")), 1.273 + gtk_spin_button_get_value_as_int((GtkSpinButton*) lookup_widget(cropper_window, 1.274 + "crop_width_spinbutton")), 1.275 + gtk_spin_button_get_value_as_int((GtkSpinButton*) lookup_widget(cropper_window, 1.276 + "crop_height_spinbutton")), 1.277 + gtk_spin_button_get_value_as_int((GtkSpinButton*) lookup_widget(cropper_window, 1.278 + "crop_x_spinbutton")), 1.279 + gtk_spin_button_get_value_as_int((GtkSpinButton*) lookup_widget(cropper_window, 1.280 + "crop_y_spinbutton")), 1.281 image_filename, 1.282 image_filename 1.283 ); 1.284 @@ -224,19 +277,22 @@ 1.285 gtk_main_quit(); 1.286 } 1.287 1.288 -void on_cropper_window_create(GtkObject* object, gpointer user_data) { 1.289 + 1.290 +void 1.291 +on_cropper_window_create(GtkObject* object, gpointer user_data) 1.292 +{ 1.293 image_width = gdk_pixbuf_get_width(image_buffer); 1.294 image_height = gdk_pixbuf_get_height(image_buffer); 1.295 1.296 /* 1.297 - image_buffer = gdk_pixbuf_new_from_file(image_filename, NULL); 1.298 - image_area = gtk_image_new_from_pixbuf(image_buffer); 1.299 + image_buffer = gdk_pixbuf_new_from_file(image_filename, NULL); 1.300 + image_area = gtk_image_new_from_pixbuf(image_buffer); 1.301 1.302 int w, h; 1.303 GtkWidget* image_a; 1.304 1.305 image_a = (GtkWidget*) lookup_widget(cropper_window, "image_area"); 1.306 - gdk_drawable_get_size (image_a->window, &w, &h); 1.307 + gdk_drawable_get_size(image_a->window, &w, &h); 1.308 1.309 image_width = w - 200; 1.310 image_height = h - 150; 1.311 @@ -244,7 +300,9 @@ 1.312 */ 1.313 } 1.314 1.315 -void on_cropper_window_destroy(GtkObject* object, gpointer user_data) { 1.316 +void 1.317 +on_cropper_window_destroy(GtkObject* object, gpointer user_data) 1.318 +{ 1.319 gtk_main_quit(); 1.320 } 1.321
2.1 --- a/callbacks.h Thu Mar 04 13:54:17 2010 +0100 2.2 +++ b/callbacks.h Thu Mar 04 14:18:19 2010 +0100 2.3 @@ -12,9 +12,9 @@ 2.4 void on_ratio_3x2_activate(GtkMenuItem* menuitem, gpointer user_data); 2.5 void on_ratio_custom_activate(GtkMenuItem* menuitem, gpointer user_data); 2.6 2.7 -static void ratio_optionmenu_changed_cb (GtkOptionMenu* optionmenu, gpointer unser_data); 2.8 -static void ratio_value_changed_cb (GtkSpinButton* spin, gpointer unser_data); 2.9 -static void ratio_swap_button_cb (GtkButton* button, gpointer unser_data); 2.10 +static void ratio_optionmenu_changed_cb(GtkOptionMenu* optionmenu, gpointer unser_data); 2.11 +static void ratio_value_changed_cb(GtkSpinButton* spin, gpointer unser_data); 2.12 +static void ratio_swap_button_cb(GtkButton* button, gpointer unser_data); 2.13 2.14 void on_ratio_w_spinbutton_value_changed(GtkSpinButton* spinbutton, gpointer user_data); 2.15 void on_ratio_w_spinbutton_change_value(GtkSpinButton* spinbutton, GtkScrollType scroll, gpointer user_data);
3.1 --- a/interface.c Thu Mar 04 13:54:17 2010 +0100 3.2 +++ b/interface.c Thu Mar 04 14:18:19 2010 +0100 3.3 @@ -13,14 +13,14 @@ 3.4 #include "support.h" 3.5 3.6 #define GLADE_HOOKUP_OBJECT(component,widget,name) \ 3.7 - g_object_set_data_full (G_OBJECT (component), name, \ 3.8 - gtk_widget_ref (widget), (GDestroyNotify) gtk_widget_unref) 3.9 + g_object_set_data_full(G_OBJECT(component), name, \ 3.10 + gtk_widget_ref(widget),(GDestroyNotify) gtk_widget_unref) 3.11 3.12 #define GLADE_HOOKUP_OBJECT_NO_REF(component,widget,name) \ 3.13 - g_object_set_data (G_OBJECT (component), name, widget) 3.14 + g_object_set_data(G_OBJECT(component), name, widget) 3.15 3.16 GtkWidget* 3.17 -create_cropper_window (void) 3.18 +create_cropper_window(void) 3.19 { 3.20 GtkWidget *cropper_window; 3.21 GtkWidget *dialog_vbox1; 3.22 @@ -90,267 +90,266 @@ 3.23 GtkWidget *label12; 3.24 3.25 3.26 - cropper_window = gtk_window_new (GTK_WINDOW_TOPLEVEL); 3.27 - gtk_widget_set_name (cropper_window, "cropper_window"); 3.28 - gtk_container_set_border_width (GTK_CONTAINER (cropper_window), 6); 3.29 - gtk_window_set_title (GTK_WINDOW (cropper_window), "Cropper"); 3.30 + cropper_window = gtk_window_new(GTK_WINDOW_TOPLEVEL); 3.31 + gtk_widget_set_name(cropper_window, "cropper_window"); 3.32 + gtk_container_set_border_width(GTK_CONTAINER(cropper_window), 6); 3.33 + gtk_window_set_title(GTK_WINDOW(cropper_window), "Cropper"); 3.34 3.35 - dialog_vbox1 = gtk_vbox_new (FALSE, 6); 3.36 - gtk_widget_set_name (dialog_vbox1, "dialog_vbox1"); 3.37 - gtk_widget_show (dialog_vbox1); 3.38 - gtk_container_add (GTK_CONTAINER (cropper_window), dialog_vbox1); 3.39 + dialog_vbox1 = gtk_vbox_new(FALSE, 6); 3.40 + gtk_widget_set_name(dialog_vbox1, "dialog_vbox1"); 3.41 + gtk_widget_show(dialog_vbox1); 3.42 + gtk_container_add(GTK_CONTAINER(cropper_window), dialog_vbox1); 3.43 3.44 - hbox1 = gtk_hbox_new (FALSE, 12); 3.45 - gtk_widget_set_name (hbox1, "hbox1"); 3.46 - gtk_widget_show (hbox1); 3.47 - gtk_box_pack_start (GTK_BOX (dialog_vbox1), hbox1, TRUE, TRUE, 0); 3.48 - gtk_container_set_border_width (GTK_CONTAINER (hbox1), 5); 3.49 + hbox1 = gtk_hbox_new(FALSE, 12); 3.50 + gtk_widget_set_name(hbox1, "hbox1"); 3.51 + gtk_widget_show(hbox1); 3.52 + gtk_box_pack_start(GTK_BOX(dialog_vbox1), hbox1, TRUE, TRUE, 0); 3.53 + gtk_container_set_border_width(GTK_CONTAINER(hbox1), 5); 3.54 3.55 - vbox1 = gtk_vbox_new (FALSE, 12); 3.56 - gtk_widget_set_name (vbox1, "vbox1"); 3.57 - gtk_widget_show (vbox1); 3.58 - gtk_box_pack_start (GTK_BOX (hbox1), vbox1, FALSE, TRUE, 0); 3.59 + vbox1 = gtk_vbox_new(FALSE, 12); 3.60 + gtk_widget_set_name(vbox1, "vbox1"); 3.61 + gtk_widget_show(vbox1); 3.62 + gtk_box_pack_start(GTK_BOX(hbox1), vbox1, FALSE, TRUE, 0); 3.63 3.64 - vbox2 = gtk_vbox_new (FALSE, 6); 3.65 - gtk_widget_set_name (vbox2, "vbox2"); 3.66 - gtk_widget_show (vbox2); 3.67 - gtk_box_pack_start (GTK_BOX (vbox1), vbox2, FALSE, TRUE, 0); 3.68 + vbox2 = gtk_vbox_new(FALSE, 6); 3.69 + gtk_widget_set_name(vbox2, "vbox2"); 3.70 + gtk_widget_show(vbox2); 3.71 + gtk_box_pack_start(GTK_BOX(vbox1), vbox2, FALSE, TRUE, 0); 3.72 3.73 - label1 = gtk_label_new ("<b>Selection</b>"); 3.74 - gtk_widget_set_name (label1, "label1"); 3.75 - gtk_widget_show (label1); 3.76 - gtk_box_pack_start (GTK_BOX (vbox2), label1, FALSE, FALSE, 0); 3.77 - gtk_label_set_use_markup (GTK_LABEL (label1), TRUE); 3.78 - gtk_misc_set_alignment (GTK_MISC (label1), 0, 0.5); 3.79 + label1 = gtk_label_new("<b>Selection</b>"); 3.80 + gtk_widget_set_name(label1, "label1"); 3.81 + gtk_widget_show(label1); 3.82 + gtk_box_pack_start(GTK_BOX(vbox2), label1, FALSE, FALSE, 0); 3.83 + gtk_label_set_use_markup(GTK_LABEL(label1), TRUE); 3.84 + gtk_misc_set_alignment(GTK_MISC(label1), 0, 0.5); 3.85 3.86 - hbox2 = gtk_hbox_new (FALSE, 0); 3.87 - gtk_widget_set_name (hbox2, "hbox2"); 3.88 - gtk_widget_show (hbox2); 3.89 - gtk_box_pack_start (GTK_BOX (vbox2), hbox2, FALSE, TRUE, 0); 3.90 + hbox2 = gtk_hbox_new(FALSE, 0); 3.91 + gtk_widget_set_name(hbox2, "hbox2"); 3.92 + gtk_widget_show(hbox2); 3.93 + gtk_box_pack_start(GTK_BOX(vbox2), hbox2, FALSE, TRUE, 0); 3.94 3.95 - label2 = gtk_label_new (" "); 3.96 - gtk_widget_set_name (label2, "label2"); 3.97 - gtk_widget_show (label2); 3.98 - gtk_box_pack_start (GTK_BOX (hbox2), label2, FALSE, FALSE, 0); 3.99 + label2 = gtk_label_new(" "); 3.100 + gtk_widget_set_name(label2, "label2"); 3.101 + gtk_widget_show(label2); 3.102 + gtk_box_pack_start(GTK_BOX(hbox2), label2, FALSE, FALSE, 0); 3.103 3.104 - table2 = gtk_table_new (4, 2, FALSE); 3.105 - gtk_widget_set_name (table2, "table2"); 3.106 - gtk_widget_show (table2); 3.107 - gtk_box_pack_start (GTK_BOX (hbox2), table2, TRUE, TRUE, 0); 3.108 - gtk_table_set_row_spacings (GTK_TABLE (table2), 6); 3.109 - gtk_table_set_col_spacings (GTK_TABLE (table2), 6); 3.110 + table2 = gtk_table_new(4, 2, FALSE); 3.111 + gtk_widget_set_name(table2, "table2"); 3.112 + gtk_widget_show(table2); 3.113 + gtk_box_pack_start(GTK_BOX(hbox2), table2, TRUE, TRUE, 0); 3.114 + gtk_table_set_row_spacings(GTK_TABLE(table2), 6); 3.115 + gtk_table_set_col_spacings(GTK_TABLE(table2), 6); 3.116 3.117 - label3 = gtk_label_new_with_mnemonic ("_X:"); 3.118 - gtk_widget_set_name (label3, "label3"); 3.119 - gtk_widget_show (label3); 3.120 - gtk_table_attach (GTK_TABLE (table2), label3, 0, 1, 0, 1, 3.121 - (GtkAttachOptions) (GTK_FILL), 3.122 - (GtkAttachOptions) (0), 0, 0); 3.123 - gtk_misc_set_alignment (GTK_MISC (label3), 0, 0.5); 3.124 + label3 = gtk_label_new_with_mnemonic("_X:"); 3.125 + gtk_widget_set_name(label3, "label3"); 3.126 + gtk_widget_show(label3); 3.127 + gtk_table_attach(GTK_TABLE(table2), label3, 0, 1, 0, 1,(GtkAttachOptions)(GTK_FILL), 3.128 + (GtkAttachOptions)(0), 0, 0); 3.129 + gtk_misc_set_alignment(GTK_MISC(label3), 0, 0.5); 3.130 3.131 - label5 = gtk_label_new_with_mnemonic ("_Y:"); 3.132 - gtk_widget_set_name (label5, "label5"); 3.133 - gtk_widget_show (label5); 3.134 - gtk_table_attach (GTK_TABLE (table2), label5, 0, 1, 1, 2, 3.135 - (GtkAttachOptions) (GTK_FILL), 3.136 - (GtkAttachOptions) (0), 0, 0); 3.137 - gtk_misc_set_alignment (GTK_MISC (label5), 0, 0.5); 3.138 + label5 = gtk_label_new_with_mnemonic("_Y:"); 3.139 + gtk_widget_set_name(label5, "label5"); 3.140 + gtk_widget_show(label5); 3.141 + gtk_table_attach(GTK_TABLE(table2), label5, 0, 1, 1, 2, 3.142 + (GtkAttachOptions)(GTK_FILL), 3.143 + (GtkAttachOptions)(0), 0, 0); 3.144 + gtk_misc_set_alignment(GTK_MISC(label5), 0, 0.5); 3.145 3.146 - label4 = gtk_label_new_with_mnemonic ("_Width:"); 3.147 - gtk_widget_set_name (label4, "label4"); 3.148 - gtk_widget_show (label4); 3.149 - gtk_table_attach (GTK_TABLE (table2), label4, 0, 1, 2, 3, 3.150 - (GtkAttachOptions) (GTK_FILL), 3.151 - (GtkAttachOptions) (0), 0, 0); 3.152 - gtk_misc_set_alignment (GTK_MISC (label4), 0, 0.5); 3.153 + label4 = gtk_label_new_with_mnemonic("_Width:"); 3.154 + gtk_widget_set_name(label4, "label4"); 3.155 + gtk_widget_show(label4); 3.156 + gtk_table_attach(GTK_TABLE(table2), label4, 0, 1, 2, 3, 3.157 + (GtkAttachOptions)(GTK_FILL), 3.158 + (GtkAttachOptions)(0), 0, 0); 3.159 + gtk_misc_set_alignment(GTK_MISC(label4), 0, 0.5); 3.160 3.161 - label6 = gtk_label_new_with_mnemonic ("_Height:"); 3.162 - gtk_widget_set_name (label6, "label6"); 3.163 - gtk_widget_show (label6); 3.164 - gtk_table_attach (GTK_TABLE (table2), label6, 0, 1, 3, 4, 3.165 - (GtkAttachOptions) (GTK_FILL), 3.166 - (GtkAttachOptions) (0), 0, 0); 3.167 - gtk_misc_set_alignment (GTK_MISC (label6), 0, 0.5); 3.168 + label6 = gtk_label_new_with_mnemonic("_Height:"); 3.169 + gtk_widget_set_name(label6, "label6"); 3.170 + gtk_widget_show(label6); 3.171 + gtk_table_attach(GTK_TABLE(table2), label6, 0, 1, 3, 4, 3.172 + (GtkAttachOptions)(GTK_FILL), 3.173 + (GtkAttachOptions)(0), 0, 0); 3.174 + gtk_misc_set_alignment(GTK_MISC(label6), 0, 0.5); 3.175 3.176 - hbox5 = gtk_hbox_new (FALSE, 0); 3.177 - gtk_widget_set_name (hbox5, "hbox5"); 3.178 - gtk_widget_show (hbox5); 3.179 - gtk_table_attach (GTK_TABLE (table2), hbox5, 1, 2, 0, 1, 3.180 - (GtkAttachOptions) (GTK_FILL), 3.181 - (GtkAttachOptions) (GTK_FILL), 0, 0); 3.182 + hbox5 = gtk_hbox_new(FALSE, 0); 3.183 + gtk_widget_set_name(hbox5, "hbox5"); 3.184 + gtk_widget_show(hbox5); 3.185 + gtk_table_attach(GTK_TABLE(table2), hbox5, 1, 2, 0, 1, 3.186 + (GtkAttachOptions)(GTK_FILL), 3.187 + (GtkAttachOptions)(GTK_FILL), 0, 0); 3.188 3.189 - crop_x_spinbutton_adj = gtk_adjustment_new (1, 0, 300, 1, 10, 1); 3.190 - crop_x_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (crop_x_spinbutton_adj), 1, 0); 3.191 - gtk_widget_set_name (crop_x_spinbutton, "crop_x_spinbutton"); 3.192 - gtk_widget_show (crop_x_spinbutton); 3.193 - gtk_box_pack_start (GTK_BOX (hbox5), crop_x_spinbutton, FALSE, TRUE, 0); 3.194 + crop_x_spinbutton_adj = gtk_adjustment_new(1, 0, 300, 1, 10, 1); 3.195 + crop_x_spinbutton = gtk_spin_button_new(GTK_ADJUSTMENT(crop_x_spinbutton_adj), 1, 0); 3.196 + gtk_widget_set_name(crop_x_spinbutton, "crop_x_spinbutton"); 3.197 + gtk_widget_show(crop_x_spinbutton); 3.198 + gtk_box_pack_start(GTK_BOX(hbox5), crop_x_spinbutton, FALSE, TRUE, 0); 3.199 3.200 - hbox6 = gtk_hbox_new (FALSE, 0); 3.201 - gtk_widget_set_name (hbox6, "hbox6"); 3.202 - gtk_widget_show (hbox6); 3.203 - gtk_table_attach (GTK_TABLE (table2), hbox6, 1, 2, 1, 2, 3.204 - (GtkAttachOptions) (GTK_FILL), 3.205 - (GtkAttachOptions) (GTK_FILL), 0, 0); 3.206 + hbox6 = gtk_hbox_new(FALSE, 0); 3.207 + gtk_widget_set_name(hbox6, "hbox6"); 3.208 + gtk_widget_show(hbox6); 3.209 + gtk_table_attach(GTK_TABLE(table2), hbox6, 1, 2, 1, 2, 3.210 + (GtkAttachOptions)(GTK_FILL), 3.211 + (GtkAttachOptions)(GTK_FILL), 0, 0); 3.212 3.213 - crop_y_spinbutton_adj = gtk_adjustment_new (1, 0, 300, 1, 10, 1); 3.214 - crop_y_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (crop_y_spinbutton_adj), 1, 0); 3.215 - gtk_widget_set_name (crop_y_spinbutton, "crop_y_spinbutton"); 3.216 - gtk_widget_show (crop_y_spinbutton); 3.217 - gtk_box_pack_start (GTK_BOX (hbox6), crop_y_spinbutton, FALSE, TRUE, 0); 3.218 + crop_y_spinbutton_adj = gtk_adjustment_new(1, 0, 300, 1, 10, 1); 3.219 + crop_y_spinbutton = gtk_spin_button_new(GTK_ADJUSTMENT(crop_y_spinbutton_adj), 1, 0); 3.220 + gtk_widget_set_name(crop_y_spinbutton, "crop_y_spinbutton"); 3.221 + gtk_widget_show(crop_y_spinbutton); 3.222 + gtk_box_pack_start(GTK_BOX(hbox6), crop_y_spinbutton, FALSE, TRUE, 0); 3.223 3.224 - hbox7 = gtk_hbox_new (FALSE, 0); 3.225 - gtk_widget_set_name (hbox7, "hbox7"); 3.226 - gtk_widget_show (hbox7); 3.227 - gtk_table_attach (GTK_TABLE (table2), hbox7, 1, 2, 2, 3, 3.228 - (GtkAttachOptions) (GTK_FILL), 3.229 - (GtkAttachOptions) (GTK_FILL), 0, 0); 3.230 + hbox7 = gtk_hbox_new(FALSE, 0); 3.231 + gtk_widget_set_name(hbox7, "hbox7"); 3.232 + gtk_widget_show(hbox7); 3.233 + gtk_table_attach(GTK_TABLE(table2), hbox7, 1, 2, 2, 3, 3.234 + (GtkAttachOptions)(GTK_FILL), 3.235 + (GtkAttachOptions)(GTK_FILL), 0, 0); 3.236 3.237 - crop_width_spinbutton_adj = gtk_adjustment_new (1, 0, 300, 1, 10, 1); 3.238 - crop_width_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (crop_width_spinbutton_adj), 1, 0); 3.239 - gtk_widget_set_name (crop_width_spinbutton, "crop_width_spinbutton"); 3.240 - gtk_widget_show (crop_width_spinbutton); 3.241 - gtk_box_pack_start (GTK_BOX (hbox7), crop_width_spinbutton, FALSE, FALSE, 0); 3.242 + crop_width_spinbutton_adj = gtk_adjustment_new(1, 0, 300, 1, 10, 1); 3.243 + crop_width_spinbutton = gtk_spin_button_new(GTK_ADJUSTMENT(crop_width_spinbutton_adj), 1, 0); 3.244 + gtk_widget_set_name(crop_width_spinbutton, "crop_width_spinbutton"); 3.245 + gtk_widget_show(crop_width_spinbutton); 3.246 + gtk_box_pack_start(GTK_BOX(hbox7), crop_width_spinbutton, FALSE, FALSE, 0); 3.247 3.248 - hbox8 = gtk_hbox_new (FALSE, 0); 3.249 - gtk_widget_set_name (hbox8, "hbox8"); 3.250 - gtk_widget_show (hbox8); 3.251 - gtk_table_attach (GTK_TABLE (table2), hbox8, 1, 2, 3, 4, 3.252 - (GtkAttachOptions) (GTK_FILL), 3.253 - (GtkAttachOptions) (GTK_FILL), 0, 0); 3.254 + hbox8 = gtk_hbox_new(FALSE, 0); 3.255 + gtk_widget_set_name(hbox8, "hbox8"); 3.256 + gtk_widget_show(hbox8); 3.257 + gtk_table_attach(GTK_TABLE(table2), hbox8, 1, 2, 3, 4, 3.258 + (GtkAttachOptions)(GTK_FILL), 3.259 + (GtkAttachOptions)(GTK_FILL), 0, 0); 3.260 3.261 - crop_height_spinbutton_adj = gtk_adjustment_new (1, 0, 300, 1, 10, 1); 3.262 - crop_height_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (crop_height_spinbutton_adj), 1, 0); 3.263 - gtk_widget_set_name (crop_height_spinbutton, "crop_height_spinbutton"); 3.264 - gtk_widget_show (crop_height_spinbutton); 3.265 - gtk_box_pack_start (GTK_BOX (hbox8), crop_height_spinbutton, FALSE, FALSE, 0); 3.266 + crop_height_spinbutton_adj = gtk_adjustment_new(1, 0, 300, 1, 10, 1); 3.267 + crop_height_spinbutton = gtk_spin_button_new(GTK_ADJUSTMENT(crop_height_spinbutton_adj), 1, 0); 3.268 + gtk_widget_set_name(crop_height_spinbutton, "crop_height_spinbutton"); 3.269 + gtk_widget_show(crop_height_spinbutton); 3.270 + gtk_box_pack_start(GTK_BOX(hbox8), crop_height_spinbutton, FALSE, FALSE, 0); 3.271 3.272 - vbox4 = gtk_vbox_new (FALSE, 6); 3.273 - gtk_widget_set_name (vbox4, "vbox4"); 3.274 - gtk_widget_show (vbox4); 3.275 - gtk_box_pack_start (GTK_BOX (vbox1), vbox4, FALSE, TRUE, 0); 3.276 + vbox4 = gtk_vbox_new(FALSE, 6); 3.277 + gtk_widget_set_name(vbox4, "vbox4"); 3.278 + gtk_widget_show(vbox4); 3.279 + gtk_box_pack_start(GTK_BOX(vbox1), vbox4, FALSE, TRUE, 0); 3.280 3.281 - label7 = gtk_label_new ("<b>Aspect ratio</b>"); 3.282 - gtk_widget_set_name (label7, "label7"); 3.283 - gtk_widget_show (label7); 3.284 - gtk_box_pack_start (GTK_BOX (vbox4), label7, FALSE, FALSE, 0); 3.285 - gtk_label_set_use_markup (GTK_LABEL (label7), TRUE); 3.286 - gtk_misc_set_alignment (GTK_MISC (label7), 0, 0.5); 3.287 + label7 = gtk_label_new("<b>Aspect ratio</b>"); 3.288 + gtk_widget_set_name(label7, "label7"); 3.289 + gtk_widget_show(label7); 3.290 + gtk_box_pack_start(GTK_BOX(vbox4), label7, FALSE, FALSE, 0); 3.291 + gtk_label_set_use_markup(GTK_LABEL(label7), TRUE); 3.292 + gtk_misc_set_alignment(GTK_MISC(label7), 0, 0.5); 3.293 3.294 - hbox3 = gtk_hbox_new (FALSE, 0); 3.295 - gtk_widget_set_name (hbox3, "hbox3"); 3.296 - gtk_widget_show (hbox3); 3.297 - gtk_box_pack_start (GTK_BOX (vbox4), hbox3, FALSE, FALSE, 0); 3.298 + hbox3 = gtk_hbox_new(FALSE, 0); 3.299 + gtk_widget_set_name(hbox3, "hbox3"); 3.300 + gtk_widget_show(hbox3); 3.301 + gtk_box_pack_start(GTK_BOX(vbox4), hbox3, FALSE, FALSE, 0); 3.302 3.303 - label8 = gtk_label_new (" "); 3.304 - gtk_widget_set_name (label8, "label8"); 3.305 - gtk_widget_show (label8); 3.306 - gtk_box_pack_start (GTK_BOX (hbox3), label8, FALSE, FALSE, 0); 3.307 + label8 = gtk_label_new(" "); 3.308 + gtk_widget_set_name(label8, "label8"); 3.309 + gtk_widget_show(label8); 3.310 + gtk_box_pack_start(GTK_BOX(hbox3), label8, FALSE, FALSE, 0); 3.311 3.312 - table3 = gtk_table_new (2, 2, FALSE); 3.313 - gtk_widget_set_name (table3, "table3"); 3.314 - gtk_widget_show (table3); 3.315 - gtk_box_pack_start (GTK_BOX (hbox3), table3, TRUE, TRUE, 0); 3.316 - gtk_table_set_row_spacings (GTK_TABLE (table3), 6); 3.317 - gtk_table_set_col_spacings (GTK_TABLE (table3), 6); 3.318 + table3 = gtk_table_new(2, 2, FALSE); 3.319 + gtk_widget_set_name(table3, "table3"); 3.320 + gtk_widget_show(table3); 3.321 + gtk_box_pack_start(GTK_BOX(hbox3), table3, TRUE, TRUE, 0); 3.322 + gtk_table_set_row_spacings(GTK_TABLE(table3), 6); 3.323 + gtk_table_set_col_spacings(GTK_TABLE(table3), 6); 3.324 3.325 - hbox10 = gtk_hbox_new (FALSE, 6); 3.326 - gtk_widget_set_name (hbox10, "hbox10"); 3.327 - gtk_widget_show (hbox10); 3.328 - gtk_table_attach (GTK_TABLE (table3), hbox10, 0, 2, 1, 2, 3.329 - (GtkAttachOptions) (GTK_FILL), 3.330 - (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); 3.331 + hbox10 = gtk_hbox_new(FALSE, 6); 3.332 + gtk_widget_set_name(hbox10, "hbox10"); 3.333 + gtk_widget_show(hbox10); 3.334 + gtk_table_attach(GTK_TABLE(table3), hbox10, 0, 2, 1, 2, 3.335 + (GtkAttachOptions)(GTK_FILL), 3.336 + (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), 0, 0); 3.337 3.338 - custom_ratio_box = gtk_hbox_new (FALSE, 6); 3.339 - gtk_widget_set_name (custom_ratio_box, "custom_ratio_box"); 3.340 - gtk_widget_show (custom_ratio_box); 3.341 - gtk_box_pack_start (GTK_BOX (hbox10), custom_ratio_box, TRUE, TRUE, 0); 3.342 + custom_ratio_box = gtk_hbox_new(FALSE, 6); 3.343 + gtk_widget_set_name(custom_ratio_box, "custom_ratio_box"); 3.344 + gtk_widget_show(custom_ratio_box); 3.345 + gtk_box_pack_start(GTK_BOX(hbox10), custom_ratio_box, TRUE, TRUE, 0); 3.346 3.347 - ratio_w_spinbutton_adj = gtk_adjustment_new (1, 1, 9999, 1, 10, 10); 3.348 - ratio_w_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (ratio_w_spinbutton_adj), 1, 0); 3.349 - gtk_widget_set_name (ratio_w_spinbutton, "ratio_w_spinbutton"); 3.350 - gtk_widget_show (ratio_w_spinbutton); 3.351 - gtk_box_pack_start (GTK_BOX (custom_ratio_box), ratio_w_spinbutton, FALSE, TRUE, 0); 3.352 + ratio_w_spinbutton_adj = gtk_adjustment_new(1, 1, 9999, 1, 10, 10); 3.353 + ratio_w_spinbutton = gtk_spin_button_new(GTK_ADJUSTMENT(ratio_w_spinbutton_adj), 1, 0); 3.354 + gtk_widget_set_name(ratio_w_spinbutton, "ratio_w_spinbutton"); 3.355 + gtk_widget_show(ratio_w_spinbutton); 3.356 + gtk_box_pack_start(GTK_BOX(custom_ratio_box), ratio_w_spinbutton, FALSE, TRUE, 0); 3.357 3.358 - ratio_swap_button = gtk_button_new (); 3.359 - gtk_widget_set_name (ratio_swap_button, "ratio_swap_button"); 3.360 - gtk_widget_show (ratio_swap_button); 3.361 - gtk_box_pack_start (GTK_BOX (custom_ratio_box), ratio_swap_button, FALSE, FALSE, 0); 3.362 - gtk_button_set_relief (GTK_BUTTON (ratio_swap_button), GTK_RELIEF_NONE); 3.363 + ratio_swap_button = gtk_button_new(); 3.364 + gtk_widget_set_name(ratio_swap_button, "ratio_swap_button"); 3.365 + gtk_widget_show(ratio_swap_button); 3.366 + gtk_box_pack_start(GTK_BOX(custom_ratio_box), ratio_swap_button, FALSE, FALSE, 0); 3.367 + gtk_button_set_relief(GTK_BUTTON(ratio_swap_button), GTK_RELIEF_NONE); 3.368 3.369 - eventbox1 = gtk_event_box_new (); 3.370 - gtk_widget_set_name (eventbox1, "eventbox1"); 3.371 - gtk_widget_show (eventbox1); 3.372 - gtk_container_add (GTK_CONTAINER (ratio_swap_button), eventbox1); 3.373 + eventbox1 = gtk_event_box_new(); 3.374 + gtk_widget_set_name(eventbox1, "eventbox1"); 3.375 + gtk_widget_show(eventbox1); 3.376 + gtk_container_add(GTK_CONTAINER(ratio_swap_button), eventbox1); 3.377 3.378 - ratio_swap_image = gtk_image_new_from_stock ("gtk-refresh", GTK_ICON_SIZE_BUTTON); 3.379 - gtk_widget_set_name (ratio_swap_image, "ratio_swap_image"); 3.380 - gtk_widget_show (ratio_swap_image); 3.381 - gtk_container_add (GTK_CONTAINER (eventbox1), ratio_swap_image); 3.382 + ratio_swap_image = gtk_image_new_from_stock("gtk-refresh", GTK_ICON_SIZE_BUTTON); 3.383 + gtk_widget_set_name(ratio_swap_image, "ratio_swap_image"); 3.384 + gtk_widget_show(ratio_swap_image); 3.385 + gtk_container_add(GTK_CONTAINER(eventbox1), ratio_swap_image); 3.386 3.387 - ratio_h_spinbutton_adj = gtk_adjustment_new (1, 1, 9999, 1, 10, 10); 3.388 - ratio_h_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (ratio_h_spinbutton_adj), 1, 0); 3.389 - gtk_widget_set_name (ratio_h_spinbutton, "ratio_h_spinbutton"); 3.390 - gtk_widget_show (ratio_h_spinbutton); 3.391 - gtk_box_pack_start (GTK_BOX (custom_ratio_box), ratio_h_spinbutton, FALSE, TRUE, 0); 3.392 - gtk_spin_button_set_update_policy (GTK_SPIN_BUTTON (ratio_h_spinbutton), GTK_UPDATE_IF_VALID); 3.393 + ratio_h_spinbutton_adj = gtk_adjustment_new(1, 1, 9999, 1, 10, 10); 3.394 + ratio_h_spinbutton = gtk_spin_button_new(GTK_ADJUSTMENT(ratio_h_spinbutton_adj), 1, 0); 3.395 + gtk_widget_set_name(ratio_h_spinbutton, "ratio_h_spinbutton"); 3.396 + gtk_widget_show(ratio_h_spinbutton); 3.397 + gtk_box_pack_start(GTK_BOX(custom_ratio_box), ratio_h_spinbutton, FALSE, TRUE, 0); 3.398 + gtk_spin_button_set_update_policy(GTK_SPIN_BUTTON(ratio_h_spinbutton), GTK_UPDATE_IF_VALID); 3.399 3.400 - ratio_optionmenu = gtk_option_menu_new (); 3.401 - gtk_widget_set_name (ratio_optionmenu, "ratio_optionmenu"); 3.402 - gtk_widget_show (ratio_optionmenu); 3.403 - gtk_table_attach (GTK_TABLE (table3), ratio_optionmenu, 0, 2, 0, 1, 3.404 - (GtkAttachOptions) (GTK_FILL), 3.405 - (GtkAttachOptions) (0), 0, 0); 3.406 + ratio_optionmenu = gtk_option_menu_new(); 3.407 + gtk_widget_set_name(ratio_optionmenu, "ratio_optionmenu"); 3.408 + gtk_widget_show(ratio_optionmenu); 3.409 + gtk_table_attach(GTK_TABLE(table3), ratio_optionmenu, 0, 2, 0, 1, 3.410 + (GtkAttachOptions)(GTK_FILL), 3.411 + (GtkAttachOptions)(0), 0, 0); 3.412 3.413 - menu1 = gtk_menu_new (); 3.414 - gtk_widget_set_name (menu1, "menu1"); 3.415 + menu1 = gtk_menu_new(); 3.416 + gtk_widget_set_name(menu1, "menu1"); 3.417 3.418 - ratio_none = gtk_menu_item_new_with_mnemonic ("None"); 3.419 - gtk_widget_set_name (ratio_none, "ratio_none"); 3.420 - gtk_widget_show (ratio_none); 3.421 - gtk_container_add (GTK_CONTAINER (menu1), ratio_none); 3.422 + ratio_none = gtk_menu_item_new_with_mnemonic("None"); 3.423 + gtk_widget_set_name(ratio_none, "ratio_none"); 3.424 + gtk_widget_show(ratio_none); 3.425 + gtk_container_add(GTK_CONTAINER(menu1), ratio_none); 3.426 3.427 - ratio_square = gtk_menu_item_new_with_mnemonic ("Square"); 3.428 - gtk_widget_set_name (ratio_square, "ratio_square"); 3.429 - gtk_widget_show (ratio_square); 3.430 - gtk_container_add (GTK_CONTAINER (menu1), ratio_square); 3.431 + ratio_square = gtk_menu_item_new_with_mnemonic("Square"); 3.432 + gtk_widget_set_name(ratio_square, "ratio_square"); 3.433 + gtk_widget_show(ratio_square); 3.434 + gtk_container_add(GTK_CONTAINER(menu1), ratio_square); 3.435 3.436 - ratio_4x3 = gtk_menu_item_new_with_mnemonic ("4 x 3 (Book, DVD)"); 3.437 - gtk_widget_set_name (ratio_4x3, "ratio_4x3"); 3.438 - gtk_widget_show (ratio_4x3); 3.439 - gtk_container_add (GTK_CONTAINER (menu1), ratio_4x3); 3.440 + ratio_4x3 = gtk_menu_item_new_with_mnemonic("4 x 3(Book, DVD)"); 3.441 + gtk_widget_set_name(ratio_4x3, "ratio_4x3"); 3.442 + gtk_widget_show(ratio_4x3); 3.443 + gtk_container_add(GTK_CONTAINER(menu1), ratio_4x3); 3.444 3.445 - ratio_3x2 = gtk_menu_item_new_with_mnemonic ("4 x 6 (Postcard)"); 3.446 - gtk_widget_set_name (ratio_3x2, "ratio_3x2"); 3.447 - gtk_widget_show (ratio_3x2); 3.448 - gtk_container_add (GTK_CONTAINER (menu1), ratio_3x2); 3.449 + ratio_3x2 = gtk_menu_item_new_with_mnemonic("4 x 6(Postcard)"); 3.450 + gtk_widget_set_name(ratio_3x2, "ratio_3x2"); 3.451 + gtk_widget_show(ratio_3x2); 3.452 + gtk_container_add(GTK_CONTAINER(menu1), ratio_3x2); 3.453 3.454 - ratio_custom = gtk_menu_item_new_with_mnemonic ("Custom"); 3.455 - gtk_widget_set_name (ratio_custom, "ratio_custom"); 3.456 - gtk_widget_show (ratio_custom); 3.457 - gtk_container_add (GTK_CONTAINER (menu1), ratio_custom); 3.458 + ratio_custom = gtk_menu_item_new_with_mnemonic("Custom"); 3.459 + gtk_widget_set_name(ratio_custom, "ratio_custom"); 3.460 + gtk_widget_show(ratio_custom); 3.461 + gtk_container_add(GTK_CONTAINER(menu1), ratio_custom); 3.462 3.463 - gtk_option_menu_set_menu (GTK_OPTION_MENU (ratio_optionmenu), menu1); 3.464 + gtk_option_menu_set_menu(GTK_OPTION_MENU(ratio_optionmenu), menu1); 3.465 3.466 - vbox5 = gtk_vbox_new (FALSE, 0); 3.467 - gtk_widget_set_name (vbox5, "vbox5"); 3.468 - gtk_widget_show (vbox5); 3.469 - gtk_box_pack_start (GTK_BOX (hbox1), vbox5, TRUE, TRUE, 0); 3.470 + vbox5 = gtk_vbox_new(FALSE, 0); 3.471 + gtk_widget_set_name(vbox5, "vbox5"); 3.472 + gtk_widget_show(vbox5); 3.473 + gtk_box_pack_start(GTK_BOX(hbox1), vbox5, TRUE, TRUE, 0); 3.474 3.475 - frame1 = gtk_frame_new (NULL); 3.476 - gtk_widget_set_name (frame1, "frame1"); 3.477 - gtk_widget_show (frame1); 3.478 - gtk_box_pack_start (GTK_BOX (vbox5), frame1, TRUE, TRUE, 0); 3.479 - gtk_frame_set_shadow_type (GTK_FRAME (frame1), GTK_SHADOW_NONE); 3.480 + frame1 = gtk_frame_new(NULL); 3.481 + gtk_widget_set_name(frame1, "frame1"); 3.482 + gtk_widget_show(frame1); 3.483 + gtk_box_pack_start(GTK_BOX(vbox5), frame1, TRUE, TRUE, 0); 3.484 + gtk_frame_set_shadow_type(GTK_FRAME(frame1), GTK_SHADOW_NONE); 3.485 3.486 - vbox7 = gtk_vbox_new (FALSE, 6); 3.487 - gtk_widget_set_name (vbox7, "vbox7"); 3.488 - gtk_widget_show (vbox7); 3.489 - gtk_container_add (GTK_CONTAINER (frame1), vbox7); 3.490 + vbox7 = gtk_vbox_new(FALSE, 6); 3.491 + gtk_widget_set_name(vbox7, "vbox7"); 3.492 + gtk_widget_show(vbox7); 3.493 + gtk_container_add(GTK_CONTAINER(frame1), vbox7); 3.494 3.495 - nav_container = gtk_hbox_new (FALSE, 0); 3.496 - gtk_widget_set_name (nav_container, "nav_container"); 3.497 - gtk_widget_show (nav_container); 3.498 - gtk_box_pack_start (GTK_BOX (vbox7), nav_container, TRUE, TRUE, 0); 3.499 + nav_container = gtk_hbox_new(FALSE, 0); 3.500 + gtk_widget_set_name(nav_container, "nav_container"); 3.501 + gtk_widget_show(nav_container); 3.502 + gtk_box_pack_start(GTK_BOX(vbox7), nav_container, TRUE, TRUE, 0); 3.503 3.504 /* image_area */ 3.505 image_buffer = gdk_pixbuf_new_from_file(image_filename, NULL); 3.506 @@ -360,188 +359,188 @@ 3.507 gtk_widget_show(image_area); 3.508 gtk_box_pack_start(GTK_BOX(nav_container), image_area, TRUE, TRUE, 0); 3.509 3.510 - hbox16 = gtk_hbox_new (FALSE, 6); 3.511 - gtk_widget_set_name (hbox16, "hbox16"); 3.512 - gtk_widget_show (hbox16); 3.513 - gtk_box_pack_start (GTK_BOX (vbox7), hbox16, FALSE, TRUE, 0); 3.514 + hbox16 = gtk_hbox_new(FALSE, 6); 3.515 + gtk_widget_set_name(hbox16, "hbox16"); 3.516 + gtk_widget_show(hbox16); 3.517 + gtk_box_pack_start(GTK_BOX(vbox7), hbox16, FALSE, TRUE, 0); 3.518 3.519 - hbox17 = gtk_hbox_new (FALSE, 0); 3.520 - gtk_widget_set_name (hbox17, "hbox17"); 3.521 - gtk_widget_show (hbox17); 3.522 - gtk_box_pack_end (GTK_BOX (hbox16), hbox17, FALSE, TRUE, 0); 3.523 + hbox17 = gtk_hbox_new(FALSE, 0); 3.524 + gtk_widget_set_name(hbox17, "hbox17"); 3.525 + gtk_widget_show(hbox17); 3.526 + gtk_box_pack_end(GTK_BOX(hbox16), hbox17, FALSE, TRUE, 0); 3.527 3.528 - crop_zoom_in_button = gtk_button_new (); 3.529 - gtk_widget_set_name (crop_zoom_in_button, "crop_zoom_in_button"); 3.530 - gtk_widget_show (crop_zoom_in_button); 3.531 - gtk_box_pack_start (GTK_BOX (hbox17), crop_zoom_in_button, FALSE, FALSE, 0); 3.532 - gtk_button_set_relief (GTK_BUTTON (crop_zoom_in_button), GTK_RELIEF_NONE); 3.533 + crop_zoom_in_button = gtk_button_new(); 3.534 + gtk_widget_set_name(crop_zoom_in_button, "crop_zoom_in_button"); 3.535 + gtk_widget_show(crop_zoom_in_button); 3.536 + gtk_box_pack_start(GTK_BOX(hbox17), crop_zoom_in_button, FALSE, FALSE, 0); 3.537 + gtk_button_set_relief(GTK_BUTTON(crop_zoom_in_button), GTK_RELIEF_NONE); 3.538 3.539 - image2 = gtk_image_new_from_stock ("gtk-zoom-in", GTK_ICON_SIZE_BUTTON); 3.540 - gtk_widget_set_name (image2, "image2"); 3.541 - gtk_widget_show (image2); 3.542 - gtk_container_add (GTK_CONTAINER (crop_zoom_in_button), image2); 3.543 + image2 = gtk_image_new_from_stock("gtk-zoom-in", GTK_ICON_SIZE_BUTTON); 3.544 + gtk_widget_set_name(image2, "image2"); 3.545 + gtk_widget_show(image2); 3.546 + gtk_container_add(GTK_CONTAINER(crop_zoom_in_button), image2); 3.547 3.548 - crop_zoom_out_button = gtk_button_new (); 3.549 - gtk_widget_set_name (crop_zoom_out_button, "crop_zoom_out_button"); 3.550 - gtk_widget_show (crop_zoom_out_button); 3.551 - gtk_box_pack_start (GTK_BOX (hbox17), crop_zoom_out_button, FALSE, FALSE, 0); 3.552 - gtk_button_set_relief (GTK_BUTTON (crop_zoom_out_button), GTK_RELIEF_NONE); 3.553 + crop_zoom_out_button = gtk_button_new(); 3.554 + gtk_widget_set_name(crop_zoom_out_button, "crop_zoom_out_button"); 3.555 + gtk_widget_show(crop_zoom_out_button); 3.556 + gtk_box_pack_start(GTK_BOX(hbox17), crop_zoom_out_button, FALSE, FALSE, 0); 3.557 + gtk_button_set_relief(GTK_BUTTON(crop_zoom_out_button), GTK_RELIEF_NONE); 3.558 3.559 - image4 = gtk_image_new_from_stock ("gtk-zoom-out", GTK_ICON_SIZE_BUTTON); 3.560 - gtk_widget_set_name (image4, "image4"); 3.561 - gtk_widget_show (image4); 3.562 - gtk_container_add (GTK_CONTAINER (crop_zoom_out_button), image4); 3.563 + image4 = gtk_image_new_from_stock("gtk-zoom-out", GTK_ICON_SIZE_BUTTON); 3.564 + gtk_widget_set_name(image4, "image4"); 3.565 + gtk_widget_show(image4); 3.566 + gtk_container_add(GTK_CONTAINER(crop_zoom_out_button), image4); 3.567 3.568 - crop_zoom_100_button = gtk_button_new (); 3.569 - gtk_widget_set_name (crop_zoom_100_button, "crop_zoom_100_button"); 3.570 - gtk_widget_show (crop_zoom_100_button); 3.571 - gtk_box_pack_start (GTK_BOX (hbox17), crop_zoom_100_button, FALSE, FALSE, 0); 3.572 - gtk_button_set_relief (GTK_BUTTON (crop_zoom_100_button), GTK_RELIEF_NONE); 3.573 + crop_zoom_100_button = gtk_button_new(); 3.574 + gtk_widget_set_name(crop_zoom_100_button, "crop_zoom_100_button"); 3.575 + gtk_widget_show(crop_zoom_100_button); 3.576 + gtk_box_pack_start(GTK_BOX(hbox17), crop_zoom_100_button, FALSE, FALSE, 0); 3.577 + gtk_button_set_relief(GTK_BUTTON(crop_zoom_100_button), GTK_RELIEF_NONE); 3.578 3.579 - image3 = gtk_image_new_from_stock ("gtk-zoom-100", GTK_ICON_SIZE_BUTTON); 3.580 - gtk_widget_set_name (image3, "image3"); 3.581 - gtk_widget_show (image3); 3.582 - gtk_container_add (GTK_CONTAINER (crop_zoom_100_button), image3); 3.583 + image3 = gtk_image_new_from_stock("gtk-zoom-100", GTK_ICON_SIZE_BUTTON); 3.584 + gtk_widget_set_name(image3, "image3"); 3.585 + gtk_widget_show(image3); 3.586 + gtk_container_add(GTK_CONTAINER(crop_zoom_100_button), image3); 3.587 3.588 - crop_zoom_fit_button = gtk_button_new (); 3.589 - gtk_widget_set_name (crop_zoom_fit_button, "crop_zoom_fit_button"); 3.590 - gtk_widget_show (crop_zoom_fit_button); 3.591 - gtk_box_pack_start (GTK_BOX (hbox17), crop_zoom_fit_button, FALSE, FALSE, 0); 3.592 - gtk_button_set_relief (GTK_BUTTON (crop_zoom_fit_button), GTK_RELIEF_NONE); 3.593 + crop_zoom_fit_button = gtk_button_new(); 3.594 + gtk_widget_set_name(crop_zoom_fit_button, "crop_zoom_fit_button"); 3.595 + gtk_widget_show(crop_zoom_fit_button); 3.596 + gtk_box_pack_start(GTK_BOX(hbox17), crop_zoom_fit_button, FALSE, FALSE, 0); 3.597 + gtk_button_set_relief(GTK_BUTTON(crop_zoom_fit_button), GTK_RELIEF_NONE); 3.598 3.599 - image1 = gtk_image_new_from_stock ("gtk-zoom-fit", GTK_ICON_SIZE_BUTTON); 3.600 - gtk_widget_set_name (image1, "image1"); 3.601 - gtk_widget_show (image1); 3.602 - gtk_container_add (GTK_CONTAINER (crop_zoom_fit_button), image1); 3.603 + image1 = gtk_image_new_from_stock("gtk-zoom-fit", GTK_ICON_SIZE_BUTTON); 3.604 + gtk_widget_set_name(image1, "image1"); 3.605 + gtk_widget_show(image1); 3.606 + gtk_container_add(GTK_CONTAINER(crop_zoom_fit_button), image1); 3.607 3.608 3.609 3.610 /* 3.611 - okay_box = gtk_hbox_new (FALSE, 0); 3.612 - gtk_widget_set_name (okay_box, "okay_box"); 3.613 - gtk_widget_show (okay_box); 3.614 - gtk_box_pack_end (GTK_BOX (hbox16), okay_box, FALSE, TRUE, 0); 3.615 + okay_box = gtk_hbox_new(FALSE, 0); 3.616 + gtk_widget_set_name(okay_box, "okay_box"); 3.617 + gtk_widget_show(okay_box); 3.618 + gtk_box_pack_end(GTK_BOX(hbox16), okay_box, FALSE, TRUE, 0); 3.619 */ 3.620 3.621 - crop_okbutton = gtk_button_new (); 3.622 - gtk_widget_set_name (crop_okbutton, "crop_okbutton"); 3.623 - gtk_widget_show (crop_okbutton); 3.624 - gtk_box_pack_end (GTK_BOX (dialog_vbox1), crop_okbutton, FALSE, FALSE, 0); 3.625 - GTK_WIDGET_SET_FLAGS (crop_okbutton, GTK_CAN_DEFAULT); 3.626 + crop_okbutton = gtk_button_new(); 3.627 + gtk_widget_set_name(crop_okbutton, "crop_okbutton"); 3.628 + gtk_widget_show(crop_okbutton); 3.629 + gtk_box_pack_end(GTK_BOX(dialog_vbox1), crop_okbutton, FALSE, FALSE, 0); 3.630 + GTK_WIDGET_SET_FLAGS(crop_okbutton, GTK_CAN_DEFAULT); 3.631 3.632 - alignment1 = gtk_alignment_new (0.5, 0.5, 0, 0); 3.633 - gtk_widget_set_name (alignment1, "alignment1"); 3.634 - gtk_widget_show (alignment1); 3.635 - gtk_container_add (GTK_CONTAINER (crop_okbutton), alignment1); 3.636 + alignment1 = gtk_alignment_new(0.5, 0.5, 0, 0); 3.637 + gtk_widget_set_name(alignment1, "alignment1"); 3.638 + gtk_widget_show(alignment1); 3.639 + gtk_container_add(GTK_CONTAINER(crop_okbutton), alignment1); 3.640 3.641 - hbox11 = gtk_hbox_new (FALSE, 2); 3.642 - gtk_widget_set_name (hbox11, "hbox11"); 3.643 - gtk_widget_show (hbox11); 3.644 - gtk_container_add (GTK_CONTAINER (alignment1), hbox11); 3.645 + hbox11 = gtk_hbox_new(FALSE, 2); 3.646 + gtk_widget_set_name(hbox11, "hbox11"); 3.647 + gtk_widget_show(hbox11); 3.648 + gtk_container_add(GTK_CONTAINER(alignment1), hbox11); 3.649 3.650 - crop_image = gtk_image_new_from_stock ("gtk-ok", GTK_ICON_SIZE_BUTTON); 3.651 - gtk_widget_set_name (crop_image, "crop_image"); 3.652 - gtk_widget_show (crop_image); 3.653 - gtk_box_pack_start (GTK_BOX (hbox11), crop_image, FALSE, FALSE, 0); 3.654 + crop_image = gtk_image_new_from_stock("gtk-ok", GTK_ICON_SIZE_BUTTON); 3.655 + gtk_widget_set_name(crop_image, "crop_image"); 3.656 + gtk_widget_show(crop_image); 3.657 + gtk_box_pack_start(GTK_BOX(hbox11), crop_image, FALSE, FALSE, 0); 3.658 3.659 - label12 = gtk_label_new_with_mnemonic ("_Crop"); 3.660 - gtk_widget_set_name (label12, "label12"); 3.661 - gtk_widget_show (label12); 3.662 - gtk_box_pack_start (GTK_BOX (hbox11), label12, FALSE, FALSE, 0); 3.663 + label12 = gtk_label_new_with_mnemonic("_Crop"); 3.664 + gtk_widget_set_name(label12, "label12"); 3.665 + gtk_widget_show(label12); 3.666 + gtk_box_pack_start(GTK_BOX(hbox11), label12, FALSE, FALSE, 0); 3.667 3.668 3.669 3.670 3.671 3.672 - g_signal_connect (G_OBJECT (cropper_window), "show", 3.673 - G_CALLBACK (on_cropper_window_create), 3.674 + g_signal_connect(G_OBJECT(cropper_window), "show", 3.675 + G_CALLBACK(on_cropper_window_create), 3.676 NULL); 3.677 /* destroy */ 3.678 - g_signal_connect (G_OBJECT (cropper_window), "destroy", 3.679 - G_CALLBACK (on_cropper_window_destroy), 3.680 + g_signal_connect(G_OBJECT(cropper_window), "destroy", 3.681 + G_CALLBACK(on_cropper_window_destroy), 3.682 NULL); 3.683 3.684 3.685 /* crop */ 3.686 - g_signal_connect (G_OBJECT (crop_okbutton), "clicked", 3.687 - G_CALLBACK (on_crop_clicked), 3.688 + g_signal_connect(G_OBJECT(crop_okbutton), "clicked", 3.689 + G_CALLBACK(on_crop_clicked), 3.690 NULL); 3.691 3.692 3.693 /* zoom */ 3.694 - g_signal_connect (G_OBJECT (crop_zoom_in_button), "clicked", 3.695 - G_CALLBACK (on_zoom_in_button_clicked), 3.696 + g_signal_connect(G_OBJECT(crop_zoom_in_button), "clicked", 3.697 + G_CALLBACK(on_zoom_in_button_clicked), 3.698 NULL); 3.699 - g_signal_connect (G_OBJECT (crop_zoom_out_button), "clicked", 3.700 - G_CALLBACK (on_zoom_out_button_clicked), 3.701 + g_signal_connect(G_OBJECT(crop_zoom_out_button), "clicked", 3.702 + G_CALLBACK(on_zoom_out_button_clicked), 3.703 NULL); 3.704 - g_signal_connect (G_OBJECT (crop_zoom_100_button), "clicked", 3.705 - G_CALLBACK (on_zoom_100_button_clicked), 3.706 + g_signal_connect(G_OBJECT(crop_zoom_100_button), "clicked", 3.707 + G_CALLBACK(on_zoom_100_button_clicked), 3.708 NULL); 3.709 - g_signal_connect (G_OBJECT (crop_zoom_fit_button), "clicked", 3.710 - G_CALLBACK (on_zoom_fit_button_clicked), 3.711 + g_signal_connect(G_OBJECT(crop_zoom_fit_button), "clicked", 3.712 + G_CALLBACK(on_zoom_fit_button_clicked), 3.713 NULL); 3.714 3.715 3.716 /* aspect ratio */ 3.717 /* 3.718 - g_signal_connect (G_OBJECT (ratio_w_spinbutton), "value_changed", 3.719 - G_CALLBACK (on_ratio_w_spinbutton_value_changed), 3.720 + g_signal_connect(G_OBJECT(ratio_w_spinbutton), "value_changed", 3.721 + G_CALLBACK(on_ratio_w_spinbutton_value_changed), 3.722 NULL); 3.723 - g_signal_connect (G_OBJECT (ratio_swap_button), "clicked", 3.724 - G_CALLBACK (on_ratio_swap_button_clicked), 3.725 + g_signal_connect(G_OBJECT(ratio_swap_button), "clicked", 3.726 + G_CALLBACK(on_ratio_swap_button_clicked), 3.727 NULL); 3.728 - g_signal_connect (G_OBJECT (ratio_h_spinbutton), "value_changed", 3.729 - G_CALLBACK (on_ratio_h_spinbutton_value_changed), 3.730 + g_signal_connect(G_OBJECT(ratio_h_spinbutton), "value_changed", 3.731 + G_CALLBACK(on_ratio_h_spinbutton_value_changed), 3.732 NULL); 3.733 3.734 - g_signal_connect (G_OBJECT (ratio_none), "activate", 3.735 - G_CALLBACK (on_ratio_none_activate), 3.736 + g_signal_connect(G_OBJECT(ratio_none), "activate", 3.737 + G_CALLBACK(on_ratio_none_activate), 3.738 NULL); 3.739 - g_signal_connect (G_OBJECT (ratio_square), "activate", 3.740 - G_CALLBACK (on_ratio_square_activate), 3.741 + g_signal_connect(G_OBJECT(ratio_square), "activate", 3.742 + G_CALLBACK(on_ratio_square_activate), 3.743 NULL); 3.744 - g_signal_connect (G_OBJECT (ratio_4x3), "activate", 3.745 - G_CALLBACK (on_ratio_4x3_activate), 3.746 + g_signal_connect(G_OBJECT(ratio_4x3), "activate", 3.747 + G_CALLBACK(on_ratio_4x3_activate), 3.748 NULL); 3.749 - g_signal_connect (G_OBJECT (ratio_3x2), "activate", 3.750 - G_CALLBACK (on_ratio_3x2_activate), 3.751 + g_signal_connect(G_OBJECT(ratio_3x2), "activate", 3.752 + G_CALLBACK(on_ratio_3x2_activate), 3.753 NULL); 3.754 - g_signal_connect (G_OBJECT (ratio_custom), "activate", 3.755 - G_CALLBACK (on_ratio_custom_activate), 3.756 + g_signal_connect(G_OBJECT(ratio_custom), "activate", 3.757 + G_CALLBACK(on_ratio_custom_activate), 3.758 NULL); 3.759 3.760 -g_signal_connect (G_OBJECT (lookup_widget(cropper_window, "ratio_optionmenu")), "changed", 3.761 - G_CALLBACK (ratio_optionmenu_changed_cb), 3.762 +g_signal_connect(G_OBJECT(lookup_widget(cropper_window, "ratio_optionmenu")), "changed", 3.763 + G_CALLBACK(ratio_optionmenu_changed_cb), 3.764 NULL); 3.765 -g_signal_connect (G_OBJECT (lookup_widget(cropper_window, "ratio_w_spinbutton")), "value_changed", 3.766 - G_CALLBACK (ratio_value_changed_cb), 3.767 +g_signal_connect(G_OBJECT(lookup_widget(cropper_window, "ratio_w_spinbutton")), "value_changed", 3.768 + G_CALLBACK(ratio_value_changed_cb), 3.769 NULL); 3.770 -g_signal_connect (G_OBJECT (lookup_widget(cropper_window, "ratio_h_spinbutton")), "value_changed", 3.771 - G_CALLBACK (ratio_value_changed_cb), 3.772 +g_signal_connect(G_OBJECT(lookup_widget(cropper_window, "ratio_h_spinbutton")), "value_changed", 3.773 + G_CALLBACK(ratio_value_changed_cb), 3.774 NULL); 3.775 -g_signal_connect (G_OBJECT (lookup_widget(cropper_window, "ratio_swap_button")), "clicked", 3.776 - G_CALLBACK (ratio_swap_button_cb), 3.777 +g_signal_connect(G_OBJECT(lookup_widget(cropper_window, "ratio_swap_button")), "clicked", 3.778 + G_CALLBACK(ratio_swap_button_cb), 3.779 NULL); 3.780 */ 3.781 3.782 3.783 /* selection */ 3.784 /* 3.785 -g_signal_connect (G_OBJECT (lookup_widget(cropper_window, "crop_x_spinbutton")), "value_changed", 3.786 - G_CALLBACK (selection_x_value_changed_cb), 3.787 +g_signal_connect(G_OBJECT(lookup_widget(cropper_window, "crop_x_spinbutton")), "value_changed", 3.788 + G_CALLBACK(selection_x_value_changed_cb), 3.789 data); 3.790 -g_signal_connect (G_OBJECT (lookup_widget(cropper_window, "crop_y_spinbutton")), "value_changed", 3.791 - G_CALLBACK (selection_y_value_changed_cb), 3.792 +g_signal_connect(G_OBJECT(lookup_widget(cropper_window, "crop_y_spinbutton")), "value_changed", 3.793 + G_CALLBACK(selection_y_value_changed_cb), 3.794 data); 3.795 -g_signal_connect (G_OBJECT (lookup_widget(cropper_window, "crop_width_spinbutton")), "value_changed", 3.796 - G_CALLBACK (selection_width_value_changed_cb), 3.797 +g_signal_connect(G_OBJECT(lookup_widget(cropper_window, "crop_width_spinbutton")), "value_changed", 3.798 + G_CALLBACK(selection_width_value_changed_cb), 3.799 data); 3.800 -g_signal_connect (G_OBJECT (lookup_widget(cropper_window, "crop_height_spinbutton")), "value_changed", 3.801 - G_CALLBACK (selection_height_value_changed_cb), 3.802 +g_signal_connect(G_OBJECT(lookup_widget(cropper_window, "crop_height_spinbutton")), "value_changed", 3.803 + G_CALLBACK(selection_height_value_changed_cb), 3.804 data); 3.805 -g_signal_connect (G_OBJECT (lookup_widget(cropper_window, "crop_image")), "selection_changed", 3.806 - G_CALLBACK (selection_changed_cb), 3.807 +g_signal_connect(G_OBJECT(lookup_widget(cropper_window, "crop_image")), "selection_changed", 3.808 + G_CALLBACK(selection_changed_cb), 3.809 data); 3.810 */ 3.811 3.812 @@ -561,68 +560,68 @@ 3.813 3.814 3.815 /* Store pointers to all widgets, for use by lookup_widget(). */ 3.816 - GLADE_HOOKUP_OBJECT_NO_REF (cropper_window, cropper_window, "cropper_window"); 3.817 - GLADE_HOOKUP_OBJECT (cropper_window, dialog_vbox1, "dialog_vbox1"); 3.818 - GLADE_HOOKUP_OBJECT (cropper_window, hbox1, "hbox1"); 3.819 - GLADE_HOOKUP_OBJECT (cropper_window, vbox1, "vbox1"); 3.820 - GLADE_HOOKUP_OBJECT (cropper_window, vbox2, "vbox2"); 3.821 - GLADE_HOOKUP_OBJECT (cropper_window, label1, "label1"); 3.822 - GLADE_HOOKUP_OBJECT (cropper_window, hbox2, "hbox2"); 3.823 - GLADE_HOOKUP_OBJECT (cropper_window, label2, "label2"); 3.824 - GLADE_HOOKUP_OBJECT (cropper_window, table2, "table2"); 3.825 - GLADE_HOOKUP_OBJECT (cropper_window, label3, "label3"); 3.826 - GLADE_HOOKUP_OBJECT (cropper_window, label5, "label5"); 3.827 - GLADE_HOOKUP_OBJECT (cropper_window, label4, "label4"); 3.828 - GLADE_HOOKUP_OBJECT (cropper_window, label6, "label6"); 3.829 - GLADE_HOOKUP_OBJECT (cropper_window, hbox5, "hbox5"); 3.830 - GLADE_HOOKUP_OBJECT (cropper_window, crop_x_spinbutton, "crop_x_spinbutton"); 3.831 - GLADE_HOOKUP_OBJECT (cropper_window, hbox6, "hbox6"); 3.832 - GLADE_HOOKUP_OBJECT (cropper_window, crop_y_spinbutton, "crop_y_spinbutton"); 3.833 - GLADE_HOOKUP_OBJECT (cropper_window, hbox7, "hbox7"); 3.834 - GLADE_HOOKUP_OBJECT (cropper_window, crop_width_spinbutton, "crop_width_spinbutton"); 3.835 - GLADE_HOOKUP_OBJECT (cropper_window, hbox8, "hbox8"); 3.836 - GLADE_HOOKUP_OBJECT (cropper_window, crop_height_spinbutton, "crop_height_spinbutton"); 3.837 - GLADE_HOOKUP_OBJECT (cropper_window, vbox4, "vbox4"); 3.838 - GLADE_HOOKUP_OBJECT (cropper_window, label7, "label7"); 3.839 - GLADE_HOOKUP_OBJECT (cropper_window, hbox3, "hbox3"); 3.840 - GLADE_HOOKUP_OBJECT (cropper_window, label8, "label8"); 3.841 - GLADE_HOOKUP_OBJECT (cropper_window, table3, "table3"); 3.842 - GLADE_HOOKUP_OBJECT (cropper_window, hbox10, "hbox10"); 3.843 - GLADE_HOOKUP_OBJECT (cropper_window, custom_ratio_box, "custom_ratio_box"); 3.844 - GLADE_HOOKUP_OBJECT (cropper_window, ratio_w_spinbutton, "ratio_w_spinbutton"); 3.845 - GLADE_HOOKUP_OBJECT (cropper_window, ratio_swap_button, "ratio_swap_button"); 3.846 - GLADE_HOOKUP_OBJECT (cropper_window, eventbox1, "eventbox1"); 3.847 - GLADE_HOOKUP_OBJECT (cropper_window, ratio_swap_image, "ratio_swap_image"); 3.848 - GLADE_HOOKUP_OBJECT (cropper_window, ratio_h_spinbutton, "ratio_h_spinbutton"); 3.849 - GLADE_HOOKUP_OBJECT (cropper_window, ratio_optionmenu, "ratio_optionmenu"); 3.850 - GLADE_HOOKUP_OBJECT (cropper_window, menu1, "menu1"); 3.851 - GLADE_HOOKUP_OBJECT (cropper_window, ratio_none, "ratio_none"); 3.852 - GLADE_HOOKUP_OBJECT (cropper_window, ratio_square, "ratio_square"); 3.853 - GLADE_HOOKUP_OBJECT (cropper_window, ratio_4x3, "ratio_4x3"); 3.854 - GLADE_HOOKUP_OBJECT (cropper_window, ratio_3x2, "ratio_3x2"); 3.855 - GLADE_HOOKUP_OBJECT (cropper_window, ratio_custom, "ratio_custom"); 3.856 - GLADE_HOOKUP_OBJECT (cropper_window, vbox5, "vbox5"); 3.857 - GLADE_HOOKUP_OBJECT (cropper_window, frame1, "frame1"); 3.858 - GLADE_HOOKUP_OBJECT (cropper_window, vbox7, "vbox7"); 3.859 - GLADE_HOOKUP_OBJECT (cropper_window, nav_container, "nav_container"); 3.860 - GLADE_HOOKUP_OBJECT (cropper_window, image_area, "image_area"); 3.861 - GLADE_HOOKUP_OBJECT (cropper_window, (GtkWidget*) image_buffer, "image_buffer"); 3.862 - GLADE_HOOKUP_OBJECT (cropper_window, hbox16, "hbox16"); 3.863 - GLADE_HOOKUP_OBJECT (cropper_window, hbox17, "hbox17"); 3.864 - GLADE_HOOKUP_OBJECT (cropper_window, crop_zoom_in_button, "crop_zoom_in_button"); 3.865 - GLADE_HOOKUP_OBJECT (cropper_window, image2, "image2"); 3.866 - GLADE_HOOKUP_OBJECT (cropper_window, crop_zoom_out_button, "crop_zoom_out_button"); 3.867 - GLADE_HOOKUP_OBJECT (cropper_window, image4, "image4"); 3.868 - GLADE_HOOKUP_OBJECT (cropper_window, crop_zoom_100_button, "crop_zoom_100_button"); 3.869 - GLADE_HOOKUP_OBJECT (cropper_window, image3, "image3"); 3.870 - GLADE_HOOKUP_OBJECT (cropper_window, crop_zoom_fit_button, "crop_zoom_fit_button"); 3.871 - GLADE_HOOKUP_OBJECT (cropper_window, image1, "image1"); 3.872 - /*GLADE_HOOKUP_OBJECT_NO_REF (cropper_window, dialog_action_area1, "dialog_action_area1"); */ 3.873 - GLADE_HOOKUP_OBJECT (cropper_window, crop_okbutton, "crop_okbutton"); 3.874 - GLADE_HOOKUP_OBJECT (cropper_window, alignment1, "alignment1"); 3.875 - GLADE_HOOKUP_OBJECT (cropper_window, hbox11, "hbox11"); 3.876 - GLADE_HOOKUP_OBJECT (cropper_window, crop_image, "crop_image"); 3.877 - GLADE_HOOKUP_OBJECT (cropper_window, label12, "label12"); 3.878 + GLADE_HOOKUP_OBJECT_NO_REF(cropper_window, cropper_window, "cropper_window"); 3.879 + GLADE_HOOKUP_OBJECT(cropper_window, dialog_vbox1, "dialog_vbox1"); 3.880 + GLADE_HOOKUP_OBJECT(cropper_window, hbox1, "hbox1"); 3.881 + GLADE_HOOKUP_OBJECT(cropper_window, vbox1, "vbox1"); 3.882 + GLADE_HOOKUP_OBJECT(cropper_window, vbox2, "vbox2"); 3.883 + GLADE_HOOKUP_OBJECT(cropper_window, label1, "label1"); 3.884 + GLADE_HOOKUP_OBJECT(cropper_window, hbox2, "hbox2"); 3.885 + GLADE_HOOKUP_OBJECT(cropper_window, label2, "label2"); 3.886 + GLADE_HOOKUP_OBJECT(cropper_window, table2, "table2"); 3.887 + GLADE_HOOKUP_OBJECT(cropper_window, label3, "label3"); 3.888 + GLADE_HOOKUP_OBJECT(cropper_window, label5, "label5"); 3.889 + GLADE_HOOKUP_OBJECT(cropper_window, label4, "label4"); 3.890 + GLADE_HOOKUP_OBJECT(cropper_window, label6, "label6"); 3.891 + GLADE_HOOKUP_OBJECT(cropper_window, hbox5, "hbox5"); 3.892 + GLADE_HOOKUP_OBJECT(cropper_window, crop_x_spinbutton, "crop_x_spinbutton"); 3.893 + GLADE_HOOKUP_OBJECT(cropper_window, hbox6, "hbox6"); 3.894 + GLADE_HOOKUP_OBJECT(cropper_window, crop_y_spinbutton, "crop_y_spinbutton"); 3.895 + GLADE_HOOKUP_OBJECT(cropper_window, hbox7, "hbox7"); 3.896 + GLADE_HOOKUP_OBJECT(cropper_window, crop_width_spinbutton, "crop_width_spinbutton"); 3.897 + GLADE_HOOKUP_OBJECT(cropper_window, hbox8, "hbox8"); 3.898 + GLADE_HOOKUP_OBJECT(cropper_window, crop_height_spinbutton, "crop_height_spinbutton"); 3.899 + GLADE_HOOKUP_OBJECT(cropper_window, vbox4, "vbox4"); 3.900 + GLADE_HOOKUP_OBJECT(cropper_window, label7, "label7"); 3.901 + GLADE_HOOKUP_OBJECT(cropper_window, hbox3, "hbox3"); 3.902 + GLADE_HOOKUP_OBJECT(cropper_window, label8, "label8"); 3.903 + GLADE_HOOKUP_OBJECT(cropper_window, table3, "table3"); 3.904 + GLADE_HOOKUP_OBJECT(cropper_window, hbox10, "hbox10"); 3.905 + GLADE_HOOKUP_OBJECT(cropper_window, custom_ratio_box, "custom_ratio_box"); 3.906 + GLADE_HOOKUP_OBJECT(cropper_window, ratio_w_spinbutton, "ratio_w_spinbutton"); 3.907 + GLADE_HOOKUP_OBJECT(cropper_window, ratio_swap_button, "ratio_swap_button"); 3.908 + GLADE_HOOKUP_OBJECT(cropper_window, eventbox1, "eventbox1"); 3.909 + GLADE_HOOKUP_OBJECT(cropper_window, ratio_swap_image, "ratio_swap_image"); 3.910 + GLADE_HOOKUP_OBJECT(cropper_window, ratio_h_spinbutton, "ratio_h_spinbutton"); 3.911 + GLADE_HOOKUP_OBJECT(cropper_window, ratio_optionmenu, "ratio_optionmenu"); 3.912 + GLADE_HOOKUP_OBJECT(cropper_window, menu1, "menu1"); 3.913 + GLADE_HOOKUP_OBJECT(cropper_window, ratio_none, "ratio_none"); 3.914 + GLADE_HOOKUP_OBJECT(cropper_window, ratio_square, "ratio_square"); 3.915 + GLADE_HOOKUP_OBJECT(cropper_window, ratio_4x3, "ratio_4x3"); 3.916 + GLADE_HOOKUP_OBJECT(cropper_window, ratio_3x2, "ratio_3x2"); 3.917 + GLADE_HOOKUP_OBJECT(cropper_window, ratio_custom, "ratio_custom"); 3.918 + GLADE_HOOKUP_OBJECT(cropper_window, vbox5, "vbox5"); 3.919 + GLADE_HOOKUP_OBJECT(cropper_window, frame1, "frame1"); 3.920 + GLADE_HOOKUP_OBJECT(cropper_window, vbox7, "vbox7"); 3.921 + GLADE_HOOKUP_OBJECT(cropper_window, nav_container, "nav_container"); 3.922 + GLADE_HOOKUP_OBJECT(cropper_window, image_area, "image_area"); 3.923 + GLADE_HOOKUP_OBJECT(cropper_window,(GtkWidget*) image_buffer, "image_buffer"); 3.924 + GLADE_HOOKUP_OBJECT(cropper_window, hbox16, "hbox16"); 3.925 + GLADE_HOOKUP_OBJECT(cropper_window, hbox17, "hbox17"); 3.926 + GLADE_HOOKUP_OBJECT(cropper_window, crop_zoom_in_button, "crop_zoom_in_button"); 3.927 + GLADE_HOOKUP_OBJECT(cropper_window, image2, "image2"); 3.928 + GLADE_HOOKUP_OBJECT(cropper_window, crop_zoom_out_button, "crop_zoom_out_button"); 3.929 + GLADE_HOOKUP_OBJECT(cropper_window, image4, "image4"); 3.930 + GLADE_HOOKUP_OBJECT(cropper_window, crop_zoom_100_button, "crop_zoom_100_button"); 3.931 + GLADE_HOOKUP_OBJECT(cropper_window, image3, "image3"); 3.932 + GLADE_HOOKUP_OBJECT(cropper_window, crop_zoom_fit_button, "crop_zoom_fit_button"); 3.933 + GLADE_HOOKUP_OBJECT(cropper_window, image1, "image1"); 3.934 + /*GLADE_HOOKUP_OBJECT_NO_REF(cropper_window, dialog_action_area1, "dialog_action_area1"); */ 3.935 + GLADE_HOOKUP_OBJECT(cropper_window, crop_okbutton, "crop_okbutton"); 3.936 + GLADE_HOOKUP_OBJECT(cropper_window, alignment1, "alignment1"); 3.937 + GLADE_HOOKUP_OBJECT(cropper_window, hbox11, "hbox11"); 3.938 + GLADE_HOOKUP_OBJECT(cropper_window, crop_image, "crop_image"); 3.939 + GLADE_HOOKUP_OBJECT(cropper_window, label12, "label12"); 3.940 3.941 3.942 return cropper_window;
4.1 --- a/main.c Thu Mar 04 13:54:17 2010 +0100 4.2 +++ b/main.c Thu Mar 04 14:18:19 2010 +0100 4.3 @@ -4,17 +4,18 @@ 4.4 #include "support.h" 4.5 4.6 4.7 -int main (int argc, char *argv[]) { 4.8 - 4.9 +int 4.10 +main(int argc, char* argv[]) 4.11 +{ 4.12 /* commandline option handling */ 4.13 - if (argc == 2) { 4.14 - image_filename = argv[1]; 4.15 - } else { 4.16 + if (argc != 2) { 4.17 g_print("cropper -- a crop frontend to convert\n"); 4.18 g_print("usage: cropper IMAGE\n"); 4.19 return 1; 4.20 } 4.21 4.22 + image_filename = argv[1]; 4.23 + 4.24 gtk_set_locale(); 4.25 gtk_init(&argc, &argv); 4.26 4.27 @@ -22,7 +23,7 @@ 4.28 4.29 cropper_window = create_cropper_window(); 4.30 gtk_widget_show(cropper_window); 4.31 - gtk_main (); 4.32 + gtk_main(); 4.33 4.34 return 0; 4.35 }
5.1 --- a/main.h Thu Mar 04 13:54:17 2010 +0100 5.2 +++ b/main.h Thu Mar 04 14:18:19 2010 +0100 5.3 @@ -8,7 +8,7 @@ 5.4 5.5 /* from interface.h */ 5.6 GtkWidget* create_cropper_window(void); 5.7 -GtkWidget *image_area; 5.8 -GdkPixbuf *image_buffer; 5.9 +GtkWidget* image_area; 5.10 +GdkPixbuf* image_buffer; 5.11 5.12 #endif
6.1 --- a/support.c Thu Mar 04 13:54:17 2010 +0100 6.2 +++ b/support.c Thu Mar 04 14:18:19 2010 +0100 6.3 @@ -3,24 +3,26 @@ 6.4 #include <unistd.h> 6.5 #include <string.h> 6.6 #include <stdio.h> 6.7 - 6.8 #include <gtk/gtk.h> 6.9 - 6.10 #include "support.h" 6.11 6.12 +static GList *pixmaps_directories = NULL; 6.13 6.14 -GtkWidget* lookup_widget(GtkWidget* widget, const gchar* widget_name) { 6.15 + 6.16 +GtkWidget* 6.17 +lookup_widget(GtkWidget* widget, const gchar* widget_name) 6.18 +{ 6.19 GtkWidget* parent; 6.20 GtkWidget* found_widget; 6.21 6.22 for (;;) { 6.23 - if (GTK_IS_MENU (widget)) { 6.24 - parent = gtk_menu_get_attach_widget (GTK_MENU (widget)); 6.25 + if (GTK_IS_MENU(widget)) { 6.26 + parent = gtk_menu_get_attach_widget(GTK_MENU(widget)); 6.27 } else { 6.28 parent = widget->parent; 6.29 } 6.30 if (!parent) { 6.31 - parent = (GtkWidget*) g_object_get_data (G_OBJECT (widget), "GladeParentKey"); 6.32 + parent = (GtkWidget*) g_object_get_data(G_OBJECT(widget), "GladeParentKey"); 6.33 } 6.34 if (parent == NULL) { 6.35 break; 6.36 @@ -28,33 +30,36 @@ 6.37 widget = parent; 6.38 } 6.39 6.40 - found_widget = (GtkWidget*) g_object_get_data (G_OBJECT (widget), widget_name); 6.41 + found_widget = (GtkWidget*) g_object_get_data(G_OBJECT(widget), widget_name); 6.42 if (!found_widget) { 6.43 - g_warning ("Widget not found: %s", widget_name); 6.44 + g_warning("Widget not found: %s", widget_name); 6.45 } 6.46 return found_widget; 6.47 } 6.48 6.49 6.50 -static GList *pixmaps_directories = NULL; 6.51 - 6.52 /* Use this function to set the directory containing installed pixmaps. */ 6.53 -void add_pixmap_directory(const gchar* directory) { 6.54 - pixmaps_directories = g_list_prepend (pixmaps_directories, g_strdup (directory)); 6.55 +void 6.56 +add_pixmap_directory(const gchar* directory) 6.57 +{ 6.58 + pixmaps_directories = g_list_prepend(pixmaps_directories, g_strdup(directory)); 6.59 } 6.60 6.61 + 6.62 /* This is an internally used function to find pixmap files. */ 6.63 -static gchar* find_pixmap_file(const gchar* filename) { 6.64 +static gchar* 6.65 +find_pixmap_file(const gchar* filename) 6.66 +{ 6.67 GList* elem; 6.68 6.69 /* We step through each of the pixmaps directory to find it. */ 6.70 elem = pixmaps_directories; 6.71 while (elem) { 6.72 - gchar *pathname = g_strdup_printf ("%s%s%s", (gchar*)elem->data, G_DIR_SEPARATOR_S, filename); 6.73 - if (g_file_test (pathname, G_FILE_TEST_EXISTS)) { 6.74 + gchar *pathname = g_strdup_printf("%s%s%s", (gchar*)elem->data, G_DIR_SEPARATOR_S, filename); 6.75 + if (g_file_test(pathname, G_FILE_TEST_EXISTS)) { 6.76 return pathname; 6.77 } 6.78 - g_free (pathname); 6.79 + g_free(pathname); 6.80 elem = elem->next; 6.81 } 6.82 return NULL; 6.83 @@ -62,29 +67,33 @@ 6.84 6.85 6.86 /* This is an internally used function to create pixmaps. */ 6.87 -GtkWidget* create_pixmap(GtkWidget* widget, const gchar* filename) { 6.88 +GtkWidget* 6.89 +create_pixmap(GtkWidget* widget, const gchar* filename) 6.90 +{ 6.91 gchar* pathname = NULL; 6.92 GtkWidget* pixmap; 6.93 6.94 if (!filename || !filename[0]) { 6.95 - return gtk_image_new (); 6.96 + return gtk_image_new(); 6.97 } 6.98 6.99 - pathname = find_pixmap_file (filename); 6.100 + pathname = find_pixmap_file(filename); 6.101 6.102 if (!pathname) { 6.103 - g_warning ("Couldn't find pixmap file: %s", filename); 6.104 - return gtk_image_new (); 6.105 + g_warning("Couldn't find pixmap file: %s", filename); 6.106 + return gtk_image_new(); 6.107 } 6.108 6.109 - pixmap = gtk_image_new_from_file (pathname); 6.110 + pixmap = gtk_image_new_from_file(pathname); 6.111 g_free(pathname); 6.112 return pixmap; 6.113 } 6.114 6.115 6.116 /* This is an internally used function to create pixmaps. */ 6.117 -GdkPixbuf* create_pixbuf(const gchar* filename) { 6.118 +GdkPixbuf* 6.119 +create_pixbuf(const gchar* filename) 6.120 +{ 6.121 gchar* pathname = NULL; 6.122 GdkPixbuf* pixbuf; 6.123 GError* error = NULL; 6.124 @@ -96,11 +105,11 @@ 6.125 pathname = find_pixmap_file(filename); 6.126 6.127 if (!pathname) { 6.128 - g_warning ("Couldn't find pixmap file: %s", filename); 6.129 + g_warning("Couldn't find pixmap file: %s", filename); 6.130 return NULL; 6.131 } 6.132 6.133 - pixbuf = gdk_pixbuf_new_from_file (pathname, &error); 6.134 + pixbuf = gdk_pixbuf_new_from_file(pathname, &error); 6.135 if (!pixbuf) { 6.136 fprintf(stderr, "Failed to load pixbuf file: %s: %s\n", pathname, error->message); 6.137 g_error_free(error); 6.138 @@ -111,15 +120,16 @@ 6.139 6.140 6.141 /* This is used to set ATK action descriptions. */ 6.142 -void glade_set_atk_action_description(AtkAction* action, const gchar* action_name, const gchar* description) { 6.143 +void 6.144 +glade_set_atk_action_description(AtkAction* action, const gchar* action_name, const gchar* description) 6.145 +{ 6.146 gint n_actions; 6.147 gint i; 6.148 6.149 - n_actions = atk_action_get_n_actions (action); 6.150 + n_actions = atk_action_get_n_actions(action); 6.151 for (i = 0; i < n_actions; i++) { 6.152 - if (!strcmp (atk_action_get_name (action, i), action_name)) { 6.153 - atk_action_set_description (action, i, description); 6.154 + if (!strcmp(atk_action_get_name(action, i), action_name)) { 6.155 + atk_action_set_description(action, i, description); 6.156 } 6.157 } 6.158 } 6.159 -