? bdays.diff
? bdays2.diff
? filter-out-bdays-and-weather.diff
? icon_anniversary_16.png
? icon_birthday_16.png
? icon_unknown_16.png
? icon_weather_16.png
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gnome-panel/applets/clock/ChangeLog,v
retrieving revision 1.592
diff -u -r1.592 ChangeLog
--- ChangeLog	18 Jul 2005 12:15:45 -0000	1.592
+++ ChangeLog	19 Jul 2005 21:14:51 -0000
@@ -1,3 +1,13 @@
+2005-07-19  Priit Laes  <amd@store20.com>
+
+	* calendar-client.[ch]: Add support for uri field for appointments.
+	* calendar-client.c (get_source_uri): New function to get appointment URI.
+	* clock.c (create_weather_list, create_birthday_list, filter_weather,
+	filter_birthdays, filter_appointments): New functions.
+	* clock.c (destroy_clock, handle_appointments_changed,
+	create_appointment_list, add_appointments_and_tasks, update_popup):
+	Separate appointments into birthday, weather and appointments lists.
+	
 2005-07-15  Rodrigo Moya <rodrigo@novell.com>
 
 	* clock.c (update_clock): only show the date in the tooltip if the applet
Index: Makefile.am
===================================================================
RCS file: /cvs/gnome/gnome-panel/applets/clock/Makefile.am,v
retrieving revision 1.71
diff -u -r1.71 Makefile.am
--- Makefile.am	4 Nov 2004 17:11:10 -0000	1.71
+++ Makefile.am	19 Jul 2005 21:14:51 -0000
@@ -6,6 +6,7 @@
 	$(WARN_CFLAGS) 					\
 	$(CLOCK_CFLAGS) 				\
 	-DDATADIR=\""$(datadir)"\"			\
+	-DCLOCK_ICONDIR=\""$(clockbitmapsdir)"\"			\
 	-DLIBDIR=\""$(libdir)"\"			\
 	-DSYSCONFDIR=\""$(sysconfdir)"\"		\
 	-DPREFIX=\""$(prefix)"\"				\
@@ -18,6 +19,12 @@
 	calendar-sources.c	\
 	calendar-sources.h	\
 	calendar-debug.h
+
+CLOCK_BITMAPS = 		\
+	icon_anniversary_16.png \
+	icon_birthday_16.png 	\
+	icon_weather_16.png 	\
+	icon_unknown_16.png 
 endif
 
 clock_applet_SOURCES = clock.c $(CALENDAR_SOURCES)
@@ -59,8 +66,12 @@
 endif
 
 EXTRA_DIST =						\
+	$(CLOCK_BITMAPS)				\
 	GNOME_ClockApplet_Factory.server.in.in		\
 	$(schemas_in_files)				\
 	$(ui_DATA)
+
+clockbitmapsdir = $(datadir)/gnome/panel/pixmaps
+clockbitmaps_DATA = $(CLOCK_BITMAPS)
 
 CLEANFILES = $(server_in_files) $(server_DATA) $(schemas_DATA)
Index: calendar-client.c
===================================================================
RCS file: /cvs/gnome/gnome-panel/applets/clock/calendar-client.c,v
retrieving revision 1.11
diff -u -r1.11 calendar-client.c
--- calendar-client.c	7 Jun 2005 15:30:47 -0000	1.11
+++ calendar-client.c	19 Jul 2005 21:14:58 -0000
@@ -663,6 +663,30 @@
   return NULL;
 }
 
+static gchar *
+get_source_uri (ECal *esource)
+{
+    ESource *source;
+    gchar   *string;
+    gchar  **list;
+
+    g_return_val_if_fail (E_IS_CAL (esource), NULL);
+
+    source = e_cal_get_source (esource);
+    string = g_strdup (e_source_get_uri (source));
+    if (string) {
+        list = g_strsplit (string, ":", 2);
+        g_free(string);
+
+        if (list[0]) {
+            string = g_strdup (list[0]);
+            g_strfreev (list);
+            return string;
+        }
+    }
+    return g_strdup("");
+}
+
 static inline int
 null_safe_strcmp (const char *a,
 		  const char *b)
@@ -691,6 +715,7 @@
 
   return
     null_safe_strcmp (a->uid,          b->uid)          == 0 &&
+    null_safe_strcmp (a->uri,          b->uri)          == 0 &&
     null_safe_strcmp (a->summary,      b->summary)      == 0 &&
     null_safe_strcmp (a->description,  b->description)  == 0 &&
     null_safe_strcmp (a->color_string, b->color_string) == 0 &&
@@ -722,6 +747,7 @@
     }
 
   appointment_copy->uid          = g_strdup (appointment->uid);
+  appointment_copy->uri          = g_strdup (appointment->uri);
   appointment_copy->summary      = g_strdup (appointment->summary);
   appointment_copy->description  = g_strdup (appointment->description);
   appointment_copy->color_string = g_strdup (appointment->color_string);
@@ -743,6 +769,9 @@
   g_free (appointment->uid);
   appointment->uid = NULL;
 
+  g_free (appointment->uri);
+  appointment->uri = NULL;
+
   g_free (appointment->summary);
   appointment->summary = NULL;
 
@@ -763,6 +792,7 @@
                            icaltimezone         *default_zone)
 {
   appointment->uid          = get_ical_uid (ical);
+  appointment->uri          = get_source_uri (source->source);
   appointment->summary      = get_ical_summary (ical);
   appointment->description  = get_ical_description (ical);
   appointment->color_string = get_source_color (source->source);
Index: calendar-client.h
===================================================================
RCS file: /cvs/gnome/gnome-panel/applets/clock/calendar-client.h,v
retrieving revision 1.5
diff -u -r1.5 calendar-client.h
--- calendar-client.h	7 Jun 2005 15:30:47 -0000	1.5
+++ calendar-client.h	19 Jul 2005 21:14:59 -0000
@@ -73,6 +73,7 @@
 typedef struct
 {
   char   *uid;
+  char   *uri;
   char   *summary;
   char   *description;
   char   *color_string;
Index: clock.c
===================================================================
RCS file: /cvs/gnome/gnome-panel/applets/clock/clock.c,v
retrieving revision 1.167
diff -u -r1.167 clock.c
--- clock.c	18 Jul 2005 12:15:45 -0000	1.167
+++ clock.c	19 Jul 2005 21:15:11 -0000
@@ -117,12 +117,18 @@
         GtkWidget *calendar;
 
 #ifdef HAVE_LIBECAL
-        GtkWidget *task_list;
         GtkWidget *appointment_list;
+        GtkWidget *birthday_list;
+        GtkWidget *weather_list;
+        GtkWidget *task_list;
         
         GtkListStore       *appointments_model;
         GtkListStore       *tasks_model;
+
+        GtkTreeModelFilter *appointments_filter;
+        GtkTreeModelFilter *birthdays_filter;
         GtkTreeModelFilter *tasks_filter;
+        GtkTreeModelFilter *weather_filter;
 
         CalendarClient *client;
 #endif /* HAVE_LIBECAL */
@@ -455,9 +461,22 @@
                 g_object_unref (cd->tasks_model);
         cd->tasks_model = NULL;
         
+        if (cd->appointments_filter)
+                g_object_unref (cd->appointments_filter);
+        cd->appointments_filter = NULL;
+
+        if (cd->birthdays_filter)
+                g_object_unref (cd->birthdays_filter);
+        cd->birthdays_filter = NULL;
+        
         if (cd->tasks_filter)
                 g_object_unref (cd->tasks_filter);
         cd->tasks_filter = NULL;
+
+        if (cd->weather_filter)
+                g_object_unref (cd->weather_filter);
+        cd->weather_filter = NULL;
+        
 #endif /* HAVE_LIBECAL */
 
 	if (cd->about)
@@ -531,13 +550,14 @@
 
 enum {
         APPOINTMENT_COLUMN_UID,
+        APPOINTMENT_COLUMN_URI,
         APPOINTMENT_COLUMN_SUMMARY,
         APPOINTMENT_COLUMN_DESCRIPTION,
         APPOINTMENT_COLUMN_START_TIME,
         APPOINTMENT_COLUMN_START_TEXT,
         APPOINTMENT_COLUMN_END_TIME,
         APPOINTMENT_COLUMN_ALL_DAY,
-        APPOINTMENT_COLUMN_COLOR,
+        APPOINTMENT_COLUMN_ICON,
         N_APPOINTMENT_COLUMNS
 };
 
@@ -721,6 +741,60 @@
 }
 
 static gboolean
+filter_appointments (GtkTreeModel *model,
+        GtkTreeIter *iter,
+        ClockData *cd)
+{
+    gchar *uri;
+    
+    gtk_tree_model_get (model, iter,
+            APPOINTMENT_COLUMN_URI, &uri,
+            -1);
+    if (uri) {
+        if (strcmp(uri, "file") == 0) {
+            return TRUE;
+        }
+    }
+    return FALSE;
+}
+
+static gboolean
+filter_birthdays (GtkTreeModel *model,
+        GtkTreeIter *iter,
+        ClockData *cd)
+{
+    gchar *uri;
+    
+    gtk_tree_model_get (model, iter,
+            APPOINTMENT_COLUMN_URI, &uri,
+            -1);
+    if (uri) {
+        if (strcmp(uri, "contacts") == 0) {
+            return TRUE;
+        }
+    }
+    return FALSE;
+}
+    
+static gboolean
+filter_weather (GtkTreeModel *model,
+        GtkTreeIter *iter,
+        ClockData *cd)
+{
+    gchar *uri;
+    
+    gtk_tree_model_get (model, iter,
+            APPOINTMENT_COLUMN_URI, &uri,
+            -1);
+    if (uri) {
+        if (strcmp(uri, "weather") == 0) {
+            return TRUE;
+        }
+    }
+    return FALSE;
+}
+    
+static gboolean
 filter_out_tasks (GtkTreeModel *model,
                   GtkTreeIter  *iter,
                   ClockData    *cd)
@@ -856,6 +930,91 @@
                 g_free (color_string);
         }
 }
