[patch] standard_session_servicedirs (was Re: OLPC and .service files in a users home directory)

John (J5) Palmieri johnp at redhat.com
Thu Nov 2 08:58:30 PST 2006


On Thu, 2006-11-02 at 13:53 +0100, uwesmail2005-lkml at yahoo.de wrote:
> > @@ -161,6 +162,8 @@ element_type_to_name (ElementType type)
> >        return "fork";
> >      case ELEMENT_PIDFILE:
> >        return "pidfile";
> > +    case ELEMENT_STANDARD_SESSION_SERVICEDIRS:
> > +      return "standard_session_servicedirs";
> >      case ELEMENT_SERVICEDIR:
> >        return "servicedir";
> >      case ELEMENT_INCLUDEDIR:
> > @@ -800,6 +803,19 @@ start_busconfig_child (BusConfigParser  
> >  
> >        return TRUE;
> >      }
> > +  else if (strcmp (element_name, "standard_session_servicedirs") ==
> > 0)
> Why not use element_type_to_name(ELEMENT_STANDARD_SESSION_SERVICEDIRS)
> here? It would make maintaining (renaming the XML-Element) easier.

Next time please cut the code so I don't have to wade the whole diff to
find your one comment.  To answer your question, that is how the rest of
the code is written right now so I just followed that style.  Please
feel free to write a patch.  Of course having to look up the name every
time could slow things down but I doubt we will ever end up having
thousands of elements.  In any case I'm not sure it is worth the effort
at this point.

-- 
John (J5) Palmieri <johnp at redhat.com>



More information about the dbus mailing list