Author: stephan
Date: 2006-12-11 09:33:20 +0000 (Mon, 11 Dec 2006)
New Revision: 24078

Modified:
   squeeze/trunk/src/archive_store.c
Log:
Removed threading from GUI

Modified: squeeze/trunk/src/archive_store.c
===================================================================
--- squeeze/trunk/src/archive_store.c   2006-12-10 21:50:18 UTC (rev 24077)
+++ squeeze/trunk/src/archive_store.c   2006-12-11 09:33:20 UTC (rev 24078)
@@ -46,11 +46,6 @@
 static void
 sq_archive_store_finalize(GObject *object);
 
-static gpointer
-sq_archive_store_sort_thread_func(SQArchiveStore *store);
-static gpointer
-sq_archive_store_sort_order_thread_func(SQArchiveStore *store);
-
 /* properties */
 enum {
        SQ_ARCHIVE_STORE_SHOW_ICONS = 1, 
@@ -755,7 +750,8 @@
        store->sort_order = order;
 
        /* sq_archive_store_sort(store); */
-       g_thread_create((GThreadFunc)sq_archive_store_sort_order_thread_func, 
store, FALSE, NULL);
+       sq_archive_store_sort(store);
+       sq_archive_store_refresh(store);
 
        gtk_tree_sortable_sort_column_changed(sortable);
 }
@@ -1111,7 +1107,9 @@
                sq_archive_store_append_history(store, current_entry);
        }
 
-       g_thread_create((GThreadFunc)sq_archive_store_sort_thread_func, store, 
FALSE, NULL);
+       sq_archive_store_sort(store);
+       sq_archive_store_refresh(store);
+       g_signal_emit(store, 
sq_archive_store_signals[SQ_ARCHIVE_STORE_SIGNAL_PWD_CHANGED], 0,NULL);
 }
 
 void
@@ -1137,8 +1135,9 @@
        sq_archive_store_append_history(store, current_entry);
 
        /* sq_archive_store_sort(store); */
-       g_thread_create((GThreadFunc)sq_archive_store_sort_thread_func, store, 
FALSE, NULL);
-
+       sq_archive_store_sort(store);
+       sq_archive_store_refresh(store);
+       g_signal_emit(store, 
sq_archive_store_signals[SQ_ARCHIVE_STORE_SIGNAL_PWD_CHANGED], 0,NULL);
 }
 
 void
@@ -1389,8 +1388,11 @@
        sq_archive_store_append_history(store, stack);
 
        /* sq_archive_store_sort(store); */
-       g_thread_create((GThreadFunc)sq_archive_store_sort_thread_func, store, 
FALSE, NULL);
+       sq_archive_store_sort(store);
+       sq_archive_store_refresh(store);
 
+       //g_signal_emit(store, 
sq_archive_store_signals[SQ_ARCHIVE_STORE_SIGNAL_PWD_CHANGED], 0,NULL);
+
        return TRUE;
 }
 
@@ -1523,7 +1525,8 @@
                store->navigation.present = store->navigation.present->prev;
 
        /* sq_archive_store_sort(store); */
-       g_thread_create((GThreadFunc)sq_archive_store_sort_thread_func, store, 
FALSE, NULL);
+       sq_archive_store_sort(store);
+       sq_archive_store_refresh(store);
 
        sq_archive_store_check_trailing(store);
 
@@ -1549,7 +1552,8 @@
                store->navigation.present = store->navigation.present->next;
 
        /* sq_archive_store_sort(store); */
-       g_thread_create((GThreadFunc)sq_archive_store_sort_thread_func, store, 
FALSE, NULL);
+       sq_archive_store_sort(store);
+       sq_archive_store_refresh(store);
 
        sq_archive_store_check_trailing(store);
 
@@ -1705,39 +1709,3 @@
        if(store->archive)
                g_object_unref(store->archive);
 }
-
-static gpointer
-sq_archive_store_sort_thread_func(SQArchiveStore *store)
-{
-       gdk_threads_enter();
-       if(store->treeview)
-               gtk_tree_view_set_model(store->treeview, NULL);
-       gdk_threads_leave();
-
-       sq_archive_store_sort(store);
-
-       gdk_threads_enter();
-       if(store->treeview)
-               gtk_tree_view_set_model(store->treeview, (GtkTreeModel *)store);
-       g_signal_emit(store, 
sq_archive_store_signals[SQ_ARCHIVE_STORE_SIGNAL_PWD_CHANGED], 0,NULL);
-       gdk_threads_leave();
-       return NULL;
-}
-
-static gpointer
-sq_archive_store_sort_order_thread_func(SQArchiveStore *store)
-{
-       gdk_threads_enter();
-       if(store->treeview)
-               gtk_tree_view_set_model(store->treeview, NULL);
-       gdk_threads_leave();
-
-       sq_archive_store_sort(store);
-
-       gdk_threads_enter();
-       sq_archive_store_refresh(store);
-       if(store->treeview)
-               gtk_tree_view_set_model(store->treeview, (GtkTreeModel *)store);
-       gdk_threads_leave();
-       return NULL;
-}

_______________________________________________
Xfce4-commits mailing list
[email protected]
http://foo-projects.org/mailman/listinfo/xfce4-commits

Reply via email to