anjuta r4134 - in trunk: . plugins/sourceview
- From: jhs svn gnome org
- To: svn-commits-list gnome org
- Subject: anjuta r4134 - in trunk: . plugins/sourceview
- Date: Fri, 15 Aug 2008 08:38:55 +0000 (UTC)
Author: jhs
Date: Fri Aug 15 08:38:55 2008
New Revision: 4134
URL: http://svn.gnome.org/viewvc/anjuta?rev=4134&view=rev
Log:
2008-08-15 Johannes Schmid <jhs gnome org>
* configure.in: Bump gtksourceview requirement to 2.3.1
* plugins/sourceview/anjuta-editor-sourceview.glade:
* plugins/sourceview/sourceview-prefs.c
(on_gconf_notify_visible_spaces), (sourceview_prefs_init):
Add a preference for the new visible whitespace feature of gtksourceview
Modified:
trunk/ChangeLog
trunk/configure.in
trunk/plugins/sourceview/anjuta-editor-sourceview.glade
trunk/plugins/sourceview/sourceview-prefs.c
Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in (original)
+++ trunk/configure.in Fri Aug 15 08:38:55 2008
@@ -46,7 +46,7 @@
LIBGRAPHVIZ_REQUIRED=1.0
NEON_REQUIRED=0.24.5
SUBVERSION_REQUIRED=1.0.2
-GTKSOURCEVIEW_REQUIRED=2.1.2
+GTKSOURCEVIEW_REQUIRED=2.3.1
GTKSOURCEVIEW_GNOME_REQUIRED=2.14
GTKSOURCEVIEW_GTK_REQUIRED=2.10
BINUTILS_REQUIRED=2.15.92
Modified: trunk/plugins/sourceview/anjuta-editor-sourceview.glade
==============================================================================
--- trunk/plugins/sourceview/anjuta-editor-sourceview.glade (original)
+++ trunk/plugins/sourceview/anjuta-editor-sourceview.glade Fri Aug 15 08:38:55 2008
@@ -284,9 +284,6 @@
<placeholder/>
</child>
<child>
- <placeholder/>
- </child>
- <child>
<widget class="GtkLabel" id="label122">
<property name="visible">True</property>
<property name="xalign">0</property>
@@ -359,6 +356,20 @@
<property name="bottom_attach">3</property>
</packing>
</child>
+ <child>
+ <widget class="GtkCheckButton" id="preferences_toggle:bool:0:0:sourceview.spaces.visible">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Visible whitespaces</property>
+ <property name="use_underline">True</property>
+ <property name="response_id">0</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ </packing>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
Modified: trunk/plugins/sourceview/sourceview-prefs.c
==============================================================================
--- trunk/plugins/sourceview/sourceview-prefs.c (original)
+++ trunk/plugins/sourceview/sourceview-prefs.c Fri Aug 15 08:38:55 2008
@@ -40,6 +40,8 @@
#define VIEW_RIGHTMARGIN "sourceview.rightmargin.visible"
#define RIGHTMARGIN_POSITION "sourceview.rightmargin.position"
+#define VISIBLE_SPACES "sourceview.spaces.visible"
+
#define FONT_THEME "sourceview.font.use_theme"
#define FONT "sourceview.font"
#define DESKTOP_FIXED_FONT "/desktop/gnome/interface/monospace_font_name"
@@ -64,6 +66,18 @@
}
static void
+on_gconf_notify_visible_spaces (GConfClient *gclient, guint cnxn_id,
+ GConfEntry *entry, gpointer user_data)
+{
+ Sourceview *sv;
+ gboolean visible = get_bool(entry);
+ sv = ANJUTA_SOURCEVIEW(user_data);
+
+ gtk_source_view_set_draw_spaces (GTK_SOURCE_VIEW(sv->priv->view),
+ visible ? GTK_SOURCE_DRAW_SPACES_ALL : 0);
+}
+
+static void
on_gconf_notify_disable_hilite (GConfClient *gclient, guint cnxn_id,
GConfEntry *entry, gpointer user_data)
{
@@ -290,7 +304,9 @@
gtk_source_view_set_right_margin_position(GTK_SOURCE_VIEW(sv->priv->view),
get_key(sv, RIGHTMARGIN_POSITION));
-
+ gtk_source_view_set_draw_spaces (GTK_SOURCE_VIEW (sv->priv->view),
+ get_key (sv, VISIBLE_SPACES));
+
init_fonts(sv);
/* Register gconf notifications */
@@ -306,7 +322,7 @@
REGISTER_NOTIFY (RIGHTMARGIN_POSITION, on_gconf_notify_right_margin_position);
REGISTER_NOTIFY (FONT_THEME, on_gconf_notify_font_theme);
REGISTER_NOTIFY (FONT, on_gconf_notify_font);
-
+ REGISTER_NOTIFY (VISIBLE_SPACES, on_gconf_notify_visible_spaces);
}
void sourceview_prefs_destroy(Sourceview* sv)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]