GNOME Bugzilla – Bug 103408
move nautilus authentication dialog to libgnomeui
Last modified: 2004-12-22 21:47:04 UTC
Putting this dialog in libgnomeui would allow all GNOME apps to get a working authentication dialog for free. The attached patch takes a few files from eel and Nautilus and puts them in libgnomeui. Any app can then call gnome_authentication_manager_init() if it wants to ask the user for auth info when necessary. Imo, this function should be called automatically when initializing libgnomeui and libgnomeui should provide a function to disable the authentication callbacks if an app writer really doesn't want them. If this patch gets applied, the corresponding files can be removed from eel and Nautilus (nautilus-authn-manager.[ch], eel-caption-table.[ch], eel-password-dialog.[ch])
Created attachment 13536 [details] [review] patch for libgnomeui
Created attachment 13537 [details] [review] (trivial) patch for Nautilus
Forgot to mention that it might be a good idea not to install gnome-caption-table.h and gnome-password-dialog.h if possible
Created attachment 13590 [details] [review] updated patch (more hig compliant)
I tweaked the dialog so that it is more HIG compliant. Its icon is hardcoded for now, but a stock icon can be used once #65765 is fixed
Created attachment 15605 [details] [review] same patch, but now it registers a stock icon
Modified the patch to register a stock icon, since the gtk one won't appear before gtk 2.4
Why not kill off gnome_password_dialog_run_and_block and instead hook the a callback up to the "response" signal in present_authentication_dialog_blocking. Another option if you want modality to the parent window of the dialog would be to use window grouping and do a grab on the window group. Going app modal though kind of sucks for dialogs like this.
According to owen, gtk_dialog_run should no longer be a problem with upcoming glib 2.2 release
I've moved this into libgnomeui now. Closing.