[gedit] spell-checker-dialog: use gtk_label_set_markup()



commit b4bb815ee3caf466987b1050da72f5ca1b24acd0
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Fri Aug 7 13:52:56 2015 +0200

    spell-checker-dialog: use gtk_label_set_markup()
    
    Do not force the label to be all in bold. The markup is specified in the
    code. It'll be useful for showing an error message (see next commit).

 plugins/spell/gedit-spell-checker-dialog.c  |    4 ++--
 plugins/spell/resources/ui/spell-checker.ui |    3 ---
 2 files changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/plugins/spell/gedit-spell-checker-dialog.c b/plugins/spell/gedit-spell-checker-dialog.c
index 082d657..6f74e3e 100644
--- a/plugins/spell/gedit-spell-checker-dialog.c
+++ b/plugins/spell/gedit-spell-checker-dialog.c
@@ -180,7 +180,7 @@ set_misspelled_word (GeditSpellCheckerDialog *dialog,
        priv->misspelled_word = g_strdup (word);
 
        label = g_strdup_printf("<b>%s</b>", word);
-       gtk_label_set_label (priv->misspelled_word_label, label);
+       gtk_label_set_markup (priv->misspelled_word_label, label);
        g_free (label);
 
        suggestions = gedit_spell_checker_get_suggestions (priv->checker, priv->misspelled_word);
@@ -247,7 +247,7 @@ goto_next (GeditSpellCheckerDialog *dialog)
                        label = g_strdup_printf ("<b>%s</b>", _("No misspelled words"));
                }
 
-               gtk_label_set_label (priv->misspelled_word_label, label);
+               gtk_label_set_markup (priv->misspelled_word_label, label);
                g_free (label);
 
                set_completed (dialog);
diff --git a/plugins/spell/resources/ui/spell-checker.ui b/plugins/spell/resources/ui/spell-checker.ui
index 57b2872..d26c581 100644
--- a/plugins/spell/resources/ui/spell-checker.ui
+++ b/plugins/spell/resources/ui/spell-checker.ui
@@ -41,9 +41,6 @@
                 <property name="use_markup">True</property>
                 <property name="selectable">True</property>
                 <property name="xalign">0</property>
-                <attributes>
-                  <attribute name="weight" value="bold"/>
-                </attributes>
               </object>
               <packing>
                 <property name="left_attach">1</property>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]