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 627490 - Compile with -DGDK_DISABLE_DEPRECATED and -Werror
Compile with -DGDK_DISABLE_DEPRECATED and -Werror
Status: RESOLVED FIXED
Product: gnome-applets
Classification: Other
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-applets Maintainers
gnome-applets Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-08-20 12:20 UTC by Benjamin Otte (Company)
Modified: 2011-11-17 20:07 UTC
See Also:
GNOME target: 3.0
GNOME version: ---


Attachments
cpufreq: Link to dbus-glib (944 bytes, patch)
2010-08-20 12:20 UTC, Benjamin Otte (Company)
committed Details | Review
drivemount: Fix "variable might be used uninitialized" (928 bytes, patch)
2010-08-20 12:20 UTC, Benjamin Otte (Company)
committed Details | Review
stickynotes: Fix compile warnings (1.75 KB, patch)
2010-08-20 12:20 UTC, Benjamin Otte (Company)
committed Details | Review
trash: Remove unused function (890 bytes, patch)
2010-08-20 12:20 UTC, Benjamin Otte (Company)
committed Details | Review
multiload: Remove unused variable (703 bytes, patch)
2010-08-20 12:20 UTC, Benjamin Otte (Company)
committed Details | Review
gweather: Remove unused variables (1.38 KB, patch)
2010-08-20 12:20 UTC, Benjamin Otte (Company)
committed Details | Review
battstat: Suggest parenthesis around assignment used as truth value (1001 bytes, patch)
2010-08-20 12:20 UTC, Benjamin Otte (Company)
none Details | Review
accesx: variable should be GdkWindow, not GtkWindow (799 bytes, patch)
2010-08-20 12:20 UTC, Benjamin Otte (Company)
none Details | Review
cpufreq: Remove unused variable (885 bytes, patch)
2010-08-20 12:21 UTC, Benjamin Otte (Company)
committed Details | Review
multiload: Render with Cairo (6.32 KB, patch)
2010-08-20 12:21 UTC, Benjamin Otte (Company)
none Details | Review
accessx: Draw with Cairo (3.16 KB, patch)
2010-08-20 12:21 UTC, Benjamin Otte (Company)
none Details | Review
battstat: Draw with Cairo (11.79 KB, patch)
2010-08-20 12:21 UTC, Benjamin Otte (Company)
none Details | Review
Use gdk_window_get_width/height() instead of _get_geometry() (1.62 KB, patch)
2011-01-05 16:25 UTC, Milan Bouchet-Valat
committed Details | Review
Use g_app_info_launch() instead of gdk_spawn_on_screen() (4.10 KB, patch)
2011-01-05 16:25 UTC, Milan Bouchet-Valat
committed Details | Review
Use GDK_WINDOW_XID() instead of GDK_WINDOW_XWINDOW() (1.50 KB, patch)
2011-01-05 16:25 UTC, Milan Bouchet-Valat
committed Details | Review
Use gdk_x11_window_foreign_new_for_display() instead of gdk_window_foreign_new() (1.87 KB, patch)
2011-01-05 16:25 UTC, Milan Bouchet-Valat
committed Details | Review
Use GSource func instead of GtkFunction (949 bytes, patch)
2011-01-05 16:25 UTC, Milan Bouchet-Valat
committed Details | Review
Use gdk_x11_display_get_xdisplay() instead of gdk_x11_drawable_get_xdisplay() (928 bytes, patch)
2011-01-05 16:25 UTC, Milan Bouchet-Valat
committed Details | Review
Sync trashapplet/src/xstuff.c with gnome-panel (14.58 KB, patch)
2011-01-05 16:25 UTC, Milan Bouchet-Valat
none Details | Review

Description Benjamin Otte (Company) 2010-08-20 12:20:33 UTC
The attached series of patches fixes various issues that are required to make gnome-applets compile with -DGDK_DISABLE_DEPRECATED and -Werror. This is mostly porting rendering code to Cairo, but also includes small patches fixing gcc complaints.

My usual disclaimer: I tested the various patches, but as it's not my code, I might have missed something.
Comment 1 Benjamin Otte (Company) 2010-08-20 12:20:36 UTC
Created attachment 168390 [details] [review]
cpufreq: Link to dbus-glib
Comment 2 Benjamin Otte (Company) 2010-08-20 12:20:40 UTC
Created attachment 168391 [details] [review]
drivemount: Fix "variable might be used uninitialized"

