aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Burton <ross@linux.intel.com>2008-01-29 10:45:17 +0000
committerRoss Burton <ross@linux.intel.com>2008-01-29 10:45:17 +0000
commitdf868a41b79fdffdfe1fee331d2cbcbcd1c1cb50 (patch)
tree9fedc206e03171bb8574ac51517491b4f7956155
parent65351b44244da6329bd36bf0df4816f81584c5a2 (diff)
downloadgaku-df868a41b79fdffdfe1fee331d2cbcbcd1c1cb50.tar.gz
gaku-df868a41b79fdffdfe1fee331d2cbcbcd1c1cb50.tar.bz2
gaku-df868a41b79fdffdfe1fee331d2cbcbcd1c1cb50.zip
Add any arguments left on the command line as files
-rw-r--r--main.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/main.c b/main.c
index 318f52e..2b85d62 100644
--- a/main.c
+++ b/main.c
@@ -671,6 +671,7 @@ main (int argc, char **argv)
AppData *data;
GtkWidget *vbox, *hbox, *bbox, *scrolled_window;
GtkWidget *button, *image;
+ int i;
/**
* Initialize APIs.
@@ -879,6 +880,18 @@ main (int argc, char **argv)
gtk_widget_show_all (data->window);
/**
+ * Add any files specified on the command line.
+ */
+ for (i = 1; i < argc; i++) {
+ char *uri;
+ uri = g_filename_to_uri (argv[i], NULL, NULL);
+ if (uri) {
+ add_uri (data, uri);
+ g_free (uri);
+ }
+ }
+
+ /**
* Enter main loop.
**/
gtk_main ();