summaryrefslogtreecommitdiff
path: root/logview/src/logview-prefs.c
diff options
context:
space:
mode:
authormonsta <[email protected]>2016-11-22 15:49:16 +0300
committermonsta <[email protected]>2016-11-22 15:49:16 +0300
commitea481767c4e3ec19136a5b61ad46f244a9a5ffa7 (patch)
treebbcceb1d2a0be587e7127109f57e41e9e9b43f98 /logview/src/logview-prefs.c
parent8f9a34f003061d7c5e6cfe8a8cb64ec6e98d7c4a (diff)
downloadmate-utils-ea481767c4e3ec19136a5b61ad46f244a9a5ffa7.tar.bz2
mate-utils-ea481767c4e3ec19136a5b61ad46f244a9a5ffa7.tar.xz
move to GTK+3 (>= 3.14), drop GTK+2 code and --with-gtk build option
and require mate-panel >= 1.17
Diffstat (limited to 'logview/src/logview-prefs.c')
-rw-r--r--logview/src/logview-prefs.c57
1 files changed, 0 insertions, 57 deletions
diff --git a/logview/src/logview-prefs.c b/logview/src/logview-prefs.c
index 2cf8a366..e0fe79c2 100644
--- a/logview/src/logview-prefs.c
+++ b/logview/src/logview-prefs.c
@@ -154,11 +154,7 @@ load_filters (LogviewPrefs *prefs)
const gchar *str;
LogviewFilter *filter;
GtkTextTag *tag;
-#if GTK_CHECK_VERSION (3, 0, 0)
GdkRGBA color;
-#else
- GdkColor color;
-#endif
gint idx;
filters = g_settings_get_strv (prefs->priv->logview_prefs,
@@ -178,7 +174,6 @@ load_filters (LogviewPrefs *prefs)
g_str_equal (tokens[FILTER_INVISIBLE], "1"), NULL);
if (strlen (tokens[FILTER_FOREGROUND])) {
-#if GTK_CHECK_VERSION (3, 0, 0)
gdk_rgba_parse (&color, tokens[FILTER_FOREGROUND]);
g_object_set (tag, "foreground-rgba", &color,
"foreground-set", TRUE, NULL);
@@ -187,16 +182,6 @@ load_filters (LogviewPrefs *prefs)
if (strlen (tokens[FILTER_BACKGROUND])) {
gdk_rgba_parse (&color, tokens[FILTER_BACKGROUND]);
g_object_set (tag, "paragraph-background-rgba", &color,
-#else
- gdk_color_parse (tokens[FILTER_FOREGROUND], &color);
- g_object_set (tag, "foreground-gdk", &color,
- "foreground-set", TRUE, NULL);
- }
-
- if (strlen (tokens[FILTER_BACKGROUND])) {
- gdk_color_parse (tokens[FILTER_BACKGROUND], &color);
- g_object_set (tag, "paragraph-background-gdk", &color,
-#endif
"paragraph-background-set", TRUE, NULL);
}
@@ -219,15 +204,9 @@ save_filter_foreach_func (gpointer key, gpointer value, gpointer user_data)
GPtrArray *filters;
const gchar *name;
LogviewFilter *filter;
-#if GTK_CHECK_VERSION (3, 0, 0)
GdkRGBA *foreground;
gboolean foreground_set;
GdkRGBA *background;
-#else
- GdkColor *foreground;
- gboolean foreground_set;
- GdkColor *background;
-#endif
gboolean background_set;
gchar *regex, *color;
gboolean invisible;
@@ -247,7 +226,6 @@ save_filter_foreach_func (gpointer key, gpointer value, gpointer user_data)
"texttag", &tag,
NULL);
g_object_get (tag,
-#if GTK_CHECK_VERSION (3, 0, 0)
"foreground-set", &foreground_set,
"foreground-rgba", &foreground,
"paragraph-background-set", &background_set,
@@ -281,41 +259,6 @@ save_filter_foreach_func (gpointer key, gpointer value, gpointer user_data)
if (background) {
gdk_rgba_free (background);
}
-#else
- "foreground-gdk", &foreground,
- "paragraph-background-gdk", &background,
- "foreground-set", &foreground_set,
- "paragraph-background-set", &background_set,
- "invisible", &invisible, NULL);
-
- if (invisible) {
- g_string_append (prefs_string, "1" DELIMITER);
- } else {
- g_string_append (prefs_string, "0" DELIMITER);
- }
-
- if (foreground_set) {
- color = gdk_color_to_string (foreground);
- g_string_append (prefs_string, color);
- g_free (color);
- }
-
- if (foreground) {
- gdk_color_free (foreground);
- }
-
- g_string_append (prefs_string, DELIMITER);
-
- if (background_set) {
- color = gdk_color_to_string (background);
- g_string_append (prefs_string, color);
- g_free (color);
- }
-
- if (background) {
- gdk_color_free (background);
- }
-#endif
g_string_append (prefs_string, DELIMITER);
g_string_append (prefs_string, regex);