Placeholder thumbnails for gtk+, metacity and icon themes.
2007-06-26 Denis Washington <denisw@svn.gnome.org> * gtk-theme-thumbnailing.png: * icon-theme-thumbnailing.png: * window-theme-thumbnailing.png: Placeholder thumbnails for gtk+, metacity and icon themes. * Makefile.am: Add new files. * appearance.h: * appearance-style.h: * appearance-style.c: (style_init), (style_shutdown), (prepare_list): Use the new placeholder thumbnails for the details window's theme lists. * appearance-main.c: Call new style_shutdown (). svn path=/trunk/; revision=7781
This commit is contained in:
parent
f1bb7e5e6c
commit
11756d2e52
9 changed files with 49 additions and 2 deletions
|
@ -1,3 +1,19 @@
|
||||||
|
2007-06-26 Denis Washington <denisw@svn.gnome.org>
|
||||||
|
|
||||||
|
* gtk-theme-thumbnailing.png:
|
||||||
|
* icon-theme-thumbnailing.png:
|
||||||
|
* window-theme-thumbnailing.png:
|
||||||
|
Placeholder thumbnails for gtk+, metacity and icon themes.
|
||||||
|
|
||||||
|
* Makefile.am: Add new files.
|
||||||
|
|
||||||
|
* appearance.h:
|
||||||
|
* appearance-style.h:
|
||||||
|
* appearance-style.c: (style_init), (style_shutdown), (prepare_list):
|
||||||
|
Use the new placeholder thumbnails for the details window's theme lists.
|
||||||
|
|
||||||
|
* appearance-main.c: Call new style_shutdown ().
|
||||||
|
|
||||||
2007-06-25 Denis Washington <denisw@svn.gnome.org>
|
2007-06-25 Denis Washington <denisw@svn.gnome.org>
|
||||||
|
|
||||||
* appearance.glade: Fixed resize problems.
|
* appearance.glade: Fixed resize problems.
|
||||||
|
|
|
@ -50,7 +50,10 @@ dist_pixmap_DATA = \
|
||||||
subpixel-rgb.png \
|
subpixel-rgb.png \
|
||||||
subpixel-vbgr.png \
|
subpixel-vbgr.png \
|
||||||
subpixel-vrgb.png \
|
subpixel-vrgb.png \
|
||||||
theme-thumbnailing.png
|
theme-thumbnailing.png \
|
||||||
|
gtk-theme-thumbnailing.png \
|
||||||
|
window-theme-thumbnailing.png \
|
||||||
|
icon-theme-thumbnailing.png
|
||||||
|
|
||||||
wallpaperdir = $(datadir)/gnome-background-properties
|
wallpaperdir = $(datadir)/gnome-background-properties
|
||||||
|
|
||||||
|
|
|
@ -76,6 +76,7 @@ main_window_response (GtkWidget *widget,
|
||||||
gtk_main_quit ();
|
gtk_main_quit ();
|
||||||
|
|
||||||
themes_shutdown (data);
|
themes_shutdown (data);
|
||||||
|
style_shutdown (data);
|
||||||
desktop_shutdown (data);
|
desktop_shutdown (data);
|
||||||
font_shutdown (data);
|
font_shutdown (data);
|
||||||
|
|
||||||
|
|
|
@ -647,6 +647,7 @@ prepare_list (AppearanceData *data, GtkWidget *list, ThemeType type, GCallback c
|
||||||
{
|
{
|
||||||
const gchar *name = NULL;
|
const gchar *name = NULL;
|
||||||
const gchar *label = NULL;
|
const gchar *label = NULL;
|
||||||
|
GdkPixbuf *thumbnail = NULL;
|
||||||
GtkTreeIter i;
|
GtkTreeIter i;
|
||||||
|
|
||||||
if (type == THEME_TYPE_GTK || type == THEME_TYPE_WINDOW) {
|
if (type == THEME_TYPE_GTK || type == THEME_TYPE_WINDOW) {
|
||||||
|
@ -662,6 +663,7 @@ prepare_list (AppearanceData *data, GtkWidget *list, ThemeType type, GCallback c
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case THEME_TYPE_GTK:
|
case THEME_TYPE_GTK:
|
||||||
|
thumbnail = data->gtk_theme_icon;
|
||||||
generate_gtk_theme_thumbnail_async ((GnomeThemeInfo *) l->data,
|
generate_gtk_theme_thumbnail_async ((GnomeThemeInfo *) l->data,
|
||||||
(ThemeThumbnailFunc) gtk_theme_thumbnail_cb,
|
(ThemeThumbnailFunc) gtk_theme_thumbnail_cb,
|
||||||
data,
|
data,
|
||||||
|
@ -669,6 +671,7 @@ prepare_list (AppearanceData *data, GtkWidget *list, ThemeType type, GCallback c
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case THEME_TYPE_ICON:
|
case THEME_TYPE_ICON:
|
||||||
|
thumbnail = data->icon_theme_icon;
|
||||||
generate_icon_theme_thumbnail_async ((GnomeThemeIconInfo *) l->data,
|
generate_icon_theme_thumbnail_async ((GnomeThemeIconInfo *) l->data,
|
||||||
(ThemeThumbnailFunc) icon_theme_thumbnail_cb,
|
(ThemeThumbnailFunc) icon_theme_thumbnail_cb,
|
||||||
data,
|
data,
|
||||||
|
@ -676,6 +679,7 @@ prepare_list (AppearanceData *data, GtkWidget *list, ThemeType type, GCallback c
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case THEME_TYPE_WINDOW:
|
case THEME_TYPE_WINDOW:
|
||||||
|
thumbnail = data->window_theme_icon;
|
||||||
generate_metacity_theme_thumbnail_async ((GnomeThemeInfo *) l->data,
|
generate_metacity_theme_thumbnail_async ((GnomeThemeInfo *) l->data,
|
||||||
(ThemeThumbnailFunc) metacity_theme_thumbnail_cb,
|
(ThemeThumbnailFunc) metacity_theme_thumbnail_cb,
|
||||||
data,
|
data,
|
||||||
|
@ -687,7 +691,9 @@ prepare_list (AppearanceData *data, GtkWidget *list, ThemeType type, GCallback c
|
||||||
|
|
||||||
gtk_list_store_insert_with_values (store, &i, 0,
|
gtk_list_store_insert_with_values (store, &i, 0,
|
||||||
COL_LABEL, label ? label : name,
|
COL_LABEL, label ? label : name,
|
||||||
COL_NAME, name, -1);
|
COL_NAME, name,
|
||||||
|
COL_THUMBNAIL, thumbnail,
|
||||||
|
-1);
|
||||||
}
|
}
|
||||||
g_list_free (themes);
|
g_list_free (themes);
|
||||||
|
|
||||||
|
@ -732,6 +738,10 @@ style_init (AppearanceData *data)
|
||||||
GtkSettings *settings;
|
GtkSettings *settings;
|
||||||
GtkWidget *w;
|
GtkWidget *w;
|
||||||
|
|
||||||
|
data->gtk_theme_icon = gdk_pixbuf_new_from_file (GNOMECC_PIXMAP_DIR "/gtk-theme-thumbnailing.png", NULL);
|
||||||
|
data->window_theme_icon = gdk_pixbuf_new_from_file (GNOMECC_PIXMAP_DIR "/window-theme-thumbnailing.png", NULL);
|
||||||
|
data->icon_theme_icon = gdk_pixbuf_new_from_file (GNOMECC_PIXMAP_DIR "/icon-theme-thumbnailing.png", NULL);
|
||||||
|
|
||||||
w = glade_xml_get_widget (data->xml, "theme_details");
|
w = glade_xml_get_widget (data->xml, "theme_details");
|
||||||
g_signal_connect (w, "response", (GCallback) style_response_cb, NULL);
|
g_signal_connect (w, "response", (GCallback) style_response_cb, NULL);
|
||||||
g_signal_connect (w, "delete_event", (GCallback) gtk_true, NULL);
|
g_signal_connect (w, "delete_event", (GCallback) gtk_true, NULL);
|
||||||
|
@ -770,3 +780,14 @@ style_init (AppearanceData *data)
|
||||||
|
|
||||||
gnome_theme_info_register_theme_change ((ThemeChangedCallback) changed_on_disk_cb, data);
|
gnome_theme_info_register_theme_change ((ThemeChangedCallback) changed_on_disk_cb, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
style_shutdown (AppearanceData *data)
|
||||||
|
{
|
||||||
|
if (data->gtk_theme_icon)
|
||||||
|
g_object_unref (data->gtk_theme_icon);
|
||||||
|
if (data->window_theme_icon)
|
||||||
|
g_object_unref (data->window_theme_icon);
|
||||||
|
if (data->icon_theme_icon)
|
||||||
|
g_object_unref (data->icon_theme_icon);
|
||||||
|
}
|
||||||
|
|
|
@ -19,3 +19,4 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void style_init (AppearanceData *data);
|
void style_init (AppearanceData *data);
|
||||||
|
void style_shutdown (AppearanceData *data);
|
||||||
|
|
|
@ -56,4 +56,9 @@ typedef struct {
|
||||||
GnomeThemeMetaInfo *theme_custom;
|
GnomeThemeMetaInfo *theme_custom;
|
||||||
GdkPixbuf *theme_icon;
|
GdkPixbuf *theme_icon;
|
||||||
GtkWidget *theme_save_dialog;
|
GtkWidget *theme_save_dialog;
|
||||||
|
|
||||||
|
/* style */
|
||||||
|
GdkPixbuf *gtk_theme_icon;
|
||||||
|
GdkPixbuf *window_theme_icon;
|
||||||
|
GdkPixbuf *icon_theme_icon;
|
||||||
} AppearanceData;
|
} AppearanceData;
|
||||||
|
|
BIN
capplets/appearance/gtk-theme-thumbnailing.png
Normal file
BIN
capplets/appearance/gtk-theme-thumbnailing.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.7 KiB |
BIN
capplets/appearance/icon-theme-thumbnailing.png
Normal file
BIN
capplets/appearance/icon-theme-thumbnailing.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
BIN
capplets/appearance/window-theme-thumbnailing.png
Normal file
BIN
capplets/appearance/window-theme-thumbnailing.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.1 KiB |
Loading…
Add table
Add a link
Reference in a new issue