2007-05-02 14:04:53 +00:00
|
|
|
/*
|
|
|
|
* Authors: Rodney Dawes <dobey@ximian.com>
|
|
|
|
*
|
|
|
|
* Copyright 2003-2006 Novell, Inc. (www.novell.com)
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <glib.h>
|
2008-05-04 13:39:46 +00:00
|
|
|
#include <gio/gio.h>
|
2007-05-02 14:04:53 +00:00
|
|
|
#include <gdk-pixbuf/gdk-pixbuf.h>
|
2008-11-20 18:43:38 +00:00
|
|
|
#include <gtk/gtk.h>
|
2008-10-24 21:19:15 +00:00
|
|
|
#include <libgnomeui/gnome-desktop-thumbnail.h>
|
2008-01-15 01:47:41 +00:00
|
|
|
#include <libgnomeui/gnome-bg.h>
|
2007-05-02 14:04:53 +00:00
|
|
|
|
2008-05-04 13:39:46 +00:00
|
|
|
#include "gnome-wp-info.h"
|
|
|
|
|
2007-05-02 14:04:53 +00:00
|
|
|
#ifndef _GNOME_WP_ITEM_H_
|
|
|
|
#define _GNOME_WP_ITEM_H_
|
|
|
|
|
2008-01-25 20:11:22 +00:00
|
|
|
#define WP_PATH_KEY "/desktop/gnome/background"
|
|
|
|
#define WP_FILE_KEY WP_PATH_KEY "/picture_filename"
|
|
|
|
#define WP_OPTIONS_KEY WP_PATH_KEY "/picture_options"
|
|
|
|
#define WP_SHADING_KEY WP_PATH_KEY "/color_shading_type"
|
|
|
|
#define WP_PCOLOR_KEY WP_PATH_KEY "/primary_color"
|
|
|
|
#define WP_SCOLOR_KEY WP_PATH_KEY "/secondary_color"
|
|
|
|
|
2007-05-02 14:04:53 +00:00
|
|
|
typedef struct _GnomeWPItem GnomeWPItem;
|
|
|
|
|
|
|
|
struct _GnomeWPItem {
|
2008-01-15 01:47:41 +00:00
|
|
|
GnomeBG *bg;
|
2008-02-16 00:03:24 +00:00
|
|
|
|
2007-05-02 14:04:53 +00:00
|
|
|
gchar * name;
|
|
|
|
gchar * filename;
|
|
|
|
gchar * description;
|
use the GnomeBG enum types instead of strings to handle options internally
2008-04-13 Jens Granseuer <jensgr@gmx.net>
* appearance-desktop.c: (wp_option_menu_set),
(wp_scale_type_changed), (wp_shade_type_changed),
(wp_options_changed), (wp_shading_changed), (wp_props_wp_set),
(wp_load_stuffs):
* data/appearance.glade:
* gnome-wp-item.c: (wp_item_option_to_string),
(wp_item_shading_to_string), (wp_item_string_to_option),
(wp_item_string_to_shading), (set_bg_properties),
(gnome_wp_item_update), (gnome_wp_item_free):
* gnome-wp-item.h:
* gnome-wp-xml.c: (gnome_wp_xml_load_xml),
(gnome_wp_xml_save_list): use the GnomeBG enum types instead of
strings to handle options internally and only convert when needed
svn path=/trunk/; revision=8647
2008-04-13 14:19:45 +00:00
|
|
|
GnomeBGPlacement options;
|
|
|
|
GnomeBGColorType shade_type;
|
2007-05-02 14:04:53 +00:00
|
|
|
|
|
|
|
/* Where the Item is in the List */
|
|
|
|
GtkTreeRowReference * rowref;
|
|
|
|
|
|
|
|
/* Real colors */
|
|
|
|
GdkColor * pcolor;
|
|
|
|
GdkColor * scolor;
|
|
|
|
|
|
|
|
GnomeWPInfo * fileinfo;
|
|
|
|
|
|
|
|
/* Did the user remove us? */
|
|
|
|
gboolean deleted;
|
|
|
|
|
|
|
|
/* Width and Height of the original image */
|
|
|
|
gint width;
|
|
|
|
gint height;
|
|
|
|
};
|
|
|
|
|
use the GnomeBG enum types instead of strings to handle options internally
2008-04-13 Jens Granseuer <jensgr@gmx.net>
* appearance-desktop.c: (wp_option_menu_set),
(wp_scale_type_changed), (wp_shade_type_changed),
(wp_options_changed), (wp_shading_changed), (wp_props_wp_set),
(wp_load_stuffs):
* data/appearance.glade:
* gnome-wp-item.c: (wp_item_option_to_string),
(wp_item_shading_to_string), (wp_item_string_to_option),
(wp_item_string_to_shading), (set_bg_properties),
(gnome_wp_item_update), (gnome_wp_item_free):
* gnome-wp-item.h:
* gnome-wp-xml.c: (gnome_wp_xml_load_xml),
(gnome_wp_xml_save_list): use the GnomeBG enum types instead of
strings to handle options internally and only convert when needed
svn path=/trunk/; revision=8647
2008-04-13 14:19:45 +00:00
|
|
|
GnomeWPItem * gnome_wp_item_new (const gchar *filename,
|
|
|
|
GHashTable *wallpapers,
|
2008-10-24 18:44:52 +00:00
|
|
|
GnomeDesktopThumbnailFactory *thumbnails);
|
use the GnomeBG enum types instead of strings to handle options internally
2008-04-13 Jens Granseuer <jensgr@gmx.net>
* appearance-desktop.c: (wp_option_menu_set),
(wp_scale_type_changed), (wp_shade_type_changed),
(wp_options_changed), (wp_shading_changed), (wp_props_wp_set),
(wp_load_stuffs):
* data/appearance.glade:
* gnome-wp-item.c: (wp_item_option_to_string),
(wp_item_shading_to_string), (wp_item_string_to_option),
(wp_item_string_to_shading), (set_bg_properties),
(gnome_wp_item_update), (gnome_wp_item_free):
* gnome-wp-item.h:
* gnome-wp-xml.c: (gnome_wp_xml_load_xml),
(gnome_wp_xml_save_list): use the GnomeBG enum types instead of
strings to handle options internally and only convert when needed
svn path=/trunk/; revision=8647
2008-04-13 14:19:45 +00:00
|
|
|
|
|
|
|
void gnome_wp_item_free (GnomeWPItem *item);
|
|
|
|
GdkPixbuf * gnome_wp_item_get_thumbnail (GnomeWPItem *item,
|
2008-10-24 18:44:52 +00:00
|
|
|
GnomeDesktopThumbnailFactory *thumbs);
|
use the GnomeBG enum types instead of strings to handle options internally
2008-04-13 Jens Granseuer <jensgr@gmx.net>
* appearance-desktop.c: (wp_option_menu_set),
(wp_scale_type_changed), (wp_shade_type_changed),
(wp_options_changed), (wp_shading_changed), (wp_props_wp_set),
(wp_load_stuffs):
* data/appearance.glade:
* gnome-wp-item.c: (wp_item_option_to_string),
(wp_item_shading_to_string), (wp_item_string_to_option),
(wp_item_string_to_shading), (set_bg_properties),
(gnome_wp_item_update), (gnome_wp_item_free):
* gnome-wp-item.h:
* gnome-wp-xml.c: (gnome_wp_xml_load_xml),
(gnome_wp_xml_save_list): use the GnomeBG enum types instead of
strings to handle options internally and only convert when needed
svn path=/trunk/; revision=8647
2008-04-13 14:19:45 +00:00
|
|
|
void gnome_wp_item_update (GnomeWPItem *item);
|
|
|
|
void gnome_wp_item_update_description (GnomeWPItem *item);
|
2008-01-15 01:47:41 +00:00
|
|
|
void gnome_wp_item_ensure_gnome_bg (GnomeWPItem *item);
|
2007-05-02 14:04:53 +00:00
|
|
|
|
use the GnomeBG enum types instead of strings to handle options internally
2008-04-13 Jens Granseuer <jensgr@gmx.net>
* appearance-desktop.c: (wp_option_menu_set),
(wp_scale_type_changed), (wp_shade_type_changed),
(wp_options_changed), (wp_shading_changed), (wp_props_wp_set),
(wp_load_stuffs):
* data/appearance.glade:
* gnome-wp-item.c: (wp_item_option_to_string),
(wp_item_shading_to_string), (wp_item_string_to_option),
(wp_item_string_to_shading), (set_bg_properties),
(gnome_wp_item_update), (gnome_wp_item_free):
* gnome-wp-item.h:
* gnome-wp-xml.c: (gnome_wp_xml_load_xml),
(gnome_wp_xml_save_list): use the GnomeBG enum types instead of
strings to handle options internally and only convert when needed
svn path=/trunk/; revision=8647
2008-04-13 14:19:45 +00:00
|
|
|
const gchar *wp_item_option_to_string (GnomeBGPlacement type);
|
|
|
|
const gchar *wp_item_shading_to_string (GnomeBGColorType type);
|
|
|
|
GnomeBGPlacement wp_item_string_to_option (const gchar *option);
|
|
|
|
GnomeBGColorType wp_item_string_to_shading (const gchar *shade_type);
|
2007-05-02 14:04:53 +00:00
|
|
|
|
use the GnomeBG enum types instead of strings to handle options internally
2008-04-13 Jens Granseuer <jensgr@gmx.net>
* appearance-desktop.c: (wp_option_menu_set),
(wp_scale_type_changed), (wp_shade_type_changed),
(wp_options_changed), (wp_shading_changed), (wp_props_wp_set),
(wp_load_stuffs):
* data/appearance.glade:
* gnome-wp-item.c: (wp_item_option_to_string),
(wp_item_shading_to_string), (wp_item_string_to_option),
(wp_item_string_to_shading), (set_bg_properties),
(gnome_wp_item_update), (gnome_wp_item_free):
* gnome-wp-item.h:
* gnome-wp-xml.c: (gnome_wp_xml_load_xml),
(gnome_wp_xml_save_list): use the GnomeBG enum types instead of
strings to handle options internally and only convert when needed
svn path=/trunk/; revision=8647
2008-04-13 14:19:45 +00:00
|
|
|
#endif
|