2004-01-12 05:10:40 +00:00
|
|
|
/*
|
|
|
|
* Authors: Rodney Dawes <dobey@ximian.com>
|
|
|
|
*
|
2004-06-28 18:51:21 +00:00
|
|
|
* Copyright 2003-2004 Novell, Inc. (www.novell.com)
|
2004-01-12 05:10:40 +00:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of version 2 of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
Regenerate the thumbnail in the list when we change scaling type now
2004-04-05 Rodney Dawes <dobey@ximian.com>
* gnome-wp-capplet.c (gnome_wp_scale_type_changed): Regenerate the
thumbnail in the list when we change scaling type now
(wallpaper_properties_init): Add GtkFileFilter support (needs love)
TreeView is buggy, so we need to not set the vertical-separator
style property for it
* gnome-wp-item.c: Include <config.h> and <gnome.h> here
(collect_save_options): Add a function to set all of the pixbuf options
for the thumbnail pixbuf properly, so we can save them back out
(gnome_wp_item_get_thumbnail): Fix up the code to
generate the thumbnails for the list a bit, so that we have sexy
thumbnails that look exactly like how the image would, on-screen
Initialize all of the width/height variables to 0
Add a new pixbuf variable for loading the original image to get the
dimensions of it, so we can do thumbnailing more properly
Use a LIST_IMAGE_WIDTH define, for the width of the images in the list
Just return the bgpixbuf if we are creating the "No Wallpaper" thumb
Save the thumbnail back out with the dimensions for the original image
If our image is smaller than the list thumbnail, then just use 1.0 as
the ratio for scaling the image for tiling/etc...
Use the new API to do scaling inside the center/tile functions
Reload the thumbnail pixbuf after generating it with the thumbnail
system, so that we get all of the pixbuf options set correctly
* gnome-wp-item.h (GnomeWPItem): store the original image's width
and height in the item, so we can avoid reopening the original image
every time we generate the thumbnail, on systems where the thumbnail
doesn't contain the appropriate information
* gnome-wp-utils.c (gnome_wp_pixbuf_tile):
(gnome_wp_pixbuf_center): Add API to do the scaling inside these calls
Fixes #136691
2004-04-05 21:32:02 +00:00
|
|
|
#include <config.h>
|
|
|
|
|
2004-06-28 18:51:21 +00:00
|
|
|
#include <gconf/gconf-client.h>
|
Regenerate the thumbnail in the list when we change scaling type now
2004-04-05 Rodney Dawes <dobey@ximian.com>
* gnome-wp-capplet.c (gnome_wp_scale_type_changed): Regenerate the
thumbnail in the list when we change scaling type now
(wallpaper_properties_init): Add GtkFileFilter support (needs love)
TreeView is buggy, so we need to not set the vertical-separator
style property for it
* gnome-wp-item.c: Include <config.h> and <gnome.h> here
(collect_save_options): Add a function to set all of the pixbuf options
for the thumbnail pixbuf properly, so we can save them back out
(gnome_wp_item_get_thumbnail): Fix up the code to
generate the thumbnails for the list a bit, so that we have sexy
thumbnails that look exactly like how the image would, on-screen
Initialize all of the width/height variables to 0
Add a new pixbuf variable for loading the original image to get the
dimensions of it, so we can do thumbnailing more properly
Use a LIST_IMAGE_WIDTH define, for the width of the images in the list
Just return the bgpixbuf if we are creating the "No Wallpaper" thumb
Save the thumbnail back out with the dimensions for the original image
If our image is smaller than the list thumbnail, then just use 1.0 as
the ratio for scaling the image for tiling/etc...
Use the new API to do scaling inside the center/tile functions
Reload the thumbnail pixbuf after generating it with the thumbnail
system, so that we get all of the pixbuf options set correctly
* gnome-wp-item.h (GnomeWPItem): store the original image's width
and height in the item, so we can avoid reopening the original image
every time we generate the thumbnail, on systems where the thumbnail
doesn't contain the appropriate information
* gnome-wp-utils.c (gnome_wp_pixbuf_tile):
(gnome_wp_pixbuf_center): Add API to do the scaling inside these calls
Fixes #136691
2004-04-05 21:32:02 +00:00
|
|
|
#include <gnome.h>
|
2004-01-12 06:35:57 +00:00
|
|
|
#include <string.h>
|
2004-03-01 04:09:06 +00:00
|
|
|
#include <libgnomevfs/gnome-vfs-mime-handlers.h>
|
2004-01-12 05:10:40 +00:00
|
|
|
|
Regenerate the thumbnail in the list when we change scaling type now
2004-04-05 Rodney Dawes <dobey@ximian.com>
* gnome-wp-capplet.c (gnome_wp_scale_type_changed): Regenerate the
thumbnail in the list when we change scaling type now
(wallpaper_properties_init): Add GtkFileFilter support (needs love)
TreeView is buggy, so we need to not set the vertical-separator
style property for it
* gnome-wp-item.c: Include <config.h> and <gnome.h> here
(collect_save_options): Add a function to set all of the pixbuf options
for the thumbnail pixbuf properly, so we can save them back out
(gnome_wp_item_get_thumbnail): Fix up the code to
generate the thumbnails for the list a bit, so that we have sexy
thumbnails that look exactly like how the image would, on-screen
Initialize all of the width/height variables to 0
Add a new pixbuf variable for loading the original image to get the
dimensions of it, so we can do thumbnailing more properly
Use a LIST_IMAGE_WIDTH define, for the width of the images in the list
Just return the bgpixbuf if we are creating the "No Wallpaper" thumb
Save the thumbnail back out with the dimensions for the original image
If our image is smaller than the list thumbnail, then just use 1.0 as
the ratio for scaling the image for tiling/etc...
Use the new API to do scaling inside the center/tile functions
Reload the thumbnail pixbuf after generating it with the thumbnail
system, so that we get all of the pixbuf options set correctly
* gnome-wp-item.h (GnomeWPItem): store the original image's width
and height in the item, so we can avoid reopening the original image
every time we generate the thumbnail, on systems where the thumbnail
doesn't contain the appropriate information
* gnome-wp-utils.c (gnome_wp_pixbuf_tile):
(gnome_wp_pixbuf_center): Add API to do the scaling inside these calls
Fixes #136691
2004-04-05 21:32:02 +00:00
|
|
|
#include "gnome-wp-item.h"
|
|
|
|
#include "gnome-wp-utils.h"
|
|
|
|
|
2004-06-28 18:51:21 +00:00
|
|
|
GnomeWPItem * gnome_wp_item_new (const gchar * filename,
|
|
|
|
GHashTable * wallpapers,
|
|
|
|
GnomeThumbnailFactory * thumbnails) {
|
|
|
|
GnomeWPItem * item = NULL;
|
|
|
|
GdkColor color1, color2;
|
|
|
|
GConfClient * client;
|
|
|
|
|
|
|
|
client = gconf_client_get_default ();
|
|
|
|
|
|
|
|
item = g_new0 (GnomeWPItem, 1);
|
|
|
|
|
2004-09-29 18:12:08 +00:00
|
|
|
item->filename = gnome_vfs_unescape_string_for_display (filename);
|
2004-06-28 18:51:21 +00:00
|
|
|
|
|
|
|
item->fileinfo = gnome_wp_info_new (item->filename, thumbnails);
|
|
|
|
|
|
|
|
item->shade_type = gconf_client_get_string (client, WP_SHADING_KEY, NULL);
|
|
|
|
item->pri_color = gconf_client_get_string (client, WP_PCOLOR_KEY, NULL);
|
|
|
|
item->sec_color = gconf_client_get_string (client, WP_SCOLOR_KEY, NULL);
|
|
|
|
|
|
|
|
gdk_color_parse (item->pri_color, &color1);
|
|
|
|
gdk_color_parse (item->sec_color, &color2);
|
|
|
|
|
|
|
|
item->pcolor = gdk_color_copy (&color1);
|
|
|
|
item->scolor = gdk_color_copy (&color2);
|
|
|
|
|
2004-07-15 13:58:51 +00:00
|
|
|
if (item->fileinfo != NULL &&
|
|
|
|
!strncmp (item->fileinfo->mime_type, "image/", strlen ("image/"))) {
|
2004-06-28 18:51:21 +00:00
|
|
|
if (item->name == NULL) {
|
|
|
|
item->name = g_strdup (item->fileinfo->name);
|
|
|
|
}
|
|
|
|
item->options = gconf_client_get_string (client, WP_OPTIONS_KEY, NULL);
|
|
|
|
|
|
|
|
if (!strcmp (item->options, "none")) {
|
2005-01-09 03:53:35 +00:00
|
|
|
item->options = g_strdup ("scaled");
|
2004-06-28 18:51:21 +00:00
|
|
|
}
|
|
|
|
gnome_wp_item_update_description (item);
|
|
|
|
|
|
|
|
g_hash_table_insert (wallpapers, g_strdup (item->filename), item);
|
|
|
|
} else {
|
|
|
|
gnome_wp_item_free (item);
|
|
|
|
item = NULL;
|
|
|
|
}
|
|
|
|
|
2005-01-09 03:53:35 +00:00
|
|
|
g_object_unref (client);
|
|
|
|
|
2004-06-28 18:51:21 +00:00
|
|
|
return item;
|
|
|
|
}
|
|
|
|
|
2004-01-12 05:10:40 +00:00
|
|
|
void gnome_wp_item_free (GnomeWPItem * item) {
|
|
|
|
if (item == NULL) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
g_free (item->name);
|
|
|
|
g_free (item->filename);
|
|
|
|
g_free (item->description);
|
|
|
|
g_free (item->imguri);
|
|
|
|
g_free (item->options);
|
|
|
|
g_free (item->shade_type);
|
|
|
|
|
|
|
|
g_free (item->pri_color);
|
|
|
|
g_free (item->sec_color);
|
|
|
|
|
2004-09-22 15:07:01 +00:00
|
|
|
if (item->pcolor != NULL)
|
|
|
|
gdk_color_free (item->pcolor);
|
|
|
|
|
|
|
|
if (item->scolor != NULL)
|
|
|
|
gdk_color_free (item->scolor);
|
2004-01-12 05:10:40 +00:00
|
|
|
|
|
|
|
gnome_wp_info_free (item->fileinfo);
|
|
|
|
gnome_wp_info_free (item->uriinfo);
|
|
|
|
|
|
|
|
gtk_tree_row_reference_free (item->rowref);
|
|
|
|
|
|
|
|
item = NULL;
|
|
|
|
}
|
|
|
|
|
Regenerate the thumbnail in the list when we change scaling type now
2004-04-05 Rodney Dawes <dobey@ximian.com>
* gnome-wp-capplet.c (gnome_wp_scale_type_changed): Regenerate the
thumbnail in the list when we change scaling type now
(wallpaper_properties_init): Add GtkFileFilter support (needs love)
TreeView is buggy, so we need to not set the vertical-separator
style property for it
* gnome-wp-item.c: Include <config.h> and <gnome.h> here
(collect_save_options): Add a function to set all of the pixbuf options
for the thumbnail pixbuf properly, so we can save them back out
(gnome_wp_item_get_thumbnail): Fix up the code to
generate the thumbnails for the list a bit, so that we have sexy
thumbnails that look exactly like how the image would, on-screen
Initialize all of the width/height variables to 0
Add a new pixbuf variable for loading the original image to get the
dimensions of it, so we can do thumbnailing more properly
Use a LIST_IMAGE_WIDTH define, for the width of the images in the list
Just return the bgpixbuf if we are creating the "No Wallpaper" thumb
Save the thumbnail back out with the dimensions for the original image
If our image is smaller than the list thumbnail, then just use 1.0 as
the ratio for scaling the image for tiling/etc...
Use the new API to do scaling inside the center/tile functions
Reload the thumbnail pixbuf after generating it with the thumbnail
system, so that we get all of the pixbuf options set correctly
* gnome-wp-item.h (GnomeWPItem): store the original image's width
and height in the item, so we can avoid reopening the original image
every time we generate the thumbnail, on systems where the thumbnail
doesn't contain the appropriate information
* gnome-wp-utils.c (gnome_wp_pixbuf_tile):
(gnome_wp_pixbuf_center): Add API to do the scaling inside these calls
Fixes #136691
2004-04-05 21:32:02 +00:00
|
|
|
static void collect_save_options (GdkPixbuf * pixbuf,
|
|
|
|
gchar *** keys,
|
|
|
|
gchar *** vals,
|
|
|
|
gint width,
|
|
|
|
gint height) {
|
|
|
|
gchar ** options;
|
|
|
|
gint n, count;
|
|
|
|
|
|
|
|
count = 0;
|
|
|
|
|
|
|
|
options = g_object_get_qdata (G_OBJECT (pixbuf),
|
|
|
|
g_quark_from_static_string ("gdk_pixbuf_options"));
|
|
|
|
if (options) {
|
|
|
|
for (n = 0; options[2 * n]; n++) {
|
|
|
|
++count;
|
|
|
|
|
|
|
|
*keys = g_realloc (*keys, sizeof (gchar *) * (count + 1));
|
|
|
|
*vals = g_realloc (*vals, sizeof (gchar *) * (count + 1));
|
|
|
|
|
|
|
|
(*keys)[count - 1] = g_strdup (options[2 * n]);
|
|
|
|
(*vals)[count - 1] = g_strdup (options[2 * n + 1]);
|
|
|
|
|
|
|
|
(*keys)[count] = NULL;
|
|
|
|
(*vals)[count] = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
++count;
|
|
|
|
|
|
|
|
*keys = g_realloc (*keys, sizeof (gchar *) * (count + 1));
|
|
|
|
*vals = g_realloc (*vals, sizeof (gchar *) * (count + 1));
|
|
|
|
|
|
|
|
(*keys)[count - 1] = g_strdup ("tEXt::Thumb::Image::Width");
|
|
|
|
(*vals)[count - 1] = g_strdup_printf ("%d", width);
|
|
|
|
|
|
|
|
(*keys)[count] = NULL;
|
|
|
|
(*vals)[count] = NULL;
|
|
|
|
|
|
|
|
++count;
|
|
|
|
|
|
|
|
*keys = g_realloc (*keys, sizeof (gchar *) * (count + 1));
|
|
|
|
*vals = g_realloc (*vals, sizeof (gchar *) * (count + 1));
|
|
|
|
|
|
|
|
(*keys)[count - 1] = g_strdup ("tEXt::Thumb::Image::Height");
|
|
|
|
(*vals)[count - 1] = g_strdup_printf ("%d", height);
|
|
|
|
|
|
|
|
(*keys)[count] = NULL;
|
|
|
|
(*vals)[count] = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
#define LIST_IMAGE_WIDTH 64
|
|
|
|
|
2004-01-12 05:10:40 +00:00
|
|
|
GdkPixbuf * gnome_wp_item_get_thumbnail (GnomeWPItem * item,
|
|
|
|
GnomeThumbnailFactory * thumbs) {
|
|
|
|
GdkPixbuf * pixbuf, * bgpixbuf;
|
Regenerate the thumbnail in the list when we change scaling type now
2004-04-05 Rodney Dawes <dobey@ximian.com>
* gnome-wp-capplet.c (gnome_wp_scale_type_changed): Regenerate the
thumbnail in the list when we change scaling type now
(wallpaper_properties_init): Add GtkFileFilter support (needs love)
TreeView is buggy, so we need to not set the vertical-separator
style property for it
* gnome-wp-item.c: Include <config.h> and <gnome.h> here
(collect_save_options): Add a function to set all of the pixbuf options
for the thumbnail pixbuf properly, so we can save them back out
(gnome_wp_item_get_thumbnail): Fix up the code to
generate the thumbnails for the list a bit, so that we have sexy
thumbnails that look exactly like how the image would, on-screen
Initialize all of the width/height variables to 0
Add a new pixbuf variable for loading the original image to get the
dimensions of it, so we can do thumbnailing more properly
Use a LIST_IMAGE_WIDTH define, for the width of the images in the list
Just return the bgpixbuf if we are creating the "No Wallpaper" thumb
Save the thumbnail back out with the dimensions for the original image
If our image is smaller than the list thumbnail, then just use 1.0 as
the ratio for scaling the image for tiling/etc...
Use the new API to do scaling inside the center/tile functions
Reload the thumbnail pixbuf after generating it with the thumbnail
system, so that we get all of the pixbuf options set correctly
* gnome-wp-item.h (GnomeWPItem): store the original image's width
and height in the item, so we can avoid reopening the original image
every time we generate the thumbnail, on systems where the thumbnail
doesn't contain the appropriate information
* gnome-wp-utils.c (gnome_wp_pixbuf_tile):
(gnome_wp_pixbuf_center): Add API to do the scaling inside these calls
Fixes #136691
2004-04-05 21:32:02 +00:00
|
|
|
GdkPixbuf * tmpbuf;
|
2004-01-12 05:10:40 +00:00
|
|
|
GdkPixbuf * scaled = NULL;
|
Regenerate the thumbnail in the list when we change scaling type now
2004-04-05 Rodney Dawes <dobey@ximian.com>
* gnome-wp-capplet.c (gnome_wp_scale_type_changed): Regenerate the
thumbnail in the list when we change scaling type now
(wallpaper_properties_init): Add GtkFileFilter support (needs love)
TreeView is buggy, so we need to not set the vertical-separator
style property for it
* gnome-wp-item.c: Include <config.h> and <gnome.h> here
(collect_save_options): Add a function to set all of the pixbuf options
for the thumbnail pixbuf properly, so we can save them back out
(gnome_wp_item_get_thumbnail): Fix up the code to
generate the thumbnails for the list a bit, so that we have sexy
thumbnails that look exactly like how the image would, on-screen
Initialize all of the width/height variables to 0
Add a new pixbuf variable for loading the original image to get the
dimensions of it, so we can do thumbnailing more properly
Use a LIST_IMAGE_WIDTH define, for the width of the images in the list
Just return the bgpixbuf if we are creating the "No Wallpaper" thumb
Save the thumbnail back out with the dimensions for the original image
If our image is smaller than the list thumbnail, then just use 1.0 as
the ratio for scaling the image for tiling/etc...
Use the new API to do scaling inside the center/tile functions
Reload the thumbnail pixbuf after generating it with the thumbnail
system, so that we get all of the pixbuf options set correctly
* gnome-wp-item.h (GnomeWPItem): store the original image's width
and height in the item, so we can avoid reopening the original image
every time we generate the thumbnail, on systems where the thumbnail
doesn't contain the appropriate information
* gnome-wp-utils.c (gnome_wp_pixbuf_tile):
(gnome_wp_pixbuf_center): Add API to do the scaling inside these calls
Fixes #136691
2004-04-05 21:32:02 +00:00
|
|
|
gint sw, sh, bw, bh, pw, ph, tw, th;
|
|
|
|
gdouble ratio;
|
|
|
|
|
|
|
|
sw = sh = bw = bh = pw = ph = tw = th = 0;
|
2004-01-12 05:10:40 +00:00
|
|
|
|
2004-02-24 19:32:05 +00:00
|
|
|
/*
|
|
|
|
Get the size of the screen and calculate our aspect ratio divisor
|
|
|
|
We do this, so that images are thumbnailed as they would look on
|
|
|
|
the screen in reality
|
|
|
|
*/
|
Regenerate the thumbnail in the list when we change scaling type now
2004-04-05 Rodney Dawes <dobey@ximian.com>
* gnome-wp-capplet.c (gnome_wp_scale_type_changed): Regenerate the
thumbnail in the list when we change scaling type now
(wallpaper_properties_init): Add GtkFileFilter support (needs love)
TreeView is buggy, so we need to not set the vertical-separator
style property for it
* gnome-wp-item.c: Include <config.h> and <gnome.h> here
(collect_save_options): Add a function to set all of the pixbuf options
for the thumbnail pixbuf properly, so we can save them back out
(gnome_wp_item_get_thumbnail): Fix up the code to
generate the thumbnails for the list a bit, so that we have sexy
thumbnails that look exactly like how the image would, on-screen
Initialize all of the width/height variables to 0
Add a new pixbuf variable for loading the original image to get the
dimensions of it, so we can do thumbnailing more properly
Use a LIST_IMAGE_WIDTH define, for the width of the images in the list
Just return the bgpixbuf if we are creating the "No Wallpaper" thumb
Save the thumbnail back out with the dimensions for the original image
If our image is smaller than the list thumbnail, then just use 1.0 as
the ratio for scaling the image for tiling/etc...
Use the new API to do scaling inside the center/tile functions
Reload the thumbnail pixbuf after generating it with the thumbnail
system, so that we get all of the pixbuf options set correctly
* gnome-wp-item.h (GnomeWPItem): store the original image's width
and height in the item, so we can avoid reopening the original image
every time we generate the thumbnail, on systems where the thumbnail
doesn't contain the appropriate information
* gnome-wp-utils.c (gnome_wp_pixbuf_tile):
(gnome_wp_pixbuf_center): Add API to do the scaling inside these calls
Fixes #136691
2004-04-05 21:32:02 +00:00
|
|
|
sw = gdk_screen_get_width (gdk_screen_get_default ());
|
|
|
|
sh = gdk_screen_get_height (gdk_screen_get_default ());
|
|
|
|
ratio = (gdouble) sw / (gdouble) LIST_IMAGE_WIDTH;
|
|
|
|
bw = sw / ratio;
|
|
|
|
bh = sh / ratio;
|
2004-02-24 19:32:05 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
Create the pixbuf for the background colors, which will show up for
|
|
|
|
oddly sized images, smaller images that are centered, or alpha images
|
|
|
|
*/
|
2004-01-12 05:10:40 +00:00
|
|
|
if (!strcmp (item->shade_type, "solid")) {
|
Regenerate the thumbnail in the list when we change scaling type now
2004-04-05 Rodney Dawes <dobey@ximian.com>
* gnome-wp-capplet.c (gnome_wp_scale_type_changed): Regenerate the
thumbnail in the list when we change scaling type now
(wallpaper_properties_init): Add GtkFileFilter support (needs love)
TreeView is buggy, so we need to not set the vertical-separator
style property for it
* gnome-wp-item.c: Include <config.h> and <gnome.h> here
(collect_save_options): Add a function to set all of the pixbuf options
for the thumbnail pixbuf properly, so we can save them back out
(gnome_wp_item_get_thumbnail): Fix up the code to
generate the thumbnails for the list a bit, so that we have sexy
thumbnails that look exactly like how the image would, on-screen
Initialize all of the width/height variables to 0
Add a new pixbuf variable for loading the original image to get the
dimensions of it, so we can do thumbnailing more properly
Use a LIST_IMAGE_WIDTH define, for the width of the images in the list
Just return the bgpixbuf if we are creating the "No Wallpaper" thumb
Save the thumbnail back out with the dimensions for the original image
If our image is smaller than the list thumbnail, then just use 1.0 as
the ratio for scaling the image for tiling/etc...
Use the new API to do scaling inside the center/tile functions
Reload the thumbnail pixbuf after generating it with the thumbnail
system, so that we get all of the pixbuf options set correctly
* gnome-wp-item.h (GnomeWPItem): store the original image's width
and height in the item, so we can avoid reopening the original image
every time we generate the thumbnail, on systems where the thumbnail
doesn't contain the appropriate information
* gnome-wp-utils.c (gnome_wp_pixbuf_tile):
(gnome_wp_pixbuf_center): Add API to do the scaling inside these calls
Fixes #136691
2004-04-05 21:32:02 +00:00
|
|
|
bgpixbuf = gnome_wp_pixbuf_new_solid (item->pcolor, bw, bh);
|
2004-01-12 05:10:40 +00:00
|
|
|
} else if (!strcmp (item->shade_type, "vertical-gradient")) {
|
|
|
|
bgpixbuf = gnome_wp_pixbuf_new_gradient (GTK_ORIENTATION_VERTICAL,
|
|
|
|
item->pcolor, item->scolor,
|
Regenerate the thumbnail in the list when we change scaling type now
2004-04-05 Rodney Dawes <dobey@ximian.com>
* gnome-wp-capplet.c (gnome_wp_scale_type_changed): Regenerate the
thumbnail in the list when we change scaling type now
(wallpaper_properties_init): Add GtkFileFilter support (needs love)
TreeView is buggy, so we need to not set the vertical-separator
style property for it
* gnome-wp-item.c: Include <config.h> and <gnome.h> here
(collect_save_options): Add a function to set all of the pixbuf options
for the thumbnail pixbuf properly, so we can save them back out
(gnome_wp_item_get_thumbnail): Fix up the code to
generate the thumbnails for the list a bit, so that we have sexy
thumbnails that look exactly like how the image would, on-screen
Initialize all of the width/height variables to 0
Add a new pixbuf variable for loading the original image to get the
dimensions of it, so we can do thumbnailing more properly
Use a LIST_IMAGE_WIDTH define, for the width of the images in the list
Just return the bgpixbuf if we are creating the "No Wallpaper" thumb
Save the thumbnail back out with the dimensions for the original image
If our image is smaller than the list thumbnail, then just use 1.0 as
the ratio for scaling the image for tiling/etc...
Use the new API to do scaling inside the center/tile functions
Reload the thumbnail pixbuf after generating it with the thumbnail
system, so that we get all of the pixbuf options set correctly
* gnome-wp-item.h (GnomeWPItem): store the original image's width
and height in the item, so we can avoid reopening the original image
every time we generate the thumbnail, on systems where the thumbnail
doesn't contain the appropriate information
* gnome-wp-utils.c (gnome_wp_pixbuf_tile):
(gnome_wp_pixbuf_center): Add API to do the scaling inside these calls
Fixes #136691
2004-04-05 21:32:02 +00:00
|
|
|
bw, bh);
|
2004-01-12 05:10:40 +00:00
|
|
|
} else {
|
|
|
|
bgpixbuf = gnome_wp_pixbuf_new_gradient (GTK_ORIENTATION_HORIZONTAL,
|
|
|
|
item->pcolor, item->scolor,
|
Regenerate the thumbnail in the list when we change scaling type now
2004-04-05 Rodney Dawes <dobey@ximian.com>
* gnome-wp-capplet.c (gnome_wp_scale_type_changed): Regenerate the
thumbnail in the list when we change scaling type now
(wallpaper_properties_init): Add GtkFileFilter support (needs love)
TreeView is buggy, so we need to not set the vertical-separator
style property for it
* gnome-wp-item.c: Include <config.h> and <gnome.h> here
(collect_save_options): Add a function to set all of the pixbuf options
for the thumbnail pixbuf properly, so we can save them back out
(gnome_wp_item_get_thumbnail): Fix up the code to
generate the thumbnails for the list a bit, so that we have sexy
thumbnails that look exactly like how the image would, on-screen
Initialize all of the width/height variables to 0
Add a new pixbuf variable for loading the original image to get the
dimensions of it, so we can do thumbnailing more properly
Use a LIST_IMAGE_WIDTH define, for the width of the images in the list
Just return the bgpixbuf if we are creating the "No Wallpaper" thumb
Save the thumbnail back out with the dimensions for the original image
If our image is smaller than the list thumbnail, then just use 1.0 as
the ratio for scaling the image for tiling/etc...
Use the new API to do scaling inside the center/tile functions
Reload the thumbnail pixbuf after generating it with the thumbnail
system, so that we get all of the pixbuf options set correctly
* gnome-wp-item.h (GnomeWPItem): store the original image's width
and height in the item, so we can avoid reopening the original image
every time we generate the thumbnail, on systems where the thumbnail
doesn't contain the appropriate information
* gnome-wp-utils.c (gnome_wp_pixbuf_tile):
(gnome_wp_pixbuf_center): Add API to do the scaling inside these calls
Fixes #136691
2004-04-05 21:32:02 +00:00
|
|
|
bw, bh);
|
2004-01-12 05:10:40 +00:00
|
|
|
}
|
|
|
|
|
2004-02-24 19:32:05 +00:00
|
|
|
/*
|
|
|
|
Load up the thumbnail image using the thumbnail spec
|
|
|
|
If the image doesn't exist, we create it
|
|
|
|
If we are creating the thumbnail for "No Wallpaper", then we just copy
|
|
|
|
the background colors pixbuf we created above, here
|
|
|
|
*/
|
2004-01-12 05:10:40 +00:00
|
|
|
if (item->fileinfo->thumburi != NULL &&
|
|
|
|
g_file_test (item->fileinfo->thumburi, G_FILE_TEST_EXISTS)) {
|
|
|
|
pixbuf = gdk_pixbuf_new_from_file (item->fileinfo->thumburi, NULL);
|
|
|
|
} else if (!strcmp (item->filename, "(none)")) {
|
Regenerate the thumbnail in the list when we change scaling type now
2004-04-05 Rodney Dawes <dobey@ximian.com>
* gnome-wp-capplet.c (gnome_wp_scale_type_changed): Regenerate the
thumbnail in the list when we change scaling type now
(wallpaper_properties_init): Add GtkFileFilter support (needs love)
TreeView is buggy, so we need to not set the vertical-separator
style property for it
* gnome-wp-item.c: Include <config.h> and <gnome.h> here
(collect_save_options): Add a function to set all of the pixbuf options
for the thumbnail pixbuf properly, so we can save them back out
(gnome_wp_item_get_thumbnail): Fix up the code to
generate the thumbnails for the list a bit, so that we have sexy
thumbnails that look exactly like how the image would, on-screen
Initialize all of the width/height variables to 0
Add a new pixbuf variable for loading the original image to get the
dimensions of it, so we can do thumbnailing more properly
Use a LIST_IMAGE_WIDTH define, for the width of the images in the list
Just return the bgpixbuf if we are creating the "No Wallpaper" thumb
Save the thumbnail back out with the dimensions for the original image
If our image is smaller than the list thumbnail, then just use 1.0 as
the ratio for scaling the image for tiling/etc...
Use the new API to do scaling inside the center/tile functions
Reload the thumbnail pixbuf after generating it with the thumbnail
system, so that we get all of the pixbuf options set correctly
* gnome-wp-item.h (GnomeWPItem): store the original image's width
and height in the item, so we can avoid reopening the original image
every time we generate the thumbnail, on systems where the thumbnail
doesn't contain the appropriate information
* gnome-wp-utils.c (gnome_wp_pixbuf_tile):
(gnome_wp_pixbuf_center): Add API to do the scaling inside these calls
Fixes #136691
2004-04-05 21:32:02 +00:00
|
|
|
return bgpixbuf;
|
2004-01-12 05:10:40 +00:00
|
|
|
} else {
|
|
|
|
pixbuf = gnome_thumbnail_factory_generate_thumbnail (thumbs,
|
2004-02-24 20:51:35 +00:00
|
|
|
gnome_vfs_escape_path_string (item->filename),
|
2004-01-12 05:10:40 +00:00
|
|
|
item->fileinfo->mime_type);
|
|
|
|
gnome_thumbnail_factory_save_thumbnail (thumbs, pixbuf,
|
2004-02-24 20:51:35 +00:00
|
|
|
gnome_vfs_escape_path_string (item->filename),
|
2004-01-12 05:10:40 +00:00
|
|
|
item->fileinfo->mtime);
|
Regenerate the thumbnail in the list when we change scaling type now
2004-04-05 Rodney Dawes <dobey@ximian.com>
* gnome-wp-capplet.c (gnome_wp_scale_type_changed): Regenerate the
thumbnail in the list when we change scaling type now
(wallpaper_properties_init): Add GtkFileFilter support (needs love)
TreeView is buggy, so we need to not set the vertical-separator
style property for it
* gnome-wp-item.c: Include <config.h> and <gnome.h> here
(collect_save_options): Add a function to set all of the pixbuf options
for the thumbnail pixbuf properly, so we can save them back out
(gnome_wp_item_get_thumbnail): Fix up the code to
generate the thumbnails for the list a bit, so that we have sexy
thumbnails that look exactly like how the image would, on-screen
Initialize all of the width/height variables to 0
Add a new pixbuf variable for loading the original image to get the
dimensions of it, so we can do thumbnailing more properly
Use a LIST_IMAGE_WIDTH define, for the width of the images in the list
Just return the bgpixbuf if we are creating the "No Wallpaper" thumb
Save the thumbnail back out with the dimensions for the original image
If our image is smaller than the list thumbnail, then just use 1.0 as
the ratio for scaling the image for tiling/etc...
Use the new API to do scaling inside the center/tile functions
Reload the thumbnail pixbuf after generating it with the thumbnail
system, so that we get all of the pixbuf options set correctly
* gnome-wp-item.h (GnomeWPItem): store the original image's width
and height in the item, so we can avoid reopening the original image
every time we generate the thumbnail, on systems where the thumbnail
doesn't contain the appropriate information
* gnome-wp-utils.c (gnome_wp_pixbuf_tile):
(gnome_wp_pixbuf_center): Add API to do the scaling inside these calls
Fixes #136691
2004-04-05 21:32:02 +00:00
|
|
|
g_object_unref (pixbuf);
|
|
|
|
pixbuf = gdk_pixbuf_new_from_file (item->fileinfo->thumburi, NULL);
|
2004-01-12 05:10:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (pixbuf != NULL) {
|
Regenerate the thumbnail in the list when we change scaling type now
2004-04-05 Rodney Dawes <dobey@ximian.com>
* gnome-wp-capplet.c (gnome_wp_scale_type_changed): Regenerate the
thumbnail in the list when we change scaling type now
(wallpaper_properties_init): Add GtkFileFilter support (needs love)
TreeView is buggy, so we need to not set the vertical-separator
style property for it
* gnome-wp-item.c: Include <config.h> and <gnome.h> here
(collect_save_options): Add a function to set all of the pixbuf options
for the thumbnail pixbuf properly, so we can save them back out
(gnome_wp_item_get_thumbnail): Fix up the code to
generate the thumbnails for the list a bit, so that we have sexy
thumbnails that look exactly like how the image would, on-screen
Initialize all of the width/height variables to 0
Add a new pixbuf variable for loading the original image to get the
dimensions of it, so we can do thumbnailing more properly
Use a LIST_IMAGE_WIDTH define, for the width of the images in the list
Just return the bgpixbuf if we are creating the "No Wallpaper" thumb
Save the thumbnail back out with the dimensions for the original image
If our image is smaller than the list thumbnail, then just use 1.0 as
the ratio for scaling the image for tiling/etc...
Use the new API to do scaling inside the center/tile functions
Reload the thumbnail pixbuf after generating it with the thumbnail
system, so that we get all of the pixbuf options set correctly
* gnome-wp-item.h (GnomeWPItem): store the original image's width
and height in the item, so we can avoid reopening the original image
every time we generate the thumbnail, on systems where the thumbnail
doesn't contain the appropriate information
* gnome-wp-utils.c (gnome_wp_pixbuf_tile):
(gnome_wp_pixbuf_center): Add API to do the scaling inside these calls
Fixes #136691
2004-04-05 21:32:02 +00:00
|
|
|
const gchar * w_val, * h_val;
|
|
|
|
|
|
|
|
w_val = gdk_pixbuf_get_option (pixbuf, "tEXt::Thumb::Image::Width");
|
|
|
|
h_val = gdk_pixbuf_get_option (pixbuf, "tEXt::Thumb::Image::Height");
|
|
|
|
if (item->width <= 0 || item->height <= 0) {
|
|
|
|
if (w_val && h_val) {
|
|
|
|
item->width = atoi (w_val);
|
|
|
|
item->height = atoi (h_val);
|
|
|
|
} else {
|
|
|
|
gchar ** keys = NULL;
|
|
|
|
gchar ** vals = NULL;
|
|
|
|
|
|
|
|
tmpbuf = gdk_pixbuf_new_from_file (item->filename, NULL);
|
|
|
|
|
|
|
|
item->width = gdk_pixbuf_get_width (tmpbuf);
|
|
|
|
item->height = gdk_pixbuf_get_height (tmpbuf);
|
|
|
|
|
|
|
|
collect_save_options (pixbuf, &keys, &vals, item->width, item->height);
|
|
|
|
gdk_pixbuf_savev (pixbuf, item->fileinfo->thumburi, "png",
|
|
|
|
keys, vals, NULL);
|
|
|
|
|
|
|
|
g_object_unref (tmpbuf);
|
|
|
|
g_strfreev (keys);
|
|
|
|
g_strfreev (vals);
|
|
|
|
}
|
|
|
|
}
|
2004-01-12 05:10:40 +00:00
|
|
|
|
Regenerate the thumbnail in the list when we change scaling type now
2004-04-05 Rodney Dawes <dobey@ximian.com>
* gnome-wp-capplet.c (gnome_wp_scale_type_changed): Regenerate the
thumbnail in the list when we change scaling type now
(wallpaper_properties_init): Add GtkFileFilter support (needs love)
TreeView is buggy, so we need to not set the vertical-separator
style property for it
* gnome-wp-item.c: Include <config.h> and <gnome.h> here
(collect_save_options): Add a function to set all of the pixbuf options
for the thumbnail pixbuf properly, so we can save them back out
(gnome_wp_item_get_thumbnail): Fix up the code to
generate the thumbnails for the list a bit, so that we have sexy
thumbnails that look exactly like how the image would, on-screen
Initialize all of the width/height variables to 0
Add a new pixbuf variable for loading the original image to get the
dimensions of it, so we can do thumbnailing more properly
Use a LIST_IMAGE_WIDTH define, for the width of the images in the list
Just return the bgpixbuf if we are creating the "No Wallpaper" thumb
Save the thumbnail back out with the dimensions for the original image
If our image is smaller than the list thumbnail, then just use 1.0 as
the ratio for scaling the image for tiling/etc...
Use the new API to do scaling inside the center/tile functions
Reload the thumbnail pixbuf after generating it with the thumbnail
system, so that we get all of the pixbuf options set correctly
* gnome-wp-item.h (GnomeWPItem): store the original image's width
and height in the item, so we can avoid reopening the original image
every time we generate the thumbnail, on systems where the thumbnail
doesn't contain the appropriate information
* gnome-wp-utils.c (gnome_wp_pixbuf_tile):
(gnome_wp_pixbuf_center): Add API to do the scaling inside these calls
Fixes #136691
2004-04-05 21:32:02 +00:00
|
|
|
pw = gdk_pixbuf_get_width (pixbuf);
|
|
|
|
ph = gdk_pixbuf_get_height (pixbuf);
|
|
|
|
|
|
|
|
if (item->width <= bw && item->height <= bh)
|
|
|
|
ratio = 1.0;
|
|
|
|
|
|
|
|
tw = item->width / ratio;
|
|
|
|
th = item->height / ratio;
|
2004-01-12 05:10:40 +00:00
|
|
|
|
Regenerate the thumbnail in the list when we change scaling type now
2004-04-05 Rodney Dawes <dobey@ximian.com>
* gnome-wp-capplet.c (gnome_wp_scale_type_changed): Regenerate the
thumbnail in the list when we change scaling type now
(wallpaper_properties_init): Add GtkFileFilter support (needs love)
TreeView is buggy, so we need to not set the vertical-separator
style property for it
* gnome-wp-item.c: Include <config.h> and <gnome.h> here
(collect_save_options): Add a function to set all of the pixbuf options
for the thumbnail pixbuf properly, so we can save them back out
(gnome_wp_item_get_thumbnail): Fix up the code to
generate the thumbnails for the list a bit, so that we have sexy
thumbnails that look exactly like how the image would, on-screen
Initialize all of the width/height variables to 0
Add a new pixbuf variable for loading the original image to get the
dimensions of it, so we can do thumbnailing more properly
Use a LIST_IMAGE_WIDTH define, for the width of the images in the list
Just return the bgpixbuf if we are creating the "No Wallpaper" thumb
Save the thumbnail back out with the dimensions for the original image
If our image is smaller than the list thumbnail, then just use 1.0 as
the ratio for scaling the image for tiling/etc...
Use the new API to do scaling inside the center/tile functions
Reload the thumbnail pixbuf after generating it with the thumbnail
system, so that we get all of the pixbuf options set correctly
* gnome-wp-item.h (GnomeWPItem): store the original image's width
and height in the item, so we can avoid reopening the original image
every time we generate the thumbnail, on systems where the thumbnail
doesn't contain the appropriate information
* gnome-wp-utils.c (gnome_wp_pixbuf_tile):
(gnome_wp_pixbuf_center): Add API to do the scaling inside these calls
Fixes #136691
2004-04-05 21:32:02 +00:00
|
|
|
if (!strcmp (item->options, "wallpaper")) {
|
|
|
|
scaled = gnome_wp_pixbuf_tile (pixbuf, bgpixbuf, tw, th);
|
2004-02-24 19:32:05 +00:00
|
|
|
} else if (!strcmp (item->options, "centered")) {
|
Regenerate the thumbnail in the list when we change scaling type now
2004-04-05 Rodney Dawes <dobey@ximian.com>
* gnome-wp-capplet.c (gnome_wp_scale_type_changed): Regenerate the
thumbnail in the list when we change scaling type now
(wallpaper_properties_init): Add GtkFileFilter support (needs love)
TreeView is buggy, so we need to not set the vertical-separator
style property for it
* gnome-wp-item.c: Include <config.h> and <gnome.h> here
(collect_save_options): Add a function to set all of the pixbuf options
for the thumbnail pixbuf properly, so we can save them back out
(gnome_wp_item_get_thumbnail): Fix up the code to
generate the thumbnails for the list a bit, so that we have sexy
thumbnails that look exactly like how the image would, on-screen
Initialize all of the width/height variables to 0
Add a new pixbuf variable for loading the original image to get the
dimensions of it, so we can do thumbnailing more properly
Use a LIST_IMAGE_WIDTH define, for the width of the images in the list
Just return the bgpixbuf if we are creating the "No Wallpaper" thumb
Save the thumbnail back out with the dimensions for the original image
If our image is smaller than the list thumbnail, then just use 1.0 as
the ratio for scaling the image for tiling/etc...
Use the new API to do scaling inside the center/tile functions
Reload the thumbnail pixbuf after generating it with the thumbnail
system, so that we get all of the pixbuf options set correctly
* gnome-wp-item.h (GnomeWPItem): store the original image's width
and height in the item, so we can avoid reopening the original image
every time we generate the thumbnail, on systems where the thumbnail
doesn't contain the appropriate information
* gnome-wp-utils.c (gnome_wp_pixbuf_tile):
(gnome_wp_pixbuf_center): Add API to do the scaling inside these calls
Fixes #136691
2004-04-05 21:32:02 +00:00
|
|
|
scaled = gnome_wp_pixbuf_center (pixbuf, bgpixbuf, tw, th);
|
|
|
|
} else if (!strcmp (item->options, "stretched")) {
|
|
|
|
scaled = gnome_wp_pixbuf_center (pixbuf, bgpixbuf, bw, bh);
|
|
|
|
} else if (!strcmp (item->options, "scaled")) {
|
|
|
|
if ((gdouble) ph * (gdouble) bw > (gdouble) pw * (gdouble) bh) {
|
|
|
|
tw = 0.5 + (gdouble) pw * (gdouble) bh / (gdouble) ph;
|
|
|
|
th = bh;
|
|
|
|
} else {
|
|
|
|
th = 0.5 + (gdouble) ph * (gdouble) bw / (gdouble) pw;
|
|
|
|
tw = bw;
|
|
|
|
}
|
|
|
|
scaled = gnome_wp_pixbuf_center (pixbuf, bgpixbuf, tw, th);
|
2004-02-24 19:32:05 +00:00
|
|
|
}
|
2004-01-12 05:10:40 +00:00
|
|
|
}
|
Regenerate the thumbnail in the list when we change scaling type now
2004-04-05 Rodney Dawes <dobey@ximian.com>
* gnome-wp-capplet.c (gnome_wp_scale_type_changed): Regenerate the
thumbnail in the list when we change scaling type now
(wallpaper_properties_init): Add GtkFileFilter support (needs love)
TreeView is buggy, so we need to not set the vertical-separator
style property for it
* gnome-wp-item.c: Include <config.h> and <gnome.h> here
(collect_save_options): Add a function to set all of the pixbuf options
for the thumbnail pixbuf properly, so we can save them back out
(gnome_wp_item_get_thumbnail): Fix up the code to
generate the thumbnails for the list a bit, so that we have sexy
thumbnails that look exactly like how the image would, on-screen
Initialize all of the width/height variables to 0
Add a new pixbuf variable for loading the original image to get the
dimensions of it, so we can do thumbnailing more properly
Use a LIST_IMAGE_WIDTH define, for the width of the images in the list
Just return the bgpixbuf if we are creating the "No Wallpaper" thumb
Save the thumbnail back out with the dimensions for the original image
If our image is smaller than the list thumbnail, then just use 1.0 as
the ratio for scaling the image for tiling/etc...
Use the new API to do scaling inside the center/tile functions
Reload the thumbnail pixbuf after generating it with the thumbnail
system, so that we get all of the pixbuf options set correctly
* gnome-wp-item.h (GnomeWPItem): store the original image's width
and height in the item, so we can avoid reopening the original image
every time we generate the thumbnail, on systems where the thumbnail
doesn't contain the appropriate information
* gnome-wp-utils.c (gnome_wp_pixbuf_tile):
(gnome_wp_pixbuf_center): Add API to do the scaling inside these calls
Fixes #136691
2004-04-05 21:32:02 +00:00
|
|
|
|
2004-01-12 05:10:40 +00:00
|
|
|
g_object_unref (pixbuf);
|
|
|
|
g_object_unref (bgpixbuf);
|
|
|
|
|
|
|
|
return scaled;
|
|
|
|
}
|
Switch the binary name to gnome-background-properties, Based on patch from
2004-02-01 Rodney Dawes <dobey@ximian.com>
* Makefile.am: Switch the binary name to gnome-background-properties,
Based on patch from Seth Nickell
* background.desktop.in: Use gnome-background-properties here also,
based on patch from Seth Nickell
* gnome-wp-capplet.c: Fix a bug where you can't re-add a wallpaper
after you remove it
Use the new gnome_wp_item_update_description () call
Use a GConfChangeSet to change the gconf keys, based on a patch
from Seth Nickell
Select the first item in the list ("No Wallpaper") when the wallpaper
is removed, based on a patch from Seth Nickell
Do the rc string parsing before creating the window, and change some
defaults so we can fix the spacing between widgets and the border
Fix spacing between widgets and window border
* gnome-wp-item.[ch]: Add update_description function to clean up
code, based on patch from Seth Nickell
Fix a crash when trying to thumbnail very wide images that are very
short, while trying to maintain aspect ratio
* gnome-wp-xml.c: Use backgrounds.xml instead of wp-list.xml, and
migrate the old wp-list.xml over if backgrounds.xml doesn't exist
yet, based on patch from Seth Nickell
2004-02-01 20:57:47 +00:00
|
|
|
|
|
|
|
void gnome_wp_item_update_description (GnomeWPItem * item) {
|
2004-08-15 19:07:34 +00:00
|
|
|
|
Switch the binary name to gnome-background-properties, Based on patch from
2004-02-01 Rodney Dawes <dobey@ximian.com>
* Makefile.am: Switch the binary name to gnome-background-properties,
Based on patch from Seth Nickell
* background.desktop.in: Use gnome-background-properties here also,
based on patch from Seth Nickell
* gnome-wp-capplet.c: Fix a bug where you can't re-add a wallpaper
after you remove it
Use the new gnome_wp_item_update_description () call
Use a GConfChangeSet to change the gconf keys, based on a patch
from Seth Nickell
Select the first item in the list ("No Wallpaper") when the wallpaper
is removed, based on a patch from Seth Nickell
Do the rc string parsing before creating the window, and change some
defaults so we can fix the spacing between widgets and the border
Fix spacing between widgets and window border
* gnome-wp-item.[ch]: Add update_description function to clean up
code, based on patch from Seth Nickell
Fix a crash when trying to thumbnail very wide images that are very
short, while trying to maintain aspect ratio
* gnome-wp-xml.c: Use backgrounds.xml instead of wp-list.xml, and
migrate the old wp-list.xml over if backgrounds.xml doesn't exist
yet, based on patch from Seth Nickell
2004-02-01 20:57:47 +00:00
|
|
|
if (!strcmp (item->filename, "(none)")) {
|
|
|
|
item->description = g_strdup_printf ("<b>%s</b>", item->name);
|
|
|
|
} else {
|
2004-08-15 19:07:34 +00:00
|
|
|
gchar * info;
|
|
|
|
|
2004-12-11 20:31:40 +00:00
|
|
|
info = g_strdup_printf ("%s, %d %s x %d %s",
|
2004-08-15 19:07:34 +00:00
|
|
|
gnome_vfs_mime_get_description (item->fileinfo->mime_type),
|
2004-12-11 20:31:40 +00:00
|
|
|
item->width,
|
|
|
|
ngettext ("pixel", "pixels", item->width),
|
|
|
|
item->height,
|
|
|
|
ngettext ("pixel", "pixels", item->height));
|
2004-08-15 19:07:34 +00:00
|
|
|
|
2004-10-14 14:55:24 +00:00
|
|
|
item->description = g_markup_printf_escaped ("<b>%s</b>\n"
|
|
|
|
"%s",
|
|
|
|
item->name,
|
|
|
|
info);
|
2004-08-15 19:07:34 +00:00
|
|
|
|
|
|
|
g_free (info);
|
Switch the binary name to gnome-background-properties, Based on patch from
2004-02-01 Rodney Dawes <dobey@ximian.com>
* Makefile.am: Switch the binary name to gnome-background-properties,
Based on patch from Seth Nickell
* background.desktop.in: Use gnome-background-properties here also,
based on patch from Seth Nickell
* gnome-wp-capplet.c: Fix a bug where you can't re-add a wallpaper
after you remove it
Use the new gnome_wp_item_update_description () call
Use a GConfChangeSet to change the gconf keys, based on a patch
from Seth Nickell
Select the first item in the list ("No Wallpaper") when the wallpaper
is removed, based on a patch from Seth Nickell
Do the rc string parsing before creating the window, and change some
defaults so we can fix the spacing between widgets and the border
Fix spacing between widgets and window border
* gnome-wp-item.[ch]: Add update_description function to clean up
code, based on patch from Seth Nickell
Fix a crash when trying to thumbnail very wide images that are very
short, while trying to maintain aspect ratio
* gnome-wp-xml.c: Use backgrounds.xml instead of wp-list.xml, and
migrate the old wp-list.xml over if backgrounds.xml doesn't exist
yet, based on patch from Seth Nickell
2004-02-01 20:57:47 +00:00
|
|
|
}
|
|
|
|
}
|