After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 128283 - Panel clock/calendar integration
Panel clock/calendar integration
Status: RESOLVED FIXED
Product: gnome-panel
Classification: Other
Component: clock
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Panel Maintainers
Panel Maintainers
: 119109 128704 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2003-12-01 10:35 UTC by William Jon McCann
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch for head (67.12 KB, patch)
2003-12-01 10:37 UTC, William Jon McCann
none Details | Review
updated patch (63.86 KB, patch)
2003-12-01 13:44 UTC, William Jon McCann
none Details | Review
screenshot (35.29 KB, image/png)
2003-12-01 14:34 UTC, William Jon McCann
  Details
screenshot of event list with colors (37.41 KB, image/png)
2003-12-02 21:34 UTC, William Jon McCann
  Details
updated patch to use colors and icons (67.29 KB, patch)
2003-12-03 00:41 UTC, William Jon McCann
none Details | Review
screenshot with event colors and icons (43.42 KB, image/png)
2003-12-03 00:43 UTC, William Jon McCann
  Details
updated patch to add ellipsis to long summaries (68.86 KB, patch)
2003-12-03 17:44 UTC, William Jon McCann
none Details | Review
screenshot with ellipsis on long summaries (35.95 KB, image/png)
2003-12-03 17:48 UTC, William Jon McCann
  Details
updated to ellipsize tasks also (and add back configure.in change) (71.93 KB, patch)
2003-12-03 21:26 UTC, William Jon McCann
none Details | Review
updated patch to start evolution when event/task rows are activated (74.00 KB, patch)
2003-12-04 22:15 UTC, William Jon McCann
none Details | Review
updated patch to use scrollbar instead of ellipsis, added checkboxes, start evolution tasks on row click (75.87 KB, patch)
2003-12-07 04:47 UTC, William Jon McCann
none Details | Review
latest screenshot (51.32 KB, image/png)
2003-12-07 04:48 UTC, William Jon McCann
  Details
Screenshot of clock preferences dialog. (50.34 KB, image/png)
2003-12-09 15:33 UTC, Patrick
  Details
updated patch to fix positioning for bottom panel and add more error checking (78.40 KB, patch)
2003-12-09 20:24 UTC, William Jon McCann
none Details | Review
updated patch for latest CVS (64.22 KB, patch)
2003-12-11 19:34 UTC, William Jon McCann
none Details | Review

Description William Jon McCann 2003-12-01 10:35:36 UTC
Here is a patch for panel clock / calendar integration.

http://www.gnome.org/bounties/Calendar.php3#127532

Instead of adding another configuration dialog it simply aggregates the
calendars that are selected in Evolution (and responds to changes).  So it
just works.

Double clicking on a day brings up Evolution calendar (or another program
stored in gconf).  However, I'm not sure there is a way to request a
specific day to be displayed from the command line.  It seems to be
possible by using bonobo or libeshell but that would add a dependency on
evolution to gnome-panel.  That doesn't seem to be right.

Please let me know if this looks ok.
Comment 1 William Jon McCann 2003-12-01 10:37:27 UTC
Created attachment 21973 [details] [review]
patch for head
Comment 2 William Jon McCann 2003-12-01 10:47:42 UTC
This requires that the following patch be applied to
evolution-data-server:
http://lists.ximian.com/archives/public/evolution-hackers/2003-December/001914.html
Comment 3 Vincent Untz 2003-12-01 10:55:38 UTC
Some random comments (I looked really quickly at the code):

* there are things coming from Ximian that we may not want
(ALLOW_UNIX_TIME, show_day_of_week, etc.)

* the quick alarm reminder window should appear on all workspaces (IMHO)

* don't use GtkOptionMenu: it's deprecated in gtk+ 2.4. Use
GtkComboBox instead. Using a GtkComboBox, you won't need
alarm_minutes[] (just use a GtkListStore with 2 columns)

* couldn't we use try_appointment_tool for evolution (instead of
having another function try_evolution_calendar)

Could you provide a screenshot too?

