[anjuta] message-view, sourceview: bgo #669359 - Yellow debugger color in dark theme



commit c736089dcf639a02999c888953e737756a34c74c
Author: SÃbastien Granjoux <seb sfo free fr>
Date:   Sat Feb 11 15:16:07 2012 +0100

    message-view,sourceview: bgo #669359 - Yellow debugger color in dark theme
    
    The message-view dconf keys have changed, an update of scintilla is needed.

 plugins/message-view/Makefile.am                   |    2 +-
 .../message-view/anjuta-message-manager-plugin.ui  |   39 +++-
 plugins/message-view/message-view.c                |  192 ++++++++++----------
 ....anjuta.plugins.message-manager.gschema.xml.in} |   15 +-
 plugins/message-view/plugin.c                      |   64 ++++----
 plugins/sourceview/sourceview-prefs.c              |   14 +-
 plugins/sourceview/sourceview.c                    |   11 +-
 7 files changed, 188 insertions(+), 149 deletions(-)
---
diff --git a/plugins/message-view/Makefile.am b/plugins/message-view/Makefile.am
index 2988356..57d02f0 100644
--- a/plugins/message-view/Makefile.am
+++ b/plugins/message-view/Makefile.am
@@ -42,7 +42,7 @@ libanjuta_message_view_la_SOURCES = \
 	message-view.c\
 	message-view.h
 
-gsettings_in_file = org.gnome.anjuta.message-manager.gschema.xml.in
+gsettings_in_file = org.gnome.anjuta.plugins.message-manager.gschema.xml.in
 gsettings_SCHEMAS = $(gsettings_in_file:.xml.in=.xml)
 @INTLTOOL_XML_NOMERGE_RULE@
 @GSETTINGS_RULES@
diff --git a/plugins/message-view/anjuta-message-manager-plugin.ui b/plugins/message-view/anjuta-message-manager-plugin.ui
index 51e348f..fb4005f 100644
--- a/plugins/message-view/anjuta-message-manager-plugin.ui
+++ b/plugins/message-view/anjuta-message-manager-plugin.ui
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <requires lib="gtk+" version="2.16"/>
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkAdjustment" id="adjustment1">
     <property name="lower">1</property>
     <property name="upper">1000</property>
@@ -109,7 +109,7 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkComboBox" id="preferences_combo:text:Underline-Plain,Underline-Squiggle,Underline-TT,Diagonal,Strike-Out:0:msgman-style-normal">
+                  <object class="GtkComboBox" id="preferences:style-normal">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
                     <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
@@ -129,7 +129,7 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkComboBox" id="preferences_combo:text:Underline-Plain,Underline-Squiggle,Underline-TT,Diagonal,Strike-Out:0:msgman-style-warning">
+                  <object class="GtkComboBox" id="preferences:style-warning">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
                     <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
@@ -151,7 +151,7 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkComboBox" id="preferences_combo:text:Underline-Plain,Underline-Squiggle,Underline-TT,Diagonal,Strike-Out:0:msgman-style-error">
+                  <object class="GtkComboBox" id="preferences:style-error">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
                     <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
@@ -207,7 +207,8 @@
                 <property name="column_spacing">5</property>
                 <property name="row_spacing">5</property>
                 <child>
-                  <object class="GtkColorButton" id="preferences_color:color:#FF0000:0:msgman-color-error">
+                  <object class="GtkColorButton" id="preferences:color-error">
+                    <property name="use_action_appearance">False</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
@@ -221,7 +222,8 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkColorButton" id="preferences_color:color:#00FF00:0:msgman-color-warning">
+                  <object class="GtkColorButton" id="preferences:color-warning">
+                    <property name="use_action_appearance">False</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
@@ -263,10 +265,31 @@
                   </packing>
                 </child>
                 <child>
-                  <placeholder/>
+                  <object class="GtkLabel" id="label1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">Important:</property>
+                  </object>
+                  <packing>
+                    <property name="x_options">GTK_FILL</property>
+                    <property name="y_options"></property>
+                  </packing>
                 </child>
                 <child>
-                  <placeholder/>
+                  <object class="GtkColorButton" id="preferences:color-important">
+                    <property name="use_action_appearance">False</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="x_options">GTK_FILL</property>
+                    <property name="y_options"></property>
+                  </packing>
                 </child>
               </object>
             </child>
diff --git a/plugins/message-view/message-view.c b/plugins/message-view/message-view.c
index 334b23b..2eb02af 100644
--- a/plugins/message-view/message-view.c
+++ b/plugins/message-view/message-view.c
@@ -23,9 +23,9 @@
 #include "message-view.h"
 #define MESSAGE_TYPE message_get_type()
 
-#define PREFERENCES_SCHEMA "org.gnome.anjuta.message-manager"
-#define COLOR_ERROR "msgman-color-error"
-#define COLOR_WARNING "msgman-color-warning"
+#define PREFERENCES_SCHEMA "org.gnome.anjuta.plugins.message-manager"
+#define COLOR_ERROR "color-error"
+#define COLOR_WARNING "color-warning"
 
 struct _MessageViewPrivate
 {
@@ -35,23 +35,23 @@ struct _MessageViewPrivate
 	GtkWidget *tree_view;
 	GtkTreeModel *model;
 	GtkTreeModel *filter;
-	
+
 	GtkWidget *popup_menu;
-	
+
 	gint adj_chgd_hdlr;
-	
+
 	/* Messages filter */
 	MessageViewFlags flags;
 	gint normal_count;
 	gint warn_count;
 	gint error_count;
 	gint info_count;
-	
+
 	/* Properties */
 	gchar *label;
 	gchar *pixmap;
 	gboolean highlite;
-	
+
 	GSettings* settings;
 };
 
