]> code.ossystems Code Review - openembedded-core.git/commitdiff
Pull patch from svn to fix crash when deleting tasks
authorRoss Burton <ross@openedhand.com>
Tue, 24 Jul 2007 13:32:32 +0000 (13:32 +0000)
committerRoss Burton <ross@openedhand.com>
Tue, 24 Jul 2007 13:32:32 +0000 (13:32 +0000)
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2218 311d38ba-8fff-0310-9ca6-ca027cbcb966

meta/packages/pimlico/tasks-0.10/delete-crash.diff [new file with mode: 0644]
meta/packages/pimlico/tasks_0.10.bb

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 (file)
index 0000000..0b2ba47
--- /dev/null
@@ -0,0 +1,71 @@
+Index: libkoto/koto-utils.c
+===================================================================
+--- libkoto/koto-utils.c       (revision 294)
++++ libkoto/koto-utils.c       (revision 295)
+@@ -25,6 +25,7 @@
+ typedef struct {
+   GtkWindow *window;
++  GtkTreeModel *model;
+   char *title;
+ } WindowData;
+@@ -67,19 +68,21 @@
+ /*
+  * Update the window title, generally as the number of tasks has changed.
+  */
+-static void
+-update_title (WindowData *data, GtkTreeModel *model)
++static gboolean
++update_title (gpointer user_data)
+ {
++  WindowData *data = user_data;
+   int count = 0;
+   char *title;
+   g_assert (data);
+-  g_assert (model);
+-  gtk_tree_model_foreach (model, count_pending, &count);
++  gtk_tree_model_foreach (data->model, count_pending, &count);
+   title = g_strdup_printf (data->title, count);
+   gtk_window_set_title (data->window, title);
+   g_free (title);
++
++  return FALSE;
+ }
+ /*
+@@ -89,7 +92,7 @@
+ static void
+ on_row_inserted (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, WindowData *data)
+ {
+-  update_title (data, model);
++  g_idle_add (update_title, data);
+ }
+ /*
+@@ -99,7 +102,7 @@
+ static void
+ on_row_deleted (GtkTreeModel *model, GtkTreePath *path, WindowData *data)
+ {
+-  update_title (data, model);
++  g_idle_add (update_title, data);
+ }
+ /*
+@@ -135,6 +138,7 @@
+   
+   data = g_slice_new (WindowData);
+   data->window = window;
++  data->model = model;
+   data->title = g_strdup (title);
+   
+   g_object_weak_ref (G_OBJECT (model), on_weak_notify, data);
+@@ -145,5 +149,5 @@
+                     "signal::row-deleted", G_CALLBACK (on_row_deleted), data,
+                     NULL);
+-  update_title (data, model);
++  update_title (data);
+ }
index 63d22328ff2796c1b8787ccfa5806e465de0c9ae..75e589e740c5090be15947967aa321510223744b 100644 (file)
@@ -1,7 +1,8 @@
 require tasks.inc
 
-PR="r1"
+PR="r2"
 
 SRC_URI = "http://pimlico-project.org/sources/${PN}/${PN}-${PV}.tar.gz \
         file://tasks-single.diff;patch=1 \
+        file://delete-crash.diff;patch=1;pnum=0 \
         file://tasks-owl.diff;patch=1;pnum=0"