anjuta r4214 - in trunk: . plugins/document-manager plugins/sourceview
- From: jhs svn gnome org
- To: svn-commits-list gnome org
- Subject: anjuta r4214 - in trunk: . plugins/document-manager plugins/sourceview
- Date: Tue, 2 Sep 2008 13:55:57 +0000 (UTC)
Author: jhs
Date: Tue Sep 2 13:55:57 2008
New Revision: 4214
URL: http://svn.gnome.org/viewvc/anjuta?rev=4214&view=rev
Log:
2008-09-02 Johannes Schmid <jhs gnome org>
* plugins/document-manager/plugin.c
(update_document_ui_interface_items):
Do not show \"Indentation Guides\" menuitem for sourceview
* plugins/sourceview/anjuta-editor-sourceview.glade:
* plugins/sourceview/sourceview-prefs.c
(on_gconf_notify_view_spaces), (on_gconf_notify_view_eols),
(on_gconf_notify_line_wrap), (sourceview_prefs_init):
Use the View->Editor->* menu items for view spaces, view eol and
line wrap (new) option instead of the preferences.
Modified:
trunk/ChangeLog
trunk/plugins/document-manager/plugin.c
trunk/plugins/sourceview/anjuta-editor-sourceview.glade
trunk/plugins/sourceview/sourceview-prefs.c
Modified: trunk/plugins/document-manager/plugin.c
==============================================================================
--- trunk/plugins/document-manager/plugin.c (original)
+++ trunk/plugins/document-manager/plugin.c Tue Sep 2 13:55:57 2008
@@ -785,6 +785,13 @@
action = anjuta_ui_get_action (ui, "ActionGroupEditorEdit",
"ActionViewEditorRemoveView");
g_object_set (G_OBJECT (action), "visible", flag, "sensitive", flag, NULL);
+
+ /* Actually this does not really belong here but it would be annoying to
+ * add another interface for it
+ */
+ action = anjuta_ui_get_action (ui, "ActionGroupEditorView",
+ "ActionViewEditorGuides");
+ g_object_set (G_OBJECT (action), "visible", flag, "sensitive", flag, NULL);
/* IAnjutaEditorFolds */
flag = IANJUTA_IS_EDITOR_FOLDS (doc);
Modified: trunk/plugins/sourceview/anjuta-editor-sourceview.glade
==============================================================================
--- trunk/plugins/sourceview/anjuta-editor-sourceview.glade (original)
+++ trunk/plugins/sourceview/anjuta-editor-sourceview.glade Tue Sep 2 13:55:57 2008
@@ -13,6 +13,151 @@
<property name="n_rows">2</property>
<property name="n_columns">2</property>
<child>
+ <widget class="GtkFrame" id="page2">
+ <property name="visible">True</property>
+ <property name="border_width">5</property>
+ <property name="label_xalign">0</property>
+ <property name="label_yalign">0</property>
+ <property name="shadow_type">GTK_SHADOW_NONE</property>
+ <child>
+ <widget class="GtkVBox" id="vbox1111">
+ <property name="visible">True</property>
+ <child>
+ <widget class="GtkTable" id="table15">
+ <property name="visible">True</property>
+ <property name="border_width">10</property>
+ <property name="n_rows">5</property>
+ <property name="n_columns">4</property>
+ <property name="column_spacing">5</property>
+ <property name="row_spacing">5</property>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <widget class="GtkCheckButton" id="preferences_toggle:bool:1:0:use.tabs">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Use tabs for indentation</property>
+ <property name="use_underline">True</property>
+ <property name="response_id">0</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="right_attach">3</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkSpinButton" id="preferences_spin:int:4:1:indent.size">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="adjustment">4 1 100 1 10 10</property>
+ <property name="climb_rate">1</property>
+ <property name="numeric">True</property>
+ </widget>
+ <packing>
+ <property name="left_attach">3</property>
+ <property name="right_attach">4</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options"></property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkSpinButton" id="preferences_spin:int:4:1:tabsize">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="adjustment">4 1 100 1 10 10</property>
+ <property name="climb_rate">1</property>
+ <property name="numeric">True</property>
+ </widget>
+ <packing>
+ <property name="left_attach">3</property>
+ <property name="right_attach">4</property>
+ <property name="x_options"></property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label123">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="label" translatable="yes">Indentation size in spaces:</property>
+ </widget>
+ <packing>
+ <property name="right_attach">3</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="y_options">GTK_EXPAND</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label122">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="label" translatable="yes">Tab size in spaces:</property>
+ </widget>
+ <packing>
+ <property name="right_attach">3</property>
+ <property name="y_options">GTK_EXPAND</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label12321">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="label" translatable="yes"><b>Indentation and auto-format options</b></property>
+ <property name="use_markup">True</property>
+ </widget>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ </packing>
+ </child>
+ <child>
<widget class="GtkHBox" id="page1">
<property name="visible">True</property>
<property name="border_width">5</property>
@@ -182,27 +327,27 @@
<placeholder/>
</child>
<child>
- <widget class="GtkSpinButton" id="preferences_spin:int:80:0:sourceview.rightmargin.position">
+ <widget class="GtkLabel" id="label19">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="adjustment">80 0 200 1 10 10</property>
- <property name="climb_rate">1</property>
- <property name="numeric">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Right margin position in characters</property>
</widget>
<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>
<child>
- <widget class="GtkLabel" id="label19">
+ <widget class="GtkSpinButton" id="preferences_spin:int:80:0:sourceview.rightmargin.position">
<property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Right margin position in characters</property>
+ <property name="can_focus">True</property>
+ <property name="adjustment">80 0 200 1 10 10</property>
+ <property name="climb_rate">1</property>
+ <property name="numeric">True</property>
</widget>
<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>
@@ -241,149 +386,82 @@
<property name="right_attach">2</property>
</packing>
</child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label12350">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="label" translatable="yes">Editor</property>
+ </widget>
+ <packing>
+ <property name="tab_fill">False</property>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkTable" id="table18">
+ <property name="visible">True</property>
+ <property name="n_rows">3</property>
+ <property name="n_columns">2</property>
<child>
- <widget class="GtkFrame" id="page2">
+ <widget class="GtkFrame" id="frame49">
<property name="visible">True</property>
- <property name="border_width">5</property>
<property name="label_xalign">0</property>
<property name="label_yalign">0</property>
<property name="shadow_type">GTK_SHADOW_NONE</property>
<child>
- <widget class="GtkVBox" id="vbox1111">
+ <widget class="GtkAlignment" id="alignment2">
<property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="left_padding">12</property>
<child>
- <widget class="GtkTable" id="table15">
+ <widget class="GtkTable" id="table20">
<property name="visible">True</property>
- <property name="border_width">10</property>
- <property name="n_rows">5</property>
- <property name="n_columns">4</property>
+ <property name="n_rows">2</property>
+ <property name="n_columns">2</property>
<property name="column_spacing">5</property>
<property name="row_spacing">5</property>
<child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <widget class="GtkLabel" id="label122">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- <property name="label" translatable="yes">Tab size in spaces:</property>
- </widget>
- <packing>
- <property name="right_attach">3</property>
- <property name="y_options">GTK_EXPAND</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="label123">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- <property name="label" translatable="yes">Indentation size in spaces:</property>
- </widget>
- <packing>
- <property name="right_attach">3</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options">GTK_EXPAND</property>
- </packing>
- </child>
- <child>
- <widget class="GtkSpinButton" id="preferences_spin:int:4:1:tabsize">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="adjustment">4 1 100 1 10 10</property>
- <property name="climb_rate">1</property>
- <property name="numeric">True</property>
- </widget>
- <packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
- <property name="x_options"></property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <widget class="GtkSpinButton" id="preferences_spin:int:4:1:indent.size">
+ <widget class="GtkFontButton" id="preferences_font:font:Monospace 12:0:sourceview.font">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="adjustment">4 1 100 1 10 10</property>
- <property name="climb_rate">1</property>
- <property name="numeric">True</property>
+ <property name="response_id">0</property>
</widget>
<packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
+ <property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
- <property name="x_options"></property>
<property name="y_options"></property>
</packing>
</child>
<child>
- <widget class="GtkCheckButton" id="preferences_toggle:bool:1:0:use.tabs">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Use tabs for indentation</property>
- <property name="use_underline">True</property>
- <property name="response_id">0</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="right_attach">3</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- </packing>
- </child>
- <child>
- <widget class="GtkCheckButton" id="preferences_toggle:bool:0:0:sourceview.spaces.visible">
+ <widget class="GtkCheckButton" id="preferences_toggle:bool:1:0:sourceview.font.use_theme">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="label" translatable="yes">Visible whitespaces</property>
+ <property name="label" translatable="yes">Use theme font</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>
+ <property name="right_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
</packing>
</child>
</widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
</child>
</widget>
</child>
<child>
- <widget class="GtkLabel" id="label12321">
+ <widget class="GtkLabel" id="label">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
- <property name="label" translatable="yes"><b>Indentation and auto-format options</b></property>
+ <property name="label" translatable="yes"><b>Font:</b></property>
<property name="use_markup">True</property>
</widget>
<packing>
@@ -393,29 +471,10 @@
</widget>
<packing>
<property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
+ <property name="x_padding">5</property>
+ <property name="y_padding">5</property>
</packing>
</child>
- </widget>
- </child>
- <child>
- <widget class="GtkLabel" id="label12350">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- <property name="label" translatable="yes">Editor</property>
- </widget>
- <packing>
- <property name="tab_fill">False</property>
- <property name="type">tab</property>
- </packing>
- </child>
- <child>
- <widget class="GtkTable" id="table18">
- <property name="visible">True</property>
- <property name="n_rows">3</property>
- <property name="n_columns">2</property>
<child>
<widget class="GtkFrame" id="frame48">
<property name="visible">True</property>
@@ -466,76 +525,6 @@
<property name="y_padding">5</property>
</packing>
</child>
- <child>
- <widget class="GtkFrame" id="frame49">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0</property>
- <property name="shadow_type">GTK_SHADOW_NONE</property>
- <child>
- <widget class="GtkAlignment" id="alignment2">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- <property name="left_padding">12</property>
- <child>
- <widget class="GtkTable" id="table20">
- <property name="visible">True</property>
- <property name="n_rows">2</property>
- <property name="n_columns">2</property>
- <property name="column_spacing">5</property>
- <property name="row_spacing">5</property>
- <child>
- <widget class="GtkCheckButton" id="preferences_toggle:bool:1:0:sourceview.font.use_theme">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Use theme font</property>
- <property name="use_underline">True</property>
- <property name="response_id">0</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="right_attach">2</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <widget class="GtkFontButton" id="preferences_font:font:Monospace 12:0:sourceview.font">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="response_id">0</property>
- </widget>
- <packing>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"></property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- <child>
- <widget class="GtkLabel" id="label">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- <property name="label" translatable="yes"><b>Font:</b></property>
- <property name="use_markup">True</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="right_attach">2</property>
- <property name="x_padding">5</property>
- <property name="y_padding">5</property>
- </packing>
- </child>
</widget>
<packing>
<property name="position">1</property>
@@ -573,33 +562,31 @@
<placeholder/>
</child>
<child>
- <widget class="GtkCheckButton" id="preferences_toggle:bool:1:0:print.linewrap">
+ <widget class="GtkCheckButton" id="preferences_toggle:bool:1:0:print.header">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="label" translatable="yes">Wrap long lines to fit on paper</property>
+ <property name="label" translatable="yes">Print page header</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">4</property>
- <property name="bottom_attach">5</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
- <widget class="GtkCheckButton" id="preferences_toggle:bool:1:0:print.highlight">
+ <widget class="GtkCheckButton" id="preferences_toggle:bool:1:0:print.footer">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="label" translatable="yes">Highlight syntax</property>
+ <property name="label" translatable="yes">Print page footer</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>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
@@ -621,31 +608,33 @@
</packing>
</child>
<child>
- <widget class="GtkCheckButton" id="preferences_toggle:bool:1:0:print.footer">
+ <widget class="GtkCheckButton" id="preferences_toggle:bool:1:0:print.highlight">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="label" translatable="yes">Print page footer</property>
+ <property name="label" translatable="yes">Highlight syntax</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>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
- <widget class="GtkCheckButton" id="preferences_toggle:bool:1:0:print.header">
+ <widget class="GtkCheckButton" id="preferences_toggle:bool:1:0:print.linewrap">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="label" translatable="yes">Print page header</property>
+ <property name="label" translatable="yes">Wrap long lines to fit on paper</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">1</property>
- <property name="bottom_attach">2</property>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
Modified: trunk/plugins/sourceview/sourceview-prefs.c
==============================================================================
--- trunk/plugins/sourceview/sourceview-prefs.c (original)
+++ trunk/plugins/sourceview/sourceview-prefs.c Tue Sep 2 13:55:57 2008
@@ -38,9 +38,12 @@
#define VIEW_LINENUMBERS "margin.linenumber.visible"
#define VIEW_MARKS "margin.marker.visible"
#define VIEW_RIGHTMARGIN "sourceview.rightmargin.visible"
+#define VIEW_WHITE_SPACES "view.whitespace"
+#define VIEW_EOL "view.eol"
+#define VIEW_LINE_WRAP "view.line.wrap"
#define RIGHTMARGIN_POSITION "sourceview.rightmargin.position"
-#define VISIBLE_SPACES "sourceview.spaces.visible"
+
#define FONT_THEME "sourceview.font.use_theme"
#define FONT "sourceview.font"
@@ -66,15 +69,53 @@
}
static void
-on_gconf_notify_visible_spaces (GConfClient *gclient, guint cnxn_id,
- GConfEntry *entry, gpointer user_data)
+on_gconf_notify_view_spaces (GConfClient *gclient, guint cnxn_id,
+ GConfEntry *entry, gpointer user_data)
{
Sourceview *sv;
gboolean visible = get_bool(entry);
sv = ANJUTA_SOURCEVIEW(user_data);
+ GtkSourceDrawSpacesFlags flags =
+ gtk_source_view_get_draw_spaces (GTK_SOURCE_VIEW (sv->priv->view));
+ if (visible)
+ flags |= (GTK_SOURCE_DRAW_SPACES_SPACE | GTK_SOURCE_DRAW_SPACES_TAB);
+ else
+ flags &= ~(GTK_SOURCE_DRAW_SPACES_SPACE | GTK_SOURCE_DRAW_SPACES_TAB);
+
gtk_source_view_set_draw_spaces (GTK_SOURCE_VIEW(sv->priv->view),
- visible ? GTK_SOURCE_DRAW_SPACES_ALL : 0);
+ flags);
+}
+
+static void
+on_gconf_notify_view_eols (GConfClient *gclient, guint cnxn_id,
+ GConfEntry *entry, gpointer user_data)
+{
+ Sourceview *sv;
+ gboolean visible = get_bool(entry);
+ sv = ANJUTA_SOURCEVIEW(user_data);
+ GtkSourceDrawSpacesFlags flags =
+ gtk_source_view_get_draw_spaces (GTK_SOURCE_VIEW (sv->priv->view));
+
+ if (visible)
+ flags |= GTK_SOURCE_DRAW_SPACES_NEWLINE;
+ else
+ flags &= ~GTK_SOURCE_DRAW_SPACES_NEWLINE;
+
+ gtk_source_view_set_draw_spaces (GTK_SOURCE_VIEW(sv->priv->view),
+ flags);
+}
+
+static void
+on_gconf_notify_line_wrap (GConfClient *gclient, guint cnxn_id,
+ GConfEntry *entry, gpointer user_data)
+{
+ Sourceview *sv;
+ gboolean line_wrap = get_bool(entry);
+ sv = ANJUTA_SOURCEVIEW(user_data);
+
+ gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (sv->priv->view),
+ line_wrap ? GTK_WRAP_WORD : GTK_WRAP_NONE);
}
static void
@@ -282,6 +323,7 @@
sourceview_prefs_init(Sourceview* sv)
{
guint notify_id;
+ GtkSourceDrawSpacesFlags flags = 0;
prefs = sv->priv->prefs;
@@ -303,10 +345,18 @@
get_key(sv, VIEW_RIGHTMARGIN));
gtk_source_view_set_right_margin_position(GTK_SOURCE_VIEW(sv->priv->view),
get_key(sv, RIGHTMARGIN_POSITION));
+ gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (sv->priv->view),
+ get_key (sv, VIEW_EOL) ? GTK_WRAP_WORD : GTK_WRAP_NONE);
+
+
+ if (get_key (sv, VIEW_WHITE_SPACES))
+ flags |= (GTK_SOURCE_DRAW_SPACES_SPACE | GTK_SOURCE_DRAW_SPACES_TAB);
+ if (get_key (sv, VIEW_EOL))
+ flags |= GTK_SOURCE_DRAW_SPACES_NEWLINE;
gtk_source_view_set_draw_spaces (GTK_SOURCE_VIEW (sv->priv->view),
- get_key (sv, VISIBLE_SPACES) ? GTK_SOURCE_DRAW_SPACES_ALL : 0);
-
+ flags);
+
init_fonts(sv);
/* Register gconf notifications */
@@ -319,10 +369,12 @@
REGISTER_NOTIFY (VIEW_MARKS, on_gconf_notify_view_marks);
REGISTER_NOTIFY (VIEW_LINENUMBERS, on_gconf_notify_view_linenums);
REGISTER_NOTIFY (VIEW_RIGHTMARGIN, on_gconf_notify_view_right_margin);
+ REGISTER_NOTIFY (VIEW_WHITE_SPACES, on_gconf_notify_view_spaces);
+ REGISTER_NOTIFY (VIEW_EOL, on_gconf_notify_view_eols);
+ REGISTER_NOTIFY (VIEW_LINE_WRAP, on_gconf_notify_line_wrap);
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]