add capplets/appearance/gnome-theme-package.xml to generated files
2007-06-05 Jens Granseuer <jensgr@gmx.net> * configure.in: add capplets/appearance/gnome-theme-package.xml to generated files * capplets/appearance/Makefile.am: * capplets/appearance/gnome-theme-package.xml.in: move theme package mime type over from the theme-manager (closes bug #444336) svn path=/trunk/; revision=7693
This commit is contained in:
parent
9fac3c0c5a
commit
f5fe47e66e
6 changed files with 95 additions and 29 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2007-06-05 Jens Granseuer <jensgr@gmx.net>
|
||||||
|
|
||||||
|
* configure.in: add capplets/appearance/gnome-theme-package.xml
|
||||||
|
to generated files
|
||||||
|
|
||||||
2007-06-05 Ross Burton <ross@openedhand.com>
|
2007-06-05 Ross Burton <ross@openedhand.com>
|
||||||
|
|
||||||
* configure.in:
|
* configure.in:
|
||||||
|
|
|
@ -1,3 +1,9 @@
|
||||||
|
2007-06-05 Jens Granseuer <jensgr@gmx.net>
|
||||||
|
|
||||||
|
* Makefile.am:
|
||||||
|
* gnome-theme-package.xml.in: move theme package mime type over
|
||||||
|
from the theme-manager (closes bug #444336)
|
||||||
|
|
||||||
2007-06-04 Jens Granseuer <jensgr@gmx.net>
|
2007-06-04 Jens Granseuer <jensgr@gmx.net>
|
||||||
|
|
||||||
* appearance-desktop.c: (desktop_init), (desktop_shutdown):
|
* appearance-desktop.c: (desktop_init), (desktop_shutdown):
|
||||||
|
|
|
@ -35,13 +35,11 @@ gnome_appearance_properties_LDADD = \
|
||||||
$(top_builddir)/capplets/common/libcommon.la
|
$(top_builddir)/capplets/common/libcommon.la
|
||||||
gnome_appearance_properties_LDFLAGS = -export-dynamic
|
gnome_appearance_properties_LDFLAGS = -export-dynamic
|
||||||
|
|
||||||
@INTLTOOL_DESKTOP_RULE@
|
|
||||||
|
|
||||||
gladedir = $(pkgdatadir)/glade
|
gladedir = $(pkgdatadir)/glade
|
||||||
glade_DATA = appearance.glade
|
dist_glade_DATA = appearance.glade
|
||||||
|
|
||||||
pixmapdir = $(pkgdatadir)/pixmaps
|
pixmapdir = $(pkgdatadir)/pixmaps
|
||||||
pixmap_DATA = \
|
dist_pixmap_DATA = \
|
||||||
theme-thumbnailing.png \
|
theme-thumbnailing.png \
|
||||||
subpixel-bgr.png \
|
subpixel-bgr.png \
|
||||||
subpixel-rgb.png \
|
subpixel-rgb.png \
|
||||||
|
@ -50,10 +48,19 @@ pixmap_DATA = \
|
||||||
|
|
||||||
wallpaperdir = $(datadir)/gnome-background-properties
|
wallpaperdir = $(datadir)/gnome-background-properties
|
||||||
|
|
||||||
|
@INTLTOOL_DESKTOP_RULE@
|
||||||
|
|
||||||
desktopdir = $(datadir)/applications
|
desktopdir = $(datadir)/applications
|
||||||
desktop_in_files = gnome-appearance-properties.desktop.in
|
desktop_in_files = gnome-appearance-properties.desktop.in
|
||||||
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
|
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
|
||||||
|
|
||||||
|
@INTLTOOL_XML_RULE@
|
||||||
|
|
||||||
|
xml_in_files = gnome-theme-package.xml.in
|
||||||
|
|
||||||
|
mimedir = $(datadir)/mime/packages
|
||||||
|
mime_DATA = $(xml_in_files:.xml.in=.xml)
|
||||||
|
|
||||||
INCLUDES = \
|
INCLUDES = \
|
||||||
$(METACITY_CFLAGS) \
|
$(METACITY_CFLAGS) \
|
||||||
$(GNOMECC_CAPPLETS_CFLAGS) \
|
$(GNOMECC_CAPPLETS_CFLAGS) \
|
||||||
|
@ -64,5 +71,15 @@ INCLUDES = \
|
||||||
-DGNOMECC_PIXMAP_DIR="\"$(pixmapdir)\"" \
|
-DGNOMECC_PIXMAP_DIR="\"$(pixmapdir)\"" \
|
||||||
-DWALLPAPER_DATADIR="\"$(wallpaperdir)\""
|
-DWALLPAPER_DATADIR="\"$(wallpaperdir)\""
|
||||||
|
|
||||||
CLEANFILES = $(GNOMECC_CAPPLETS_CLEANFILES) $(desktop_in_files) $(desktop_DATA)
|
CLEANFILES = $(GNOMECC_CAPPLETS_CLEANFILES) $(desktop_in_files) $(desktop_DATA) $(mime_DATA)
|
||||||
EXTRA_DIST = $(glade_DATA) $(pixmap_DATA)
|
EXTRA_DIST = $(xml_in_files)
|
||||||
|
|
||||||
|
install-data-hook:
|
||||||
|
if ENABLE_UPDATE_MIMEDB
|
||||||
|
$(UPDATE_MIME_DATABASE) "$(DESTDIR)$(datadir)/mime"
|
||||||
|
endif
|
||||||
|
|
||||||
|
uninstall-hook:
|
||||||
|
if ENABLE_UPDATE_MIMEDB
|
||||||
|
$(UPDATE_MIME_DATABASE) "$(DESTDIR)$(datadir)/mime"
|
||||||
|
endif
|
||||||
|
|
|
@ -78,6 +78,7 @@ find_in_model (GtkTreeModel *model, const gchar *value, gint column, GtkTreeIter
|
||||||
g_free (test);
|
g_free (test);
|
||||||
|
|
||||||
if (!cmp) {
|
if (!cmp) {
|
||||||
|
if (hit)
|
||||||
*hit = iter;
|
*hit = iter;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -152,9 +153,13 @@ theme_selection_changed_cb (GtkWidget *icon_view, AppearanceData *data)
|
||||||
static void
|
static void
|
||||||
theme_custom_cb (GtkWidget *button, AppearanceData *data)
|
theme_custom_cb (GtkWidget *button, AppearanceData *data)
|
||||||
{
|
{
|
||||||
GtkWidget *w, *parent;
|
GtkWidget *w, *parent, *icon_view;
|
||||||
w = glade_xml_get_widget (data->xml, "theme_details");
|
w = glade_xml_get_widget (data->xml, "theme_details");
|
||||||
parent = glade_xml_get_widget (data->xml, "appearance_window");
|
parent = glade_xml_get_widget (data->xml, "appearance_window");
|
||||||
|
icon_view = glade_xml_get_widget (data->xml, "themes_list");
|
||||||
|
|
||||||
|
/* select the "custom" metatheme */
|
||||||
|
theme_set_custom_from_selected (icon_view, data);
|
||||||
|
|
||||||
gtk_window_set_transient_for (GTK_WINDOW (w), GTK_WINDOW (parent));
|
gtk_window_set_transient_for (GTK_WINDOW (w), GTK_WINDOW (parent));
|
||||||
gtk_widget_show_all (w);
|
gtk_widget_show_all (w);
|
||||||
|
@ -203,13 +208,33 @@ theme_queue_for_thumbnail (GnomeThemeMetaInfo *theme, AppearanceData *data)
|
||||||
data->theme_queue = g_slist_append (data->theme_queue, theme);
|
data->theme_queue = g_slist_append (data->theme_queue, theme);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static GnomeThemeMetaInfo *
|
||||||
|
theme_get_selected (GtkIconView *icon_view)
|
||||||
|
{
|
||||||
|
GnomeThemeMetaInfo *theme = NULL;
|
||||||
|
GList *selected = gtk_icon_view_get_selected_items (icon_view);
|
||||||
|
|
||||||
|
if (selected) {
|
||||||
|
theme = selected->data;
|
||||||
|
|
||||||
|
g_list_foreach (selected, gtk_tree_path_free, NULL);
|
||||||
|
g_list_free (selected);
|
||||||
|
}
|
||||||
|
|
||||||
|
return theme;
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
theme_add_custom (GtkIconView *icon_view, GnomeThemeMetaInfo *info, AppearanceData *data)
|
theme_set_custom_from_selected (GtkIconView *icon_view, AppearanceData *data)
|
||||||
{
|
{
|
||||||
GnomeThemeMetaInfo *custom = data->theme_custom;
|
GnomeThemeMetaInfo *custom = data->theme_custom;
|
||||||
|
GnomeThemeMetaInfo *theme = theme_get_selected (icon_view);
|
||||||
|
|
||||||
|
if (theme == custom)
|
||||||
|
return;
|
||||||
|
|
||||||
/* if info is not NULL, we'll copy those theme settings over */
|
/* if info is not NULL, we'll copy those theme settings over */
|
||||||
if (info != NULL) {
|
if (theme != NULL) {
|
||||||
g_free (custom->gtk_theme_name);
|
g_free (custom->gtk_theme_name);
|
||||||
g_free (custom->icon_theme_name);
|
g_free (custom->icon_theme_name);
|
||||||
g_free (custom->metacity_theme_name);
|
g_free (custom->metacity_theme_name);
|
||||||
|
@ -240,11 +265,14 @@ theme_add_custom (GtkIconView *icon_view, GnomeThemeMetaInfo *info, AppearanceDa
|
||||||
custom->gtk_color_scheme = get_default_string_from_key (data->client, COLOR_SCHEME_KEY);
|
custom->gtk_color_scheme = get_default_string_from_key (data->client, COLOR_SCHEME_KEY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!find_in_model (data->theme_store, custom->name, COL_NAME, NULL)) {
|
||||||
gtk_list_store_insert_with_values (data->theme_store, NULL, 0,
|
gtk_list_store_insert_with_values (data->theme_store, NULL, 0,
|
||||||
COL_LABEL, custom->readable_name,
|
COL_LABEL, custom->readable_name,
|
||||||
COL_NAME, custom->name,
|
COL_NAME, custom->name,
|
||||||
-1);
|
-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* update the theme thumbnail */
|
||||||
theme_queue_for_thumbnail (custom, data);
|
theme_queue_for_thumbnail (custom, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
9
capplets/appearance/gnome-theme-package.xml.in
Normal file
9
capplets/appearance/gnome-theme-package.xml.in
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
|
||||||
|
<mime-type type="application/x-gnome-theme-package">
|
||||||
|
<sub-class-of type="application/x-compressed-tar"/>
|
||||||
|
<_comment>Gnome Theme Package</_comment>
|
||||||
|
<glob pattern="*.gtp"/>
|
||||||
|
</mime-type>
|
||||||
|
</mime-info>
|
||||||
|
|
|
@ -478,6 +478,7 @@ capplets/accessibility/keyboard/Makefile
|
||||||
capplets/accessibility/keyboard/accessibility-keyboard.desktop.in
|
capplets/accessibility/keyboard/accessibility-keyboard.desktop.in
|
||||||
capplets/appearance/Makefile
|
capplets/appearance/Makefile
|
||||||
capplets/appearance/gnome-appearance-properties.desktop.in
|
capplets/appearance/gnome-appearance-properties.desktop.in
|
||||||
|
capplets/appearance/gnome-theme-package.xml
|
||||||
capplets/common/Makefile
|
capplets/common/Makefile
|
||||||
capplets/default-applications/Makefile
|
capplets/default-applications/Makefile
|
||||||
capplets/default-applications/default-applications.desktop.in
|
capplets/default-applications/default-applications.desktop.in
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue