[gnome-builder] libide: apply right-margin-position from IdeFileSettings
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] libide: apply right-margin-position from IdeFileSettings
- Date: Mon, 23 Mar 2015 23:41:07 +0000 (UTC)
commit 6481b5f167255d1ac3b6a4f5c6b143717d1de448
Author: Christian Hergert <christian hergert me>
Date: Tue Feb 24 17:54:39 2015 -0800
libide: apply right-margin-position from IdeFileSettings
libide/ide-source-view.c | 3 +++
tests/test-ide-source-view.c | 1 +
2 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/libide/ide-source-view.c b/libide/ide-source-view.c
index 0a7489e..38dcbad 100644
--- a/libide/ide-source-view.c
+++ b/libide/ide-source-view.c
@@ -70,6 +70,7 @@ ide_source_view__file_load_settings_cb (GObject *object,
g_autoptr(GError) error = NULL;
IdeFile *file = (IdeFile *)object;
IdeIndentStyle indent_style;
+ guint right_margin_position;
guint tab_width;
gint indent_width;
@@ -86,10 +87,12 @@ ide_source_view__file_load_settings_cb (GObject *object,
indent_width = ide_file_settings_get_indent_width (file_settings);
indent_style = ide_file_settings_get_indent_style (file_settings);
+ right_margin_position = ide_file_settings_get_right_margin_position (file_settings);
tab_width = ide_file_settings_get_tab_width (file_settings);
gtk_source_view_set_indent_width (GTK_SOURCE_VIEW (self), indent_width);
gtk_source_view_set_tab_width (GTK_SOURCE_VIEW (self), tab_width);
+ gtk_source_view_set_right_margin_position (GTK_SOURCE_VIEW (self), right_margin_position);
gtk_source_view_set_insert_spaces_instead_of_tabs (GTK_SOURCE_VIEW (self),
(indent_style == IDE_INDENT_STYLE_SPACES));
}
diff --git a/tests/test-ide-source-view.c b/tests/test-ide-source-view.c
index c03496e..8f4c44b 100644
--- a/tests/test-ide-source-view.c
+++ b/tests/test-ide-source-view.c
@@ -120,6 +120,7 @@ main (gint argc,
"show-grid-lines", TRUE,
"show-line-changes", TRUE,
"show-line-numbers", TRUE,
+ "show-right-margin", TRUE,
"visible", TRUE,
NULL);
gtk_container_add (GTK_CONTAINER (scroller), GTK_WIDGET (source_view));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]