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 140202 - Get rid of XPM icons in FractalExplorer
Get rid of XPM icons in FractalExplorer
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: Plugins
git master
Other All
: Low enhancement
: 2.4
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2004-04-15 20:28 UTC by Maurits Rijk
Modified: 2005-06-26 09:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
FractalExplorer png icons (1.50 KB, application/x-compressed-tar)
2004-11-14 09:13 UTC, Karine Delvare
  Details
pagecurl png icons (4.02 KB, application/x-compressed-tar)
2004-11-14 09:13 UTC, Karine Delvare
  Details
rcm png icons (1.03 KB, application/x-compressed-tar)
2004-11-14 09:14 UTC, Karine Delvare
  Details
Adds 'images' to SUBDIRS (1.36 KB, patch)
2004-11-14 09:21 UTC, Karine Delvare
none Details | Review
Ports Pagecurl from GimpPixmap to GdkPixbuf/GtkImage. (2.16 KB, patch)
2004-11-14 13:44 UTC, Karine Delvare
committed Details | Review
Makes rcm plug-in use a stock icon factory. (8.17 KB, patch)
2004-11-17 06:54 UTC, Karine Delvare
committed Details | Review
pygimp - removes inline logo and changes code to load external .png (5.76 KB, patch)
2004-11-17 12:25 UTC, Joao S. O. Bueno
none Details | Review
pygimp: gimpfu logo (529 bytes, image/png)
2004-11-17 12:27 UTC, Joao S. O. Bueno
  Details
Updated patch removing inline pygimp logo. (5.77 KB, patch)
2004-11-19 03:55 UTC, Joao S. O. Bueno
none Details | Review
Uses stock icons instead of xpm ones (23.94 KB, patch)
2005-06-20 21:12 UTC, Karine Delvare
committed Details | Review
UI improvements (11.86 KB, patch)
2005-06-21 21:19 UTC, Karine Delvare
committed Details | Review
Removes unwanted frame. (1.46 KB, patch)
2005-06-22 18:57 UTC, Karine Delvare
committed Details | Review
Activate fractal on click rather than select. (4.85 KB, patch)
2005-06-25 07:14 UTC, Karine Delvare
needs-work Details | Review
Activates fractal on double-click rather than select (4.37 KB, patch)
2005-06-25 13:23 UTC, Karine Delvare
committed Details | Review
Add an apply button and remove the frame around the scrolled window. (7.64 KB, patch)
2005-06-26 09:01 UTC, Karine Delvare
committed Details | Review

