gtk2/docs/reference/gtk/migrating-smclient-GtkApplication.xml
Matthias Clasen 27c21249b7 Add session management migration chapter
Add some preliminary information about migration from EggSMClient
to GtkApplication.
2012-01-07 21:44:52 -05:00

50 lines
1.9 KiB
XML

<?xml version="1.0"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
]>
<chapter id="gtk-migrating-smclient-GtkApplication">
<title>Migrating from EggSMClient to GtkApplication</title>
<para>
EggSMClient provides 'session management' support for applications.
This means a number of things:
<itemizedlist>
<listitem>logout notification and negotiation</listitem>
<listitem>application state saving</listitem>
<listitem>restarting of applications with saved state</listitem>
</itemizedlist>
EggSMClient supports this functionality to varying degrees on
Windows and OS X, as well as with XSMP and D-Bus based session
managers in X11.
</para>
<para>
Starting with GTK+ 3.4, #GtkApplication supports logout notification
and negotiation in the same way as EggSMClient, using the same
basic API:
</para>
<table>
<tgroup cols="2">
<title>EggSMClient to GtkApplication</title>
<thead>
<row><entry>EggSMClient</entry><entry>GtkApplication</entry></row>
</thead>
<tbody>
<row><entry>EggSMClient::quit-requested</entry><entry>#GtkApplication::quit-requested</entry></row>
<row><entry>EggSMClient::quit</entry><entry>#GtkApplication::quit</entry></row>
<row><entry>EggSMClient::quit-cancelled</entry><entry>#GtkApplication::quit-cancelled</entry></row>
<row><entry>egg_sm_client_will_quit</entry><entry>gtk_application_quit_response()</entry></row>
<row><entry>egg_sm_client_end_session</entry><entry>gtk_application_end_session()</entry></row>
</tbody>
</tgroup>
</table>
<para>
At this point, GtkApplication has no special support for state saving.
Applications can use GSettings or GKeyFile and save as much state as
they see fit in response to #GtkApplication::quit or whenever they
consider appropriate.
</para>
</chapter>