GtkWidget *btn_use;
GtkWidget *btn_remove;
- GdkPixmap *pixmaps[PREVIEW_ICONS];
- GdkBitmap *masks[PREVIEW_ICONS];
+ GdkPixbuf *pixbufs[PREVIEW_ICONS];
/* gchar *theme_path; */
} ThemesPage;
g_return_if_fail(func != NULL);
if ((dp = opendir(dirname)) == NULL) {
- debug_print("directory %s not found", dirname);
+ debug_print("directory %s not found\n", dirname);
return;
}
static gboolean prefs_themes_is_system_theme(const gchar *dirname)
{
gint len;
-
+ gchar *system_theme_dir;
+ gboolean is_sys = FALSE;
+
g_return_val_if_fail(dirname != NULL, FALSE);
- len = strlen(PACKAGE_DATA_DIR);
- if (strlen(dirname) > len && 0 == strncmp(dirname, PACKAGE_DATA_DIR, len))
- return TRUE;
+ system_theme_dir = stock_pixmap_get_system_theme_dir_for_theme(NULL);
+ len = strlen(system_theme_dir);
+ if (strlen(dirname) > len && 0 == strncmp(dirname, system_theme_dir, len))
+ is_sys = TRUE;
- return FALSE;
+ g_free(system_theme_dir);
+
+ return is_sys;
}
static void prefs_themes_set_themes_menu(GtkComboBox *combo, const ThemesData *tdata)
GTK_STOCK_NO, GTK_STOCK_YES, NULL);
switch (val) {
case G_ALERTALTERNATE:
- cinfo->dest = g_strconcat(PACKAGE_DATA_DIR, G_DIR_SEPARATOR_S,
- PIXMAP_THEME_DIR, G_DIR_SEPARATOR_S,
- themename, NULL);
+ cinfo->dest = stock_pixmap_get_system_theme_dir_for_theme(
+ themename);
break;
case G_ALERTDEFAULT:
break;
save_prefs_path = prefs_common.pixmap_theme_path;
prefs_common.pixmap_theme_path = tdata->displayed;
for (i = 0; i < PREVIEW_ICONS; ++i) {
- stock_pixmap_gdk(theme->window, prefs_themes_icons[i],
- &(theme->pixmaps[i]), &(theme->masks[i]));
- gtk_image_set_from_pixmap(GTK_IMAGE(theme->icons[i]),
- theme->pixmaps[i], theme->masks[i]);
+ stock_pixbuf_gdk(theme->window, prefs_themes_icons[i],
+ &(theme->pixbufs[i]));
+ gtk_image_set_from_pixbuf(GTK_IMAGE(theme->icons[i]),
+ theme->pixbufs[i]);
}
prefs_common.pixmap_theme_path = save_prefs_path;