|
From: <si...@us...> - 2008-08-05 21:22:23
|
Revision: 548
http://osmo-pim.svn.sourceforge.net/osmo-pim/?rev=548&view=rev
Author: silloz
Date: 2008-08-05 21:22:30 +0000 (Tue, 05 Aug 2008)
Log Message:
-----------
* Refactoring stage #11
Modified Paths:
--------------
trunk/src/calendar.c
trunk/src/calendar_notes.c
trunk/src/calendar_notes.h
trunk/src/check_events.c
trunk/src/gui.c
trunk/src/options_gui_calendar.c
Modified: trunk/src/calendar.c
===================================================================
--- trunk/src/calendar.c 2008-08-04 22:20:37 UTC (rev 547)
+++ trunk/src/calendar.c 2008-08-05 21:22:30 UTC (rev 548)
@@ -111,29 +111,36 @@
/*------------------------------------------------------------------------------*/
void
-calendar_update_note (guint uday, guint umonth, guint uyear, gchar *color, GUI *appGUI) {
-
+calendar_update_note (guint uday, guint umonth, guint uyear, gchar *color, GUI *appGUI)
+{
GtkTextBuffer *textbuffer;
GtkTextIter iter_start, iter_end;
gchar *text;
+GDate *date;
- textbuffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(appGUI->cal->calendar_note_textview));
- gtk_text_buffer_get_iter_at_offset(GTK_TEXT_BUFFER(textbuffer), &iter_start, 0);
- gtk_text_buffer_get_iter_at_offset(GTK_TEXT_BUFFER(textbuffer), &iter_end, -1);
+ date = g_date_new_dmy (uday, umonth + 1, uyear);
+ g_return_if_fail (date != NULL);
- text = gtk_text_buffer_get_text(GTK_TEXT_BUFFER(textbuffer), &iter_start, &iter_end, TRUE);
+ textbuffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (appGUI->cal->calendar_note_textview));
+ gtk_text_buffer_get_start_iter (GTK_TEXT_BUFFER (textbuffer), &iter_start);
+ gtk_text_buffer_get_end_iter (GTK_TEXT_BUFFER (textbuffer), &iter_end);
+ text = gtk_text_buffer_get_text (GTK_TEXT_BUFFER (textbuffer), &iter_start, &iter_end, TRUE);
- if (text != NULL) {
- if (strlen(text)) {
- calendar_refresh_marks(appGUI);
- update_aux_calendars (appGUI);
- add_note (uday, umonth+1, uyear, color, text, appGUI);
- } else {
- remove_note (uday, umonth+1, uyear, appGUI);
- }
- }
+ if (text != NULL) {
- set_day_info (uday, umonth, uyear, appGUI);
+ if (strlen (text)) {
+ calendar_refresh_marks (appGUI);
+ update_aux_calendars (appGUI);
+ cal_add_note (date, color, text, appGUI);
+ } else {
+ remove_note (uday, umonth + 1, uyear, appGUI);
+ }
+
+ g_free (text);
+ }
+
+ set_day_info (uday, umonth, uyear, appGUI);
+ g_date_free (date);
}
/*------------------------------------------------------------------------------*/
@@ -806,7 +813,7 @@
gui_systray_tooltip_update(appGUI);
update_aux_calendars (appGUI);
if (config.save_data_after_modification) {
- write_notes (appGUI);
+ cal_write_notes (appGUI);
}
} else {
gtk_widget_show(appGUI->cal->notes_vbox);
@@ -935,7 +942,7 @@
mark_days_with_notes (appGUI->cal->day, appGUI->cal->month, appGUI->cal->year, appGUI);
gui_systray_tooltip_update (appGUI);
if (config.save_data_after_modification) {
- write_notes (appGUI);
+ cal_write_notes (appGUI);
}
}
g_free (text);
@@ -1101,14 +1108,17 @@
calendar_store_note (GUI *appGUI)
{
gchar *text;
+GDate *date;
- text = calendar_get_note_text(appGUI);
+ date = g_date_new_dmy (appGUI->cal->day, appGUI->cal->month + 1, appGUI->cal->year);
+ g_return_if_fail (date != NULL);
- if (config.day_notes_visible && strlen(text)) {
- add_note (appGUI->cal->day, appGUI->cal->month + 1, appGUI->cal->year,
- get_color(appGUI->cal->day, appGUI->cal->month + 1, appGUI->cal->year, appGUI),
- text, appGUI);
- }
+ text = calendar_get_note_text (appGUI);
+
+ if (config.day_notes_visible && strlen (text))
+ cal_add_note (date, get_color (appGUI->cal->day, appGUI->cal->month + 1, appGUI->cal->year, appGUI), text, appGUI);
+
+ g_date_free (date);
}
/*------------------------------------------------------------------------------*/
@@ -1391,7 +1401,7 @@
popup_browse_notes_cb (gpointer user_data)
{
GUI *appGUI = (GUI *) user_data;
- calendar_notes_browser (appGUI);
+ cal_notes_browser (appGUI);
}
/*------------------------------------------------------------------------------*/
@@ -1865,28 +1875,26 @@
/*------------------------------------------------------------------------------*/
void
-colors_category_selected (GUI *appGUI) {
-
+colors_category_selected (GUI *appGUI)
+{
GtkTreeIter iter;
GtkTreeModel *model;
+GDate *date;
gchar *color_val;
gint n;
- if (gtk_tree_selection_get_selected (appGUI->cal->colors_category_select, &model, &iter)) {
- gtk_tree_model_get(GTK_TREE_MODEL(appGUI->cal->colors_category_store), &iter, 1, &color_val, 3, &n, -1);
- if (n) {
- add_note (appGUI->cal->day, appGUI->cal->month+1, appGUI->cal->year,
- color_val, calendar_get_note_text(appGUI), appGUI);
- } else {
- add_note (appGUI->cal->day, appGUI->cal->month+1, appGUI->cal->year,
- NULL, calendar_get_note_text(appGUI), appGUI);
- }
- mark_days_with_notes (appGUI->cal->day, appGUI->cal->month, appGUI->cal->year, appGUI);
- g_free(color_val);
- select_bg_color_close_cb (NULL, NULL, appGUI);
- update_aux_calendars (appGUI);
- }
+ date = g_date_new_dmy (appGUI->cal->day, appGUI->cal->month + 1, appGUI->cal->year);
+ g_return_if_fail (date != NULL);
+ if (gtk_tree_selection_get_selected (appGUI->cal->colors_category_select, &model, &iter)) {
+ gtk_tree_model_get (GTK_TREE_MODEL (appGUI->cal->colors_category_store), &iter, 1, &color_val, 3, &n, -1);
+ cal_add_note (date, color_val, calendar_get_note_text (appGUI), appGUI);
+ mark_days_with_notes (appGUI->cal->day, appGUI->cal->month, appGUI->cal->year, appGUI);
+ if (color_val != NULL) g_free (color_val);
+ select_bg_color_close_cb (NULL, NULL, appGUI);
+ update_aux_calendars (appGUI);
+ }
+
}
/*------------------------------------------------------------------------------*/
Modified: trunk/src/calendar_notes.c
===================================================================
--- trunk/src/calendar_notes.c 2008-08-04 22:20:37 UTC (rev 547)
+++ trunk/src/calendar_notes.c 2008-08-05 21:22:30 UTC (rev 548)
@@ -31,6 +31,27 @@
/*------------------------------------------------------------------------------*/
gboolean
+cal_check_note (GDate *date, GUI *appGUI)
+{
+GSList *lnode;
+struct note *a;
+gint i;
+
+ g_return_val_if_fail (appGUI->cal->notes_list != NULL, FALSE);
+
+ for (i = 0, lnode = appGUI->cal->notes_list; lnode != NULL; lnode = lnode->next, i++) {
+ a = g_slist_nth_data (appGUI->cal->notes_list, i);
+
+ if (a->date == g_date_get_julian (date))
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+/*------------------------------------------------------------------------------*/
+
+gboolean
check_note (guint day, guint month, guint year, GUI *appGUI) {
GSList *lnode;
@@ -54,6 +75,27 @@
/*------------------------------------------------------------------------------*/
gchar *
+cal_get_note (GDate *date, GUI *appGUI)
+{
+GSList *lnode;
+struct note *a;
+gint i;
+
+ g_return_val_if_fail (appGUI->cal->notes_list != NULL, NULL);
+
+ for (i = 0, lnode = appGUI->cal->notes_list; lnode != NULL; lnode = lnode->next, i++) {
+ a = g_slist_nth_data (appGUI->cal->notes_list, i);
+
+ if (a->date == g_date_get_julian (date))
+ return a->note;
+ }
+
+ return NULL;
+}
+
+/*------------------------------------------------------------------------------*/
+
+gchar *
get_note (guint day, guint month, guint year, GUI *appGUI) {
GSList *lnode;
@@ -84,6 +126,27 @@
/*------------------------------------------------------------------------------*/
gchar *
+cal_get_note_color (GDate *date, GUI *appGUI)
+{
+GSList *lnode;
+struct note *a;
+gint i;
+
+ g_return_val_if_fail (appGUI->cal->notes_list != NULL, NULL);
+
+ for (i = 0, lnode = appGUI->cal->notes_list; lnode != NULL; lnode = lnode->next, i++) {
+ a = g_slist_nth_data (appGUI->cal->notes_list, i);
+
+ if (a->date == g_date_get_julian (date))
+ return a->color;
+ }
+
+ return NULL;
+}
+
+/*------------------------------------------------------------------------------*/
+
+gchar *
get_color (guint day, guint month, guint year, GUI *appGUI) {
GSList *lnode;
@@ -114,57 +177,70 @@
/*------------------------------------------------------------------------------*/
void
-replace_note_color (gchar *old_color, gchar *new_color, GUI *appGUI) {
-
+cal_replace_note_color (gchar *old_color, gchar *new_color, GUI *appGUI)
+{
GSList *lnode;
struct note *a;
gint i;
- if (appGUI->cal->notes_list != NULL) {
+ g_return_if_fail (appGUI->cal->notes_list != NULL);
- for (i = 0, lnode = appGUI->cal->notes_list; lnode != NULL; lnode = lnode->next, i++) {
+ for (i = 0, lnode = appGUI->cal->notes_list; lnode != NULL; lnode = lnode->next, i++) {
+ a = g_slist_nth_data (appGUI->cal->notes_list, i);
- a = g_slist_nth_data (appGUI->cal->notes_list, i);
-
- if (a->color != NULL) {
- if (!strncmp(a->color, old_color, MAXCOLORNAME)) {
- g_free(a->color);
- a->color = g_strdup(new_color);
- }
- }
-
- }
- }
+ if (a->color != NULL)
+ if (!strncmp (a->color, old_color, MAXCOLORNAME)) {
+ g_free (a->color);
+ a->color = g_strdup (new_color);
+ }
+ }
}
/*------------------------------------------------------------------------------*/
void
-add_note (guint day, guint month, guint year, gchar *color_str, gchar *text_note, GUI *appGUI) {
-
+cal_add_note (GDate *date, gchar *color_str, gchar *text_note, GUI *appGUI)
+{
struct note *a;
- if (text_note != NULL) {
+ g_return_if_fail (text_note != NULL);
- a = g_malloc(sizeof(struct note));
- g_assert (a != NULL);
+ a = g_malloc (sizeof (struct note));
+ g_assert (a != NULL);
- a->day = day;
- a->month = month;
- a->year = year;
+ a->date = g_date_get_julian (date);
+ a->day = g_date_get_day (date);
+ a->month = g_date_get_month (date);
+ a->year = g_date_get_year (date);
+ a->color = (color_str != NULL) ? g_strdup (color_str) : NULL;
+ a->note = g_strdup (text_note);
- if (color_str != NULL) {
- a->color = g_strdup(color_str);
- } else {
- a->color = NULL;
- }
+ remove_note (a->day, a->month, a->year, appGUI);
- a->note = g_strdup(text_note);
+ appGUI->cal->notes_list = g_slist_append (appGUI->cal->notes_list, a);
+}
- remove_note (day, month, year, appGUI); /* FIXME: check STACK here! */
+/*------------------------------------------------------------------------------*/
- appGUI->cal->notes_list = g_slist_append (appGUI->cal->notes_list, a);
- }
+void
+cal_remove_note (GDate *date, GUI *appGUI)
+{
+GSList *lnode;
+struct note *a;
+gint i;
+
+ g_return_if_fail (appGUI->cal->notes_list != NULL);
+
+ for (i = 0, lnode = appGUI->cal->notes_list; lnode != NULL; lnode = lnode->next, i++) {
+ a = g_slist_nth_data (appGUI->cal->notes_list, i);
+
+ if (a->date == g_date_get_julian (date)) {
+ if (a->color != NULL) g_free (a->color);
+ if (a->note != NULL) g_free (a->note);
+ appGUI->cal->notes_list = g_slist_remove (appGUI->cal->notes_list, a);
+ break;
+ }
+ }
}
/*------------------------------------------------------------------------------*/
@@ -199,43 +275,46 @@
/*------------------------------------------------------------------------------*/
void
-free_notes_list (GUI *appGUI) {
-
+cal_free_notes_list (GUI *appGUI)
+{
GSList *node;
struct note *a;
gint i = 0;
- for (node = appGUI->cal->notes_list; node != NULL; node = node->next, i++) {
- a = g_slist_nth_data (appGUI->cal->notes_list, i);
- if (a->color != NULL) {
- g_free(a->color);
- }
- if (a->note != NULL) {
- g_free(a->note);
- }
- }
+ if (appGUI->cal->notes_list != NULL) {
- if (appGUI->cal->notes_list != NULL) {
- g_slist_free(appGUI->cal->notes_list);
- appGUI->cal->notes_list = NULL;
- }
+ for (node = appGUI->cal->notes_list; node != NULL; node = node->next, i++) {
+ a = g_slist_nth_data (appGUI->cal->notes_list, i);
+ if (a->color != NULL) g_free (a->color);
+ if (a->note != NULL) g_free (a->note);
+ }
+
+ g_slist_free (appGUI->cal->notes_list);
+ appGUI->cal->notes_list = NULL;
+
+ }
}
/*------------------------------------------------------------------------------*/
void
-read_notes (GUI *appGUI)
+cal_read_notes (GUI *appGUI)
{
xmlDocPtr doc;
xmlChar *key, *prop;
xmlNodePtr node, cnode, category_node;
GtkTreeIter iter;
GdkPixbuf *image;
+guint32 julian;
gint day, month, year;
gchar *color_str, *note;
+GDate *date;
appGUI->cal->notes_list = NULL;
+ date = g_date_new ();
+ g_return_if_fail (date != NULL);
+
if (g_file_test (prefs_get_config_filename (CALENDAR_NOTES_FILENAME, appGUI), G_FILE_TEST_IS_REGULAR) == FALSE)
return;
@@ -275,6 +354,7 @@
if (!xmlStrcmp (node->name, (xmlChar *) "note")) {
cnode = node->xmlChildrenNode;
+ julian = 0;
day = month = year = 0;
color_str = NULL;
note = NULL;
@@ -283,19 +363,20 @@
utl_xml_get_int ("day", &day, cnode, doc);
utl_xml_get_int ("month", &month, cnode, doc);
utl_xml_get_int ("year", &year, cnode, doc);
+ utl_xml_get_uint ("date", &julian, cnode, doc);
utl_xml_get_str ("color", &color_str, cnode, doc);
utl_xml_get_str ("message", ¬e, cnode, doc);
+ cnode = cnode->next;
+ }
- if (note != NULL) {
- add_note (day, month, year, color_str, note, appGUI);
- if (color_str != NULL) g_free (color_str);
- g_free (note);
- note = NULL;
- }
+ if (note != NULL && (g_date_valid_dmy (day, month, year) || g_date_valid_julian (julian))) {
+ if (g_date_valid_julian (julian)) g_date_set_julian (date, julian);
+ else g_date_set_dmy (date, day, month, year);
- cnode = cnode->next;
+ cal_add_note (date, color_str, note, appGUI);
+ if (color_str != NULL) g_free (color_str);
+ g_free (note);
}
-
}
node = node->next;
@@ -307,58 +388,60 @@
xmlFreeDoc (doc);
}
+ g_date_free (date);
}
/*------------------------------------------------------------------------------*/
void
-write_notes (GUI *appGUI) {
-
-GSList *lnode;
-struct note *a;
-gint i;
+cal_write_notes (GUI *appGUI)
+{
xmlDocPtr doc;
xmlNodePtr main_node, node, note_node, dc_node;
xmlAttrPtr attr;
+GtkTreeIter iter;
+GSList *lnode;
+struct note *a;
gchar *category, *color_str;
-GtkTreeIter iter;
+gint i;
- if ((appGUI->save_status & WRT_CALENDAR_NOTES) != 0) return;
+ if ((appGUI->save_status & WRT_CALENDAR_NOTES) != 0) return;
- appGUI->save_status |= WRT_CALENDAR_NOTES;
+ appGUI->save_status |= WRT_CALENDAR_NOTES;
- doc = xmlNewDoc((const xmlChar *) "1.0");
- attr = xmlNewDocProp (doc, (const xmlChar *) "encoding", (const xmlChar *) "utf-8");
+ doc = xmlNewDoc ((const xmlChar *) "1.0");
+ attr = xmlNewDocProp (doc, (const xmlChar *) "encoding", (const xmlChar *) "utf-8");
- main_node = xmlNewNode(NULL, (const xmlChar *) CALENDAR_NOTES_NAME);
- xmlDocSetRootElement(doc, main_node);
+ main_node = xmlNewNode (NULL, (const xmlChar *) CALENDAR_NOTES_NAME);
+ xmlDocSetRootElement (doc, main_node);
- node = xmlNewChild(main_node, NULL, (const xmlChar *) CALENDAR_DAY_CATEGORIES_NAME, (xmlChar *) NULL);
+ node = xmlNewChild (main_node, NULL, (const xmlChar *) CALENDAR_DAY_CATEGORIES_NAME, (xmlChar *) NULL);
- i = 0;
+ i = 0;
- while (gtk_tree_model_iter_nth_child(GTK_TREE_MODEL(appGUI->opt->calendar_category_store), &iter, NULL, i++)) {
- gtk_tree_model_get(GTK_TREE_MODEL(appGUI->opt->calendar_category_store), &iter, 1, &color_str, 2, &category, -1);
- dc_node = xmlNewChild(node, NULL, (const xmlChar *) "name", (xmlChar *) category);
- g_free(category);
- xmlNewProp(dc_node, (const xmlChar *) "color", (xmlChar *) color_str);
- g_free(color_str);
- }
+ while (gtk_tree_model_iter_nth_child (GTK_TREE_MODEL (appGUI->opt->calendar_category_store), &iter, NULL, i++)) {
+ gtk_tree_model_get (GTK_TREE_MODEL (appGUI->opt->calendar_category_store), &iter, 1, &color_str, 2, &category, -1);
+ dc_node = xmlNewChild (node, NULL, (const xmlChar *) "name", (xmlChar *) category);
+ g_free (category);
+ xmlNewProp (dc_node, (const xmlChar *) "color", (xmlChar *) color_str);
+ g_free (color_str);
+ }
- for (i = 0, lnode = appGUI->cal->notes_list; lnode; lnode = lnode->next, i++) {
- a = g_slist_nth_data (appGUI->cal->notes_list, i);
- note_node = xmlNewChild(main_node, NULL, (const xmlChar *) "note", (xmlChar *) NULL);
+ for (i = 0, lnode = appGUI->cal->notes_list; lnode; lnode = lnode->next, i++) {
+ a = g_slist_nth_data (appGUI->cal->notes_list, i);
+ note_node = xmlNewChild (main_node, NULL, (const xmlChar *) "note", (xmlChar *) NULL);
+ utl_xml_put_uint ("date", a->date, note_node);
utl_xml_put_int ("day", a->day, note_node);
utl_xml_put_int ("month", a->month, note_node);
utl_xml_put_int ("year", a->year, note_node);
utl_xml_put_str ("color", a->color, note_node);
utl_xml_put_str ("message", a->note, note_node);
- }
+ }
- xmlSaveFormatFileEnc(prefs_get_config_filename(CALENDAR_NOTES_FILENAME, appGUI), doc, "utf-8", 1);
- xmlFreeDoc(doc);
+ xmlSaveFormatFileEnc (prefs_get_config_filename (CALENDAR_NOTES_FILENAME, appGUI), doc, "utf-8", 1);
+ xmlFreeDoc (doc);
- appGUI->save_status &= ~WRT_CALENDAR_NOTES;
+ appGUI->save_status &= ~WRT_CALENDAR_NOTES;
}
/*------------------------------------------------------------------------------*/
@@ -407,8 +490,8 @@
/*------------------------------------------------------------------------------*/
gchar *
-note_reformatting (gchar *note) {
-
+cal_note_remove_empty_lines (gchar *note)
+{
gchar *tmp_note;
gint j, k;
@@ -460,7 +543,7 @@
day_note = g_slist_nth_data (appGUI->cal->notes_list, i);
julian_day = date_to_julian (day_note->day, day_note->month-1, day_note->year);
- tmp_note = note_reformatting (day_note->note);
+ tmp_note = cal_note_remove_empty_lines (day_note->note);
if (search_string == NULL) {
show_flag = TRUE;
@@ -604,13 +687,11 @@
/*------------------------------------------------------------------------------*/
void
-notes_filter_changed_cb (GtkComboBox *widget, gpointer user_data) {
-
- GUI *appGUI = (GUI *)user_data;
-
- config.day_notes_browser_filter = gtk_combo_box_get_active (GTK_COMBO_BOX (appGUI->cal->notes_filter_combobox));
-
- refresh_notes_list (config.day_notes_browser_filter, NULL, appGUI);
+notes_filter_changed_cb (GtkComboBox *widget, gpointer user_data)
+{
+ GUI *appGUI = (GUI *) user_data;
+ config.day_notes_browser_filter = gtk_combo_box_get_active (GTK_COMBO_BOX (appGUI->cal->notes_filter_combobox));
+ refresh_notes_list (config.day_notes_browser_filter, NULL, appGUI);
}
/*------------------------------------------------------------------------------*/
@@ -666,18 +747,17 @@
/*------------------------------------------------------------------------------*/
void
-browser_past_notes_cb (GtkToggleButton *togglebutton, gpointer user_data) {
-
- GUI *appGUI = (GUI *)user_data;
-
- refresh_notes_list (config.day_notes_browser_filter, NULL, appGUI);
+browser_past_notes_cb (GtkToggleButton *togglebutton, gpointer user_data)
+{
+ GUI *appGUI = (GUI *)user_data;
+ refresh_notes_list (config.day_notes_browser_filter, NULL, appGUI);
}
/*------------------------------------------------------------------------------*/
void
-calendar_notes_browser (GUI *appGUI) {
-
+cal_notes_browser (GUI *appGUI)
+{
GtkWidget *vbox1;
GtkWidget *hbox1;
GtkWidget *scrolledwindow;
Modified: trunk/src/calendar_notes.h
===================================================================
--- trunk/src/calendar_notes.h 2008-08-04 22:20:37 UTC (rev 547)
+++ trunk/src/calendar_notes.h 2008-08-05 21:22:30 UTC (rev 548)
@@ -29,6 +29,7 @@
#define CALENDAR_NOTES_FILENAME "calendar_notes.xml"
struct note {
+ guint32 date;
guint day;
guint month;
guint year;
@@ -53,19 +54,24 @@
DAY_NOTES_NUM_COLUMNS
};
-void read_notes (GUI *appGUI);
-void write_notes (GUI *appGUI);
-void free_notes_list (GUI *appGUI);
+void cal_read_notes (GUI *appGUI);
+void cal_write_notes (GUI *appGUI);
+void cal_free_notes_list (GUI *appGUI);
+void cal_add_note (GDate *date, gchar *color_str, gchar *text_note, GUI *appGUI);
+gchar * cal_get_note (GDate *date, GUI *appGUI);
+void cal_remove_note (GDate *date, GUI *appGUI);
+gboolean cal_check_note (GDate *date, GUI *appGUI);
+gchar * cal_get_note_color (GDate *date, GUI *appGUI);
+void cal_replace_note_color (gchar *old_color, gchar *new_color, GUI *appGUI);
+void cal_notes_browser (GUI *appGUI);
+gchar * cal_note_remove_empty_lines (gchar *note);
+
+/* FIXME: REMOVE */
gboolean check_note (guint day, guint month, guint year, GUI *appGUI);
-void add_note (guint day, guint month, guint year,
- gchar *color_str, gchar *text_note, GUI *appGUI);
gchar * get_note (guint day, guint month, guint year, GUI *appGUI);
gchar * get_color (guint day, guint month, guint year, GUI *appGUI);
-void replace_note_color (gchar *old_color, gchar *new_color, GUI *appGUI);
void remove_note (guint day, guint month, guint year, GUI *appGUI);
-gchar * note_reformatting (gchar *note);
+/* FIXME: THIS */
-void calendar_notes_browser (GUI *appGUI);
-
#endif /* _CALENDAR_NOTES_H */
Modified: trunk/src/check_events.c
===================================================================
--- trunk/src/check_events.c 2008-08-04 22:20:37 UTC (rev 547)
+++ trunk/src/check_events.c 2008-08-05 21:22:30 UTC (rev 548)
@@ -893,7 +893,7 @@
while (j <= current_date) {
if (j == julian_day) {
- tmp_note = note_reformatting (day_note->note);
+ tmp_note = cal_note_remove_empty_lines (day_note->note);
gtk_list_store_append(appGUI->event_checker_list_store, &iter);
sprintf(date_str, "%s\n(%s)",
julian_to_str (julian_day, config.date_format), get_julianday_name(julian_day));
Modified: trunk/src/gui.c
===================================================================
--- trunk/src/gui.c 2008-08-04 22:20:37 UTC (rev 547)
+++ trunk/src/gui.c 2008-08-05 21:22:30 UTC (rev 548)
@@ -64,7 +64,7 @@
void
gui_save_all_data (GUI *appGUI) {
- write_notes (appGUI);
+ cal_write_notes (appGUI);
write_tasks_entries(appGUI);
#ifdef HAVE_LIBICAL
write_ical_entries(appGUI);
@@ -152,7 +152,7 @@
config.lastrun_time = get_seconds_for_today();
gui_save_all_data (appGUI);
free_notifications_list (appGUI);
- free_notes_list (appGUI);
+ cal_free_notes_list (appGUI);
}
gui_url_remove_links (&appGUI->about_links_list, &appGUI->about_link_index);
@@ -377,7 +377,7 @@
return TRUE;
case GDK_b:
if (appGUI->calendar_only == FALSE) {
- calendar_notes_browser (appGUI);
+ cal_notes_browser (appGUI);
}
return TRUE;
}
@@ -1210,7 +1210,7 @@
gui_create_options (appGUI);
gui_create_about (appGUI);
- read_notes (appGUI);
+ cal_read_notes (appGUI);
#ifdef HAVE_LIBICAL
ics_initialize_timezone ();
Modified: trunk/src/options_gui_calendar.c
===================================================================
--- trunk/src/options_gui_calendar.c 2008-08-04 22:20:37 UTC (rev 547)
+++ trunk/src/options_gui_calendar.c 2008-08-05 21:22:30 UTC (rev 548)
@@ -246,7 +246,7 @@
2, gtk_entry_get_text(GTK_ENTRY(appGUI->opt->color_edit_name_entry)), -1);
g_object_unref (image);
- replace_note_color (old_color, new_color, appGUI);
+ cal_replace_note_color (old_color, new_color, appGUI);
calendar_refresh_marks (appGUI);
update_aux_calendars (appGUI);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|