Commit c5238a00 authored by Vincent Untz's avatar Vincent Untz Committed by Vincent Untz
Browse files

Have separate treeviews for appointments, birthdays and weather. Use

2007-05-20  Vincent Untz  <vuntz@gnome.org>

	Have separate treeviews for appointments, birthdays and weather.
	Use GtkExpander to let the user hide them.
	Fix most of bug #165732
	Based on patch by Priit Laes <amd@store20.com>

	* Makefile.am: prepare for installation of some icons, even if we
	don't install some right now. This might get reverted later.
	* calendar-client.[ch]: (get_source_uri): new
	(calendar_appointment_equal): take into account the uri
	(calendar_appointment_copy): ditto
	(calendar_appointment_finalize): ditto
	(calendar_appointment_init): ditto
	* clock.c: (destroy_clock): updated for new treeviews
	(is_appointment): new
	(is_birthday): new
	(is_weather): new
	(create_hig_frame): kill
	(set_renderer_pixbuf_pixmap_for_bday): new
	(set_renderer_pixbuf_pixmap_for_weather): new
	(appointment_pixbuf_cell_data_func): small update
	(birthday_pixbuf_cell_data_func): new
	(weather_pixbuf_cell_data_func): new
	(clock_expander_activated): new
	(create_task_list): use a GtkExpander instead of a frame
	(handle_appointments_changed): small update
	(create_list_for_appointment_model): new, mostly based on
	create_appointment_list(), but with a GtkExpander and made more
	generic
	(create_appointment_list): call create_list_for_appointment_model()
	(create_birthday_list): new
	(create_weather_list): new
	(add_appointments_and_tasks): updated
	(update_popup): updated
	(fill_clock_applet): updated

svn path=/trunk/; revision=10401
parent 7a3396a3
2007-05-20 Vincent Untz <vuntz@gnome.org>
Have separate treeviews for appointments, birthdays and weather.
Use GtkExpander to let the user hide them.
Fix most of bug #165732
Based on patch by Priit Laes <amd@store20.com>
* Makefile.am: prepare for installation of some icons, even if we
don't install some right now. This might get reverted later.
* calendar-client.[ch]: (get_source_uri): new
(calendar_appointment_equal): take into account the uri
(calendar_appointment_copy): ditto
(calendar_appointment_finalize): ditto
(calendar_appointment_init): ditto
* clock.c: (destroy_clock): updated for new treeviews
(is_appointment): new
(is_birthday): new
(is_weather): new
(create_hig_frame): kill
(set_renderer_pixbuf_pixmap_for_bday): new
(set_renderer_pixbuf_pixmap_for_weather): new
(appointment_pixbuf_cell_data_func): small update
(birthday_pixbuf_cell_data_func): new
(weather_pixbuf_cell_data_func): new
(clock_expander_activated): new
(create_task_list): use a GtkExpander instead of a frame
(handle_appointments_changed): small update
(create_list_for_appointment_model): new, mostly based on
create_appointment_list(), but with a GtkExpander and made more
generic
(create_appointment_list): call create_list_for_appointment_model()
(create_birthday_list): new
(create_weather_list): new
(add_appointments_and_tasks): updated
(update_popup): updated
(fill_clock_applet): updated
==================== 2.19.2 ====================
2007-05-13 Vincent Untz <vuntz@gnome.org>
......
......@@ -6,6 +6,7 @@ INCLUDES = \
$(WARN_CFLAGS) \
$(CLOCK_CFLAGS) \
-DDATADIR=\""$(datadir)"\" \
-DCLOCK_ICONDIR=\""$(clockbitmapsdir)"\" \
-DLIBDIR=\""$(libdir)"\" \
-DSYSCONFDIR=\""$(sysconfdir)"\" \
-DPREFIX=\""$(prefix)"\" \
......@@ -19,6 +20,11 @@ CALENDAR_SOURCES = \
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_SOURCES = clock.c $(CALENDAR_SOURCES)
......@@ -81,8 +87,12 @@ install-data-local:
endif
EXTRA_DIST = \
$(CLOCK_BITMAPS) \
GNOME_ClockApplet_Factory.server.in.in \
$(schemas_in_files) \
$(ui_DATA)
clockbitmapsdir = $(datadir)/gnome-panel/pixmaps/clock
clockbitmaps_DATA = $(CLOCK_BITMAPS)
CLEANFILES = $(server_in_files) $(server_DATA) $(schemas_DATA)
......@@ -672,6 +672,31 @@ get_source_color (ECal *esource)
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;
}
g_strfreev (list);
}
return NULL;
}
static inline int
null_safe_strcmp (const char *a,
const char *b)
......@@ -700,6 +725,7 @@ calendar_appointment_equal (CalendarAppointment *a,
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 &&
......@@ -731,6 +757,7 @@ calendar_appointment_copy (CalendarAppointment *appointment,
}
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);
......@@ -752,6 +779,9 @@ calendar_appointment_finalize (CalendarAppointment *appointment)
g_free (appointment->uid);
appointment->uid = NULL;
g_free (appointment->uri);
appointment->uri = NULL;
g_free (appointment->summary);
appointment->summary = NULL;
......@@ -773,6 +803,7 @@ calendar_appointment_init (CalendarAppointment *appointment,
{
appointment->uid = get_ical_uid (ical);
appointment->rid = get_ical_rid (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);
......
......@@ -73,6 +73,7 @@ typedef struct
{
char *uid;
char *rid;
char *uri;
char *summary;
char *description;
char *color_string;
......
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment