mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 11:32:04 +00:00
look for themes in ~/.themes/NAME/metacity-1/ and
2002-07-24 Havoc Pennington <hp@redhat.com> * src/theme-parser.c (meta_theme_load): look for themes in ~/.themes/NAME/metacity-1/ and datadir/themes/NAME/metacity-1 instead of the old locations. * src/themes/Makefile.am: install themes to datadir/themes/NAME/metacity-1/ to match how GTK works, breaking third-party themes yet again! woot!
This commit is contained in:
parent
28958e51ef
commit
88a0d1ff03
10
ChangeLog
10
ChangeLog
@ -1,3 +1,13 @@
|
||||
2002-07-24 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* src/theme-parser.c (meta_theme_load): look for themes in
|
||||
~/.themes/NAME/metacity-1/ and datadir/themes/NAME/metacity-1
|
||||
instead of the old locations.
|
||||
|
||||
* src/themes/Makefile.am: install themes to
|
||||
datadir/themes/NAME/metacity-1/ to match how GTK works, breaking
|
||||
third-party themes yet again! woot!
|
||||
|
||||
2002-07-20 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* src/display.c (meta_display_open): grab display across managing
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
SUBDIRS=wm-tester tools themes
|
||||
|
||||
INCLUDES=@METACITY_CFLAGS@ -DMETACITY_LIBEXECDIR=\"$(libexecdir)\" -DHOST_ALIAS=\"@HOST_ALIAS@\" -DMETACITY_LOCALEDIR=\"$(prefix)/@DATADIRNAME@/locale\" -DMETACITY_PKGDATADIR=\"$(pkgdatadir)\"
|
||||
INCLUDES=@METACITY_CFLAGS@ -DMETACITY_LIBEXECDIR=\"$(libexecdir)\" -DHOST_ALIAS=\"@HOST_ALIAS@\" -DMETACITY_LOCALEDIR=\"$(prefix)/@DATADIRNAME@/locale\" -DMETACITY_PKGDATADIR=\"$(pkgdatadir)\" -DMETACITY_DATADIR=\"$(datadir)\"
|
||||
|
||||
EGGFILES= \
|
||||
eggaccelerators.c \
|
||||
|
@ -1872,8 +1872,6 @@ get_control (MetaFrames *frames,
|
||||
return META_FRAME_CONTROL_RESIZE_E;
|
||||
}
|
||||
}
|
||||
|
||||
noresize:
|
||||
|
||||
return META_FRAME_CONTROL_NONE;
|
||||
}
|
||||
|
@ -21,6 +21,7 @@
|
||||
|
||||
#include <config.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "menu.h"
|
||||
#include "main.h"
|
||||
#include "util.h"
|
||||
|
@ -4181,9 +4181,14 @@ text_handler (GMarkupParseContext *context,
|
||||
|
||||
/* We change the filename when we break the format,
|
||||
* so themes can work with various metacity versions
|
||||
* (note, this is obsolete now because we are versioning
|
||||
* the directory this file is inside, so oh well)
|
||||
*/
|
||||
#define THEME_FILENAME "metacity-theme-1.xml"
|
||||
|
||||
/* now this is versioned, /usr/share/themes/NAME/THEME_SUBDIR/THEME_FILENAME */
|
||||
#define THEME_SUBDIR "metacity-1"
|
||||
|
||||
MetaTheme*
|
||||
meta_theme_load (const char *theme_name,
|
||||
GError **err)
|
||||
@ -4206,6 +4211,7 @@ meta_theme_load (const char *theme_name,
|
||||
|
||||
if (meta_is_debugging ())
|
||||
{
|
||||
/* Try in themes in our source tree */
|
||||
theme_dir = g_build_filename ("./themes", theme_name, NULL);
|
||||
|
||||
theme_file = g_build_filename (theme_dir,
|
||||
@ -4227,34 +4233,15 @@ meta_theme_load (const char *theme_name,
|
||||
}
|
||||
}
|
||||
|
||||
/* We try in current dir, then home dir, then system dir for themes */
|
||||
if (text == NULL)
|
||||
{
|
||||
theme_dir = g_build_filename ("./", theme_name, NULL);
|
||||
|
||||
theme_file = g_build_filename (theme_dir,
|
||||
THEME_FILENAME,
|
||||
NULL);
|
||||
|
||||
error = NULL;
|
||||
if (!g_file_get_contents (theme_file,
|
||||
&text,
|
||||
&length,
|
||||
&error))
|
||||
{
|
||||
meta_topic (META_DEBUG_THEMES, "Failed to read theme from file %s: %s\n",
|
||||
theme_file, error->message);
|
||||
g_error_free (error);
|
||||
g_free (theme_dir);
|
||||
g_free (theme_file);
|
||||
theme_file = NULL;
|
||||
}
|
||||
}
|
||||
/* We try in home dir, then system dir for themes */
|
||||
|
||||
if (text == NULL)
|
||||
{
|
||||
theme_dir = g_build_filename (g_get_home_dir (),
|
||||
".metacity/themes/", theme_name, NULL);
|
||||
".themes",
|
||||
theme_name,
|
||||
THEME_SUBDIR,
|
||||
NULL);
|
||||
|
||||
theme_file = g_build_filename (theme_dir,
|
||||
THEME_FILENAME,
|
||||
@ -4277,9 +4264,11 @@ meta_theme_load (const char *theme_name,
|
||||
|
||||
if (text == NULL)
|
||||
{
|
||||
theme_dir = g_build_filename (METACITY_PKGDATADIR,
|
||||
theme_dir = g_build_filename (METACITY_DATADIR,
|
||||
"themes",
|
||||
theme_name, NULL);
|
||||
theme_name,
|
||||
THEME_SUBDIR,
|
||||
NULL);
|
||||
|
||||
theme_file = g_build_filename (theme_dir,
|
||||
THEME_FILENAME,
|
||||
|
@ -5,18 +5,20 @@ THEMES= \
|
||||
Esco \
|
||||
Gorilla
|
||||
|
||||
THEME_DIR=$(pkgdatadir)/themes
|
||||
THEME_DIR=$(datadir)/themes
|
||||
THEME_SUBDIR=metacity-1
|
||||
|
||||
install-data-local:
|
||||
$(mkinstalldirs) $(DESTDIR)$(THEME_DIR); \
|
||||
for THEME in $(THEMES); do \
|
||||
echo '-- Installing theme '$$THEME; \
|
||||
$(mkinstalldirs) $(DESTDIR)$(THEME_DIR)/$$THEME; \
|
||||
(installfiles=`find $(srcdir)/$$THEME -name "*.png" -o -name "*.xml"`; \
|
||||
for i in $$installfiles; do \
|
||||
echo '-- Installing '$$i ; \
|
||||
$(INSTALL_DATA) $$i $(DESTDIR)$(THEME_DIR)/$$THEME; \
|
||||
done) \
|
||||
$(mkinstalldirs) $(DESTDIR)$(THEME_DIR); \
|
||||
for THEME in $(THEMES); do \
|
||||
echo '-- Installing theme '$$THEME; \
|
||||
$(mkinstalldirs) $(DESTDIR)$(THEME_DIR)/$$THEME; \
|
||||
$(mkinstalldirs) $(DESTDIR)$(THEME_DIR)/$$THEME/$(THEME_SUBDIR); \
|
||||
(installfiles=`find $(srcdir)/$$THEME -name "*.png" -o -name "*.xml"`; \
|
||||
for i in $$installfiles; do \
|
||||
echo '-- Installing '$$i ; \
|
||||
$(INSTALL_DATA) $$i $(DESTDIR)$(THEME_DIR)/$$THEME/$(THEME_SUBDIR) ; \
|
||||
done) \
|
||||
done
|
||||
|
||||
dist-hook:
|
||||
|
Loading…
Reference in New Issue
Block a user