diff options
author | Brian Tarricone <brian@tarricone.org> | 2006-03-03 10:12:39 +0000 |
---|---|---|
committer | Brian Tarricone <brian@tarricone.org> | 2006-03-03 10:12:39 +0000 |
commit | effd8be9c7e489a5a6ef44fd496b3df05b15541e (patch) | |
tree | 0b3427b429630ff19d6c31e8503975a3a75b21b5 /modules | |
parent | ba3a44f28340d0e6beb9f0686ceb81af1648fa86 (diff) | |
download | xfdesktop-effd8be9c7e489a5a6ef44fd496b3df05b15541e.tar.gz |
remove XfceIconTheme stuff, use xfce_themed_icon_*() instead
(Old svn revision: 20180)
Diffstat (limited to 'modules')
-rw-r--r-- | modules/menu/desktop-menu-private.h | 1 | ||||
-rw-r--r-- | modules/menu/desktop-menu.c | 11 | ||||
-rw-r--r-- | modules/menu/desktop-menuspec.c | 72 |
3 files changed, 39 insertions, 45 deletions
diff --git a/modules/menu/desktop-menu-private.h b/modules/menu/desktop-menu-private.h index 5bf6f1af..49b41808 100644 --- a/modules/menu/desktop-menu-private.h +++ b/modules/menu/desktop-menu-private.h @@ -56,6 +56,5 @@ struct _XfceDesktopMenu { void _xfce_desktop_menu_free_menudata(struct _XfceDesktopMenu *desktop_menu); void _desktop_menu_ensure_unknown_icon(); extern gint _xfce_desktop_menu_icon_size; -extern XfceIconTheme *_deskmenu_icon_theme; #endif /* !def __DESKTOP_MENU_PRIVATE_H__ */ diff --git a/modules/menu/desktop-menu.c b/modules/menu/desktop-menu.c index 9e6121a8..667d1107 100644 --- a/modules/menu/desktop-menu.c +++ b/modules/menu/desktop-menu.c @@ -75,12 +75,12 @@ GdkPixbuf *dummy_icon = NULL; GdkPixbuf *unknown_icon = NULL; gint _xfce_desktop_menu_icon_size = 24; -XfceIconTheme *_deskmenu_icon_theme = NULL; +static GtkIconTheme *_deskmenu_icon_theme = NULL; static GList *timeout_handles = NULL; static time_t last_settings_change = 0; static void -itheme_changed_cb(XfceIconTheme *itheme, gpointer user_data) +itheme_changed_cb(GtkIconTheme *itheme, gpointer user_data) { last_settings_change = time(NULL); } @@ -429,7 +429,7 @@ g_module_check_init(GModule *module) dummy_icon = xfce_inline_icon_at_size(dummy_icon_data, _xfce_desktop_menu_icon_size, _xfce_desktop_menu_icon_size); - _deskmenu_icon_theme = xfce_icon_theme_get_for_screen(NULL); + _deskmenu_icon_theme = gtk_icon_theme_get_default(); g_signal_connect(G_OBJECT(_deskmenu_icon_theme), "changed", G_CALLBACK(itheme_changed_cb), NULL); @@ -441,11 +441,6 @@ g_module_unload(GModule *module) { GList *l; - if(_deskmenu_icon_theme) { - g_object_unref(G_OBJECT(_deskmenu_icon_theme)); - _deskmenu_icon_theme = NULL; - } - if(timeout_handles) { for(l=timeout_handles; l; l=l->next) g_source_remove(GPOINTER_TO_UINT(l->data)); diff --git a/modules/menu/desktop-menuspec.c b/modules/menu/desktop-menuspec.c index 90b535ac..88e30b97 100644 --- a/modules/menu/desktop-menuspec.c +++ b/modules/menu/desktop-menuspec.c @@ -88,56 +88,56 @@ static gchar * menuspec_builtin_icon_to_filename(const gchar *name) { if(!strcmp(name, "UNKNOWN")) - return xfce_icon_theme_lookup_category(_deskmenu_icon_theme, - XFCE_ICON_CATEGORY_UNKNOWN, _xfce_desktop_menu_icon_size); + return xfce_themed_icon_lookup_category(XFCE_ICON_CATEGORY_UNKNOWN, + _xfce_desktop_menu_icon_size); else if(!strcmp(name, "EDITOR")) - return xfce_icon_theme_lookup_category(_deskmenu_icon_theme, - XFCE_ICON_CATEGORY_EDITOR, _xfce_desktop_menu_icon_size); + return xfce_themed_icon_lookup_category(XFCE_ICON_CATEGORY_EDITOR, + _xfce_desktop_menu_icon_size); else if(!strcmp(name, "FILEMAN")) - return xfce_icon_theme_lookup_category(_deskmenu_icon_theme, - XFCE_ICON_CATEGORY_FILEMAN, _xfce_desktop_menu_icon_size); + return xfce_themed_icon_lookup_category(XFCE_ICON_CATEGORY_FILEMAN, + _xfce_desktop_menu_icon_size); else if(!strcmp(name, "UTILITY")) - return xfce_icon_theme_lookup_category(_deskmenu_icon_theme, - XFCE_ICON_CATEGORY_UTILITY, _xfce_desktop_menu_icon_size); + return xfce_themed_icon_lookup_category(XFCE_ICON_CATEGORY_UTILITY, + _xfce_desktop_menu_icon_size); else if(!strcmp(name, "GAME")) - return xfce_icon_theme_lookup_category(_deskmenu_icon_theme, - XFCE_ICON_CATEGORY_GAME, _xfce_desktop_menu_icon_size); + return xfce_themed_icon_lookup_category(XFCE_ICON_CATEGORY_GAME, + _xfce_desktop_menu_icon_size); else if(!strcmp(name, "HELP")) - return xfce_icon_theme_lookup_category(_deskmenu_icon_theme, - XFCE_ICON_CATEGORY_HELP, _xfce_desktop_menu_icon_size); + return xfce_themed_icon_lookup_category(XFCE_ICON_CATEGORY_HELP, + _xfce_desktop_menu_icon_size); else if(!strcmp(name, "MULTIMEDIA")) - return xfce_icon_theme_lookup_category(_deskmenu_icon_theme, - XFCE_ICON_CATEGORY_MULTIMEDIA, _xfce_desktop_menu_icon_size); + return xfce_themed_icon_lookup_category(XFCE_ICON_CATEGORY_MULTIMEDIA, + _xfce_desktop_menu_icon_size); else if(!strcmp(name, "NETWORK")) - return xfce_icon_theme_lookup_category(_deskmenu_icon_theme, - XFCE_ICON_CATEGORY_NETWORK, _xfce_desktop_menu_icon_size); + return xfce_themed_icon_lookup_category(XFCE_ICON_CATEGORY_NETWORK, + _xfce_desktop_menu_icon_size); else if(!strcmp(name, "GRAPHICS")) - return xfce_icon_theme_lookup_category(_deskmenu_icon_theme, - XFCE_ICON_CATEGORY_GRAPHICS, _xfce_desktop_menu_icon_size); + return xfce_themed_icon_lookup_category(XFCE_ICON_CATEGORY_GRAPHICS, + _xfce_desktop_menu_icon_size); else if(!strcmp(name, "PRINTER")) - return xfce_icon_theme_lookup_category(_deskmenu_icon_theme, - XFCE_ICON_CATEGORY_PRINTER, _xfce_desktop_menu_icon_size); + return xfce_themed_icon_lookup_category(XFCE_ICON_CATEGORY_PRINTER, + _xfce_desktop_menu_icon_size); else if(!strcmp(name, "PRODUCTIVITY")) - return xfce_icon_theme_lookup_category(_deskmenu_icon_theme, - XFCE_ICON_CATEGORY_PRODUCTIVITY, _xfce_desktop_menu_icon_size); + return xfce_themed_icon_lookup_category(XFCE_ICON_CATEGORY_PRODUCTIVITY, + _xfce_desktop_menu_icon_size); else if(!strcmp(name, "SOUND")) - return xfce_icon_theme_lookup_category(_deskmenu_icon_theme, - XFCE_ICON_CATEGORY_SOUND, _xfce_desktop_menu_icon_size); + return xfce_themed_icon_lookup_category(XFCE_ICON_CATEGORY_SOUND, + _xfce_desktop_menu_icon_size); else if(!strcmp(name, "TERMINAL")) - return xfce_icon_theme_lookup_category(_deskmenu_icon_theme, - XFCE_ICON_CATEGORY_TERMINAL, _xfce_desktop_menu_icon_size); + return xfce_themed_icon_lookup_category(XFCE_ICON_CATEGORY_TERMINAL, + _xfce_desktop_menu_icon_size); else if(!strcmp(name, "DEVELOPMENT")) - return xfce_icon_theme_lookup_category(_deskmenu_icon_theme, - XFCE_ICON_CATEGORY_DEVELOPMENT, _xfce_desktop_menu_icon_size); + return xfce_themed_icon_lookup_category(XFCE_ICON_CATEGORY_DEVELOPMENT, + _xfce_desktop_menu_icon_size); else if(!strcmp(name, "SETTINGS")) - return xfce_icon_theme_lookup_category(_deskmenu_icon_theme, - XFCE_ICON_CATEGORY_SETTINGS, _xfce_desktop_menu_icon_size); + return xfce_themed_icon_lookup_category(XFCE_ICON_CATEGORY_SETTINGS, + _xfce_desktop_menu_icon_size); else if(!strcmp(name, "SYSTEM")) - return xfce_icon_theme_lookup_category(_deskmenu_icon_theme, - XFCE_ICON_CATEGORY_SYSTEM, _xfce_desktop_menu_icon_size); + return xfce_themed_icon_lookup_category(XFCE_ICON_CATEGORY_SYSTEM, + _xfce_desktop_menu_icon_size); else if(!strcmp(name, "WINE")) - return xfce_icon_theme_lookup_category(_deskmenu_icon_theme, - XFCE_ICON_CATEGORY_WINE, _xfce_desktop_menu_icon_size); + return xfce_themed_icon_lookup_category(XFCE_ICON_CATEGORY_WINE, + _xfce_desktop_menu_icon_size); return NULL; } @@ -309,8 +309,8 @@ menuspec_xml_start(GMarkupParseContext *context, const gchar *element_name, if(builtin_icon) icon_filename = menuspec_builtin_icon_to_filename(builtin_icon); if(!icon_filename && icon) { - icon_filename = xfce_icon_theme_lookup(_deskmenu_icon_theme, - icon, _xfce_desktop_menu_icon_size); + icon_filename = xfce_themed_icon_lookup(icon, + _xfce_desktop_menu_icon_size); } if(icon_filename) { |