[tasks] Add --edit command line option
- From: Ross Burton <rburton src gnome org>
- To: svn-commits-list gnome org
- Subject: [tasks] Add --edit command line option
- Date: Fri, 27 Mar 2009 13:48:20 -0400 (EDT)
commit 35a1d61306f89854498b7246ec8137c6c40215a3
Author: Ross Burton <ross linux intel com>
Date: Fri Mar 20 16:03:54 2009 +0000
Add --edit command line option
---
src/gtk/main.c | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/src/gtk/main.c b/src/gtk/main.c
index 966c450..56b085a 100644
--- a/src/gtk/main.c
+++ b/src/gtk/main.c
@@ -563,7 +563,12 @@ main (int argc, char **argv)
GtkTreeSelection *selection;
GtkActionGroup *action_group, *task_action_group;
GtkUIManager *ui_manager;
-
+ char *edit_uid = NULL;
+ GOptionEntry entries[] = {
+ { "edit", 'e', 0, G_OPTION_ARG_STRING, &edit_uid, "Edit item", "<UID>" },
+ { NULL }
+ };
+
#if WITH_UNIQUE
UniqueApp *app;
#endif
@@ -576,7 +581,14 @@ main (int argc, char **argv)
#endif
g_set_application_name (_("Tasks"));
- gtk_init (&argc, &argv);
+ gtk_init_with_args (&argc, &argv, _(" - a to do list"),
+ entries, GETTEXT_PACKAGE, &error);
+
+ if (error) {
+ g_printerr ("%s\n", error->message);
+ g_error_free (error);
+ return EXIT_FAILURE;
+ }
#if WITH_UNIQUE
app = unique_app_new ("org.pimlico-project.Tasks", NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]