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 333878 - Add help button to fileselector dialog
Add help button to fileselector dialog
Status: RESOLVED WONTFIX
Product: gtk+
Classification: Platform
Component: Widget: GtkFileChooser
unspecified
Other All
: Normal normal
: Medium API
Assigned To: gtk-bugs
Federico Mena Quintero
Depends on:
Blocks: 334294 413478
 
 
Reported: 2006-03-08 11:50 UTC by Joachim Noreiko
Modified: 2013-02-11 06:26 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Joachim Noreiko 2006-03-08 11:50:37 UTC
Bug 147671 requested documentation for the fileselector dialogs, as this has many features that are hard to discover.
The documentation is now in the GNOME Desktop User Guide. (A check that I've covered all the features would be appreciated, by the way.)

The file open and file save dialogs now need corresponding help buttons.

The docbook section ids for the dialogs to link to are:
Open: filechooser-open
Save: filechooser-save
Comment 1 Christian Persch 2006-06-25 12:12:22 UTC
This isn't limited to filechooser, I think the same should also be done for the font chooser, icon chooser (in libgnomeui) etc.

This could be done with adding a 'help-requested' signal (and maybe 'help-available' property), but how about something more global? The signal requires you to connect to each dialogue which you might not be able to do (think filechoosers opened from buttons, or from icon choosers, or from libraries under you (epiphany has a case like this)).

A global hook function might be a solution; not just for filechooser but for all dialogues  That way you can install a handler for all dialogues and then in the handler call the correct help document. This would also have the advantage that we could implement a stock handler in libgnomeui which would take care of the common dialogues.

Like this maybe:jus

typedef gboolean (* GtkDialogHelpFunc) (GtkDialog *dialog, gpointer data);

gtk_dialog_add_help_hook (GtkDialogHelpFunc func,
                          gpointer data,
                          GDestroyNotify dnotify);
and corresponding gtk_dialog_remove_help_hook.

(_add_ instead of _set_ because we want a global handler which takes care of the common dialogues, and you may also want an app-specific handler. returning TRUE would mean "handled", FALSE would invoke the next handler).

Maybe there's also a need to have a way to determine if help is available for a given dialogue at all, i.e. whether to show the help button:

typedef gboolean (* GtkDialogShowHelpFunc) (GtkDialog *dialog, gpointer);

with gtk_dialog_add_show_help_func (...)

--
The hook function in libgnomeui could then be like this:

if (GTK_IS_FILE_CHOOSER (dialog) &&
    gtk_file_chooser_get_action (GTK_FILE_CHOOSER (dialog)) == GTK_FILE_CHOOSER_ACTION_OPEN) {
  /* show help for "open" mode filechooser */
 }
else if (GTK_IS_FILE_CHOOSER (dialog) &&
    gtk_file_chooser_get_action (GTK_FILE_CHOOSER (dialog)) == GTK_FILE_CHOOSER_ACTION_SAVE) {
  /* show help for "save" mode filechooser" */
}
else if /* etc */...
Comment 2 Federico Mena Quintero 2007-01-25 19:33:51 UTC
If we make this a general problem (for all GTK+ megadialogs) instead of just the file chooser, we'll need a sample API and implementation.
Comment 3 Matthias Clasen 2013-02-11 06:26:18 UTC
closing old bugs