+static void
+set_renderer_pixbuf_pixmap_for_bday (GtkCellRenderer *renderer,
+                                     GtkTreeModel    *model,
+                                     GtkTreeIter     *iter,
+                                     gint             data_column)
+{
+    gchar     *path   = NULL;
+    gchar     *type   = NULL;
+    GdkPixbuf *pixbuf = NULL;
+    GError    *error  = NULL;
+
+        
+    gtk_tree_model_get (model, iter, data_column, &type, -1); 
+    /* type should be in format like this:
+     * pas-id-4121A93E00000001-anniversary
+     * pas-id-41112AF900000003-birthday 
+     * ...
+     **/
+    if (type) {
+        /* First check for birthday */
+        if (g_strrstr (type, "birthday") != 0) {
+            path = g_strdup_printf ("%s/%s", 
+                    CLOCK_ICONDIR, "icon_birthday_16.png");
+        } else if (g_strrstr (type, "anniversary") != 0) {
+            path = g_strdup_printf ("%s/%s", 
+                    CLOCK_ICONDIR, "icon_anniversary_16.png");
+        } else {
+            path = g_strdup_printf ("%s/%s", 
+                    CLOCK_ICONDIR, "icon_unknown_16.png");
+        }
+    } else 
+        return;
+
+    g_free(type);
+
+    pixbuf = gdk_pixbuf_new_from_file (path, &error);
+    if (error) {
+        g_warning ("Cannot load '%s': %s", path, error->message);
+        g_error_free (error);
+        g_free (path);
+        return;
+    }
+
+    g_object_set (renderer, "visible", pixbuf != NULL, "pixbuf", pixbuf, NULL);
+
+    if (pixbuf) {
+        g_object_unref (pixbuf);
+    }
+
+    g_free (path);
+
+    return;
+}
+
+static void
+set_renderer_pixbuf_pixmap_for_weather (GtkCellRenderer *renderer,
+                                        GtkTreeModel    *model,
+                                        GtkTreeIter     *iter)
+{
+    gchar     *path   = NULL;
+    GdkPixbuf *pixbuf = NULL;
+    GError    *error  = NULL;
+
+        
+    path = g_strdup_printf ("%s/%s", 
+                    CLOCK_ICONDIR, "icon_weather_16.png");
+
+    pixbuf = gdk_pixbuf_new_from_file (path, &error);
+    if (error) {
+        g_warning ("Cannot load '%s': %s", path, error->message);
+        g_error_free (error);
+        g_free (path);
+        return;
+    }
+
+    g_object_set (renderer, "visible", pixbuf != NULL, "pixbuf", pixbuf, NULL);
+
+    if (pixbuf) {
+        g_object_unref (pixbuf);
+    }
+
+    g_free (path);
+
+    return;
+}
 
 static void
 task_pixbuf_cell_data_func (GtkTreeViewColumn *column,
@@ -880,7 +1039,35 @@
         set_renderer_pixbuf_color_by_column (renderer,
                                              model,
                                              iter,
-                                             APPOINTMENT_COLUMN_COLOR);
+                                             APPOINTMENT_COLUMN_ICON);
+}
+static void
+birthday_pixbuf_cell_data_func (GtkTreeViewColumn   *column,
+                                GtkCellRenderer     *renderer,
+                                GtkTreeModel        *model,
+                                GtkTreeIter         *iter,
+                                gpointer             data)
+{
+
+    /* APPOINTMENT_COLUMN_UID contains data to select between
+     * anniversary or birthday
+     */
+    set_renderer_pixbuf_pixmap_for_bday (renderer,
+                                         model,
+                                         iter,
+                                         APPOINTMENT_COLUMN_UID);
+}
+static void
+weather_pixbuf_cell_data_func (GtkTreeViewColumn   *column,
+                                GtkCellRenderer     *renderer,
+                                GtkTreeModel        *model,
+                                GtkTreeIter         *iter,
+                                gpointer             data)
+{
+
+    set_renderer_pixbuf_pixmap_for_weather (renderer,
+                                            model,
+                                            iter);
 }
 
 static int
