GNOME Bugzilla – Bug 301632
standard Gtk find and replace dialogs
Last modified: 2014-11-03 06:02:14 UTC
bug #85606 calls for the HIG to specify a standard and consistent Find and Replace dialog. that is a good idea but simply recommending a standard behaviour is no way near as effective as providing a standard implementation included in Gtk which developers are far more likely to use as it is the path of least resistance. libegg is also developing a find toolbar widget (many users and developers are annoyed by Find dialogs that get in the way of the search results) and perhaps an underlying API could be created to standardise the functionality but abstract out the Graphical user interface.
I'd mentioned before (perhaps on desktop-devel-list, I'm not sure) that one way to make a standard find and replace dialog Just Work would be to add an interface like GtkFindable (yeah, that name sucks). This could be implemented by GtkTextView and GtkTreeView, although for GtkTreeView the programmer would probably need to specify the columns to use. It could also be implemented by third-party widgets like gtkmozembed and vte. gtk_findable_set_case_sensitive (GtkFindable *finable, gboolean sensitive); gtk_findable_set_find_wrap (GtkFindable *findable, gboolean wrap); gtk_findable_find_next (GtkFindable *findable, gchar *str); gtk_findable_find_previous (GtkFindable *findable, gchar *str); /* more stuff for replace */ Using a standard find dialog could then be as easy as: gtk_find_dialog_new (GtkFindable *findable);
If we can't standardize on a Find dialog, then maybe at least we could have a default Find *bar*? I'm prompted by bug 594131 which is the latest in a sequence of Gnome/Gtk+ apps that implement a Find bar in Firefox-style instead of Gnome-style (like Evince, Epiphany, Yelp).
My take on this is that the way to have consistency in apps is to a) expand the HIG to cover the things you want to be consistent b) sending patches to those apps Forcing everything in the toolkit is not really a scalable solution. Of course, individual cases can always be negotiated; and maybe there is a good argument to be made for GtkTextView to come with a builtin find-replace dialog. Not sure.
closing old bugs