Re: invalid path nma-gconf-connection



On Sat, 2010-04-10 at 12:20 +0200, Sébastien Fillaudeau wrote:
> Le 09/04/2010 02:04, Dan Williams a écrit :
> > On Thu, 2010-04-08 at 20:13 +0200, Sébastien Fillaudeau wrote:
> >    
> >> Hi,
> >>
> >> For my work, i try to modify the mn-applet to order connection by there
> >> priority.
> >>
> >> The priority for the nma-gconf-connection can be get by the path of this
> >> connection.
> >>      
> > What behavior are you trying to get here with the priorities?  NM
> > doesn't use priorities for a specific reason, usually because they're a
> > pretty bad way to interact with users.  It's not often that you have
> > more than one visible wifi network in the same area that you switch
> > between frequently; that would usually indicate bad network planning :)
> > There may be other ways we can adjust the behavior.
> >
> > But I don't think your patch is the right way to do this.  You don't
> > really want to be modifying nm-connection.c or really libnm-util at all,
> > and you don't need to.
> >
> > Just abuse the 'timestamp' option to be your priority, which NM will
> > already use to sort the connections.  Disable the code in nm-applet that
> > updates the timestamp periodically, and then add some bits in
> > nm-connection-editor that change the timestamp based on what the user
> > wants the priority to be.
> >
> > Dan
> >
> >    
> >> I have a probleme when i tried to get te connection path. It seems to
> >> have illegal caracter at the beginning of the path.
> >>
> >> Maybe, any modification of char in gchar could cause it?
> >>
> >> The get_path function give a char *.
> >>
> >> If you know something about comparable error can you help me.
> >>
> >> I search a lot about this errors and i don't found any help.
> >>
> >> I attach the patch of my modification, maybe you could help me better if
> >> you see the code i generated.
> >>
> >>
> >> Thank for any help
> >>
> >> Sebastien
> >> _______________________________________________
> >> networkmanager-list mailing list
> >> networkmanager-list gnome org
> >> http://mail.gnome.org/mailman/listinfo/networkmanager-list
> >>      
> >
> >
> >
> >    
> I can take my situation to make an example. For my internet connection 
> my FAI is free.
> They propose to share your internet connection by a specific wifi network.
>   And if you share you can connect to other one wich share.
> In my home i don't want to connect to this second limited connection. 
> But in my appartement for my study, i connect to it.
>   So if we can set priority in applet it could be useful for case like 
> this, don't you think?
> 
> For you NetworkManager should'nt explicitly modify the priority?
> 
> about the code : nm-connection is the representation of system connection?
>   so it is on this class i need to interacte with it ?

NMConnection is the representation of all connections, both system and
user.  But you shouldn't need to modify it if you're using the timestamp
for the priority.

> timestamp is a good example but it is not a element that user by using 
> applet can modify

No, but my suggestion was to make it modifiable by the user.  NM just
uses the highest value there to pick the first network to try, so
timestamp is really a good mapping of what you're trying to do.

Dan




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