Description Maurits Rijk 2004-04-15 20:28:36 UTC
There are a few plug-ins (Imagemap, MapObject, Lighting, pagecurl and rcm) that
still use XPM icons. Should be replaced by icons in png format. The Makefile.am
for the gfig plug-in shows how this is done. All images should be stored in the
`images' subdir.
Comment 1 Michael Natterer 2004-08-11 16:28:13 UTC
MapObject and Lighting have been fixed not to use XPM icons. I think
we should get this uglyness removed from the remaining 3 plug-ins
for 2.2. Perhaps this comment brings the issue back to some hackers'
minds...
Comment 2 Sven Neumann 2004-08-11 18:24:30 UTC
It seems that the following plug-ins are still using XPM files:

 Fractal Explorer
 ImageMap
 PageCurl
 Rotate Colormap
Comment 3 Sven Neumann 2004-09-24 10:26:00 UTC
Would be nice to get this done for 2.2, but it is of course not a blocker.
Should be 4 simple fixes, any volunteers?
Comment 4 Maurits Rijk 2004-09-25 12:15:16 UTC
Imagemap is almost finished. I volunteer to do the other plug-ins as well.
Comment 5 Sven Neumann 2004-10-22 15:47:24 UTC
Shouldn't block the 2.2 release. If someone wants to do it nevertheless, it
could still be done...
Comment 6 Karine Delvare 2004-11-14 09:11:23 UTC
Imagemap was indeed fixed when I looked at it.
Here are .png files for the 3 plug-ins left, tared as pluginname/images/pngfiles.
Please tell me if I forgot something.
Comment 7 Karine Delvare 2004-11-14 09:13:17 UTC
Created attachment 33756 [details]
FractalExplorer png icons
Comment 8 Karine Delvare 2004-11-14 09:13:51 UTC
Created attachment 33757 [details]
pagecurl png icons
Comment 9 Karine Delvare 2004-11-14 09:14:13 UTC
Created attachment 33758 [details]
rcm png icons
Comment 10 Karine Delvare 2004-11-14 09:21:30 UTC
Created attachment 33759 [details] [review]
Adds 'images' to SUBDIRS
Comment 11 Sven Neumann 2004-11-14 11:19:33 UTC
Are these icons just the XPM files converted to PNG or did you draw new ones (or
pick suitable ones from a stock icon collection)?
Comment 12 Sven Neumann 2004-11-14 11:31:10 UTC
What I had in mind for Pagecurl was to use a single icon and rotate/flip it
accordingly. That will however have to wait for the next development cycle since
it needs GdkPixbuf routines that have only just been added. As soon as we depend
on GTK+-2.6, we should do this change.
Comment 13 Sven Neumann 2004-11-14 11:51:24 UTC
At least for FractalExplorer, replacing the XPM icons with PNG ones is probably
not the right approach here. What should be done here instead is:

(1) Remove the About dialog (that would remove the need for logo.h as well).
(2) Either replace the remaining XPM icons with stock icons from the GTK+ and
    GIMP stock icon collections. There should suitable icons available.

However I just played a bit with FractalExplorer and this part of the GUI seems
to be rather. What is needed here is review this part of the user interface.
There should probably be a separate bug report opened for this. I don't think
it makes sense to deal with the icons until the list interface has been
improved. Since there's a GtkList being used here, the first thing to do would
be to port to GtkTreeView.

  
                
Comment 14 Sven Neumann 2004-11-14 11:53:25 UTC
Ooops, I edited this text after finishing it and obviously I managed to mess it
up quite a bit. That should have read:

(1) Remove the About dialog (that would remove the need for logo.h as well).
(2) Replace the remaining XPM icons with stock icons from the GTK+ or
    GIMP stock icon collections. There should be suitable icons available.

However I just played a bit with FractalExplorer and this part of the GUI seems
to be rather broken. [...]
Comment 15 Karine Delvare 2004-11-14 11:54:28 UTC
Sven: I converted the files. I tried to draw a simple one (mini_cross from
Fractal Explorer) and saw the result was the same (looking at it, I did not
compare the files).

I can redraw them if it can lead to better results, but someone will have to
explain to me:
- how do I pick a color like #96588E38AEBA (is that #968EAE, #5838BA, something
else? or can I work in the gimp with 16bit colors?)
- what options do I choose when saving the .png file, to be consistent with
other plug-in icons?
Comment 16 Karine Delvare 2004-11-14 12:02:25 UTC
Btw: I used convert (from ImageMagick 5.5.7) file.xpm file.png, with no options.
Comment 17 Sven Neumann 2004-11-14 12:24:20 UTC
Since I see that you are working on this stuff and to get you going, I've now
done the following change to CVS:

2004-11-14  Sven Neumann  <sven@gimp.org>

	* plug-ins/gimpressionist/Makefile.am: fixed typo.

	* plug-ins/pagecurl/Makefile.am
	* plug-ins/pagecurl/curl[0-7].png: added PNG versions of the XPM
	icons used by the PageCurl plug-in. Added rules to build a header
	file that can be used to get rid of the XPM files (bug #140202).

Getting this Makefile stuff right is definitely not trivial, so I guessed you
could need some help here. This change allows you to port Pagecurl from
GimpPixmap to GdkPixbuf/GtkImage. What you will need to do is to include the
created header file, add code that creates pixbufs (gdk_pixbuf_new_from_inline)
and replace the GimpPixmap with a GtkImage that renders the pixbufs.
Comment 18 Sven Neumann 2004-11-14 12:27:28 UTC
Let's ignore FractalExplorer for now. It doesn't make sense to work on it as
long as it still uses a GtkList. When it is ported to GtkTreeView, stock icons
can be used and the XPM files can just be removed.

As soon as Pagecurl is done, we can have a look at RCM. I guess we will need to
add a stock icon factory there so that we can use gtk_button_new_from_stock().
Comment 19 Karine Delvare 2004-11-14 13:44:13 UTC
Created attachment 33763 [details] [review]
Ports Pagecurl from GimpPixmap to GdkPixbuf/GtkImage.
Comment 20 Sven Neumann 2004-11-14 14:30:31 UTC
Thanks for that patch. I've done a couple of smaller changes, for example
unref'ing the pixbufs so we don't leak them...

2004-11-14  Sven Neumann  <sven@gimp.org>

	* plug-ins/pagecurl/pagecurl.c: applied a patch from Karine Proot
	that replaces the XPM icons with pixbufs (bug #140202).

	* plug-ins/pagecurl/curl[0-7].xpm: removed.
Comment 21 Sven Neumann 2004-11-14 14:33:03 UTC
I suggest that we fix RCM, open a new bug report for FractalExplorer and close
this one. This report starts to become confusing. It deals with too many things.
Comment 22 Sven Neumann 2004-11-14 16:20:54 UTC
Preparing the changes to RCM:

2004-11-14  Sven Neumann  <sven@gimp.org>

	* configure.in
	* plug-ins/rcm/Makefile.am
	* plug-ins/rcm/images/Makefile.am
	* plug-ins/rcm/images/rcm-360.png
	* plug-ins/rcm/images/rcm-a-b.png
	* plug-ins/rcm/images/rcm-ccw.png
	* plug-ins/rcm/images/rcm-cw.png: added PNG versions of the XPM
	icons used by the RCM plug-in. Added rules to build a header file
	that can be used to get rid of the XPM files (bug #140202).
Comment 23 Sven Neumann 2004-11-14 18:21:03 UTC
rcm-360 should probably have better been renamed to rcm-all and rcm-a-b would
better be called rcm-swap. Will change that as soon as the changes to the code
have been done...
Comment 24 Maurits Rijk 2004-11-15 09:10:05 UTC
I guess the pagecurl plug-in should actually have a preview widget instead of
the icons.
Comment 25 Karine Delvare 2004-11-17 06:52:27 UTC
Here comes the rcm patch, thanks to Sven's help.

Two new files are needed : rcm_stock.[c,h]
They can be found at http://edhel.nerim.net/gimp/

Note: There is no Gtk-CRITICAL anymore.
Comment 26 Karine Delvare 2004-11-17 06:54:15 UTC
Created attachment 33874 [details] [review]
Makes rcm plug-in use a stock icon factory.
Comment 27 Sven Neumann 2004-11-17 10:45:46 UTC
Very nice, thank you. Applied with some minor modifications (mainly added
missing i18n to the stock items).

2004-11-17  Sven Neumann  <sven@gimp.org>

	* plug-ins/rcm/Makefile.am
	* plug-ins/rcm/rcm_callback.c
	* plug-ins/rcm/rcm_dialog.c
	* plug-ins/rcm/rcm_stock.[ch]: applied a patch from Karine Proot
	that replaces the XPM icons with stock icons (bug #140202).

	* plug-ins/rcm/pixmaps/*.xpm: removed.


Comment 28 Joao S. O. Bueno 2004-11-17 12:22:09 UTC
Pygimp is also using a "xpm" icon  - actually, the logo data is hard-coded 
into the source file, and gdk XPM-dealing api is used. 
 
I just switched it to an external .png 
Comment 29 Joao S. O. Bueno 2004-11-17 12:25:55 UTC
Created attachment 33877 [details] [review]
pygimp - removes inline logo and changes code to load external .png

Yosh made some commits tonight that are not in anoncvs yet - patch to gimpfu.py
may need to be tunned to apply cleanly.
Comment 30 Joao S. O. Bueno 2004-11-17 12:27:04 UTC
Created attachment 33878 [details]
pygimp: gimpfu logo
Comment 31 Joao S. O. Bueno 2004-11-19 03:55:09 UTC
Created attachment 33927 [details] [review]
Updated patch removing inline pygimp logo.
Comment 32 Manish Singh 2004-11-23 02:42:33 UTC
The pygimp patches are obsolete, the code in CVS uses a new logo, in an external
png.
Comment 33 Sven Neumann 2005-01-03 11:38:12 UTC
So the only plug-in that's left to deal with is FractalExplorer.
Comment 34 Michael Natterer 2005-01-18 21:04:55 UTC
There should definitely be no XPMs in 2.4
Comment 35 Karine Delvare 2005-04-01 12:53:04 UTC
There is currently a problem with FractalExplorer, as it segfaults (see bug
#172347). I tried to track the bug down without success.

Sven suggested it would be a good idea to port FractalExplorer to GtkTreeView,
and that would probably lead to rewrite the part that segfaults.
Comment 36 Sven Neumann 2005-06-14 12:04:27 UTC
Since the segfault has been fixed, it would be a good time now to finally port
this beast to GtkTreeView and get rid of the remaining XPM icons.
Comment 37 Karine Delvare 2005-06-20 21:12:57 UTC
Created attachment 48061 [details] [review]
Uses stock icons instead of xpm ones

The patch is big because it ports FractalExplorer from GtkList to GtkTreeView.

I also changed the behavior of the plug-in when you remove all fractals :
previously it was adding a new fractal so the list would never get empty, now
it lets you empty the list but you still have the last one deleted in the
preview (and in current_obj) to be used if necessary.

That's why I removed so many functions - they were all there for that trick, if
I'm not mistaking...

The stock icons used are GTK_STOCK_NO and GTK_STOCK_YES to notice read-only
fractals from others, that's the closest I found. The third xpm icon was used
for the "list never empty trick" and thus has not been replaced.
Comment 38 Sven Neumann 2005-06-20 22:36:28 UTC
Yay! Finally no more XPMs!

2005-06-21  Sven Neumann  <sven@gimp.org>

	* plug-ins/FractalExplorer/FractalExplorer.c: applied a patch from
	Karine Delvare that ports the list to GtkTreeView and replaces the
	XPM icons with stock icons. Fixes bug #140202.

	* plug-ins/FractalExplorer/Makefile.am
	* plug-ins/FractalExplorer/pix_data.h: removed this file.

Thanks a lot for this patch! There are a few minor issues with the new UI. Ask
me on IRC if you are interested to do further work on this plug-in...
Comment 39 Karine Delvare 2005-06-21 21:19:54 UTC
Created attachment 48132 [details] [review]
UI improvements

Removed About dialog.
The list will now scroll when you browse it.
Removed stock icons that were confusing.
Comment 40 Sven Neumann 2005-06-21 23:10:20 UTC
2005-06-22  Sven Neumann  <sven@gimp.org>

        * plug-ins/FractalExplorer/Dialogs.c
        * plug-ins/FractalExplorer/FractalExplorer.[ch]: merged in a patch
        from Karine Delvare with further UI improvements (see bug #140202).

One thing still jumped at my attention. The title of the list asks the user to
double-click a fractal. That isn't quite right. Perhaps that frame should be
removed entirely.
Comment 41 Karine Delvare 2005-06-22 18:56:32 UTC
Sorry, I forgot to mention that logo.h should be removed now the About gialog is
gone.
Comment 42 Karine Delvare 2005-06-22 18:57:02 UTC
Created attachment 48174 [details] [review]
Removes unwanted frame.
Comment 43 Sven Neumann 2005-06-22 21:19:42 UTC
2005-06-22  Sven Neumann  <sven@gimp.org>

	* plug-ins/FractalExplorer/FractalExplorer.c: applied a patch from
	Karine Delvare that removes an obsolete frame.

	* plug-ins/FractalExplorer/Makefile.am
	* plug-ins/FractalExplorer/logo.h: removed logo now that the About
	dialog is gone.
Comment 44 Sven Neumann 2005-06-23 09:58:29 UTC
There's still a problem with the new treeview. If you switch to the notebook
showing the list of fractals, the first fractal in the list is being selected,
thus changing the currently setup fractal. This needs to be avoided somehow. The
old code seemed to require the user to double-click to actually activate a
fractal. There are probably other ways to solve this. The current fractal could
for example be in the list and selected.
Comment 45 Karine Delvare 2005-06-25 07:14:41 UTC
Created attachment 48310 [details] [review]
Activate fractal on click rather than select.
Comment 46 Sven Neumann 2005-06-25 09:51:16 UTC
Fiddling with button events is not a good idea. Why don't you connect to
"row-activated" instead?
Comment 47 Karine Delvare 2005-06-25 12:20:00 UTC
"row-activated" needs a double-click to activate a fractal, which is harder to
discover (unless I bring the frame back with its title). That is indeed much
simpler and what I had done first, but I was under the impression this was not
good enough.

Comment 48 Michael Natterer 2005-06-25 12:41:56 UTC
Double-click is the generally accepted metaphor for activating something
in a list where you can also select things. IMHO it's absolutely unacceptable
that selecting (single clicking) an item with the mouse behaves different
that selecting it with the keyboard.

Please use "row-activated", everything else would be inconsistent from
most other lists on the desktop.
Comment 49 Karine Delvare 2005-06-25 13:23:29 UTC
Created attachment 48317 [details] [review]
Activates fractal on double-click rather than select

Do we need the tip about double-click back?
Comment 50 Michael Natterer 2005-06-25 14:30:31 UTC
Comment on attachment 48317 [details] [review]
Activates fractal on double-click rather than select

Looks fine. Please commit.
Comment 51 Karine Delvare 2005-06-26 09:01:52 UTC
Created attachment 48337 [details] [review]
Add an apply button and remove the frame around the scrolled window.