cropper
changeset 5:61e5a1727231
added image widget, that displays the image
author | meillo@marmaro.de |
---|---|
date | Fri, 07 Dec 2007 21:35:49 +0100 |
parents | 2f11ab3e6047 |
children | f53ce3b28bb4 |
files | interface.c main.c |
diffstat | 2 files changed, 10 insertions(+), 1 deletions(-) [+] |
line diff
1.1 --- a/interface.c Fri Dec 07 17:40:08 2007 +0100 1.2 +++ b/interface.c Fri Dec 07 21:35:49 2007 +0100 1.3 @@ -7,6 +7,7 @@ 1.4 #include <gdk/gdkkeysyms.h> 1.5 #include <gtk/gtk.h> 1.6 1.7 +#include "main.h" 1.8 #include "callbacks.h" 1.9 #include "interface.h" 1.10 #include "support.h" 1.11 @@ -71,6 +72,7 @@ 1.12 GtkWidget *frame1; 1.13 GtkWidget *vbox7; 1.14 GtkWidget *nav_container; 1.15 + GtkWidget *image_area; 1.16 GtkWidget *hbox16; 1.17 GtkWidget *hbox17; 1.18 GtkWidget *crop_zoom_in_button; 1.19 @@ -351,6 +353,12 @@ 1.20 gtk_widget_show (nav_container); 1.21 gtk_box_pack_start (GTK_BOX (vbox7), nav_container, TRUE, TRUE, 0); 1.22 1.23 +/* image_area */ 1.24 + image_area = gtk_image_new_from_file (image_filename); 1.25 + gtk_widget_set_name (image_area, "image_area"); 1.26 + gtk_widget_show (image_area); 1.27 + gtk_box_pack_start (GTK_BOX (nav_container), image_area, TRUE, TRUE, 0); 1.28 + 1.29 hbox16 = gtk_hbox_new (FALSE, 6); 1.30 gtk_widget_set_name (hbox16, "hbox16"); 1.31 gtk_widget_show (hbox16); 1.32 @@ -595,6 +603,7 @@ 1.33 GLADE_HOOKUP_OBJECT (cropper_window, frame1, "frame1"); 1.34 GLADE_HOOKUP_OBJECT (cropper_window, vbox7, "vbox7"); 1.35 GLADE_HOOKUP_OBJECT (cropper_window, nav_container, "nav_container"); 1.36 + GLADE_HOOKUP_OBJECT (cropper_window, image_area, "image_area"); 1.37 GLADE_HOOKUP_OBJECT (cropper_window, hbox16, "hbox16"); 1.38 GLADE_HOOKUP_OBJECT (cropper_window, hbox17, "hbox17"); 1.39 GLADE_HOOKUP_OBJECT (cropper_window, crop_zoom_in_button, "crop_zoom_in_button");
2.1 --- a/main.c Fri Dec 07 17:40:08 2007 +0100 2.2 +++ b/main.c Fri Dec 07 21:35:49 2007 +0100 2.3 @@ -18,7 +18,7 @@ 2.4 image_filename = argv[1]; 2.5 } 2.6 } else { 2.7 - g_print("usage: %s <image>\n", argv[0]); 2.8 + g_print("usage: cropper <image>\n cropper --version\n"); 2.9 return(1); 2.10 } 2.11