cropper

diff main.c @ 10:5e282003f0c1

minor changes; besser indenting
author meillo@marmaro.de
date Thu, 04 Mar 2010 13:54:17 +0100
parents 7e1cf00de1df
children c18ba4ea1514
line diff
     1.1 --- a/main.c	Thu Mar 20 20:01:38 2008 +0100
     1.2 +++ b/main.c	Thu Mar 04 13:54:17 2010 +0100
     1.3 @@ -6,32 +6,24 @@
     1.4  
     1.5  int main (int argc, char *argv[]) {
     1.6  
     1.7 -	/* printf("argc: %i\nargv[0]: %s\nargv[1]: %s\nargv[2]: %s\n", argc, argv[0], argv[1], argv[2]); */
     1.8 -
     1.9  	/* commandline option handling */
    1.10  	if (argc == 2) {
    1.11 -		if (strcmp(argv[1], "--version") == 0) {
    1.12 -			g_print("cropper - a crop frontend for convert\nversion 0.1\nhttp://prog.marmaro.de\n");
    1.13 -			return(0);
    1.14 -		} else {
    1.15 -			image_filename = argv[1];
    1.16 -		}
    1.17 +		image_filename = argv[1];
    1.18  	} else {
    1.19 -		g_print("usage: cropper <image>\n       cropper --version\n");
    1.20 -		return(1);
    1.21 +		g_print("cropper -- a crop frontend to convert\n");
    1.22 +		g_print("usage: cropper IMAGE\n");
    1.23 +		return 1;
    1.24  	}
    1.25  
    1.26 +	gtk_set_locale();
    1.27 +	gtk_init(&argc, &argv);
    1.28  
    1.29 +	add_pixmap_directory("/usr/share/pixmaps");
    1.30  
    1.31 -  gtk_set_locale ();
    1.32 -  gtk_init (&argc, &argv);
    1.33 +	cropper_window = create_cropper_window();
    1.34 +	gtk_widget_show(cropper_window);
    1.35 +	gtk_main ();
    1.36  
    1.37 -  add_pixmap_directory ("/usr/share/pixmaps");
    1.38 -
    1.39 -  cropper_window = create_cropper_window ();
    1.40 -  gtk_widget_show (cropper_window);
    1.41 -
    1.42 -  gtk_main ();
    1.43 -  return 0;
    1.44 +	return 0;
    1.45  }
    1.46