[Goodies-commits] r5651 - xfbib/branches/gobject/src
David Gustafsson
tssj at xfce.org
Thu Oct 16 21:47:32 CEST 2008
Author: tssj
Date: 2008-10-16 19:47:32 +0000 (Thu, 16 Oct 2008)
New Revision: 5651
Modified:
xfbib/branches/gobject/src/main.c
Log:
Small fixes to the commandline parsing
Modified: xfbib/branches/gobject/src/main.c
===================================================================
--- xfbib/branches/gobject/src/main.c 2008-10-16 18:01:38 UTC (rev 5650)
+++ xfbib/branches/gobject/src/main.c 2008-10-16 19:47:32 UTC (rev 5651)
@@ -27,6 +27,7 @@
#include "xfbib-bibtex.h"
#include "xfbib-state.h"
#include "xfbib-window.h"
+#include "xfbib-file-io.h"
gboolean
cb_window_destroy_event (GtkWidget *widget, GdkEvent *event, gpointer user_data)
@@ -62,8 +63,9 @@
// g_log_set_always_fatal (G_LOG_LEVEL_CRITICAL);
/**/
- opt_contxt = g_option_context_new("Context_new");
+ opt_contxt = g_option_context_new(NULL);
g_option_context_add_main_entries(opt_contxt, options, "main_entries");
+ g_option_context_set_description(opt_contxt, "Report bugs to http://bugs.xfce.org/\n");
if (!g_option_context_parse(opt_contxt, &argc, &argv, &error)) {
g_printerr("Error parsing: %s\n", error->message);
g_error_free(error);
@@ -73,12 +75,11 @@
g_option_context_free(opt_contxt);
- if(version) {
+ if (version) {
g_print(PACKAGE_STRING "\n");
return EXIT_SUCCESS;
}
-
state = xfbib_state_new();
elements = xfbib_bibtex_new();
@@ -108,11 +109,8 @@
g_printf("Error merging files, no output file specified\n");
return EXIT_FAILURE;
}
- g_print("-->%s\n", output_file);
xfbib_state_set_filename(state, output_file);
- g_print("-->%s\n", output_file);
xfbib_window_set_title(XFBIB_WINDOW(window), output_file);
- g_print("-->%s\n", output_file);
for (i = 0; i < n; i++) {
xfbib_file_io_open(input_files[i]);
More information about the Goodies-commits
mailing list