Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/xwt.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'Xwt.Gtk')
-rw-r--r--Xwt.Gtk/Xwt.GtkBackend/Util.cs7
1 files changed, 3 insertions, 4 deletions
diff --git a/Xwt.Gtk/Xwt.GtkBackend/Util.cs b/Xwt.Gtk/Xwt.GtkBackend/Util.cs
index 5706a44e..f63aa2cc 100644
--- a/Xwt.Gtk/Xwt.GtkBackend/Util.cs
+++ b/Xwt.Gtk/Xwt.GtkBackend/Util.cs
@@ -283,6 +283,7 @@ namespace Xwt.GtkBackend
internal static TextIndexer ApplyFormattedText(this Gtk.Label label, FormattedText text)
{
+ TextIndexer indexer = null;
var list = new FastPangoAttrList ();
if (text != null) {
if (label.IsRealized) {
@@ -293,14 +294,12 @@ namespace Xwt.GtkBackend
if (!color.Equals (Gdk.Color.Zero))
list.DefaultLinkColor = color;
}
- var indexer = new TextIndexer (text.Text);
+ indexer = new TextIndexer (text.Text);
list.AddAttributes (indexer, text.Attributes);
-
- return indexer;
}
gtk_label_set_attributes (label.Handle, list.Handle);
- return null;
+ return indexer;
}
}
}