Re: [PATCH] enable nautilus to run as a daemon without any window created



On Tue, 2009-04-21 at 15:42 +0800, JF Ding wrote:
> 
> 
> On Tue, Apr 21, 2009 at 3:29 PM, Alexander Larsson <alexl redhat com>
> wrote:
>         
>         On Tue, 2009-04-21 at 15:21 +0800, JF Ding wrote:
>         >
>         >
>         > On Tue, Apr 21, 2009 at 3:03 PM, Alexander Larsson
>         <alexl redhat com>
>         > wrote:
>         >         On Tue, 2009-04-21 at 14:55 +0800, JF Ding wrote:
>         >         >
>         >         >
>         >         >
>         >         >         +
>         >         >
>         >
>          <key>/schemas/apps/nautilus/preferences/daemon_enable</key>
>         >         >         +
>         >         >
>         >
>          <applyto>/apps/nautilus/preferences/daemon_enable</applyto>
>         >         >
>         >         >         +#define
>         >         >         NAUTILUS_PREFERENCES_DAEMON_ENABLE
>         >         >          "preferences/daemon_enable"
>         >         >
>         >         >         A better name would be "daemon_mode"
>         >         >
>         >         >         +static gboolean allow_daemon = FALSE;
>         >         >
>         >         >         Same here, call it "daemon_mode".
>         >         >
>         >         > About the variable names, including gconf key and
>         the two
>         >         new vars,
>         >         > the name does be indicating the usage.
>         >         > In fact, in my first design, the name of gconf key
>         is
>         >         "daemon_mode",
>         >         > but I think it is not precise, because the key
>         >         > is to indicate whether nautilus can run as a
>         daemon. I
>         >         rename it to
>         >         > "daemon_enable".
>         >         > The static global "allow_daemon", the same cause.
>         >         > And the stack variable in main(), "daemon_mode" to
>         be sync
>         >         with
>         >         > command line option "--daemon", its meaning
>         >         > is whether it run in "daemon mode", which will not
>         created
>         >         desktop and
>         >         > default window.
>         >         > I hope this can be explained clearly. Of course I
>         will
>         >         rename them if
>         >         > you cannot agree with the usage of them.
>         >
>         >
>         >         Well, I disagree with all that because I think
>         having the
>         >         command line
>         >         option at all is a bad idea. We should just have a
>         gconf key.
>         >
>         > OK, I will following it. Just discard the command line
>         option. But for
>         > the meaning
>         > of "daemon_mode", I feel it should stand for "only daemon
>         without
>         > window" mode.
>         > So, should we think over the names?
>         
>         
>         Well, I'm not particularly fond of the "daemon_mode" name. I
>         tried to
>         think of a name that described what it does, like
>         "exit_with_last_window" (default TRUE), but everything I could
>         come up
>         with was too long to be sensible. Can you think of something
>         better?
>         
>          
> Em, how about "windowless_enable"?
 
Having "enable" in the name is generally unnecessary. You're looking at
a boolean configure option, what would it do other than enable
something? What we want to do is describe exactly what the option does,
without inventing to much new terminology, and "windowless" is new
terminology that is used nowhere else and isn't totally obvious.

"exit_if_no_windows" maybe?

No, I think "exit_with_last_window" is the best I've seen so far. Lets
go with that.







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