@@ -1084,13 +1271,14 @@
                 gtk_list_store_append (cd->appointments_model, &iter);
                 gtk_list_store_set (cd->appointments_model, &iter,
                                     APPOINTMENT_COLUMN_UID,         appointment->uid,
+                                    APPOINTMENT_COLUMN_URI,         appointment->uri,
                                     APPOINTMENT_COLUMN_SUMMARY,     appointment->summary,
                                     APPOINTMENT_COLUMN_DESCRIPTION, appointment->description,
                                     APPOINTMENT_COLUMN_START_TIME,  appointment->start_time,
                                     APPOINTMENT_COLUMN_START_TEXT,  start_text,
                                     APPOINTMENT_COLUMN_END_TIME,    appointment->end_time,
                                     APPOINTMENT_COLUMN_ALL_DAY,     appointment->is_all_day,
-                                    APPOINTMENT_COLUMN_COLOR  ,     appointment->color_string,
+                                    APPOINTMENT_COLUMN_ICON,        appointment->color_string,
                                     -1);
 
                 g_free (start_text);
@@ -1098,7 +1286,9 @@
         }
         g_slist_free (events);
 
-        update_frame_visibility (cd->appointment_list, GTK_TREE_MODEL (cd->appointments_model));
+        update_frame_visibility (cd->appointment_list, GTK_TREE_MODEL (cd->appointments_filter));
+        update_frame_visibility (cd->birthday_list, GTK_TREE_MODEL (cd->birthdays_filter));
+        update_frame_visibility (cd->weather_list, GTK_TREE_MODEL (cd->weather_filter));
 }
 
 static GtkWidget *
