From: Jean-Philippe Orsini Date: Sun, 23 Nov 2014 15:32:50 +0000 (+0100) Subject: Imported Upstream version 0.0.9 X-Git-Tag: upstream/0.0.9 X-Git-Url: https://git.wpitchoune.net/gitweb/?p=ptask-pkg-ubuntu.git;a=commitdiff_plain;h=refs%2Ftags%2Fupstream%2F0.0.9 Imported Upstream version 0.0.9 --- diff --git a/NEWS b/NEWS index 0544099..472094a 100644 --- a/NEWS +++ b/NEWS @@ -1,11 +1,19 @@ What's New ========== +v0.0.9 +------ + * fixed potential memory leak when failing to convert time to string + which is unlikely. + * added incremental search (ctrl-shift f) on description and tags. + * ctrl-n for new task. + * ctrl-r for refresh. + v0.0.8 ------ * fixed a critical gtk error when loading the glade file which can also cause a memory corruption. - * fixed creash when creating task with a project + * fixed crash when creating task with a project containing a task with a tag. v0.0.7 diff --git a/NEWS.html b/NEWS.html index 4d7c65a..feae775 100644 --- a/NEWS.html +++ b/NEWS.html @@ -320,6 +320,34 @@ asciidoc.install();
+

v0.0.9

+
+
    +
  • +

    +fixed potential memory leak when failing to convert time to string + which is unlikely. +

    +
  • +
  • +

    +added incremental search (ctrl-shift f) on description and tags. +

    +
  • +
  • +

    +ctrl-n for new task. +

    +
  • +
  • +

    +ctrl-r for refresh. +

    +
  • +
+
+
+

