From aed6375a2d7e848df960232c5653744aa6f6384c Mon Sep 17 00:00:00 2001 From: "Owen W. Taylor" Date: Sun, 31 Oct 2010 15:39:32 -0400 Subject: [PATCH] Move StIconType to st-types.h from st-texture-cache.h StIconType will be used by a new StIcon class, so move it to the header file of common enumerations. Including st-types.h which had the St single-include check revealed that st-texture-cache.h didn't have that check and several places were including that directly. Fix that up. https://bugzilla.gnome.org/show_bug.cgi?id=633865 --- src/shell-app-system.c | 2 +- src/shell-window-tracker.c | 2 +- src/st/st-texture-cache.h | 13 ++++++------- src/st/st-types.h | 7 +++++++ 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/src/shell-app-system.c b/src/shell-app-system.c index 4bc5e454e..7df763f05 100644 --- a/src/shell-app-system.c +++ b/src/shell-app-system.c @@ -13,8 +13,8 @@ #include "shell-app-private.h" #include "shell-global.h" -#include "st/st-texture-cache.h" #include "display.h" +#include "st.h" #define GMENU_I_KNOW_THIS_IS_UNSTABLE #include diff --git a/src/shell-window-tracker.c b/src/shell-window-tracker.c index cb276e4e0..ad8bc478d 100644 --- a/src/shell-window-tracker.c +++ b/src/shell-window-tracker.c @@ -16,9 +16,9 @@ #include "shell-window-tracker-private.h" #include "shell-app-system.h" #include "shell-app-private.h" -#include "st/st-texture-cache.h" #include "shell-global.h" #include "shell-marshal.h" +#include "st.h" #include "display.h" #include "window.h" diff --git a/src/st/st-texture-cache.h b/src/st/st-texture-cache.h index ec61c90e1..25c4df7ca 100644 --- a/src/st/st-texture-cache.h +++ b/src/st/st-texture-cache.h @@ -22,11 +22,17 @@ #ifndef __ST_TEXTURE_CACHE_H__ #define __ST_TEXTURE_CACHE_H__ +#if !defined(ST_H_INSIDE) && !defined(ST_COMPILATION) +#error "Only can be included directly.h" +#endif + #include #include #include #include +#include + #define ST_TYPE_TEXTURE_CACHE (st_texture_cache_get_type ()) #define ST_TEXTURE_CACHE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ST_TYPE_TEXTURE_CACHE, StTextureCache)) #define ST_TEXTURE_CACHE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ST_TYPE_TEXTURE_CACHE, StTextureCacheClass)) @@ -52,13 +58,6 @@ struct _StTextureCacheClass }; -typedef enum { - ST_ICON_SYMBOLIC, - ST_ICON_FULLCOLOR, - ST_ICON_APPLICATION, - ST_ICON_DOCUMENT -} StIconType; - typedef enum { ST_TEXTURE_CACHE_POLICY_NONE, ST_TEXTURE_CACHE_POLICY_FOREVER diff --git a/src/st/st-types.h b/src/st/st-types.h index b1706dbef..335c2a094 100644 --- a/src/st/st-types.h +++ b/src/st/st-types.h @@ -42,6 +42,13 @@ typedef enum { ST_ALIGN_END } StAlign; +typedef enum { + ST_ICON_SYMBOLIC, + ST_ICON_FULLCOLOR, + ST_ICON_APPLICATION, + ST_ICON_DOCUMENT +} StIconType; + G_END_DECLS #endif /* __ST_TYPES_H__ */