@@ -1127,6 +1317,7 @@
                 cd->appointments_model =
                         gtk_list_store_new (N_APPOINTMENT_COLUMNS,
                                             G_TYPE_STRING,   /* uid              */
+                                            G_TYPE_STRING,   /* uri              */
                                             G_TYPE_STRING,   /* summary          */
                                             G_TYPE_STRING,   /* description      */
                                             G_TYPE_LONG,     /* start time       */
@@ -1140,8 +1331,18 @@
                                                       GTK_SORT_ASCENDING);
 
         }
+        if (!cd->appointments_filter) {
+            cd->appointments_filter = GTK_TREE_MODEL_FILTER (
+                    gtk_tree_model_filter_new (GTK_TREE_MODEL (cd->appointments_model),
+                        NULL));
+            gtk_tree_model_filter_set_visible_func (
+                    cd->appointments_filter,
+                    (GtkTreeModelFilterVisibleFunc) filter_appointments,
+                    cd,
+                    NULL);
+        }
 
-        *tree_view = view = gtk_tree_view_new_with_model (GTK_TREE_MODEL (cd->appointments_model));
+        *tree_view = view = gtk_tree_view_new_with_model (GTK_TREE_MODEL (cd->appointments_filter));
         gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (view), FALSE);
 
         /* Source color */
@@ -1177,6 +1378,166 @@
         return vbox;
 }
 
