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.local/wpitchoune/svnpub/gtask/trunk'
+ac_pwd='/home/jporsini/work/wpitchoune/svnpub/gtask/trunk'
srcdir='.'
INSTALL='/usr/bin/install -c'
MKDIR_P='/bin/mkdir -p'
S["MKDIR_P"]="/bin/mkdir -p"
S["INSTALL_STRIP_PROGRAM"]="$(install_sh) -c -s"
S["STRIP"]=""
-S["install_sh"]="${SHELL} /home/jporsini/work.local/wpitchoune/svnpub/gtask/trunk/install-sh"
-S["MAKEINFO"]="${SHELL} /home/jporsini/work.local/wpitchoune/svnpub/gtask/trunk/missing --run makeinfo"
-S["AUTOHEADER"]="${SHELL} /home/jporsini/work.local/wpitchoune/svnpub/gtask/trunk/missing --run autoheader"
-S["AUTOMAKE"]="${SHELL} /home/jporsini/work.local/wpitchoune/svnpub/gtask/trunk/missing --run automake-1.11"
-S["AUTOCONF"]="${SHELL} /home/jporsini/work.local/wpitchoune/svnpub/gtask/trunk/missing --run autoconf"
-S["ACLOCAL"]="${SHELL} /home/jporsini/work.local/wpitchoune/svnpub/gtask/trunk/missing --run aclocal-1.11"
+S["install_sh"]="${SHELL} /home/jporsini/work/wpitchoune/svnpub/gtask/trunk/install-sh"
+S["MAKEINFO"]="${SHELL} /home/jporsini/work/wpitchoune/svnpub/gtask/trunk/missing --run makeinfo"
+S["AUTOHEADER"]="${SHELL} /home/jporsini/work/wpitchoune/svnpub/gtask/trunk/missing --run autoheader"
+S["AUTOMAKE"]="${SHELL} /home/jporsini/work/wpitchoune/svnpub/gtask/trunk/missing --run automake-1.11"
+S["AUTOCONF"]="${SHELL} /home/jporsini/work/wpitchoune/svnpub/gtask/trunk/missing --run autoconf"
+S["ACLOCAL"]="${SHELL} /home/jporsini/work/wpitchoune/svnpub/gtask/trunk/missing --run aclocal-1.11"
S["VERSION"]="0.0.x"
S["PACKAGE"]="gtask"
S["CYGPATH_W"]="echo"
# 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.local/wpitchoune/svnpub/gtask/trunk/install-sh does not start with $(SHELL), so we add it.
+# ${SHELL} /home/jporsini/work/wpitchoune/svnpub/gtask/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.local/wpitchoune/svnpub/gtask/trunk/install-sh -d
-install_sh = $(SHELL) ${SHELL} /home/jporsini/work.local/wpitchoune/svnpub/gtask/trunk/install-sh
+mkinstalldirs = $(SHELL) ${SHELL} /home/jporsini/work/wpitchoune/svnpub/gtask/trunk/install-sh -d
+install_sh = $(SHELL) ${SHELL} /home/jporsini/work/wpitchoune/svnpub/gtask/trunk/install-sh
MKDIR_P = /bin/mkdir -p
mkdir_p = /bin/mkdir -p
bin_PROGRAMS = gtask
gtask_SOURCES = main.c \
+ note.c note.h \
tw.c tw.h
#dist_man_MANS = gtask.1
CONFIG_CLEAN_VPATH_FILES =
am__installdirs = "$(DESTDIR)$(bindir)"
PROGRAMS = $(bin_PROGRAMS)
-am_gtask_OBJECTS = main.$(OBJEXT) tw.$(OBJEXT)
+am_gtask_OBJECTS = main.$(OBJEXT) note.$(OBJEXT) tw.$(OBJEXT)
gtask_OBJECTS = $(am_gtask_OBJECTS)
gtask_LDADD = $(LDADD)
DEFAULT_INCLUDES = -I.@am__isrc@
AM_LDFLAGS = -Wl,--as-needed -export-dynamic
AM_CPPFLAGS = -Wall -Werror $(GTK_CFLAGS) $(JSON_CFLAGS)
gtask_SOURCES = main.c \
+ note.c note.h \
tw.c tw.h
all: all-recursive
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/note.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tw.Po@am__quote@
.c.o:
#include <gtk/gtk.h>
+#include "note.h"
#include "tw.h"
static struct task **tasks;
printf("tasksave_clicked_cbk %d\n", task->id);
- if (task->note) {
- buf = gtk_text_view_get_buffer(w_note);
-
- gtk_text_buffer_get_iter_at_offset(buf, &sIter, 0);
- gtk_text_buffer_get_iter_at_offset(buf, &eIter, -1);
- txt = gtk_text_buffer_get_text(buf, &sIter, &eIter, TRUE);
-
- txt = escape(txt);
+ buf = gtk_text_view_get_buffer(w_note);
- printf("%s\n", txt);
- }
+ gtk_text_buffer_get_iter_at_offset(buf, &sIter, 0);
+ gtk_text_buffer_get_iter_at_offset(buf, &eIter, -1);
+ txt = gtk_text_buffer_get_text(buf, &sIter, &eIter, TRUE);
+
+ printf("note=%s\n", txt);
+
+ if (!task->note || strcmp(txt, task->note))
+ note_put(task->uuid, txt);
ctxt = gtk_entry_get_text(w_description);
if (!task->description || strcmp(ctxt, task->description))
--- /dev/null
+/*
+ * Copyright (C) 2010-2012 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 <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+
+#include <note.h>
+
+void note_put(const char *uuid, const char *note)
+{
+ char *home, *dir, *path;
+ FILE *f;
+
+ home = getenv("HOME");
+
+ if (!home)
+ return ;
+
+ dir = malloc(strlen(home) + 1 + strlen(".task") + 1);
+ sprintf(dir, "%s/%s", home, ".task");
+ mkdir(dir, 0777);
+
+ path = malloc(strlen(dir) + 1 + strlen(uuid) + strlen(".note") + 1);
+ sprintf(path, "%s/%s.note", dir, uuid);
+
+ printf("note_put %s %s %s \n", path, uuid, note);
+
+ f = fopen(path, "w");
+
+ if (f) {
+ fwrite(note, 1, strlen(note), f);
+ fclose(f);
+ } else {
+ fprintf(stderr, "Failed to open %s\n", path);
+ }
+
+ free(dir);
+ free(path);
+}
--- /dev/null
+/*
+ * Copyright (C) 2010-2012 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 _GTASK_NOTE_H_
+#define _GTASK_NOTE_H_
+
+#include "tw.h"
+
+void note_put(const char *uuid, const char *note);
+
+#endif