[shotwell] Remove icon closed string, follow-state for hover effect: Bug #719284



commit 8de7e7d623ee9fe94121df6bce83a2107232f249
Author: Wolfgang Steitz <wolfer7 web de>
Date:   Tue Feb 17 12:32:30 2015 -0800

    Remove icon closed string, follow-state for hover effect: Bug #719284

 src/Resources.vala       |    3 +--
 src/camera/Branch.vala   |    4 +---
 src/events/Branch.vala   |    2 +-
 src/folders/Folders.vala |    2 +-
 src/sidebar/Entry.vala   |    2 --
 src/sidebar/Tree.vala    |    3 ++-
 6 files changed, 6 insertions(+), 10 deletions(-)
---
diff --git a/src/Resources.vala b/src/Resources.vala
index 5176119..e74f72b 100644
--- a/src/Resources.vala
+++ b/src/Resources.vala
@@ -120,8 +120,7 @@ along with Shotwell; if not, write to the Free Software Foundation, Inc.,
     public const string ICON_NO_EVENT = "no-event";
     public const string ICON_ONE_TAG = "one-tag";
     public const string ICON_TAGS = "multiple-tags";
-    public const string ICON_FOLDER_CLOSED = "folder";
-    public const string ICON_FOLDER_OPEN = "folder-open";
+    public const string ICON_FOLDER = "folder";
     public const string ICON_FOLDER_DOCUMENTS = "folder-documents";
     public const string ICON_IMPORTING = "go-down";
     public const string ICON_LAST_IMPORT = "document-open-recent";
diff --git a/src/camera/Branch.vala b/src/camera/Branch.vala
index 39f68cf..43e787a 100644
--- a/src/camera/Branch.vala
+++ b/src/camera/Branch.vala
@@ -5,7 +5,7 @@
  */
 
 public class Camera.Branch : Sidebar.Branch {
-    internal static string? cameras_icon = null;
+    internal static string? cameras_icon = Resources.ICON_CAMERAS;
     
     private Gee.HashMap<DiscoveredCamera, Camera.SidebarEntry> camera_map = new Gee.HashMap<
         DiscoveredCamera, Camera.SidebarEntry>();
@@ -23,11 +23,9 @@ public class Camera.Branch : Sidebar.Branch {
     }
     
     internal static void init() {
-        cameras_icon = Resources.ICON_CAMERAS;
     }
     
     internal static void terminate() {
-        cameras_icon = null;
     }
     
     private static int camera_comparator(Sidebar.Entry a, Sidebar.Entry b) {
diff --git a/src/events/Branch.vala b/src/events/Branch.vala
index a568c4d..878f309 100644
--- a/src/events/Branch.vala
+++ b/src/events/Branch.vala
@@ -5,7 +5,7 @@
  */
 
 public class Events.Branch : Sidebar.Branch {
-    internal static string icon = Resources.ICON_FOLDER_CLOSED;
+    internal static string icon = Resources.ICON_FOLDER;
     internal static string events_icon = Resources.ICON_EVENTS;
     internal static string single_event_icon = Resources.ICON_ONE_EVENT;
     internal static string no_event_icon = Resources.ICON_NO_EVENT;
diff --git a/src/folders/Folders.vala b/src/folders/Folders.vala
index c31cc1a..da6f817 100644
--- a/src/folders/Folders.vala
+++ b/src/folders/Folders.vala
@@ -19,7 +19,7 @@ static string? icon = null;
 static string? have_photos_icon = null;
 
 public void init() throws Error {
-    icon = Resources.ICON_FOLDER_CLOSED;
+    icon = Resources.ICON_FOLDER;
     have_photos_icon = Resources.ICON_FOLDER_DOCUMENTS;
 }
 
diff --git a/src/sidebar/Entry.vala b/src/sidebar/Entry.vala
index 3e0fee9..090c524 100644
--- a/src/sidebar/Entry.vala
+++ b/src/sidebar/Entry.vala
@@ -25,8 +25,6 @@ public interface Sidebar.Entry : Object {
 }
 
 public interface Sidebar.ExpandableEntry : Sidebar.Entry {
-    public signal void sidebar_open_closed_icons_changed(string? open, string? closed);
-    
     public abstract bool expand_on_select();
 }
 
diff --git a/src/sidebar/Tree.vala b/src/sidebar/Tree.vala
index 404f528..49e951b 100644
--- a/src/sidebar/Tree.vala
+++ b/src/sidebar/Tree.vala
@@ -91,10 +91,12 @@ public class Sidebar.Tree : Gtk.TreeView {
     public Tree(Gtk.TargetEntry[] target_entries, Gdk.DragAction actions,
         ExternalDropHandler drop_handler) {
         set_model(store);
+        get_style_context().add_class("sidebar");
         
         Gtk.TreeViewColumn text_column = new Gtk.TreeViewColumn();
         text_column.set_sizing(Gtk.TreeViewColumnSizing.FIXED);
         Gtk.CellRendererPixbuf icon_renderer = new Gtk.CellRendererPixbuf();
+        icon_renderer.follow_state = true;
         text_column.pack_start(icon_renderer, false);
         text_column.add_attribute(icon_renderer, "icon_name", Columns.ICON);
         text_renderer = new Gtk.CellRendererText();
@@ -709,7 +711,6 @@ public class Sidebar.Tree : Gtk.TreeView {
         EntryWrapper? wrapper = get_wrapper_at_iter(iter);
         if (wrapper == null)
             return;
-        
         string? icon = wrapper.entry.get_sidebar_icon();
         store.set(iter, Columns.ICON, icon);
     }


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