summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRoss Burton <ross@openedhand.com>2007-07-24 13:32:32 +0000
committerRoss Burton <ross@openedhand.com>2007-07-24 13:32:32 +0000
commit509f999b8f6f07febb0db515b7e1ea186d028e70 (patch)
tree217e5e62b724c367a09d2ef2d5af5a5e2535b4da /meta
parent5e73b7634918ed477be45d326c6d982c7fa2904f (diff)
downloadpoky-509f999b8f6f07febb0db515b7e1ea186d028e70.tar.gz
Pull patch from svn to fix crash when deleting tasks
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2218 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta')
-rw-r--r--meta/packages/pimlico/tasks-0.10/delete-crash.diff71
-rw-r--r--meta/packages/pimlico/tasks_0.10.bb3
2 files changed, 73 insertions, 1 deletions
diff --git a/meta/packages/pimlico/tasks-0.10/delete-crash.diff b/meta/packages/pimlico/tasks-0.10/delete-crash.diff
new file mode 100644
index 0000000000..0b2ba473d4
--- /dev/null
+++ b/meta/packages/pimlico/tasks-0.10/delete-crash.diff
@@ -0,0 +1,71 @@
1Index: libkoto/koto-utils.c
2===================================================================
3--- libkoto/koto-utils.c (revision 294)
4+++ libkoto/koto-utils.c (revision 295)
5@@ -25,6 +25,7 @@
6
7 typedef struct {
8 GtkWindow *window;
9+ GtkTreeModel *model;
10 char *title;
11 } WindowData;
12
13@@ -67,19 +68,21 @@
14 /*
15 * Update the window title, generally as the number of tasks has changed.
16 */
17-static void
18-update_title (WindowData *data, GtkTreeModel *model)
19+static gboolean
20+update_title (gpointer user_data)
21 {
22+ WindowData *data = user_data;
23 int count = 0;
24 char *title;
25
26 g_assert (data);
27- g_assert (model);
28
29- gtk_tree_model_foreach (model, count_pending, &count);
30+ gtk_tree_model_foreach (data->model, count_pending, &count);
31 title = g_strdup_printf (data->title, count);
32 gtk_window_set_title (data->window, title);
33 g_free (title);
34+
35+ return FALSE;
36 }
37
38 /*
39@@ -89,7 +92,7 @@
40 static void
41 on_row_inserted (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, WindowData *data)
42 {
43- update_title (data, model);
44+ g_idle_add (update_title, data);
45 }
46
47 /*
48@@ -99,7 +102,7 @@
49 static void
50 on_row_deleted (GtkTreeModel *model, GtkTreePath *path, WindowData *data)
51 {
52- update_title (data, model);
53+ g_idle_add (update_title, data);
54 }
55
56 /*
57@@ -135,6 +138,7 @@
58
59 data = g_slice_new (WindowData);
60 data->window = window;
61+ data->model = model;
62 data->title = g_strdup (title);
63
64 g_object_weak_ref (G_OBJECT (model), on_weak_notify, data);
65@@ -145,5 +149,5 @@
66 "signal::row-deleted", G_CALLBACK (on_row_deleted), data,
67 NULL);
68
69- update_title (data, model);
70+ update_title (data);
71 }
diff --git a/meta/packages/pimlico/tasks_0.10.bb b/meta/packages/pimlico/tasks_0.10.bb
index 63d22328ff..75e589e740 100644
--- a/meta/packages/pimlico/tasks_0.10.bb
+++ b/meta/packages/pimlico/tasks_0.10.bb
@@ -1,7 +1,8 @@
1require tasks.inc 1require tasks.inc
2 2
3PR="r1" 3PR="r2"
4 4
5SRC_URI = "http://pimlico-project.org/sources/${PN}/${PN}-${PV}.tar.gz \ 5SRC_URI = "http://pimlico-project.org/sources/${PN}/${PN}-${PV}.tar.gz \
6 file://tasks-single.diff;patch=1 \ 6 file://tasks-single.diff;patch=1 \
7 file://delete-crash.diff;patch=1;pnum=0 \
7 file://tasks-owl.diff;patch=1;pnum=0" 8 file://tasks-owl.diff;patch=1;pnum=0"