Ethereal-dev: Re: [Ethereal-dev] RFC: Prefer GTK2 over GTK1 as default

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Ulf Lamping <ulf.lamping@xxxxxx>
Date: Fri, 09 Jan 2004 11:32:58 +0100
Guy Harris wrote:


On Jan 7, 2004, at 11:49 PM, Ulf Lamping wrote:

First one comes to my mind:
the GTK2 standard dialog boxes (e.g. File requester) having the ok button to the right (as the Gnome user interface guide suggests),
but our own dialogs having the cancel button to the right (as GTK1 has).


For GTK2, should we use GtkMessageDialog() to implement "simple_dialog()"?

I.e., map ESD_TYPE_WARN to GTK_MESSAGE_WARNING, ESD_TYPE_CRIT to GTK_MESSAGE_ERROR, and EST_TYPE_INFO to GTK_MESSAGE_INFO, map ESD_BTN_CANCEL to GTK_BUTTONS_CANCEL, and map ESD_BTN_OK to GTK_BUTTONS_OK?

Unfortunately, as both of them take a format string and arguments, and as there's no "gtk_vmessage_dialog_new()" taking a "va_list" as an argument, we'd have to do that by having "simple_dialog()" still do the formatting, and pass "GtkMessageDialog()" a format string of "%s" and an argument of the generated message.

We should perhaps also consider using GTK2's "gtk_dialog_new_with_buttons()" for other dialogs that have OK, Cancel, etc. buttons.


I don't wanted to say that's impossible to do, but as we now have quite a lot dialogs, and all of them has to be changed (with a GTK1 and a GTK2 version), this will be quite a lot of work :-(

And to be honest, I don't like that approach at all, as this isn't usual for win32 user (and KDE I think). Maybe it would be better to not use the standard dialogs at all, so we could switch between gnome and win32 (KDE) layout
by a preference setting.

Another problem comes to my mind:
the GTK2 font selection cannot filter between fixed-width and non-fixed-width fonts. The current GTK1 dialog will show only the fixed-width fonts (using some GTK filtering),
this functionality isn't available in GTK2.
There seem's to be no solution for this :-(

Regards, ULFL