Thanks
Comment 4 William Jon McCann 2003-12-01 13:44:28 UTC
Created attachment 21982 [details] [review]
updated patch
Comment 5 William Jon McCann 2003-12-01 13:49:42 UTC
Thanks for the quick feedback!  This patch should address all of your
comments.

Removed show_day_of_week.  I only re-enabled ALLOW_UNIX_TIME instead
of removing it altogether in case it might be useful.  Uses
GtkComboBox.  Quick Alarm dialog is shown on all workspaces.  Uses
try_appointment_tool for evolution.

Comment 6 William Jon McCann 2003-12-01 14:34:05 UTC
Created attachment 21985 [details]
screenshot
Comment 7 William Jon McCann 2003-12-01 22:25:40 UTC
*** Bug 119109 has been marked as a duplicate of this bug. ***
Comment 8 William Jon McCann 2003-12-02 06:58:26 UTC
I just checked in the required e-d-s patch to HEAD.
Comment 9 Vincent Untz 2003-12-02 19:18:06 UTC
Is it possible to have colors like what is shown in the screenshot at
http://www.gnome.org/bounties/Calendar.php3#127532 ?

And maybe adding icons would be nice too.

Another nice thing would be to ellipsize the appointment/task (instead
of having it cut like the first appointment in your screenshot).
eel_ellipsizing_label would help, but I think you're using a treeview.
I don't know what we can do here...
Comment 10 William Jon McCann 2003-12-02 19:31:21 UTC
I started looking into the colors the other day.  It seems that the
colors are not stored by the backend but generated by the frontend. 
We could just use the same algorithm I suppose.  I was worried that
they might get out of sync and the utility of color would be lessened.

The other thing I worried about is theming and accessibility problems.
 I'll assume the evo folks have already thought about that.  I will
try to do this today.  We'll see how it looks.

Icons are also handled/installed by the frontend.

Yes, cutting off long event summaries isn't very nice.  I didn't want
the window to grow to fit.  I'll try to think of a better way.
Comment 11 William Jon McCann 2003-12-02 21:34:00 UTC
Created attachment 22025 [details]
screenshot of event list with colors
Comment 12 Vincent Untz 2003-12-02 21:38:52 UTC
I think icons are in gnome-icon-theme.
Comment 13 William Jon McCann 2003-12-02 21:57:04 UTC
Actually, the colors do seem to stay synch'd with evo.  I think this
will be true as long as the event sources are processed in the same
order from gconf.  Since the applet and evo both use the e-d-s API
e_source_list_new_for_gconf I think they should stay in the same order.  

Should the background for the times be colored too?

In evolution there can be multiple icons relevent to each event, such as:
reminder, recurrence, timezone, meeting
and any number of categories.

I think it might be clumsy to try to add multiple icons per row.  Not
to mention we don't have much space to work with.

However, the icons on
http://www.gnome.org/bounties/Calendar.php3#127532 don't seem to be
any of those.  I think they might just indicate event versus task/todo.

What do you think?
Comment 14 William Jon McCann 2003-12-03 00:41:36 UTC
Created attachment 22031 [details] [review]
updated patch to use colors and icons
Comment 15 William Jon McCann 2003-12-03 00:43:01 UTC
Created attachment 22032 [details]
screenshot with event colors and icons
Comment 16 William Jon McCann 2003-12-03 17:44:08 UTC
Created attachment 22063 [details] [review]
updated patch to add ellipsis to long summaries
Comment 17 William Jon McCann 2003-12-03 17:48:28 UTC
Created attachment 22064 [details]
screenshot with ellipsis on long summaries
Comment 18 William Jon McCann 2003-12-03 21:26:44 UTC
Created attachment 22072 [details] [review]
updated to ellipsize tasks also (and add back configure.in change)
Comment 19 William Jon McCann 2003-12-04 22:15:13 UTC
Created attachment 22119 [details] [review]
updated patch to start evolution when event/task rows are activated
Comment 20 Tuomas Kuosmanen 2003-12-06 12:39:00 UTC
Looks nice! Some comments follow :)

