One of My landlord's kids started using The GIMP the other day on a school provided netbook. Prior to trying to help Him with his project I never much thought about the fact that python plugins (unless written with a custom UI) do not scroll. Being a Linux user, Alt-Drag always worked just fine for me. But it did not for him. Thus I tackled gimpfu.
This is a drop in replacement for gimpfu,
in fact it IS gimpfu with 6 new lines of code, and one line changed. (The curious can see the end of this post.)
Using this all python plugins begin with a size of 50% of your screen height, and a width equal to the data displayed + 44 pixels. The width won't be right on all machines however, as different operating systems and themes display scrollbars at different widths. None-the-less, almost all of the horizontal distance will be visible from the start, thus rendering any plugin usable from the get go without having to resize the window. (Although it can be fully resized if you choose to.) The "data entry" area of the plugin will scroll as needed using a traditional scroll bar. (If someone using the standard windows theme could give me a clue how much more width is needed, I can update this. Ditto for Macs)
Installing this plugin is a little different. It will work just fine installed into the standard user plugins folder (see next paragraph), but should be installed in place of the system version. On linux mint 17.1 this is at /usr/lib/gimp/2.0/python so probably the same for Ubuntu and other Debian derivatives as well. I'm not sure of this location on windows and macs. On linux the permissions need to be 644 (u+rw-x, g+r-wx, o+r-wx) with owner typically set to root:root.
A side note for those of you who run gimp from a command line. If it is installed to a user plugin folder, the following non-fatal errors will appear during gimp start up:
Querying plug-in: '/home/<user_name>/.gimp-2.8/plug-ins/gimpfu.py'
(gimp:26548): LibGimpBase-WARNING **: gimp: gimp_wire_read(): error
Terminating plug-in: '/home/<user_name>/.gimp-2.8/plug-ins/gimpfu.py'
This is completely ignorable, and is because GIMP is trying to import it as a plugin, and failing. Remember, this isn't an actual plugin, but a file to import into a plugin. Having it in this folder means it will override the one in the system folder, as it will be found first from within python during imports.
As for what changed, well changes were made in 2 spots, the first began as (line numbers added)
699 vbox = gtk.VBox(False, 12)
700 vbox.set_border_width(12)
701 dialog.vbox.pack_start(vbox)
702 vbox.show()
and then became:
699 vbox = gtk.VBox(False, 12)
700 vbox.set_border_width(12)
701 swin = gtk.ScrolledWindow() # New line
702 swin.add_with_viewport(vbox) # New Line
703 dialog.vbox.pack_start(swin) # This is the only changed line.
704 vbox.show()
705 swin.show() # New Line
The second spot for changes was:
802 # progress_label.show()
803
804 dialog.show()
became:
806 # progress_label.show()
807
808 min_height = gtk.gdk.screen_height() / 2 # New Line
809 min_width, __ = table.size_request() # New Line
810 dialog.set_default_size(min_width + 44, min_height) # New Line
811
812 dialog.show()
If anyone wants to make it be a wider starting size, simply change the "+ 44" on line 810 to a bigger number.
_________________
The answer was 42. The question is long forgotten. The computer that solved it is now destroyed.
The MK-2 has been built. Should this be the next question?
(Solve if you can ...
)