summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2012-01-07 21:44:52 -0500
committerMatthias Clasen <mclasen@redhat.com>2012-01-07 21:44:52 -0500
commit27c21249b77b10e73fa0fb28e06c9917aa668200 (patch)
tree687d7c1368a382cebc1e6d23d4e6c77a03f92d3e /docs
parent983b7be5abeb243c1496cfdda1c46ee9c4e61f52 (diff)
downloadgtk+-27c21249b77b10e73fa0fb28e06c9917aa668200.tar.gz
Add session management migration chapter
Add some preliminary information about migration from EggSMClient to GtkApplication.
Diffstat (limited to 'docs')
-rw-r--r--docs/reference/gtk/Makefile.am6
-rw-r--r--docs/reference/gtk/gtk-docs.sgml3
-rw-r--r--docs/reference/gtk/migrating-smclient-GtkApplication.xml49
-rw-r--r--docs/reference/gtk/migrating-unique-GtkApplication.xml (renamed from docs/reference/gtk/migrating-GtkApplication.xml)2
4 files changed, 56 insertions, 4 deletions
diff --git a/docs/reference/gtk/Makefile.am b/docs/reference/gtk/Makefile.am
index d0d19e6c4c..54f3c7a33d 100644
--- a/docs/reference/gtk/Makefile.am
+++ b/docs/reference/gtk/Makefile.am
@@ -123,7 +123,8 @@ content_files = \
glossary.xml \
migrating-2to3.xml \
migrating-checklist.sgml \
- migrating-GtkApplication.xml \
+ migrating-unique-GtkApplication.xml \
+ migrating-smclient-GtkApplication.xml \
migrating-GtkGrid.xml \
migrating-GtkStyleContext.xml \
objects_grouped.sgml \
@@ -146,7 +147,8 @@ expand_content_files = \
glossary.xml \
migrating-2to3.xml \
migrating-checklist.sgml \
- migrating-GtkApplication.xml \
+ migrating-unique-GtkApplication.xml \
+ migrating-smclient-GtkApplication.xml \
migrating-GtkGrid.xml \
migrating-GtkStyleContext.xml \
question_index.sgml \
diff --git a/docs/reference/gtk/gtk-docs.sgml b/docs/reference/gtk/gtk-docs.sgml
index baf190578b..9be29d7de0 100644
--- a/docs/reference/gtk/gtk-docs.sgml
+++ b/docs/reference/gtk/gtk-docs.sgml
@@ -357,7 +357,8 @@
<xi:include href="xml/migrating-2to3.xml" />
<xi:include href="xml/migrating-GtkStyleContext.xml" />
- <xi:include href="xml/migrating-GtkApplication.xml" />
+ <xi:include href="xml/migrating-unique-GtkApplication.xml" />
+ <xi:include href="xml/migrating-smclient-GtkApplication.xml" />
<xi:include href="xml/migrating-GtkGrid.xml" />
<xi:include href="xml/migrating-checklist.sgml" />
</part>
diff --git a/docs/reference/gtk/migrating-smclient-GtkApplication.xml b/docs/reference/gtk/migrating-smclient-GtkApplication.xml
new file mode 100644
index 0000000000..58cae9a1b8
--- /dev/null
+++ b/docs/reference/gtk/migrating-smclient-GtkApplication.xml
@@ -0,0 +1,49 @@
+<?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>
diff --git a/docs/reference/gtk/migrating-GtkApplication.xml b/docs/reference/gtk/migrating-unique-GtkApplication.xml
index a53f165d55..aaa6645fbc 100644
--- a/docs/reference/gtk/migrating-GtkApplication.xml
+++ b/docs/reference/gtk/migrating-unique-GtkApplication.xml
@@ -2,7 +2,7 @@
<!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-GtkApplication">
+<chapter id="gtk-migrating-unique-GtkApplication">
<title>Migrating from libunique to GApplication or GtkApplication</title>