Report bugs to <jeanfi@gmail.com>.
ptask home page: <http://wpitchoune.net/ptask>."
-ac_cs_config="'CFLAGS=-O1' '--prefix=/tmp'"
+ac_cs_config="'--prefix=/tmp'"
ac_cs_version="\
ptask config.status 0.0.x
configured by ./configure, generated by GNU Autoconf 2.69,
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
-ac_pwd='/home/jporsini/work/wpitchoune/svnpub/ptask/trunk'
+ac_pwd='/home/jporsini/work.local/wpitchoune/svnpub/ptask/trunk'
srcdir='.'
INSTALL='/usr/bin/install -c'
MKDIR_P='/bin/mkdir -p'
fi
if $ac_cs_recheck; then
- set X /bin/bash './configure' 'CFLAGS=-O1' '--prefix=/tmp' $ac_configure_extra_args --no-create --no-recursion
+ set X /bin/bash './configure' '--prefix=/tmp' $ac_configure_extra_args --no-create --no-recursion
shift
$as_echo "running CONFIG_SHELL=/bin/bash $*" >&6
CONFIG_SHELL='/bin/bash'
S["MSGFMT"]="/usr/bin/msgfmt"
S["GETTEXT_MACRO_VERSION"]="0.18"
S["USE_NLS"]="yes"
-S["CPP"]="gcc -E"
+S["CPP"]="gcc -std=gnu99 -E"
S["XMKMF"]=""
S["am__fastdepCC_FALSE"]="#"
S["am__fastdepCC_TRUE"]=""
S["ac_ct_CC"]="gcc"
S["CPPFLAGS"]=""
S["LDFLAGS"]=""
-S["CFLAGS"]="-O1"
-S["CC"]="gcc"
+S["CFLAGS"]="-g -O2"
+S["CC"]="gcc -std=gnu99"
S["am__untar"]="$${TAR-tar} xf -"
S["am__tar"]="$${TAR-tar} chof - \"$$tardir\""
S["AMTAR"]="$${TAR-tar}"
S["MKDIR_P"]="/bin/mkdir -p"
S["INSTALL_STRIP_PROGRAM"]="$(install_sh) -c -s"
S["STRIP"]=""
-S["install_sh"]="${SHELL} /home/jporsini/work/wpitchoune/svnpub/ptask/trunk/install-sh"
-S["MAKEINFO"]="${SHELL} /home/jporsini/work/wpitchoune/svnpub/ptask/trunk/missing --run makeinfo"
-S["AUTOHEADER"]="${SHELL} /home/jporsini/work/wpitchoune/svnpub/ptask/trunk/missing --run autoheader"
-S["AUTOMAKE"]="${SHELL} /home/jporsini/work/wpitchoune/svnpub/ptask/trunk/missing --run automake-1.11"
-S["AUTOCONF"]="${SHELL} /home/jporsini/work/wpitchoune/svnpub/ptask/trunk/missing --run autoconf"
-S["ACLOCAL"]="${SHELL} /home/jporsini/work/wpitchoune/svnpub/ptask/trunk/missing --run aclocal-1.11"
+S["install_sh"]="${SHELL} /home/jporsini/work.local/wpitchoune/svnpub/ptask/trunk/install-sh"
+S["MAKEINFO"]="${SHELL} /home/jporsini/work.local/wpitchoune/svnpub/ptask/trunk/missing --run makeinfo"
+S["AUTOHEADER"]="${SHELL} /home/jporsini/work.local/wpitchoune/svnpub/ptask/trunk/missing --run autoheader"
+S["AUTOMAKE"]="${SHELL} /home/jporsini/work.local/wpitchoune/svnpub/ptask/trunk/missing --run automake-1.11"
+S["AUTOCONF"]="${SHELL} /home/jporsini/work.local/wpitchoune/svnpub/ptask/trunk/missing --run autoconf"
+S["ACLOCAL"]="${SHELL} /home/jporsini/work.local/wpitchoune/svnpub/ptask/trunk/missing --run aclocal-1.11"
S["VERSION"]="0.0.x"
S["PACKAGE"]="ptask"
S["CYGPATH_W"]="echo"
fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
+$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
+if ${ac_cv_prog_cc_c99+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_prog_cc_c99=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <wchar.h>
+#include <stdio.h>
+
+// Check varargs macros. These examples are taken from C99 6.10.3.5.
+#define debug(...) fprintf (stderr, __VA_ARGS__)
+#define showlist(...) puts (#__VA_ARGS__)
+#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
+static void
+test_varargs_macros (void)
+{
+ int x = 1234;
+ int y = 5678;
+ debug ("Flag");
+ debug ("X = %d\n", x);
+ showlist (The first, second, and third items.);
+ report (x>y, "x is %d but y is %d", x, y);
+}
+
+// Check long long types.
+#define BIG64 18446744073709551615ull
+#define BIG32 4294967295ul
+#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
+#if !BIG_OK
+ your preprocessor is broken;
+#endif
+#if BIG_OK
+#else
+ your preprocessor is broken;
+#endif
+static long long int bignum = -9223372036854775807LL;
+static unsigned long long int ubignum = BIG64;
+
+struct incomplete_array
+{
+ int datasize;
+ double data[];
+};
+
+struct named_init {
+ int number;
+ const wchar_t *name;
+ double average;
+};
+
+typedef const char *ccp;
+
+static inline int
+test_restrict (ccp restrict text)
+{
+ // See if C++-style comments work.
+ // Iterate through items via the restricted pointer.
+ // Also check for declarations in for loops.
+ for (unsigned int i = 0; *(text+i) != '\0'; ++i)
+ continue;
+ return 0;
+}
+
+// Check varargs and va_copy.
+static void
+test_varargs (const char *format, ...)
+{
+ va_list args;
+ va_start (args, format);
+ va_list args_copy;
+ va_copy (args_copy, args);
+
+ const char *str;
+ int number;
+ float fnumber;
+
+ while (*format)
+ {
+ switch (*format++)
+ {
+ case 's': // string
+ str = va_arg (args_copy, const char *);
+ break;
+ case 'd': // int
+ number = va_arg (args_copy, int);
+ break;
+ case 'f': // float
+ fnumber = va_arg (args_copy, double);
+ break;
+ default:
+ break;
+ }
+ }
+ va_end (args_copy);
+ va_end (args);
+}
+
+int
+main ()
+{
+
+ // Check bool.
+ _Bool success = false;
+
+ // Check restrict.
+ if (test_restrict ("String literal") == 0)
+ success = true;
+ char *restrict newvar = "Another string";
+
+ // Check varargs.
+ test_varargs ("s, d' f .", "string", 65, 34.234);
+ test_varargs_macros ();
+
+ // Check flexible array members.
+ struct incomplete_array *ia =
+ malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
+ ia->datasize = 10;
+ for (int i = 0; i < ia->datasize; ++i)
+ ia->data[i] = i * 1.234;
+
+ // Check named initializers.
+ struct named_init ni = {
+ .number = 34,
+ .name = L"Test wide string",
+ .average = 543.34343,
+ };
+
+ ni.number = 58;
+
+ int dynamic_array[ni.number];
+ dynamic_array[ni.number - 1] = 543;
+
+ // work around unused variable warnings
+ return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
+ || dynamic_array[ni.number - 1] != 543);
+
+ ;
+ return 0;
+}
+_ACEOF
+for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_c99=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+ test "x$ac_cv_prog_cc_c99" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c99" in
+ x)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+ xno)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+ *)
+ CC="$CC $ac_cv_prog_cc_c99"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
+$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c99" != xno; then :
+
+fi
+
+
if test "x$CC" != xcc; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
# We use $(mkdir_p).
# In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as
# "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions,
-# ${SHELL} /home/jporsini/work/wpitchoune/svnpub/ptask/trunk/install-sh does not start with $(SHELL), so we add it.
+# ${SHELL} /home/jporsini/work.local/wpitchoune/svnpub/ptask/trunk/install-sh does not start with $(SHELL), so we add it.
# In automake >= 1.10, /bin/mkdir -p is derived from ${MKDIR_P}, which is defined
# either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake
# versions, $(mkinstalldirs) and $(install_sh) are unused.
-mkinstalldirs = $(SHELL) ${SHELL} /home/jporsini/work/wpitchoune/svnpub/ptask/trunk/install-sh -d
-install_sh = $(SHELL) ${SHELL} /home/jporsini/work/wpitchoune/svnpub/ptask/trunk/install-sh
+mkinstalldirs = $(SHELL) ${SHELL} /home/jporsini/work.local/wpitchoune/svnpub/ptask/trunk/install-sh -d
+install_sh = $(SHELL) ${SHELL} /home/jporsini/work.local/wpitchoune/svnpub/ptask/trunk/install-sh
MKDIR_P = /bin/mkdir -p
mkdir_p = /bin/mkdir -p
# We use $(mkdir_p).
# In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as
# "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions,
-# ${SHELL} /home/jporsini/work/wpitchoune/svnpub/ptask/trunk/install-sh does not start with $(SHELL), so we add it.
+# ${SHELL} /home/jporsini/work.local/wpitchoune/svnpub/ptask/trunk/install-sh does not start with $(SHELL), so we add it.
# In automake >= 1.10, /bin/mkdir -p is derived from ${MKDIR_P}, which is defined
# either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake
# versions, $(mkinstalldirs) and $(install_sh) are unused.
-mkinstalldirs = $(SHELL) ${SHELL} /home/jporsini/work/wpitchoune/svnpub/ptask/trunk/install-sh -d
-install_sh = $(SHELL) ${SHELL} /home/jporsini/work/wpitchoune/svnpub/ptask/trunk/install-sh
+mkinstalldirs = $(SHELL) ${SHELL} /home/jporsini/work.local/wpitchoune/svnpub/ptask/trunk/install-sh -d
+install_sh = $(SHELL) ${SHELL} /home/jporsini/work.local/wpitchoune/svnpub/ptask/trunk/install-sh
MKDIR_P = /bin/mkdir -p
mkdir_p = /bin/mkdir -p
am_ptask_OBJECTS = list.$(OBJEXT) log.$(OBJEXT) main.$(OBJEXT) \
note.$(OBJEXT) pstr.$(OBJEXT) ptime.$(OBJEXT) tw.$(OBJEXT) \
ui.$(OBJEXT) ui_newtask_diag.$(OBJEXT) \
- ui_projecttree.$(OBJEXT) ui_tasktree.$(OBJEXT)
+ ui_projecttree.$(OBJEXT) ui_taskpanel.$(OBJEXT) \
+ ui_tasktree.$(OBJEXT)
ptask_OBJECTS = $(am_ptask_OBJECTS)
ptask_LDADD = $(LDADD)
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
ui.c ui.h \
ui_newtask_diag.c ui_newtask_diag.h \
ui_projecttree.c ui_projecttree.h \
+ ui_taskpanel.c ui_taskpanel.h \
ui_tasktree.c ui_tasktree.h
dist_man_MANS = ptask.1
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ui.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ui_newtask_diag.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ui_projecttree.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ui_taskpanel.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ui_tasktree.Po@am__quote@
.c.o:
#include "tw.h"
#include <ui.h>
#include <ui_projecttree.h>
+#include <ui_taskpanel.h>
#include <ui_tasktree.h>
static const char *program_name;
int status;
const char *project;
- log_debug("refresh");
+ log_fct_enter();
clear_task_panel();
status = gtk_combo_box_get_active(w_status);
gtk_dialog_run(GTK_DIALOG(dialog));
gtk_widget_destroy(dialog);
}
- log_debug("refresh done");
+ log_fct(__func__, "EXIT");
}
int taskdone_clicked_cbk(GtkButton *btn, gpointer data)
NULL);
window = create_window(builder, settings);
+ ui_taskpanel_init(builder);
ui_tasktree_init(builder);
ui_projecttree_init(builder);
struct project **prjs, **tmp, *prj;
const char *prj_name;
- log_debug("tw_get_projects()");
+ log_fct_enter();
- prjs = malloc(sizeof(struct project *));
- *prjs = NULL;
+ prjs = malloc(2 * sizeof(struct project *));
+ prjs[0] = project_new("ALL", 0);
+ prjs[1] = NULL;
for (t_cur = tasks; *t_cur; t_cur++) {
prj_name = (*t_cur)->project;
free(prjs);
prjs = tmp;
}
+ prjs[0]->count++;
}
+ log_fct_exit();
+
return prjs;
}
GtkTreeIter iter;
GtkTreeModel *model;
GValue value = {0,};
-
- log_debug("get_selected_project()");
+ const char *prj;
+
+ log_fct_enter();
gtk_tree_view_get_cursor(w_treeview, &path, &cols);
gtk_tree_model_get_iter(model, &iter, path);
gtk_tree_model_get_value(model, &iter, COL_NAME, &value);
- return g_value_get_string(&value);
+ prj = g_value_get_string(&value);
+ } else {
+ prj = NULL;
}
- return NULL;
+ log_fct_exit();
+
+ return prj;
}
GtkTreeModel *model;
GtkTreeIter iter;
- log_debug("ui_projecttree_update()");
+ log_fct_enter();
model = gtk_tree_view_get_model(GTK_TREE_VIEW(w_treeview));
gtk_list_store_clear(GTK_LIST_STORE(model));
}
tw_project_list_free(prjs);
+
+ log_fct_exit();
}
--- /dev/null
+/*
+ * Copyright (C) 2012-2013 jeanfi@gmail.com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ */
+#include <log.h>
+#include <ui_taskpanel.h>
+
+void ui_taskpanel_init(GtkBuilder *builder)
+{
+ log_fct(__func__, "ENTER");
+ log_fct(__func__, "EXIT");
+}
--- /dev/null
+/*
+ * Copyright (C) 2012-2013 jeanfi@gmail.com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ */
+#ifndef _PTASK_UI_TASKPANEL_H_
+#define _PTASK_UI_TASKPANEL_H_
+
+#include <gtk/gtk.h>
+
+void ui_taskpanel_init(GtkBuilder *);
+
+#endif