GNOME Bugzilla – Bug 562333
[lots of patches] Use gtk_show_uri instead of gnome_help
Last modified: 2009-01-26 04:01:40 UTC
I'll be puting patches here during the morning.
Created attachment 123429 [details] [review] [PATCH] Drop gnome_help from accessx-status applet accessx-status/applet.c | 9 ++++----- 1 files changed, 4 insertions(+), 5 deletions(-)
Created attachment 123430 [details] [review] [PATCH] Drop gnome_help from battstat applet battstat/battstat-hal.c | 1 - battstat/battstat_applet.c | 15 ++++++++++----- battstat/properties.c | 4 ---- 3 files changed, 10 insertions(+), 10 deletions(-)
Created attachment 123431 [details] [review] [PATCH] Drop gnome_help from charpick applet charpick/charpick.c | 9 ++++----- charpick/properties.c | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-)
Created attachment 123432 [details] [review] [PATCH] Drop gnome_help from cpufreq applet cpufreq/src/cpufreq-applet.c | 8 ++++---- cpufreq/src/cpufreq-prefs.c | 9 +++++---- 2 files changed, 9 insertions(+), 8 deletions(-)
Created attachment 123433 [details] [review] [PATCH] Drop gnome_help from drivemount applet drivemount/drivemount.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-)
Created attachment 123434 [details] [review] [PATCH] Drop gnome_help from geyes applet geyes/geyes.c | 7 +++---- geyes/themes.c | 7 +++---- 2 files changed, 6 insertions(+), 8 deletions(-)
Created attachment 123435 [details] [review] [PATCH] Drop gnome_help from gswitchit applet Didn't test because it's FTBFS right now (not my fault!) --- gswitchit/gswitchit-applet.c | 15 ++++++++------- 1 files changed, 8 insertions(+), 7 deletions(-)
Created attachment 123436 [details] [review] [PATCH] Drop gnome_help from gweather applet gweather/gweather-applet.c | 8 +++----- gweather/gweather-pref.c | 7 +++---- 2 files changed, 6 insertions(+), 9 deletions(-)
Created attachment 123437 [details] [review] [PATCH] Drop gnome_help from mini-commander applet mini-commander/src/help.c | 8 +++----- mini-commander/src/mini-commander_applet.c | 1 - mini-commander/src/preferences.c | 25 ++++++++++--------------- 3 files changed, 13 insertions(+), 21 deletions(-)
Created attachment 123438 [details] [review] [PATCH] Drop gnome_help from mixer applet mixer/applet.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
Created attachment 123439 [details] [review] [PATCH] Drop gnome_help from modem-applet Couldn't test, FTBFS, 98% sure it works. --- modemlights/modem-applet.c | 7 ++++--- modemlights/modem-applet.h | 1 - 2 files changed, 4 insertions(+), 4 deletions(-)
Created attachment 123440 [details] [review] [PATCH] Drop gnome_help from multiload applet multiload/main.c | 11 +++++------ multiload/properties.c | 8 +++----- 2 files changed, 8 insertions(+), 11 deletions(-)
Created attachment 123441 [details] [review] [PATCH] Drop gnome_help from stickynotes applet stickynotes/stickynotes.c | 6 ++++-- stickynotes/stickynotes_applet.c | 2 -- stickynotes/stickynotes_applet_callbacks.c | 11 ++++++++--- 3 files changed, 12 insertions(+), 7 deletions(-)
Created attachment 123442 [details] [review] [PATCH] Drop gnome_help from trashapplet trashapplet/src/trash-empty.c | 2 +- trashapplet/src/trash-empty.h | 2 +- trashapplet/src/trashapplet.c | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-)
Created attachment 123443 [details] [review] [PATCH] Use gtk_show_uri to open Trash: in trashapplet trashapplet/src/trashapplet.c | 21 +++++++-------------- 1 files changed, 7 insertions(+), 14 deletions(-)
Created attachment 123444 [details] [review] [PATCH] Use gtk_show_uri in weather applet gweather/gweather-about.c | 2 -- gweather/gweather-applet.c | 2 ++ gweather/gweather-dialog.c | 6 ++++-- gweather/gweather.h | 1 - gweather/main.c | 1 - 5 files changed, 6 insertions(+), 6 deletions(-)
Created attachment 123445 [details] [review] [PATCH] Remove libgnome from trashapplet trashapplet/src/trashapplet.c | 17 ----------------- trashapplet/src/trashapplet.h | 1 - 2 files changed, 0 insertions(+), 18 deletions(-)
Created attachment 123446 [details] [review] [PATCH] Don't ask for libgnomeui in configure configure.in | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
What kills the party for us is that libpanel-applet still needs libgnomeui, so applets link to it anyway. But as soon as lp-a drops libgnomeui, this should benefit because we removed the cruft. There's still libgnome stuff in there: - event sounds in battstat (canberra anyone?) - gnome menus and client in stickynotes (is client really needed for it?) - desktop item in multiload and mixer (not sure what to use instead) battstat is easy to fix, I don't know what to do with desktop item though.
Oh btw, I have this in git (it's a bit obvious I think :p). So feel free to just tell me to commit and we'll save some days applying and committing patches :-)
(In reply to comment #19) > What kills the party for us is that libpanel-applet still needs libgnomeui, so > applets link to it anyway. But as soon as lp-a drops libgnomeui, this should > benefit because we removed the cruft. As libpanel-applet now doesn't depend on libgnomeui anymore these patches would be even better to have in ;)
Zoink!
Most of the patches are fine, but: The battstat and minicommander patches both leak the uri string if a section is used. The constant string should be strduped in the other branch of the if statement and the uri variable freed afterwards. The minicommander patch declares the uri pointer in an odd place. Put it up the top of the function so we can at least pretend to still be doing the C99 compliance stuff. Something worries me about the "remove libgnome from trash applet" patch, it may be nothing, but I don't have time to figure it out right now.
I applied your comment about the leaks, however I didn't get the one about the uri pointer in minicommander, it's in the second line of the function body... I just committed all of them except the one about libgnome in trashapplet. I confirmed it builds, but this big commits always scare me...
The comment you didn't get was just me misreading the patch. Ignore it. As for the libgnome in the trashapplet patch, its fine. It's only testing code anyway. (The existence of the main function was the thing worrying me.)
Ok committed. Thanks for the patience to review all the patches :-P. I however found out a problem in the stickynotes applet, seems like while it builds without libgnomeui as a req in configure.ac, well it still depends on it (looks like panelapplet in my system is pulling gnomeui hence it doesn't FTBFS). In this lines: stickynotes_applet.c: client = gnome_master_client (); stickynotes_applet.c: gnome_client_set_restart_style (client, GNOME_RESTART_NEVER); stickynotes_applet.c: gnome_client_connect (client); stickynotes_applet.c: gnome_client_flush (client); stickynotes.c: /* gnome_popup_menu_*() are deprecated. Rewrite to use gtk_menu_popup_*()? */ stickynotes.c: gnome_popup_menu_attach(note->w_menu, note->w_window, note); stickynotes.c: gnome_popup_menu_attach(note->w_menu, note->w_lock, note); stickynotes.c: gnome_popup_menu_attach(note->w_menu, note->w_close, note); stickynotes.c: gnome_popup_menu_attach(note->w_menu, note->w_resize_se, note); stickynotes.c: gnome_popup_menu_attach(note->w_menu, note->w_resize_sw, note); So should I revert the drop in configure.ac? I will try to hack something for the popups.
I already fixed two other problems caused by the configure.in change. I say we keep it out and fix the problems. The session management lines probably shouldn't be there at all. It's an applet, lifespan should be handled by the panel. I suspect they can be deleted with no effect.
I just committed a nice git revert of the configure change. I'm trying to remove the popup thing from sticky notes but I have strange bugs like the resize grippies trying to close the window. I'll try removing the gnome_ lines.
Created attachment 126488 [details] [review] [PATCH] Remove useless gnome_client_* use in stickynotes stickynotes/stickynotes_applet.c | 9 --------- 1 files changed, 0 insertions(+), 9 deletions(-)
Created attachment 126490 [details] [review] [PATCH] special case 2nd click stickynotes/stickynotes.c | 25 +++++++++++++++++++------ stickynotes/stickynotes_callbacks.c | 16 ++++++++++++++++ stickynotes/stickynotes_callbacks.h | 1 + 3 files changed, 36 insertions(+), 6 deletions(-)
Here are two patches, the first one removes the useless gnome_client_* use. The second one is an incomplete patch to not use gnome_popup, however it seems like it's interacting badly with other callbacks and creating really weird bugs like clicking on resize grips triggers the note delete dialog. Ideas?
The first patch is of course OK to commit. I can't see what the problem with the second one is, but I haven't looked at it very hard yet.
I've fixed and committed the final patch. Two bugs: one was the use of an = instead of an == for the button comparison. The other was that the event mask wasn't set to let through click events.
*** Bug 562520 has been marked as a duplicate of this bug. ***
Awesome, thanks! Did you remove the libgnome dep in configure.in|ac? :-).
Not yet, I will do soon once I get the time to test it.
The libgnomeui check has been removed.