What's New
==========
+v0.0.7
+------
+ * added support of taskwarrior 2.3.0.
+ * added combo box for project in the new task dialog.
+ * disable the removal of recurrent tasks which is freezing ptask
+ because taskwarrior CLI is prompting a confirmation. That's the
+ consequence of the taskwarrior bug TW-638.
+ * display the tags of the selected task.
+
v0.0.6
------
* added contextal menu item in the task tree: task done.
* added urgency column.
* implemented the cancel button of the task panel.
* added menu.
- * restore position of vertical/horizaton spliters.
+ * restore position of vertical/horizontal spliters.
* added creation date, due, id, uuid, urgency, and start date in the
list of tasks.
* popup menu to filter columns of the table of tasks.
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for ptask 0.0.6.
+# Generated by GNU Autoconf 2.69 for ptask 0.0.7.
#
# Report bugs to <jeanfi@gmail.com>.
#
# Identity of this package.
PACKAGE_NAME='ptask'
PACKAGE_TARNAME='ptask'
-PACKAGE_VERSION='0.0.6'
-PACKAGE_STRING='ptask 0.0.6'
+PACKAGE_VERSION='0.0.7'
+PACKAGE_STRING='ptask 0.0.7'
PACKAGE_BUGREPORT='jeanfi@gmail.com'
PACKAGE_URL='http://wpitchoune.net/ptask'
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures ptask 0.0.6 to adapt to many kinds of systems.
+\`configure' configures ptask 0.0.7 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of ptask 0.0.6:";;
+ short | recursive ) echo "Configuration of ptask 0.0.7:";;
esac
cat <<\_ACEOF
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-ptask configure 0.0.6
+ptask configure 0.0.7
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by ptask $as_me 0.0.6, which was
+It was created by ptask $as_me 0.0.7, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
# Define the identity of the package.
PACKAGE='ptask'
- VERSION='0.0.6'
+ VERSION='0.0.7'
cat >>confdefs.h <<_ACEOF
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by ptask $as_me 0.0.6, which was
+This file was extended by ptask $as_me 0.0.7, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-ptask config.status 0.0.6
+ptask config.status 0.0.7
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.64])
-AC_INIT([ptask], [0.0.6],[jeanfi@gmail.com],[ptask],[http://wpitchoune.net/ptask])
+AC_INIT([ptask], [0.0.7],[jeanfi@gmail.com],[ptask],[http://wpitchoune.net/ptask])
AM_INIT_AUTOMAKE([-Wall gnu])
msgstr ""
"Project-Id-Version: ptask\n"
"Report-Msgid-Bugs-To: jeanfi@gmail.com\n"
-"POT-Creation-Date: 2014-04-18 11:13+0200\n"
+"POT-Creation-Date: 2014-09-29 14:57+0200\n"
"PO-Revision-Date: 2012-05-13 18:15+0000\n"
"Last-Translator: jeanfi <Unknown>\n"
"Language-Team: French <>\n"
"installed "
msgstr ""
-#: src/main.c:180
+#: src/main.c:183
msgid "Enables debug mode."
msgstr ""
-#: src/main.c:189
+#: src/main.c:192
#, c-format
msgid "Try `%s --help' for more information.\n"
msgstr ""
-#: src/glade/ptask.glade:11
-#, fuzzy
-msgid "Done"
-msgstr "Marquer fait"
+#: src/main.c:210
+#, c-format
+msgid "Failed to load UI: %s"
+msgstr ""
-#: src/glade/ptask.glade:27
-msgid "Start"
+#: src/glade/ptask.glade:62
+msgid "Notes directory: "
msgstr ""
-#: src/glade/ptask.glade:34
-msgid "Stop"
+#: src/glade/ptask.glade:77
+msgid "Select a directory"
msgstr ""
-#: src/glade/ptask.glade:100
-msgid "Notes directory: "
+#: src/glade/ptask.glade:107
+msgid "None"
+msgstr ""
+
+#: src/glade/ptask.glade:110
+msgid "Low"
+msgstr ""
+
+#: src/glade/ptask.glade:113
+msgid "Medium"
msgstr ""
#: src/glade/ptask.glade:116
-msgid "Select a directory"
+msgid "High"
msgstr ""
-#: src/glade/ptask.glade:142
+#: src/glade/ptask.glade:123
msgid "New Task"
msgstr "Nouvelle Tache"
-#: src/glade/ptask.glade:201 src/glade/ptask.glade:916
+#: src/glade/ptask.glade:182 src/glade/ptask.glade:764
msgid "Description:"
msgstr "Description:"
-#: src/glade/ptask.glade:236 src/glade/ptask.glade:994
+#: src/glade/ptask.glade:218 src/glade/ptask.glade:841
msgid "Project:"
msgstr "Projet:"
-#: src/glade/ptask.glade:271 src/glade/ptask.glade:1028
+#: src/glade/ptask.glade:236 src/glade/ptask.glade:875
msgid "Priority:"
msgstr "Priorite:"
-#: src/glade/ptask.glade:325
-msgid "None"
-msgstr ""
-
-#: src/glade/ptask.glade:328
-msgid "Low"
-msgstr ""
-
-#: src/glade/ptask.glade:331
-msgid "Medium"
-msgstr ""
-
-#: src/glade/ptask.glade:334
-msgid "High"
-msgstr ""
-
-#: src/glade/ptask.glade:353
+#: src/glade/ptask.glade:322
msgid "pending"
msgstr ""
-#: src/glade/ptask.glade:356
+#: src/glade/ptask.glade:325
msgid "completed"
msgstr ""
-#: src/glade/ptask.glade:359
+#: src/glade/ptask.glade:328
msgid "deleted"
msgstr ""
-#: src/glade/ptask.glade:421 src/glade/ptask.glade:867
-msgid "Id"
+#: src/glade/ptask.glade:356 src/glade/ptask.glade:376
+msgid "ptask"
+msgstr "ptask"
+
+#: src/glade/ptask.glade:416
+msgid "_Help"
msgstr ""
-#: src/glade/ptask.glade:431 src/glade/ptask.glade:712
-#: src/glade/ptask.glade:786
+#: src/glade/ptask.glade:499
+msgid "Status:"
+msgstr "Etat:"
+
+#: src/glade/ptask.glade:560 src/glade/ptask.glade:634
+#: src/glade/ptask.glade:1131
msgid "Project"
msgstr "Projet"
-#: src/glade/ptask.glade:441 src/glade/ptask.glade:878
-msgid "UUID"
+#: src/glade/ptask.glade:571
+msgid "Count"
msgstr ""
-#: src/glade/ptask.glade:451 src/glade/ptask.glade:772
+#: src/glade/ptask.glade:620 src/glade/ptask.glade:1151
msgid "Priority"
msgstr "Priorite"
-#: src/glade/ptask.glade:461 src/glade/ptask.glade:801
+#: src/glade/ptask.glade:649 src/glade/ptask.glade:1161
msgid "Urgency"
msgstr ""
-#: src/glade/ptask.glade:471 src/glade/ptask.glade:813
+#: src/glade/ptask.glade:661 src/glade/ptask.glade:1171
msgid "Creation date"
msgstr ""
-#: src/glade/ptask.glade:481 src/glade/ptask.glade:825
+#: src/glade/ptask.glade:673 src/glade/ptask.glade:1181
msgid "Due"
msgstr ""
-#: src/glade/ptask.glade:491 src/glade/ptask.glade:837
+#: src/glade/ptask.glade:685 src/glade/ptask.glade:1191
msgid "Start date"
msgstr ""
-#: src/glade/ptask.glade:501 src/glade/ptask.glade:851
+#: src/glade/ptask.glade:699 src/glade/ptask.glade:1201
msgid "Description"
msgstr "Description"
-#: src/glade/ptask.glade:508 src/glade/ptask.glade:528
-msgid "ptask"
-msgstr "ptask"
-
-#: src/glade/ptask.glade:568
-msgid "_Help"
+#: src/glade/ptask.glade:715 src/glade/ptask.glade:1121
+msgid "Id"
msgstr ""
-#: src/glade/ptask.glade:651
-msgid "Status:"
-msgstr "Etat:"
-
-#: src/glade/ptask.glade:723
-msgid "Count"
+#: src/glade/ptask.glade:726 src/glade/ptask.glade:1141
+msgid "UUID"
msgstr ""
-#: src/glade/ptask.glade:934
+#: src/glade/ptask.glade:782
msgid "Note:"
msgstr "Note:"
-#: src/glade/ptask.glade:1068
+#: src/glade/ptask.glade:916
msgid "Save"
msgstr "Sauvegarder"
-#: src/glade/ptask.glade:1082
+#: src/glade/ptask.glade:930
msgid "Cancel"
msgstr "Annuler"
-#: src/glade/ptask.glade:1096
+#: src/glade/ptask.glade:944
msgid "Mark Done"
msgstr "Marquer fait"
-#: src/glade/ptask.glade:1110
+#: src/glade/ptask.glade:958
msgid "Remove"
msgstr ""
+
+#: src/glade/ptask.glade:987
+msgid "Tags:"
+msgstr ""
+
+#: src/glade/ptask.glade:1005
+msgid "label"
+msgstr ""
+
+#: src/glade/ptask.glade:1053
+#, fuzzy
+msgid "Done"
+msgstr "Marquer fait"
+
+#: src/glade/ptask.glade:1069
+msgid "Start"
+msgstr ""
+
+#: src/glade/ptask.glade:1076
+msgid "Stop"
+msgstr ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: jeanfi@gmail.com\n"
-"POT-Creation-Date: 2014-04-18 11:13+0200\n"
+"POT-Creation-Date: 2014-09-29 14:57+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"installed "
msgstr ""
-#: src/main.c:180
+#: src/main.c:183
msgid "Enables debug mode."
msgstr ""
-#: src/main.c:189
+#: src/main.c:192
#, c-format
msgid "Try `%s --help' for more information.\n"
msgstr ""
-#: src/glade/ptask.glade:11
-msgid "Done"
-msgstr ""
-
-#: src/glade/ptask.glade:27
-msgid "Start"
-msgstr ""
-
-#: src/glade/ptask.glade:34
-msgid "Stop"
+#: src/main.c:210
+#, c-format
+msgid "Failed to load UI: %s"
msgstr ""
-#: src/glade/ptask.glade:100
+#: src/glade/ptask.glade:62
msgid "Notes directory: "
msgstr ""
-#: src/glade/ptask.glade:116
+#: src/glade/ptask.glade:77
msgid "Select a directory"
msgstr ""
-#: src/glade/ptask.glade:142
-msgid "New Task"
+#: src/glade/ptask.glade:107
+msgid "None"
msgstr ""
-#: src/glade/ptask.glade:201 src/glade/ptask.glade:916
-msgid "Description:"
+#: src/glade/ptask.glade:110
+msgid "Low"
msgstr ""
-#: src/glade/ptask.glade:236 src/glade/ptask.glade:994
-msgid "Project:"
+#: src/glade/ptask.glade:113
+msgid "Medium"
msgstr ""
-#: src/glade/ptask.glade:271 src/glade/ptask.glade:1028
-msgid "Priority:"
+#: src/glade/ptask.glade:116
+msgid "High"
msgstr ""
-#: src/glade/ptask.glade:325
-msgid "None"
+#: src/glade/ptask.glade:123
+msgid "New Task"
msgstr ""
-#: src/glade/ptask.glade:328
-msgid "Low"
+#: src/glade/ptask.glade:182 src/glade/ptask.glade:764
+msgid "Description:"
msgstr ""
-#: src/glade/ptask.glade:331
-msgid "Medium"
+#: src/glade/ptask.glade:218 src/glade/ptask.glade:841
+msgid "Project:"
msgstr ""
-#: src/glade/ptask.glade:334
-msgid "High"
+#: src/glade/ptask.glade:236 src/glade/ptask.glade:875
+msgid "Priority:"
msgstr ""
-#: src/glade/ptask.glade:353
+#: src/glade/ptask.glade:322
msgid "pending"
msgstr ""
-#: src/glade/ptask.glade:356
+#: src/glade/ptask.glade:325
msgid "completed"
msgstr ""
-#: src/glade/ptask.glade:359
+#: src/glade/ptask.glade:328
msgid "deleted"
msgstr ""
-#: src/glade/ptask.glade:421 src/glade/ptask.glade:867
-msgid "Id"
+#: src/glade/ptask.glade:356 src/glade/ptask.glade:376
+msgid "ptask"
msgstr ""
-#: src/glade/ptask.glade:431 src/glade/ptask.glade:712
-#: src/glade/ptask.glade:786
+#: src/glade/ptask.glade:416
+msgid "_Help"
+msgstr ""
+
+#: src/glade/ptask.glade:499
+msgid "Status:"
+msgstr ""
+
+#: src/glade/ptask.glade:560 src/glade/ptask.glade:634
+#: src/glade/ptask.glade:1131
msgid "Project"
msgstr ""
-#: src/glade/ptask.glade:441 src/glade/ptask.glade:878
-msgid "UUID"
+#: src/glade/ptask.glade:571
+msgid "Count"
msgstr ""
-#: src/glade/ptask.glade:451 src/glade/ptask.glade:772
+#: src/glade/ptask.glade:620 src/glade/ptask.glade:1151
msgid "Priority"
msgstr ""
-#: src/glade/ptask.glade:461 src/glade/ptask.glade:801
+#: src/glade/ptask.glade:649 src/glade/ptask.glade:1161
msgid "Urgency"
msgstr ""
-#: src/glade/ptask.glade:471 src/glade/ptask.glade:813
+#: src/glade/ptask.glade:661 src/glade/ptask.glade:1171
msgid "Creation date"
msgstr ""
-#: src/glade/ptask.glade:481 src/glade/ptask.glade:825
+#: src/glade/ptask.glade:673 src/glade/ptask.glade:1181
msgid "Due"
msgstr ""
-#: src/glade/ptask.glade:491 src/glade/ptask.glade:837
+#: src/glade/ptask.glade:685 src/glade/ptask.glade:1191
msgid "Start date"
msgstr ""
-#: src/glade/ptask.glade:501 src/glade/ptask.glade:851
+#: src/glade/ptask.glade:699 src/glade/ptask.glade:1201
msgid "Description"
msgstr ""
-#: src/glade/ptask.glade:508 src/glade/ptask.glade:528
-msgid "ptask"
-msgstr ""
-
-#: src/glade/ptask.glade:568
-msgid "_Help"
-msgstr ""
-
-#: src/glade/ptask.glade:651
-msgid "Status:"
+#: src/glade/ptask.glade:715 src/glade/ptask.glade:1121
+msgid "Id"
msgstr ""
-#: src/glade/ptask.glade:723
-msgid "Count"
+#: src/glade/ptask.glade:726 src/glade/ptask.glade:1141
+msgid "UUID"
msgstr ""
-#: src/glade/ptask.glade:934
+#: src/glade/ptask.glade:782
msgid "Note:"
msgstr ""
-#: src/glade/ptask.glade:1068
+#: src/glade/ptask.glade:916
msgid "Save"
msgstr ""
-#: src/glade/ptask.glade:1082
+#: src/glade/ptask.glade:930
msgid "Cancel"
msgstr ""
-#: src/glade/ptask.glade:1096
+#: src/glade/ptask.glade:944
msgid "Mark Done"
msgstr ""
-#: src/glade/ptask.glade:1110
+#: src/glade/ptask.glade:958
msgid "Remove"
msgstr ""
+
+#: src/glade/ptask.glade:987
+msgid "Tags:"
+msgstr ""
+
+#: src/glade/ptask.glade:1005
+msgid "label"
+msgstr ""
+
+#: src/glade/ptask.glade:1053
+msgid "Done"
+msgstr ""
+
+#: src/glade/ptask.glade:1069
+msgid "Start"
+msgstr ""
+
+#: src/glade/ptask.glade:1076
+msgid "Stop"
+msgstr ""
<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.16.1 -->
<interface>
- <!-- interface-requires gtk+ 3.0 -->
- <object class="GtkAction" id="tasktree_creation_date_visible">
- <signal name="activate" handler="tasktree_visible_activate_cbk" swapped="no"/>
- </object>
- <object class="GtkAction" id="tasktree_description_visible">
- <signal name="activate" handler="tasktree_visible_activate_cbk" swapped="no"/>
- </object>
- <object class="GtkAction" id="tasktree_done">
- <property name="label" translatable="yes">Done</property>
- <signal name="activate" handler="tasktree_done_activate_cbk" swapped="no"/>
- </object>
- <object class="GtkAction" id="tasktree_due_visible">
- <signal name="activate" handler="tasktree_visible_activate_cbk" swapped="no"/>
- </object>
- <object class="GtkAction" id="tasktree_id_visible">
- <signal name="activate" handler="tasktree_visible_activate_cbk" swapped="no"/>
- </object>
- <object class="GtkAction" id="tasktree_priority_visible">
- <signal name="activate" handler="tasktree_visible_activate_cbk" swapped="no"/>
- </object>
- <object class="GtkAction" id="tasktree_project_visible">
- <signal name="activate" handler="tasktree_visible_activate_cbk" swapped="no"/>
- </object>
- <object class="GtkAction" id="tasktree_start">
- <property name="label" translatable="yes">Start</property>
- <signal name="activate" handler="tasktree_start_activate_cbk" swapped="no"/>
- </object>
- <object class="GtkAction" id="tasktree_start_visible">
- <signal name="activate" handler="tasktree_visible_activate_cbk" swapped="no"/>
- </object>
- <object class="GtkAction" id="tasktree_stop">
- <property name="label" translatable="yes">Stop</property>
- <signal name="activate" handler="tasktree_stop_activate_cbk" swapped="no"/>
- </object>
- <object class="GtkAction" id="tasktree_urgency_visible">
- <signal name="activate" handler="tasktree_visible_activate_cbk" swapped="no"/>
- </object>
- <object class="GtkAction" id="tasktree_uuid_visible">
- <signal name="activate" handler="tasktree_visible_activate_cbk" swapped="no"/>
- </object>
+ <requires lib="gtk+" version="3.0"/>
<object class="GtkDialog" id="diag_preferences">
<property name="can_focus">False</property>
<property name="border_width">5</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
- <property name="orientation">vertical</property>
<property name="action">select-folder</property>
<property name="title" translatable="yes">Select a directory</property>
</object>
<action-widget response="0">button4</action-widget>
</action-widgets>
</object>
+ <object class="GtkListStore" id="prioritystore">
+ <columns>
+ <!-- column-name priority -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">None</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Low</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Medium</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">High</col>
+ </row>
+ </data>
+ </object>
<object class="GtkDialog" id="diag_tasknew">
<property name="can_focus">False</property>
<property name="border_width">5</property>
<property name="margin_top">4</property>
<property name="margin_bottom">4</property>
<property name="invisible_char">•</property>
- <property name="invisible_char_set">True</property>
+ <property name="width_chars">60</property>
</object>
<packing>
<property name="left_attach">1</property>
<object class="GtkLabel" id="label7">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="halign">start</property>
<property name="margin_left">4</property>
<property name="margin_right">4</property>
<property name="margin_top">4</property>
</packing>
</child>
<child>
- <object class="GtkEntry" id="diag_tasknew_project">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="margin_left">4</property>
- <property name="margin_right">4</property>
- <property name="margin_top">4</property>
- <property name="margin_bottom">4</property>
- <property name="invisible_char">•</property>
- <property name="invisible_char_set">True</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
<object class="GtkLabel" id="label8">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="halign">start</property>
<property name="margin_left">4</property>
<property name="margin_right">4</property>
<property name="margin_top">4</property>
<object class="GtkComboBox" id="diag_tasknew_priority">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="halign">start</property>
<property name="margin_left">4</property>
<property name="margin_right">4</property>
<property name="margin_top">4</property>
<property name="height">1</property>
</packing>
</child>
+ <child>
+ <object class="GtkComboBoxText" id="diag_tasknew_project">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="margin_left">4</property>
+ <property name="margin_right">4</property>
+ <property name="margin_top">4</property>
+ <property name="margin_bottom">4</property>
+ <property name="has_entry">True</property>
+ <child internal-child="entry">
+ <object class="GtkEntry" id="comboboxtext-entry">
+ <property name="can_focus">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="expand">False</property>
<action-widget response="0">button2</action-widget>
</action-widgets>
</object>
- <object class="GtkListStore" id="prioritystore">
- <columns>
- <!-- column-name priority -->
- <column type="gchararray"/>
- </columns>
- <data>
- <row>
- <col id="0" translatable="yes">None</col>
- </row>
- <row>
- <col id="0" translatable="yes">Low</col>
- </row>
- <row>
- <col id="0" translatable="yes">Medium</col>
- </row>
- <row>
- <col id="0" translatable="yes">High</col>
- </row>
- </data>
- </object>
<object class="GtkListStore" id="projectstore">
<columns>
<!-- column-name gchararray1 -->
<column type="gchararray"/>
</columns>
</object>
- <object class="GtkMenu" id="tasktree_menu">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <object class="GtkMenuItem" id="menu_start">
- <property name="related_action">tasktree_start</property>
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- </object>
- </child>
- <child>
- <object class="GtkMenuItem" id="menu_stop">
- <property name="related_action">tasktree_stop</property>
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- </object>
- </child>
- <child>
- <object class="GtkMenuItem" id="menu_done">
- <property name="related_action">tasktree_done</property>
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- </object>
- </child>
- <child>
- <object class="GtkSeparatorMenuItem" id="menuitem5">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- </object>
- </child>
- <child>
- <object class="GtkCheckMenuItem" id="menu_id_visible">
- <property name="use_action_appearance">False</property>
- <property name="related_action">tasktree_id_visible</property>
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Id</property>
- <property name="use_underline">True</property>
- </object>
- </child>
- <child>
- <object class="GtkCheckMenuItem" id="menu_project_visible">
- <property name="use_action_appearance">False</property>
- <property name="related_action">tasktree_project_visible</property>
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Project</property>
- <property name="use_underline">True</property>
- </object>
- </child>
- <child>
- <object class="GtkCheckMenuItem" id="menu_uuid_visible">
- <property name="use_action_appearance">False</property>
- <property name="related_action">tasktree_uuid_visible</property>
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">UUID</property>
- <property name="use_underline">True</property>
- </object>
- </child>
- <child>
- <object class="GtkCheckMenuItem" id="menu_priority_visible">
- <property name="use_action_appearance">False</property>
- <property name="related_action">tasktree_priority_visible</property>
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Priority</property>
- <property name="use_underline">True</property>
- </object>
- </child>
- <child>
- <object class="GtkCheckMenuItem" id="menu_urgency_visible">
- <property name="use_action_appearance">False</property>
- <property name="related_action">tasktree_urgency_visible</property>
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Urgency</property>
- <property name="use_underline">True</property>
- </object>
- </child>
- <child>
- <object class="GtkCheckMenuItem" id="menu_creation_date_visible">
- <property name="use_action_appearance">False</property>
- <property name="related_action">tasktree_creation_date_visible</property>
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Creation date</property>
- <property name="use_underline">True</property>
- </object>
- </child>
- <child>
- <object class="GtkCheckMenuItem" id="menu_due_visible">
- <property name="use_action_appearance">False</property>
- <property name="related_action">tasktree_due_visible</property>
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Due</property>
- <property name="use_underline">True</property>
- </object>
- </child>
- <child>
- <object class="GtkCheckMenuItem" id="menu_start_visible">
- <property name="use_action_appearance">False</property>
- <property name="related_action">tasktree_start_visible</property>
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Start date</property>
- <property name="use_underline">True</property>
- </object>
- </child>
- <child>
- <object class="GtkCheckMenuItem" id="menu_description_visible">
- <property name="use_action_appearance">False</property>
- <property name="related_action">tasktree_description_visible</property>
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Description</property>
- <property name="use_underline">True</property>
- </object>
- </child>
- </object>
<object class="GtkWindow" id="window">
<property name="can_focus">False</property>
<property name="title" translatable="yes">ptask</property>
<property name="search_column">1</property>
<property name="enable_grid_lines">both</property>
<property name="enable_tree_lines">True</property>
- <signal name="cursor-changed" handler="tasktree_cursor_changed_cbk" swapped="no"/>
<signal name="button-press-event" handler="tasktree_button_press_event_cbk" swapped="no"/>
+ <signal name="cursor-changed" handler="tasktree_cursor_changed_cbk" swapped="no"/>
<child internal-child="selection">
<object class="GtkTreeSelection" id="treeview-selection3"/>
</child>
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">4</property>
+ <property name="top_attach">5</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</object>
<packing>
<property name="left_attach">1</property>
- <property name="top_attach">4</property>
+ <property name="top_attach">5</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
<property name="margin_top">4</property>
<property name="margin_bottom">4</property>
<property name="invisible_char">•</property>
- <property name="invisible_char_set">True</property>
</object>
<packing>
<property name="left_attach">1</property>
<object class="GtkComboBox" id="taskpriority">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="halign">start</property>
<property name="margin_left">4</property>
<property name="margin_right">4</property>
<property name="margin_top">4</property>
<property name="height">1</property>
</packing>
</child>
+ <child>
+ <object class="GtkLabel" id="label10">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="margin_left">4</property>
+ <property name="margin_right">4</property>
+ <property name="margin_top">4</property>
+ <property name="margin_bottom">4</property>
+ <property name="label" translatable="yes">Tags:</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">4</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="tasktags">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="margin_left">4</property>
+ <property name="margin_right">4</property>
+ <property name="margin_top">4</property>
+ <property name="margin_bottom">4</property>
+ <property name="label" translatable="yes">label</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">4</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="expand">True</property>
</object>
</child>
</object>
+ <object class="GtkAction" id="tasktree_creation_date_visible">
+ <signal name="activate" handler="tasktree_visible_activate_cbk" swapped="no"/>
+ </object>
+ <object class="GtkAction" id="tasktree_description_visible">
+ <signal name="activate" handler="tasktree_visible_activate_cbk" swapped="no"/>
+ </object>
+ <object class="GtkAction" id="tasktree_done">
+ <property name="label" translatable="yes">Done</property>
+ <signal name="activate" handler="tasktree_done_activate_cbk" swapped="no"/>
+ </object>
+ <object class="GtkAction" id="tasktree_due_visible">
+ <signal name="activate" handler="tasktree_visible_activate_cbk" swapped="no"/>
+ </object>
+ <object class="GtkAction" id="tasktree_id_visible">
+ <signal name="activate" handler="tasktree_visible_activate_cbk" swapped="no"/>
+ </object>
+ <object class="GtkAction" id="tasktree_priority_visible">
+ <signal name="activate" handler="tasktree_visible_activate_cbk" swapped="no"/>
+ </object>
+ <object class="GtkAction" id="tasktree_project_visible">
+ <signal name="activate" handler="tasktree_visible_activate_cbk" swapped="no"/>
+ </object>
+ <object class="GtkAction" id="tasktree_start">
+ <property name="label" translatable="yes">Start</property>
+ <signal name="activate" handler="tasktree_start_activate_cbk" swapped="no"/>
+ </object>
+ <object class="GtkAction" id="tasktree_start_visible">
+ <signal name="activate" handler="tasktree_visible_activate_cbk" swapped="no"/>
+ </object>
+ <object class="GtkAction" id="tasktree_stop">
+ <property name="label" translatable="yes">Stop</property>
+ <signal name="activate" handler="tasktree_stop_activate_cbk" swapped="no"/>
+ </object>
+ <object class="GtkAction" id="tasktree_urgency_visible">
+ <signal name="activate" handler="tasktree_visible_activate_cbk" swapped="no"/>
+ </object>
+ <object class="GtkAction" id="tasktree_uuid_visible">
+ <signal name="activate" handler="tasktree_visible_activate_cbk" swapped="no"/>
+ </object>
+ <object class="GtkMenu" id="tasktree_menu">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkMenuItem" id="menu_start">
+ <property name="related_action">tasktree_start</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="menu_stop">
+ <property name="related_action">tasktree_stop</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="menu_done">
+ <property name="related_action">tasktree_done</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkSeparatorMenuItem" id="menuitem5">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkCheckMenuItem" id="menu_id_visible">
+ <property name="use_action_appearance">False</property>
+ <property name="related_action">tasktree_id_visible</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Id</property>
+ <property name="use_underline">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkCheckMenuItem" id="menu_project_visible">
+ <property name="use_action_appearance">False</property>
+ <property name="related_action">tasktree_project_visible</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Project</property>
+ <property name="use_underline">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkCheckMenuItem" id="menu_uuid_visible">
+ <property name="use_action_appearance">False</property>
+ <property name="related_action">tasktree_uuid_visible</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">UUID</property>
+ <property name="use_underline">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkCheckMenuItem" id="menu_priority_visible">
+ <property name="use_action_appearance">False</property>
+ <property name="related_action">tasktree_priority_visible</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Priority</property>
+ <property name="use_underline">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkCheckMenuItem" id="menu_urgency_visible">
+ <property name="use_action_appearance">False</property>
+ <property name="related_action">tasktree_urgency_visible</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Urgency</property>
+ <property name="use_underline">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkCheckMenuItem" id="menu_creation_date_visible">
+ <property name="use_action_appearance">False</property>
+ <property name="related_action">tasktree_creation_date_visible</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Creation date</property>
+ <property name="use_underline">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkCheckMenuItem" id="menu_due_visible">
+ <property name="use_action_appearance">False</property>
+ <property name="related_action">tasktree_due_visible</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Due</property>
+ <property name="use_underline">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkCheckMenuItem" id="menu_start_visible">
+ <property name="use_action_appearance">False</property>
+ <property name="related_action">tasktree_start_visible</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Start date</property>
+ <property name="use_underline">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkCheckMenuItem" id="menu_description_visible">
+ <property name="use_action_appearance">False</property>
+ <property name="related_action">tasktree_description_visible</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Description</property>
+ <property name="use_underline">True</property>
+ </object>
+ </child>
+ </object>
</interface>
{
GtkWindow *window;
GtkBuilder *builder;
- int optc, cmdok, opti;
+ int optc, cmdok, opti, ret;
+ GError *err;
+ gchar *msg;
+ GtkMessageDialog *diag;
program_name = argv[0];
settings_init();
builder = gtk_builder_new();
- gtk_builder_add_from_file
+ ret = gtk_builder_add_from_file
(builder,
PACKAGE_DATA_DIR G_DIR_SEPARATOR_S "ptask.glade",
- NULL);
+ &err);
+
+ if (!ret) {
+ msg = g_strdup_printf(_("Failed to load UI: %s"),
+ err->message);
+ log_err(msg);
+
+ diag = GTK_MESSAGE_DIALOG(gtk_message_dialog_new
+ (NULL,
+ GTK_DIALOG_DESTROY_WITH_PARENT,
+ GTK_MESSAGE_ERROR,
+ GTK_BUTTONS_CLOSE,
+ msg,
+ NULL));
+
+ gtk_dialog_run(GTK_DIALOG(diag));
+
+ g_free(msg);
+
+ exit(EXIT_FAILURE);
+ }
+
window = create_window(builder);
gtk_builder_connect_signals(builder, NULL);
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.44.1.
-.TH PTASK "1" "April 2014" "ptask 0.0.6" "User Commands"
+.TH PTASK "1" "September 2014" "ptask 0.0.7" "User Commands"
.SH NAME
ptask \- GTk+ Task application
.SH SYNOPSIS
log_debug("task version: %s", ver);
- if (!strcmp(ver, "2.2.0") || !strcmp(ver, "2.0.0"))
+ if (!strcmp(ver, "2.2.0")
+ || !strcmp(ver, "2.0.0")
+ || !strcmp(ver, "2.3.0"))
return 1;
else
return 0;
return o;
}
+char **json_to_tags(struct json_object *jtask)
+{
+ struct json_object *jtags, *jtag;
+ char **tags;
+ int n, i;
+
+ jtags = json_object_object_get(jtask, "tags");
+
+ if (!jtags)
+ return NULL;
+
+
+ n = json_object_array_length(jtags);
+
+ tags = malloc((n + 1) * sizeof(char *));
+
+ for (i = 0; i < n; i++) {
+ jtag = json_object_array_get_idx(jtags, i);
+ tags[i] = strdup(json_object_get_string(jtag));
+ }
+
+ tags[n] = NULL;
+
+ return tags;
+}
+
+struct task *json_to_task(struct json_object *jtask)
+{
+ struct task *task;
+ const char *urg;
+ struct json_object *json;
+
+ task = malloc(sizeof(struct task));
+
+ json = json_object_object_get(jtask, "id");
+ task->id = json_object_get_int(json);
+
+ json = json_object_object_get(jtask, "description");
+ task->description = strdup(json_object_get_string(json));
+
+ json = json_object_object_get(jtask, "status");
+ task->status = strdup(json_object_get_string(json));
+
+ json = json_object_object_get(jtask, "project");
+ if (json)
+ task->project
+ = strdup(json_object_get_string(json));
+ else
+ task->project = strdup("");
+
+ json = json_object_object_get(jtask, "priority");
+ if (json)
+ task->priority
+ = strdup(json_object_get_string(json));
+ else
+ task->priority = strdup("");
+
+ json = json_object_object_get(jtask, "uuid");
+ task->uuid = strdup(json_object_get_string(json));
+
+ json = json_object_object_get(jtask, "urgency");
+ urg = json_object_get_string(json);
+ if (urg)
+ task->urgency = strdup(urg);
+ else
+ task->urgency = NULL;
+
+ task->note = note_get(task->uuid);
+
+ json = json_object_object_get(jtask, "entry");
+ task->entry = parse_time(json_object_get_string(json));
+
+ json = json_object_object_get(jtask, "due");
+ if (json)
+ task->due
+ = parse_time(json_object_get_string(json));
+ else
+ task->due = NULL;
+
+ json = json_object_object_get(jtask, "start");
+ if (json)
+ task->start
+ = parse_time(json_object_get_string(json));
+ else
+ task->start = NULL;
+
+ json = json_object_object_get(jtask, "recur");
+ if (json)
+ task->recur = strdup(json_object_get_string(json));
+ else
+ task->recur = NULL;
+
+ task->tags = json_to_tags(jtask);
+
+ return task;
+}
+
struct task **tw_get_all_tasks(const char *status)
{
int i, n;
- struct json_object *jtasks, *jtask, *json;
+ struct json_object *jtasks, *jtask;
struct task **tasks;
char *opts;
- const char *urg;
opts = malloc(strlen("export status:") + strlen(status) + 1);
for (i = 0; i < n; i++) {
jtask = json_object_array_get_idx(jtasks, i);
- tasks[i] = malloc(sizeof(struct task));
-
- json = json_object_object_get(jtask, "id");
- tasks[i]->id = json_object_get_int(json);
-
- json = json_object_object_get(jtask, "description");
- tasks[i]->description = strdup(json_object_get_string(json));
-
- json = json_object_object_get(jtask, "status");
- tasks[i]->status = strdup(json_object_get_string(json));
-
- json = json_object_object_get(jtask, "project");
- if (json)
- tasks[i]->project
- = strdup(json_object_get_string(json));
- else
- tasks[i]->project = strdup("");
-
- json = json_object_object_get(jtask, "priority");
- if (json)
- tasks[i]->priority
- = strdup(json_object_get_string(json));
- else
- tasks[i]->priority = strdup("");
-
- json = json_object_object_get(jtask, "uuid");
- tasks[i]->uuid = strdup(json_object_get_string(json));
-
- json = json_object_object_get(jtask, "urgency");
- urg = json_object_get_string(json);
- if (urg)
- tasks[i]->urgency = strdup(urg);
- else
- tasks[i]->urgency = NULL;
-
- tasks[i]->note = note_get(tasks[i]->uuid);
-
- json = json_object_object_get(jtask, "entry");
- tasks[i]->entry = parse_time(json_object_get_string(json));
-
- json = json_object_object_get(jtask, "due");
- if (json)
- tasks[i]->due
- = parse_time(json_object_get_string(json));
- else
- tasks[i]->due = NULL;
-
- json = json_object_object_get(jtask, "start");
- if (json)
- tasks[i]->start
- = parse_time(json_object_get_string(json));
- else
- tasks[i]->start = NULL;
+ tasks[i] = json_to_task(jtask);
}
tasks[n] = NULL;
static void task_free(struct task *task)
{
+ char **tags;
+
if (!task)
return ;
free(task->entry);
free(task->due);
free(task->start);
+ free(task->recur);
+
+ tags = task->tags;
+ if (tags) {
+ while (*tags) {
+ free(*tags);
+ tags++;
+ }
+ free(tags);
+ }
free(task);
}
char *project;
char *priority;
char *urgency;
+ char *recur;
+ char **tags;
struct tm *entry;
struct tm *due;
struct tm *start;
* 02110-1301 USA
*/
+#include <string.h>
+
#include <gtk/gtk.h>
#include <log.h>
}
}
+static void populate_project(GtkComboBoxText *w)
+{
+ struct task **tasks;
+ struct project **all_prjs, **prjs;
+
+ tasks = tw_get_all_tasks("pending");
+
+ all_prjs = tw_get_projects(tasks);
+
+ prjs = all_prjs;
+ while (*prjs) {
+ if (strcmp((*prjs)->name, "ALL"))
+ gtk_combo_box_text_append_text(w, (*prjs)->name);
+
+ prjs++;
+ }
+
+ tw_task_list_free(tasks);
+ tw_project_list_free(all_prjs);
+}
+
void ui_newtask()
{
gint result;
GtkEntry *entry;
const char *desc, *prj, *prio;
GtkComboBox *combo;
+ GtkComboBoxText *w_prj;
log_debug("ui_newtask()");
diag = GTK_DIALOG(gtk_builder_get_object(builder, "diag_tasknew"));
gtk_builder_connect_signals(builder, NULL);
+ w_prj = GTK_COMBO_BOX_TEXT(gtk_builder_get_object
+ (builder, "diag_tasknew_project"));
+ populate_project(w_prj);
+
result = gtk_dialog_run(diag);
if (result == GTK_RESPONSE_ACCEPT) {
(builder, "diag_tasknew_description"));
desc = gtk_entry_get_text(entry);
- entry = GTK_ENTRY(gtk_builder_get_object
- (builder, "diag_tasknew_project"));
- prj = gtk_entry_get_text(entry);
+ w_prj = GTK_COMBO_BOX_TEXT(gtk_builder_get_object
+ (builder, "diag_tasknew_project"));
+ prj = gtk_combo_box_text_get_active_text(w_prj);
combo = GTK_COMBO_BOX(gtk_builder_get_object
(builder, "diag_tasknew_priority"));
static GtkButton *w_taskremove_btn;
static GtkButton *w_taskdone_btn;
static GtkButton *w_taskcancel_btn;
+static GtkLabel *w_tasktags;
static struct task *current_task;
gtk_widget_set_sensitive(GTK_WIDGET(w_tasksave_btn), enable);
gtk_widget_set_sensitive(GTK_WIDGET(w_taskdone_btn), enable);
- gtk_widget_set_sensitive(GTK_WIDGET(w_taskremove_btn), enable);
+
+ if (current_task && current_task->recur) {
+ gtk_widget_set_sensitive(GTK_WIDGET(w_taskremove_btn), FALSE);
+ gtk_widget_set_tooltip_text
+ (GTK_WIDGET(w_taskremove_btn),
+ "The removal of recurrent tasks is not supported due "
+ "to the taskwarrior bug TW-638");
+ gtk_widget_set_has_tooltip(GTK_WIDGET(w_taskremove_btn), TRUE);
+ } else {
+ gtk_widget_set_sensitive(GTK_WIDGET(w_taskremove_btn), enable);
+ gtk_widget_set_has_tooltip(GTK_WIDGET(w_taskremove_btn), FALSE);
+ }
+
gtk_widget_set_sensitive(GTK_WIDGET(w_taskcancel_btn), enable);
buf = gtk_text_view_get_buffer(w_note);
gtk_widget_set_sensitive(GTK_WIDGET(w_project), enable);
if (!enable)
+ gtk_label_set_label(w_tasktags, "");
+
+ if (!enable)
gtk_combo_box_set_active(w_priority, 0);
gtk_widget_set_sensitive(GTK_WIDGET(w_priority), enable);
}
log_fct("ENTER");
w_note = GTK_TEXT_VIEW(gtk_builder_get_object(builder, "tasknote"));
-
+ w_tasktags = GTK_LABEL(gtk_builder_get_object(builder, "tasktags"));
w_description = GTK_ENTRY(gtk_builder_get_object(builder,
"taskdescription"));
w_project = GTK_ENTRY(gtk_builder_get_object(builder, "taskproject"));
{
GtkTextBuffer *buf;
int priority;
+ char **tags;
+ gchar *tmp, *gtags;
if (task) {
current_task = task;
priority = priority_to_int(task->priority);
gtk_combo_box_set_active(w_priority, priority);
+ tags = task->tags;
+ gtags = NULL;
+ if (tags) {
+ while (*tags) {
+ if (gtags) {
+ tmp = g_strconcat(gtags,
+ " ",
+ *tags,
+ NULL);
+ g_free(gtags);
+ gtags = tmp;
+ } else {
+ gtags = g_strdup(*tags);
+ }
+ tags++;
+ }
+ gtk_label_set_label(w_tasktags, gtags);
+ } else {
+ gtk_label_set_label(w_tasktags, "");
+ }
+
enable(1);
} else {
current_task = NULL;