summaryrefslogtreecommitdiff
path: root/time/gnotime/patches/patch-ae
diff options
context:
space:
mode:
Diffstat (limited to 'time/gnotime/patches/patch-ae')
-rw-r--r--time/gnotime/patches/patch-ae172
1 files changed, 172 insertions, 0 deletions
diff --git a/time/gnotime/patches/patch-ae b/time/gnotime/patches/patch-ae
new file mode 100644
index 00000000000..16705e2b81c
--- /dev/null
+++ b/time/gnotime/patches/patch-ae
@@ -0,0 +1,172 @@
+$NetBSD: patch-ae,v 1.1 2004/11/24 22:35:25 kristerw Exp $
+
+--- src/journal.c.orig Wed Nov 24 22:18:52 2004
++++ src/journal.c Wed Nov 24 22:26:45 2004
+@@ -195,11 +195,12 @@
+ static void
+ save_to_gnomevfs (Wiggy *wig, const char * filename)
+ {
+-
++ gboolean exists;
++ GnomeVFSResult result;
+ /* Don't clobber the file, ask user for permission */
+ GnomeVFSURI *parsed_uri;
+ parsed_uri = gnome_vfs_uri_new (filename);
+- gboolean exists = gnome_vfs_uri_exists (parsed_uri);
++ exists = gnome_vfs_uri_exists (parsed_uri);
+ gnome_vfs_uri_unref (parsed_uri);
+ if (exists)
+ {
+@@ -215,7 +216,6 @@
+ }
+
+ /* Try to open the file for writing */
+- GnomeVFSResult result;
+ result = gnome_vfs_create (&wig->handle, filename,
+ GNOME_VFS_OPEN_WRITE, FALSE, 0644);
+
+@@ -509,6 +509,7 @@
+ static void
+ task_delete_memo_clicked_cb(GtkWidget * w, gpointer data)
+ {
++ GList * ctl;
+ Wiggy *wig = (Wiggy *) data;
+
+ /* It is physically impossible to cut just the memo, without
+@@ -517,7 +518,7 @@
+
+ gtt_task_merge_up (wig->task);
+
+- GList * ctl = g_list_prepend(cutted_task_list, wig->task);
++ ctl = g_list_prepend(cutted_task_list, wig->task);
+ gtt_task_remove (wig->task);
+ cutted_task_list = ctl;
+ }
+@@ -697,10 +698,11 @@
+ static void
+ on_close_clicked_cb (GtkWidget *w, gpointer data)
+ {
++ GtkWidget *topper;
+ Wiggy *wig = (Wiggy *) data;
+
+ if (NULL == wig->top) return; /* avoid recursive double-free */
+- GtkWidget *topper = wig->top; /* avoid recursion */
++ topper = wig->top; /* avoid recursion */
+ wig->top = NULL;
+ gtk_widget_destroy (topper);
+
+@@ -786,19 +788,20 @@
+ html_url_requested_cb(GtkHTML *doc, const gchar * url,
+ GtkHTMLStream *handle, gpointer data)
+ {
++ GnomeVFSResult result;
++ GnomeVFSHandle *vfs;
++#define BSZ 16000
++ char buff[BSZ];
++ GnomeVFSFileSize bytes_read;
++
+ Wiggy *wig = data;
+ const char * path = gtt_ghtml_resolve_path (url, wig->filepath);
+ if (!path) return;
+
+- GnomeVFSResult result;
+- GnomeVFSHandle *vfs;
+ result = gnome_vfs_open (&vfs, path, GNOME_VFS_OPEN_READ);
+
+ if (GNOME_VFS_OK != result) return;
+
+-#define BSZ 16000
+- char buff[BSZ];
+- GnomeVFSFileSize bytes_read;
+ result = gnome_vfs_read (vfs, buff, BSZ, &bytes_read);
+ while (GNOME_VFS_OK == result)
+ {
+@@ -859,8 +862,10 @@
+ return msg;
+ }
+
++ {
+ char * msg = _("Left-click to bring up menu");
+ return g_strdup (msg);
++ }
+ }
+
+ static gint
+@@ -922,8 +927,13 @@
+ /* Create and initialize the hover-help window */
+ if (!wig->hover_help_window)
+ {
++ GtkWindow *wino;
++ GtkWidget *frame;
++ GtkWidget *align;
++ GtkWidget *label;
++ int px=0, py=0, rx=0, ry=0;
+ wig->hover_help_window = gtk_window_new(GTK_WINDOW_POPUP);
+- GtkWindow *wino = GTK_WINDOW (wig->hover_help_window);
++ wino = GTK_WINDOW (wig->hover_help_window);
+ gtk_window_set_decorated (wino, FALSE);
+ gtk_window_set_destroy_with_parent (wino, TRUE);
+ gtk_window_set_transient_for (wino, GTK_WINDOW(wig->top));
+@@ -931,19 +941,19 @@
+ gtk_window_set_resizable (wino, FALSE); /* FALSE to enable auto-resize */
+
+ /* There must be a better way to draw a line around the box ?? */
+- GtkWidget *frame = gtk_frame_new (NULL);
++ frame = gtk_frame_new (NULL);
+ gtk_container_add(GTK_CONTAINER(wino), frame);
+ gtk_container_set_resize_mode (GTK_CONTAINER(frame), GTK_RESIZE_PARENT);
+ gtk_widget_show (frame);
+
+ /* There must be a better way to pad the text all around ?? */
+- GtkWidget *align = gtk_alignment_new (0.5, 0.5, 1.0, 1.0);
++ align = gtk_alignment_new (0.5, 0.5, 1.0, 1.0);
+ // gtk_alignment_set_padding (GTK_ALIGNMENT(align), 6, 6, 6, 6);
+ gtk_container_add(GTK_CONTAINER(frame), align);
+ gtk_container_set_resize_mode (GTK_CONTAINER(align), GTK_RESIZE_PARENT);
+ gtk_widget_show (align);
+
+- GtkWidget *label = gtk_label_new ("xxx");
++ label = gtk_label_new ("xxx");
+ wig->hover_label = GTK_LABEL (label);
+ gtk_container_add(GTK_CONTAINER(align), label);
+ gtk_widget_show (label);
+@@ -952,7 +962,6 @@
+ gtk_window_set_focus (GTK_WINDOW(wig->top), GTK_WIDGET(wig->html));
+
+ /* Set up in initial default, so later move works. */
+- int px=0, py=0, rx=0, ry=0;
+ gtk_widget_get_pointer (GTK_WIDGET(wig->top), &px, &py);
+ gtk_window_get_position (GTK_WINDOW(wig->top), &rx, &ry);
+ gtk_window_move (wino, rx+px, ry+py);
+@@ -1003,25 +1012,28 @@
+ perform_form_query (KvpFrame *kvpf)
+ {
+ GList *results, *n;
++ char *user_debug;
++ QofSqlQuery *q;
++ char *query_string;
+
+ if (!kvpf) return NULL;
+
+ /* Allow the user to enable form debugging by adding the following html:
+ * <input type="hidden" name="debug" value="1">
+ */
+- char *user_debug = kvp_frame_get_string (kvpf, "debug");
++ user_debug = kvp_frame_get_string (kvpf, "debug");
+ if (user_debug)
+ {
+ printf ("Debug: HTML Form Input=%s\n", kvp_frame_to_string (kvpf));
+ }
+
+- QofSqlQuery *q = qof_sql_query_new();
++ q = qof_sql_query_new();
+
+ if (!book) book = qof_book_new();
+ qof_sql_query_set_book (q, book);
+ qof_sql_query_set_kvp (q, kvpf);
+
+- char *query_string = kvp_frame_get_string (kvpf, "query");
++ query_string = kvp_frame_get_string (kvpf, "query");
+ if (!query_string) return NULL;
+ if (0 == query_string[0]) return NULL;
+