After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 664524 - System-monitor should build without warnings
System-monitor should build without warnings
Status: RESOLVED FIXED
Product: system-monitor
Classification: Core
Component: general
git master
Other Linux
: Normal minor
: ---
Assigned To: Robert Roth
System-monitor maintainers
: 684537 (view as bug list)
Depends on: 663736
Blocks:
 
 
Reported: 2011-11-22 01:41 UTC by Chris Kühl
Modified: 2012-11-30 11:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
First proposed patch (5.53 KB, patch)
2012-01-22 05:24 UTC, Robert Roth
needs-work Details | Review
Proposed patch (1.04 KB, patch)
2012-08-01 18:39 UTC, Robert Roth
none Details | Review
Fix automake warnings (1.20 KB, patch)
2012-09-23 15:57 UTC, Stefano Facchini
none Details | Review
Do not use deprecated API (20.76 KB, patch)
2012-09-23 21:26 UTC, Stefano Facchini
committed Details | Review

Description Chris Kühl 2011-11-22 01:41:08 UTC
There are a few warnings during compilation besides the ones caused by the deprecated gtk?box and gtktable widgets. A clean build should be the goal.
Comment 1 Robert Roth 2012-01-22 05:24:31 UTC
Created attachment 205786 [details] [review]
First proposed patch

This patch updates the deprecated rsvg_handle_unref call to g_object_unref. Also refactored util.cpp cellrenderer functions to avoid code duplication.
Comment 2 Chris Kühl 2012-01-28 01:09:34 UTC
Review of attachment 205786 [details] [review]:

This looks like it should be 2 different patches.
Comment 3 Robert Roth 2012-08-01 08:49:52 UTC
@Chris: Could you please check if with the current master you still get any warnings, as I don't anymore, so this might be a good candidate to mark as fixed.
Comment 4 Robert Roth 2012-08-01 18:39:12 UTC
Created attachment 220093 [details] [review]
Proposed patch

Found a warning on 64 bit systems only (no warning on 32 bit systems) about incorrect conversion from gint to gpointer (gpointer is 64 bits long on a 64 bit system, but 32 bit on 32 bit systems, while gint is always 32 bits, I guess.) using the GINT_TO_GPOINTER glib macro
Comment 5 Chris Kühl 2012-08-04 14:08:29 UTC
I still get a number of warning about the color picker api being deprecated. So, not qiute out of the woods yet.
Comment 6 Robert Roth 2012-08-04 19:53:02 UTC
OK, found that, color_selection dialog has been deprecated in 3.5, and I'm still at 3.4, and did not manage to install Arch linux yet to test the latest. Regardless, I have migrated the color selection dialog to color chooser, gdkcolor to gdkrgba, you can see that on my deprecations branch. 
The only problem I can see is that on System Monitor startup the colorbuttons are not correctly colored, they only appear as colored after the first color selection. I could not figure out why on startup these do not get initialized properly. @Chris: Could you please take a look when you have the time to see if you can find why this doesn't work.

[1] http://git.gnome.org/browse/gnome-system-monitor/log/?h=deprecations
Comment 7 Robert Roth 2012-09-22 21:21:49 UTC
*** Bug 684537 has been marked as a duplicate of this bug. ***
Comment 8 Stefano Facchini 2012-09-23 15:57:18 UTC
Created attachment 225026 [details] [review]
Fix automake warnings
Comment 9 Stefano Facchini 2012-09-23 16:03:57 UTC
(In reply to comment #8)
> Created an attachment (id=225026) [details] [review]
> Fix automake warnings

note 1: There are still some warnings but it seems to me they are generated by AM_GNU_GETTEXT which is still using deprecated macros

note 2: I removed the per-target macros in src/Makefile.am since we are only building one program. This fixes the "please use AM_PROG_CC_C_O" warning. Of course, if you feel it's better to keep the build system per-target, I'll add AM_PROG_CC_C_O :)
Comment 10 Stefano Facchini 2012-09-23 21:26:32 UTC
Created attachment 225039 [details] [review]
Do not use deprecated API

Namely, we make the following replacements:
  * GtkStyle -> GtkStyleContext
  * GdkColor -> GdkRGBA
  * GtkColorSelectionDialog -> GtkColorChooserDialog

https://bugzilla.gnome.org/show_bug.cgi?id=684537
Comment 11 Robert Roth 2012-10-03 15:42:23 UTC
Review of attachment 225039 [details] [review]:

Nice, works as expected, committed to master.
Comment 12 Robert Roth 2012-11-30 11:56:03 UTC
System monitor builds without warnings, so I am closing this.