gnome-control-center r8410 - trunk/capplets/appearance
- From: jensg svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-control-center r8410 - trunk/capplets/appearance
- Date: Thu, 24 Jan 2008 18:55:18 +0000 (GMT)
Author: jensg
Date: Thu Jan 24 18:55:18 2008
New Revision: 8410
URL: http://svn.gnome.org/viewvc/gnome-control-center?rev=8410&view=rev
Log:
2008-01-24 Jens Granseuer <jensgr gmx net>
* appearance-desktop.c: (on_item_changed): only declare variables at
the beginning of a code block...
* gnome-wp-item.c: (gnome_wp_item_update_description): ... and fix a
constness warning
* gnome-wp-xml.c: (gnome_wp_xml_load_xml): remove unused variable
Modified:
trunk/capplets/appearance/ChangeLog
trunk/capplets/appearance/appearance-desktop.c
trunk/capplets/appearance/gnome-wp-item.c
trunk/capplets/appearance/gnome-wp-xml.c
Modified: trunk/capplets/appearance/appearance-desktop.c
==============================================================================
--- trunk/capplets/appearance/appearance-desktop.c (original)
+++ trunk/capplets/appearance/appearance-desktop.c Thu Jan 24 18:55:18 2008
@@ -131,14 +131,16 @@
if (!item)
return;
-
+
model = gtk_tree_row_reference_get_model (item->rowref);
path = gtk_tree_row_reference_get_path (item->rowref);
if (gtk_tree_model_get_iter (model, &iter, path)) {
+ GdkPixbuf *pixbuf;
+
g_signal_handlers_block_by_func (bg, G_CALLBACK (on_item_changed), data);
-
- GdkPixbuf *pixbuf = gnome_wp_item_get_thumbnail (item, data->thumb_factory);
+
+ pixbuf = gnome_wp_item_get_thumbnail (item, data->thumb_factory);
if (pixbuf) {
gtk_list_store_set (GTK_LIST_STORE (data->wp_model), &iter,
0, pixbuf,
Modified: trunk/capplets/appearance/gnome-wp-item.c
==============================================================================
--- trunk/capplets/appearance/gnome-wp-item.c (original)
+++ trunk/capplets/appearance/gnome-wp-item.c Thu Jan 24 18:55:18 2008
@@ -36,7 +36,7 @@
GnomeBGPlacement placement;
color = GNOME_BG_COLOR_SOLID;
-
+
if (item->shade_type) {
if (!strcmp (item->shade_type, "horizontal-gradient")) {
color = GNOME_BG_COLOR_H_GRADIENT;
@@ -46,7 +46,7 @@
}
placement = GNOME_BG_PLACEMENT_TILED;
-
+
if (item->options) {
if (!strcmp (item->options, "centered")) {
placement = GNOME_BG_PLACEMENT_CENTERED;
@@ -138,7 +138,7 @@
if (item) {
gnome_wp_item_ensure_gnome_bg (item);
}
-
+
g_object_unref (client);
return item;
@@ -225,15 +225,15 @@
GnomeThumbnailFactory * thumbs) {
GdkPixbuf *pixbuf;
double aspect =
- (double)gdk_screen_get_height (gdk_screen_get_default()) /
+ (double)gdk_screen_get_height (gdk_screen_get_default()) /
gdk_screen_get_width (gdk_screen_get_default());
set_bg_properties (item);
-
+
pixbuf = gnome_bg_create_thumbnail (item->bg, thumbs, gdk_screen_get_default(), LIST_IMAGE_WIDTH, LIST_IMAGE_WIDTH * aspect);
gnome_bg_get_image_size (item->bg, thumbs, &item->width, &item->height);
-
+
return pixbuf;
}
@@ -243,13 +243,14 @@
if (!strcmp (item->filename, "(none)")) {
item->description = g_strdup (item->name);
} else {
- gchar *description;
+ const gchar *description;
+ gchar *dirname = g_path_get_dirname (item->filename);
if (strcmp (item->fileinfo->mime_type, "application/xml") == 0)
description = _("Slide Show");
else
description = gnome_vfs_mime_get_description (item->fileinfo->mime_type);
- gchar *dirname = g_path_get_dirname (item->filename);
+
/* translators: <b>wallpaper name</b>
* mime type, x pixel(s) by y pixel(s)
* Folder: /path/to/file
Modified: trunk/capplets/appearance/gnome-wp-xml.c
==============================================================================
--- trunk/capplets/appearance/gnome-wp-xml.c (original)
+++ trunk/capplets/appearance/gnome-wp-xml.c Thu Jan 24 18:55:18 2008
@@ -103,7 +103,6 @@
xmlChar * nodelang;
const gchar * const * syslangs;
GdkColor color1, color2;
- GnomeWPItem * item;
gint i;
wplist = xmlParseFile (filename);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]