GNOME Bugzilla – Bug 156340
Use libgimpprocbrowser as python PDB browser
Last modified: 2004-12-22 21:47:04 UTC
Various tweaks to the Python PDB Browser. (Tried lots of other different user interface changes and I'm sure these are the best of them.) patch to follow
Created attachment 33011 [details] [review] Patch to the Python PDB Browser DONE full unabbreviated title (expand the term PDB) DONE stock OK and Close. Added other mnemonics too. DONE Search by _Summary (Blurb), Search by _Help. DONE Changed Blurb to Summary, better more formal and descriptive English. DONE Top right Aligned labels. HIG recommended. Improves readability for Right to Left Languages. DONE Enabled Wrapping of long lines. Almost elimates need for side scrolling (which sucks). DONE Changed default window size to 600,400. bigger, more information visible. but not too big for smaller displays, including leaving enough room for window decorations and desktop panels. standard 3:2 ratio. Also helps further reduce need for side scrolling. DONE Seperated Date from Copyright and changed results order to Author Date Copyright. (same as other PDB browser) I hope to make more changes later but I submit this now to hopefully leave enough time for it to be included in Gimp 2.2.
I suggest to use the same terms and a similar UI as what the Prodedure Browser plug-in uses. I don't think the term Summary shows up there. Perhaps it should?
Actually the Python PDB Browser (if there's really a need for such a beast) should simply reuse the widget that the Prodedure Browser plug-in and Script-Fu use. Why reinvent the wheel and confuse the user with a slightly different user interface?
> Perhaps it should? It doesn't, but I certainly think it should. I have always found Blurb too informal and I wonder if it is all that clear to those using English only as their second language? I made the changes here first because it was easy and allowed me to scratch my own itch. I think that this kind of intergrated searchable Help is extremely useful, and I'd like to make it less of a 'beast'. Tweaking the Python version is by far the easiest way for me to do so. From using things like Javadoc and Doxygen I would like to think that inline documentation would be better maintained as programmers would write it as they go along but the reality is that most programmers dont document and comment everything obsessively as I do (I probably overdo it with the comments in my code rather than worrying about remembering later why I did things that way). > should simply reuse the widget that the Prodedure Browser plug-in and Script-Fu I would love to have a single gimp-fu interface reused by the various python/perl/scheme backends use. I'd also love to see a template gimp plug in dialog for a consistant and centralised plugin user interface. Unfortunately it is not something I can easily do, instead I do what I can thanks to Python.
There is a centralized proceducure browser (currently at plug-ins/dbbrowser/gimpprocview.[ch]) and there is GimpDialog. Just use it.
Does this mean my patch will not be included in time for gimp 2.2?
I don't know if the pygimp maintainers are reading bugzilla mail. I am certainly not going to touch that code.
Fair enough, thank you for the clarification.
Hey, I've tried this, and it is an advance in all senses - could be applied with NP.
Created attachment 33849 [details] [review] Same modifications, cleaner patch file Alan's patch did not apply cleanly in my CVS tree (did you change your .py files to use tabs instead of spaces? ) - I made another patch against CVS HEAD with no further modifications.
I didn't intentionally change any indentation, I thought I made the diff ignore whitespace changes but I may have only done a simple diff -u
Created attachment 33852 [details] [review] Now it is even more tweaked Now, I added some more things: for once: a border for the botton hbox widgets. Made "search for name" the default window button, so that one can press return to make searches Connected changes on the list to update the text entry on the botton.
We should use the existing libgimpprocbrowser code here. It's not that hard to do.
a full move to libgimpprocbrowser (and possibly merging some of that with the plugin browser) is clearly a better long term goal. I'm sure it is easy when you know how but I'm not much of a C Programmer and I doubt I will be able to help with that work unfortunately. I was really hoping this could be done in time for 2.2 so I specially made the effort to keep the patch simple. I have my own version of pdbbrowse.py that is pretty weird looking and allows searching by other types but I backported only the most reasonable and clearly beneficial changes so I am confident these changes really are worth making. I am worried because you removed the PATCH keyword, which suggests you are rejecting the patch?
Yeah, because I said a move to libgimpprocbrowser is easy: 2004-11-17 Manish Singh <yosh@gimp.org> * plug-ins/dbbrowser/Makefile.am: make libgimpprocbrowser a libtooled library. * plug-ins/dbbrowser/gimpprocbrowser.[ch]: add a user_data pointer for GimpProcBrowserApplyCallback. * plug-ins/dbbrowser/gimpprocbrowser.c: only convert the name to scheme style if scheme_names in the proc info pane too. * plug-ins/dbbrowser/procedure-browser.c * plug-ins/script-fu/script-fu-console.c: pass NULL as user_data. * plug-ins/script-fu/Makefile.am: reference libgimpprocbrowser.la. * plug-ins/pygimp/Makefile.am * plug-ins/pygimp/procbrowser.c: new module, which wraps libgimprocbrowser. * plug-ins/pygimp/gimpmodule.c * plug-ins/pygimp/pygimp.h * plug-ins/pygimp/pygimp-pdb.c: export GimpPDBFunction so other modules can use it. * plug-ins/pygimp/plug-ins/pdbbrowse.py * plug-ins/pygimp/plug-ins/gimpcons.py: use gimpprocbrowser.
one last thing, if your changes do not already include adding the stock find icons to the buttons and setting the default button focus as Joao could you add them (or I'll file a seperate request for those changes if you prefer).
The focus is set by the proc-browser widget but I don't think that GTK_STOCK_FIND is appropriate here because it says "Find" instead of "Search".
sorry if I wasnt clear. I meant that you would use the button icon as I did, not that you would use the stock label, just the stock icon
That is too much of a hassle with gtk+-2.4 and thus not worthwhile.