XfceSMClient progress

View: New views
4 Messages — Rating Filter:   Alert me  

XfceSMClient progress

by Brian J. Tarricone-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi guys,

So I decided to drop support for SmRestartAnyway and SmRestartNever for
the reasons I mentioned before (better for apps to use XDG autostart for
that).  Any objections?

I'm thinking about making things even simpler.  Any objections to the
following?

1.  Don't expose the DiscardCommand (command used to remove saved state
for that instance of the app).  We have xfce_sm_client_get_state_file(),
which automatically sets DiscardCommand to "rm -f $STATE_FILE".  If you
don't want to use _get_state_file(), you can encode state in the app's
RestartCommand (via xfce_sm_client_set_restart_command()).  Is there any
reason why the common usage case would need to set a custom DiscardCommand?

2.  Don't expose the SM client ID at all, except as a way to provide the
old/resumed client ID using xfce_sm_client_get_full().  Really, the app
doesn't need to know it's client ID, especially since it's given a way
to save its state uniquely with _get_state_file().

2a.  Get rid of xfce_sm_client_get_full(), in favor of doing things the
"easy" way: either allowing the SM client to figure stuff out via
GOptionContext, or by passing argv/argc explicitly.  Dropping this might
be bad for language bindings that don't usually use argv/argc or
something, so maybe leave this.  I might implement support for
gnome-session's DESKTOP_AUTOSTART_ID env variable to mitigate this
potential issue.  I just dislike exposing client_id in the API.

3.  Drop support for setting a custom CloneCommand.  XfceSMClient
already sets the default CloneCommand to the same thing as the guessed
RestartCommand, but without any --sm-client-id options, which is
probably good enough for most people.  In practice, no session manager
actually even *uses* CloneCommand for anything, so an app setting it
would be somewhat useless.

4.  Drop silly things like setting the Program property.  XfceSMClient
will default that to what g_get_prgname() returns, and that should be
good enough, no?

        -brian
_______________________________________________
Xfce4-dev mailing list
Xfce4-dev@...
http://foo-projects.org/mailman/listinfo/xfce4-dev

Re: XfceSMClient progress

by Mike Massonnet :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2009/9/17 Brian J. Tarricone <brian@...>:
> Hi guys,
>
> So I decided to drop support for SmRestartAnyway and SmRestartNever for
> the reasons I mentioned before (better for apps to use XDG autostart for
> that).  Any objections?

Mmh, could it be realistic to add some convention functions to install
such a desktop file? Coming to my mind is something like:

xfce_autostart_set(string name, string exec, bool hidden) to create or
modify the file name.desktop in the user's autostart directory.
xfce_autostart_set_full(string name, ...) for the ones who like to set
all info e.g. DESCRIPTION, "", EXEC, "", ICON, "", NULL.

What I currently did with autostart stuff was within clipman, I
install an autostart file system-wide that defaults to hidden=true,
and then copy it to the user's home directory and switch the hidden
key by some condition.

Cheers,
Mike
_______________________________________________
Xfce4-dev mailing list
Xfce4-dev@...
http://foo-projects.org/mailman/listinfo/xfce4-dev

Re: XfceSMClient progress

by Brian J. Tarricone-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 09/17/2009 05:57 AM, Mike Massonnet wrote:

> 2009/9/17 Brian J. Tarricone <brian@...>:
>> Hi guys,
>>
>> So I decided to drop support for SmRestartAnyway and SmRestartNever for
>> the reasons I mentioned before (better for apps to use XDG autostart for
>> that).  Any objections?
>
> Mmh, could it be realistic to add some convention functions to install
> such a desktop file? Coming to my mind is something like:
>
> xfce_autostart_set(string name, string exec, bool hidden) to create or
> modify the file name.desktop in the user's autostart directory.
> xfce_autostart_set_full(string name, ...) for the ones who like to set
> all info e.g. DESCRIPTION, "", EXEC, "", ICON, "", NULL.

Sure.  That would be more appropriate for libxfce4util, though.  Feel
free to work up a patch!

        -brian

_______________________________________________
Xfce4-dev mailing list
Xfce4-dev@...
http://foo-projects.org/mailman/listinfo/xfce4-dev

Re: XfceSMClient progress

by Mike Massonnet :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2009/9/17 Brian J. Tarricone <brian@...>:

> On 09/17/2009 05:57 AM, Mike Massonnet wrote:
>> 2009/9/17 Brian J. Tarricone <brian@...>:
>>> Hi guys,
>>>
>>> So I decided to drop support for SmRestartAnyway and SmRestartNever for
>>> the reasons I mentioned before (better for apps to use XDG autostart for
>>> that).  Any objections?
>>
>> Mmh, could it be realistic to add some convention functions to install
>> such a desktop file? Coming to my mind is something like:
>>
>> xfce_autostart_set(string name, string exec, bool hidden) to create or
>> modify the file name.desktop in the user's autostart directory.
>> xfce_autostart_set_full(string name, ...) for the ones who like to set
>> all info e.g. DESCRIPTION, "", EXEC, "", ICON, "", NULL.
>
> Sure.  That would be more appropriate for libxfce4util, though.  Feel
> free to work up a patch!

I made my proposition in bug 5789.

--
Mike
_______________________________________________
Xfce4-dev mailing list
Xfce4-dev@...
http://foo-projects.org/mailman/listinfo/xfce4-dev