v0.0.8

    @@ -331,7 +359,7 @@ fixed a critical gtk error when loading the glade file
  • -fixed creash when creating task with a project +fixed crash when creating task with a project containing a task with a tag.

  • @@ -594,7 +622,8 @@ Initial release.

    diff --git a/README b/README index c896432..b1ba196 100644 --- a/README +++ b/README @@ -44,7 +44,7 @@ The compilation of +ptask+ requires: * cppcheck (optional, static source checker) * gcc * help2man - * library gtk3 + * library gtk3 >= 3.12 * library json-c * make diff --git a/README.html b/README.html index b6cbdd2..9ff044e 100644 --- a/README.html +++ b/README.html @@ -386,7 +386,7 @@ help2man
  • -library gtk3 +library gtk3 >= 3.12

  • @@ -486,7 +486,8 @@ make clean all

    diff --git a/aclocal.m4 b/aclocal.m4 index eb11a63..508791e 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -21,7 +21,7 @@ If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) # gettext.m4 serial 66 (gettext-0.18.2) -dnl Copyright (C) 1995-2013 Free Software Foundation, Inc. +dnl Copyright (C) 1995-2014 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -507,7 +507,7 @@ m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])]) ) # iconv.m4 serial 18 (gettext-0.18.2) -dnl Copyright (C) 2000-2002, 2007-2013 Free Software Foundation, Inc. +dnl Copyright (C) 2000-2002, 2007-2014 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -776,7 +776,7 @@ size_t iconv(); ]) # intlmacosx.m4 serial 5 (gettext-0.18.2) -dnl Copyright (C) 2004-2013 Free Software Foundation, Inc. +dnl Copyright (C) 2004-2014 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -833,7 +833,7 @@ AC_DEFUN([gt_INTL_MACOSX], ]) # lib-ld.m4 serial 6 -dnl Copyright (C) 1996-2003, 2009-2013 Free Software Foundation, Inc. +dnl Copyright (C) 1996-2003, 2009-2014 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -953,7 +953,7 @@ AC_LIB_PROG_LD_GNU ]) # lib-link.m4 serial 26 (gettext-0.18.2) -dnl Copyright (C) 2001-2013 Free Software Foundation, Inc. +dnl Copyright (C) 2001-2014 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -1731,7 +1731,7 @@ AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], ]) # lib-prefix.m4 serial 7 (gettext-0.18) -dnl Copyright (C) 2001-2005, 2008-2013 Free Software Foundation, Inc. +dnl Copyright (C) 2001-2005, 2008-2014 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -1956,7 +1956,7 @@ sixtyfour bits ]) # nls.m4 serial 5 (gettext-0.18) -dnl Copyright (C) 1995-2003, 2005-2006, 2008-2013 Free Software Foundation, +dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -2148,8 +2148,63 @@ else fi[]dnl ])# PKG_CHECK_MODULES -# po.m4 serial 21 (gettext-0.18.3) -dnl Copyright (C) 1995-2013 Free Software Foundation, Inc. + +# PKG_INSTALLDIR(DIRECTORY) +# ------------------------- +# Substitutes the variable pkgconfigdir as the location where a module +# should install pkg-config .pc files. By default the directory is +# $libdir/pkgconfig, but the default can be changed by passing +# DIRECTORY. The user can override through the --with-pkgconfigdir +# parameter. +AC_DEFUN([PKG_INSTALLDIR], +[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) +m4_pushdef([pkg_description], + [pkg-config installation directory @<:@]pkg_default[@:>@]) +AC_ARG_WITH([pkgconfigdir], + [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, + [with_pkgconfigdir=]pkg_default) +AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) +m4_popdef([pkg_default]) +m4_popdef([pkg_description]) +]) dnl PKG_INSTALLDIR + + +# PKG_NOARCH_INSTALLDIR(DIRECTORY) +# ------------------------- +# Substitutes the variable noarch_pkgconfigdir as the location where a +# module should install arch-independent pkg-config .pc files. By +# default the directory is $datadir/pkgconfig, but the default can be +# changed by passing DIRECTORY. The user can override through the +# --with-noarch-pkgconfigdir parameter. +AC_DEFUN([PKG_NOARCH_INSTALLDIR], +[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) +m4_pushdef([pkg_description], + [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) +AC_ARG_WITH([noarch-pkgconfigdir], + [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, + [with_noarch_pkgconfigdir=]pkg_default) +AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) +m4_popdef([pkg_default]) +m4_popdef([pkg_description]) +]) dnl PKG_NOARCH_INSTALLDIR + + +# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, +# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +# ------------------------------------------- +# Retrieves the value of the pkg-config variable for the given module. +AC_DEFUN([PKG_CHECK_VAR], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl + +_PKG_CONFIG([$1], [variable="][$3]["], [$2]) +AS_VAR_COPY([$1], [pkg_cv_][$1]) + +AS_VAR_IF([$1], [""], [$5], [$4])dnl +])# PKG_CHECK_VAR + +# po.m4 serial 22 (gettext-0.19) +dnl Copyright (C) 1995-2014 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -2180,7 +2235,7 @@ AC_DEFUN([AM_PO_SUBDIRS], dnl Release version of the gettext macros. This is used to ensure that dnl the gettext macros and po/Makefile.in.in are in sync. - AC_SUBST([GETTEXT_MACRO_VERSION], [0.18]) + AC_SUBST([GETTEXT_MACRO_VERSION], [0.19]) dnl Perform the following tests also if --disable-nls has been given, dnl because they are needed for "make dist" to work. @@ -2603,7 +2658,7 @@ AC_DEFUN([AM_XGETTEXT_OPTION], ]) # progtest.m4 serial 7 (gettext-0.18.2) -dnl Copyright (C) 1996-2003, 2005, 2008-2013 Free Software Foundation, Inc. +dnl Copyright (C) 1996-2003, 2005, 2008-2014 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -3247,7 +3302,8 @@ to "yes", and re-run configure. END AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) fi -fi]) +fi +]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further diff --git a/configure b/configure index ea87956..4cc33f7 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for ptask 0.0.8. +# Generated by GNU Autoconf 2.69 for ptask 0.0.9. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='ptask' PACKAGE_TARNAME='ptask' -PACKAGE_VERSION='0.0.8' -PACKAGE_STRING='ptask 0.0.8' +PACKAGE_VERSION='0.0.9' +PACKAGE_STRING='ptask 0.0.9' PACKAGE_BUGREPORT='jeanfi@gmail.com' PACKAGE_URL='http://wpitchoune.net/ptask' @@ -1298,7 +1298,7 @@ if test "$ac_init_help" = "long"; then # 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.8 to adapt to many kinds of systems. +\`configure' configures ptask 0.0.9 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1372,7 +1372,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of ptask 0.0.8:";; + short | recursive ) echo "Configuration of ptask 0.0.9:";; esac cat <<\_ACEOF @@ -1492,7 +1492,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -ptask configure 0.0.8 +ptask configure 0.0.9 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1672,7 +1672,7 @@ cat >config.log <<_ACEOF 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.8, which was +It was created by ptask $as_me 0.0.9, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2537,7 +2537,7 @@ fi # Define the identity of the package. PACKAGE='ptask' - VERSION='0.0.8' + VERSION='0.0.9' cat >>confdefs.h <<_ACEOF @@ -2631,6 +2631,7 @@ END fi + ac_config_headers="$ac_config_headers config.h" @@ -4273,7 +4274,7 @@ $as_echo "$USE_NLS" >&6; } - GETTEXT_MACRO_VERSION=0.18 + GETTEXT_MACRO_VERSION=0.19 @@ -6842,12 +6843,12 @@ if test -n "$GTK_CFLAGS"; then pkg_cv_GTK_CFLAGS="$GTK_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-3.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "gtk+-3.0") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-3.0 >= 3.12\""; } >&5 + ($PKG_CONFIG --exists --print-errors "gtk+-3.0 >= 3.12") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_GTK_CFLAGS=`$PKG_CONFIG --cflags "gtk+-3.0" 2>/dev/null` + pkg_cv_GTK_CFLAGS=`$PKG_CONFIG --cflags "gtk+-3.0 >= 3.12" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -6859,12 +6860,12 @@ if test -n "$GTK_LIBS"; then pkg_cv_GTK_LIBS="$GTK_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-3.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "gtk+-3.0") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-3.0 >= 3.12\""; } >&5 + ($PKG_CONFIG --exists --print-errors "gtk+-3.0 >= 3.12") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_GTK_LIBS=`$PKG_CONFIG --libs "gtk+-3.0" 2>/dev/null` + pkg_cv_GTK_LIBS=`$PKG_CONFIG --libs "gtk+-3.0 >= 3.12" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -6885,14 +6886,14 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - GTK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gtk+-3.0" 2>&1` + GTK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gtk+-3.0 >= 3.12" 2>&1` else - GTK_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gtk+-3.0" 2>&1` + GTK_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gtk+-3.0 >= 3.12" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$GTK_PKG_ERRORS" >&5 - as_fn_error $? "Package requirements (gtk+-3.0) were not met: + as_fn_error $? "Package requirements (gtk+-3.0 >= 3.12) were not met: $GTK_PKG_ERRORS @@ -7968,7 +7969,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # 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.8, which was +This file was extended by ptask $as_me 0.0.9, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -8035,7 +8036,7 @@ _ACEOF 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.8 +ptask config.status 0.0.9 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index ec5eed0..f5b6052 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ([2.64]) -AC_INIT([ptask], [0.0.8],[jeanfi@gmail.com],[ptask],[http://wpitchoune.net/ptask]) +AC_INIT([ptask], [0.0.9],[jeanfi@gmail.com],[ptask],[http://wpitchoune.net/ptask]) AM_INIT_AUTOMAKE([-Wall gnu]) @@ -31,7 +31,7 @@ AC_SUBST(XEXT_CFLAGS) AC_SUBST(XEXT_LIBS) # Checks GTK+ 3.0 -PKG_CHECK_MODULES(GTK, gtk+-3.0) +PKG_CHECK_MODULES(GTK, [gtk+-3.0 >= 3.12]) # ensure that only allowed headers are included GTK_CFLAGS+=" -DGTK_DISABLE_SINGLE_INCLUDES " # ensure that no gtk deprecated symbols are used diff --git a/po/fr.gmo b/po/fr.gmo index 96165c8..be77974 100644 Binary files a/po/fr.gmo and b/po/fr.gmo differ diff --git a/po/fr.po b/po/fr.po index bea14a0..2eba39c 100644 --- a/po/fr.po +++ b/po/fr.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: ptask\n" "Report-Msgid-Bugs-To: jeanfi@gmail.com\n" -"POT-Creation-Date: 2014-10-09 18:46+0200\n" +"POT-Creation-Date: 2014-11-22 12:27+0100\n" "PO-Revision-Date: 2012-05-13 18:15+0000\n" "Last-Translator: jeanfi \n" "Language-Team: French <>\n" @@ -87,144 +87,138 @@ msgstr "" msgid "Notes directory: " msgstr "" -#: src/glade/ptask.glade:77 +#: src/glade/ptask.glade:75 msgid "Select a directory" msgstr "" -#: src/glade/ptask.glade:107 +#: src/glade/ptask.glade:103 msgid "None" msgstr "" -#: src/glade/ptask.glade:110 +#: src/glade/ptask.glade:106 msgid "Low" msgstr "" -#: src/glade/ptask.glade:113 +#: src/glade/ptask.glade:109 msgid "Medium" msgstr "" -#: src/glade/ptask.glade:116 +#: src/glade/ptask.glade:112 msgid "High" msgstr "" -#: src/glade/ptask.glade:123 +#: src/glade/ptask.glade:119 msgid "New Task" msgstr "Nouvelle Tache" -#: src/glade/ptask.glade:182 src/glade/ptask.glade:764 +#: src/glade/ptask.glade:178 src/glade/ptask.glade:770 msgid "Description:" msgstr "Description:" -#: src/glade/ptask.glade:218 src/glade/ptask.glade:841 +#: src/glade/ptask.glade:211 src/glade/ptask.glade:840 msgid "Project:" msgstr "Projet:" -#: src/glade/ptask.glade:236 src/glade/ptask.glade:875 +#: src/glade/ptask.glade:227 src/glade/ptask.glade:870 msgid "Priority:" msgstr "Priorite:" -#: src/glade/ptask.glade:322 +#: src/glade/ptask.glade:307 msgid "pending" msgstr "" -#: src/glade/ptask.glade:325 +#: src/glade/ptask.glade:310 msgid "completed" msgstr "" -#: src/glade/ptask.glade:328 +#: src/glade/ptask.glade:313 msgid "deleted" msgstr "" -#: src/glade/ptask.glade:356 src/glade/ptask.glade:376 +#: src/glade/ptask.glade:341 src/glade/ptask.glade:361 msgid "ptask" msgstr "ptask" -#: src/glade/ptask.glade:416 +#: src/glade/ptask.glade:401 msgid "_Help" msgstr "" -#: src/glade/ptask.glade:499 +#: src/glade/ptask.glade:486 msgid "Status:" msgstr "Etat:" -#: src/glade/ptask.glade:560 src/glade/ptask.glade:634 -#: src/glade/ptask.glade:1131 +#: src/glade/ptask.glade:566 src/glade/ptask.glade:640 +#: src/glade/ptask.glade:1120 msgid "Project" msgstr "Projet" -#: src/glade/ptask.glade:571 +#: src/glade/ptask.glade:577 msgid "Count" msgstr "" -#: src/glade/ptask.glade:620 src/glade/ptask.glade:1151 +#: src/glade/ptask.glade:626 src/glade/ptask.glade:1140 msgid "Priority" msgstr "Priorite" -#: src/glade/ptask.glade:649 src/glade/ptask.glade:1161 +#: src/glade/ptask.glade:655 src/glade/ptask.glade:1150 msgid "Urgency" msgstr "" -#: src/glade/ptask.glade:661 src/glade/ptask.glade:1171 +#: src/glade/ptask.glade:667 src/glade/ptask.glade:1160 msgid "Creation date" msgstr "" -#: src/glade/ptask.glade:673 src/glade/ptask.glade:1181 +#: src/glade/ptask.glade:679 src/glade/ptask.glade:1170 msgid "Due" msgstr "" -#: src/glade/ptask.glade:685 src/glade/ptask.glade:1191 +#: src/glade/ptask.glade:691 src/glade/ptask.glade:1180 msgid "Start date" msgstr "" -#: src/glade/ptask.glade:699 src/glade/ptask.glade:1201 +#: src/glade/ptask.glade:705 src/glade/ptask.glade:1190 msgid "Description" msgstr "Description" -#: src/glade/ptask.glade:715 src/glade/ptask.glade:1121 +#: src/glade/ptask.glade:721 src/glade/ptask.glade:1110 msgid "Id" msgstr "" -#: src/glade/ptask.glade:726 src/glade/ptask.glade:1141 +#: src/glade/ptask.glade:732 src/glade/ptask.glade:1130 msgid "UUID" msgstr "" -#: src/glade/ptask.glade:782 +#: src/glade/ptask.glade:786 msgid "Note:" msgstr "Note:" -#: src/glade/ptask.glade:916 -msgid "Save" -msgstr "Sauvegarder" - -#: src/glade/ptask.glade:930 -msgid "Cancel" -msgstr "Annuler" - -#: src/glade/ptask.glade:944 +#: src/glade/ptask.glade:937 msgid "Mark Done" msgstr "Marquer fait" -#: src/glade/ptask.glade:958 -msgid "Remove" -msgstr "" - -#: src/glade/ptask.glade:987 +#: src/glade/ptask.glade:980 msgid "Tags:" msgstr "" -#: src/glade/ptask.glade:1005 +#: src/glade/ptask.glade:996 msgid "label" msgstr "" -#: src/glade/ptask.glade:1053 +#: src/glade/ptask.glade:1042 #, fuzzy msgid "Done" msgstr "Marquer fait" -#: src/glade/ptask.glade:1069 +#: src/glade/ptask.glade:1058 msgid "Start" msgstr "" -#: src/glade/ptask.glade:1076 +#: src/glade/ptask.glade:1065 msgid "Stop" msgstr "" + +#~ msgid "Save" +#~ msgstr "Sauvegarder" + +#~ msgid "Cancel" +#~ msgstr "Annuler" diff --git a/po/ptask.pot b/po/ptask.pot index 41c03b9..edc09f9 100644 --- a/po/ptask.pot +++ b/po/ptask.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: jeanfi@gmail.com\n" -"POT-Creation-Date: 2014-10-09 18:46+0200\n" +"POT-Creation-Date: 2014-11-22 12:27+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -84,143 +84,131 @@ msgstr "" msgid "Notes directory: " msgstr "" -#: src/glade/ptask.glade:77 +#: src/glade/ptask.glade:75 msgid "Select a directory" msgstr "" -#: src/glade/ptask.glade:107 +#: src/glade/ptask.glade:103 msgid "None" msgstr "" -#: src/glade/ptask.glade:110 +#: src/glade/ptask.glade:106 msgid "Low" msgstr "" -#: src/glade/ptask.glade:113 +#: src/glade/ptask.glade:109 msgid "Medium" msgstr "" -#: src/glade/ptask.glade:116 +#: src/glade/ptask.glade:112 msgid "High" msgstr "" -#: src/glade/ptask.glade:123 +#: src/glade/ptask.glade:119 msgid "New Task" msgstr "" -#: src/glade/ptask.glade:182 src/glade/ptask.glade:764 +#: src/glade/ptask.glade:178 src/glade/ptask.glade:770 msgid "Description:" msgstr "" -#: src/glade/ptask.glade:218 src/glade/ptask.glade:841 +#: src/glade/ptask.glade:211 src/glade/ptask.glade:840 msgid "Project:" msgstr "" -#: src/glade/ptask.glade:236 src/glade/ptask.glade:875 +#: src/glade/ptask.glade:227 src/glade/ptask.glade:870 msgid "Priority:" msgstr "" -#: src/glade/ptask.glade:322 +#: src/glade/ptask.glade:307 msgid "pending" msgstr "" -#: src/glade/ptask.glade:325 +#: src/glade/ptask.glade:310 msgid "completed" msgstr "" -#: src/glade/ptask.glade:328 +#: src/glade/ptask.glade:313 msgid "deleted" msgstr "" -#: src/glade/ptask.glade:356 src/glade/ptask.glade:376 +#: src/glade/ptask.glade:341 src/glade/ptask.glade:361 msgid "ptask" msgstr "" -#: src/glade/ptask.glade:416 +#: src/glade/ptask.glade:401 msgid "_Help" msgstr "" -#: src/glade/ptask.glade:499 +#: src/glade/ptask.glade:486 msgid "Status:" msgstr "" -#: src/glade/ptask.glade:560 src/glade/ptask.glade:634 -#: src/glade/ptask.glade:1131 +#: src/glade/ptask.glade:566 src/glade/ptask.glade:640 +#: src/glade/ptask.glade:1120 msgid "Project" msgstr "" -#: src/glade/ptask.glade:571 +#: src/glade/ptask.glade:577 msgid "Count" msgstr "" -#: src/glade/ptask.glade:620 src/glade/ptask.glade:1151 +#: src/glade/ptask.glade:626 src/glade/ptask.glade:1140 msgid "Priority" msgstr "" -#: src/glade/ptask.glade:649 src/glade/ptask.glade:1161 +#: src/glade/ptask.glade:655 src/glade/ptask.glade:1150 msgid "Urgency" msgstr "" -#: src/glade/ptask.glade:661 src/glade/ptask.glade:1171 +#: src/glade/ptask.glade:667 src/glade/ptask.glade:1160 msgid "Creation date" msgstr "" -#: src/glade/ptask.glade:673 src/glade/ptask.glade:1181 +#: src/glade/ptask.glade:679 src/glade/ptask.glade:1170 msgid "Due" msgstr "" -#: src/glade/ptask.glade:685 src/glade/ptask.glade:1191 +#: src/glade/ptask.glade:691 src/glade/ptask.glade:1180 msgid "Start date" msgstr "" -#: src/glade/ptask.glade:699 src/glade/ptask.glade:1201 +#: src/glade/ptask.glade:705 src/glade/ptask.glade:1190 msgid "Description" msgstr "" -#: src/glade/ptask.glade:715 src/glade/ptask.glade:1121 +#: src/glade/ptask.glade:721 src/glade/ptask.glade:1110 msgid "Id" msgstr "" -#: src/glade/ptask.glade:726 src/glade/ptask.glade:1141 +#: src/glade/ptask.glade:732 src/glade/ptask.glade:1130 msgid "UUID" msgstr "" -#: src/glade/ptask.glade:782 +#: src/glade/ptask.glade:786 msgid "Note:" msgstr "" -#: src/glade/ptask.glade:916 -msgid "Save" -msgstr "" - -#: src/glade/ptask.glade:930 -msgid "Cancel" -msgstr "" - -#: src/glade/ptask.glade:944 +#: src/glade/ptask.glade:937 msgid "Mark Done" msgstr "" -#: src/glade/ptask.glade:958 -msgid "Remove" -msgstr "" - -#: src/glade/ptask.glade:987 +#: src/glade/ptask.glade:980 msgid "Tags:" msgstr "" -#: src/glade/ptask.glade:1005 +#: src/glade/ptask.glade:996 msgid "label" msgstr "" -#: src/glade/ptask.glade:1053 +#: src/glade/ptask.glade:1042 msgid "Done" msgstr "" -#: src/glade/ptask.glade:1069 +#: src/glade/ptask.glade:1058 msgid "Start" msgstr "" -#: src/glade/ptask.glade:1076 +#: src/glade/ptask.glade:1065 msgid "Stop" msgstr "" diff --git a/src/glade/ptask.glade b/src/glade/ptask.glade index 1339f60..e0490c4 100644 --- a/src/glade/ptask.glade +++ b/src/glade/ptask.glade @@ -1,7 +1,7 @@ - + - + False 5 @@ -64,8 +64,6 @@ 0 0 - 1 - 1 @@ -79,8 +77,6 @@ 1 0 - 1 - 1 @@ -184,8 +180,6 @@ 0 0 - 1 - 1 @@ -198,12 +192,11 @@ 4 • 60 + GTK_INPUT_HINT_SPELLCHECK | GTK_INPUT_HINT_WORD_COMPLETION | GTK_INPUT_HINT_NONE 1 0 - 1 - 1 @@ -220,8 +213,6 @@ 0 1 - 1 - 1 @@ -238,8 +229,6 @@ 0 2 - 1 - 1 @@ -263,8 +252,6 @@ 1 2 - 1 - 1 @@ -286,8 +273,6 @@ 1 1 - 1 - 1 @@ -457,6 +442,7 @@ True True + False @@ -472,6 +458,7 @@ True True + False @@ -528,13 +515,32 @@ False False + 1 + + + + + True + True + gtk-find + False + False + False + alpha + + + + + False + True + end 2 False - False + True 1 @@ -766,8 +772,6 @@ 0 1 - 1 - 1 @@ -784,8 +788,6 @@ 0 5 - 1 - 1 @@ -802,14 +804,13 @@ True True + GTK_INPUT_HINT_SPELLCHECK | GTK_INPUT_HINT_WORD_COMPLETION | GTK_INPUT_HINT_NONE 1 5 - 1 - 1 @@ -825,8 +826,6 @@ 1 1 - 1 - 1 @@ -843,8 +842,6 @@ 0 3 - 1 - 1 @@ -859,8 +856,6 @@ 1 3 - 1 - 1 @@ -877,8 +872,6 @@ 0 2 - 1 - 1 @@ -902,8 +895,6 @@ 1 2 - 1 - 1 @@ -913,10 +904,11 @@ start - Save + gtk-save True True True + True top @@ -927,10 +919,11 @@ - Cancel + gtk-cancel True True True + True @@ -955,10 +948,11 @@ - Remove + gtk-remove True False True + True @@ -972,7 +966,6 @@ 0 0 2 - 1 @@ -989,8 +982,6 @@ 0 4 - 1 - 1 @@ -1007,8 +998,6 @@ 1 4 - 1 - 1 diff --git a/src/main.c b/src/main.c index 83dfda6..8dc69ba 100644 --- a/src/main.c +++ b/src/main.c @@ -98,7 +98,7 @@ void refresh() old_tasks = tasks; current_prj = ui_projecttree_get_project(); current_uuid = ui_tasktree_get_task_uuid(); - ui_tasktree_update(NULL, NULL); + ui_tasktree_update(NULL); } else { old_tasks = NULL; current_prj = NULL; @@ -109,7 +109,7 @@ void refresh() if (tasks) { ui_projecttree_update(tasks); - ui_tasktree_update(tasks, current_prj); + ui_tasktree_update(tasks); if (current_uuid) ui_tasktree_set_selected_task(current_uuid); } else { diff --git a/src/ptask.1 b/src/ptask.1 index 427e28d..b8c85e7 100644 --- a/src/ptask.1 +++ b/src/ptask.1 @@ -1,10 +1,10 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.44.1. -.TH PTASK "1" "October 2014" "ptask 0.0.8" "User Commands" +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.46.2. +.TH PTASK "1" "November 2014" "ptask 0.0.9" "User Commands" .SH NAME ptask \- GTk+ Task application .SH SYNOPSIS .B ptask -[\fIOPTION\fR]... +[\fI\,OPTION\/\fR]... .SH DESCRIPTION ptask is a task management user interface based on taskwarrior. .SH OPTIONS @@ -15,7 +15,7 @@ display this help and exit \fB\-v\fR, \fB\-\-version\fR display version information and exit .TP -\fB\-d\fR, \fB\-\-debug\fR=\fILEVEL\fR +\fB\-d\fR, \fB\-\-debug\fR=\fI\,LEVEL\/\fR set the debug level, integer between 0 and 3 .SH "REPORTING BUGS" Report bugs to: jeanfi@gmail.com diff --git a/src/ptime.c b/src/ptime.c index 2e017fc..425e4bb 100644 --- a/src/ptime.c +++ b/src/ptime.c @@ -55,9 +55,11 @@ char *tm_to_str(const struct tm *tm) str = malloc(11); s = strftime(str, 11, "%Y/%m/%d", tm); - if (s) + if (s) { return str; - - log_err("Failed to convert time"); - return NULL; + } else { + log_err("Failed to convert time"); + free(str); + return NULL; + } } diff --git a/src/ui_tasktree.c b/src/ui_tasktree.c index 506e8f9..7b2d2c6 100644 --- a/src/ui_tasktree.c +++ b/src/ui_tasktree.c @@ -47,6 +47,7 @@ static const char * const MENU_NAMES[] = { static GtkTreeView *w_treeview; static GtkMenu *w_menu; static struct task **current_tasks; +static gchar *search_keywords; enum { COL_ID, @@ -291,16 +292,63 @@ void ui_tasktree_set_selected_task(const char *uuid) log_fct_exit(); } +static int match_search_keywords(struct task *task) +{ + gchar *desc; + int ret; + char **tags; + gchar *tag; + + if (!search_keywords || !strlen(search_keywords)) + return 1; + + if (!task->description || !strlen(task->description)) + return 0; + + desc = g_ascii_strup(task->description, -1); + + if (strstr(desc, search_keywords)) + ret = 1; + else + ret = 0; + + free(desc); -void ui_tasktree_update(struct task **tasks, const char *prj_filter) + if (ret) + return 1; + + tags = task->tags; + if (!tags) + return 0; + + while (*tags) { + tag = g_ascii_strup(*tags, -1); + + if (strstr(tag, search_keywords)) + ret = 1; + + free(tag); + + if (ret) + return 1; + + tags++; + } + + return 0; +} + +void ui_tasktree_update(struct task **tasks) { GtkTreeModel *model; struct task **tasks_cur; struct task *task; GtkTreeIter iter; - const char *prj; + const char *prj, *prj_filter; char *s; + prj_filter = ui_projecttree_get_project(); + current_tasks = tasks; model = gtk_tree_view_get_model(GTK_TREE_VIEW(w_treeview)); @@ -318,6 +366,9 @@ void ui_tasktree_update(struct task **tasks, const char *prj_filter) if (prj_filter && strcmp(prj, prj_filter)) continue; + if (!match_search_keywords(task)) + continue; + gtk_list_store_append(GTK_LIST_STORE(model), &iter); gtk_list_store_set(GTK_LIST_STORE(model), @@ -373,11 +424,6 @@ void ui_tasktree_update(struct task **tasks, const char *prj_filter) } -void ui_tasktree_update_filter(const char *prj_filter) -{ - ui_tasktree_update(current_tasks, prj_filter); -} - gboolean tasktree_button_press_event_cbk(GtkWidget *widget, GdkEventButton *evt, gpointer data) @@ -477,3 +523,19 @@ void tasktree_stop_activate_cbk(GtkAction *action, gpointer data) log_fct_exit(); } + +void +ui_tasktree_search_changed_cbk(GtkEntry *entry, gchar *preedit, gpointer data) +{ + if (search_keywords) + g_free(search_keywords); + + search_keywords = g_ascii_strup(gtk_entry_get_text(entry), -1); + + ui_tasktree_update(current_tasks); +} + +void ui_tasktree_update_filter(const char *prj) +{ + ui_tasktree_update(current_tasks); +} diff --git a/src/ui_tasktree.h b/src/ui_tasktree.h index 1506a58..93b5427 100644 --- a/src/ui_tasktree.h +++ b/src/ui_tasktree.h @@ -29,7 +29,7 @@ void ui_tasktree_save_settings(); struct task *ui_tasktree_get_selected_task(); void ui_tasktree_set_selected_task(const char *uuid); const char *ui_tasktree_get_task_uuid(); -void ui_tasktree_update(struct task **, const char *); +void ui_tasktree_update(struct task **); void ui_tasktree_update_filter(const char *); #endif