[gnome-builder/wip/libide] libide: use builder style in test program
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/libide] libide: use builder style in test program
- Date: Tue, 24 Feb 2015 23:12:09 +0000 (UTC)
commit 2e3fc531e7b317773158783456df0357d10f0a62
Author: Christian Hergert <christian hergert me>
Date: Tue Feb 24 15:11:36 2015 -0800
libide: use builder style in test program
tests/test-ide-source-view.c | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/tests/test-ide-source-view.c b/tests/test-ide-source-view.c
index 2d45991..fbed1cc 100644
--- a/tests/test-ide-source-view.c
+++ b/tests/test-ide-source-view.c
@@ -29,9 +29,14 @@ load_cb (GObject *object,
g_autoptr(IdeBuffer) buffer = NULL;
g_autoptr(GError) error = NULL;
IdeSourceView *source_view = user_data;
+ GtkSourceStyleScheme *style;
+ GtkSourceStyleSchemeManager *styles;
g_assert (IDE_IS_SOURCE_VIEW (source_view));
+ styles = gtk_source_style_scheme_manager_get_default ();
+ style = gtk_source_style_scheme_manager_get_scheme (styles, "builder");
+
buffer = ide_buffer_manager_load_file_finish (buffer_manager, result, &error);
if (!buffer)
@@ -41,6 +46,7 @@ load_cb (GObject *object,
return;
}
+ gtk_source_buffer_set_style_scheme (GTK_SOURCE_BUFFER (buffer), style);
gtk_text_view_set_buffer (GTK_TEXT_VIEW (source_view), GTK_TEXT_BUFFER (buffer));
gtk_widget_set_sensitive (GTK_WIDGET (source_view), TRUE);
gtk_widget_grab_focus (GTK_WIDGET (source_view));
@@ -88,11 +94,11 @@ gint
main (gint argc,
gchar *argv[])
{
- GFile *project_file;
+ GFile *project_file;
GtkScrolledWindow *scroller;
- IdeSourceView *source_view;
- GtkWindow *window;
- GCancellable *cancellable;
+ IdeSourceView *source_view;
+ GtkWindow *window;
+ GCancellable *cancellable;
ide_set_program_name ("gnome-builder");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]