[anjuta] sourceview: use G_PRIORITY_DEFAULT for IO



commit e0cefcf7817db129d9ad0a428dba31e7e2688708
Author: Carl-Anton Ingmarsson <ca ingmarsson gmail com>
Date:   Thu Jan 31 12:19:29 2013 +0100

    sourceview: use G_PRIORITY_DEFAULT for IO
    
    We wan't loading of files to be prioritized and for example not be blocked
    by doing a files search.

 plugins/sourceview/sourceview-io.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/plugins/sourceview/sourceview-io.c b/plugins/sourceview/sourceview-io.c
index 8986ac4..16ea5fe 100644
--- a/plugins/sourceview/sourceview-io.c
+++ b/plugins/sourceview/sourceview-io.c
@@ -39,10 +39,11 @@ enum
 
 	LAST_SIGNAL
 };
+static guint io_signals[LAST_SIGNAL] = { 0 };
 
 #define IO_ERROR_QUARK g_quark_from_string ("SourceviewIO-Error")
 
-static guint io_signals[LAST_SIGNAL] = { 0 };
+#define IO_PRIORITY G_PRIORITY_DEFAULT
 
 G_DEFINE_TYPE (SourceviewIO, sourceview_io, G_TYPE_OBJECT);
 
@@ -424,7 +425,7 @@ on_read_finished (GObject* input, GAsyncResult* result, gpointer data)
 			g_input_stream_read_async (G_INPUT_STREAM (input_stream),
 									   sio->read_buffer + sio->bytes_read,
 									   READ_SIZE,
-									   G_PRIORITY_LOW,
+									   IO_PRIORITY,
 									   sio->cancel,
 									   on_read_finished,
 									   sio);
@@ -470,7 +471,7 @@ sourceview_io_open (SourceviewIO* sio, GFile* file)
 	g_input_stream_read_async (G_INPUT_STREAM (input_stream),
 							   sio->read_buffer,
 							   READ_SIZE,
-							   G_PRIORITY_LOW,
+							   IO_PRIORITY,
 							   sio->cancel,
 							   on_read_finished,
 							   g_object_ref (sio));



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]