diff options
author | monsta <[email protected]> | 2018-01-27 23:49:15 +0300 |
---|---|---|
committer | raveit65 <[email protected]> | 2018-01-28 17:30:45 +0100 |
commit | a5205924900148d3ce7905dbe946d6b325f2abc6 (patch) | |
tree | 9a1d1a1c235500381044b8274735d094f4bb2278 | |
parent | 06ae3f89d68c0b967e5febe7425625d114ac4308 (diff) | |
download | mate-system-monitor-a5205924900148d3ce7905dbe946d6b325f2abc6.tar.bz2 mate-system-monitor-a5205924900148d3ce7905dbe946d6b325f2abc6.tar.xz |
require GTK+ 3.22 and GLib 2.50
-rw-r--r-- | configure.ac | 8 | ||||
-rw-r--r-- | src/interface.cpp | 57 | ||||
-rw-r--r-- | src/procdialogs.cpp | 36 | ||||
-rw-r--r-- | src/sysinfo.cpp | 20 | ||||
-rw-r--r-- | src/util.cpp | 4 |
5 files changed, 3 insertions, 122 deletions
diff --git a/configure.ac b/configure.ac index 50121b6..da3be99 100644 --- a/configure.ac +++ b/configure.ac @@ -28,21 +28,17 @@ LT_PREREQ([2.2]) LT_INIT # Package dependencies -GLIB_REQUIRED=2.36.0 +GLIB_REQUIRED=2.50.0 LIBGTOP_REQUIRED=2.23.1 GIOMM_REQUIRED=2.26.0 GLIBMM_REQUIRED=2.22 -GTK_REQUIRED=3.14.0 +GTK_REQUIRED=3.22.0 GTKMM_REQUIRED=3.8.1 LIBWNCK_REQUIRED=3.0.0 LIBXML_REQUIRED=2.0 RSVG_REQUIRED=2.35 SYSTEMD_REQUIRED=44 -# GLib min required versions -AC_DEFINE([GLIB_VERSION_MIN_REQUIRED], [GLIB_VERSION_2_36], - [Warn on use of APIs deprecated before GLib 2.36]) - PKG_CHECK_MODULES(GMODULE,gmodule-2.0,[GMODULE_ADD="gmodule-2.0"],[GMODULE_ADD=""]) PKG_CHECK_MODULES(PROCMAN,$GMODULE_ADD glib-2.0 >= $GLIB_REQUIRED libgtop-2.0 >= $LIBGTOP_REQUIRED libwnck-3.0 >= $LIBWNCK_REQUIRED gtk+-3.0 >= $GTK_REQUIRED gtkmm-3.0 >= $GTKMM_REQUIRED libxml-2.0 >= $LIBXML_REQUIRED librsvg-2.0 >= $RSVG_REQUIRED glibmm-2.4 >= $GLIBMM_REQUIRED giomm-2.4 >= $GIOMM_REQUIRED) 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); |