diff options
author | Federico Mena Quintero <federico@nuclecu.unam.mx> | 1998-10-01 00:44:14 +0800 |
---|---|---|
committer | Arturo Espinosa <unammx@src.gnome.org> | 1998-10-01 00:44:14 +0800 |
commit | e6ffe37f192876fd256ef29fcbabfbbc009e6c64 (patch) | |
tree | aec1663e19a0fe6b4caf8af8767f669d573aaa97 /calendar/goto.c | |
parent | 9e927267cdd157e56c238ea131758ecaadbe6309 (diff) | |
download | gsoc2013-evolution-e6ffe37f192876fd256ef29fcbabfbbc009e6c64.tar.gz gsoc2013-evolution-e6ffe37f192876fd256ef29fcbabfbbc009e6c64.tar.zst gsoc2013-evolution-e6ffe37f192876fd256ef29fcbabfbbc009e6c64.zip |
Stuff that I forgot to commit yesterday.
Stuff that I forgot to commit yesterday.
Now the year view has a nifty pop-up view you can activate if you click on
a day with mouse button 1. It will display a quick view of the appointments
in that day. Also, reworked the marking and coloring code for month items
so that the year view is not glacially slow anymore when switching years.
It still is slow when first mapping or realizing the year view, I'm not sure why.
I will look into that.
1998-09-29 Federico Mena Quintero <federico@nuclecu.unam.mx>
* prop.c (fetch_color_spec): Changed name from fetch_prelight_spec
and made it conform to the new prelighting mechanism.
(fake_mark_days): Set the proper day attributes.
(reconfigure_month): Use colorify_month_item().
(fake_mark_days): Use mark_month_item_index().
* mark.c (colorify_month_item): New public function to reset the
colors in a month item.
(get_attributes): New internal function that creates an array of
attributes for the days in a month item. This is the basis of all
the new optimizations to month item marking.
(unmark_month_item): Now it uses the attributes array to unmark
only the days that need unmarking.
(mark_event_in_month): Update the day attributes array.
(month_item_prepare_prelight): Changed the definition of the
prelight color query function. Use the new function.
(day_event): Do color changes based on the day attributes array.
(mark_month_item_index): New public function to mark a single day
by index.
(mark_event_in_month): Use mark_month_item_index().
* gnome-month-item.c (gnome_month_item_num2child): Now takes an
int, not a GnomeMonthItemChild.
(gnome_month_item_child2num): Now returns an int, not a
GnomeMonthItemChild.
(gnome_month_item_num2day): Now takes an int, not a
GnomeMonthItemChild.
* goto.c (goto_dialog): Create the days before the year spin
button, because the year_changed callback expects the month item
to be created. The new semantics of the spin button cause it to
emit a value_changed signal on the adjustment upon creation -- is
this the behavior we want from it?
(goto_dialog): Use gtk_window_set_modal() instead of the
deprectaed gnome_dialog_set_modal().
* quick-view.c (quick_view_new): Make it look not as crappy by
putting the title inside the frame.
(quick_view_do_popup): Fixed the pointer grab and added a cursor.
(create_items_for_event): Query the text width/height from the
text item using the new object arguments, so that the size of the
popup window can be set properly.
* year-view.c (do_quick_view_popup): Calculate a nice date string
for the popup window.
svn path=/trunk/; revision=415
Diffstat (limited to 'calendar/goto.c')
-rw-r--r-- | calendar/goto.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/calendar/goto.c b/calendar/goto.c index 7a4068fb85..aca5edc3f8 100644 --- a/calendar/goto.c +++ b/calendar/goto.c @@ -26,7 +26,7 @@ update (void) { unmark_month_item (GNOME_MONTH_ITEM (month_item)); mark_month_item (GNOME_MONTH_ITEM (month_item), gnome_calendar->cal); - month_item_prepare_prelight (GNOME_MONTH_ITEM (month_item), default_prelight_func, NULL); + month_item_prepare_prelight (GNOME_MONTH_ITEM (month_item), default_color_func, NULL); } /* Callback used when the year adjustment is changed */ @@ -222,6 +222,7 @@ goto_dialog (GnomeCalendar *gcal) GtkWidget *vbox; GtkWidget *hbox; GtkWidget *w; + GtkWidget *days; struct tm *tm; gnome_calendar = gcal; @@ -244,6 +245,12 @@ goto_dialog (GnomeCalendar *gcal) gtk_box_pack_start (GTK_BOX (vbox), w, FALSE, FALSE, 0); gtk_widget_show (w); + /* Create month item before creating the year controls, since the latter ones need the + * month_item to be created. + */ + + days = create_days (tm->tm_mday, tm->tm_mon, tm->tm_year + 1900); + /* Year */ w = create_year (tm->tm_year + 1900); @@ -258,9 +265,8 @@ goto_dialog (GnomeCalendar *gcal) /* Days (canvas with month item) */ - w = create_days (tm->tm_mday, tm->tm_mon, tm->tm_year + 1900); - gtk_box_pack_start (GTK_BOX (vbox), w, TRUE, TRUE, 0); - gtk_widget_show (w); + gtk_box_pack_start (GTK_BOX (vbox), days, TRUE, TRUE, 0); + gtk_widget_show (days); /* Today button */ @@ -277,7 +283,7 @@ goto_dialog (GnomeCalendar *gcal) /* Run! */ - gnome_dialog_set_modal (GNOME_DIALOG (goto_win)); + gtk_window_set_modal (GTK_WINDOW (goto_win), TRUE); gnome_dialog_set_close (GNOME_DIALOG (goto_win), TRUE); gnome_dialog_set_parent (GNOME_DIALOG (goto_win), GTK_WINDOW (gnome_calendar)); gtk_widget_show (goto_win); |