[gtksourceview] Bug 606732 - Make gtk_source_buffer_new_with_language simpler
- From: Garrett Regier <gregier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview] Bug 606732 - Make gtk_source_buffer_new_with_language simpler
- Date: Mon, 17 May 2010 00:09:59 +0000 (UTC)
commit 0b5aef14243b938b4401cc4b6ec8685987f609b4
Author: Garrett Regier <alias301 gmail com>
Date: Sun May 16 17:09:32 2010 -0700
Bug 606732 - Make gtk_source_buffer_new_with_language simpler
gtksourceview/gtksourcebuffer.c | 11 ++++-------
1 files changed, 4 insertions(+), 7 deletions(-)
---
diff --git a/gtksourceview/gtksourcebuffer.c b/gtksourceview/gtksourcebuffer.c
index 7691195..0f1c7aa 100644
--- a/gtksourceview/gtksourcebuffer.c
+++ b/gtksourceview/gtksourcebuffer.c
@@ -662,15 +662,12 @@ gtk_source_buffer_new (GtkTextTagTable *table)
GtkSourceBuffer *
gtk_source_buffer_new_with_language (GtkSourceLanguage *language)
{
- GtkSourceBuffer *buffer;
-
g_return_val_if_fail (GTK_IS_SOURCE_LANGUAGE (language), NULL);
- buffer = gtk_source_buffer_new (NULL);
-
- gtk_source_buffer_set_language (buffer, language);
-
- return buffer;
+ return g_object_new (GTK_TYPE_SOURCE_BUFFER,
+ "tag-table", NULL,
+ "language", language,
+ NULL);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]