[metacity] theme: make meta_frame_piece_from_string static
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [metacity] theme: make meta_frame_piece_from_string static
- Date: Thu, 28 Jan 2016 09:18:32 +0000 (UTC)
commit 1bcd4412d7b4a9f3d08dba1172cd53cb346236f2
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Sun Jan 24 01:27:27 2016 +0200
theme: make meta_frame_piece_from_string static
src/ui/theme-parser.c | 31 +++++++++++++++++++++++++++++++
src/ui/theme-private.h | 1 -
src/ui/theme.c | 31 -------------------------------
3 files changed, 31 insertions(+), 32 deletions(-)
---
diff --git a/src/ui/theme-parser.c b/src/ui/theme-parser.c
index 1246d89..3eb9461 100644
--- a/src/ui/theme-parser.c
+++ b/src/ui/theme-parser.c
@@ -2686,6 +2686,37 @@ meta_button_type_from_string (const char *str, MetaTheme *theme)
return META_BUTTON_TYPE_LAST;
}
+static MetaFramePiece
+meta_frame_piece_from_string (const char *str)
+{
+ if (strcmp ("entire_background", str) == 0)
+ return META_FRAME_PIECE_ENTIRE_BACKGROUND;
+ else if (strcmp ("titlebar", str) == 0)
+ return META_FRAME_PIECE_TITLEBAR;
+ else if (strcmp ("titlebar_middle", str) == 0)
+ return META_FRAME_PIECE_TITLEBAR_MIDDLE;
+ else if (strcmp ("left_titlebar_edge", str) == 0)
+ return META_FRAME_PIECE_LEFT_TITLEBAR_EDGE;
+ else if (strcmp ("right_titlebar_edge", str) == 0)
+ return META_FRAME_PIECE_RIGHT_TITLEBAR_EDGE;
+ else if (strcmp ("top_titlebar_edge", str) == 0)
+ return META_FRAME_PIECE_TOP_TITLEBAR_EDGE;
+ else if (strcmp ("bottom_titlebar_edge", str) == 0)
+ return META_FRAME_PIECE_BOTTOM_TITLEBAR_EDGE;
+ else if (strcmp ("title", str) == 0)
+ return META_FRAME_PIECE_TITLE;
+ else if (strcmp ("left_edge", str) == 0)
+ return META_FRAME_PIECE_LEFT_EDGE;
+ else if (strcmp ("right_edge", str) == 0)
+ return META_FRAME_PIECE_RIGHT_EDGE;
+ else if (strcmp ("bottom_edge", str) == 0)
+ return META_FRAME_PIECE_BOTTOM_EDGE;
+ else if (strcmp ("overlay", str) == 0)
+ return META_FRAME_PIECE_OVERLAY;
+ else
+ return META_FRAME_PIECE_LAST;
+}
+
static void
parse_style_element (GMarkupParseContext *context,
const gchar *element_name,
diff --git a/src/ui/theme-private.h b/src/ui/theme-private.h
index 5ea4289..6b3829c 100644
--- a/src/ui/theme-private.h
+++ b/src/ui/theme-private.h
@@ -874,7 +874,6 @@ gboolean meta_theme_lookup_color_constant (MetaTheme
const char *name,
char **value);
-MetaFramePiece meta_frame_piece_from_string (const char *str);
MetaFrameState meta_frame_state_from_string (const char *str);
const char *meta_frame_state_to_string (MetaFrameState state);
MetaFrameResize meta_frame_resize_from_string (const char *str);
diff --git a/src/ui/theme.c b/src/ui/theme.c
index 3868fb5..e59fb52 100644
--- a/src/ui/theme.c
+++ b/src/ui/theme.c
@@ -6619,37 +6619,6 @@ meta_pango_font_desc_get_text_height (const PangoFontDescription *font_desc,
return retval;
}
-MetaFramePiece
-meta_frame_piece_from_string (const char *str)
-{
- if (strcmp ("entire_background", str) == 0)
- return META_FRAME_PIECE_ENTIRE_BACKGROUND;
- else if (strcmp ("titlebar", str) == 0)
- return META_FRAME_PIECE_TITLEBAR;
- else if (strcmp ("titlebar_middle", str) == 0)
- return META_FRAME_PIECE_TITLEBAR_MIDDLE;
- else if (strcmp ("left_titlebar_edge", str) == 0)
- return META_FRAME_PIECE_LEFT_TITLEBAR_EDGE;
- else if (strcmp ("right_titlebar_edge", str) == 0)
- return META_FRAME_PIECE_RIGHT_TITLEBAR_EDGE;
- else if (strcmp ("top_titlebar_edge", str) == 0)
- return META_FRAME_PIECE_TOP_TITLEBAR_EDGE;
- else if (strcmp ("bottom_titlebar_edge", str) == 0)
- return META_FRAME_PIECE_BOTTOM_TITLEBAR_EDGE;
- else if (strcmp ("title", str) == 0)
- return META_FRAME_PIECE_TITLE;
- else if (strcmp ("left_edge", str) == 0)
- return META_FRAME_PIECE_LEFT_EDGE;
- else if (strcmp ("right_edge", str) == 0)
- return META_FRAME_PIECE_RIGHT_EDGE;
- else if (strcmp ("bottom_edge", str) == 0)
- return META_FRAME_PIECE_BOTTOM_EDGE;
- else if (strcmp ("overlay", str) == 0)
- return META_FRAME_PIECE_OVERLAY;
- else
- return META_FRAME_PIECE_LAST;
-}
-
MetaFrameState
meta_frame_state_from_string (const char *str)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]