[gnome-initial-setup] Center and monospace the EULA
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-initial-setup] Center and monospace the EULA
- Date: Thu, 31 May 2012 21:18:48 +0000 (UTC)
commit fd37bec5e018990fd4dbb51503311264b4d1452e
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Thu May 31 17:04:00 2012 -0400
Center and monospace the EULA
gnome-initial-setup/gdm-initial-setup.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/gnome-initial-setup/gdm-initial-setup.c b/gnome-initial-setup/gdm-initial-setup.c
index b7bb966..fdff4df 100644
--- a/gnome-initial-setup/gdm-initial-setup.c
+++ b/gnome-initial-setup/gdm-initial-setup.c
@@ -152,6 +152,7 @@ build_eula_text_view (GFile *eula,
GError *error = NULL;
GtkWidget *widget = NULL;
GtkTextBuffer *buffer;
+ GtkTextIter start, end;
input_stream = G_INPUT_STREAM (g_file_read (eula, NULL, &error));
if (error != NULL)
@@ -170,6 +171,14 @@ build_eula_text_view (GFile *eula,
if (error != NULL)
goto out;
+ /* apply monospace and center */
+ gtk_text_buffer_create_tag (buffer, "monospace", "family", "monospace", NULL);
+ gtk_text_buffer_create_tag (buffer, "center", "justification", GTK_JUSTIFY_CENTER, NULL);
+ gtk_text_buffer_get_start_iter (buffer, &start);
+ gtk_text_buffer_get_end_iter (buffer, &end);
+ gtk_text_buffer_apply_tag_by_name (buffer, "monospace", &start, &end);
+ gtk_text_buffer_apply_tag_by_name (buffer, "center", &start, &end);
+
widget = gtk_text_view_new_with_buffer (buffer);
gtk_text_view_set_editable (GTK_TEXT_VIEW (widget), FALSE);
gtk_text_view_set_cursor_visible (GTK_TEXT_VIEW (widget), FALSE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]