~drbob/+junk/diary-main

« back to all changes in this revision

Viewing changes to src/interface.c

  • Committer: Philip Withnall
  • Date: 2008-05-20 21:24:47 UTC
  • Revision ID: philip@tecnocode.co.uk-20080520212447-mqaw7h0dy3ht3qyu
2008-05-20  Philip Withnall  <philip@tecnocode.co.uk>

        * src/interface.c:
        * src/interface.h:
        * src/main-window.c:
        * src/Makefile.am:
        * src/printing.c:
        * src/printing.h:
        * src/storage-manager.h:
        * data/diary.ui: Add printing support.
        * configure.ac: Remove redundant dependency on libcryptui.
        * intltool-extract.in:
        * intltool-merge.in:
        * intltool-update.in: Upgrade intltool scripts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
109
109
        gtk_widget_destroy (dialog);
110
110
}
111
111
 
 
112
void
 
113
diary_calendar_month_changed_cb (GtkCalendar *calendar, gpointer user_data)
 
114
{
 
115
        /* Mark the days on the calendar which have diary entries */
 
116
        guint i, year, month;
 
117
        gboolean *days;
 
118
 
 
119
        gtk_calendar_get_date (calendar, &year, &month, NULL);
 
120
        month++;
 
121
        days = diary_storage_manager_get_month_marked_days (diary->storage_manager, year, month);
 
122
 
 
123
        /* TODO: Don't like hard-coding the array length here */
 
124
        gtk_calendar_clear_marks (calendar);
 
125
        for (i = 1; i < 32; i++) {
 
126
                if (days[i] == TRUE)
 
127
                        gtk_calendar_mark_day (calendar, i);
 
128
                else
 
129
                        gtk_calendar_unmark_day (calendar, i);
 
130
        }
 
131
 
 
132
        g_slice_free (gboolean, days);
 
133
}