cropper
view main.c @ 9:7e1cf00de1df
completely refactored makefile; removed interface.h
author | meillo@marmaro.de |
---|---|
date | Thu, 20 Mar 2008 20:01:38 +0100 |
parents | 61e5a1727231 |
children | 5e282003f0c1 |
line source
1 #include <gtk/gtk.h>
3 #include "main.h"
4 #include "support.h"
7 int main (int argc, char *argv[]) {
9 /* printf("argc: %i\nargv[0]: %s\nargv[1]: %s\nargv[2]: %s\n", argc, argv[0], argv[1], argv[2]); */
11 /* commandline option handling */
12 if (argc == 2) {
13 if (strcmp(argv[1], "--version") == 0) {
14 g_print("cropper - a crop frontend for convert\nversion 0.1\nhttp://prog.marmaro.de\n");
15 return(0);
16 } else {
17 image_filename = argv[1];
18 }
19 } else {
20 g_print("usage: cropper <image>\n cropper --version\n");
21 return(1);
22 }
26 gtk_set_locale ();
27 gtk_init (&argc, &argv);
29 add_pixmap_directory ("/usr/share/pixmaps");
31 cropper_window = create_cropper_window ();
32 gtk_widget_show (cropper_window);
34 gtk_main ();
35 return 0;
36 }