[anjuta] sourceview: Adapted to GtkSourceview API changes



commit bbfbed58b23c51a2db9abbeb0b93cfd42c7b8eb5
Author: Johannes Schmid <jhs gnome org>
Date:   Tue Nov 30 10:07:32 2010 +0100

    sourceview: Adapted to GtkSourceview API changes

 .gitignore                       |   51 ++++++++++++++-----------------------
 configure.ac                     |    2 +-
 plugins/sourceview/anjuta-view.c |    2 +-
 plugins/sourceview/sourceview.c  |   12 +++-----
 4 files changed, 26 insertions(+), 41 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index cf38454..a92530c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,8 +1,26 @@
+/*.bak
+/*.lo
+/*.o
+/*.orig
+/*.rej
+/*.tab.c
 /*~
+/.*.swp
+/.deps
+/.gitignore
+/.libs
+/GPATH
+/GRTAGS
+/GSYMS
+/GTAGS
+/ID
+/Makefile
+/Makefile.in
+/TAGS
+/_libs
 /anjuta.desktop
 /anjuta.desktop.in
 /autom4te.cache
-/*.bak
 /config.cache
 /config.h
 /config.log
@@ -11,52 +29,21 @@
 /config.status.lineno
 /configure
 /configure.lineno
-/.deps
-/.gitignore
-/GPATH
-/GRTAGS
-/GSYMS
-/GTAGS
-/ID
 /intltool-extract
 /intltool-extract.in
 /intltool-merge
 /intltool-merge.in
 /intltool-update
 /intltool-update.in
-/_libs
-/.libs
 /libtool
 /po/*.gmo
 /po/*.mo
 /po/.intltool-merge-cache
-/po/it.gmo
-/po/ja.gmo
-/po/kn.gmo
-/po/ko.gmo
-/po/lt.gmo
-/po/lv.gmo
-/po/mai.gmo
 /po/Makefile
 /po/Makefile.in
 /po/Makefile.in.in
-/po/mk.gmo
-/po/ml.gmo
-/po/*.mo
-/po/mr.gmo
-/po/ms.gmo
-/po/nb.gmo
-/po/ne.gmo
-/po/nl.gmo
-/po/oc.gmo
-/po/or.gmo
-/po/pa.gmo
-/po/pl.gmo
 /po/POTFILES
 /po/stamp-it
 /so_locations
 /stamp-h1
-/.*.swp
-/*.tab.c
 /tags
-/TAGS
diff --git a/configure.ac b/configure.ac
index e48b72c..11c9f06 100644
--- a/configure.ac
+++ b/configure.ac
@@ -44,7 +44,7 @@ LIBWNCK_REQUIRED=2.12
 UNIQUE_REQUIRED=2.90.1
 
 dnl GtkSourceView
-GTKSOURCEVIEW_REQUIRED=2.9.7
+GTKSOURCEVIEW_REQUIRED=2.91.1
 
 dnl Devhelp
 LIBDEVHELP_REQUIRED=2.90.6
diff --git a/plugins/sourceview/anjuta-view.c b/plugins/sourceview/anjuta-view.c
index 1db75df..954b069 100644
--- a/plugins/sourceview/anjuta-view.c
+++ b/plugins/sourceview/anjuta-view.c
@@ -219,7 +219,7 @@ anjuta_view_drag_data_received (GtkWidget        *widget,
 	/* If this is an URL emit DROP_URIS, otherwise chain up the signal */
 	if (info == TARGET_URI_LIST)
 	{
-		files = anjuta_util_drop_get_files (selection_data);
+		files = anjuta_utils_drop_get_files (selection_data);
 
 		if (files != NULL)
 		{
diff --git a/plugins/sourceview/sourceview.c b/plugins/sourceview/sourceview.c
index 509d5f9..a0cd624 100644
--- a/plugins/sourceview/sourceview.c
+++ b/plugins/sourceview/sourceview.c
@@ -136,7 +136,7 @@ anjuta_message_area_new (const gchar    *text,
 }
 
 static gchar*
-on_marker_tooltip (GtkSourceMark* mark, gpointer data)
+on_marker_tooltip (GtkSourceMarkCategory* cat, GtkSourceMark* mark, gpointer data)
 {
 	//Sourceview* sv = ANJUTA_SOURCEVIEW (data);
 	gchar* tooltip;
@@ -155,12 +155,10 @@ sourceview_create_marker_category (Sourceview* sv, const gchar* marker_pixbuf,
 	GtkSourceView* view = 	GTK_SOURCE_VIEW(sv->priv->view);
 	if ((pixbuf = gdk_pixbuf_new_from_file (marker_pixbuf, NULL)))
 	{
-		gtk_source_view_set_mark_category_icon_from_pixbuf (view, 
-		    marker_types[marker_type], pixbuf);
-		gtk_source_view_set_mark_category_priority (view, marker_types[marker_type],
-		                                            marker_type);
-		gtk_source_view_set_mark_category_tooltip_func (view, marker_types[marker_type],
-		                                                on_marker_tooltip, sv, NULL);
+		GtkSourceMarkCategory* cat = gtk_source_view_get_mark_category (view, marker_types[marker_type]);
+		gtk_source_mark_category_set_pixbuf (cat, pixbuf);
+		gtk_source_mark_category_set_priority (cat, marker_type);
+		g_signal_connect (cat, "query-tooltip-text", G_CALLBACK (on_marker_tooltip), sv);
 		g_object_unref (pixbuf);
 	}
 }



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