patch for xfce4-panel

edscott wilson garcia edscott at xfce.org
Fri Jan 9 23:53:31 CET 2004


On Fri, 2004-01-09 at 15:11, Danny Milosavljevic wrote:
> Hi!
> 
> Am Fre, den 09.01.2004 schrieb edscott wilson garcia um 21:36:
> > On Fri, 2004-01-09 at 14:17, Danny Milosavljevic wrote:
> > > Hi,
> > > 
> > > Am Fre, den 09.01.2004 schrieb edscott wilson garcia um 05:20:
> > > > [.... combo history & autocompletion patch...]
> > > 
> > > Some Q's ...
> > > 
> > > Is there any way to get a history line into the combo list by default
> > > (i.e. the dropdown) ? ("xfce4-mixer")
> > 
> > Yes, just use XFC_set_entry(combo_info,"xfce4-mixer"); instead of    
> > XFC_set_blank(combo_info);
> 
> Ehm, will that 
>   - just add to the list or
>   - just change the entry or
>   - both ?

Both, because the entry is the first element of the list.

> 
> Point being, previously the mixer didn't have its "internal window" in
> an external app... so users of the 4.0 mixer will not know what the
> previously internal mixer is called now.
> However, I do not want to clobber (i.e. override) the users settings by
> forcing them into the internal mixer, but I want the (previously)
> internal mixer to be in the list of possibilities, as if they called it
> before, which they probably did (the internal version). 
> 
> Scenario:
>   - user uses 4.0 (has mixer window integrated into plugin)
>   - user sets in mixer plugin prefs that he wants aumix
>   - user updates to head
>   - user wants to use (or try) (previously) "internal" mixer, goes to
> preferences, sees "hey it isnt there anymore", when in fact it is, just
> named "xfce4-mixer" and external now.
> 
> > If you do not use either, then you will get a the last element in
> > history with a combo list of the most visited items in history.
> 
> I see, well, by default, it should be the text he set in the preferences
> the last time, shouldn't it?

Yes, if you define and use a different history file from that used by
xfrun4 and xffm. Several combos in xffm use different files for their
histories.

What you have to do is:
1- check if history file exists:
yes: proceed normally
no: set the combo to "xfce4-mixer" *and* save "xfce4-aumix" to the
history file with 
XFC_save_to_history(path2dbh_file,"xfce4-aumix");

That's all.

> > > 
> > > If I am in a panel plugin, do I have to exec load_xfc / unload_xfc again
> > > ?
> > > 
> > If you are using the dialog from item_dialog.c, no. If you are using a
> > different dialog, then yes because the item_dialog patch unloads the
> > module on closing the dialog. You will also need to put in the check for
> > libdbh and link to dbh so that module loading is possible. See changes
> > in the patch for Makefile.am and configure.ac.
> 
> ok, i think a mini api from the panel for the plugins for command
> entries is required here, as this gets unneccessary complex&duplicating,
> see other mail to jasper :)

Yeah, you don't want a spaguetti of modules loading and unloading ;-)

> 
> cheers,
>    Danny
> 
> 
> _______________________________________________
> Xfce4-dev mailing list
> Xfce4-dev at xfce.org
> http://lunar-linux.org/mailman/listinfo/xfce4-dev
> 




More information about the Xfce4-dev mailing list