capplets/common/gnome-theme-info.[ch]: Total rewrite. Fam now works correctly.

capplets/keybindings/*: use new theme code.
capplets/theme-switcher/*: use new theme code.
This commit is contained in:
Jonathan Blandford 2003-01-13 20:21:28 +00:00
parent 3f3ed8325e
commit f28c52f3f3
8 changed files with 1332 additions and 381 deletions

View file

@ -1,3 +1,8 @@
Mon Jan 13 15:04:47 2003 Jonathan Blandford <jrb@redhat.com>
* gnome-theme-info.c: rewrote to handle fam more correctly. Still
a little broken in places, but much, much better than before.
2003-01-10 Jody Goldberg <jody@gnome.org>
* Release 2.1.6

File diff suppressed because it is too large Load diff

View file

@ -9,12 +9,12 @@
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The Gnome Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the Gnome Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
@ -29,17 +29,32 @@
#include <glib.h>
typedef enum {
GNOME_THEME_TYPE_METATHEME,
GNOME_THEME_TYPE_ICON,
GNOME_THEME_TYPE_REGULAR,
} GnomeThemeType;
typedef enum {
GNOME_THEME_CHANGE_CREATED,
GNOME_THEME_CHANGE_DELETED,
GNOME_THEME_CHANGE_CHANGED
} GnomeThemeChangeType;
typedef enum {
GNOME_THEME_METACITY = 1 << 0,
GNOME_THEME_GTK_2 = 1 << 1,
GNOME_THEME_GTK_2_KEYBINDING = 1 << 2,
} GnomeThemeElement;
typedef struct _GnomeThemeInfo GnomeThemeInfo;
struct _GnomeThemeInfo
{
gchar *path;
gchar *name;
gint priority;
guint has_gtk : 1;
guint has_keybinding : 1;
guint has_metacity : 1;
@ -51,14 +66,16 @@ struct _GnomeThemeIconInfo
{
gchar *path;
gchar *name;
gint priority;
};
typedef struct _GnomeThemeMetaInfo GnomeThemeMetaInfo;
struct _GnomeThemeMetaInfo
{
gchar *path;
gchar *readable_name;
gchar *name;
gint priority;
gchar *readable_name;
gchar *comment;
gchar *icon_file;
@ -67,7 +84,7 @@ struct _GnomeThemeMetaInfo
gchar *icon_theme_name;
gchar *sawfish_theme_name;
gchar *sound_theme_name;
gchar *application_font;
gchar *background_image;
};
@ -78,8 +95,8 @@ GnomeThemeInfo *gnome_theme_info_new (void);
void gnome_theme_info_free (GnomeThemeInfo *theme_info);
GnomeThemeInfo *gnome_theme_info_find (const gchar *theme_name);
GList *gnome_theme_info_find_by_type (guint elements);
GnomeThemeInfo *gnome_theme_info_find_by_dir (const gchar *theme_dir);
/* Expected to be in the form "file:///usr/share/..." */
GnomeThemeInfo *gnome_theme_info_find_by_uri (const gchar *theme_uri);
/* Icon Themes */
@ -87,18 +104,23 @@ GnomeThemeIconInfo *gnome_theme_icon_info_new (void);
void gnome_theme_icon_info_free (GnomeThemeIconInfo *icon_theme_info);
GnomeThemeInfo *gnome_theme_icon_info_find (const gchar *icon_theme_name);
GList *gnome_theme_icon_info_find_all (void);
gint gnome_theme_icon_info_compare (GnomeThemeIconInfo *a,
GnomeThemeIconInfo *b);
/* Meta themes*/
GnomeThemeMetaInfo *gnome_theme_meta_info_new (void);
void gnome_theme_meta_info_free (GnomeThemeMetaInfo *meta_theme_info);
void gnome_theme_meta_info_print (GnomeThemeMetaInfo *meta_theme_info);
GnomeThemeMetaInfo *gnome_theme_meta_info_find (const char *meta_theme_name);
GnomeThemeMetaInfo *gnome_theme_meta_info_find_by_filename (const char *file_name);
GnomeThemeMetaInfo *gnome_theme_meta_info_find_by_uri (const char *uri);
GList *gnome_theme_meta_info_find_all (void);
gint gnome_theme_meta_info_compare (GnomeThemeMetaInfo *a,
GnomeThemeMetaInfo *b);
/* Theme monitoring */
/* Other */
void gnome_theme_init (gboolean *monitor_not_added);
void gnome_theme_info_register_theme_change (GFunc func,
gpointer data);

View file

@ -1,3 +1,7 @@
Mon Jan 13 15:14:22 2003 Jonathan Blandford <jrb@redhat.com>
* gnome-keybinding-properties.c (main): gnome_theme_init() added.
2003-01-10 Jody Goldberg <jody@gnome.org>
* Release 2.1.6

View file

@ -347,7 +347,7 @@ grab_key_callback (GtkWidget *widget,
GdkEventKey *event,
void *data)
{
GdkModifierType accel_mods;
GdkModifierType accel_mods = 0;
guint accel_keyval;
EggCellRendererKeys *keys;
char *path;

View file

@ -959,6 +959,8 @@ main (int argc, char *argv[])
GNOME_PARAM_APP_DATADIR, GNOMECC_DATA_DIR,
NULL);
gnome_theme_init (NULL);
activate_settings_daemon ();
dialog = create_dialog ();

View file

@ -1,3 +1,7 @@
Mon Jan 13 15:20:17 2003 Jonathan Blandford <jrb@redhat.com>
* gnome-theme-manager.c (main): gnome_theme_init ()
2003-01-10 Jody Goldberg <jody@gnome.org>
* Release 2.1.6

View file

@ -1404,6 +1404,8 @@ main (int argc, char *argv[])
GNOME_PARAM_APP_DATADIR, GNOMECC_DATA_DIR,
NULL);
gnome_theme_init (NULL);
gnome_wm_manager_init ();
activate_settings_daemon ();