summaryrefslogtreecommitdiff
path: root/src/procman.cpp
diff options
context:
space:
mode:
authorMonsta <[email protected]>2015-12-12 23:14:17 +0300
committermonsta <[email protected]>2016-01-11 14:05:07 +0300
commitcbb995375f1b97679fd42090e31277666249cc84 (patch)
tree46f1d7dcbbb63837e2ddfe8013bb756d01b72fdb /src/procman.cpp
parent6a9264b25f20fe81d837217a6d4875d4e594983f (diff)
downloadmate-system-monitor-cbb995375f1b97679fd42090e31277666249cc84.tar.bz2
mate-system-monitor-cbb995375f1b97679fd42090e31277666249cc84.tar.xz
drop GTK+2 code and --with-gtk build option
Diffstat (limited to 'src/procman.cpp')
-rw-r--r--src/procman.cpp40
1 files changed, 0 insertions, 40 deletions
diff --git a/src/procman.cpp b/src/procman.cpp
index abfbf69..a21df0e 100644
--- a/src/procman.cpp
+++ b/src/procman.cpp
@@ -195,46 +195,26 @@ color_changed_cb (GSettings *settings, const gchar *key, gpointer data)
for (int i = 0; i < procdata->config.num_cpus; i++) {
string cpu_key = make_string(g_strdup_printf("cpu-color%d", i));
if (cpu_key == key) {
-#if GTK_CHECK_VERSION(3,0,0)
gdk_rgba_parse (&procdata->config.cpu_color[i], color);
-#else
- gdk_color_parse (color, &procdata->config.cpu_color[i]);
-#endif
procdata->cpu_graph->colors.at(i) = procdata->config.cpu_color[i];
break;
}
}
}
else if (g_str_equal (key, "mem-color")) {
-#if GTK_CHECK_VERSION(3,0,0)
gdk_rgba_parse (&procdata->config.mem_color, color);
-#else
- gdk_color_parse (color, &procdata->config.mem_color);
-#endif
procdata->mem_graph->colors.at(0) = procdata->config.mem_color;
}
else if (g_str_equal (key, "swap-color")) {
-#if GTK_CHECK_VERSION(3,0,0)
gdk_rgba_parse (&procdata->config.swap_color, color);
-#else
- gdk_color_parse (color, &procdata->config.swap_color);
-#endif
procdata->mem_graph->colors.at(1) = procdata->config.swap_color;
}
else if (g_str_equal (key, "net-in-color")) {
-#if GTK_CHECK_VERSION(3,0,0)
gdk_rgba_parse (&procdata->config.net_in_color, color);
-#else
- gdk_color_parse (color, &procdata->config.net_in_color);
-#endif
procdata->net_graph->colors.at(0) = procdata->config.net_in_color;
}
else if (g_str_equal (key, "net-out-color")) {
-#if GTK_CHECK_VERSION(3,0,0)
gdk_rgba_parse (&procdata->config.net_out_color, color);
-#else
- gdk_color_parse (color, &procdata->config.net_out_color);
-#endif
procdata->net_graph->colors.at(1) = procdata->config.net_out_color;
}
else {
@@ -329,11 +309,7 @@ procman_data_new (GSettings *settings)
detail_string = std::string("changed::") + std::string(key);
g_signal_connect (G_OBJECT(settings), detail_string.c_str(),
G_CALLBACK(color_changed_cb), pd);
-#if GTK_CHECK_VERSION(3,0,0)
gdk_rgba_parse (&pd->config.cpu_color[i], color);
-#else
- gdk_color_parse(color, &pd->config.cpu_color[i]);
-#endif
g_free (color);
g_free (key);
}
@@ -343,11 +319,7 @@ procman_data_new (GSettings *settings)
color = g_strdup ("#000000ff0082");
g_signal_connect (G_OBJECT(settings), "changed::mem-color",
G_CALLBACK(color_changed_cb), pd);
-#if GTK_CHECK_VERSION(3,0,0)
gdk_rgba_parse (&pd->config.mem_color, color);
-#else
- gdk_color_parse(color, &pd->config.mem_color);
-#endif
g_free (color);
@@ -356,11 +328,7 @@ procman_data_new (GSettings *settings)
color = g_strdup ("#00b6000000ff");
g_signal_connect (G_OBJECT(settings), "changed::swap-color",
G_CALLBACK(color_changed_cb), pd);
-#if GTK_CHECK_VERSION(3,0,0)
gdk_rgba_parse (&pd->config.swap_color, color);
-#else
- gdk_color_parse(color, &pd->config.swap_color);
-#endif
g_free (color);
color = g_settings_get_string (settings, "net-in-color");
@@ -368,11 +336,7 @@ procman_data_new (GSettings *settings)
color = g_strdup ("#000000f200f2");
g_signal_connect (G_OBJECT(settings), "changed::net-in-color",
G_CALLBACK(color_changed_cb), pd);
-#if GTK_CHECK_VERSION(3,0,0)
gdk_rgba_parse (&pd->config.net_in_color, color);
-#else
- gdk_color_parse(color, &pd->config.net_in_color);
-#endif
g_free (color);
color = g_settings_get_string (settings, "net-out-color");
@@ -380,11 +344,7 @@ procman_data_new (GSettings *settings)
color = g_strdup ("#00f2000000c1");
g_signal_connect (G_OBJECT(settings), "changed::net-out-color",
G_CALLBACK(color_changed_cb), pd);
-#if GTK_CHECK_VERSION(3,0,0)
gdk_rgba_parse (&pd->config.net_out_color, color);
-#else
- gdk_color_parse(color, &pd->config.net_out_color);
-#endif
g_free (color);
/* Sanity checks */