meillo@0: #include meillo@0: #include meillo@0: #include meillo@0: #include meillo@0: #include meillo@0: meillo@0: #include meillo@0: #include meillo@0: meillo@0: #include "callbacks.h" meillo@0: #include "interface.h" meillo@0: #include "support.h" meillo@0: meillo@0: #define GLADE_HOOKUP_OBJECT(component,widget,name) \ meillo@0: g_object_set_data_full (G_OBJECT (component), name, \ meillo@0: gtk_widget_ref (widget), (GDestroyNotify) gtk_widget_unref) meillo@0: meillo@0: #define GLADE_HOOKUP_OBJECT_NO_REF(component,widget,name) \ meillo@0: g_object_set_data (G_OBJECT (component), name, widget) meillo@0: meillo@0: GtkWidget* meillo@0: create_cropper_window (void) meillo@0: { meillo@0: GtkWidget *cropper_window; meillo@0: GtkWidget *dialog_vbox1; meillo@0: GtkWidget *hbox1; meillo@0: GtkWidget *vbox1; meillo@0: GtkWidget *vbox2; meillo@0: GtkWidget *label1; meillo@0: GtkWidget *hbox2; meillo@0: GtkWidget *label2; meillo@0: GtkWidget *table2; meillo@0: GtkWidget *label3; meillo@0: GtkWidget *label5; meillo@0: GtkWidget *label4; meillo@0: GtkWidget *label6; meillo@0: GtkWidget *hbox5; meillo@0: GtkObject *crop_x_spinbutton_adj; meillo@0: GtkWidget *crop_x_spinbutton; meillo@0: GtkWidget *hbox6; meillo@0: GtkObject *crop_y_spinbutton_adj; meillo@0: GtkWidget *crop_y_spinbutton; meillo@0: GtkWidget *hbox7; meillo@0: GtkObject *crop_width_spinbutton_adj; meillo@0: GtkWidget *crop_width_spinbutton; meillo@0: GtkWidget *hbox8; meillo@0: GtkObject *crop_height_spinbutton_adj; meillo@0: GtkWidget *crop_height_spinbutton; meillo@0: GtkWidget *vbox4; meillo@0: GtkWidget *label7; meillo@0: GtkWidget *hbox3; meillo@0: GtkWidget *label8; meillo@0: GtkWidget *table3; meillo@0: GtkWidget *hbox10; meillo@0: GtkWidget *custom_ratio_box; meillo@0: GtkObject *ratio_w_spinbutton_adj; meillo@0: GtkWidget *ratio_w_spinbutton; meillo@0: GtkWidget *ratio_swap_button; meillo@0: GtkWidget *eventbox1; meillo@0: GtkWidget *ratio_swap_image; meillo@0: GtkObject *ratio_h_spinbutton_adj; meillo@0: GtkWidget *ratio_h_spinbutton; meillo@0: GtkWidget *ratio_optionmenu; meillo@0: GtkWidget *menu1; meillo@0: GtkWidget *none1; meillo@0: GtkWidget *square1; meillo@0: GtkWidget *_4x3__book__dvd_1; meillo@0: GtkWidget *_4x6__postcard_1; meillo@0: GtkWidget *_5x1; meillo@0: GtkWidget *_8x1; meillo@0: GtkWidget *custom1; meillo@0: GtkWidget *vbox5; meillo@0: GtkWidget *frame1; meillo@0: GtkWidget *vbox7; meillo@0: GtkWidget *nav_container; meillo@0: GtkWidget *hbox16; meillo@0: GtkWidget *hbox17; meillo@0: GtkWidget *crop_zoom_in_button; meillo@0: GtkWidget *image2; meillo@0: GtkWidget *crop_zoom_out_button; meillo@0: GtkWidget *image4; meillo@0: GtkWidget *crop_zoom_100_button; meillo@0: GtkWidget *image3; meillo@0: GtkWidget *crop_zoom_fit_button; meillo@0: GtkWidget *image1; meillo@0: meillo@0: cropper_window = gtk_window_new (GTK_WINDOW_TOPLEVEL); meillo@0: gtk_widget_set_name (cropper_window, "cropper_window"); meillo@0: gtk_container_set_border_width (GTK_CONTAINER (cropper_window), 6); meillo@0: gtk_window_set_title (GTK_WINDOW (cropper_window), "Cropper"); meillo@0: meillo@0: dialog_vbox1 = gtk_vbox_new (FALSE, 6); meillo@0: gtk_widget_set_name (dialog_vbox1, "dialog_vbox1"); meillo@0: gtk_widget_show (dialog_vbox1); meillo@0: gtk_container_add (GTK_CONTAINER (cropper_window), dialog_vbox1); meillo@0: meillo@0: hbox1 = gtk_hbox_new (FALSE, 12); meillo@0: gtk_widget_set_name (hbox1, "hbox1"); meillo@0: gtk_widget_show (hbox1); meillo@0: gtk_box_pack_start (GTK_BOX (dialog_vbox1), hbox1, TRUE, TRUE, 0); meillo@0: gtk_container_set_border_width (GTK_CONTAINER (hbox1), 5); meillo@0: meillo@0: vbox1 = gtk_vbox_new (FALSE, 12); meillo@0: gtk_widget_set_name (vbox1, "vbox1"); meillo@0: gtk_widget_show (vbox1); meillo@0: gtk_box_pack_start (GTK_BOX (hbox1), vbox1, FALSE, TRUE, 0); meillo@0: meillo@0: vbox2 = gtk_vbox_new (FALSE, 6); meillo@0: gtk_widget_set_name (vbox2, "vbox2"); meillo@0: gtk_widget_show (vbox2); meillo@0: gtk_box_pack_start (GTK_BOX (vbox1), vbox2, FALSE, TRUE, 0); meillo@0: meillo@0: label1 = gtk_label_new ("Selection"); meillo@0: gtk_widget_set_name (label1, "label1"); meillo@0: gtk_widget_show (label1); meillo@0: gtk_box_pack_start (GTK_BOX (vbox2), label1, FALSE, FALSE, 0); meillo@0: gtk_label_set_use_markup (GTK_LABEL (label1), TRUE); meillo@0: gtk_misc_set_alignment (GTK_MISC (label1), 0, 0.5); meillo@0: meillo@0: hbox2 = gtk_hbox_new (FALSE, 0); meillo@0: gtk_widget_set_name (hbox2, "hbox2"); meillo@0: gtk_widget_show (hbox2); meillo@0: gtk_box_pack_start (GTK_BOX (vbox2), hbox2, FALSE, TRUE, 0); meillo@0: meillo@0: label2 = gtk_label_new (" "); meillo@0: gtk_widget_set_name (label2, "label2"); meillo@0: gtk_widget_show (label2); meillo@0: gtk_box_pack_start (GTK_BOX (hbox2), label2, FALSE, FALSE, 0); meillo@0: meillo@0: table2 = gtk_table_new (4, 2, FALSE); meillo@0: gtk_widget_set_name (table2, "table2"); meillo@0: gtk_widget_show (table2); meillo@0: gtk_box_pack_start (GTK_BOX (hbox2), table2, TRUE, TRUE, 0); meillo@0: gtk_table_set_row_spacings (GTK_TABLE (table2), 6); meillo@0: gtk_table_set_col_spacings (GTK_TABLE (table2), 6); meillo@0: meillo@0: label3 = gtk_label_new_with_mnemonic ("_X:"); meillo@0: gtk_widget_set_name (label3, "label3"); meillo@0: gtk_widget_show (label3); meillo@0: gtk_table_attach (GTK_TABLE (table2), label3, 0, 1, 0, 1, meillo@0: (GtkAttachOptions) (GTK_FILL), meillo@0: (GtkAttachOptions) (0), 0, 0); meillo@0: gtk_misc_set_alignment (GTK_MISC (label3), 0, 0.5); meillo@0: meillo@0: label5 = gtk_label_new_with_mnemonic ("_Y:"); meillo@0: gtk_widget_set_name (label5, "label5"); meillo@0: gtk_widget_show (label5); meillo@0: gtk_table_attach (GTK_TABLE (table2), label5, 0, 1, 1, 2, meillo@0: (GtkAttachOptions) (GTK_FILL), meillo@0: (GtkAttachOptions) (0), 0, 0); meillo@0: gtk_misc_set_alignment (GTK_MISC (label5), 0, 0.5); meillo@0: meillo@0: label4 = gtk_label_new_with_mnemonic ("_Width:"); meillo@0: gtk_widget_set_name (label4, "label4"); meillo@0: gtk_widget_show (label4); meillo@0: gtk_table_attach (GTK_TABLE (table2), label4, 0, 1, 2, 3, meillo@0: (GtkAttachOptions) (GTK_FILL), meillo@0: (GtkAttachOptions) (0), 0, 0); meillo@0: gtk_misc_set_alignment (GTK_MISC (label4), 0, 0.5); meillo@0: meillo@0: label6 = gtk_label_new_with_mnemonic ("_Height:"); meillo@0: gtk_widget_set_name (label6, "label6"); meillo@0: gtk_widget_show (label6); meillo@0: gtk_table_attach (GTK_TABLE (table2), label6, 0, 1, 3, 4, meillo@0: (GtkAttachOptions) (GTK_FILL), meillo@0: (GtkAttachOptions) (0), 0, 0); meillo@0: gtk_misc_set_alignment (GTK_MISC (label6), 0, 0.5); meillo@0: meillo@0: hbox5 = gtk_hbox_new (FALSE, 0); meillo@0: gtk_widget_set_name (hbox5, "hbox5"); meillo@0: gtk_widget_show (hbox5); meillo@0: gtk_table_attach (GTK_TABLE (table2), hbox5, 1, 2, 0, 1, meillo@0: (GtkAttachOptions) (GTK_FILL), meillo@0: (GtkAttachOptions) (GTK_FILL), 0, 0); meillo@0: meillo@0: crop_x_spinbutton_adj = gtk_adjustment_new (1, 0, 300, 1, 10, 1); meillo@0: crop_x_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (crop_x_spinbutton_adj), 1, 0); meillo@0: gtk_widget_set_name (crop_x_spinbutton, "crop_x_spinbutton"); meillo@0: gtk_widget_show (crop_x_spinbutton); meillo@0: gtk_box_pack_start (GTK_BOX (hbox5), crop_x_spinbutton, FALSE, TRUE, 0); meillo@0: meillo@0: hbox6 = gtk_hbox_new (FALSE, 0); meillo@0: gtk_widget_set_name (hbox6, "hbox6"); meillo@0: gtk_widget_show (hbox6); meillo@0: gtk_table_attach (GTK_TABLE (table2), hbox6, 1, 2, 1, 2, meillo@0: (GtkAttachOptions) (GTK_FILL), meillo@0: (GtkAttachOptions) (GTK_FILL), 0, 0); meillo@0: meillo@0: crop_y_spinbutton_adj = gtk_adjustment_new (1, 0, 300, 1, 10, 1); meillo@0: crop_y_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (crop_y_spinbutton_adj), 1, 0); meillo@0: gtk_widget_set_name (crop_y_spinbutton, "crop_y_spinbutton"); meillo@0: gtk_widget_show (crop_y_spinbutton); meillo@0: gtk_box_pack_start (GTK_BOX (hbox6), crop_y_spinbutton, FALSE, TRUE, 0); meillo@0: meillo@0: hbox7 = gtk_hbox_new (FALSE, 0); meillo@0: gtk_widget_set_name (hbox7, "hbox7"); meillo@0: gtk_widget_show (hbox7); meillo@0: gtk_table_attach (GTK_TABLE (table2), hbox7, 1, 2, 2, 3, meillo@0: (GtkAttachOptions) (GTK_FILL), meillo@0: (GtkAttachOptions) (GTK_FILL), 0, 0); meillo@0: meillo@0: crop_width_spinbutton_adj = gtk_adjustment_new (1, 0, 300, 1, 10, 1); meillo@0: crop_width_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (crop_width_spinbutton_adj), 1, 0); meillo@0: gtk_widget_set_name (crop_width_spinbutton, "crop_width_spinbutton"); meillo@0: gtk_widget_show (crop_width_spinbutton); meillo@0: gtk_box_pack_start (GTK_BOX (hbox7), crop_width_spinbutton, FALSE, FALSE, 0); meillo@0: meillo@0: hbox8 = gtk_hbox_new (FALSE, 0); meillo@0: gtk_widget_set_name (hbox8, "hbox8"); meillo@0: gtk_widget_show (hbox8); meillo@0: gtk_table_attach (GTK_TABLE (table2), hbox8, 1, 2, 3, 4, meillo@0: (GtkAttachOptions) (GTK_FILL), meillo@0: (GtkAttachOptions) (GTK_FILL), 0, 0); meillo@0: meillo@0: crop_height_spinbutton_adj = gtk_adjustment_new (1, 0, 300, 1, 10, 1); meillo@0: crop_height_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (crop_height_spinbutton_adj), 1, 0); meillo@0: gtk_widget_set_name (crop_height_spinbutton, "crop_height_spinbutton"); meillo@0: gtk_widget_show (crop_height_spinbutton); meillo@0: gtk_box_pack_start (GTK_BOX (hbox8), crop_height_spinbutton, FALSE, FALSE, 0); meillo@0: meillo@0: vbox4 = gtk_vbox_new (FALSE, 6); meillo@0: gtk_widget_set_name (vbox4, "vbox4"); meillo@0: gtk_widget_show (vbox4); meillo@0: gtk_box_pack_start (GTK_BOX (vbox1), vbox4, FALSE, TRUE, 0); meillo@0: meillo@0: label7 = gtk_label_new ("Aspect ratio"); meillo@0: gtk_widget_set_name (label7, "label7"); meillo@0: gtk_widget_show (label7); meillo@0: gtk_box_pack_start (GTK_BOX (vbox4), label7, FALSE, FALSE, 0); meillo@0: gtk_label_set_use_markup (GTK_LABEL (label7), TRUE); meillo@0: gtk_misc_set_alignment (GTK_MISC (label7), 0, 0.5); meillo@0: meillo@0: hbox3 = gtk_hbox_new (FALSE, 0); meillo@0: gtk_widget_set_name (hbox3, "hbox3"); meillo@0: gtk_widget_show (hbox3); meillo@0: gtk_box_pack_start (GTK_BOX (vbox4), hbox3, FALSE, FALSE, 0); meillo@0: meillo@0: label8 = gtk_label_new (" "); meillo@0: gtk_widget_set_name (label8, "label8"); meillo@0: gtk_widget_show (label8); meillo@0: gtk_box_pack_start (GTK_BOX (hbox3), label8, FALSE, FALSE, 0); meillo@0: meillo@0: table3 = gtk_table_new (2, 2, FALSE); meillo@0: gtk_widget_set_name (table3, "table3"); meillo@0: gtk_widget_show (table3); meillo@0: gtk_box_pack_start (GTK_BOX (hbox3), table3, TRUE, TRUE, 0); meillo@0: gtk_table_set_row_spacings (GTK_TABLE (table3), 6); meillo@0: gtk_table_set_col_spacings (GTK_TABLE (table3), 6); meillo@0: meillo@0: hbox10 = gtk_hbox_new (FALSE, 6); meillo@0: gtk_widget_set_name (hbox10, "hbox10"); meillo@0: gtk_widget_show (hbox10); meillo@0: gtk_table_attach (GTK_TABLE (table3), hbox10, 0, 2, 1, 2, meillo@0: (GtkAttachOptions) (GTK_FILL), meillo@0: (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); meillo@0: meillo@0: custom_ratio_box = gtk_hbox_new (FALSE, 6); meillo@0: gtk_widget_set_name (custom_ratio_box, "custom_ratio_box"); meillo@0: gtk_widget_show (custom_ratio_box); meillo@0: gtk_box_pack_start (GTK_BOX (hbox10), custom_ratio_box, TRUE, TRUE, 0); meillo@0: meillo@0: ratio_w_spinbutton_adj = gtk_adjustment_new (1, 1, 9999, 1, 10, 10); meillo@0: ratio_w_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (ratio_w_spinbutton_adj), 1, 0); meillo@0: gtk_widget_set_name (ratio_w_spinbutton, "ratio_w_spinbutton"); meillo@0: gtk_widget_show (ratio_w_spinbutton); meillo@0: gtk_box_pack_start (GTK_BOX (custom_ratio_box), ratio_w_spinbutton, FALSE, TRUE, 0); meillo@0: meillo@0: ratio_swap_button = gtk_button_new (); meillo@0: gtk_widget_set_name (ratio_swap_button, "ratio_swap_button"); meillo@0: gtk_widget_show (ratio_swap_button); meillo@0: gtk_box_pack_start (GTK_BOX (custom_ratio_box), ratio_swap_button, FALSE, FALSE, 0); meillo@0: gtk_button_set_relief (GTK_BUTTON (ratio_swap_button), GTK_RELIEF_NONE); meillo@0: meillo@0: eventbox1 = gtk_event_box_new (); meillo@0: gtk_widget_set_name (eventbox1, "eventbox1"); meillo@0: gtk_widget_show (eventbox1); meillo@0: gtk_container_add (GTK_CONTAINER (ratio_swap_button), eventbox1); meillo@0: meillo@0: ratio_swap_image = gtk_image_new_from_stock ("gtk-refresh", GTK_ICON_SIZE_BUTTON); meillo@0: gtk_widget_set_name (ratio_swap_image, "ratio_swap_image"); meillo@0: gtk_widget_show (ratio_swap_image); meillo@0: gtk_container_add (GTK_CONTAINER (eventbox1), ratio_swap_image); meillo@0: meillo@0: ratio_h_spinbutton_adj = gtk_adjustment_new (1, 1, 9999, 1, 10, 10); meillo@0: ratio_h_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (ratio_h_spinbutton_adj), 1, 0); meillo@0: gtk_widget_set_name (ratio_h_spinbutton, "ratio_h_spinbutton"); meillo@0: gtk_widget_show (ratio_h_spinbutton); meillo@0: gtk_box_pack_start (GTK_BOX (custom_ratio_box), ratio_h_spinbutton, FALSE, TRUE, 0); meillo@0: gtk_spin_button_set_update_policy (GTK_SPIN_BUTTON (ratio_h_spinbutton), GTK_UPDATE_IF_VALID); meillo@0: meillo@0: ratio_optionmenu = gtk_option_menu_new (); meillo@0: gtk_widget_set_name (ratio_optionmenu, "ratio_optionmenu"); meillo@0: gtk_widget_show (ratio_optionmenu); meillo@0: gtk_table_attach (GTK_TABLE (table3), ratio_optionmenu, 0, 2, 0, 1, meillo@0: (GtkAttachOptions) (GTK_FILL), meillo@0: (GtkAttachOptions) (0), 0, 0); meillo@0: meillo@0: menu1 = gtk_menu_new (); meillo@0: gtk_widget_set_name (menu1, "menu1"); meillo@0: meillo@0: none1 = gtk_menu_item_new_with_mnemonic ("None"); meillo@0: gtk_widget_set_name (none1, "none1"); meillo@0: gtk_widget_show (none1); meillo@0: gtk_container_add (GTK_CONTAINER (menu1), none1); meillo@0: meillo@0: square1 = gtk_menu_item_new_with_mnemonic ("Square"); meillo@0: gtk_widget_set_name (square1, "square1"); meillo@0: gtk_widget_show (square1); meillo@0: gtk_container_add (GTK_CONTAINER (menu1), square1); meillo@0: meillo@0: _4x3__book__dvd_1 = gtk_menu_item_new_with_mnemonic ("4 x 3 (Book, DVD)"); meillo@0: gtk_widget_set_name (_4x3__book__dvd_1, "_4x3__book__dvd_1"); meillo@0: gtk_widget_show (_4x3__book__dvd_1); meillo@0: gtk_container_add (GTK_CONTAINER (menu1), _4x3__book__dvd_1); meillo@0: meillo@0: _4x6__postcard_1 = gtk_menu_item_new_with_mnemonic ("4 x 6 (Postcard)"); meillo@0: gtk_widget_set_name (_4x6__postcard_1, "_4x6__postcard_1"); meillo@0: gtk_widget_show (_4x6__postcard_1); meillo@0: gtk_container_add (GTK_CONTAINER (menu1), _4x6__postcard_1); meillo@0: meillo@0: _5x1 = gtk_menu_item_new_with_mnemonic ("5 x 7"); meillo@0: gtk_widget_set_name (_5x1, "_5x1"); meillo@0: gtk_widget_show (_5x1); meillo@0: gtk_container_add (GTK_CONTAINER (menu1), _5x1); meillo@0: meillo@0: _8x1 = gtk_menu_item_new_with_mnemonic ("8 x 10"); meillo@0: gtk_widget_set_name (_8x1, "_8x1"); meillo@0: gtk_widget_show (_8x1); meillo@0: gtk_container_add (GTK_CONTAINER (menu1), _8x1); meillo@0: meillo@0: custom1 = gtk_menu_item_new_with_mnemonic ("Custom"); meillo@0: gtk_widget_set_name (custom1, "custom1"); meillo@0: gtk_widget_show (custom1); meillo@0: gtk_container_add (GTK_CONTAINER (menu1), custom1); meillo@0: meillo@0: gtk_option_menu_set_menu (GTK_OPTION_MENU (ratio_optionmenu), menu1); meillo@0: meillo@0: vbox5 = gtk_vbox_new (FALSE, 0); meillo@0: gtk_widget_set_name (vbox5, "vbox5"); meillo@0: gtk_widget_show (vbox5); meillo@0: gtk_box_pack_start (GTK_BOX (hbox1), vbox5, TRUE, TRUE, 0); meillo@0: meillo@0: frame1 = gtk_frame_new (NULL); meillo@0: gtk_widget_set_name (frame1, "frame1"); meillo@0: gtk_widget_show (frame1); meillo@0: gtk_box_pack_start (GTK_BOX (vbox5), frame1, TRUE, TRUE, 0); meillo@0: gtk_frame_set_shadow_type (GTK_FRAME (frame1), GTK_SHADOW_NONE); meillo@0: meillo@0: vbox7 = gtk_vbox_new (FALSE, 6); meillo@0: gtk_widget_set_name (vbox7, "vbox7"); meillo@0: gtk_widget_show (vbox7); meillo@0: gtk_container_add (GTK_CONTAINER (frame1), vbox7); meillo@0: meillo@0: nav_container = gtk_hbox_new (FALSE, 0); meillo@0: gtk_widget_set_name (nav_container, "nav_container"); meillo@0: gtk_widget_show (nav_container); meillo@0: gtk_box_pack_start (GTK_BOX (vbox7), nav_container, TRUE, TRUE, 0); meillo@0: meillo@0: hbox16 = gtk_hbox_new (FALSE, 6); meillo@0: gtk_widget_set_name (hbox16, "hbox16"); meillo@0: gtk_widget_show (hbox16); meillo@0: gtk_box_pack_start (GTK_BOX (vbox7), hbox16, FALSE, TRUE, 0); meillo@0: meillo@0: hbox17 = gtk_hbox_new (FALSE, 0); meillo@0: gtk_widget_set_name (hbox17, "hbox17"); meillo@0: gtk_widget_show (hbox17); meillo@0: gtk_box_pack_end (GTK_BOX (hbox16), hbox17, FALSE, TRUE, 0); meillo@0: meillo@0: crop_zoom_in_button = gtk_button_new (); meillo@0: gtk_widget_set_name (crop_zoom_in_button, "crop_zoom_in_button"); meillo@0: gtk_widget_show (crop_zoom_in_button); meillo@0: gtk_box_pack_start (GTK_BOX (hbox17), crop_zoom_in_button, FALSE, FALSE, 0); meillo@0: gtk_button_set_relief (GTK_BUTTON (crop_zoom_in_button), GTK_RELIEF_NONE); meillo@0: meillo@0: image2 = gtk_image_new_from_stock ("gtk-zoom-in", GTK_ICON_SIZE_BUTTON); meillo@0: gtk_widget_set_name (image2, "image2"); meillo@0: gtk_widget_show (image2); meillo@0: gtk_container_add (GTK_CONTAINER (crop_zoom_in_button), image2); meillo@0: meillo@0: crop_zoom_out_button = gtk_button_new (); meillo@0: gtk_widget_set_name (crop_zoom_out_button, "crop_zoom_out_button"); meillo@0: gtk_widget_show (crop_zoom_out_button); meillo@0: gtk_box_pack_start (GTK_BOX (hbox17), crop_zoom_out_button, FALSE, FALSE, 0); meillo@0: gtk_button_set_relief (GTK_BUTTON (crop_zoom_out_button), GTK_RELIEF_NONE); meillo@0: meillo@0: image4 = gtk_image_new_from_stock ("gtk-zoom-out", GTK_ICON_SIZE_BUTTON); meillo@0: gtk_widget_set_name (image4, "image4"); meillo@0: gtk_widget_show (image4); meillo@0: gtk_container_add (GTK_CONTAINER (crop_zoom_out_button), image4); meillo@0: meillo@0: crop_zoom_100_button = gtk_button_new (); meillo@0: gtk_widget_set_name (crop_zoom_100_button, "crop_zoom_100_button"); meillo@0: gtk_widget_show (crop_zoom_100_button); meillo@0: gtk_box_pack_start (GTK_BOX (hbox17), crop_zoom_100_button, FALSE, FALSE, 0); meillo@0: gtk_button_set_relief (GTK_BUTTON (crop_zoom_100_button), GTK_RELIEF_NONE); meillo@0: meillo@0: image3 = gtk_image_new_from_stock ("gtk-zoom-100", GTK_ICON_SIZE_BUTTON); meillo@0: gtk_widget_set_name (image3, "image3"); meillo@0: gtk_widget_show (image3); meillo@0: gtk_container_add (GTK_CONTAINER (crop_zoom_100_button), image3); meillo@0: meillo@0: crop_zoom_fit_button = gtk_button_new (); meillo@0: gtk_widget_set_name (crop_zoom_fit_button, "crop_zoom_fit_button"); meillo@0: gtk_widget_show (crop_zoom_fit_button); meillo@0: gtk_box_pack_start (GTK_BOX (hbox17), crop_zoom_fit_button, FALSE, FALSE, 0); meillo@0: gtk_button_set_relief (GTK_BUTTON (crop_zoom_fit_button), GTK_RELIEF_NONE); meillo@0: meillo@0: image1 = gtk_image_new_from_stock ("gtk-zoom-fit", GTK_ICON_SIZE_BUTTON); meillo@0: gtk_widget_set_name (image1, "image1"); meillo@0: gtk_widget_show (image1); meillo@0: gtk_container_add (GTK_CONTAINER (crop_zoom_fit_button), image1); meillo@0: meillo@1: meillo@0: g_signal_connect ((gpointer) cropper_window, "delete_event", meillo@0: G_CALLBACK (on_cropper_window_delete_event), meillo@0: NULL); meillo@0: g_signal_connect ((gpointer) cropper_window, "destroy", meillo@0: G_CALLBACK (on_cropper_window_destroy), meillo@0: NULL); meillo@0: g_signal_connect ((gpointer) ratio_w_spinbutton, "value_changed", meillo@0: G_CALLBACK (on_ratio_w_spinbutton_value_changed), meillo@0: NULL); meillo@0: g_signal_connect ((gpointer) ratio_w_spinbutton, "change_value", meillo@0: G_CALLBACK (on_ratio_w_spinbutton_change_value), meillo@0: NULL); meillo@0: g_signal_connect ((gpointer) ratio_swap_button, "clicked", meillo@0: G_CALLBACK (on_ratio_swap_button_clicked), meillo@0: NULL); meillo@0: g_signal_connect ((gpointer) ratio_h_spinbutton, "change_value", meillo@0: G_CALLBACK (on_ratio_h_spinbutton_change_value), meillo@0: NULL); meillo@0: g_signal_connect ((gpointer) ratio_h_spinbutton, "value_changed", meillo@0: G_CALLBACK (on_ratio_h_spinbutton_value_changed), meillo@0: NULL); meillo@0: g_signal_connect ((gpointer) none1, "activate", meillo@0: G_CALLBACK (on_none1_activate), meillo@0: NULL); meillo@0: g_signal_connect ((gpointer) square1, "activate", meillo@0: G_CALLBACK (on_square1_activate), meillo@0: NULL); meillo@0: g_signal_connect ((gpointer) _4x3__book__dvd_1, "activate", meillo@0: G_CALLBACK (on_4x3__book__dvd_1_activate), meillo@0: NULL); meillo@0: g_signal_connect ((gpointer) _4x6__postcard_1, "activate", meillo@0: G_CALLBACK (on_4x6__postcard_1_activate), meillo@0: NULL); meillo@0: g_signal_connect ((gpointer) _5x1, "activate", meillo@0: G_CALLBACK (on_5x1_activate), meillo@0: NULL); meillo@0: g_signal_connect ((gpointer) _8x1, "activate", meillo@0: G_CALLBACK (on_8x1_activate), meillo@0: NULL); meillo@0: g_signal_connect ((gpointer) custom1, "activate", meillo@0: G_CALLBACK (on_custom1_activate), meillo@0: NULL); meillo@0: meillo@0: /* Store pointers to all widgets, for use by lookup_widget(). */ meillo@0: GLADE_HOOKUP_OBJECT_NO_REF (cropper_window, cropper_window, "cropper_window"); meillo@0: GLADE_HOOKUP_OBJECT (cropper_window, dialog_vbox1, "dialog_vbox1"); meillo@0: GLADE_HOOKUP_OBJECT (cropper_window, hbox1, "hbox1"); meillo@0: GLADE_HOOKUP_OBJECT (cropper_window, vbox1, "vbox1"); meillo@0: GLADE_HOOKUP_OBJECT (cropper_window, vbox2, "vbox2"); meillo@0: GLADE_HOOKUP_OBJECT (cropper_window, label1, "label1"); meillo@0: GLADE_HOOKUP_OBJECT (cropper_window, hbox2, "hbox2"); meillo@0: GLADE_HOOKUP_OBJECT (cropper_window, label2, "label2"); meillo@0: GLADE_HOOKUP_OBJECT (cropper_window, table2, "table2"); meillo@0: GLADE_HOOKUP_OBJECT (cropper_window, label3, "label3"); meillo@0: GLADE_HOOKUP_OBJECT (cropper_window, label5, "label5"); meillo@0: GLADE_HOOKUP_OBJECT (cropper_window, label4, "label4"); meillo@0: GLADE_HOOKUP_OBJECT (cropper_window, label6, "label6"); meillo@0: GLADE_HOOKUP_OBJECT (cropper_window, hbox5, "hbox5"); meillo@0: GLADE_HOOKUP_OBJECT (cropper_window, crop_x_spinbutton, "crop_x_spinbutton"); meillo@0: GLADE_HOOKUP_OBJECT (cropper_window, hbox6, "hbox6"); meillo@0: GLADE_HOOKUP_OBJECT (cropper_window, crop_y_spinbutton, "crop_y_spinbutton"); meillo@0: GLADE_HOOKUP_OBJECT (cropper_window, hbox7, "hbox7"); meillo@0: GLADE_HOOKUP_OBJECT (cropper_window, crop_width_spinbutton, "crop_width_spinbutton"); meillo@0: GLADE_HOOKUP_OBJECT (cropper_window, hbox8, "hbox8"); meillo@0: GLADE_HOOKUP_OBJECT (cropper_window, crop_height_spinbutton, "crop_height_spinbutton"); meillo@0: GLADE_HOOKUP_OBJECT (cropper_window, vbox4, "vbox4"); meillo@0: GLADE_HOOKUP_OBJECT (cropper_window, label7, "label7"); meillo@0: GLADE_HOOKUP_OBJECT (cropper_window, hbox3, "hbox3"); meillo@0: GLADE_HOOKUP_OBJECT (cropper_window, label8, "label8"); meillo@0: GLADE_HOOKUP_OBJECT (cropper_window, table3, "table3"); meillo@0: GLADE_HOOKUP_OBJECT (cropper_window, hbox10, "hbox10"); meillo@0: GLADE_HOOKUP_OBJECT (cropper_window, custom_ratio_box, "custom_ratio_box"); meillo@0: GLADE_HOOKUP_OBJECT (cropper_window, ratio_w_spinbutton, "ratio_w_spinbutton"); meillo@0: GLADE_HOOKUP_OBJECT (cropper_window, ratio_swap_button, "ratio_swap_button"); meillo@0: GLADE_HOOKUP_OBJECT (cropper_window, eventbox1, "eventbox1"); meillo@0: GLADE_HOOKUP_OBJECT (cropper_window, ratio_swap_image, "ratio_swap_image"); meillo@0: GLADE_HOOKUP_OBJECT (cropper_window, ratio_h_spinbutton, "ratio_h_spinbutton"); meillo@0: GLADE_HOOKUP_OBJECT (cropper_window, ratio_optionmenu, "ratio_optionmenu"); meillo@0: GLADE_HOOKUP_OBJECT (cropper_window, menu1, "menu1"); meillo@0: GLADE_HOOKUP_OBJECT (cropper_window, none1, "none1"); meillo@0: GLADE_HOOKUP_OBJECT (cropper_window, square1, "square1"); meillo@0: GLADE_HOOKUP_OBJECT (cropper_window, _4x3__book__dvd_1, "_4x3__book__dvd_1"); meillo@0: GLADE_HOOKUP_OBJECT (cropper_window, _4x6__postcard_1, "_4x6__postcard_1"); meillo@0: GLADE_HOOKUP_OBJECT (cropper_window, _5x1, "_5x1"); meillo@0: GLADE_HOOKUP_OBJECT (cropper_window, _8x1, "_8x1"); meillo@0: GLADE_HOOKUP_OBJECT (cropper_window, custom1, "custom1"); meillo@0: GLADE_HOOKUP_OBJECT (cropper_window, vbox5, "vbox5"); meillo@0: GLADE_HOOKUP_OBJECT (cropper_window, frame1, "frame1"); meillo@0: GLADE_HOOKUP_OBJECT (cropper_window, vbox7, "vbox7"); meillo@0: GLADE_HOOKUP_OBJECT (cropper_window, nav_container, "nav_container"); meillo@0: GLADE_HOOKUP_OBJECT (cropper_window, hbox16, "hbox16"); meillo@0: GLADE_HOOKUP_OBJECT (cropper_window, hbox17, "hbox17"); meillo@0: GLADE_HOOKUP_OBJECT (cropper_window, crop_zoom_in_button, "crop_zoom_in_button"); meillo@0: GLADE_HOOKUP_OBJECT (cropper_window, image2, "image2"); meillo@0: GLADE_HOOKUP_OBJECT (cropper_window, crop_zoom_out_button, "crop_zoom_out_button"); meillo@0: GLADE_HOOKUP_OBJECT (cropper_window, image4, "image4"); meillo@0: GLADE_HOOKUP_OBJECT (cropper_window, crop_zoom_100_button, "crop_zoom_100_button"); meillo@0: GLADE_HOOKUP_OBJECT (cropper_window, image3, "image3"); meillo@0: GLADE_HOOKUP_OBJECT (cropper_window, crop_zoom_fit_button, "crop_zoom_fit_button"); meillo@0: GLADE_HOOKUP_OBJECT (cropper_window, image1, "image1"); meillo@0: meillo@0: return cropper_window; meillo@0: } meillo@0: