GtkDialog comments.



I was hoping to do some work to finish GtkDialog, and there are a number
of bugs in bugzilla and other issues that people have brought up

 * There are times when the hseparator is inappropriate.  As an example,
   if the dialog has a frame or notebook in it, the separator just
   provides visual clutter.  It's easy to add a
   gtk_dialog_set_show_hseparator function to it, but before I did that,
   I thought I'd ask if anyone could think of other style based
   attributes that could possibly be set (button_box location is the
   only other thing I could think of.)

 * I don't really like adding the flags to gtk_dialog_new_with_buttons.
   I think that dialogs should be easy to create without having to look
   up what the flags are every time.  I would like to have that function
   look more like:

GtkWidget* gtk_dialog_new_with_buttons (const gchar     *title,
                                        GtkWindow       *parent,
                                        const gchar     *first_button_text,
                                        ...);

   and add a:

void gtk_dialog_set_flags (GtkDialog      *dialog,
                           GtkDialogFlags  flags);

   function.  With good defaults, you don't have to worry about this
   unless you want to make it non-modal.

 * We need a function similar to the gnome_dialog_editable_enters
   function in libgnomeui.  This function lets you set an entry to
   activate the dialog when Enter is hit, as opposed to just having the
   entry catch the event.  There are two options here -- one is to do
   what libgnomeui does and catch the signal on the entry -- in essence
   make it the job of the dialog.  The other is to set the behavior in
   the entry -- something like:

typedef enum {
        GTK_ENTRY_ACTION_ACTIVATE,
        GTK_ENTRY_ACTION_IGNORE,
        GTK_ENTRY_ACTION_MOVE_FOCUS
} GtkEntryAction;

gtk_entry_set_activate_action (GtkEntry       *entry,
                               GtkEntryAction  action);


   I'm not sure if MOVE_FOCUS is really needed, but if you have a form
   full of entries, it might make sense to have [Enter] go to the next
   widget.

 * C-W should close the dialog as [ESC] does.

Comments?

Thanks,
-Jonathan




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]