summaryrefslogtreecommitdiff
path: root/src/logdiag.c
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2011-02-19 13:22:06 +0100
committerPřemysl Janouch <p.janouch@gmail.com>2011-02-19 22:49:20 +0100
commit781273c236c9a17d13d813e5689f72bac6053818 (patch)
treee0d67d95b620445170143b2537e13c771549a81c /src/logdiag.c
parent7fa6efbaec6ee743a9ddfbab81b3e8079448e107 (diff)
downloadlogdiag-781273c236c9a17d13d813e5689f72bac6053818.tar.gz
logdiag-781273c236c9a17d13d813e5689f72bac6053818.tar.xz
logdiag-781273c236c9a17d13d813e5689f72bac6053818.zip
Open files from command line.
Diffstat (limited to 'src/logdiag.c')
-rw-r--r--src/logdiag.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/logdiag.c b/src/logdiag.c
index 99aa8de..fd871f2 100644
--- a/src/logdiag.c
+++ b/src/logdiag.c
@@ -19,7 +19,6 @@
int
main (int argc, char *argv[])
{
- GtkWidget *window;
GError *error;
#ifdef _WIN32
gchar *install_dir;
@@ -48,11 +47,15 @@ main (int argc, char *argv[])
return 1;
}
- /* TODO: Open the file in the parameter, if present. */
gtk_window_set_default_icon_name (PROJECT_NAME);
- window = ld_window_main_new ();
- gtk_main ();
+ /* TODO: Accept multiple files. */
+ if (argc < 2)
+ ld_window_main_new (NULL);
+ else
+ ld_window_main_new (argv[1]);
+
+ gtk_main ();
return 0;
}