@@ -60,7 +60,7 @@ typedef struct
 	IAnjutaMessageViewType type;
 	gchar *summary;
 	gchar *details;
-	
+
 } Message;
 
 enum
@@ -195,10 +195,10 @@ message_get_type ()
 static void
 add_char(gchar** str, gchar c)
 {
-	gchar* buffer;	
-	
+	gchar* buffer;
+
 	g_return_if_fail(str != NULL);
-	
+
 	buffer = g_strdup_printf("%s%c", *str, c);
 	g_free(*str);
 	*str = buffer;
@@ -209,7 +209,7 @@ escape_string (const gchar *str)
 {
 	GString *gstr;
 	const gchar *iter;
-	
+
 	gstr = g_string_new ("");
 	iter = str;
 	while (*iter != '\0')
@@ -235,31 +235,31 @@ message_view_query_tooltip (GtkWidget* widget, gint x, gint y, gboolean keyboard
 	GtkTreeIter iter;
 	GtkTreeModel *model;
 	MessageView* view = MESSAGE_VIEW(widget);
-	
+
 	model = view->privat->model;
-	
+
 	if (gtk_tree_view_get_path_at_pos (GTK_TREE_VIEW(view->privat->tree_view),
 		x, y, &path, NULL, NULL, NULL))
 	{
 		Message *message;
 		gchar *text, *title, *desc;
-		
+
 		gtk_tree_model_get_iter (model, &iter, path);
-		gtk_tree_model_get (model, &iter, COLUMN_MESSAGE, &message, -1); 
+		gtk_tree_model_get (model, &iter, COLUMN_MESSAGE, &message, -1);
 		gtk_tree_path_free(path);
-		
+
 		if (!message->details || !message->summary ||
 			strlen (message->details) <= 0 ||
 			strlen (message->summary) <= 0)
 			return FALSE;
-		
+
 		title = escape_string (message->summary);
 		desc = escape_string (message->details);
 		text = g_strdup_printf ("<b>%s</b>\n%s", title, desc);
-		
+
 		g_free (title);
 		g_free (desc);
-		
+
 		gtk_tooltip_set_markup (tooltip, text);
 		g_free (text);
 		return TRUE;
@@ -275,12 +275,12 @@ on_message_event (GObject* object, GdkEvent* event, gpointer data)
 	g_return_val_if_fail(object != NULL, FALSE);
 	g_return_val_if_fail(event != NULL, FALSE);
 	g_return_val_if_fail(data != NULL, FALSE);
-	
+
 	MessageView* view = MESSAGE_VIEW(data);
-		
+
 	if (event == NULL)
 		return FALSE;
-		
+
 	if (event->type == GDK_KEY_PRESS)
 	{
 		switch(((GdkEventKey *)event)->keyval)
@@ -292,7 +292,7 @@ on_message_event (GObject* object, GdkEvent* event, gpointer data)
 					ianjuta_message_view_get_current_message(IANJUTA_MESSAGE_VIEW (view), NULL);
 				if (message)
 				{
-					g_signal_emit_by_name (G_OBJECT (view), "message_clicked", 
+					g_signal_emit_by_name (G_OBJECT (view), "message_clicked",
 										   message);
 					return TRUE;
 				}
@@ -302,7 +302,7 @@ on_message_event (GObject* object, GdkEvent* event, gpointer data)
 				return FALSE;
 		}
 	}
-	else if (event->type == GDK_2BUTTON_PRESS) 
+	else if (event->type == GDK_2BUTTON_PRESS)
 	{
 		if (((GdkEventButton *) event)->button == 1)
 		{
@@ -310,7 +310,7 @@ on_message_event (GObject* object, GdkEvent* event, gpointer data)
 				ianjuta_message_view_get_current_message(IANJUTA_MESSAGE_VIEW (view), NULL);
 			if (message)
 			{
-				g_signal_emit_by_name (G_OBJECT (view), "message_clicked", 
+				g_signal_emit_by_name (G_OBJECT (view), "message_clicked",
 									   message);
 				return TRUE;
 			}
@@ -326,11 +326,11 @@ on_message_event (GObject* object, GdkEvent* event, gpointer data)
 					((GdkEventButton *) event)->time);
 			return TRUE;
 		}
-	}	
+	}
 	return FALSE;
 }
 
-static void 
+static void
 on_adjustment_changed (GtkAdjustment* adj, gpointer data)
 {
 	gtk_adjustment_set_value (adj,
@@ -368,7 +368,7 @@ message_view_set_property (GObject * object,
 	MessageView *self = MESSAGE_VIEW (object);
 	g_return_if_fail(value != NULL);
 	g_return_if_fail(pspec != NULL);
-	
+
 	switch (property_id)
 	{
 	case MV_PROP_LABEL:
@@ -402,10 +402,10 @@ message_view_get_property (GObject * object,
 			   GValue * value, GParamSpec * pspec)
 {
 	MessageView *self = MESSAGE_VIEW (object);
-	
+
 	g_return_if_fail(value != NULL);
 	g_return_if_fail(pspec != NULL);
-	
+
 	switch (property_id)
 	{
 		case MV_PROP_LABEL:
@@ -463,28 +463,28 @@ message_view_instance_init (MessageView * self)
 	GtkTreeViewColumn *column;
 	GtkTreeViewColumn *column_pixbuf;
 	GtkTreeSelection *select;
-	GtkListStore *model;	
+	GtkListStore *model;
 	GtkAdjustment* adj;
- 
+
 	g_return_if_fail(self != NULL);
 	self->privat = g_new0 (MessageViewPrivate, 1);
 
 	/* Init private data */
 	self->privat->line_buffer = g_strdup("");
 	self->privat->flags = 0xF;
-	
+
 	/* Create the tree widget */
 	model = gtk_list_store_new (N_COLUMNS, G_TYPE_STRING,
 								G_TYPE_STRING, MESSAGE_TYPE,  G_TYPE_STRING);
 	self->privat->model = GTK_TREE_MODEL (model);
-	
+
 	/* message filter */
 	self->privat->filter = gtk_tree_model_filter_new (GTK_TREE_MODEL (model), NULL);
-	gtk_tree_model_filter_set_visible_func (GTK_TREE_MODEL_FILTER (self->privat->filter), 
+	gtk_tree_model_filter_set_visible_func (GTK_TREE_MODEL_FILTER (self->privat->filter),
 											message_view_tree_view_filter,
 											self, NULL);
-	
-	self->privat->tree_view = 
+
+	self->privat->tree_view =
 		gtk_tree_view_new_with_model (GTK_TREE_MODEL (self->privat->filter));
 	gtk_widget_show (self->privat->tree_view);
 	gtk_tree_view_set_headers_visible (GTK_TREE_VIEW
@@ -520,7 +520,7 @@ message_view_instance_init (MessageView * self)
 	select = gtk_tree_view_get_selection
 		(GTK_TREE_VIEW (self->privat->tree_view));
 	gtk_tree_selection_set_mode (select, GTK_SELECTION_BROWSE);
-	
+
 	/* Add tree view to a scrolled window */
 	scrolled_win = gtk_scrolled_window_new (NULL, NULL);
 	gtk_container_add (GTK_CONTAINER (scrolled_win),
@@ -535,13 +535,13 @@ message_view_instance_init (MessageView * self)
 									 G_CALLBACK (on_adjustment_changed), self);
 	g_signal_connect(G_OBJECT(adj), "value_changed",
 					 G_CALLBACK(on_adjustment_value_changed), self);
-	
+
 	gtk_container_add (GTK_CONTAINER (self), scrolled_win);
-	
+
 	/* Connect signals */
-	g_signal_connect (G_OBJECT(self->privat->tree_view), "event", 
+	g_signal_connect (G_OBJECT(self->privat->tree_view), "event",
 					  G_CALLBACK (on_message_event), self);
-	
+
 	g_object_set (G_OBJECT(self), "has-tooltip", TRUE, NULL);
 
 }
@@ -554,16 +554,16 @@ message_view_class_init (MessageViewClass * klass)
 	GParamSpec *message_view_spec_highlite;
 	GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
 	GtkWidgetClass* widget_class = GTK_WIDGET_CLASS (klass);
-	
+
 	parent_class = g_type_class_peek_parent (klass);
 	gobject_class->set_property = message_view_set_property;
 	gobject_class->get_property = message_view_get_property;
 	gobject_class->finalize = message_view_finalize;
 	gobject_class->dispose = message_view_dispose;
-	
+
 	widget_class->query_tooltip = message_view_query_tooltip;
 
-	
+
 	message_view_spec_label = g_param_spec_string ("label",
 						       "Label of the view",
 						       "Used to decorate the view,"
@@ -610,8 +610,8 @@ message_view_serialize (MessageView *view, AnjutaSerializer *serializer)
 	GtkTreeModel *model;
 	GtkTreeIter iter;
 
-	g_return_if_fail (view != NULL && MESSAGE_IS_VIEW (view));
-	
+	g_return_val_if_fail (view != NULL && MESSAGE_IS_VIEW (view), FALSE);
+
 	if (!anjuta_serializer_write_string (serializer, "label",
 										 view->privat->label))
 		return FALSE;
@@ -621,10 +621,10 @@ message_view_serialize (MessageView *view, AnjutaSerializer *serializer)
 	if (!anjuta_serializer_write_int (serializer, "highlite",
 									  view->privat->highlite))
 		return FALSE;
-	
+
 	/* Serialize individual messages */
 	model = view->privat->model;
-	
+
 	if (!anjuta_serializer_write_int (serializer, "messages",
 									  gtk_tree_model_iter_n_children (model, NULL)))
 		return FALSE;
@@ -652,8 +652,8 @@ message_view_deserialize (MessageView *view, AnjutaSerializer *serializer)
 	GtkTreeModel *model;
 	gint messages, i;
 
-	g_return_if_fail (view != NULL && MESSAGE_IS_VIEW (view));
-	
+	g_return_val_if_fail (view != NULL && MESSAGE_IS_VIEW (view), FALSE);
+
 	if (!anjuta_serializer_read_string (serializer, "label",
 										&view->privat->label, TRUE))
 		return FALSE;
@@ -663,14 +663,14 @@ message_view_deserialize (MessageView *view, AnjutaSerializer *serializer)
 	if (!anjuta_serializer_read_int (serializer, "highlite",
 									 &view->privat->highlite))
 		return FALSE;
-	
+
 	/* Create individual messages */
 	model = view->privat->model;
 	gtk_list_store_clear (GTK_LIST_STORE (model));
-	
+
 	if (!anjuta_serializer_read_int (serializer, "messages", &messages))
 		return FALSE;
-	
+
 	for (i = 0; i < messages; i++)
 	{
 		Message *message;
@@ -695,7 +695,7 @@ void message_view_next(MessageView* view)
 	GtkTreeSelection *select;
 
 	g_return_if_fail (view != NULL && MESSAGE_IS_VIEW (view));
-	
+
 	model = view->privat->model;
 	select = gtk_tree_view_get_selection (GTK_TREE_VIEW
 					      (view->privat->tree_view));
@@ -725,7 +725,7 @@ void message_view_next(MessageView* view)
 											  (view->privat->tree_view),
 											  path, NULL, FALSE);
 				gtk_tree_path_free (path);
-				g_signal_emit_by_name (G_OBJECT (view), "message_clicked", 
+				g_signal_emit_by_name (G_OBJECT (view), "message_clicked",
 									   message);
 				break;
 			}
@@ -741,11 +741,11 @@ void message_view_previous(MessageView* view)
 	GtkTreePath *path;
 
 	g_return_if_fail (view != NULL && MESSAGE_IS_VIEW (view));
-	
+
 	model = view->privat->model;
 	select = gtk_tree_view_get_selection (GTK_TREE_VIEW
 					      (view->privat->tree_view));
-	
+
 	if (!gtk_tree_selection_get_selected (select, &model, &iter))
 	{
 		if (gtk_tree_model_get_iter_first (model, &iter))
@@ -765,7 +765,7 @@ void message_view_previous(MessageView* view)
 			|| message->type == IANJUTA_MESSAGE_VIEW_TYPE_ERROR)
 		{
 			const gchar* message;
-			
+
 			gtk_tree_selection_select_iter (select, &iter);
 			message =
 				ianjuta_message_view_get_current_message(IANJUTA_MESSAGE_VIEW (view), NULL);
@@ -777,7 +777,7 @@ void message_view_previous(MessageView* view)
 											  (view->privat->tree_view),
 											  path, NULL, FALSE, 0, 0);
 				gtk_tree_path_free (path);
-				g_signal_emit_by_name (G_OBJECT (view), "message_clicked", 
+				g_signal_emit_by_name (G_OBJECT (view), "message_clicked",
 									   message);
 				break;
 			}
@@ -794,14 +794,14 @@ static gboolean message_view_save_as(MessageView* view, gchar* uri)
 	GtkTreeModel *model;
 	gboolean ok;
 
-	g_return_if_fail (view != NULL && MESSAGE_IS_VIEW (view));
-	
-	if (uri == NULL) 
+	g_return_val_if_fail (view != NULL && MESSAGE_IS_VIEW (view), FALSE);
+
+	if (uri == NULL)
 		return FALSE;
 
 	file = g_file_new_for_uri (uri);
 	os = G_OUTPUT_STREAM (
-			g_file_replace (file, NULL, 
+			g_file_replace (file, NULL,
 				FALSE,
 				G_FILE_CREATE_NONE,
 				NULL,
@@ -813,7 +813,7 @@ static gboolean message_view_save_as(MessageView* view, gchar* uri)
 		return FALSE;
 	}
 
-	/* Save all lines of message view */	
+	/* Save all lines of message view */
 	model = view->privat->model;
 
 	ok = TRUE;
@@ -859,7 +859,7 @@ void message_view_save(MessageView* view)
 
 	g_return_if_fail (view != NULL && MESSAGE_IS_VIEW (view));
 
-	parent = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (view)));	
+	parent = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (view)));
 
 	uri = ask_user_for_save_uri (parent);
 	if (uri)
@@ -879,19 +879,19 @@ void message_view_copy(MessageView* view)
 	GtkTreeSelection *select;
 
 	g_return_if_fail (view != NULL && MESSAGE_IS_VIEW (view));
-	
+
 	model = view->privat->model;
 	select = gtk_tree_view_get_selection (GTK_TREE_VIEW
 					      (view->privat->tree_view));
-	
+
 	if (gtk_tree_selection_get_selected (select, &model, &iter))
 	{
 		Message *message;
 		const gchar *text;
 		GtkClipboard *clipboard;
-		
-		gtk_tree_model_get (model, &iter, COLUMN_MESSAGE, &message, -1); 
-		
+
+		gtk_tree_model_get (model, &iter, COLUMN_MESSAGE, &message, -1);
+
 		if (message->details && (*message->details != '\0'))
 		{
 			text = message->details;
@@ -905,9 +905,9 @@ void message_view_copy(MessageView* view)
 			/* No message */
 			return;
 		}
-		
+
 		clipboard = gtk_widget_get_clipboard (GTK_WIDGET (view), GDK_SELECTION_CLIPBOARD);
-	
+
 		gtk_clipboard_set_text (clipboard, text, -1);
 	}
 }
@@ -921,7 +921,7 @@ pref_change_color (MessageView *mview, IAnjutaMessageViewType type,
 	GtkListStore *store;
 	GtkTreeIter iter;
 	gboolean success;
-	
+
 	color = g_settings_get_string (mview->privat->settings, color_pref_key);
 	store = GTK_LIST_STORE (mview->privat->model);
 	success = gtk_tree_model_get_iter_first (GTK_TREE_MODEL (store), &iter);
@@ -984,19 +984,19 @@ imessage_view_buffer_append (IAnjutaMessageView * message_view,
 	MessageView *view;
 	gint cur_char;
 	int len;
-	
+
 	g_return_if_fail (MESSAGE_IS_VIEW (message_view));
 
 	if (!message)
 		return;
 
 	len = strlen(message);
-	
+
 	view = MESSAGE_VIEW (message_view);
-	
+
 	/* Check if message contains newlines */
 	for (cur_char = 0; cur_char < len; cur_char++)
-	{		
+	{
 		/* Is newline => print line */
 		if (message[cur_char] != '\n')
 		{
@@ -1026,16 +1026,16 @@ imessage_view_append (IAnjutaMessageView *message_view,
 	gchar *utf8_msg;
 	gchar *escaped_str;
 	gchar* stock_id = NULL;
-	
+
 	MessageView *view;
 	Message *message;
 
 	g_return_if_fail (MESSAGE_IS_VIEW (message_view));
-	
+
 	view = MESSAGE_VIEW (message_view);
-	
+
 	message = message_new (type, summary, details);
-	
+
 	g_object_get (G_OBJECT (view), "highlite", &highlite, NULL);
 	color = NULL;
 	if (highlite)
@@ -1062,7 +1062,7 @@ imessage_view_append (IAnjutaMessageView *message_view,
 				view->privat->normal_count++;
 		}
 	}
-	
+
 	/* Add the message to the tree */
 	store = GTK_LIST_STORE (view->privat->model);
 	gtk_list_store_append (store, &iter);
@@ -1113,11 +1113,11 @@ imessage_view_clear (IAnjutaMessageView *message_view, GError **e)
 	view = MESSAGE_VIEW (message_view);
 
 	/* filter settings restart */
-	view->privat->normal_count = 0;	
+	view->privat->normal_count = 0;
 	view->privat->info_count = 0;
 	view->privat->warn_count = 0;
 	view->privat->error_count = 0;
-	
+
 	store = GTK_LIST_STORE (view->privat->model);
 	gtk_list_store_clear (store);
 }
@@ -1137,7 +1137,7 @@ imessage_view_select_previous (IAnjutaMessageView * message_view,
 							   GError ** e)
 {
 	MessageView *view = MESSAGE_VIEW(message_view);
-	message_view_previous(view);	
+	message_view_previous(view);
 }
 
 /* Return the currently selected messages or the first message if no
@@ -1155,7 +1155,7 @@ imessage_view_get_current_message (IAnjutaMessageView * message_view,
 	const Message *message;
 
 	g_return_val_if_fail (MESSAGE_IS_VIEW (message_view), NULL);
-	
+
 	view = MESSAGE_VIEW (message_view);
 	select = gtk_tree_view_get_selection (GTK_TREE_VIEW
 									      (view->privat->tree_view));
@@ -1203,12 +1203,12 @@ imessage_view_get_all_messages (IAnjutaMessageView * message_view,
 	GtkTreeIter iter;
 	Message *message;
 	GList *messages = NULL;
-	
+
 	g_return_val_if_fail (MESSAGE_IS_VIEW (message_view), NULL);
-	
+
 	view = MESSAGE_VIEW (message_view);
 	store = GTK_LIST_STORE (view->privat->model);
-	
+
 	if (gtk_tree_model_get_iter_first (GTK_TREE_MODEL (store), &iter))
 	{
 		do
@@ -1240,7 +1240,7 @@ message_view_tree_view_filter (GtkTreeModel *model, GtkTreeIter  *iter,
 {
 	Message *msg;
 	MessageView *msgview;
-	
+
 	msgview = MESSAGE_VIEW (data);
 	gtk_tree_model_get (msgview->privat->model, iter, COLUMN_MESSAGE, &msg, -1);
 
@@ -1268,7 +1268,7 @@ message_view_get_flags (MessageView* view)
 void message_view_set_flags (MessageView* view, MessageViewFlags flags)
 {
 	g_return_if_fail (view != NULL && MESSAGE_IS_VIEW (view));
-	                  
+
 	view->privat->flags = flags;
 	gtk_tree_model_filter_refilter (GTK_TREE_MODEL_FILTER(view->privat->filter));
 }
@@ -1276,7 +1276,7 @@ void message_view_set_flags (MessageView* view, MessageViewFlags flags)
 gint message_view_get_count (MessageView* view, MessageViewFlags flags)
 {
 	g_return_val_if_fail (view != NULL && MESSAGE_IS_VIEW (view), 0);
-	
+
 	switch (flags)
 	{
 		case MESSAGE_VIEW_SHOW_NORMAL:
@@ -1294,4 +1294,4 @@ gint message_view_get_count (MessageView* view, MessageViewFlags flags)
 
 ANJUTA_TYPE_BEGIN(MessageView, message_view, GTK_TYPE_HBOX);
 ANJUTA_TYPE_ADD_INTERFACE(imessage_view, IANJUTA_TYPE_MESSAGE_VIEW);
-ANJUTA_TYPE_END;
\ No newline at end of file
+ANJUTA_TYPE_END;
diff --git a/plugins/message-view/org.gnome.anjuta.message-manager.gschema.xml.in b/plugins/message-view/org.gnome.anjuta.plugins.message-manager.gschema.xml.in
similarity index 74%
rename from plugins/message-view/org.gnome.anjuta.message-manager.gschema.xml.in
rename to plugins/message-view/org.gnome.anjuta.plugins.message-manager.gschema.xml.in
index 578cd41..1cde383 100644
--- a/plugins/message-view/org.gnome.anjuta.message-manager.gschema.xml.in
+++ b/plugins/message-view/org.gnome.anjuta.plugins.message-manager.gschema.xml.in
@@ -1,6 +1,6 @@
 <schemalist>
-	<schema id="org.gnome.anjuta.message-manager" path="/org/gnome/anjuta/">
-		<key name="msgman-style-normal" type="s">
+	<schema id="org.gnome.anjuta.plugins.message-manager" path="/org/gnome/anjuta/plugins/message-manager/">
+		<key name="style-normal" type="s">
 			<choices>
 				<choice value="Underline-Plain" />
 				<choice value="Underline-Squiggle" />
@@ -10,7 +10,7 @@
 			</choices>
 			<default>"Underline-Plain"</default>
 		</key>
-		<key name="msgman-style-warning" type="s">
+		<key name="style-warning" type="s">
 			<choices>
 				<choice value="Underline-Plain" />
 				<choice value="Underline-Squiggle" />
@@ -20,7 +20,7 @@
 			</choices>
 			<default>"Underline-Plain"</default>
 		</key>
-                <key name="msgman-style-error" type="s">
+                <key name="style-error" type="s">
                         <choices>
                                 <choice value="Underline-Plain" />
                                 <choice value="Underline-Squiggle" />
@@ -30,11 +30,14 @@
                         </choices>
                         <default>"Underline-Plain"</default>
                 </key>
-		<key name="msgman-color-error" type="s">
+		<key name="color-error" type="s">
 			<default>"#FF0000"</default>
 		</key>
-		<key name="msgman-color-warning" type="s">
+		<key name="color-warning" type="s">
 			<default>"#00FF00"</default>
 		</key>
+		<key name="color-important" type="s">
+			<default>"#FFFF00"</default>
+		</key>
 	</schema>
 </schemalist>
diff --git a/plugins/message-view/plugin.c b/plugins/message-view/plugin.c
index be4d2a5..4efda7c 100644
--- a/plugins/message-view/plugin.c
+++ b/plugins/message-view/plugin.c
@@ -29,7 +29,7 @@
 
 #define UI_FILE PACKAGE_DATA_DIR"/ui/anjuta-message-manager.xml"
 #define PREFS_BUILDER PACKAGE_DATA_DIR"/glade/anjuta-message-manager-plugin.ui"
-#define PREFERENCES_SCHEMA "org.gnome.anjuta.message-manager"
+#define PREFERENCES_SCHEMA "org.gnome.anjuta.plugins.message-manager"
 
 /* Pixmaps */
 #define ANJUTA_PIXMAP_MESSAGES                "anjuta-messages-plugin-48.png"
@@ -112,7 +112,7 @@ static void on_view_changed(AnjutaMsgman* msgman, MessageViewPlugin* plugin)
 	g_object_set (G_OBJECT (action_copy), "sensitive", sensitive, NULL);
 
 	/* Toggle buttons */
-	gtk_widget_set_sensitive (plugin->normal, sensitive);	
+	gtk_widget_set_sensitive (plugin->normal, sensitive);
 	gtk_widget_set_sensitive (plugin->info, sensitive);
 	gtk_widget_set_sensitive (plugin->warn, sensitive);
 	gtk_widget_set_sensitive (plugin->error, sensitive);
@@ -131,7 +131,7 @@ static gpointer parent_class;
 
 static void
 register_stock_icons (AnjutaPlugin *plugin)
-{	
+{
 	static gboolean registered = FALSE;
 
 	if (registered)
@@ -154,16 +154,16 @@ activate_plugin (AnjutaPlugin *plugin)
 	GtkWidget *popup;
 	MessageViewPlugin *mv_plugin;
 	static gboolean initialized = FALSE;
-	
+
 	DEBUG_PRINT ("%s", "MessageViewPlugin: Activating MessageView plugin ...");
 	mv_plugin = ANJUTA_PLUGIN_MESSAGE_VIEW (plugin);
-	
+
 	if (!initialized)
 	{
 		register_stock_icons (plugin);
 	}
 	ui = anjuta_shell_get_ui (plugin->shell, NULL);
-	mv_plugin->action_group = 
+	mv_plugin->action_group =
 		anjuta_ui_add_action_group_entries (ui, "ActionGroupGotoMessages",
 											_("Next/Previous Message"),
 											actions_goto,
@@ -171,9 +171,9 @@ activate_plugin (AnjutaPlugin *plugin)
 											GETTEXT_PACKAGE, TRUE, plugin);
 	mv_plugin->uiid = anjuta_ui_merge (ui, UI_FILE);
 	popup = gtk_ui_manager_get_widget (GTK_UI_MANAGER (ui), "/PopupMessageView");
-	mv_plugin->msgman = 
+	mv_plugin->msgman =
 		anjuta_msgman_new(popup);
-	g_signal_connect(mv_plugin->msgman, "view-changed", 
+	g_signal_connect(mv_plugin->msgman, "view-changed",
 					 G_CALLBACK(on_view_changed), mv_plugin);
 	GtkAction* action_next = anjuta_ui_get_action (ui, "ActionGroupGotoMessages",
 								   "ActionMessageNext");
@@ -184,7 +184,7 @@ activate_plugin (AnjutaPlugin *plugin)
 	g_object_set (G_OBJECT (action_next), "sensitive", FALSE, NULL);
 	g_object_set (G_OBJECT (action_prev), "sensitive", FALSE, NULL);
 	g_object_set (G_OBJECT (action_copy), "sensitive", FALSE, NULL);
-	
+
 	initialized = TRUE;
 	mv_plugin->widget_shown = FALSE;
 	return TRUE;
@@ -195,9 +195,9 @@ deactivate_plugin (AnjutaPlugin *plugin)
 {
 	MessageViewPlugin *mplugin;
 	AnjutaUI *ui = anjuta_shell_get_ui (plugin->shell, NULL);
-	
+
 	DEBUG_PRINT ("%s", "MessageViewPlugin: Dectivating message view plugin ...");
-	
+
 	mplugin = ANJUTA_PLUGIN_MESSAGE_VIEW (plugin);
 
 	/* Widget is removed as soon as it is destroyed */
@@ -205,11 +205,11 @@ deactivate_plugin (AnjutaPlugin *plugin)
 		gtk_widget_destroy (mplugin->msgman);
 	anjuta_ui_unmerge (ui, mplugin->uiid);
 	anjuta_ui_remove_action_group (ui, mplugin->action_group);
-	
+
 	mplugin->action_group = NULL;
 	mplugin->msgman = NULL;
 	mplugin->uiid = 0;
-	
+
 	return TRUE;
 }
 
@@ -239,7 +239,7 @@ message_view_plugin_instance_init (GObject *obj)
 }
 
 static void
-message_view_plugin_class_init (GObjectClass *klass) 
+message_view_plugin_class_init (GObjectClass *klass)
 {
 	AnjutaPluginClass *plugin_class = ANJUTA_PLUGIN_CLASS (klass);
 
@@ -252,7 +252,7 @@ message_view_plugin_class_init (GObjectClass *klass)
 }
 
 static gboolean
-on_filter_button_tooltip (GtkWidget* widget, 
+on_filter_button_tooltip (GtkWidget* widget,
                           gint        x,
                           gint        y,
                           gboolean    keyboard_mode,
@@ -265,7 +265,7 @@ on_filter_button_tooltip (GtkWidget* widget,
 		return FALSE;
 	if (widget == plugin->normal)
 	{
-		temp = g_strdup_printf(ngettext ("%d Message", "%d Messages", 
+		temp = g_strdup_printf(ngettext ("%d Message", "%d Messages",
 		                                 message_view_get_count (view,
 		                                                         MESSAGE_VIEW_SHOW_NORMAL)),
 		                       message_view_get_count (view,
@@ -274,7 +274,7 @@ on_filter_button_tooltip (GtkWidget* widget,
 	}
 	else if (widget == plugin->info)
 	{
-		temp = g_strdup_printf(ngettext ("%d Info", "%d Infos", 
+		temp = g_strdup_printf(ngettext ("%d Info", "%d Infos",
 		                                 message_view_get_count (view,
 		                                                         MESSAGE_VIEW_SHOW_INFO)),
 		                       message_view_get_count (view,
@@ -283,7 +283,7 @@ on_filter_button_tooltip (GtkWidget* widget,
 	}
 	else if (widget == plugin->warn)
 	{
-		temp = g_strdup_printf(ngettext ("%d Warning", "%d Warnings", 
+		temp = g_strdup_printf(ngettext ("%d Warning", "%d Warnings",
 		                                 message_view_get_count (view,
 		                                                         MESSAGE_VIEW_SHOW_WARNING)),
 		                       message_view_get_count (view,
@@ -292,7 +292,7 @@ on_filter_button_tooltip (GtkWidget* widget,
 	}
 	else if (widget == plugin->error)
 	{
-		temp = g_strdup_printf(ngettext ("%d Error", "%d Errors", 
+		temp = g_strdup_printf(ngettext ("%d Error", "%d Errors",
 		                                 message_view_get_count (view,
 		                                                         MESSAGE_VIEW_SHOW_ERROR)),
 		                       message_view_get_count (view,
@@ -330,7 +330,7 @@ create_mini_button (MessageViewPlugin* plugin, const gchar* stock_id)
 {
 	GtkWidget* button, *image;
 	gint h,w;
-	image = gtk_image_new_from_stock (stock_id, 
+	image = gtk_image_new_from_stock (stock_id,
 	                                  GTK_ICON_SIZE_MENU);
 	gtk_icon_size_lookup (GTK_ICON_SIZE_MENU, &w, &h);
 	button = gtk_toggle_button_new ();
@@ -339,9 +339,9 @@ create_mini_button (MessageViewPlugin* plugin, const gchar* stock_id)
 	gtk_container_add (GTK_CONTAINER (button), image);
 
 	g_object_set (button, "has-tooltip", TRUE, NULL);
-	g_signal_connect (button, "query-tooltip", 
+	g_signal_connect (button, "query-tooltip",
 	                  G_CALLBACK (on_filter_button_tooltip), plugin);
-	
+
 	return button;
 }
 
@@ -350,12 +350,12 @@ create_toggle_buttons (MessageViewPlugin* plugin,
                        GtkWidget* hbox)
 {
 	GtkWidget* filter_buttons_box = gtk_hbox_new (FALSE, 0);
-	
+
 	plugin->normal = create_mini_button (plugin, "message-manager-plugin-icon");
 	plugin->info = create_mini_button (plugin, GTK_STOCK_INFO);
 	plugin->warn = create_mini_button (plugin, GTK_STOCK_DIALOG_WARNING);
 	plugin->error = create_mini_button (plugin, GTK_STOCK_DIALOG_ERROR);
-	
+
 	gtk_box_pack_start (GTK_BOX (filter_buttons_box), GTK_WIDGET (plugin->normal),
 						FALSE, FALSE, 0);
 	gtk_box_pack_start (GTK_BOX (filter_buttons_box), GTK_WIDGET (plugin->info),
@@ -364,13 +364,13 @@ create_toggle_buttons (MessageViewPlugin* plugin,
 						FALSE, FALSE, 0);
 	gtk_box_pack_start (GTK_BOX (filter_buttons_box), GTK_WIDGET (plugin->error),
 	                    FALSE, FALSE, 0);
-	
+
 	gtk_widget_show_all (filter_buttons_box);
 	gtk_box_pack_start (GTK_BOX(hbox), filter_buttons_box, FALSE, FALSE, 0);
 }
 
 /*
- * IAnjutaMessagerManager interface implementation 
+ * IAnjutaMessagerManager interface implementation
  */
 static IAnjutaMessageView*
 ianjuta_msgman_add_view (IAnjutaMessageManager *plugin,
@@ -390,11 +390,11 @@ ianjuta_msgman_add_view (IAnjutaMessageManager *plugin,
 		gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
 		gtk_box_pack_start (GTK_BOX(hbox), anjuta_msgman_get_tabber (ANJUTA_MSGMAN(msgman)),
 		                    TRUE, TRUE, 5);
-	
+
 		gtk_widget_show_all (hbox);
 
 		create_toggle_buttons (ANJUTA_PLUGIN_MESSAGE_VIEW(plugin), hbox);
-		
+
 		anjuta_shell_add_widget_custom (shell, msgman,
 							 "AnjutaMessageView", _("Messages"),
 							 "message-manager-plugin-icon", hbox,
@@ -451,7 +451,7 @@ ianjuta_msgman_set_current_view (IAnjutaMessageManager *plugin,
 	GtkWidget *msgman = ANJUTA_PLUGIN_MESSAGE_VIEW (plugin)->msgman;
 	anjuta_msgman_set_current_view (ANJUTA_MSGMAN (msgman),
 					       MESSAGE_VIEW (message_view));
-	
+
 	/* Ensure the message-view is visible! */
 	g_object_get(G_OBJECT(plugin), "shell", &shell, NULL);
 }
@@ -517,9 +517,9 @@ ipreferences_merge(IAnjutaPreferences* ipref, AnjutaPreferences* prefs, GError**
 	anjuta_preferences_add_from_builder (prefs, bxml, plugin->settings,
 									"Messages", _("Messages"),
 									 ANJUTA_PIXMAP_MESSAGES);
-	
+
 	g_signal_connect (plugin->settings, "changed::messages-tab-position",
-	                  G_CALLBACK (on_notify_message_pref), plugin->msgman);		
+	                  G_CALLBACK (on_notify_message_pref), plugin->msgman);
 	g_object_unref (bxml);
 }
 
@@ -533,7 +533,7 @@ static void
 ipreferences_iface_init(IAnjutaPreferencesIface* iface)
 {
 	iface->merge = ipreferences_merge;
-	iface->unmerge = ipreferences_unmerge;	
+	iface->unmerge = ipreferences_unmerge;
 }
 
 ANJUTA_PLUGIN_BEGIN (MessageViewPlugin, message_view_plugin);
diff --git a/plugins/sourceview/sourceview-prefs.c b/plugins/sourceview/sourceview-prefs.c
index b456720..fa6aacb 100644
--- a/plugins/sourceview/sourceview-prefs.c
+++ b/plugins/sourceview/sourceview-prefs.c
@@ -26,7 +26,7 @@
 	g_signal_connect (settings, "changed::" key, G_CALLBACK(func), sv);
 
 #define PREF_SCHEMA "org.gnome.anjuta.plugins.sourceview"
-#define MSGMAN_PREF_SCHEMA "org.gnome.anjuta.message-manager"
+#define MSGMAN_PREF_SCHEMA "org.gnome.anjuta.plugins.message-manager"
 
 
 /* Editor preferences */
@@ -41,8 +41,9 @@
 #define VIEW_RIGHTMARGIN           "rightmargin-visible"
 #define RIGHTMARGIN_POSITION       "rightmargin-position"
 
-#define MSGMAN_COLOR_ERROR		  "msgman-color-error"
-#define MSGMAN_COLOR_WARNING		  "msgman-color-warning"
+#define MSGMAN_COLOR_ERROR		  "color-error"
+#define MSGMAN_COLOR_WARNING		  "color-warning"
+#define MSGMAN_COLOR_IMPORTANT		  "color-important"
 
 
 #define FONT_THEME "font-use-theme"
@@ -207,13 +208,18 @@ on_notify_indic_colors (GSettings* settings,
 	char* warning_color =
 		 g_settings_get_string (settings,
 		                        MSGMAN_COLOR_WARNING);
+	char* important_color =
+		 g_settings_get_string (settings,
+		                        MSGMAN_COLOR_IMPORTANT);
 	Sourceview* sv = ANJUTA_SOURCEVIEW (user_data);
 
 	g_object_set (sv->priv->warning_indic, "foreground", warning_color, NULL);
 	g_object_set (sv->priv->critical_indic, "foreground", error_color, NULL);
+	g_object_set (sv->priv->important_indic, "background", important_color, NULL);
 
 	g_free (error_color);
 	g_free (warning_color);
+	g_free (important_color);
 }
 
 static void
@@ -324,6 +330,8 @@ sourceview_prefs_init(Sourceview* sv)
 	                  G_CALLBACK (on_notify_indic_colors), sv);
 	g_signal_connect (sv->priv->msgman_settings, "changed::" MSGMAN_COLOR_WARNING,
 	                  G_CALLBACK (on_notify_indic_colors), sv);
+	g_signal_connect (sv->priv->msgman_settings, "changed::" MSGMAN_COLOR_IMPORTANT,
+	                  G_CALLBACK (on_notify_indic_colors), sv);
 }
 
 void sourceview_prefs_destroy(Sourceview* sv)
diff --git a/plugins/sourceview/sourceview.c b/plugins/sourceview/sourceview.c
index bd34320..2e2a57e 100644
--- a/plugins/sourceview/sourceview.c
+++ b/plugins/sourceview/sourceview.c
@@ -192,8 +192,9 @@ static void sourceview_create_markers(Sourceview* sv)
 	                                   IANJUTA_MARKABLE_MESSAGE);
 }
 
-#define PREF_COLOR_ERROR "msgman-color-error"
-#define PREF_COLOR_WARNING "msgman-color-warning"
+#define PREF_COLOR_ERROR "color-error"
+#define PREF_COLOR_WARNING "color-warning"
+#define PREF_COLOR_IMPORTANT "color-important"
 
 
 /* Create tags for highlighting */
@@ -205,10 +206,13 @@ static void sourceview_create_highlight_indic(Sourceview* sv)
 	char* warning_color =
 		g_settings_get_string (sv->priv->msgman_settings,
 		                       PREF_COLOR_WARNING);
+	char* important_color =
+		g_settings_get_string (sv->priv->msgman_settings,
+		                       PREF_COLOR_IMPORTANT);
 	sv->priv->important_indic =
 		gtk_text_buffer_create_tag (GTK_TEXT_BUFFER(sv->priv->document),
 									IMPORTANT_INDIC,
-									"background", "#FFFF00", NULL);
+									"background", important_color, NULL);
 	sv->priv->warning_indic =
 		gtk_text_buffer_create_tag (GTK_TEXT_BUFFER(sv->priv->document),
 									WARNING_INDIC,
@@ -222,6 +226,7 @@ static void sourceview_create_highlight_indic(Sourceview* sv)
 									PANGO_UNDERLINE_ERROR, NULL);
 	g_free (error_color);
 	g_free (warning_color);
+	g_free (important_color);
 }
 
 static void



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