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 156340 - Use libgimpprocbrowser as python PDB browser
Use libgimpprocbrowser as python PDB browser
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: Gimp-Python
unspecified
Other All
: Normal enhancement
: ---
Assigned To: Manish Singh
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2004-10-24 23:35 UTC by Alan Horkan
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to the Python PDB Browser (7.87 KB, patch)
2004-10-24 23:41 UTC, Alan Horkan
none Details | Review
Same modifications, cleaner patch file (10.37 KB, patch)
2004-11-16 16:59 UTC, Joao S. O. Bueno
none Details | Review
Now it is even more tweaked (11.20 KB, patch)
2004-11-16 19:24 UTC, Joao S. O. Bueno
none Details | Review

Description Alan Horkan 2004-10-24 23:35:29 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
Comment 1 Alan Horkan 2004-10-24 23:41:10 UTC
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.
Comment 2 Sven Neumann 2004-10-25 00:03:50 UTC
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?
Comment 3 Sven Neumann 2004-10-25 00:05:42 UTC
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?
Comment 4 Alan Horkan 2004-10-25 00:28:49 UTC
> 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.  
Comment 5 Sven Neumann 2004-10-25 00:45:10 UTC
There is a centralized proceducure browser (currently at
plug-ins/dbbrowser/gimpprocview.[ch]) and there is GimpDialog. Just use it.
Comment 6 Alan Horkan 2004-11-02 14:41:46 UTC
Does this mean my patch will not be included in time for gimp 2.2?  
Comment 7 Sven Neumann 2004-11-02 17:03:00 UTC
I don't know if the pygimp maintainers are reading bugzilla mail. I am certainly
not going to touch that code.
Comment 8 Alan Horkan 2004-11-02 17:38:48 UTC
Fair enough, thank you for the clarification.  
Comment 9 Joao S. O. Bueno 2004-11-16 10:41:13 UTC
Hey, I've tried this, and it is an advance in all senses - could be applied 
with NP. 
Comment 10 Joao S. O. Bueno 2004-11-16 16:59:35 UTC
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.
Comment 11 Alan Horkan 2004-11-16 17:59:27 UTC
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
Comment 12 Joao S. O. Bueno 2004-11-16 19:24:36 UTC
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.
Comment 13 Manish Singh 2004-11-17 10:49:35 UTC
We should use the existing libgimpprocbrowser code here. It's not that hard to do.
Comment 14 Alan Horkan 2004-11-17 14:00:39 UTC
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?  

Comment 15 Manish Singh 2004-11-17 20:03:47 UTC
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.
Comment 16 Alan Horkan 2004-11-17 22:20:13 UTC
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).  
Comment 17 Sven Neumann 2004-11-17 22:39:56 UTC
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".
Comment 18 Alan Horkan 2004-11-17 22:47:38 UTC
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
Comment 19 Sven Neumann 2004-11-17 23:35:35 UTC
That is too much of a hassle with gtk+-2.4 and thus not worthwhile.