Alexandru Harsanyi writes:
 > These are some things left to be done with the calendar window (they
 > all involve gdk hackery):
 > 
 > * make the window pop up below the GtkEntry widget, so it will look
 >   like a combo-box.
 > 
 > * make the cursor above the window an arrow instead of a cross.
 > 
 > * make any click outside the calendar window act as a cancel.
 > 
 > If anyone knows how to solve these problems, he or she is most
 > welcome to solve them.

As for the cursor being a cross, this is a gtksheet thing, and will
be obsolete soon, I hope.  In general, though, the
function gdk_window_set_cursor() from gdkwindow.h should
work, but I'm not sure if this works for popup windows.  For the
other two, browse through the source for gtkcombo.c;  for the
first, you'd need to compute the position and call
gtk_widget_set_uposition();  for the second, grab the pointer
with gdk_pointer_grab(), and on a button press check that the
event window equals the popup window, and pop back down
if not.  Of course, don't forget to ungrab the pointer :-).

What would be nice would be if there were a combobox widget that lets
one put an arbitrary widget inside the box instead of just a text
list.  I seem to remember that there is something like this available.
Maybe the gtkcombobox widget in the gtksheet directory would
be useful.  You might also check out the gtkcombobutton
widget at <http://www.webtribe.net/a/ambiance/> which seems
to be in active development.  Also, any chance of making the entry
editable?

Another small problem:  if I pop up the calendar and click
somewhere within the calendar, but not on a date or one of
the buttons (e.g, the week header or some grey area), my window
manager (enlightenment) acts like I've clicked on the root
window.  Maybe this is a WM-specific thing;  I noticed
however that in the gtkcombo.c sources, they add an
event box to the popup window, and then add the list
to that event box, so maybe it's common.

I'll be interested to see how you solve this, because it would
be nice to be able to change the date of a transaction by
popping up a little calendar next to the date field.

Best regards,
Heath Martin

----- %< -------------------------------------------- >% ------
The GnuCash / X-Accountant Mailing List
To unsubscribe, send mail to [EMAIL PROTECTED] and
put "unsubscribe gnucash-devel [EMAIL PROTECTED]" in the body

Reply via email to