only declare variables at the beginning of a code block... ... and fix a
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 svn path=/trunk/; revision=8410
This commit is contained in:
parent
6e0ad68523
commit
2824523e94
4 changed files with 22 additions and 12 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
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
|
||||||
|
|
||||||
2008-01-14 Soren Sandmann <sandmann@redhat.com>
|
2008-01-14 Soren Sandmann <sandmann@redhat.com>
|
||||||
|
|
||||||
* appearance-desktop.c: Update list model when the background
|
* appearance-desktop.c: Update list model when the background
|
||||||
|
|
|
@ -136,9 +136,11 @@ static void on_item_changed (GnomeBG *bg, AppearanceData *data) {
|
||||||
path = gtk_tree_row_reference_get_path (item->rowref);
|
path = gtk_tree_row_reference_get_path (item->rowref);
|
||||||
|
|
||||||
if (gtk_tree_model_get_iter (model, &iter, path)) {
|
if (gtk_tree_model_get_iter (model, &iter, path)) {
|
||||||
|
GdkPixbuf *pixbuf;
|
||||||
|
|
||||||
g_signal_handlers_block_by_func (bg, G_CALLBACK (on_item_changed), data);
|
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) {
|
if (pixbuf) {
|
||||||
gtk_list_store_set (GTK_LIST_STORE (data->wp_model), &iter,
|
gtk_list_store_set (GTK_LIST_STORE (data->wp_model), &iter,
|
||||||
0, pixbuf,
|
0, pixbuf,
|
||||||
|
|
|
@ -243,13 +243,14 @@ void gnome_wp_item_update_description (GnomeWPItem * item) {
|
||||||
if (!strcmp (item->filename, "(none)")) {
|
if (!strcmp (item->filename, "(none)")) {
|
||||||
item->description = g_strdup (item->name);
|
item->description = g_strdup (item->name);
|
||||||
} else {
|
} else {
|
||||||
gchar *description;
|
const gchar *description;
|
||||||
|
gchar *dirname = g_path_get_dirname (item->filename);
|
||||||
|
|
||||||
if (strcmp (item->fileinfo->mime_type, "application/xml") == 0)
|
if (strcmp (item->fileinfo->mime_type, "application/xml") == 0)
|
||||||
description = _("Slide Show");
|
description = _("Slide Show");
|
||||||
else
|
else
|
||||||
description = gnome_vfs_mime_get_description (item->fileinfo->mime_type);
|
description = gnome_vfs_mime_get_description (item->fileinfo->mime_type);
|
||||||
gchar *dirname = g_path_get_dirname (item->filename);
|
|
||||||
/* translators: <b>wallpaper name</b>
|
/* translators: <b>wallpaper name</b>
|
||||||
* mime type, x pixel(s) by y pixel(s)
|
* mime type, x pixel(s) by y pixel(s)
|
||||||
* Folder: /path/to/file
|
* Folder: /path/to/file
|
||||||
|
|
|
@ -103,7 +103,6 @@ static void gnome_wp_xml_load_xml (AppearanceData *data,
|
||||||
xmlChar * nodelang;
|
xmlChar * nodelang;
|
||||||
const gchar * const * syslangs;
|
const gchar * const * syslangs;
|
||||||
GdkColor color1, color2;
|
GdkColor color1, color2;
|
||||||
GnomeWPItem * item;
|
|
||||||
gint i;
|
gint i;
|
||||||
|
|
||||||
wplist = xmlParseFile (filename);
|
wplist = xmlParseFile (filename);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue