From 79d72534646ca5f730d0d54dfb97e7f2e1ee8f7cf5db624c230f989f756d230b Mon Sep 17 00:00:00 2001 From: Alexei Sorokin Date: Sat, 29 Feb 2020 11:56:51 +0000 Subject: [PATCH 1/3] - Update to version 1.24.0. OBS-URL: https://build.opensuse.org/package/show/X11:MATE:Factory/mate-system-monitor?expand=0&rev=39 --- mate-system-monitor-1.22.1.tar.xz | 3 --- mate-system-monitor-1.24.0.tar.xz | 3 +++ mate-system-monitor-gtk-3.20.patch | 43 ------------------------------ mate-system-monitor.changes | 33 +++++++++++++++++++++++ mate-system-monitor.spec | 29 ++++++-------------- 5 files changed, 44 insertions(+), 67 deletions(-) delete mode 100644 mate-system-monitor-1.22.1.tar.xz create mode 100644 mate-system-monitor-1.24.0.tar.xz delete mode 100644 mate-system-monitor-gtk-3.20.patch diff --git a/mate-system-monitor-1.22.1.tar.xz b/mate-system-monitor-1.22.1.tar.xz deleted file mode 100644 index 29a8b46..0000000 --- a/mate-system-monitor-1.22.1.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:75b1dd52b1146568a59f187e08639144c5a3835d39510321dbf134ab0bd4017a -size 2202544 diff --git a/mate-system-monitor-1.24.0.tar.xz b/mate-system-monitor-1.24.0.tar.xz new file mode 100644 index 0000000..0e4c3c3 --- /dev/null +++ b/mate-system-monitor-1.24.0.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c59bde9b43ea49ee05738307314f26375c8801f6844e417dd6d011ab333563b1 +size 2437396 diff --git a/mate-system-monitor-gtk-3.20.patch b/mate-system-monitor-gtk-3.20.patch deleted file mode 100644 index 73dd150..0000000 --- a/mate-system-monitor-gtk-3.20.patch +++ /dev/null @@ -1,43 +0,0 @@ ---- a/configure.ac -+++ b/configure.ac -@@ -28,11 +28,11 @@ LT_PREREQ([2.2]) - LT_INIT - - # Package dependencies --GLIB_REQUIRED=2.50.0 -+GLIB_REQUIRED=2.48.0 - LIBGTOP_REQUIRED=2.23.1 - GIOMM_REQUIRED=2.26.0 - GLIBMM_REQUIRED=2.22 --GTK_REQUIRED=3.22.0 -+GTK_REQUIRED=3.20.0 - GTKMM_REQUIRED=3.8.1 - LIBWNCK_REQUIRED=3.0.0 - LIBXML_REQUIRED=2.0 ---- a/src/interface.cpp -+++ b/src/interface.cpp -@@ -758,7 +758,24 @@ create_main_window (ProcData *procdata) - void - do_popup_menu (ProcData *procdata, GdkEventButton *event) - { -+#if GTK_CHECK_VERSION (3, 22, 0) - gtk_menu_popup_at_pointer (GTK_MENU (procdata->popup_menu), NULL); -+#else -+ guint button; -+ guint32 event_time; -+ -+ if (event != NULL) { -+ button = event->button; -+ event_time = event->time; -+ } else { -+ button = 0; -+ event_time = GDK_CURRENT_TIME; -+ } -+ -+ gtk_menu_popup (GTK_MENU (procdata->popup_menu), -+ NULL, NULL, NULL, NULL, -+ button, event_time); -+#endif - } - - void diff --git a/mate-system-monitor.changes b/mate-system-monitor.changes index 690c217..7a5472e 100644 --- a/mate-system-monitor.changes +++ b/mate-system-monitor.changes @@ -1,3 +1,36 @@ +------------------------------------------------------------------- +Wed Feb 26 19:38:40 UTC 2020 - Alexei Sorokin + +- Update to version 1.24.0 (changes since 1.22.1): + * Network History: Fix labels. + * Show GPU info on the System tab. + * Use g_format_size or g_format_size_full. + * Update some instructions after review. + * Update help with more information and some corrections. + * gsm_color_button: Avoid redundant redeclarations. + * Add translator notes for desktop file. + * Migrate from intltool to gettext. + * Use MATE_DEBUG_CHECK for setting compiler debug flags. + * Use MATE_COMPILE_WARNINGS and MATE_CXX_WARNINGS macros. + * Require GLib >= 2.56.0. + * Render icons as cairo surfaces for HiDPI support. + * Change url project's website. + * proctable: cppcheck: Local variable "column" shadows outer + variable. + * Add drive I/O info on usage and prefs section. + * Make SysInfo::get_os_type a static function. + * msm_execute_helper: Fix memory leak. + * sysinfo: Condition "markup" is always false. + * procman: Use G_VARIANT_TYPE ("ai") instead of + G_VARIANT_TYPE_ARRAY. + * smooth_refresh: Assigned value is garbage or undefined. + * Add drive IO on process info. + * filter-out conflictive c-format comments. + * Fix "msgstr" is not a valid C format string, unlike "msgid". + * Update translations. +- Drop support for old openSUSE versions. +- Remove mate-system-monitor-gtk-3.20.patch. + ------------------------------------------------------------------- Sun May 12 18:13:56 UTC 2019 - Alexei Sorokin diff --git a/mate-system-monitor.spec b/mate-system-monitor.spec index c83cf91..a6a4f3b 100644 --- a/mate-system-monitor.spec +++ b/mate-system-monitor.spec @@ -1,7 +1,7 @@ # # spec file for package mate-system-monitor # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,31 +16,28 @@ # -%define _version 1.22 +%define _version 1.24 Name: mate-system-monitor -Version: 1.22.1 +Version: 1.24.0 Release: 0 Summary: MATE Desktop system monitor License: GPL-2.0-or-later -Group: System/GUI/Other URL: https://mate-desktop.org/ Source: https://pub.mate-desktop.org/releases/%{_version}/%{name}-%{version}.tar.xz # PATCH-FIX-OPENSUSE mate-system-monitor-xdgsu.patch sor.alexei@meowr.ru -- Use xdg-su instead of gksu. Patch0: mate-system-monitor-xdgsu.patch -# PATCH-FEATURE-OPENSUSE mate-system-monitor-gtk-3.20.patch -- Restore GLib 2.48 and GTK+ 3.20 support. -Patch1: mate-system-monitor-gtk-3.20.patch BuildRequires: fdupes BuildRequires: gcc-c++ BuildRequires: mate-common >= %{_version} BuildRequires: pkgconfig -BuildRequires: polkit +BuildRequires: polkit-devel BuildRequires: update-desktop-files BuildRequires: yelp-tools BuildRequires: pkgconfig(dbus-glib-1) BuildRequires: pkgconfig(dconf) -BuildRequires: pkgconfig(glib-2.0) >= 2.48 -BuildRequires: pkgconfig(gtk+-3.0) >= 3.20 -BuildRequires: pkgconfig(gtkmm-3.0) >= 3.20 +BuildRequires: pkgconfig(glib-2.0) +BuildRequires: pkgconfig(gtk+-3.0) +BuildRequires: pkgconfig(gtkmm-3.0) BuildRequires: pkgconfig(libgtop-2.0) BuildRequires: pkgconfig(librsvg-2.0) BuildRequires: pkgconfig(libsystemd) @@ -68,7 +65,7 @@ NOCONFIGURE=1 mate-autogen --disable-scrollkeeper \ --libexecdir=%{_libexecdir}/%{name} \ --enable-systemd -make %{?_smp_mflags} V=1 +%make_build %install %make_install @@ -76,16 +73,6 @@ make %{?_smp_mflags} V=1 %suse_update_desktop_file %{buildroot}%{_datadir}/applications/%{name}.desktop %fdupes %{buildroot}%{_datadir}/ -%if 0%{?suse_version} < 1500 -%post -%desktop_database_post -%glib2_gsettings_schema_post - -%postun -%desktop_database_postun -%glib2_gsettings_schema_postun -%endif - %files %license COPYING %doc AUTHORS NEWS From 74ee3ac123137f916d1cda7589f60c44a22e3064138e7c9d0d3e3ae684b03e4f Mon Sep 17 00:00:00 2001 From: Alexei Sorokin Date: Sat, 29 Feb 2020 13:39:36 +0000 Subject: [PATCH 2/3] OBS-URL: https://build.opensuse.org/package/show/X11:MATE:Factory/mate-system-monitor?expand=0&rev=40 --- mate-system-monitor-glib-2.54.patch | 126 ++++++++++++++++++++++++++++ mate-system-monitor.changes | 2 + mate-system-monitor.spec | 4 +- 3 files changed, 131 insertions(+), 1 deletion(-) create mode 100644 mate-system-monitor-glib-2.54.patch diff --git a/mate-system-monitor-glib-2.54.patch b/mate-system-monitor-glib-2.54.patch new file mode 100644 index 0000000..16d1cb3 --- /dev/null +++ b/mate-system-monitor-glib-2.54.patch @@ -0,0 +1,126 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -29,7 +29,7 @@ LT_PREREQ([2.2]) + LT_INIT + + # Package dependencies +-GLIB_REQUIRED=2.56.0 ++GLIB_REQUIRED=2.54.0 + LIBGTOP_REQUIRED=2.37.2 + GIOMM_REQUIRED=2.26.0 + GLIBMM_REQUIRED=2.22 +--- a/src/load-graph.cpp ++++ b/src/load-graph.cpp +@@ -136,7 +136,11 @@ static void draw_background(LoadGraph *g + if (graph->type == LOAD_GRAPH_NET) { + // operation orders matters so it's 0 if i == num_bars + guint64 rate = graph->net.max - (i * graph->net.max / num_bars); ++#if GLIB_CHECK_VERSION(2, 58, 0) + caption = g_format_size_full (network_in_bits ? rate*8 : rate, network_in_bits ? G_FORMAT_SIZE_BITS : G_FORMAT_SIZE_DEFAULT); ++#else ++ caption = g_format_size (rate); ++#endif + pango_layout_set_text (layout, caption, -1); + pango_layout_get_extents (layout, NULL, &extents); + cairo_move_to (cr, graph->indent - 1.0 * extents.width / PANGO_SCALE + 20, y - 1.0 * extents.height / PANGO_SCALE / 2); +@@ -588,18 +592,34 @@ get_net (LoadGraph *graph) + bool network_in_bits = ProcData::get_instance()->config.network_in_bits; + g_autofree gchar *str=NULL, *formatted_str=NULL; + ++#if GLIB_CHECK_VERSION(2, 58, 0) + str = g_format_size_full (network_in_bits ? din*8 : din, network_in_bits ? G_FORMAT_SIZE_BITS : G_FORMAT_SIZE_DEFAULT); ++#else ++ str = g_format_size (din); ++#endif + formatted_str = g_strdup_printf(_("%s/s"), str); + gtk_label_set_text (GTK_LABEL (graph->labels.net_in), formatted_str); + ++#if GLIB_CHECK_VERSION(2, 58, 0) + str = g_format_size_full (network_in_bits ? in*8 : in, network_in_bits ? G_FORMAT_SIZE_BITS : G_FORMAT_SIZE_DEFAULT); ++#else ++ str = g_format_size (in); ++#endif + gtk_label_set_text (GTK_LABEL (graph->labels.net_in_total), str); + ++#if GLIB_CHECK_VERSION(2, 58, 0) + str = g_format_size_full (network_in_bits ? dout*8 : dout, network_in_bits ? G_FORMAT_SIZE_BITS : G_FORMAT_SIZE_DEFAULT); ++#else ++ str = g_format_size (dout); ++#endif + formatted_str = g_strdup_printf(_("%s/s"), str); + gtk_label_set_text (GTK_LABEL (graph->labels.net_out), formatted_str); + ++#if GLIB_CHECK_VERSION(2, 58, 0) + str = g_format_size_full (network_in_bits ? out*8 : out, network_in_bits ? G_FORMAT_SIZE_BITS : G_FORMAT_SIZE_DEFAULT); ++#else ++ str = g_format_size (out); ++#endif + gtk_label_set_text (GTK_LABEL (graph->labels.net_out_total), str); + } + +--- a/src/procdialogs.cpp ++++ b/src/procdialogs.cpp +@@ -283,6 +283,7 @@ solaris_mode_toggled(GtkToggleButton *bu + } + + ++#if GLIB_CHECK_VERSION(2, 58, 0) + static void + network_in_bits_toggled(GtkToggleButton *button, gpointer data) + { +@@ -292,6 +293,7 @@ network_in_bits_toggled(GtkToggleButton + toggled = gtk_toggle_button_get_active(button); + g_settings_set_boolean(settings, procman::settings::network_in_bits.c_str(), toggled); + } ++#endif + + + +@@ -709,6 +711,7 @@ procdialog_create_preferences_dialog (Pr + gtk_label_set_mnemonic_widget (GTK_LABEL (label), spin_button); + + ++#if GLIB_CHECK_VERSION(2, 58, 0) + GtkWidget *bits_button; + bits_button = gtk_check_button_new_with_mnemonic(_("Show network speed in bits")); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(bits_button), +@@ -718,6 +721,7 @@ procdialog_create_preferences_dialog (Pr + g_signal_connect(G_OBJECT(bits_button), "toggled", + G_CALLBACK(network_in_bits_toggled), procdata); + gtk_box_pack_start(GTK_BOX(vbox2), bits_button, TRUE, TRUE, 0); ++#endif + + + +--- a/src/procman.cpp ++++ b/src/procman.cpp +@@ -106,6 +106,7 @@ solaris_mode_changed_cb(GSettings *setti + } + + ++#if GLIB_CHECK_VERSION(2, 58, 0) + static void + network_in_bits_changed_cb(GSettings *settings, const gchar *key, gpointer data) + { +@@ -114,6 +115,7 @@ network_in_bits_changed_cb(GSettings *se + procdata->config.network_in_bits = g_settings_get_boolean(settings, key); + procdata->net_graph->clear_background(); + } ++#endif + + + +@@ -263,9 +265,13 @@ procman_data_new (GSettings *settings) + std::string detail_string("changed::" + procman::settings::solaris_mode); + g_signal_connect(G_OBJECT(settings), detail_string.c_str(), G_CALLBACK(solaris_mode_changed_cb), pd); + ++#if GLIB_CHECK_VERSION(2, 58, 0) + pd->config.network_in_bits = g_settings_get_boolean(settings, procman::settings::network_in_bits.c_str()); + detail_string = "changed::" + procman::settings::network_in_bits; + g_signal_connect(G_OBJECT(settings), detail_string.c_str(), G_CALLBACK(network_in_bits_changed_cb), pd); ++#else ++ pd->config.network_in_bits = FALSE; ++#endif + + pd->config.show_kill_warning = g_settings_get_boolean (settings, "kill-dialog"); + g_signal_connect (G_OBJECT(settings), "changed::kill-dialog", G_CALLBACK(warning_changed_cb), pd); diff --git a/mate-system-monitor.changes b/mate-system-monitor.changes index 7a5472e..2abcd29 100644 --- a/mate-system-monitor.changes +++ b/mate-system-monitor.changes @@ -30,6 +30,8 @@ Wed Feb 26 19:38:40 UTC 2020 - Alexei Sorokin * Update translations. - Drop support for old openSUSE versions. - Remove mate-system-monitor-gtk-3.20.patch. +- Add mate-system-monitor-glib-2.54.patch: Restore GLib 2.54 + support. ------------------------------------------------------------------- Sun May 12 18:13:56 UTC 2019 - Alexei Sorokin diff --git a/mate-system-monitor.spec b/mate-system-monitor.spec index a6a4f3b..2f88468 100644 --- a/mate-system-monitor.spec +++ b/mate-system-monitor.spec @@ -25,7 +25,9 @@ License: GPL-2.0-or-later URL: https://mate-desktop.org/ Source: https://pub.mate-desktop.org/releases/%{_version}/%{name}-%{version}.tar.xz # PATCH-FIX-OPENSUSE mate-system-monitor-xdgsu.patch sor.alexei@meowr.ru -- Use xdg-su instead of gksu. -Patch0: mate-system-monitor-xdgsu.patch +Patch0: %{name}-xdgsu.patch +# PATCH-FEATURE-OPENSUSE mate-system-monitor-glib-2.54.patch -- Restore GLib 2.54 support. +Patch1: %{name}-glib-2.54.patch BuildRequires: fdupes BuildRequires: gcc-c++ BuildRequires: mate-common >= %{_version} From fed9c4c4a3a92e6165140b50a0653876bc985710af46da9a5cdac2967311c5bf Mon Sep 17 00:00:00 2001 From: Alexei Sorokin Date: Sat, 29 Feb 2020 13:40:57 +0000 Subject: [PATCH 3/3] OBS-URL: https://build.opensuse.org/package/show/X11:MATE:Factory/mate-system-monitor?expand=0&rev=41 --- mate-system-monitor-glib-2.54.patch | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/mate-system-monitor-glib-2.54.patch b/mate-system-monitor-glib-2.54.patch index 16d1cb3..45a3b2c 100644 --- a/mate-system-monitor-glib-2.54.patch +++ b/mate-system-monitor-glib-2.54.patch @@ -15,7 +15,7 @@ if (graph->type == LOAD_GRAPH_NET) { // operation orders matters so it's 0 if i == num_bars guint64 rate = graph->net.max - (i * graph->net.max / num_bars); -+#if GLIB_CHECK_VERSION(2, 58, 0) ++#if GLIB_CHECK_VERSION(2, 56, 0) caption = g_format_size_full (network_in_bits ? rate*8 : rate, network_in_bits ? G_FORMAT_SIZE_BITS : G_FORMAT_SIZE_DEFAULT); +#else + caption = g_format_size (rate); @@ -27,7 +27,7 @@ bool network_in_bits = ProcData::get_instance()->config.network_in_bits; g_autofree gchar *str=NULL, *formatted_str=NULL; -+#if GLIB_CHECK_VERSION(2, 58, 0) ++#if GLIB_CHECK_VERSION(2, 56, 0) str = g_format_size_full (network_in_bits ? din*8 : din, network_in_bits ? G_FORMAT_SIZE_BITS : G_FORMAT_SIZE_DEFAULT); +#else + str = g_format_size (din); @@ -35,14 +35,14 @@ formatted_str = g_strdup_printf(_("%s/s"), str); gtk_label_set_text (GTK_LABEL (graph->labels.net_in), formatted_str); -+#if GLIB_CHECK_VERSION(2, 58, 0) ++#if GLIB_CHECK_VERSION(2, 56, 0) str = g_format_size_full (network_in_bits ? in*8 : in, network_in_bits ? G_FORMAT_SIZE_BITS : G_FORMAT_SIZE_DEFAULT); +#else + str = g_format_size (in); +#endif gtk_label_set_text (GTK_LABEL (graph->labels.net_in_total), str); -+#if GLIB_CHECK_VERSION(2, 58, 0) ++#if GLIB_CHECK_VERSION(2, 56, 0) str = g_format_size_full (network_in_bits ? dout*8 : dout, network_in_bits ? G_FORMAT_SIZE_BITS : G_FORMAT_SIZE_DEFAULT); +#else + str = g_format_size (dout); @@ -50,7 +50,7 @@ formatted_str = g_strdup_printf(_("%s/s"), str); gtk_label_set_text (GTK_LABEL (graph->labels.net_out), formatted_str); -+#if GLIB_CHECK_VERSION(2, 58, 0) ++#if GLIB_CHECK_VERSION(2, 56, 0) str = g_format_size_full (network_in_bits ? out*8 : out, network_in_bits ? G_FORMAT_SIZE_BITS : G_FORMAT_SIZE_DEFAULT); +#else + str = g_format_size (out); @@ -64,7 +64,7 @@ } -+#if GLIB_CHECK_VERSION(2, 58, 0) ++#if GLIB_CHECK_VERSION(2, 56, 0) static void network_in_bits_toggled(GtkToggleButton *button, gpointer data) { @@ -80,7 +80,7 @@ gtk_label_set_mnemonic_widget (GTK_LABEL (label), spin_button); -+#if GLIB_CHECK_VERSION(2, 58, 0) ++#if GLIB_CHECK_VERSION(2, 56, 0) GtkWidget *bits_button; bits_button = gtk_check_button_new_with_mnemonic(_("Show network speed in bits")); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(bits_button), @@ -98,7 +98,7 @@ } -+#if GLIB_CHECK_VERSION(2, 58, 0) ++#if GLIB_CHECK_VERSION(2, 56, 0) static void network_in_bits_changed_cb(GSettings *settings, const gchar *key, gpointer data) { @@ -114,7 +114,7 @@ std::string detail_string("changed::" + procman::settings::solaris_mode); g_signal_connect(G_OBJECT(settings), detail_string.c_str(), G_CALLBACK(solaris_mode_changed_cb), pd); -+#if GLIB_CHECK_VERSION(2, 58, 0) ++#if GLIB_CHECK_VERSION(2, 56, 0) pd->config.network_in_bits = g_settings_get_boolean(settings, procman::settings::network_in_bits.c_str()); detail_string = "changed::" + procman::settings::network_in_bits; g_signal_connect(G_OBJECT(settings), detail_string.c_str(), G_CALLBACK(network_in_bits_changed_cb), pd);