[california/wip/725763-manager] Tweaks.



commit a3cd945512ddba5255d10bd00471abdba3cedcc0
Author: Jim Nelson <jim yorba org>
Date:   Fri Mar 14 17:24:19 2014 -0700

    Tweaks.

 src/application/california-application.vala |    1 -
 src/manager/manager-calendar-list-item.vala |    4 ++++
 src/manager/manager-calendar-list.vala      |   15 ++++++++++++---
 src/manager/manager.vala                    |    5 +++++
 4 files changed, 21 insertions(+), 4 deletions(-)
---
diff --git a/src/application/california-application.vala b/src/application/california-application.vala
index f656b13..761e2fe 100644
--- a/src/application/california-application.vala
+++ b/src/application/california-application.vala
@@ -29,7 +29,6 @@ public class Application : Gtk.Application {
         null
     };
     
-    public const string ACTION_ADD_CALENDAR = "app.add-calendar";
     public const string ACTION_CALENDAR_MANAGER = "app.calendar-manager";
     public const string ACTION_ABOUT = "app.about";
     public const string ACTION_QUIT = "app.quit";
diff --git a/src/manager/manager-calendar-list-item.vala b/src/manager/manager-calendar-list-item.vala
index df78ad8..87c1e6c 100644
--- a/src/manager/manager-calendar-list-item.vala
+++ b/src/manager/manager-calendar-list-item.vala
@@ -6,6 +6,10 @@
 
 namespace California.Manager {
 
+/**
+ * An interactive list item in a { link CalendarList}.
+ */
+
 [GtkTemplate (ui = "/org/yorba/california/rc/calendar-manager-list-item.ui")]
 public class CalendarListItem : Gtk.Grid {
     public Backing.CalendarSource source { get; private set; }
diff --git a/src/manager/manager-calendar-list.vala b/src/manager/manager-calendar-list.vala
index dccbbe0..61ccf47 100644
--- a/src/manager/manager-calendar-list.vala
+++ b/src/manager/manager-calendar-list.vala
@@ -6,6 +6,10 @@
 
 namespace California.Manager {
 
+/**
+ * A list of available calendars and basic configuration controls.
+ */
+
 [GtkTemplate (ui = "/org/yorba/california/rc/calendar-manager-list.ui")]
 public class CalendarList : Gtk.Grid, Host.Interaction {
     public Gtk.Widget? default_widget { get { return null; } }
@@ -29,9 +33,8 @@ public class CalendarList : Gtk.Grid, Host.Interaction {
     private void on_manager_opened_closed() {
         if (Backing.Manager.instance.is_open)
             init();
-        /* else
+        else
             clear();
-            */
     }
     
     private void init() {
@@ -43,11 +46,17 @@ public class CalendarList : Gtk.Grid, Host.Interaction {
         }
     }
     
+    private void clear() {
+        foreach (unowned Gtk.Widget child in calendar_list_box.get_children()) {
+            if (child is CalendarListItem)
+                calendar_list_box.remove(child);
+        };
+    }
+    
     [GtkCallback]
     private void on_calendar_list_box_row_activated(Gtk.ListBoxRow row) {
         CalendarListItem item = (CalendarListItem) row.get_child();
         debug("activated %s", item.source.to_string());
-        item = null;
     }
     
     [GtkCallback]
diff --git a/src/manager/manager.vala b/src/manager/manager.vala
index 5369d25..daf174d 100644
--- a/src/manager/manager.vala
+++ b/src/manager/manager.vala
@@ -4,6 +4,11 @@
  * (version 2.1 or later).  See the COPYING file in this distribution.
  */
 
+/**
+ * The Calendar Manager, an interactive window for the user to add, configure, and remove
+ * calendar subscriptions.
+ */
+
 namespace California.Manager {
 
 private int init_count = 0;


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