[Xfce4-commits] [thunar-plugins/thunar-vcs-plugin] 09/09: Drop gtk_widget_modify_font usage
noreply at xfce.org
noreply at xfce.org
Sat Jun 2 05:09:43 CEST 2018
This is an automated email from the git hooks/post-receive script.
a n d r e p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository thunar-plugins/thunar-vcs-plugin.
commit d905754152054dba432a45b108034a8b33a3d99d
Author: Andre Miranda <andreldm at xfce.org>
Date: Sat Jun 2 00:03:24 2018 -0300
Drop gtk_widget_modify_font usage
It's easier (and not deprecated) to just set the
textview's font as monospace.
---
tvp-svn-helper/tsh-diff-dialog.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/tvp-svn-helper/tsh-diff-dialog.c b/tvp-svn-helper/tsh-diff-dialog.c
index 3f18a37..fa5508e 100644
--- a/tvp-svn-helper/tsh-diff-dialog.c
+++ b/tvp-svn-helper/tsh-diff-dialog.c
@@ -92,7 +92,6 @@ tsh_diff_dialog_init (TshDiffDialog *dialog)
GtkTextBuffer *text_buffer;
GtkWidget *scroll_window;
GtkWidget *button;
- PangoFontDescription *font_desc;
GtkWidget *grid;
GtkTreeModel *model;
GtkWidget *depth;
@@ -110,6 +109,7 @@ tsh_diff_dialog_init (TshDiffDialog *dialog)
dialog->text_view = text_view = gtk_text_view_new ();
gtk_text_view_set_editable(GTK_TEXT_VIEW(text_view), FALSE);
gtk_text_view_set_cursor_visible(GTK_TEXT_VIEW(text_view), FALSE);
+ gtk_text_view_set_monospace (GTK_TEXT_VIEW (text_view), TRUE);
text_buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(dialog->text_view));
dialog->tag_red = gtk_text_buffer_create_tag(text_buffer, NULL,
"foreground", "red", NULL);
@@ -121,13 +121,6 @@ tsh_diff_dialog_init (TshDiffDialog *dialog)
PANGO_WEIGHT_BOLD, NULL);
dialog->current_line = 0;
- font_desc = pango_font_description_from_string("Monospace");
- if (font_desc)
- {
- gtk_widget_modify_font(text_view, font_desc);
- pango_font_description_free(font_desc);
- }
-
gtk_container_add (GTK_CONTAINER (scroll_window), text_view);
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), scroll_window, TRUE, TRUE, 0);
gtk_widget_show (text_view);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list