f-spot r4014 - in trunk/src: . Widgets
- From: sdelcroix svn gnome org
- To: svn-commits-list gnome org
- Subject: f-spot r4014 - in trunk/src: . Widgets
- Date: Thu, 29 May 2008 14:52:16 +0000 (UTC)
Author: sdelcroix
Date: Thu May 29 14:52:15 2008
New Revision: 4014
URL: http://svn.gnome.org/viewvc/f-spot?rev=4014&view=rev
Log:
cleaning the sidebar
Modified:
trunk/src/MainWindow.cs
trunk/src/Makefile.am
trunk/src/Widgets/Sidebar.cs
Modified: trunk/src/MainWindow.cs
==============================================================================
--- trunk/src/MainWindow.cs (original)
+++ trunk/src/MainWindow.cs Thu May 29 14:52:15 2008
@@ -1818,6 +1818,7 @@
Preferences.Set (Preferences.SHOW_TOOLBAR, toolbar.Visible);
Preferences.Set (Preferences.SHOW_SIDEBAR, info_vbox.Visible);
+ Preferences.Set (Preferences.SIDEBAR_TOP_ENTRY, sidebar.CurrentPage);
Preferences.Set (Preferences.SHOW_TIMELINE, display_timeline.Active);
Preferences.Set (Preferences.SHOW_FILMSTRIP, display_filmstrip.Active);
Preferences.Set (Preferences.SHOW_TAGS, icon_view.DisplayTags);
@@ -2666,7 +2667,11 @@
break;
case Preferences.SIDEBAR_TOP_ENTRY:
- sidebar.SwitchTo ((string) val);
+ try {
+ sidebar.SwitchTo ((int) val);
+ } catch {
+ sidebar.SwitchTo (0);
+ }
break;
case Preferences.TAG_ICON_SIZE:
Modified: trunk/src/Makefile.am
==============================================================================
--- trunk/src/Makefile.am (original)
+++ trunk/src/Makefile.am Thu May 29 14:52:15 2008
@@ -66,6 +66,7 @@
$(srcdir)/Widgets/Rating.cs \
$(srcdir)/Widgets/SaneTreeView.cs \
$(srcdir)/Widgets/ScrolledView.cs \
+ $(srcdir)/Widgets/Sidebar.cs \
$(srcdir)/Widgets/TagView.cs
F_SPOT_CSDISTFILES = \
@@ -243,7 +244,6 @@
$(srcdir)/Widgets/RatingMenuItem.cs \
$(srcdir)/Widgets/Reveal.cs \
$(srcdir)/Widgets/ScalingIconView.cs \
- $(srcdir)/Widgets/Sidebar.cs \
$(srcdir)/Widgets/SoftFocus.cs \
$(srcdir)/Widgets/TagEntry.cs \
$(srcdir)/Widgets/Tilt.cs \
Modified: trunk/src/Widgets/Sidebar.cs
==============================================================================
--- trunk/src/Widgets/Sidebar.cs (original)
+++ trunk/src/Widgets/Sidebar.cs Thu May 29 14:52:15 2008
@@ -32,7 +32,7 @@
notebook = new Notebook ();
notebook.ShowTabs = false;
- notebook.ShowBorder = false;
+ notebook.ShowBorder = false;
PackStart (notebook, true, true, 0);
Button button = new Button ();
@@ -46,7 +46,6 @@
eventBox = new EventBox ();
eventBox.Add (choose_button);
- choose_button.ButtonPressEvent += HandleMouseScrollEvent;
button_box.PackStart (eventBox, true, true, 0);
@@ -99,11 +98,6 @@
CloseRequested (this, args);
}
- public void HandleMouseScrollEvent (object o, EventArgs args)
- {
- System.Console.Out.WriteLine ("Hallo Welt");
- }
-
public void SwitchTo (int n)
{
if (n != notebook.CurrentPage)
@@ -111,10 +105,14 @@
notebook.CurrentPage = n;
choose_button.Label = menu_list [n];
choose_button.Image.IconName = image_list [n];
- Preferences.Set (Preferences.SIDEBAR_TOP_ENTRY, menu_list [n]);
}
}
+ public int CurrentPage
+ {
+ get { return notebook.CurrentPage; }
+ }
+
public void SwitchTo (string name)
{
if (menu_list.Contains (name)) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]