[f-spot] shorter button for short mode
- From: Stephane Delcroix <sdelcroix src gnome org>
- To: svn-commits-list gnome org
- Subject: [f-spot] shorter button for short mode
- Date: Mon, 18 May 2009 11:11:07 -0400 (EDT)
commit 818db2869778e012cc5b790c84142f51812205d8
Author: Stephane Delcroix <stephane delcroix org>
Date: Mon May 18 17:07:46 2009 +0200
shorter button for short mode
If the widget only shows the Calendar, no need to add the Calendar label to the button
---
src/Widgets/DateEdit.cs | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/Widgets/DateEdit.cs b/src/Widgets/DateEdit.cs
index 946389f..3253cf8 100644
--- a/src/Widgets/DateEdit.cs
+++ b/src/Widgets/DateEdit.cs
@@ -42,7 +42,6 @@ namespace FSpot.Widgets
public DateTimeOffset DateTimeOffset {
get { return dateTimeOffset; }
set {
-Console.WriteLine ("changed to {0}", value);
DateTimeOffset old_dto = dateTimeOffset;
dateTimeOffset = value;
if (dateTimeOffset.Date != old_dto.Date)
@@ -99,6 +98,7 @@ Console.WriteLine ("changed to {0}", value);
Entry time_entry;
Entry offset_entry;
Calendar calendar;
+ Label calendar_label;
Window calendar_popup;
Gdk.Color red = new Gdk.Color (255, 0, 0);
@@ -112,7 +112,7 @@ Console.WriteLine ("changed to {0}", value);
date_entry.Show ();
var bbox = new HBox ();
Widget w;
- bbox.Add (w = new Label (Catalog.GetString ("Calendar")));
+ bbox.Add (w = calendar_label = new Label (Catalog.GetString ("Calendar")));
w.Show ();
bbox.Add (w = new Arrow (ArrowType.Down, ShadowType.Out));
w.Show ();
@@ -156,6 +156,7 @@ Console.WriteLine ("changed to {0}", value);
offset_entry.Text = dateTimeOffset.ToString ("zzz");
offset_entry.ModifyBase (StateType.Normal);
offset_entry.Visible = (dateEditFlags & DateEditFlags.ShowOffset) == DateEditFlags.ShowOffset;
+ calendar_label.Visible = time_entry.Visible || offset_entry.Visible;
}
bool GrabPointerAndKeyboard (Gdk.Window window, uint activate_time)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]