One thing you might want to have there is a checkbox to make a task done?

Also, is it possible to colorize days in the calendar widget? It would
be nice if those bold events got a color from the calendar they are
part of. No idea if the widget supports that though..?

Also, can you add those frames around the item groups like in the
original mockup and adda few pixels of padding between the tasks? If
you use a list widget for the tasks, then we got to figure out
something else thouhg if it is not easy to do that.
Comment 21 William Jon McCann 2003-12-06 17:42:53 UTC
Thanks for your comments.

It is possible to add checkboxes to the tasks.  However, once they
were checked the task would disappear from the list, since only
uncompleted tasks are displayed.  Would that be confusing from the
users point of view, especially if they toggled it by mistake?

I don't think it is currently possible to colorize the calendar days
with different colors.  In gtkcalendar.c is this:

#define MARKED_COLOR(widget)    (&
(widget)->style->fg[GTK_WIDGET_STATE (widget)])

This is called by gtk_calendar_paint_day which is called in a loop in
gtk_calendar_paint_main to "paint" the entire calendar.  So I don't
think it is possible to change the foreground color for different days.

Regarding the frames.  It was my understanding that using frame
borders was deprecated by the HIG.  Is that true?  If not then it is
trivial to add them back in.

It is easy to put some vertical padding between the task rows.  I
tried 3 pixels (top and bottom of each row, so 6 between each row) and
it looks pretty good.  Should the event list have the same?  Maybe not
since there might be a lot of events.
Comment 22 William Jon McCann 2003-12-07 04:47:36 UTC
Created attachment 22168 [details] [review]
updated patch to use scrollbar instead of ellipsis, added checkboxes, start evolution tasks on row click
Comment 23 William Jon McCann 2003-12-07 04:48:26 UTC
Created attachment 22169 [details]
latest screenshot
Comment 24 William Jon McCann 2003-12-07 05:19:56 UTC
Obviously, I chose to use a GtkTreeView.  I think it has a number of
benefits:

Built in accessibility
Automatic sorting
Sorting on any column
Homogenous cell spacing
    it is much easier to scan a long list if the elements are 
    aligned
Existing, stable API
Simple access to viewport
    we could do cool things like add a bit to the timeout 
    function that would center the next occuring event
Simple access to the data model
    once evolution supports it we can easily add a row activation
    handler that will load the selected event/task in the editor

One limitation of GtkTreeView at the moment is that, as far as I know,
it isn't able to display per row/cell tooltips.
Comment 25 Patrick 2003-12-09 15:33:06 UTC
Created attachment 22263 [details]
Screenshot of clock preferences dialog.
Comment 26 William Jon McCann 2003-12-09 20:24:47 UTC
Created attachment 22270 [details] [review]
updated patch to fix positioning for bottom panel and add more error checking
Comment 27 Mark McLoughlin 2003-12-11 15:49:54 UTC
you need to update the patch to latest CVS
Comment 28 William Jon McCann 2003-12-11 19:34:09 UTC
Created attachment 22348 [details] [review]
updated patch for latest CVS
Comment 29 Mark McLoughlin 2004-01-12 17:37:30 UTC
*** Bug 128704 has been marked as a duplicate of this bug. ***
Comment 30 Mark McLoughlin 2004-01-12 17:44:42 UTC
William, Martin, Christian: I spent a long time playing with both
patches and started playing around with different ways of doing this.
In the end I ended up starting pretty much from scratch using a lot of
ideas from both patches. I've just committed the result.

It still needs some work, for a start see the TODO list in clock.c.
It'd be great if you guys could help out.

I don't know what's going to happen about the bounty. My hope is that
the bounty will be awarded and split between both patches. We'll see
how that goes.

Thanks much for all your hard work :-)
Comment 31 Mark McLoughlin 2004-01-12 17:53:08 UTC
The patch I committed is here if you're interested:

http://www.gnome.org/~markmc/clock-evo-integration.diff