diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/interface.cpp | 56 | ||||
-rw-r--r-- | src/procdialogs.cpp | 36 | ||||
-rw-r--r-- | src/sysinfo.cpp | 25 | ||||
-rw-r--r-- | src/util.cpp | 4 |
4 files changed, 0 insertions, 121 deletions
diff --git a/src/interface.cpp b/src/interface.cpp index fd18ba1..e73c313 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, 14, 0) gtk_widget_set_halign (label, GTK_ALIGN_START); -#else - gtk_misc_set_alignment (GTK_MISC (label), 0.0f, 0.5f); -#endif gtk_label_set_use_markup (GTK_LABEL (label), TRUE); return label; @@ -350,11 +346,7 @@ create_sys_view (ProcData *procdata) g_free (label_text); cpu_label = gtk_label_new (NULL); -#if GTK_CHECK_VERSION (3, 14, 0) gtk_widget_set_halign (cpu_label, GTK_ALIGN_START); -#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; @@ -410,11 +402,7 @@ create_sys_view (ProcData *procdata) label = gtk_label_new (label_text); g_free(label_text); -#if GTK_CHECK_VERSION (3, 14, 0) gtk_widget_set_halign (label, GTK_ALIGN_START); -#else - gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); -#endif gtk_table_attach (GTK_TABLE (table), label, 1, 7, 0, 1, GTK_FILL, GTK_FILL, 0, 0); gtk_table_attach (GTK_TABLE (table), @@ -445,11 +433,7 @@ create_sys_view (ProcData *procdata) label = gtk_label_new (label_text); g_free(label_text); -#if GTK_CHECK_VERSION (3, 14, 0) gtk_widget_set_halign (label, GTK_ALIGN_START); -#else - gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); -#endif gtk_table_attach (GTK_TABLE (table), label, 1, 7, 0, 1, GTK_FILL, GTK_FILL, 0, 0); gtk_table_attach (GTK_TABLE (table), @@ -515,42 +499,22 @@ create_sys_view (ProcData *procdata) label = gtk_label_new (label_text); g_free(label_text); -#if GTK_CHECK_VERSION (3, 14, 0) gtk_widget_set_halign (label, GTK_ALIGN_START); -#else - gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); -#endif gtk_table_attach (GTK_TABLE (table), label, 1, 2, 0, 1, GTK_FILL, GTK_FILL, 0, 0); -#if GTK_CHECK_VERSION (3, 14, 0) gtk_widget_set_halign (load_graph_get_labels(net_graph)->net_in, GTK_ALIGN_END); gtk_widget_set_valign (load_graph_get_labels(net_graph)->net_in, GTK_ALIGN_CENTER); -#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_table_attach (GTK_TABLE (table), load_graph_get_labels(net_graph)->net_in, 2, 3, 0, 1, static_cast<GtkAttachOptions>(GTK_EXPAND | GTK_FILL), GTK_FILL, 0, 0); label = gtk_label_new (_("Total Received")); -#if GTK_CHECK_VERSION (3, 14, 0) gtk_widget_set_halign (label, GTK_ALIGN_START); -#else - gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); -#endif gtk_table_attach (GTK_TABLE (table), label, 1, 2, 1, 2, GTK_FILL, GTK_FILL, 0, 0); -#if GTK_CHECK_VERSION (3, 14, 0) gtk_widget_set_halign (load_graph_get_labels(net_graph)->net_in_total, GTK_ALIGN_END); gtk_widget_set_valign (load_graph_get_labels(net_graph)->net_in_total, GTK_ALIGN_CENTER); -#else - gtk_misc_set_alignment (GTK_MISC (load_graph_get_labels(net_graph)->net_in_total), - 1.0, - 0.5); -#endif gtk_table_attach (GTK_TABLE (table), load_graph_get_labels(net_graph)->net_in_total, 2, @@ -585,42 +549,22 @@ create_sys_view (ProcData *procdata) label = gtk_label_new (label_text); g_free(label_text); -#if GTK_CHECK_VERSION (3, 14, 0) gtk_widget_set_halign (label, GTK_ALIGN_START); -#else - gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); -#endif gtk_table_attach (GTK_TABLE (table), label, 1, 2, 0, 1, GTK_FILL, GTK_FILL, 0, 0); -#if GTK_CHECK_VERSION (3, 14, 0) gtk_widget_set_halign (load_graph_get_labels(net_graph)->net_out, GTK_ALIGN_END); gtk_widget_set_valign (load_graph_get_labels(net_graph)->net_out, GTK_ALIGN_CENTER); -#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_table_attach (GTK_TABLE (table), load_graph_get_labels(net_graph)->net_out, 2, 3, 0, 1, static_cast<GtkAttachOptions>(GTK_EXPAND | GTK_FILL), GTK_FILL, 0, 0); label = gtk_label_new (_("Total Sent")); -#if GTK_CHECK_VERSION (3, 14, 0) gtk_widget_set_halign (label, GTK_ALIGN_START); -#else - gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); -#endif gtk_table_attach (GTK_TABLE (table), label, 1, 2, 1, 2, GTK_FILL, GTK_FILL, 0, 0); -#if GTK_CHECK_VERSION (3, 14, 0) gtk_widget_set_halign (load_graph_get_labels(net_graph)->net_out_total, GTK_ALIGN_END); gtk_widget_set_valign (load_graph_get_labels(net_graph)->net_out_total, GTK_ALIGN_CENTER); -#else - gtk_misc_set_alignment (GTK_MISC (load_graph_get_labels(net_graph)->net_out_total), - 1.0, - 0.5); -#endif gtk_table_attach (GTK_TABLE (table), load_graph_get_labels(net_graph)->net_out_total, 2, diff --git a/src/procdialogs.cpp b/src/procdialogs.cpp index 66b1f6e..b7893c2 100644 --- a/src/procdialogs.cpp +++ b/src/procdialogs.cpp @@ -405,11 +405,7 @@ create_field_page(GtkWidget *tree, const char* text) vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6); label = gtk_label_new_with_mnemonic (text); -#if GTK_CHECK_VERSION (3, 14, 0) gtk_widget_set_halign (label, GTK_ALIGN_START); -#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); @@ -552,11 +548,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, 14, 0) gtk_widget_set_halign (label, GTK_ALIGN_START); -#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); @@ -574,11 +566,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, 14, 0) gtk_widget_set_halign (label, GTK_ALIGN_START); -#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); @@ -648,11 +636,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, 14, 0) gtk_widget_set_halign (label, GTK_ALIGN_START); -#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); @@ -677,11 +661,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, 14, 0) gtk_widget_set_halign (label, GTK_ALIGN_START); -#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); @@ -699,11 +679,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, 14, 0) gtk_widget_set_halign (label, GTK_ALIGN_START); -#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); @@ -747,11 +723,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, 14, 0) gtk_widget_set_halign (label, GTK_ALIGN_START); -#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); @@ -769,11 +741,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, 14, 0) gtk_widget_set_halign (label, GTK_ALIGN_START); -#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); @@ -808,11 +776,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, 14, 0) gtk_widget_set_halign (label, GTK_ALIGN_START); -#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 2c50005..6e8e122 100644 --- a/src/sysinfo.cpp +++ b/src/sysinfo.cpp @@ -708,22 +708,14 @@ add_row(GtkGrid * table, const char * label, const char * value, int row) GtkWidget *header = gtk_label_new(NULL); gtk_label_set_markup(GTK_LABEL(header), label); gtk_label_set_selectable(GTK_LABEL(header), TRUE); -#if GTK_CHECK_VERSION (3, 14, 0) gtk_widget_set_halign (header, GTK_ALIGN_START); -#else - gtk_misc_set_alignment(GTK_MISC(header), 0.0, 0.5); -#endif gtk_grid_attach( table, header, 0, row, 1, 1); GtkWidget *label_widget = gtk_label_new(value); gtk_label_set_selectable(GTK_LABEL(label_widget), TRUE); -#if GTK_CHECK_VERSION (3, 14, 0) gtk_widget_set_halign (label_widget, GTK_ALIGN_START); -#else - gtk_misc_set_alignment(GTK_MISC(label_widget), 0.0, 0.5); -#endif gtk_grid_attach( table, label_widget, 1, row, 1, 1); @@ -763,16 +755,11 @@ procman_create_sysinfo_view(void) else { logo = gtk_image_new_from_file(DATADIR "/pixmaps/mate-system-monitor/side.png"); } -#if GTK_CHECK_VERSION (3, 14, 0) gtk_widget_set_valign (logo, GTK_ALIGN_START); gtk_widget_set_margin_start (logo, 5); gtk_widget_set_margin_end (logo, 5); gtk_widget_set_margin_top (logo, 12); gtk_widget_set_margin_bottom (logo, 12); -#else - gtk_misc_set_alignment(GTK_MISC(logo), 0.5, 0.0); - gtk_misc_set_padding(GTK_MISC(logo), 5, 12); -#endif gtk_box_pack_start(GTK_BOX(hbox), logo, FALSE, FALSE, 0); g_signal_connect(G_OBJECT(logo), "draw", G_CALLBACK(sysinfo_logo_draw), NULL); @@ -807,11 +794,7 @@ procman_create_sysinfo_view(void) distro_release_label = gtk_label_new("???"); gtk_label_set_selectable(GTK_LABEL(distro_release_label), TRUE); -#if GTK_CHECK_VERSION (3, 14, 0) gtk_widget_set_halign (distro_release_label, GTK_ALIGN_START); -#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); @@ -822,11 +805,7 @@ procman_create_sysinfo_view(void) header = gtk_label_new(markup); gtk_label_set_selectable(GTK_LABEL(header), TRUE); g_free(markup); -#if GTK_CHECK_VERSION (3, 14, 0) gtk_widget_set_halign (header, GTK_ALIGN_START); -#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 +817,7 @@ procman_create_sysinfo_view(void) header = gtk_label_new(markup); gtk_label_set_selectable(GTK_LABEL(header), TRUE); g_free(markup); -#if GTK_CHECK_VERSION (3, 14, 0) gtk_widget_set_halign (header, GTK_ALIGN_START); -#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 20714bd..226dc70 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, 14, 0) gtk_widget_set_halign (label, GTK_ALIGN_START); -#else - gtk_misc_set_alignment (GTK_MISC (label), 0.0f, 0.5f); -#endif g_free (title); g_free (name); |