tasque r152 - in trunk: . src
- From: sharm svn gnome org
- To: svn-commits-list gnome org
- Subject: tasque r152 - in trunk: . src
- Date: Wed, 22 Oct 2008 13:13:19 +0000 (UTC)
Author: sharm
Date: Wed Oct 22 13:13:18 2008
New Revision: 152
URL: http://svn.gnome.org/viewvc/tasque?rev=152&view=rev
Log:
Additional fixes (including crash fix) for bug #532766, thanks to Joel Bennett.
* tasque/src/TaskGroup.cs: Override OnStyleSet to manage the Pango
markup of the header.
* tasque/src/TaskWindow.cs: Move targetVBox init code back to
constructor, don't call PopulateWindow in OnStyleSet (obsoleted by
fixes to TaskGroup), and be sure to update the addTaskEntry color
based on the new style, if it's showing the default text.
Modified:
trunk/ChangeLog
trunk/src/TaskGroup.cs
trunk/src/TaskWindow.cs
Modified: trunk/src/TaskGroup.cs
==============================================================================
--- trunk/src/TaskGroup.cs (original)
+++ trunk/src/TaskGroup.cs Wed Oct 22 13:13:18 2008
@@ -70,10 +70,7 @@
header = new Gtk.Label ();
header.UseMarkup = true;
header.UseUnderline = false;
- header.Markup =
- string.Format ("<span size=\"x-large\" foreground=\"{0}\" weight=\"bold\">{1}</span>",
- GetHighlightColor (),
- groupName);
+ header.Markup = GetHeaderMarkup (groupName);
header.Xalign = 0;
header.Show ();
@@ -342,6 +339,13 @@
Show ();
}
+ protected override void OnStyleSet(Style previous_style)
+ {
+ base.OnStyleSet (previous_style);
+ header.Markup = GetHeaderMarkup (DisplayName);
+ }
+
+
/// <summary>
/// Filter out tasks that don't fit within the group's date range
/// </summary>
@@ -463,6 +467,13 @@
return Utilities.ColorGetHex (fgColor);
}
+
+ private string GetHeaderMarkup (string groupName)
+ {
+ return string.Format ("<span size=\"x-large\" foreground=\"{0}\" weight=\"bold\">{1}</span>",
+ GetHighlightColor (),
+ groupName);
+ }
#endregion // Private Methods
Modified: trunk/src/TaskWindow.cs
==============================================================================
--- trunk/src/TaskWindow.cs (original)
+++ trunk/src/TaskWindow.cs Wed Oct 22 13:13:18 2008
@@ -204,6 +204,11 @@
Gdk.Color backgroundColor = GetBackgroundColor ();
innerEb.ModifyBg (StateType.Normal, backgroundColor);
innerEb.ModifyBase (StateType.Normal, backgroundColor);
+
+ targetVBox = new VBox();
+ targetVBox.BorderWidth = 5;
+ targetVBox.Show ();
+ innerEb.Add(targetVBox);
scrolledWindow.AddWithViewport(innerEb);
@@ -234,13 +239,6 @@
void PopulateWindow()
{
- if (targetVBox != null)
- targetVBox.Destroy ();
-
- targetVBox = new VBox();
- targetVBox.BorderWidth = 5;
- targetVBox.Show ();
- innerEb.Add(targetVBox);
// Add in the groups
//
@@ -824,7 +822,13 @@
Gdk.Color backgroundColor = GetBackgroundColor ();
innerEb.ModifyBg (StateType.Normal, backgroundColor);
innerEb.ModifyBase (StateType.Normal, backgroundColor);
- PopulateWindow ();
+
+ if (addTaskEntry.Text == Catalog.GetString ("New task...")) {
+ Gdk.Color insensitiveColor =
+ addTaskEntry.Style.Text (Gtk.StateType.Insensitive);
+ addTaskEntry.ModifyText (Gtk.StateType.Normal, insensitiveColor);
+ }
+
}
private void OnRealized (object sender, EventArgs args)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]