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 91194 - Macros should potentially be global, not per-applet
Macros should potentially be global, not per-applet
Status: RESOLVED FIXED
Product: gnome-applets
Classification: Other
Component: mini-commander
git master
Other Linux
: Normal minor
: ---
Assigned To: gnome-applets Maintainers
gnome-applets Maintainers
Depends on:
Blocks:
 
 
Reported: 2002-08-19 20:08 UTC by Havoc Pennington
Modified: 2005-05-15 05:40 UTC
See Also:
GNOME target: ---
GNOME version: 2.7/2.8


Attachments
patch (3.30 KB, patch)
2004-11-10 09:11 UTC, Mark McLoughlin
accepted-commit_now Details | Review

Description Havoc Pennington 2002-08-19 20:08:01 UTC
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=71489

The macros are pretty hard to set up, and it's unlikely you want them
different for two different command line applets
Comment 1 Dennis Smit 2004-06-06 10:40:57 UTC
Kevin, what do you think about this ?
Comment 2 Christian Neumair 2004-07-22 14:30:11 UTC
Still an issue. Can we have this revised?

regs,
 Chris
Comment 3 Mark McLoughlin 2004-08-27 09:31:34 UTC
Sounds sensible and straightforward
Comment 4 Danielle Madeley 2004-08-27 09:41:27 UTC
Mark, did you want to fix this?
Comment 5 Danielle Madeley 2004-10-30 08:42:05 UTC
I've committed this to CVS. I've added a mini-commander-global.schemas.in which
gives schemas for /apps/mini-commander/macro_{patterns,commands}.

For some reason, schema defaults are still being installed in
/apps/panel/.../prefs/macro_{patterns,commands} but I couldn't obviously see
why. It could be cache or gconf grabbing things out of my other prefix or a
mistake I've made.

Mark,
Could you perhaps check it over to see if you can see anything obvious?
Comment 6 Mark McLoughlin 2004-11-10 09:11:14 UTC
My guess is that the old schemas are still installed in
/apps/mini-commander/prefs/ and so:

  panel_applet_add_preferences (applet, 
                                "/schemas/apps/mini-commander/prefs",
                                NULL);

still installs the applyto in /apps/panel

(i.e. you wouldn't see this on a clean system)

However, we have a problem here. We really should not move around schemas like
this because it breaks compatibility. We need the schemas installed in both the
new location *and* the old location.

The issue is that a GNOME 2.8 user will have applytos in his/her configuration
referencing the schemas in /apps/mini-commander/prefs, but when they upgrade
their machine to GNOME 2.10 or use that configuration on 2.10 (say using an NFS
homedir) these schemas will no longer exist and they won't see the default macros.

Attaching an untested patch which should make sure old configurations don't break.
Comment 7 Mark McLoughlin 2004-11-10 09:11:54 UTC
Created attachment 33629 [details] [review]
patch
Comment 8 Danielle Madeley 2004-11-10 12:34:34 UTC
Comment on attachment 33629 [details] [review]
patch

Mark, did you want to commit this then?
Comment 9 Jeffrey Hutzelman 2005-05-14 03:36:37 UTC
Gee, it sure would be nice if people didn't randomly nuke useful features for
the hell of it.  I keep 4 separate instances of mini-commander in my panel, with
differently-colored backgrounds.  One works normally; the other three each have
a single macro with a pattern like ^(.*)$, mapped to commands like running a
script which obtains the right Kerberos tickets and then opens a terminal
running an ssh session to some machine to log in as root.  This is extremely
useful, but when I upgraded it stopped working thanks to this "improvement".

Please fix this so I don't have to keep running an ancient version of this
applet forever...

Comment 10 Havoc Pennington 2005-05-15 05:40:45 UTC
Removing and re-adding the applet seems a lot more common than thinking of the
thing you describe... esp. since the default macros are all of the form 
"keyword: argument" which is intended to lead people to do it that way instead
of having a separate applet for each keyword.