Commit graph

40 commits

Author SHA1 Message Date
Jens Granseuer
af6a49348c Fix compiler warnings
theme-thumbnail-engine.c: In function 'message_from_capplet':
theme-thumbnail-engine.c:642: warning: 'pixels' may be used uninitialized in
this function
theme-thumbnail-engine.c:641: warning: 'rowstride' may be used uninitialized in
this function

These are actually false positives but no warnings is good (bug #590990).
2009-08-09 13:01:54 +02:00
Matthias Clasen
8f60c01f29 Fix some theme thumbnail rendering gotchas
The theme thumbnail rendering code gets the rendering of folder icons somewhat
wrong, ie it frequently shows a gnome-fs-directory icon from gnome even if the
actual theme has a folder icon. Improve things by using modern GtkIconTheme
api in a better way.
2009-07-18 01:08:38 -04:00
Søren Sandmann Pedersen
5978fd729c +Fri Oct 24 17:17:47 2008 Søren Sandmann <sandmann@redhat.com>
+
+	* Get rid of a number of unnecessary gnome.h includes
+
+	* capplets/keybindings/gnome-keybinding-properties.c: Use
+	gtk_init() instead of gnome_program_init().
+
+	* A couple of formatting fixes
+


svn path=/trunk/; revision=9098
2008-10-24 21:19:15 +00:00
Jens Granseuer
10e93c23ad unref the thumbnail image after passing it to the callback. Callers will
2008-04-20  Jens Granseuer  <jensgr@gmx.net>

	* theme-thumbnail.c: (message_from_child): unref the thumbnail image
	after passing it to the callback. Callers will have to ref it if they
	want to keep it until after the callback has returned

2008-04-20  Jens Granseuer  <jensgr@gmx.net>

	* appearance-style.c: (update_thumbnail_in_treeview):
	* appearance-themes.c: (theme_thumbnail_update),
	(theme_thumbnail_generate): adapt to modified refcounting in the
	thumbnailer; thumbnails don't need to be unref'ed unless we explicitly
	retain a reference

svn path=/trunk/; revision=8661
2008-04-20 10:29:49 +00:00
Jens Granseuer
debc4f4091 Disable theme thumbnailing on MacOS. Some CoreFoundation functionality can
2008-04-13  Jens Granseuer  <jensgr@gmx.net>

	Disable theme thumbnailing on MacOS. Some CoreFoundation functionality
	can apparently no longer be used from forked processes (see bug
	#525058). Unfortunately, it is used by freetype/pango/cairo/gtk, and
	as such by our forked thumbnailer. This change means no thumbnails on
	MacOS, but I suppose that's better than crashing. Reworking the
	thumbnailer to work without forking is going to be a major effort.

	* theme-thumbnail.c: (theme_thumbnail_factory_init): only enable the
	asynchronous thumbnailer if not on MacOS

svn path=/trunk/; revision=8649
2008-04-13 17:06:34 +00:00
Jens Granseuer
d34d7a02e6 Encountering a theme that could not be thumbnailed (e.g. because the
2008-03-11  Jens Granseuer  <jensgr@gmx.net>

	Encountering a theme that could not be thumbnailed (e.g. because the
	metacity theme for a metatheme isn't installed) would make the
	thumbnailer crash. Since it's not restarted by the appearance capplet
	this would result in all themes encountered after the broken one not
	to be thumbnailed either. This change fixes up error handling in the
	thumbnailer so that the broken theme is simply skipped and processing
	can continue with the next one. (bug #521009)

	* theme-thumbnail.c: (create_meta_theme_pixbuf),
	(create_metacity_theme_pixbuf), (message_from_capplet),
	(message_from_child), (read_pixbuf),
	(generate_theme_thumbnail_async), (theme_thumbnail_factory_init):
	properly handle failed thumbnailing attempts

svn path=/trunk/; revision=8576
2008-03-11 17:43:43 +00:00
Thomas Wood
e0288e3e5d Return FALSE on error or EOF, which should also fix bug 516413, in
2008-02-25  Thomas Wood  <thos@gnome.org>

	* theme-thumbnail.c: (message_from_child): Return FALSE on error or EOF,
	which should also fix bug 516413, in addition to checking for G_IO_HUP.

svn path=/trunk/; revision=8523
2008-02-25 22:06:42 +00:00
Thomas Wood
26be7ba979 (create_meta_theme_pixbuf), (create_metacity_theme_pixbuf): Use the new
2008-02-25  Thomas Wood  <thos@gnome.org>

	* theme-thumbnail.c:

	(create_meta_theme_pixbuf), (create_metacity_theme_pixbuf):
	Use the new meta_preview_get_clip_region() function in Metacity to fix
	bug 460018 (Rounded window borders don't get rendered correctly).

	(message_from_child): Do not attempt to read from the pipe when
	the connection has been broken. Fixes bug 516413 (Theme thumbnailer
	causes UI to stop drawing when encountering an error).

svn path=/trunk/; revision=8521
2008-02-25 17:41:54 +00:00
Jens Granseuer
e146579518 don't try to map invisible widgets, e.g. the button icon when running with
2007-12-09  Jens Granseuer  <jensgr@gmx.net>

	* theme-thumbnail.c: (hbox_foreach): don't try to map invisible
	widgets, e.g. the button icon when running with gtk-button-images=0
	(bug #461298)

svn path=/trunk/; revision=8322
2007-12-09 15:36:10 +00:00
Jens Granseuer
205e897235 free metacity theme after use
2007-12-09  Jens Granseuer  <jensgr@gmx.net>

	* theme-thumbnail.c: (create_meta_theme_pixbuf): free metacity theme
	after use

svn path=/trunk/; revision=8321
2007-12-09 15:10:41 +00:00
Jens Granseuer
d28037d3b2 move the code for setting the color scheme for gtk thumbnails to the
2007-09-29  Jens Granseuer  <jensgr@gmx.net>

	* theme-thumbnail.c: (generate_gtk_theme_thumbnail),
	(generate_theme_thumbnail_async),
	(generate_gtk_theme_thumbnail_async): move the code for setting the
	color scheme for gtk thumbnails to the gtk-specific function. This
	means we will probably extract it twice for most thumbnails, but it
	makes for much cleaner code. Also add the scheme bit to the synchronous
	version.

svn path=/trunk/; revision=8144
2007-09-29 09:37:33 +00:00
Jens Granseuer
fb5f03d31e patch up an outdated comment about how the thumbnailer protocol works
2007-09-25  Jens Granseuer  <jensgr@gmx.net>

	* theme-thumbnail.c: patch up an outdated comment about how the
	thumbnailer protocol works

svn path=/trunk/; revision=8137
2007-09-25 19:46:23 +00:00
Jens Granseuer
b2a41685b8 Prevent lots of thumbs from being created with the color scheme of the
2007-09-25  Jens Granseuer  <jensgr@gmx.net>

 	Prevent lots of thumbs from being created with the color scheme of the
	currently active theme (see comment #15 in bug 460023). Maybe it also
	helps with some of the other color-related issues.

	* theme-thumbnail.c: (create_gtk_theme_pixbuf),
	(generate_theme_thumbnail_async): when creating GTK theme thumbnails,
	explicitly pass the theme's color scheme to override the xsetting

svn path=/trunk/; revision=8135
2007-09-25 19:36:18 +00:00
Jens Granseuer
eddd1b3d9b Patch by: Darren Kenny <darren.kenny@sun.com>
2007-09-16  Jens Granseuer  <jensgr@gmx.net>

	Patch by: Darren Kenny <darren.kenny@sun.com>

	* theme-thumbnail.c: (generate_meta_theme_thumbnail_async),
	(generate_gtk_theme_thumbnail_async),
	(generate_metacity_theme_thumbnail_async),
	(generate_icon_theme_thumbnail_async): don't return values from void
	functions. Fixes building with Sun's Forte compiler (bug #473967)

svn path=/trunk/; revision=8115
2007-09-16 15:46:49 +00:00
Jens Granseuer
1e5c9968e2 fix leaks (bug #469531)
2007-08-23  Jens Granseuer  <jensgr@gmx.net>

	* appearance-themes.c: (theme_get_thumbnail_from_cache):
	* gnome-wp-item.c: (gnome_wp_item_update_description): fix leaks (bug
	#469531)

2007-08-23  Jens Granseuer  <jensgr@gmx.net>

	* gnome-theme-info.c: (gnome_theme_is_writable): cast to proper type
	* theme-thumbnail.c: (create_metacity_theme_pixbuf): free the metacity
	theme after use (bug #469531)

svn path=/trunk/; revision=8040
2007-08-23 19:02:28 +00:00
Jens Granseuer
2a25f23559 various small tweaks and optimizations
2007-08-12  Jens Granseuer  <jensgr@gmx.net>

	* theme-thumbnail.c: (create_folder_icon),
	(create_gtk_theme_pixbuf), (handle_bytes), (message_from_capplet),
	(message_from_child), (read_pixbuf), (generate_theme_thumbnail):
	various small tweaks and optimizations

svn path=/trunk/; revision=7991
2007-08-12 15:30:07 +00:00
Jens Granseuer
4279e8b062 Create the icon theme representative before the GTK stock button. Since we
2007-08-08  Jens Granseuer  <jensgr@gmx.net>

	* theme-thumbnail.c: (create_meta_theme_pixbuf):
	Create the icon theme representative before the GTK stock button. Since
	we explicitly set the icon theme for the first, this ensures both are
	drawn with the same icon theme. Before it was possible when changing
	icon themes (especially on slower machines) that the GtkSettings were
	not yet updated and the stock button still used the old theme.

svn path=/trunk/; revision=7981
2007-08-08 21:46:28 +00:00
Jens Granseuer
aa9ddd3739 reduce metatheme thumbnail size to 128x128 in preparation of using
2007-08-03  Jens Granseuer  <jensgr@gmx.net>

	* data/appearance.glade:
	* data/theme-thumbnailing.png: reduce metatheme thumbnail size to
	128x128 in preparation of using gnome-thumbnail-factory

2007-08-03  Jens Granseuer  <jensgr@gmx.net>

	* theme-thumbnail.c: reduce metatheme thumbnail size to 128x128

svn path=/trunk/; revision=7954
2007-08-03 19:49:32 +00:00
Jens Granseuer
1ab61b2bbc don't generate GTK thumbnails when we want metacity or icon (bug #462724)
2007-08-02  Jens Granseuer  <jensgr@gmx.net>

	* theme-thumbnail.c: (generate_metacity_theme_thumbnail),
	(generate_icon_theme_thumbnail): don't generate GTK thumbnails when we
	want metacity or icon (bug #462724)

svn path=/trunk/; revision=7948
2007-08-02 18:26:43 +00:00
Denis Washington
4ac577360b Generate all types of thumbnails in a seperate process, not just those for
2007-06-25  Denis Washington  <denisw@svn.gnome.org>

	* theme-thumbnail.[ch]:
	Generate all types of thumbnails in a seperate process, not just those for
	metathemes.

svn path=/trunk/; revision=7774
2007-06-25 15:10:21 +00:00
Denis Washington
34adc6a2db Make metatheme thumbnails original-sized and add check box + radio button.
2007-06-22  Denis Washington  <denisw@svn.gnome.org>

	* theme-thumbnail.c: (create_image):
	Make metatheme thumbnails original-sized and add check box + radio button.

svn path=/trunk/; revision=7758
2007-06-22 15:32:44 +00:00
Jens Granseuer
556f49a625 plug leak fix comment
2007-06-12  Jens Granseuer  <jensgr@gmx.net>

	* gnome-theme-info.c: (gnome_theme_icon_info_free): plug leak
	* theme-thumbnail.c: (message_from_child): fix comment

svn path=/trunk/; revision=7722
2007-06-12 20:57:39 +00:00
Denis Washington
3b1d45c537 Stop the GdkDisplay mess and let gnome-appearance-properties handle gtk+
2007-06-09  Denis Washington  <denisw@svn.gnome.org>

	* theme-thumbnail.c: (generate_gtk_theme_thumbnail):
	Stop the GdkDisplay mess and let gnome-appearance-properties handle
	gtk+ theme changes manually instead.

svn path=/trunk/; revision=7720
2007-06-12 17:05:17 +00:00
Denis Washington
f4ee5fb273 Fix the appearance capplet windows not reacting to gtk+ theme changes.
2007-06-09  Denis Washington  <denisw@svn.gnome.org>

	* theme-thumbnail.c: (generate_gtk_theme_thumbnail):
	Fix the appearance capplet windows not reacting to gtk+ theme changes.

svn path=/trunk/; revision=7707
2007-06-09 14:17:58 +00:00
Jens Granseuer
94e474bcd7 remove caching from the thumbnailer since all of the current users work
2007-06-06  Jens Granseuer  <jensgr@gmx.net>

	* theme-thumbnail.c: (message_from_child),
	(generate_theme_thumbnail), (generate_theme_thumbnail_async),
	(theme_thumbnail_factory_init):
	* theme-thumbnail.h: remove caching from the thumbnailer since
	all of the current users work around it anyway, and resources
	aren't managed properly

svn path=/trunk/; revision=7699
2007-06-06 16:22:51 +00:00
Jens Granseuer
e57c99d8e0 add a parameter to circumvent the internal thumbnail cache to the
2007-06-06  Jens Granseuer  <jensgr@gmx.net>

	* theme-thumbnail.c: (generate_theme_thumbnail_async):
	* theme-thumbnail.h: add a parameter to circumvent the internal
	thumbnail cache to the asynchronous generator

svn path=/trunk/; revision=7695
2007-06-05 22:16:51 +00:00
Jens Granseuer
bd8a7ca464 drop unnecessary strlen (generate_theme_thumbnail_async): save some casts
2007-05-28  Jens Granseuer  <jensgr@gmx.net>

	* theme-thumbnail.c: (generate_theme_thumbnail): drop unnecessary strlen
	(generate_theme_thumbnail_async): save some casts
	(generate_gtk_theme_thumbnail): don't leak the theme name

svn path=/trunk/; revision=7671
2007-05-28 18:56:22 +00:00
Denis Washington
729d77ed0e Make gtk+ theme previews more compact.
2007-05-25  Denis Washington  <denisw@svn.gnome.org>

	* theme-thumbnail.c:
	Make gtk+ theme previews more compact.

svn path=/trunk/; revision=7659
2007-05-25 18:14:11 +00:00
Denis Washington
4fe155f858 Add functions to generate thumbnails for specific types of themes, for
* theme-thumbnail.[ch]:
Add functions to generate thumbnails for specific types of themes, for 
instance a metacity theme thumbnail.


svn path=/trunk/; revision=7653
2007-05-25 14:35:52 +00:00
Thomas Wood
bc8e3ee007 Don't try and open null filenames Reset the gtk_color_scheme after a
2007-03-04  Thomas Wood  <thos@gnome.org>

	* gnome-theme-info.c: (gnome_theme_read_meta_theme): Don't try and open null
	filenames
	* theme-thumbnail.c: (message_from_capplet): Reset the gtk_color_scheme after
	a thumbnail has been generated.

svn path=/trunk/; revision=7359
2007-03-04 18:28:57 +00:00
Thomas Wood
4a33f799ef Set the gtk-color-scheme even if it is blank. Set the gtk-color-scheme
2007-02-28  Thomas Wood  <thos@gnome.org>

	* gnome-theme-apply.c: (gnome_meta_theme_set): Set the gtk-color-scheme even
	if it is blank.
	* theme-thumbnail.c: (create_image), (handle_bytes),
	(generate_theme_thumbnail), (generate_theme_thumbnail_async),
	(theme_thumbnail_factory_init): Set the gtk-color-scheme when creating the
	thumbnail.

svn path=/trunk/; revision=7344
2007-02-28 09:18:24 +00:00
Kjartan Maraas
43f439ccd8 Mark some stuff as static.
2007-01-29  Kjartan Maraas  <kmaraas@gnome.org>

	* theme-thumbnail.c: Mark some stuff as static.

svn path=/trunk/; revision=7195
2007-01-29 09:17:37 +00:00
Thomas Wood
98ef85c0b2 Remove g_return_if_fail_warning as this doesn't need to be a critical
2007-01-14  Thomas Wood  <thos@gnome.org>

	* theme-thumbnail.c: (generate_theme_thumbnail): Remove
	g_return_if_fail_warning as this doesn't need to be a critical
	warning. Fixes bug 353620.

svn path=/trunk/; revision=7140
2007-01-14 19:59:14 +00:00
Thomas Wood
0f0600a445 Set the gtk icon theme setting. Fixes bug 355268 - "Open" icon on button
2006-09-30  Thomas Wood  <thos@gnome.org>

	* theme-thumbnail.c: (create_image): Set the gtk icon theme setting.
	Fixes bug 355268 - "Open" icon on button preview not working
2006-09-30 15:48:35 +00:00
Thomas Wood
217dfda275 Modified patch from bug 351378. Fixes bug 351378 and bug 171634.
2006-08-17  Thomas Wood  <thos@gnome.org>

	* capplets/common/theme-thumbnail.c: (fake_expose_widget),
	(hbox_foreach), (create_image): Modified patch from bug 351378.
	Fixes bug 351378 and bug 171634.
2006-08-17 17:37:44 +00:00
Rodney Dawes
0ffa252428 Get the Example icon that is specified by the icon theme, if it exists,
2005-08-14  Rodney Dawes  <dobey@novell.com>

	* theme-thumbnail.c (create_image): Get the Example icon that is
	specified by the icon theme, if it exists, and then fall back through
	a better list of icons to use. Gnome uses gnome-fs-directory currently
	for folders, so we should prefer that over folder, but the icon naming
	spec lists x-directory-normal for standard folders, so we should prefer
	that above other folders

	This fixes issues with the wrong icon being drawn in the thumbnail, due
	to the icon theme providing the gnome folder icon, but inheriting from
	another theme which provides a different icon named "folder" for KDE or
	other desktops
2005-08-14 23:58:24 +00:00
Sebastien Bacher
31ba399378 fix the theme preview crasher with xorg/composite, patch from Colin Gibbs
2005-05-22  Sebastien Bacher  <seb128@debian.org>

	* theme-thumbnail.c: (create_image): fix the theme preview crasher with
	xorg/composite, patch from Colin Gibbs <colin@gibbsonline.net>
	(Closes: #152490).
2005-05-22 14:00:09 +00:00
Sebastien Bacher
12e01119d8 patch by Kjartan Maraas <kmaraas@gnome.org>, remove a load of leaks and
2005-02-08  Sebastien Bacher  <seb128@debian.org>

	* gnome-theme-installer.c: (file_theme_type), (transfer_done_cb),
	(install_dialog_response), (gnome_theme_installer_run):
	patch by Kjartan Maraas <kmaraas@gnome.org>, remove a load of leaks
	and make sure newly installed themes show up in the relevant lists
	without having to close/open the dialog again (Closes: #166267).

2005-02-08  Sebastien Bacher  <seb128@debian.org>

	* gnome-keyboard-properties-xkb.c: (setup_xkb_tabs):
	* gnome-keyboard-properties-xkblt.c: (def_group_in_gconf_changed):
	patch by Kjartan Maraas <kmaraas@gnome.org>, some code cleanups
	(Closes: #166267).

2005-02-08  Sebastien Bacher  <seb128@debian.org>

	* eggcellrendererkeys.c: (egg_cell_renderer_keys_start_editing):
	patch by Kjartan Maraas <kmaraas@gnome.org>, some code cleanups
        (Closes: #166267).

2005-02-08  Sebastien Bacher  <seb128@debian.org>

	* main.c: (wrap_in_label):
        patch by Kjartan Maraas <kmaraas@gnome.org>, some code cleanups
        (Closes: #166267).

2005-02-08  Sebastien Bacher  <seb128@debian.org>

	* gnome-theme-info.c: (update_common_theme_dir_index):
	* theme-thumbnail.c: (create_image):
	patch by Kjartan Maraas <kmaraas@gnome.org>, move to use GtkIconTheme
	and remove a load of leaks in the theme manager code (Closes: #166267).
2005-02-08 22:42:10 +00:00
Mark McLoughlin
356420a10e Handle crashes of the thumbnailer child process a little more gracefully.
2003-07-02  Mark McLoughlin  <mark@skynet.ie>

        Handle crashes of the thumbnailer child process a
        little more gracefully.

        * theme-thumbnail.c:
        (generate_theme_thumbnail): if we get an EOF from
        the child close the pipe, return NULL and return
        NULL from any subsequent calls.
        (generate_theme_thumbnail_async): return NULL if
        the pipe has been closed.
        (theme_thumbnail_factory_init): set pipe descriptos
        to zero after closing them.
2003-07-02 11:12:35 +00:00
Andrew Sobala
128bcd8d80 Andrew Sobala <aes@gnome.org>
The grand "themus->control-center" merge. See individual ChangeLogs for
details.
2003-05-13 18:37:05 +00:00
Renamed from capplets/theme-switcher/theme-thumbnail.c (Browse further)