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 320384 - Issues running multiple deskbar instances
Issues running multiple deskbar instances
Status: RESOLVED FIXED
Product: deskbar-applet
Classification: Deprecated
Component: general
Git master
Other All
: High normal
: ---
Assigned To: Deskbar Applet Maintainer(s)
Deskbar Applet Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2005-11-01 11:36 UTC by Danielle Madeley
Modified: 2006-02-10 16:37 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Danielle Madeley 2005-11-01 11:36:59 UTC
Version details: Breezy

The history should be shared between all members of the factory, so that if I
happen to have a deskbar running on each monitor, I get the history from both in
each drop down.

Looking at GConf, the specific settings they do share is their layout on the
panel . THIS IS ALL BAD. You should use the libpanel-applet GConf access
functions to store these settings on a per-applet basis.
Comment 1 Raphael Slinckx 2005-11-01 13:51:46 UTC
panel_applet_get_preferences_key ()
panel_applet_add_preferences (schema_dir)

Are these two the one we should use ?
The doc on gtk.org website[1] says nothing about the above functions, what do
they do ? how should they be used ? is there any example in gnome-applets of
such usage ?

[1] http://developer.gnome.org/doc/API/2.0/panel-applet/panelapplet.html
Comment 2 Danielle Madeley 2005-11-01 14:31:04 UTC
It looks like there is a page missing from the online API documentation. In the
copy of the reference manual I have in devhelp (available if you install
Ubuntu's libpanel-applet-doc or similar) there is a page entitled "Panel Applet
GConf Utilities".

You'll be looking for function calls like panel_applet_gconf_get_* and
panel_applet_gconf_set_*. They are all in the C header panel-applet-gconf.h. I
thought they were bound in Python also.

The other thing you should do is have the entry that will be matched if you
press Enter appear selected after the cursor (like most other programs that do
autocomplete). I think you can do this with GtkEntryCompletion (I think they
call it inline completion). For example, if I type 'dev', the top match is
'devhelp'; the entry bar should display 'dev|[help]' (where | is my cursor and
the [] represents highlighted text).
Comment 3 Nigel Tao 2005-11-01 22:49:08 UTC
With per-applet gconf stuff, things might be a bit tricky if we still also want
to support windowed (-w) mode, where is no GnomeApplet to lean on.  I know that
in version 0.4, each applet could have its own width, but I'm not 100% convinced
with the way I went about it.  I'll chew on it a bit more (albeit from a library
computer, since my ISP decided to choke last Friday)...

With the inline completion thing, it may be appropriate for applications, but
maybe not so for web bookmarks or e-mail addresses, where I want to be able to
start typing from word boundaries (e.g. "gno" will find "Planet GNOME") rather
than the start of the match.  An alternative interface is tab-completion.
Comment 4 Danielle Madeley 2005-11-02 01:46:34 UTC
Each applet may be placed entirely differently, so having its own width may be
crucial.

I thought about inline completion after I wrote this. Following a discussion
with Raphael, I realised what I really wanted was a handler to match on my own
history.

You need to preserve that common history between all of the applets between
applet restarts, else it becomes a little bit pointless.

Additionally, the selected handlers don't seem to update properly between
multiple instances of the applet. Even though they are shared. This is a pain in
the neck. They also seem to be randomly changing the order that I've selected.

So, in summary:
Width information is currently shared, and shouldn't be
Selected handlers is currently shared (it should be) but doesn't properly update
between instances
History does not seem to get stored and is not properly shared between instances

It is worth noting that things which are global (besides having entries in
/apps/deskbar) can use global state variables inside the factory. This is useful
for handler registration and the like. You only need to store things which are
local into the applet object.
Comment 5 Raphael Slinckx 2005-11-04 15:53:36 UTC
Width/Expand settings are now per-applet.

Hitsory is not stored, because i didn't settle for a way to do it properly yet.
And selected handlers were not meants to update properly in a multi-appletted
setting, since i do not listen for changes, this needs to be changed.
Comment 6 Raphael Slinckx 2005-11-08 20:47:56 UTC
Part 2 is now solved too, activated handlers should be shared and correctly
updated when changed in another instance.

Remains part 3 about history to close this bug.
Comment 7 Danielle Madeley 2005-11-10 03:19:36 UTC
Testing today's CVS. The saving of the width per instance seems to act a bit
strangely. Sometimes it affects the wrong one. Not entirely sure on the set of
error conditions here.
Comment 8 Raphael Slinckx 2005-11-11 03:11:59 UTC
Right, what's happening is that the setting only affect the last opened instance
of deskbar.

I'm not sure why this happens, but i guess the global variable i use is
overwritten by the last launched instance.

I'm going to fix that.
Comment 9 Raphael Slinckx 2005-11-11 16:42:27 UTC
Ok the part 2 is really fixed now in CVS.
Comment 10 Raphael Slinckx 2005-11-11 17:33:01 UTC
About the history thing, and more generally speaking, should we use per-applet
settings for everything, or not.

I see one use case where having two deskbars would be useful: i set one deskbar
on top of my screen to search in programs and emails, another one in the bottom
panel that only uses beagle. In that case i want of course a separate history.
That casse also needs separate activated handlers.

Is there a use case for shared history+enabled handlers ?

The behavior can be changed easily now, but i don't know which is best, i prefer
the first one, unless you have a good counter-example ?
Comment 11 Nigel Tao 2005-11-11 23:03:19 UTC
I think that the use case is having two monitors, and wanting a deskbar on each.
 History & handlers shared, width separate.
Comment 12 Raphael Slinckx 2005-12-26 17:44:27 UTC
I comitted in CVS shared history and history persistance across restarts.

Can you comment on this feature ?

Should we have per-instance history instead ?
Comment 13 Danielle Madeley 2006-02-10 16:37:29 UTC
This stuff seems to be working nowadays.