changeset 2216:5c5799702e9c

Revert "call notify functions in in an idle call" Breaks type in of keywords. This reverts commit 78cde6934008f79fe498e4adc64d187b0ed47417.
author Klaus Ethgen <Klaus@Ethgen.de>
date Fri, 30 Dec 2011 13:59:53 +0100
parents 58cd15125b23
children a2c6d0d0d31c
files src/filedata.c
diffstat 1 files changed, 2 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- a/src/filedata.c	Fri Dec 09 19:21:18 2011 +0100
+++ b/src/filedata.c	Fri Dec 30 13:59:53 2011 +0100
@@ -2551,12 +2551,6 @@
    implementation in view_file_list.c */
 
 
-typedef struct _NotifyIdleData NotifyIdleData;
-
-struct _NotifyIdleData {
-	FileData *fd;
-	NotifyType type;
-};
 
 
 typedef struct _NotifyData NotifyData;
@@ -2630,29 +2624,17 @@
 }
 
 
-gboolean file_data_send_notification_idle_cb(gpointer data)
+void file_data_send_notification(FileData *fd, NotifyType type)
 {
-	NotifyIdleData *nid = (NotifyIdleData *)data;
 	GList *work = notify_func_list;
 
 	while (work)
 		{
 		NotifyData *nd = (NotifyData *)work->data;
 		
-		nd->func(nid->fd, nid->type, nd->data);
+		nd->func(fd, type, nd->data);
 		work = work->next;
 		}
-	file_data_unref(nid->fd);
-	g_free(nid);
-	return FALSE;
-}
-
-void file_data_send_notification(FileData *fd, NotifyType type)
-{
-	NotifyIdleData *nid = g_new0(NotifyIdleData, 1);
-	nid->fd = file_data_ref(fd);
-	nid->type = type;
-	g_idle_add_full(G_PRIORITY_HIGH, file_data_send_notification_idle_cb, nid, NULL);
 }
 
 static GHashTable *file_data_monitor_pool = NULL;