Re: Sticky Notes



On Fri, Dec 27, 2002 at 05:33:18AM -0800, Loban A Rahman wrote:
> Alan said:
> > If it is almost finished and feature complete then why is the version
> > number 0.5? A shortlist or a roadmap to 1.0 or something along those 
> > lines would be very interesting.
> 
> Of the top of my head:
> 	- Finish documentation (doing that now)
> 	- Finish internationalization (more about that below)
> 	- Add a preferences dialog (but only for color and initial
> 	size, 		the
> other settings shall be gconf-editor only)
> 
> Daniel said:
> > Killing the panel with xkill the restarted one shows the applet
> > in the list of applet which can be added. Still one should not have
> > to kill it, the panel should have a way to detect the change.
> 
> I completely AGREE. Would it be too slow for the panel to check the hard
> drive and dynamically generate the applets menu each time the menu
> opens? Or does it regenerate menus every 5 minutes or so? What does the
> main menu do in this regards? (On a side note, the workaround I use is
> to just create a new panel, use it to add the applet, then move the
> applet to the old panel.)

The current behaviour is that the menus for a particular panel are only
rescanned when the panel is started, as people have noticed. Rescanning
all the time is expensive, so I don't think that will be very nice. The
idiomatic Unix-style solution would be to make SIGUSR1 or SIGHUP make
the panel rescan the menus and panel applets, but that's now a GNOME
2.3/2.4 feature request, if anything.

The other annoyance with developing panel applets is the need to install
them so that the panel finds them (GNOME 1 was nice in that you could
run them from anywhere). In a couple of months we may want to see if
that can be sensibly changed and send Mark a patch.

[...]
> Ok, I got a couple of questions now.
> 
> - How do I internationalize strings in GNOMEUIINFO_ITEM_STOCK when
> making a GnomeUInfo? I put N_() around the strings, but when does _()
> get called on them?

Does that approach not work or are you just seeking information? It
should be sufficient to do what you have done.

The gettext() call is made in libgnomeui (in
gnome-app-helper.c/create_toolbar_item() ) and the string is first
translated in the message domain of your package and, if that doesn't
contain a translation, in the domain of libgnomeui (so that standard
toolbar strings only need to be translated once in libgnomeui).

> - Is there any way to detect when an applet is closed? I just found out
> that the applet does NOT save on exit because the destroy function I had
> connected to never gets called. I guess when I choose "Remove from
> panel" the panel kills the applet outright.
> 
> - Is everyone else seeing the help okay? I can get to the help by
> clicking Gnome Help and then browsing to the applet's documentation. But
> if I choose help from the applet's own right-click menu, it gives me an
> "Unable to find the GNOME_FILE_DOMAIN_APP_HELP domain" error.

Having not downloaded the applet and read the code, I don't know what's
going on in either case here, so I'll pass.

> I was thinking a better way to do the saving is as follows: Anytime I
> create/delete/modify a sticky note, a flag is set. Any time a sticky
> note loses focus, the flag is checked, and if set, saving occurs (and
> the flag unset). So I'll connect to either focus-out or
> leave-notify-event signals. This way all modifications are saved early,
> and there is no unnecessary saving all the time. How does that sound?

That sounds like a reasonable idea to me.

Cheers,
Malcolm

-- 
Why can't you be a non-conformist like everyone else?



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]