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);