summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/interface.cpp57
-rw-r--r--src/procdialogs.cpp36
-rw-r--r--src/sysinfo.cpp20
-rw-r--r--src/util.cpp4
4 files changed, 1 insertions, 116 deletions
diff --git a/src/interface.cpp b/src/interface.cpp
index bacab98..3bd7ab6 100644
--- a/src/interface.cpp
+++ b/src/interface.cpp
@@ -251,11 +251,7 @@ make_title_label (const char *text)
label = gtk_label_new (full);
g_free (full);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-#endif
gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
return label;
@@ -346,11 +342,8 @@ create_sys_view (ProcData *procdata)
g_free (label_text);
cpu_label = gtk_label_new (NULL);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (cpu_label), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (cpu_label), 0.0, 0.5);
-#endif
+
gtk_box_pack_start (GTK_BOX (temp_hbox), cpu_label, TRUE, TRUE, 0);
load_graph_get_labels(cpu_graph)->cpu[i] = cpu_label;
@@ -406,11 +399,7 @@ create_sys_view (ProcData *procdata)
label = gtk_label_new (label_text);
g_free(label_text);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-#endif
gtk_grid_attach (GTK_GRID (grid), label, 1, 0, 7, 1);
gtk_grid_attach (GTK_GRID (grid),
@@ -434,11 +423,7 @@ create_sys_view (ProcData *procdata)
label = gtk_label_new (label_text);
g_free(label_text);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-#endif
gtk_grid_attach (GTK_GRID (grid), label, 1, 0, 7, 1);
gtk_grid_attach (GTK_GRID (grid),
@@ -497,40 +482,20 @@ create_sys_view (ProcData *procdata)
label = gtk_label_new (label_text);
g_free(label_text);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-#endif
gtk_grid_attach (GTK_GRID (grid), label, 1, 0, 1, 1);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (load_graph_get_labels(net_graph)->net_in), 1.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (load_graph_get_labels(net_graph)->net_in),
- 1.0,
- 0.5);
-#endif
gtk_widget_set_size_request(GTK_WIDGET(load_graph_get_labels(net_graph)->net_in), 100, -1);
gtk_widget_set_hexpand (load_graph_get_labels(net_graph)->net_in, TRUE);
gtk_grid_attach (GTK_GRID (grid), load_graph_get_labels(net_graph)->net_in, 2, 0, 1, 1);
label = gtk_label_new (_("Total Received"));
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-#endif
gtk_grid_attach (GTK_GRID (grid), label, 1, 1, 1, 1);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (load_graph_get_labels(net_graph)->net_in_total), 1.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (load_graph_get_labels(net_graph)->net_in_total),
- 1.0,
- 0.5);
-#endif
gtk_grid_attach (GTK_GRID (grid),
load_graph_get_labels(net_graph)->net_in_total,
2, 1, 1, 1);
@@ -558,40 +523,20 @@ create_sys_view (ProcData *procdata)
label = gtk_label_new (label_text);
g_free(label_text);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-#endif
gtk_grid_attach (GTK_GRID (grid), label, 1, 0, 1, 1);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (load_graph_get_labels(net_graph)->net_out), 1.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (load_graph_get_labels(net_graph)->net_out),
- 1.0,
- 0.5);
-#endif
gtk_widget_set_size_request(GTK_WIDGET(load_graph_get_labels(net_graph)->net_out), 100, -1);
gtk_widget_set_hexpand (load_graph_get_labels(net_graph)->net_out, TRUE);
gtk_grid_attach (GTK_GRID (grid), load_graph_get_labels(net_graph)->net_out, 2, 0, 1, 1);
label = gtk_label_new (_("Total Sent"));
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-#endif
gtk_grid_attach (GTK_GRID (grid), label, 1, 1, 1, 1);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (load_graph_get_labels(net_graph)->net_out_total), 1.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (load_graph_get_labels(net_graph)->net_out_total),
- 1.0,
- 0.5);
-#endif
gtk_grid_attach (GTK_GRID (grid),
load_graph_get_labels(net_graph)->net_out_total,
2, 1, 1, 1);
diff --git a/src/procdialogs.cpp b/src/procdialogs.cpp
index 3495ea7..f980ed2 100644
--- a/src/procdialogs.cpp
+++ b/src/procdialogs.cpp
@@ -413,11 +413,7 @@ create_field_page(GtkWidget *tree, const gchar *child_schema, const gchar *text)
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
label = gtk_label_new_with_mnemonic (text);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-#endif
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, TRUE, 0);
scrolled = gtk_scrolled_window_new (NULL, NULL);
@@ -564,11 +560,7 @@ procdialog_create_preferences_dialog (ProcData *procdata)
tmp = g_strdup_printf ("<b>%s</b>", _("Behavior"));
label = gtk_label_new (NULL);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-#endif
gtk_label_set_markup (GTK_LABEL (label), tmp);
g_free (tmp);
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
@@ -586,11 +578,7 @@ procdialog_create_preferences_dialog (ProcData *procdata)
gtk_box_pack_start (GTK_BOX (vbox2), hbox2, FALSE, FALSE, 0);
label = gtk_label_new_with_mnemonic (_("_Update interval in seconds:"));
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-#endif
gtk_box_pack_start (GTK_BOX (hbox2), label, FALSE, FALSE, 0);
hbox3 = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
@@ -660,11 +648,7 @@ procdialog_create_preferences_dialog (ProcData *procdata)
tmp = g_strdup_printf ("<b>%s</b>", _("Information Fields"));
label = gtk_label_new (NULL);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-#endif
gtk_label_set_markup (GTK_LABEL (label), tmp);
g_free (tmp);
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
@@ -689,11 +673,7 @@ procdialog_create_preferences_dialog (ProcData *procdata)
tmp = g_strdup_printf ("<b>%s</b>", _("Graphs"));
label = gtk_label_new (NULL);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-#endif
gtk_label_set_markup (GTK_LABEL (label), tmp);
g_free (tmp);
gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, FALSE, 0);
@@ -711,11 +691,7 @@ procdialog_create_preferences_dialog (ProcData *procdata)
gtk_box_pack_start (GTK_BOX (vbox2), hbox2, FALSE, FALSE, 0);
label = gtk_label_new_with_mnemonic (_("_Update interval in seconds:"));
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-#endif
gtk_box_pack_start (GTK_BOX (hbox2), label, FALSE, FALSE, 0);
gtk_size_group_add_widget (size, label);
@@ -759,11 +735,7 @@ procdialog_create_preferences_dialog (ProcData *procdata)
tmp = g_strdup_printf ("<b>%s</b>", _("File Systems"));
label = gtk_label_new (NULL);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-#endif
gtk_label_set_markup (GTK_LABEL (label), tmp);
g_free (tmp);
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
@@ -781,11 +753,7 @@ procdialog_create_preferences_dialog (ProcData *procdata)
gtk_box_pack_start (GTK_BOX (vbox2), hbox2, FALSE, FALSE, 0);
label = gtk_label_new_with_mnemonic (_("_Update interval in seconds:"));
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-#endif
gtk_box_pack_start (GTK_BOX (hbox2), label, FALSE, FALSE, 0);
hbox3 = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
@@ -820,11 +788,7 @@ procdialog_create_preferences_dialog (ProcData *procdata)
tmp = g_strdup_printf ("<b>%s</b>", _("Information Fields"));
label = gtk_label_new (NULL);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-#endif
gtk_label_set_markup (GTK_LABEL (label), tmp);
g_free (tmp);
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
diff --git a/src/sysinfo.cpp b/src/sysinfo.cpp
index 4392fa4..bc2f37a 100644
--- a/src/sysinfo.cpp
+++ b/src/sysinfo.cpp
@@ -709,11 +709,7 @@ add_row(GtkGrid * table, const char * label, const char * value, int row)
gtk_label_set_markup(GTK_LABEL(header), label);
gtk_label_set_selectable(GTK_LABEL(header), TRUE);
gtk_widget_set_can_focus(header, FALSE);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (header), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (header), 0.0, 0.5);
-#endif
gtk_grid_attach(
table, header,
0, row, 1, 1);
@@ -721,11 +717,7 @@ add_row(GtkGrid * table, const char * label, const char * value, int row)
GtkWidget *label_widget = gtk_label_new(value);
gtk_label_set_selectable(GTK_LABEL(label_widget), TRUE);
gtk_widget_set_can_focus(label_widget, FALSE);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (label_widget), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (label_widget), 0.0, 0.5);
-#endif
gtk_grid_attach(
table, label_widget,
1, row, 1, 1);
@@ -805,11 +797,7 @@ procman_create_sysinfo_view(void)
distro_release_label = gtk_label_new("???");
gtk_label_set_selectable(GTK_LABEL(distro_release_label), TRUE);
gtk_widget_set_can_focus(distro_release_label, FALSE);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (distro_release_label), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (distro_release_label), 0.0, 0.5);
-#endif
gtk_grid_attach(
GTK_GRID(distro_table), distro_release_label,
0, table_count, 1, 1);
@@ -821,11 +809,7 @@ procman_create_sysinfo_view(void)
gtk_label_set_selectable(GTK_LABEL(header), TRUE);
gtk_widget_set_can_focus(header, FALSE);
g_free(markup);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (header), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (header), 0.0, 0.5);
-#endif
gtk_grid_attach(
GTK_GRID(distro_table), header,
0, table_count, 1, 1);
@@ -838,11 +822,7 @@ procman_create_sysinfo_view(void)
gtk_label_set_selectable(GTK_LABEL(header), TRUE);
gtk_widget_set_can_focus(header, FALSE);
g_free(markup);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (header), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (header), 0.0, 0.5);
-#endif
gtk_grid_attach(
GTK_GRID(distro_table), header,
0, table_count, 1, 1);
diff --git a/src/util.cpp b/src/util.cpp
index 857e26d..174654f 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -125,11 +125,7 @@ procman_make_label_for_mmaps_or_ofiles(const char *format,
name = mnemonic_safe_process_name (process_name);
title = g_strdup_printf(format, name, pid);
label = gtk_label_new_with_mnemonic (title);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-#endif
g_free (title);
g_free (name);