+static GtkWidget *
+create_birthday_list (ClockData  *cd,
+                         GtkWidget **tree_view,
+                         GtkWidget **scrolled_window)
+{
+        GtkWidget         *vbox;
+        GtkWidget         *view;
+        GtkWidget         *scrolled;
+        GtkCellRenderer   *cell;
+        GtkTreeViewColumn *column;
+
+        vbox = create_hig_frame ( _("Birthdays and Anniversaries"));
+
+        *scrolled_window = scrolled = gtk_scrolled_window_new (NULL, NULL);
+        gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled),
+                                             GTK_SHADOW_IN);
+        gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled),
+                                        GTK_POLICY_NEVER,
+                                        GTK_POLICY_AUTOMATIC);
+        gtk_box_pack_start (GTK_BOX (vbox), scrolled, TRUE, TRUE, 0);
+        gtk_widget_show (scrolled);
+
+        if (!cd->appointments_model) {
+                cd->appointments_model =
+                        gtk_list_store_new (N_APPOINTMENT_COLUMNS,
+                                            G_TYPE_STRING,   /* uid              */
+                                            G_TYPE_STRING,   /* uri              */
+                                            G_TYPE_STRING,   /* summary          */
+                                            G_TYPE_STRING,   /* description      */
+                                            G_TYPE_LONG,     /* start time       */
+                                            G_TYPE_STRING,   /* start time text  */
+                                            G_TYPE_LONG,     /* end time         */
+                                            G_TYPE_BOOLEAN,  /* all day          */
+                                            G_TYPE_STRING);  /* color            */
+
+                gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (cd->appointments_model),
+                                                      APPOINTMENT_COLUMN_START_TIME,
+                                                      GTK_SORT_ASCENDING);
+
+        }
+        if (!cd->birthdays_filter) {
+            cd->birthdays_filter = GTK_TREE_MODEL_FILTER (
+                    gtk_tree_model_filter_new (GTK_TREE_MODEL (cd->appointments_model),
+                        NULL));
+            gtk_tree_model_filter_set_visible_func (
+                    cd->birthdays_filter,
+                    (GtkTreeModelFilterVisibleFunc) filter_birthdays,
+                    cd,
+                    NULL);
+        }
+
+        *tree_view = view = gtk_tree_view_new_with_model (GTK_TREE_MODEL (cd->birthdays_filter));
+        gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (view), FALSE);
+
+        /* Icon */
+        column = gtk_tree_view_column_new ();
+        cell = gtk_cell_renderer_pixbuf_new ();
+        gtk_tree_view_column_pack_start (column, cell, TRUE);
+        gtk_tree_view_column_set_cell_data_func (column, cell,
+                                                 (GtkTreeCellDataFunc) birthday_pixbuf_cell_data_func,
+                                                 NULL, NULL);
+        gtk_tree_view_append_column (GTK_TREE_VIEW (view), column);
+
+        /* FIXME: Figure out how to get rid of useless localized message */
+        /* Summary */
+        column = gtk_tree_view_column_new ();
+        cell = gtk_cell_renderer_text_new ();
+        g_object_set (cell, "ellipsize", PANGO_ELLIPSIZE_END, NULL);
+        gtk_tree_view_column_pack_start (column, cell, TRUE);
+        gtk_tree_view_column_add_attribute (column, cell,
+                                            "text", APPOINTMENT_COLUMN_SUMMARY);
+        gtk_tree_view_append_column (GTK_TREE_VIEW (view), column);
+
+        gtk_container_add (GTK_CONTAINER (scrolled), view);
+
+        gtk_widget_show (view);
+
+        return vbox;
+}
+
+static GtkWidget *
+create_weather_list (ClockData  *cd,
+                         GtkWidget **tree_view,
+                         GtkWidget **scrolled_window)
+{
+        GtkWidget         *vbox;
+        GtkWidget         *view;
+        GtkWidget         *scrolled;
+        GtkCellRenderer   *cell;
+        GtkTreeViewColumn *column;
+
+        vbox = create_hig_frame ( _("Weather Information"));
+
+        *scrolled_window = scrolled = gtk_scrolled_window_new (NULL, NULL);
+        gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled),
+                                             GTK_SHADOW_IN);
+        gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled),
+                                        GTK_POLICY_NEVER,
+                                        GTK_POLICY_AUTOMATIC);
+        gtk_box_pack_start (GTK_BOX (vbox), scrolled, TRUE, TRUE, 0);
+        gtk_widget_show (scrolled);
+
+        if (!cd->appointments_model) {
+                cd->appointments_model =
+                        gtk_list_store_new (N_APPOINTMENT_COLUMNS,
+                                            G_TYPE_STRING,   /* uid              */
+                                            G_TYPE_STRING,   /* uri              */
+                                            G_TYPE_STRING,   /* summary          */
+                                            G_TYPE_STRING,   /* description      */
+                                            G_TYPE_LONG,     /* start time       */
+                                            G_TYPE_STRING,   /* start time text  */
+                                            G_TYPE_LONG,     /* end time         */
+                                            G_TYPE_BOOLEAN,  /* all day          */
+                                            G_TYPE_STRING);  /* color            */
+
+                gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (cd->appointments_model),
+                                                      APPOINTMENT_COLUMN_START_TIME,
+                                                      GTK_SORT_ASCENDING);
+
+        }
+        if (!cd->weather_filter) {
+                cd->weather_filter = GTK_TREE_MODEL_FILTER (
+                        gtk_tree_model_filter_new (GTK_TREE_MODEL (cd->appointments_model),
+                                                   NULL));
+                gtk_tree_model_filter_set_visible_func (
+                         cd->weather_filter,
+                         (GtkTreeModelFilterVisibleFunc) filter_weather,
+                         cd,
+                         NULL);
+        }
+
+        *tree_view = view = gtk_tree_view_new_with_model (GTK_TREE_MODEL (cd->weather_filter));
+        gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (view), FALSE);
+
+        /* FIXME: Better formatting... */
+        /* Source color */
+        column = gtk_tree_view_column_new ();
+        cell = gtk_cell_renderer_pixbuf_new ();
+        gtk_tree_view_column_pack_start (column, cell, TRUE);
+        gtk_tree_view_column_set_cell_data_func (column, cell,
+                                                 (GtkTreeCellDataFunc) weather_pixbuf_cell_data_func,
+                                                 NULL, NULL);
+        gtk_tree_view_append_column (GTK_TREE_VIEW (view), column);
+
+        /* Summary */
+        column = gtk_tree_view_column_new ();
+        cell = gtk_cell_renderer_text_new ();
+        g_object_set (cell, "ellipsize", PANGO_ELLIPSIZE_END, NULL);
+        gtk_tree_view_column_pack_start (column, cell, TRUE);
+        gtk_tree_view_column_add_attribute (column, cell,
+                                            "text", APPOINTMENT_COLUMN_SUMMARY);
+        gtk_tree_view_append_column (GTK_TREE_VIEW (view), column);
+
+        gtk_container_add (GTK_CONTAINER (scrolled), view);
+
+        gtk_widget_show (view);
+
+        return vbox;
+}
+
 static void
 calendar_day_activated (ClockData *cd)
 {
@@ -1274,20 +1635,36 @@
         setup_list_size_constraint (scrolled_window, cd->calendar, tree_view);
         update_frame_visibility (cd->task_list, GTK_TREE_MODEL (cd->tasks_model));
 
+        cd->birthday_list = create_birthday_list (cd, &tree_view, &scrolled_window);
+        g_object_add_weak_pointer (G_OBJECT (cd->birthday_list),
+                                   (gpointer *) &cd->birthday_list);
+        setup_list_size_constraint (scrolled_window, cd->calendar, tree_view);
+        update_frame_visibility (cd->birthday_list, GTK_TREE_MODEL (cd->appointments_model));
+
+        cd->weather_list = create_weather_list (cd, &tree_view, &scrolled_window);
+        g_object_add_weak_pointer (G_OBJECT (cd->weather_list),
+                                   (gpointer *) &cd->weather_list);
+        setup_list_size_constraint (scrolled_window, cd->calendar, tree_view);
+        update_frame_visibility (cd->weather_list, GTK_TREE_MODEL (cd->appointments_model));
+
         cd->appointment_list = create_appointment_list (cd, &tree_view, &scrolled_window);
         g_object_add_weak_pointer (G_OBJECT (cd->appointment_list),
                                    (gpointer *) &cd->appointment_list);
         setup_list_size_constraint (scrolled_window, cd->calendar, tree_view);
         update_frame_visibility (cd->appointment_list, GTK_TREE_MODEL (cd->appointments_model));
-
+        
         switch (cd->orient) {
         case PANEL_APPLET_ORIENT_UP:
+                gtk_box_pack_start (GTK_BOX (vbox), cd->weather_list, TRUE, TRUE, 0);
+                gtk_box_pack_start (GTK_BOX (vbox), cd->birthday_list, TRUE, TRUE, 0);
                 gtk_box_pack_start (GTK_BOX (vbox), cd->appointment_list, TRUE, TRUE, 0);
                 gtk_box_pack_start (GTK_BOX (vbox), cd->task_list, TRUE, TRUE, 0);
                 break;
         default:
                 gtk_box_pack_start (GTK_BOX (vbox), cd->task_list, TRUE, TRUE, 0);
                 gtk_box_pack_start (GTK_BOX (vbox), cd->appointment_list, TRUE, TRUE, 0);
+                gtk_box_pack_start (GTK_BOX (vbox), cd->birthday_list, TRUE, TRUE, 0);
+                gtk_box_pack_start (GTK_BOX (vbox), cd->weather_list, TRUE, TRUE, 0);
                 break;
         }
 
@@ -1509,8 +1886,14 @@
 
         if (cd->calendar_popup && GTK_WIDGET_REALIZED (cd->toggle)) {
 #ifdef HAVE_LIBECAL
+                if (cd->appointments_filter && cd->appointment_list)
+                        gtk_tree_model_filter_refilter (cd->appointments_filter);
+                if (cd->birthdays_filter && cd->birthday_list)
+                        gtk_tree_model_filter_refilter (cd->birthdays_filter);
                 if (cd->tasks_filter && cd->task_list)
                         gtk_tree_model_filter_refilter (cd->tasks_filter);
+                if (cd->weather_filter && cd->weather_list)
+                        gtk_tree_model_filter_refilter (cd->weather_filter);
 #endif
 
                 present_calendar_popup (cd, cd->calendar_popup, cd->toggle);