The code used to set a broken screen in an error case.
Comment 3 Benjamin Otte (Company) 2010-08-20 12:20:43 UTC
Created attachment 168392 [details] [review]
stickynotes: Fix compile warnings
Comment 4 Benjamin Otte (Company) 2010-08-20 12:20:47 UTC
Created attachment 168393 [details] [review]
trash: Remove unused function
Comment 5 Benjamin Otte (Company) 2010-08-20 12:20:50 UTC
Created attachment 168394 [details] [review]
multiload: Remove unused variable
Comment 6 Benjamin Otte (Company) 2010-08-20 12:20:53 UTC
Created attachment 168395 [details] [review]
gweather: Remove unused variables
Comment 7 Benjamin Otte (Company) 2010-08-20 12:20:56 UTC
Created attachment 168396 [details] [review]
battstat: Suggest parenthesis around assignment used as truth value
Comment 8 Benjamin Otte (Company) 2010-08-20 12:20:59 UTC
Created attachment 168397 [details] [review]
accesx: variable should be GdkWindow, not GtkWindow
Comment 9 Benjamin Otte (Company) 2010-08-20 12:21:02 UTC
Created attachment 168398 [details] [review]
cpufreq: Remove unused variable
Comment 10 Benjamin Otte (Company) 2010-08-20 12:21:05 UTC
Created attachment 168399 [details] [review]
multiload: Render with Cairo
Comment 11 Benjamin Otte (Company) 2010-08-20 12:21:09 UTC
Created attachment 168400 [details] [review]
accessx: Draw with Cairo
Comment 12 Benjamin Otte (Company) 2010-08-20 12:21:12 UTC
Created attachment 168401 [details] [review]
battstat: Draw with Cairo
Comment 13 Carlos Garcia Campos 2010-08-25 08:07:56 UTC
(In reply to comment #1)
> Created an attachment (id=168390) [details] [review]
> cpufreq: Link to dbus-glib

Kjartan Maraas already fixed it in it master, see eb187f06a2ad4660e9e6d7f08a4332707eb4de75
Comment 14 Carlos Garcia Campos 2010-08-25 08:08:18 UTC
Review of attachment 168398 [details] [review]:

Pushed to git master, thanks!
Comment 15 André Klapper 2010-08-27 12:30:14 UTC
Each applet has a different maintainer so getting people to review this could be quite some work...
Comment 16 Christian Persch 2010-10-28 13:09:32 UTC
I rebased this patch series to master; it (and more) now lives on the "gtk3" branch in git.
Comment 17 Milan Bouchet-Valat 2011-01-05 16:25:01 UTC
Created attachment 177581 [details] [review]
Use gdk_window_get_width/height() instead of _get_geometry()

Prototype has changed in GDK 3. Anyways, no need to use the
full function when we only need width and height, it avoids
a roundtrip to the server. Also store the GdkWindow instead
of calling gtk_widget_get_window() several times.
Comment 18 Milan Bouchet-Valat 2011-01-05 16:25:05 UTC
Created attachment 177582 [details] [review]
Use g_app_info_launch() instead of gdk_spawn_on_screen()

gdk_spawn_on_screen() no longer exists in GDK 3. Using GAppInfo
is cleaner: we can directly pass GFiles instead of URIs, and not
mess with command line ourselves.
Comment 19 Milan Bouchet-Valat 2011-01-05 16:25:08 UTC
Created attachment 177583 [details] [review]
Use GDK_WINDOW_XID() instead of GDK_WINDOW_XWINDOW()

The latter no longer exists in GDK 3.
Comment 20 Milan Bouchet-Valat 2011-01-05 16:25:12 UTC
Created attachment 177584 [details] [review]
Use gdk_x11_window_foreign_new_for_display() instead of gdk_window_foreign_new()

gdk_window_foreign_new() has been removed in GDK 3. We have to use
gdk_x11_window_foreign_new_for_display() and pass the display
where we want the window. We know it's the default display because
get_desktop_window() gets the root window for the default screen.
Comment 21 Milan Bouchet-Valat 2011-01-05 16:25:16 UTC
Created attachment 177585 [details] [review]
Use GSource func instead of GtkFunction

GtkFunction no longer exists in GTK+ 3.
Comment 22 Milan Bouchet-Valat 2011-01-05 16:25:23 UTC
Created attachment 177586 [details] [review]
Use gdk_x11_display_get_xdisplay() instead of gdk_x11_drawable_get_xdisplay()

The latter has been removed in GDK 3.
Comment 23 Milan Bouchet-Valat 2011-01-05 16:25:29 UTC
Created attachment 177587 [details] [review]
Sync trashapplet/src/xstuff.c with gnome-panel

Fixes building with GTK+ 3 (drawing with Cairo, remove
GDK_WINDOW_XWINDOW...). Changes specific to gnome-applets:
  - use PanelAppletOrient instead of PanelOrientation
  - include libpanel-applet headers instead of private ones

We also gain the animation in trash applet for free!
Comment 24 Milan Bouchet-Valat 2011-01-05 16:32:36 UTC
With the patches above I'm able to build all the applets from the always_build target (charpick, drivemount, geyes, mini-commander, gdkb-new, stickynotes, trashapplet - the null applet needs a one-liner I've not posted :-).

I could not test the result, that's why I'd like a basic review before pushing to gtk3.
Comment 25 Kjartan Maraas 2011-01-08 12:52:41 UTC
I'm going to commit these to get stuff going. We can always clean stuff up afterwards is something is broken. It's not like it isn't broken now after all :-)
Comment 26 Kjartan Maraas 2011-01-08 12:55:01 UTC
Comment on attachment 168390 [details] [review]
cpufreq: Link to dbus-glib

This has been commited.
Comment 27 Kjartan Maraas 2011-01-08 12:57:16 UTC
Comment on attachment 168391 [details] [review]
drivemount: Fix "variable might be used uninitialized"

This has been commited on the gtk3 branch.
Comment 28 Kjartan Maraas 2011-01-26 19:19:05 UTC
Closing this now that these patches have landed in git.
Comment 29 Joachim Breitner 2011-11-17 19:42:43 UTC
It seems that the code in update_battery_image() in battstat_applet.c is broken; the state of the battery is not drawn on the battery image.
Comment 30 Joachim Breitner 2011-11-17 20:07:34 UTC
Ok, I found the cause, and reported the issue with a patch in bug 664301.