~ubuntu-desktop/gnome-session/ubuntu

« back to all changes in this revision

Viewing changes to debian/patches/revert_remove_gnome_session_properties.patch

  • Committer: Iain Lane
  • Date: 2018-07-24 16:01:56 UTC
  • Revision ID: iain@orangesquash.org.uk-20180724160156-unk2olkqs5ho5vpf
Moved to git: lp:~ubuntu-desktop/ubuntu/+source/gnome-session

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
From 195ab8780148446950c17d736dbb05492be4a9a5 Mon Sep 17 00:00:00 2001
2
 
From: Tim Lunn <tim@feathertop.org>
3
 
Date: Sat, 3 Mar 2018 10:15:04 +1100
4
 
Subject: [PATCH] Revert "Remove gnome-session-properties"
5
 
 
6
 
This reverts commits ea285af9 and 0c6fe6ca and ports the build to meson.
7
 
 
8
 
https://bugzilla.gnome.org/show_bug.cgi?id=708923
9
 
https://bugzilla.gnome.org/show_bug.cgi?id=766836
10
 
 
11
 
Ubuntu note: .png icons were also removed but they aren't as important
12
 
as svg icons. .png icons don't fit in a quilt patch.
13
 
---
14
 
 capplet/gsm-app-dialog.c                           |  540 ++++++++++
15
 
 capplet/gsm-app-dialog.h                           |   66 ++
16
 
 capplet/gsm-properties-dialog.c                    |  774 ++++++++++++++
17
 
 capplet/gsm-properties-dialog.h                    |   57 +
18
 
 capplet/gsp-app-manager.c                          |  593 ++++++++++
19
 
 capplet/gsp-app-manager.h                          |   81 ++
20
 
 capplet/gsp-app.c                                  | 1129 ++++++++++++++++++++
21
 
 capplet/gsp-app.h                                  |  108 ++
22
 
 capplet/gsp-keyfile.c                              |  207 ++++
23
 
 capplet/gsp-keyfile.h                              |   65 ++
24
 
 capplet/main.c                                     |  108 ++
25
 
 capplet/meson.build                                |   36 +
26
 
 data/gnome-session-properties.desktop.in           |   14 +
27
 
 data/icons/16x16/session-properties.svg            |  394 +++++++
28
 
 data/icons/22x22/session-properties.svg            |  440 ++++++++
29
 
 data/icons/32x32/session-properties.svg            |  490 +++++++++
30
 
 data/icons/scalable/session-properties.svg         |  515 +++++++++
31
 
 .../icons/symbolic/session-properties-symbolic.svg |   28 +
32
 
 data/meson.build                                   |   23 +
33
 
 data/session-properties.ui                         |  303 ++++++
34
 
 doc/man/gnome-session-properties.1                 |   24 +
35
 
 doc/man/gnome-session.1                            |    2 +
36
 
 doc/man/meson.build                                |    3 +-
37
 
 meson.build                                        |    1 +
38
 
 po/POTFILES.in                                     |    6 +
39
 
 po/POTFILES.skip                                   |    1 +
40
 
 26 files changed, 6015 insertions(+), 1 deletion(-)
41
 
 create mode 100644 capplet/gsm-app-dialog.c
42
 
 create mode 100644 capplet/gsm-app-dialog.h
43
 
 create mode 100644 capplet/gsm-properties-dialog.c
44
 
 create mode 100644 capplet/gsm-properties-dialog.h
45
 
 create mode 100644 capplet/gsp-app-manager.c
46
 
 create mode 100644 capplet/gsp-app-manager.h
47
 
 create mode 100644 capplet/gsp-app.c
48
 
 create mode 100644 capplet/gsp-app.h
49
 
 create mode 100644 capplet/gsp-keyfile.c
50
 
 create mode 100644 capplet/gsp-keyfile.h
51
 
 create mode 100644 capplet/main.c
52
 
 create mode 100644 capplet/meson.build
53
 
 create mode 100644 data/gnome-session-properties.desktop.in
54
 
 create mode 100644 data/icons/16x16/session-properties.svg
55
 
 create mode 100644 data/icons/22x22/session-properties.svg
56
 
 create mode 100644 data/icons/32x32/session-properties.svg
57
 
 create mode 100644 data/icons/scalable/session-properties.svg
58
 
 create mode 100644 data/icons/symbolic/session-properties-symbolic.svg
59
 
 create mode 100644 data/session-properties.ui
60
 
 create mode 100644 doc/man/gnome-session-properties.1
61
 
 
62
 
Index: gnome-session-3.28.0/capplet/gsm-app-dialog.c
63
 
===================================================================
64
 
--- /dev/null
65
 
+++ gnome-session-3.28.0/capplet/gsm-app-dialog.c
66
 
@@ -0,0 +1,540 @@
67
 
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
68
 
+ *
69
 
+ * Copyright (C) 2008 William Jon McCann <jmccann@redhat.com>
70
 
+ *
71
 
+ * This program is free software; you can redistribute it and/or modify
72
 
+ * it under the terms of the GNU General Public License as published by
73
 
+ * the Free Software Foundation; either version 2 of the License, or
74
 
+ * (at your option) any later version.
75
 
+ *
76
 
+ * This program is distributed in the hope that it will be useful,
77
 
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
78
 
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
79
 
+ * GNU General Public License for more details.
80
 
+ *
81
 
+ * You should have received a copy of the GNU General Public License
82
 
+ * along with this program; if not, write to the Free Software
83
 
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
84
 
+ *
85
 
+ */
86
 
+
87
 
+#include "config.h"
88
 
+
89
 
+#include <glib.h>
90
 
+#include <glib/gi18n.h>
91
 
+#include <gtk/gtk.h>
92
 
+
93
 
+#include "gsm-util.h"
94
 
+
95
 
+#include "gsm-app-dialog.h"
96
 
+
97
 
+#define GTKBUILDER_FILE "session-properties.ui"
98
 
+
99
 
+#define CAPPLET_NAME_ENTRY_WIDGET_NAME    "session_properties_name_entry"
100
 
+#define CAPPLET_COMMAND_ENTRY_WIDGET_NAME "session_properties_command_entry"
101
 
+#define CAPPLET_COMMENT_ENTRY_WIDGET_NAME "session_properties_comment_entry"
102
 
+#define CAPPLET_BROWSE_WIDGET_NAME        "session_properties_browse_button"
103
 
+
104
 
+
105
 
+#define GSM_APP_DIALOG_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GSM_TYPE_APP_DIALOG, GsmAppDialogPrivate))
106
 
+
107
 
+struct GsmAppDialogPrivate
108
 
+{
109
 
+        GtkWidget *name_entry;
110
 
+        GtkWidget *command_entry;
111
 
+        GtkWidget *comment_entry;
112
 
+        GtkWidget *browse_button;
113
 
+        char      *name;
114
 
+        char      *command;
115
 
+        char      *comment;
116
 
+};
117
 
+
118
 
+static void     gsm_app_dialog_class_init  (GsmAppDialogClass *klass);
119
 
+static void     gsm_app_dialog_init        (GsmAppDialog      *app_dialog);
120
 
+static void     gsm_app_dialog_finalize    (GObject           *object);
121
 
+
122
 
+enum {
123
 
+        PROP_0,
124
 
+        PROP_NAME,
125
 
+        PROP_COMMAND,
126
 
+        PROP_COMMENT
127
 
+};
128
 
+
129
 
+G_DEFINE_TYPE (GsmAppDialog, gsm_app_dialog, GTK_TYPE_DIALOG)
130
 
+
131
 
+static char *
132
 
+make_exec_uri (const char *exec)
133
 
+{
134
 
+        GString    *str;
135
 
+        const char *c;
136
 
+
137
 
+        if (exec == NULL) {
138
 
+                return g_strdup ("");
139
 
+        }
140
 
+
141
 
+        if (strchr (exec, ' ') == NULL) {
142
 
+                return g_strdup (exec);
143
 
+        }
144
 
+
145
 
+        str = g_string_new_len (NULL, strlen (exec));
146
 
+
147
 
+        str = g_string_append_c (str, '"');
148
 
+        for (c = exec; *c != '\0'; c++) {
149
 
+                /* FIXME: GKeyFile will add an additional backslach so we'll
150
 
+                 * end up with toto\\" instead of toto\"
151
 
+                 * We could use g_key_file_set_value(), but then we don't
152
 
+                 * benefit from the other escaping that glib is doing...
153
 
+                 */
154
 
+                if (*c == '"') {
155
 
+                        str = g_string_append (str, "\\\"");
156
 
+                } else {
157
 
+                        str = g_string_append_c (str, *c);
158
 
+                }
159
 
+        }
160
 
+        str = g_string_append_c (str, '"');
161
 
+
162
 
+        return g_string_free (str, FALSE);
163
 
+}
164
 
+
165
 
+static void
166
 
+on_browse_button_clicked (GtkWidget    *widget,
167
 
+                          GsmAppDialog *dialog)
168
 
+{
169
 
+        GtkWidget *chooser;
170
 
+        int        response;
171
 
+
172
 
+        chooser = gtk_file_chooser_dialog_new ("",
173
 
+                                               GTK_WINDOW (dialog),
174
 
+                                               GTK_FILE_CHOOSER_ACTION_OPEN,
175
 
+                                               GTK_STOCK_CANCEL,
176
 
+                                               GTK_RESPONSE_CANCEL,
177
 
+                                               GTK_STOCK_OPEN,
178
 
+                                               GTK_RESPONSE_ACCEPT,
179
 
+                                               NULL);
180
 
+
181
 
+        gtk_window_set_transient_for (GTK_WINDOW (chooser),
182
 
+                                      GTK_WINDOW (dialog));
183
 
+
184
 
+        gtk_window_set_destroy_with_parent (GTK_WINDOW (chooser), TRUE);
185
 
+
186
 
+        gtk_window_set_title (GTK_WINDOW (chooser), _("Select Command"));
187
 
+
188
 
+        gtk_widget_show (chooser);
189
 
+
190
 
+        response = gtk_dialog_run (GTK_DIALOG (chooser));
191
 
+
192
 
+        if (response == GTK_RESPONSE_ACCEPT) {
193
 
+                char *text;
194
 
+                char *uri;
195
 
+
196
 
+                text = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (chooser));
197
 
+
198
 
+                uri = make_exec_uri (text);
199
 
+
200
 
+                g_free (text);
201
 
+
202
 
+                gtk_entry_set_text (GTK_ENTRY (dialog->priv->command_entry), uri);
203
 
+
204
 
+                g_free (uri);
205
 
+        }
206
 
+
207
 
+        gtk_widget_destroy (chooser);
208
 
+}
209
 
+
210
 
+static void
211
 
+on_entry_activate (GtkEntry     *entry,
212
 
+                   GsmAppDialog *dialog)
213
 
+{
214
 
+        gtk_dialog_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
215
 
+}
216
 
+
217
 
+static void
218
 
+setup_dialog (GsmAppDialog *dialog)
219
 
+{
220
 
+        GtkWidget  *content_area;
221
 
+        GtkWidget  *widget;
222
 
+        GtkBuilder *xml;
223
 
+        GError     *error;
224
 
+
225
 
+        xml = gtk_builder_new ();
226
 
+        gtk_builder_set_translation_domain (xml, GETTEXT_PACKAGE);
227
 
+
228
 
+        error = NULL;
229
 
+        if (!gtk_builder_add_from_file (xml,
230
 
+                                        GTKBUILDER_DIR "/" GTKBUILDER_FILE,
231
 
+                                        &error)) {
232
 
+                if (error) {
233
 
+                        g_warning ("Could not load capplet UI file: %s",
234
 
+                                   error->message);
235
 
+                        g_error_free (error);
236
 
+                } else {
237
 
+                        g_warning ("Could not load capplet UI file.");
238
 
+                }
239
 
+        }
240
 
+
241
 
+        content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
242
 
+        widget = GTK_WIDGET (gtk_builder_get_object (xml, "main-table"));
243
 
+        gtk_container_add (GTK_CONTAINER (content_area), widget);
244
 
+
245
 
+        gtk_container_set_border_width (GTK_CONTAINER (dialog), 6);
246
 
+        gtk_window_set_icon_name (GTK_WINDOW (dialog), "session-properties");
247
 
+
248
 
+        g_object_set (dialog,
249
 
+                      "allow-shrink", FALSE,
250
 
+                      "allow-grow", FALSE,
251
 
+                      NULL);
252
 
+
253
 
+        gtk_dialog_add_button (GTK_DIALOG (dialog),
254
 
+                               GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL);
255
 
+
256
 
+        if (dialog->priv->name == NULL
257
 
+            && dialog->priv->command == NULL
258
 
+            && dialog->priv->comment == NULL) {
259
 
+                gtk_window_set_title (GTK_WINDOW (dialog), _("Add Startup Program"));
260
 
+                gtk_dialog_add_button (GTK_DIALOG (dialog),
261
 
+                                       GTK_STOCK_ADD, GTK_RESPONSE_OK);
262
 
+        } else {
263
 
+                gtk_window_set_title (GTK_WINDOW (dialog), _("Edit Startup Program"));
264
 
+                gtk_dialog_add_button (GTK_DIALOG (dialog),
265
 
+                                       GTK_STOCK_SAVE, GTK_RESPONSE_OK);
266
 
+        }
267
 
+
268
 
+        dialog->priv->name_entry = GTK_WIDGET (gtk_builder_get_object (xml, CAPPLET_NAME_ENTRY_WIDGET_NAME));
269
 
+        g_signal_connect (dialog->priv->name_entry,
270
 
+                          "activate",
271
 
+                          G_CALLBACK (on_entry_activate),
272
 
+                          dialog);
273
 
+        if (dialog->priv->name != NULL) {
274
 
+                gtk_entry_set_text (GTK_ENTRY (dialog->priv->name_entry), dialog->priv->name);
275
 
+        }
276
 
+
277
 
+        dialog->priv->browse_button = GTK_WIDGET (gtk_builder_get_object (xml, CAPPLET_BROWSE_WIDGET_NAME));
278
 
+        g_signal_connect (dialog->priv->browse_button,
279
 
+                          "clicked",
280
 
+                          G_CALLBACK (on_browse_button_clicked),
281
 
+                          dialog);
282
 
+
283
 
+        dialog->priv->command_entry = GTK_WIDGET (gtk_builder_get_object (xml, CAPPLET_COMMAND_ENTRY_WIDGET_NAME));
284
 
+        g_signal_connect (dialog->priv->command_entry,
285
 
+                          "activate",
286
 
+                          G_CALLBACK (on_entry_activate),
287
 
+                          dialog);
288
 
+        if (dialog->priv->command != NULL) {
289
 
+                gtk_entry_set_text (GTK_ENTRY (dialog->priv->command_entry), dialog->priv->command);
290
 
+        }
291
 
+
292
 
+        dialog->priv->comment_entry = GTK_WIDGET (gtk_builder_get_object (xml, CAPPLET_COMMENT_ENTRY_WIDGET_NAME));
293
 
+        g_signal_connect (dialog->priv->comment_entry,
294
 
+                          "activate",
295
 
+                          G_CALLBACK (on_entry_activate),
296
 
+                          dialog);
297
 
+        if (dialog->priv->comment != NULL) {
298
 
+                gtk_entry_set_text (GTK_ENTRY (dialog->priv->comment_entry), dialog->priv->comment);
299
 
+        }
300
 
+
301
 
+        if (xml != NULL) {
302
 
+                g_object_unref (xml);
303
 
+        }
304
 
+}
305
 
+
306
 
+static GObject *
307
 
+gsm_app_dialog_constructor (GType                  type,
308
 
+                            guint                  n_construct_app,
309
 
+                            GObjectConstructParam *construct_app)
310
 
+{
311
 
+        GsmAppDialog *dialog;
312
 
+
313
 
+        dialog = GSM_APP_DIALOG (G_OBJECT_CLASS (gsm_app_dialog_parent_class)->constructor (type,
314
 
+                                                                                                                  n_construct_app,
315
 
+                                                                                                                  construct_app));
316
 
+
317
 
+        setup_dialog (dialog);
318
 
+
319
 
+        gtk_widget_show_all (GTK_WIDGET (dialog));
320
 
+
321
 
+        return G_OBJECT (dialog);
322
 
+}
323
 
+
324
 
+static void
325
 
+gsm_app_dialog_dispose (GObject *object)
326
 
+{
327
 
+        GsmAppDialog *dialog;
328
 
+
329
 
+        g_return_if_fail (object != NULL);
330
 
+        g_return_if_fail (GSM_IS_APP_DIALOG (object));
331
 
+
332
 
+        dialog = GSM_APP_DIALOG (object);
333
 
+
334
 
+        g_free (dialog->priv->name);
335
 
+        dialog->priv->name = NULL;
336
 
+        g_free (dialog->priv->command);
337
 
+        dialog->priv->command = NULL;
338
 
+        g_free (dialog->priv->comment);
339
 
+        dialog->priv->comment = NULL;
340
 
+
341
 
+        G_OBJECT_CLASS (gsm_app_dialog_parent_class)->dispose (object);
342
 
+}
343
 
+
344
 
+static void
345
 
+gsm_app_dialog_set_name (GsmAppDialog *dialog,
346
 
+                         const char   *name)
347
 
+{
348
 
+        g_return_if_fail (GSM_IS_APP_DIALOG (dialog));
349
 
+
350
 
+        g_free (dialog->priv->name);
351
 
+
352
 
+        dialog->priv->name = g_strdup (name);
353
 
+        g_object_notify (G_OBJECT (dialog), "name");
354
 
+}
355
 
+
356
 
+static void
357
 
+gsm_app_dialog_set_command (GsmAppDialog *dialog,
358
 
+                            const char   *name)
359
 
+{
360
 
+        g_return_if_fail (GSM_IS_APP_DIALOG (dialog));
361
 
+
362
 
+        g_free (dialog->priv->command);
363
 
+
364
 
+        dialog->priv->command = g_strdup (name);
365
 
+        g_object_notify (G_OBJECT (dialog), "command");
366
 
+}
367
 
+
368
 
+static void
369
 
+gsm_app_dialog_set_comment (GsmAppDialog *dialog,
370
 
+                            const char   *name)
371
 
+{
372
 
+        g_return_if_fail (GSM_IS_APP_DIALOG (dialog));
373
 
+
374
 
+        g_free (dialog->priv->comment);
375
 
+
376
 
+        dialog->priv->comment = g_strdup (name);
377
 
+        g_object_notify (G_OBJECT (dialog), "comment");
378
 
+}
379
 
+
380
 
+const char *
381
 
+gsm_app_dialog_get_name (GsmAppDialog *dialog)
382
 
+{
383
 
+        g_return_val_if_fail (GSM_IS_APP_DIALOG (dialog), NULL);
384
 
+        return gtk_entry_get_text (GTK_ENTRY (dialog->priv->name_entry));
385
 
+}
386
 
+
387
 
+const char *
388
 
+gsm_app_dialog_get_command (GsmAppDialog *dialog)
389
 
+{
390
 
+        g_return_val_if_fail (GSM_IS_APP_DIALOG (dialog), NULL);
391
 
+        return gtk_entry_get_text (GTK_ENTRY (dialog->priv->command_entry));
392
 
+}
393
 
+
394
 
+const char *
395
 
+gsm_app_dialog_get_comment (GsmAppDialog *dialog)
396
 
+{
397
 
+        g_return_val_if_fail (GSM_IS_APP_DIALOG (dialog), NULL);
398
 
+        return gtk_entry_get_text (GTK_ENTRY (dialog->priv->comment_entry));
399
 
+}
400
 
+
401
 
+static void
402
 
+gsm_app_dialog_set_property (GObject        *object,
403
 
+                             guint           prop_id,
404
 
+                             const GValue   *value,
405
 
+                             GParamSpec     *pspec)
406
 
+{
407
 
+        GsmAppDialog *dialog = GSM_APP_DIALOG (object);
408
 
+
409
 
+        switch (prop_id) {
410
 
+        case PROP_NAME:
411
 
+                gsm_app_dialog_set_name (dialog, g_value_get_string (value));
412
 
+                break;
413
 
+        case PROP_COMMAND:
414
 
+                gsm_app_dialog_set_command (dialog, g_value_get_string (value));
415
 
+                break;
416
 
+        case PROP_COMMENT:
417
 
+                gsm_app_dialog_set_comment (dialog, g_value_get_string (value));
418
 
+                break;
419
 
+        default:
420
 
+                G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
421
 
+                break;
422
 
+        }
423
 
+}
424
 
+
425
 
+static void
426
 
+gsm_app_dialog_get_property (GObject        *object,
427
 
+                             guint           prop_id,
428
 
+                             GValue         *value,
429
 
+                             GParamSpec     *pspec)
430
 
+{
431
 
+        GsmAppDialog *dialog = GSM_APP_DIALOG (object);
432
 
+
433
 
+        switch (prop_id) {
434
 
+        case PROP_NAME:
435
 
+                g_value_set_string (value, dialog->priv->name);
436
 
+                break;
437
 
+        case PROP_COMMAND:
438
 
+                g_value_set_string (value, dialog->priv->command);
439
 
+                break;
440
 
+        case PROP_COMMENT:
441
 
+                g_value_set_string (value, dialog->priv->comment);
442
 
+                break;
443
 
+        default:
444
 
+                G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
445
 
+                break;
446
 
+        }
447
 
+}
448
 
+
449
 
+static void
450
 
+gsm_app_dialog_class_init (GsmAppDialogClass *klass)
451
 
+{
452
 
+        GObjectClass   *object_class = G_OBJECT_CLASS (klass);
453
 
+
454
 
+        object_class->get_property = gsm_app_dialog_get_property;
455
 
+        object_class->set_property = gsm_app_dialog_set_property;
456
 
+        object_class->constructor = gsm_app_dialog_constructor;
457
 
+        object_class->dispose = gsm_app_dialog_dispose;
458
 
+        object_class->finalize = gsm_app_dialog_finalize;
459
 
+
460
 
+        g_object_class_install_property (object_class,
461
 
+                                         PROP_NAME,
462
 
+                                         g_param_spec_string ("name",
463
 
+                                                              "name",
464
 
+                                                              "name",
465
 
+                                                              NULL,
466
 
+                                                              G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
467
 
+        g_object_class_install_property (object_class,
468
 
+                                         PROP_COMMAND,
469
 
+                                         g_param_spec_string ("command",
470
 
+                                                              "command",
471
 
+                                                              "command",
472
 
+                                                              NULL,
473
 
+                                                              G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
474
 
+        g_object_class_install_property (object_class,
475
 
+                                         PROP_COMMENT,
476
 
+                                         g_param_spec_string ("comment",
477
 
+                                                              "comment",
478
 
+                                                              "comment",
479
 
+                                                              NULL,
480
 
+                                                              G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
481
 
+
482
 
+        g_type_class_add_private (klass, sizeof (GsmAppDialogPrivate));
483
 
+}
484
 
+
485
 
+static void
486
 
+gsm_app_dialog_init (GsmAppDialog *dialog)
487
 
+{
488
 
+
489
 
+        dialog->priv = GSM_APP_DIALOG_GET_PRIVATE (dialog);
490
 
+}
491
 
+
492
 
+static void
493
 
+gsm_app_dialog_finalize (GObject *object)
494
 
+{
495
 
+        GsmAppDialog *dialog;
496
 
+
497
 
+        g_return_if_fail (object != NULL);
498
 
+        g_return_if_fail (GSM_IS_APP_DIALOG (object));
499
 
+
500
 
+        dialog = GSM_APP_DIALOG (object);
501
 
+
502
 
+        g_return_if_fail (dialog->priv != NULL);
503
 
+
504
 
+        G_OBJECT_CLASS (gsm_app_dialog_parent_class)->finalize (object);
505
 
+}
506
 
+
507
 
+GtkWidget *
508
 
+gsm_app_dialog_new (const char *name,
509
 
+                    const char *command,
510
 
+                    const char *comment)
511
 
+{
512
 
+        GObject *object;
513
 
+
514
 
+        object = g_object_new (GSM_TYPE_APP_DIALOG,
515
 
+                               "name", name,
516
 
+                               "command", command,
517
 
+                               "comment", comment,
518
 
+                               NULL);
519
 
+
520
 
+        return GTK_WIDGET (object);
521
 
+}
522
 
+
523
 
+gboolean
524
 
+gsm_app_dialog_run (GsmAppDialog  *dialog,
525
 
+                    char         **name_p,
526
 
+                    char         **command_p,
527
 
+                    char         **comment_p)
528
 
+{
529
 
+        gboolean retval;
530
 
+
531
 
+        retval = FALSE;
532
 
+
533
 
+        while (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_OK) {
534
 
+                const char *name;
535
 
+                const char *exec;
536
 
+                const char *comment;
537
 
+                const char *error_msg;
538
 
+                GError     *error;
539
 
+                char      **argv;
540
 
+                int         argc;
541
 
+
542
 
+                name = gsm_app_dialog_get_name (GSM_APP_DIALOG (dialog));
543
 
+                exec = gsm_app_dialog_get_command (GSM_APP_DIALOG (dialog));
544
 
+                comment = gsm_app_dialog_get_comment (GSM_APP_DIALOG (dialog));
545
 
+
546
 
+                error = NULL;
547
 
+                error_msg = NULL;
548
 
+
549
 
+                if (gsm_util_text_is_blank (exec)) {
550
 
+                        error_msg = _("The startup command cannot be empty");
551
 
+                } else {
552
 
+                        if (!g_shell_parse_argv (exec, &argc, &argv, &error)) {
553
 
+                                if (error != NULL) {
554
 
+                                        error_msg = error->message;
555
 
+                                } else {
556
 
+                                        error_msg = _("The startup command is not valid");
557
 
+                                }
558
 
+                        }
559
 
+                }
560
 
+
561
 
+                if (error_msg != NULL) {
562
 
+                        GtkWidget *msgbox;
563
 
+
564
 
+                        msgbox = gtk_message_dialog_new (GTK_WINDOW (dialog),
565
 
+                                                         GTK_DIALOG_MODAL,
566
 
+                                                         GTK_MESSAGE_ERROR,
567
 
+                                                         GTK_BUTTONS_CLOSE,
568
 
+                                                         "%s", error_msg);
569
 
+
570
 
+                        if (error != NULL) {
571
 
+                                g_error_free (error);
572
 
+                        }
573
 
+
574
 
+                        gtk_dialog_run (GTK_DIALOG (msgbox));
575
 
+
576
 
+                        gtk_widget_destroy (msgbox);
577
 
+
578
 
+                        continue;
579
 
+                }
580
 
+
581
 
+                if (gsm_util_text_is_blank (name)) {
582
 
+                        name = argv[0];
583
 
+                }
584
 
+
585
 
+                if (name_p) {
586
 
+                        *name_p = g_strdup (name);
587
 
+                }
588
 
+
589
 
+                g_strfreev (argv);
590
 
+
591
 
+                if (command_p) {
592
 
+                        *command_p = g_strdup (exec);
593
 
+                }
594
 
+
595
 
+                if (comment_p) {
596
 
+                        *comment_p = g_strdup (comment);
597
 
+                }
598
 
+
599
 
+                retval = TRUE;
600
 
+                break;
601
 
+        }
602
 
+
603
 
+        gtk_widget_destroy (GTK_WIDGET (dialog));
604
 
+
605
 
+        return retval;
606
 
+}
607
 
Index: gnome-session-3.28.0/capplet/gsm-app-dialog.h
608
 
===================================================================
609
 
--- /dev/null
610
 
+++ gnome-session-3.28.0/capplet/gsm-app-dialog.h
611
 
@@ -0,0 +1,66 @@
612
 
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
613
 
+ *
614
 
+ * Copyright (C) 2008 William Jon McCann <jmccann@redhat.com>
615
 
+ *
616
 
+ * This program is free software; you can redistribute it and/or modify
617
 
+ * it under the terms of the GNU General Public License as published by
618
 
+ * the Free Software Foundation; either version 2 of the License, or
619
 
+ * (at your option) any later version.
620
 
+ *
621
 
+ * This program is distributed in the hope that it will be useful,
622
 
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
623
 
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
624
 
+ * GNU General Public License for more details.
625
 
+ *
626
 
+ * You should have received a copy of the GNU General Public License
627
 
+ * along with this program; if not, write to the Free Software
628
 
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
629
 
+ *
630
 
+ */
631
 
+
632
 
+#ifndef __GSM_APP_DIALOG_H
633
 
+#define __GSM_APP_DIALOG_H
634
 
+
635
 
+#include <glib-object.h>
636
 
+#include <gtk/gtk.h>
637
 
+
638
 
+G_BEGIN_DECLS
639
 
+
640
 
+#define GSM_TYPE_APP_DIALOG         (gsm_app_dialog_get_type ())
641
 
+#define GSM_APP_DIALOG(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), GSM_TYPE_APP_DIALOG, GsmAppDialog))
642
 
+#define GSM_APP_DIALOG_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), GSM_TYPE_APP_DIALOG, GsmAppDialogClass))
643
 
+#define GSM_IS_APP_DIALOG(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSM_TYPE_APP_DIALOG))
644
 
+#define GSM_IS_APP_DIALOG_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), GSM_TYPE_APP_DIALOG))
645
 
+#define GSM_APP_DIALOG_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GSM_TYPE_APP_DIALOG, GsmAppDialogClass))
646
 
+
647
 
+typedef struct GsmAppDialogPrivate GsmAppDialogPrivate;
648
 
+
649
 
+typedef struct
650
 
+{
651
 
+        GtkDialog            parent;
652
 
+        GsmAppDialogPrivate *priv;
653
 
+} GsmAppDialog;
654
 
+
655
 
+typedef struct
656
 
+{
657
 
+        GtkDialogClass   parent_class;
658
 
+} GsmAppDialogClass;
659
 
+
660
 
+GType                  gsm_app_dialog_get_type           (void);
661
 
+
662
 
+GtkWidget            * gsm_app_dialog_new                (const char   *name,
663
 
+                                                          const char   *command,
664
 
+                                                          const char   *comment);
665
 
+
666
 
+gboolean               gsm_app_dialog_run               (GsmAppDialog  *dialog,
667
 
+                                                         char         **name_p,
668
 
+                                                         char         **command_p,
669
 
+                                                         char         **comment_p);
670
 
+
671
 
+const char *           gsm_app_dialog_get_name           (GsmAppDialog *dialog);
672
 
+const char *           gsm_app_dialog_get_command        (GsmAppDialog *dialog);
673
 
+const char *           gsm_app_dialog_get_comment        (GsmAppDialog *dialog);
674
 
+
675
 
+G_END_DECLS
676
 
+
677
 
+#endif /* __GSM_APP_DIALOG_H */
678
 
Index: gnome-session-3.28.0/capplet/gsm-properties-dialog.c
679
 
===================================================================
680
 
--- /dev/null
681
 
+++ gnome-session-3.28.0/capplet/gsm-properties-dialog.c
682
 
@@ -0,0 +1,774 @@
683
 
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
684
 
+ *
685
 
+ * Copyright (C) 1999 Free Software Foundation, Inc.
686
 
+ * Copyright (C) 2007 Vincent Untz.
687
 
+ * Copyright (C) 2008 Lucas Rocha.
688
 
+ * Copyright (C) 2008 William Jon McCann <jmccann@redhat.com>
689
 
+ *
690
 
+ * This program is free software; you can redistribute it and/or modify
691
 
+ * it under the terms of the GNU General Public License as published by
692
 
+ * the Free Software Foundation; either version 2 of the License, or
693
 
+ * (at your option) any later version.
694
 
+ *
695
 
+ * This program is distributed in the hope that it will be useful,
696
 
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
697
 
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
698
 
+ * GNU General Public License for more details.
699
 
+ *
700
 
+ * You should have received a copy of the GNU General Public License
701
 
+ * along with this program; if not, write to the Free Software
702
 
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
703
 
+ *
704
 
+ */
705
 
+
706
 
+#include "config.h"
707
 
+
708
 
+#include <glib.h>
709
 
+#include <glib/gi18n.h>
710
 
+#include <gtk/gtk.h>
711
 
+
712
 
+#include "gsm-properties-dialog.h"
713
 
+#include "gsm-app-dialog.h"
714
 
+#include "gsm-util.h"
715
 
+#include "gsp-app.h"
716
 
+#include "gsp-app-manager.h"
717
 
+
718
 
+#define GSM_PROPERTIES_DIALOG_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GSM_TYPE_PROPERTIES_DIALOG, GsmPropertiesDialogPrivate))
719
 
+
720
 
+#define GTKBUILDER_FILE "session-properties.ui"
721
 
+
722
 
+#define CAPPLET_TREEVIEW_WIDGET_NAME      "session_properties_treeview"
723
 
+#define CAPPLET_ADD_WIDGET_NAME           "session_properties_add_button"
724
 
+#define CAPPLET_DELETE_WIDGET_NAME        "session_properties_delete_button"
725
 
+#define CAPPLET_EDIT_WIDGET_NAME          "session_properties_edit_button"
726
 
+#define CAPPLET_SAVE_WIDGET_NAME          "session_properties_save_button"
727
 
+#define CAPPLET_REMEMBER_WIDGET_NAME      "session_properties_remember_toggle"
728
 
+
729
 
+#define STARTUP_APP_ICON     "system-run"
730
 
+
731
 
+#define SPC_SETTINGS_SCHEMA          "org.gnome.SessionManager"
732
 
+#define SPC_SETTINGS_AUTOSAVE_KEY    "auto-save-session"
733
 
+
734
 
+struct GsmPropertiesDialogPrivate
735
 
+{
736
 
+        GtkBuilder        *xml;
737
 
+        GtkListStore      *list_store;
738
 
+        GtkTreeModel      *tree_filter;
739
 
+
740
 
+        GtkTreeView       *treeview;
741
 
+        GtkWidget         *add_button;
742
 
+        GtkWidget         *delete_button;
743
 
+        GtkWidget         *edit_button;
744
 
+
745
 
+        GSettings         *settings;
746
 
+
747
 
+        GspAppManager     *manager;
748
 
+};
749
 
+
750
 
+enum {
751
 
+        STORE_COL_VISIBLE = 0,
752
 
+        STORE_COL_ENABLED,
753
 
+        STORE_COL_GICON,
754
 
+        STORE_COL_DESCRIPTION,
755
 
+        STORE_COL_APP,
756
 
+        STORE_COL_SEARCH,
757
 
+        NUMBER_OF_COLUMNS
758
 
+};
759
 
+
760
 
+static void     gsm_properties_dialog_class_init  (GsmPropertiesDialogClass *klass);
761
 
+static void     gsm_properties_dialog_init        (GsmPropertiesDialog      *properties_dialog);
762
 
+static void     gsm_properties_dialog_finalize    (GObject                  *object);
763
 
+
764
 
+G_DEFINE_TYPE (GsmPropertiesDialog, gsm_properties_dialog, GTK_TYPE_DIALOG)
765
 
+
766
 
+static gboolean
767
 
+find_by_app (GtkTreeModel *model,
768
 
+             GtkTreeIter  *iter,
769
 
+             GspApp       *app)
770
 
+{
771
 
+        GspApp *iter_app = NULL;
772
 
+
773
 
+        if (!gtk_tree_model_get_iter_first (model, iter)) {
774
 
+                return FALSE;
775
 
+        }
776
 
+
777
 
+        do {
778
 
+                gtk_tree_model_get (model, iter,
779
 
+                                    STORE_COL_APP, &iter_app,
780
 
+                                    -1);
781
 
+
782
 
+                if (iter_app == app) {
783
 
+                        g_object_unref (iter_app);
784
 
+                        return TRUE;
785
 
+                }
786
 
+        } while (gtk_tree_model_iter_next (model, iter));
787
 
+
788
 
+        return FALSE;
789
 
+}
790
 
+
791
 
+static void
792
 
+_fill_iter_from_app (GtkListStore *list_store,
793
 
+                     GtkTreeIter  *iter,
794
 
+                     GspApp       *app)
795
 
+{
796
 
+        gboolean    hidden;
797
 
+        gboolean    display;
798
 
+        gboolean    enabled;
799
 
+        gboolean    shown;
800
 
+        GIcon      *icon;
801
 
+        const char *description;
802
 
+        const char *app_name;
803
 
+
804
 
+        hidden      = gsp_app_get_hidden (app);
805
 
+        display     = gsp_app_get_display (app);
806
 
+        enabled     = gsp_app_get_enabled (app);
807
 
+        shown       = gsp_app_get_shown (app);
808
 
+        icon        = gsp_app_get_icon (app);
809
 
+        description = gsp_app_get_description (app);
810
 
+        app_name    = gsp_app_get_name (app);
811
 
+
812
 
+        if (G_IS_THEMED_ICON (icon)) {
813
 
+                GtkIconTheme       *theme;
814
 
+                const char * const *icon_names;
815
 
+
816
 
+                theme = gtk_icon_theme_get_default ();
817
 
+                icon_names = g_themed_icon_get_names (G_THEMED_ICON (icon));
818
 
+                if (icon_names[0] == NULL ||
819
 
+                    !gtk_icon_theme_has_icon (theme, icon_names[0])) {
820
 
+                        g_object_unref (icon);
821
 
+                        icon = NULL;
822
 
+                }
823
 
+        } else if (G_IS_FILE_ICON (icon)) {
824
 
+                GFile *iconfile;
825
 
+
826
 
+                iconfile = g_file_icon_get_file (G_FILE_ICON (icon));
827
 
+                if (!g_file_query_exists (iconfile, NULL)) {
828
 
+                        g_object_unref (icon);
829
 
+                        icon = NULL;
830
 
+                }
831
 
+        }
832
 
+
833
 
+        if (icon == NULL) {
834
 
+                icon = g_themed_icon_new (STARTUP_APP_ICON);
835
 
+        }
836
 
+
837
 
+        gtk_list_store_set (list_store, iter,
838
 
+                            STORE_COL_VISIBLE, !hidden && shown && display,
839
 
+                            STORE_COL_ENABLED, enabled,
840
 
+                            STORE_COL_GICON, icon,
841
 
+                            STORE_COL_DESCRIPTION, description,
842
 
+                            STORE_COL_APP, app,
843
 
+                            STORE_COL_SEARCH, app_name,
844
 
+                            -1);
845
 
+        g_object_unref (icon);
846
 
+}
847
 
+
848
 
+static void
849
 
+_app_changed (GsmPropertiesDialog *dialog,
850
 
+              GspApp              *app)
851
 
+{
852
 
+        GtkTreeIter iter;
853
 
+
854
 
+        if (!find_by_app (GTK_TREE_MODEL (dialog->priv->list_store),
855
 
+                          &iter, app)) {
856
 
+                return;
857
 
+        }
858
 
+
859
 
+        _fill_iter_from_app (dialog->priv->list_store, &iter, app);
860
 
+}
861
 
+
862
 
+static void
863
 
+append_app (GsmPropertiesDialog *dialog,
864
 
+            GspApp              *app)
865
 
+{
866
 
+        GtkTreeIter   iter;
867
 
+
868
 
+        gtk_list_store_append (dialog->priv->list_store, &iter);
869
 
+        _fill_iter_from_app (dialog->priv->list_store, &iter, app);
870
 
+
871
 
+        g_signal_connect_swapped (app, "changed",
872
 
+                                  G_CALLBACK (_app_changed), dialog);
873
 
+}
874
 
+
875
 
+static void
876
 
+_app_added (GsmPropertiesDialog *dialog,
877
 
+            GspApp              *app,
878
 
+            GspAppManager       *manager)
879
 
+{
880
 
+        append_app (dialog, app);
881
 
+}
882
 
+
883
 
+static void
884
 
+_app_removed (GsmPropertiesDialog *dialog,
885
 
+              GspApp              *app,
886
 
+              GspAppManager       *manager)
887
 
+{
888
 
+        GtkTreeIter iter;
889
 
+
890
 
+        if (!find_by_app (GTK_TREE_MODEL (dialog->priv->list_store),
891
 
+                          &iter, app)) {
892
 
+                return;
893
 
+        }
894
 
+
895
 
+        g_signal_handlers_disconnect_by_func (app,
896
 
+                                              _app_changed,
897
 
+                                              dialog);
898
 
+        gtk_list_store_remove (dialog->priv->list_store, &iter);
899
 
+}
900
 
+
901
 
+static void
902
 
+populate_model (GsmPropertiesDialog *dialog)
903
 
+{
904
 
+        GSList *apps;
905
 
+        GSList *l;
906
 
+
907
 
+        apps = gsp_app_manager_get_apps (dialog->priv->manager);
908
 
+        for (l = apps; l != NULL; l = l->next) {
909
 
+                append_app (dialog, GSP_APP (l->data));
910
 
+        }
911
 
+        g_slist_free (apps);
912
 
+}
913
 
+
914
 
+static void
915
 
+on_selection_changed (GtkTreeSelection    *selection,
916
 
+                      GsmPropertiesDialog *dialog)
917
 
+{
918
 
+        gboolean sel;
919
 
+
920
 
+        sel = gtk_tree_selection_get_selected (selection, NULL, NULL);
921
 
+
922
 
+        gtk_widget_set_sensitive (dialog->priv->edit_button, sel);
923
 
+        gtk_widget_set_sensitive (dialog->priv->delete_button, sel);
924
 
+}
925
 
+
926
 
+static void
927
 
+on_startup_enabled_toggled (GtkCellRendererToggle *cell_renderer,
928
 
+                            char                  *path,
929
 
+                            GsmPropertiesDialog   *dialog)
930
 
+{
931
 
+        GtkTreeIter iter;
932
 
+        GspApp     *app;
933
 
+        gboolean    active;
934
 
+
935
 
+        if (!gtk_tree_model_get_iter_from_string (GTK_TREE_MODEL (dialog->priv->tree_filter),
936
 
+                                                  &iter, path)) {
937
 
+                return;
938
 
+        }
939
 
+
940
 
+        app = NULL;
941
 
+        gtk_tree_model_get (GTK_TREE_MODEL (dialog->priv->tree_filter),
942
 
+                            &iter,
943
 
+                            STORE_COL_APP, &app,
944
 
+                            -1);
945
 
+
946
 
+        active = gtk_cell_renderer_toggle_get_active (cell_renderer);
947
 
+        active = !active;
948
 
+
949
 
+        if (app) {
950
 
+                gsp_app_set_enabled (app, active);
951
 
+                g_object_unref (app);
952
 
+        }
953
 
+}
954
 
+
955
 
+static void
956
 
+on_drag_data_received (GtkWidget           *widget,
957
 
+                       GdkDragContext      *drag_context,
958
 
+                       gint                 x,
959
 
+                       gint                 y,
960
 
+                       GtkSelectionData    *data,
961
 
+                       guint                info,
962
 
+                       guint                time,
963
 
+                       GsmPropertiesDialog *dialog)
964
 
+{
965
 
+        gboolean dnd_success;
966
 
+
967
 
+        dnd_success = FALSE;
968
 
+
969
 
+        if (data != NULL) {
970
 
+                char **filenames;
971
 
+                int    i;
972
 
+
973
 
+                filenames = gtk_selection_data_get_uris (data);
974
 
+
975
 
+                for (i = 0; filenames[i] && filenames[i][0]; i++) {
976
 
+                        /* Return success if at least one file succeeded */
977
 
+                        gboolean file_success;
978
 
+                        file_success = gsp_app_copy_desktop_file (filenames[i]);
979
 
+                        dnd_success = dnd_success || file_success;
980
 
+                }
981
 
+
982
 
+                g_strfreev (filenames);
983
 
+        }
984
 
+
985
 
+        gtk_drag_finish (drag_context, dnd_success, FALSE, time);
986
 
+        g_signal_stop_emission_by_name (widget, "drag_data_received");
987
 
+}
988
 
+
989
 
+static void
990
 
+on_drag_begin (GtkWidget           *widget,
991
 
+               GdkDragContext      *context,
992
 
+               GsmPropertiesDialog *dialog)
993
 
+{
994
 
+        GtkTreePath *path;
995
 
+        GtkTreeIter  iter;
996
 
+        GspApp      *app;
997
 
+
998
 
+        gtk_tree_view_get_cursor (GTK_TREE_VIEW (widget), &path, NULL);
999
 
+        gtk_tree_model_get_iter (GTK_TREE_MODEL (dialog->priv->tree_filter),
1000
 
+                                 &iter, path);
1001
 
+        gtk_tree_path_free (path);
1002
 
+
1003
 
+        gtk_tree_model_get (GTK_TREE_MODEL (dialog->priv->tree_filter),
1004
 
+                            &iter,
1005
 
+                            STORE_COL_APP, &app,
1006
 
+                            -1);
1007
 
+
1008
 
+        if (app) {
1009
 
+                g_object_set_data_full (G_OBJECT (context), "gsp-app",
1010
 
+                                        g_object_ref (app), g_object_unref);
1011
 
+                g_object_unref (app);
1012
 
+        }
1013
 
+
1014
 
+}
1015
 
+
1016
 
+static void
1017
 
+on_drag_data_get (GtkWidget           *widget,
1018
 
+                  GdkDragContext      *context,
1019
 
+                  GtkSelectionData    *selection_data,
1020
 
+                  guint                info,
1021
 
+                  guint                time,
1022
 
+                  GsmPropertiesDialog *dialog)
1023
 
+{
1024
 
+        GspApp *app;
1025
 
+
1026
 
+        app = g_object_get_data (G_OBJECT (context), "gsp-app");
1027
 
+        if (app) {
1028
 
+                const char *uris[2];
1029
 
+                char       *uri;
1030
 
+
1031
 
+                uri = g_filename_to_uri (gsp_app_get_path (app), NULL, NULL);
1032
 
+
1033
 
+                uris[0] = uri;
1034
 
+                uris[1] = NULL;
1035
 
+                gtk_selection_data_set_uris (selection_data, (char **) uris);
1036
 
+
1037
 
+                g_free (uri);
1038
 
+        }
1039
 
+}
1040
 
+
1041
 
+static void
1042
 
+on_add_app_clicked (GtkWidget           *widget,
1043
 
+                    GsmPropertiesDialog *dialog)
1044
 
+{
1045
 
+        GtkWidget  *add_dialog;
1046
 
+        char       *name;
1047
 
+        char       *exec;
1048
 
+        char       *comment;
1049
 
+
1050
 
+        add_dialog = gsm_app_dialog_new (NULL, NULL, NULL);
1051
 
+        gtk_window_set_transient_for (GTK_WINDOW (add_dialog),
1052
 
+                                      GTK_WINDOW (dialog));
1053
 
+
1054
 
+        if (gsm_app_dialog_run (GSM_APP_DIALOG (add_dialog),
1055
 
+                                &name, &exec, &comment)) {
1056
 
+                gsp_app_create (name, comment, exec);
1057
 
+                g_free (name);
1058
 
+                g_free (exec);
1059
 
+                g_free (comment);
1060
 
+        }
1061
 
+}
1062
 
+
1063
 
+static void
1064
 
+on_delete_app_clicked (GtkWidget           *widget,
1065
 
+                       GsmPropertiesDialog *dialog)
1066
 
+{
1067
 
+        GtkTreeSelection *selection;
1068
 
+        GtkTreeIter       iter;
1069
 
+        GspApp           *app;
1070
 
+
1071
 
+        selection = gtk_tree_view_get_selection (dialog->priv->treeview);
1072
 
+
1073
 
+        if (!gtk_tree_selection_get_selected (selection, NULL, &iter)) {
1074
 
+                return;
1075
 
+        }
1076
 
+
1077
 
+        app = NULL;
1078
 
+        gtk_tree_model_get (GTK_TREE_MODEL (dialog->priv->tree_filter),
1079
 
+                            &iter,
1080
 
+                            STORE_COL_APP, &app,
1081
 
+                            -1);
1082
 
+
1083
 
+        if (app) {
1084
 
+                gsp_app_delete (app);
1085
 
+                g_object_unref (app);
1086
 
+        }
1087
 
+}
1088
 
+
1089
 
+static void
1090
 
+on_edit_app_clicked (GtkWidget           *widget,
1091
 
+                     GsmPropertiesDialog *dialog)
1092
 
+{
1093
 
+        GtkTreeSelection *selection;
1094
 
+        GtkTreeIter       iter;
1095
 
+        GspApp           *app;
1096
 
+
1097
 
+        selection = gtk_tree_view_get_selection (dialog->priv->treeview);
1098
 
+
1099
 
+        if (!gtk_tree_selection_get_selected (selection, NULL, &iter)) {
1100
 
+                return;
1101
 
+        }
1102
 
+
1103
 
+        app = NULL;
1104
 
+        gtk_tree_model_get (GTK_TREE_MODEL (dialog->priv->tree_filter),
1105
 
+                            &iter,
1106
 
+                            STORE_COL_APP, &app,
1107
 
+                            -1);
1108
 
+
1109
 
+        if (app) {
1110
 
+                GtkWidget  *edit_dialog;
1111
 
+                char       *name;
1112
 
+                char       *exec;
1113
 
+                char       *comment;
1114
 
+
1115
 
+                edit_dialog = gsm_app_dialog_new (gsp_app_get_name (app),
1116
 
+                                                  gsp_app_get_exec (app),
1117
 
+                                                  gsp_app_get_comment (app));
1118
 
+                gtk_window_set_transient_for (GTK_WINDOW (edit_dialog),
1119
 
+                                              GTK_WINDOW (dialog));
1120
 
+
1121
 
+                if (gsm_app_dialog_run (GSM_APP_DIALOG (edit_dialog),
1122
 
+                                        &name, &exec, &comment)) {
1123
 
+                        gsp_app_update (app, name, comment, exec);
1124
 
+                        g_free (name);
1125
 
+                        g_free (exec);
1126
 
+                        g_free (comment);
1127
 
+                }
1128
 
+
1129
 
+                g_object_unref (app);
1130
 
+        }
1131
 
+}
1132
 
+
1133
 
+static void
1134
 
+on_row_activated (GtkTreeView         *tree_view,
1135
 
+                  GtkTreePath         *path,
1136
 
+                  GtkTreeViewColumn   *column,
1137
 
+                  GsmPropertiesDialog *dialog)
1138
 
+{
1139
 
+        on_edit_app_clicked (NULL, dialog);
1140
 
+}
1141
 
+
1142
 
+static void
1143
 
+on_save_session_clicked (GtkWidget           *widget,
1144
 
+                         GsmPropertiesDialog *dialog)
1145
 
+{
1146
 
+        g_debug ("Session saving is not implemented yet!");
1147
 
+}
1148
 
+
1149
 
+static void
1150
 
+setup_dialog (GsmPropertiesDialog *dialog)
1151
 
+{
1152
 
+        GtkTreeView       *treeview;
1153
 
+        GtkWidget         *button;
1154
 
+        GtkTreeModel      *tree_filter;
1155
 
+        GtkTreeViewColumn *column;
1156
 
+        GtkCellRenderer   *renderer;
1157
 
+        GtkTreeSelection  *selection;
1158
 
+        GtkTargetList     *targetlist;
1159
 
+
1160
 
+        gtk_dialog_add_buttons (GTK_DIALOG (dialog),
1161
 
+                                GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
1162
 
+                                NULL);
1163
 
+
1164
 
+        dialog->priv->list_store = gtk_list_store_new (NUMBER_OF_COLUMNS,
1165
 
+                                                       G_TYPE_BOOLEAN,
1166
 
+                                                       G_TYPE_BOOLEAN,
1167
 
+                                                       G_TYPE_ICON,
1168
 
+                                                       G_TYPE_STRING,
1169
 
+                                                       G_TYPE_OBJECT,
1170
 
+                                                       G_TYPE_STRING);
1171
 
+        tree_filter = gtk_tree_model_filter_new (GTK_TREE_MODEL (dialog->priv->list_store),
1172
 
+                                                 NULL);
1173
 
+        g_object_unref (dialog->priv->list_store);
1174
 
+        dialog->priv->tree_filter = tree_filter;
1175
 
+
1176
 
+        gtk_tree_model_filter_set_visible_column (GTK_TREE_MODEL_FILTER (tree_filter),
1177
 
+                                                  STORE_COL_VISIBLE);
1178
 
+
1179
 
+        treeview = GTK_TREE_VIEW (gtk_builder_get_object (dialog->priv->xml,
1180
 
+                                                          CAPPLET_TREEVIEW_WIDGET_NAME));
1181
 
+        dialog->priv->treeview = treeview;
1182
 
+
1183
 
+        gtk_tree_view_set_model (treeview, tree_filter);
1184
 
+        g_object_unref (tree_filter);
1185
 
+
1186
 
+        gtk_tree_view_set_headers_visible (treeview, FALSE);
1187
 
+        g_signal_connect (treeview,
1188
 
+                          "row-activated",
1189
 
+                          G_CALLBACK (on_row_activated),
1190
 
+                          dialog);
1191
 
+
1192
 
+        selection = gtk_tree_view_get_selection (treeview);
1193
 
+        gtk_tree_selection_set_mode (selection, GTK_SELECTION_BROWSE);
1194
 
+        g_signal_connect (selection,
1195
 
+                          "changed",
1196
 
+                          G_CALLBACK (on_selection_changed),
1197
 
+                          dialog);
1198
 
+
1199
 
+        /* CHECKBOX COLUMN */
1200
 
+        renderer = gtk_cell_renderer_toggle_new ();
1201
 
+        column = gtk_tree_view_column_new_with_attributes (_("Enabled"),
1202
 
+                                                           renderer,
1203
 
+                                                           "active", STORE_COL_ENABLED,
1204
 
+                                                           NULL);
1205
 
+        gtk_tree_view_append_column (treeview, column);
1206
 
+        g_signal_connect (renderer,
1207
 
+                          "toggled",
1208
 
+                          G_CALLBACK (on_startup_enabled_toggled),
1209
 
+                          dialog);
1210
 
+
1211
 
+        /* ICON COLUMN */
1212
 
+        renderer = gtk_cell_renderer_pixbuf_new ();
1213
 
+        column = gtk_tree_view_column_new_with_attributes (_("Icon"),
1214
 
+                                                           renderer,
1215
 
+                                                           "gicon", STORE_COL_GICON,
1216
 
+                                                           "sensitive", STORE_COL_ENABLED,
1217
 
+                                                           NULL);
1218
 
+        g_object_set (renderer,
1219
 
+                      "stock-size", GSM_PROPERTIES_ICON_SIZE,
1220
 
+                      NULL);
1221
 
+        gtk_tree_view_append_column (treeview, column);
1222
 
+
1223
 
+        /* NAME COLUMN */
1224
 
+        renderer = gtk_cell_renderer_text_new ();
1225
 
+        column = gtk_tree_view_column_new_with_attributes (_("Program"),
1226
 
+                                                           renderer,
1227
 
+                                                           "markup", STORE_COL_DESCRIPTION,
1228
 
+                                                           "sensitive", STORE_COL_ENABLED,
1229
 
+                                                           NULL);
1230
 
+        g_object_set (renderer,
1231
 
+                      "ellipsize", PANGO_ELLIPSIZE_END,
1232
 
+                      NULL);
1233
 
+        gtk_tree_view_append_column (treeview, column);
1234
 
+
1235
 
+
1236
 
+        gtk_tree_view_column_set_sort_column_id (column, STORE_COL_DESCRIPTION);
1237
 
+        gtk_tree_view_set_search_column (treeview, STORE_COL_SEARCH);
1238
 
+        gtk_tree_view_set_rules_hint (treeview, TRUE);
1239
 
+
1240
 
+        gtk_tree_view_enable_model_drag_source (treeview,
1241
 
+                                                GDK_BUTTON1_MASK|GDK_BUTTON2_MASK,
1242
 
+                                                NULL, 0,
1243
 
+                                                GDK_ACTION_COPY);
1244
 
+        gtk_drag_source_add_uri_targets (GTK_WIDGET (treeview));
1245
 
+
1246
 
+        gtk_drag_dest_set (GTK_WIDGET (treeview),
1247
 
+                           GTK_DEST_DEFAULT_ALL,
1248
 
+                           NULL, 0,
1249
 
+                           GDK_ACTION_COPY);
1250
 
+
1251
 
+        gtk_drag_dest_add_uri_targets (GTK_WIDGET (treeview));
1252
 
+        /* we don't want to accept drags coming from this widget */
1253
 
+        targetlist = gtk_drag_dest_get_target_list (GTK_WIDGET (treeview));
1254
 
+        if (targetlist != NULL) {
1255
 
+                GtkTargetEntry *targets;
1256
 
+                gint n_targets;
1257
 
+                gint i;
1258
 
+
1259
 
+                targets = gtk_target_table_new_from_list (targetlist, &n_targets);
1260
 
+                for (i = 0; i < n_targets; i++)
1261
 
+                        targets[i].flags = GTK_TARGET_OTHER_WIDGET;
1262
 
+
1263
 
+                targetlist = gtk_target_list_new (targets, n_targets);
1264
 
+                gtk_drag_dest_set_target_list (GTK_WIDGET (treeview), targetlist);
1265
 
+                gtk_target_list_unref (targetlist);
1266
 
+
1267
 
+                gtk_target_table_free (targets, n_targets);
1268
 
+        }
1269
 
+
1270
 
+        g_signal_connect (treeview, "drag_begin",
1271
 
+                          G_CALLBACK (on_drag_begin),
1272
 
+                          dialog);
1273
 
+        g_signal_connect (treeview, "drag_data_get",
1274
 
+                          G_CALLBACK (on_drag_data_get),
1275
 
+                          dialog);
1276
 
+        g_signal_connect (treeview, "drag_data_received",
1277
 
+                          G_CALLBACK (on_drag_data_received),
1278
 
+                          dialog);
1279
 
+
1280
 
+        gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (dialog->priv->list_store),
1281
 
+                                              STORE_COL_DESCRIPTION,
1282
 
+                                              GTK_SORT_ASCENDING);
1283
 
+
1284
 
+
1285
 
+        button = GTK_WIDGET (gtk_builder_get_object (dialog->priv->xml,
1286
 
+                                                     CAPPLET_ADD_WIDGET_NAME));
1287
 
+        dialog->priv->add_button = button;
1288
 
+        g_signal_connect (button,
1289
 
+                          "clicked",
1290
 
+                          G_CALLBACK (on_add_app_clicked),
1291
 
+                          dialog);
1292
 
+
1293
 
+        button = GTK_WIDGET (gtk_builder_get_object (dialog->priv->xml,
1294
 
+                                                     CAPPLET_DELETE_WIDGET_NAME));
1295
 
+        dialog->priv->delete_button = button;
1296
 
+        g_signal_connect (button,
1297
 
+                          "clicked",
1298
 
+                          G_CALLBACK (on_delete_app_clicked),
1299
 
+                          dialog);
1300
 
+
1301
 
+        button = GTK_WIDGET (gtk_builder_get_object (dialog->priv->xml,
1302
 
+                                                     CAPPLET_EDIT_WIDGET_NAME));
1303
 
+        dialog->priv->edit_button = button;
1304
 
+        g_signal_connect (button,
1305
 
+                          "clicked",
1306
 
+                          G_CALLBACK (on_edit_app_clicked),
1307
 
+                          dialog);
1308
 
+
1309
 
+        button = GTK_WIDGET (gtk_builder_get_object (dialog->priv->xml,
1310
 
+                                                     CAPPLET_REMEMBER_WIDGET_NAME));
1311
 
+        g_settings_bind (dialog->priv->settings, SPC_SETTINGS_AUTOSAVE_KEY,
1312
 
+                         button, "active", G_SETTINGS_BIND_DEFAULT);
1313
 
+
1314
 
+        button = GTK_WIDGET (gtk_builder_get_object (dialog->priv->xml,
1315
 
+                                                     CAPPLET_SAVE_WIDGET_NAME));
1316
 
+        g_signal_connect (button,
1317
 
+                          "clicked",
1318
 
+                          G_CALLBACK (on_save_session_clicked),
1319
 
+                          dialog);
1320
 
+
1321
 
+        dialog->priv->manager = gsp_app_manager_get ();
1322
 
+        gsp_app_manager_fill (dialog->priv->manager);
1323
 
+        g_signal_connect_swapped (dialog->priv->manager, "added",
1324
 
+                                  G_CALLBACK (_app_added), dialog);
1325
 
+        g_signal_connect_swapped (dialog->priv->manager, "removed",
1326
 
+                                  G_CALLBACK (_app_removed), dialog);
1327
 
+
1328
 
+        populate_model (dialog);
1329
 
+}
1330
 
+
1331
 
+static GObject *
1332
 
+gsm_properties_dialog_constructor (GType                  type,
1333
 
+                                guint                  n_construct_properties,
1334
 
+                                GObjectConstructParam *construct_properties)
1335
 
+{
1336
 
+        GsmPropertiesDialog *dialog;
1337
 
+
1338
 
+        dialog = GSM_PROPERTIES_DIALOG (G_OBJECT_CLASS (gsm_properties_dialog_parent_class)->constructor (type,
1339
 
+                                                                                                                  n_construct_properties,
1340
 
+                                                                                                                  construct_properties));
1341
 
+
1342
 
+        setup_dialog (dialog);
1343
 
+
1344
 
+        gtk_widget_show (GTK_WIDGET (dialog));
1345
 
+
1346
 
+        return G_OBJECT (dialog);
1347
 
+}
1348
 
+
1349
 
+static void
1350
 
+gsm_properties_dialog_dispose (GObject *object)
1351
 
+{
1352
 
+        GsmPropertiesDialog *dialog;
1353
 
+
1354
 
+        g_return_if_fail (object != NULL);
1355
 
+        g_return_if_fail (GSM_IS_PROPERTIES_DIALOG (object));
1356
 
+
1357
 
+        dialog = GSM_PROPERTIES_DIALOG (object);
1358
 
+
1359
 
+        if (dialog->priv->xml != NULL) {
1360
 
+                g_object_unref (dialog->priv->xml);
1361
 
+                dialog->priv->xml = NULL;
1362
 
+        }
1363
 
+
1364
 
+        if (dialog->priv->settings != NULL) {
1365
 
+                g_object_unref (dialog->priv->settings);
1366
 
+                dialog->priv->settings = NULL;
1367
 
+        }
1368
 
+
1369
 
+        G_OBJECT_CLASS (gsm_properties_dialog_parent_class)->dispose (object);
1370
 
+
1371
 
+        /* it's important to do this after chaining to the parent dispose
1372
 
+         * method because we want to make sure the treeview has been disposed
1373
 
+         * and removed all its references to GspApp objects */
1374
 
+        if (dialog->priv->manager != NULL) {
1375
 
+                g_object_unref (dialog->priv->manager);
1376
 
+                dialog->priv->manager = NULL;
1377
 
+        }
1378
 
+}
1379
 
+
1380
 
+static void
1381
 
+gsm_properties_dialog_class_init (GsmPropertiesDialogClass *klass)
1382
 
+{
1383
 
+        GObjectClass   *object_class = G_OBJECT_CLASS (klass);
1384
 
+
1385
 
+        object_class->constructor = gsm_properties_dialog_constructor;
1386
 
+        object_class->dispose = gsm_properties_dialog_dispose;
1387
 
+        object_class->finalize = gsm_properties_dialog_finalize;
1388
 
+
1389
 
+        g_type_class_add_private (klass, sizeof (GsmPropertiesDialogPrivate));
1390
 
+}
1391
 
+
1392
 
+static void
1393
 
+gsm_properties_dialog_init (GsmPropertiesDialog *dialog)
1394
 
+{
1395
 
+        GtkWidget   *content_area;
1396
 
+        GtkWidget   *widget;
1397
 
+        GError      *error;
1398
 
+
1399
 
+        dialog->priv = GSM_PROPERTIES_DIALOG_GET_PRIVATE (dialog);
1400
 
+
1401
 
+        dialog->priv->settings = g_settings_new (SPC_SETTINGS_SCHEMA);
1402
 
+
1403
 
+        dialog->priv->xml = gtk_builder_new ();
1404
 
+        gtk_builder_set_translation_domain (dialog->priv->xml, GETTEXT_PACKAGE);
1405
 
+
1406
 
+        error = NULL;
1407
 
+        if (!gtk_builder_add_from_file (dialog->priv->xml,
1408
 
+                                        GTKBUILDER_DIR "/" GTKBUILDER_FILE,
1409
 
+                                        &error)) {
1410
 
+                if (error) {
1411
 
+                        g_warning ("Could not load capplet UI file: %s",
1412
 
+                                   error->message);
1413
 
+                        g_error_free (error);
1414
 
+                } else {
1415
 
+                        g_warning ("Could not load capplet UI file.");
1416
 
+                }
1417
 
+        }
1418
 
+
1419
 
+        content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
1420
 
+        widget = GTK_WIDGET (gtk_builder_get_object (dialog->priv->xml,
1421
 
+                                                     "main-notebook"));
1422
 
+        gtk_box_pack_start (GTK_BOX (content_area), widget, TRUE, TRUE, 0);
1423
 
+
1424
 
+        gtk_window_set_default_size (GTK_WINDOW (dialog), 600, 450);
1425
 
+        gtk_window_set_resizable (GTK_WINDOW (dialog), TRUE);
1426
 
+        gtk_container_set_border_width (GTK_CONTAINER (dialog), 6);
1427
 
+        gtk_box_set_spacing (GTK_BOX (content_area), 2);
1428
 
+        gtk_window_set_icon_name (GTK_WINDOW (dialog), "session-properties");
1429
 
+        gtk_window_set_title (GTK_WINDOW (dialog), _("Startup Applications Preferences"));
1430
 
+}
1431
 
+
1432
 
+static void
1433
 
+gsm_properties_dialog_finalize (GObject *object)
1434
 
+{
1435
 
+        GsmPropertiesDialog *dialog;
1436
 
+
1437
 
+        g_return_if_fail (object != NULL);
1438
 
+        g_return_if_fail (GSM_IS_PROPERTIES_DIALOG (object));
1439
 
+
1440
 
+        dialog = GSM_PROPERTIES_DIALOG (object);
1441
 
+
1442
 
+        g_return_if_fail (dialog->priv != NULL);
1443
 
+
1444
 
+        G_OBJECT_CLASS (gsm_properties_dialog_parent_class)->finalize (object);
1445
 
+}
1446
 
+
1447
 
+GtkWidget *
1448
 
+gsm_properties_dialog_new (void)
1449
 
+{
1450
 
+        GObject *object;
1451
 
+
1452
 
+        object = g_object_new (GSM_TYPE_PROPERTIES_DIALOG,
1453
 
+                               NULL);
1454
 
+
1455
 
+        return GTK_WIDGET (object);
1456
 
+}
1457
 
Index: gnome-session-3.28.0/capplet/gsm-properties-dialog.h
1458
 
===================================================================
1459
 
--- /dev/null
1460
 
+++ gnome-session-3.28.0/capplet/gsm-properties-dialog.h
1461
 
@@ -0,0 +1,57 @@
1462
 
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
1463
 
+ *
1464
 
+ * Copyright (C) 2008 William Jon McCann <jmccann@redhat.com>
1465
 
+ *
1466
 
+ * This program is free software; you can redistribute it and/or modify
1467
 
+ * it under the terms of the GNU General Public License as published by
1468
 
+ * the Free Software Foundation; either version 2 of the License, or
1469
 
+ * (at your option) any later version.
1470
 
+ *
1471
 
+ * This program is distributed in the hope that it will be useful,
1472
 
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1473
 
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1474
 
+ * GNU General Public License for more details.
1475
 
+ *
1476
 
+ * You should have received a copy of the GNU General Public License
1477
 
+ * along with this program; if not, write to the Free Software
1478
 
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1479
 
+ *
1480
 
+ */
1481
 
+
1482
 
+#ifndef __GSM_PROPERTIES_DIALOG_H
1483
 
+#define __GSM_PROPERTIES_DIALOG_H
1484
 
+
1485
 
+#include <glib-object.h>
1486
 
+#include <gtk/gtk.h>
1487
 
+
1488
 
+G_BEGIN_DECLS
1489
 
+
1490
 
+#define GSM_TYPE_PROPERTIES_DIALOG         (gsm_properties_dialog_get_type ())
1491
 
+#define GSM_PROPERTIES_DIALOG(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), GSM_TYPE_PROPERTIES_DIALOG, GsmPropertiesDialog))
1492
 
+#define GSM_PROPERTIES_DIALOG_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), GSM_TYPE_PROPERTIES_DIALOG, GsmPropertiesDialogClass))
1493
 
+#define GSM_IS_PROPERTIES_DIALOG(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSM_TYPE_PROPERTIES_DIALOG))
1494
 
+#define GSM_IS_PROPERTIES_DIALOG_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), GSM_TYPE_PROPERTIES_DIALOG))
1495
 
+#define GSM_PROPERTIES_DIALOG_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GSM_TYPE_PROPERTIES_DIALOG, GsmPropertiesDialogClass))
1496
 
+
1497
 
+typedef struct GsmPropertiesDialogPrivate GsmPropertiesDialogPrivate;
1498
 
+
1499
 
+typedef struct
1500
 
+{
1501
 
+        GtkDialog                   parent;
1502
 
+        GsmPropertiesDialogPrivate *priv;
1503
 
+} GsmPropertiesDialog;
1504
 
+
1505
 
+typedef struct
1506
 
+{
1507
 
+        GtkDialogClass   parent_class;
1508
 
+} GsmPropertiesDialogClass;
1509
 
+
1510
 
+GType                  gsm_properties_dialog_get_type           (void);
1511
 
+
1512
 
+GtkWidget            * gsm_properties_dialog_new                (void);
1513
 
+
1514
 
+#define GSM_PROPERTIES_ICON_SIZE GTK_ICON_SIZE_LARGE_TOOLBAR
1515
 
+
1516
 
+G_END_DECLS
1517
 
+
1518
 
+#endif /* __GSM_PROPERTIES_DIALOG_H */
1519
 
Index: gnome-session-3.28.0/capplet/gsp-app-manager.c
1520
 
===================================================================
1521
 
--- /dev/null
1522
 
+++ gnome-session-3.28.0/capplet/gsp-app-manager.c
1523
 
@@ -0,0 +1,593 @@
1524
 
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
1525
 
+ *
1526
 
+ * Copyright (C) 1999 Free Software Foundation, Inc.
1527
 
+ * Copyright (C) 2007, 2009 Vincent Untz.
1528
 
+ * Copyright (C) 2008 Lucas Rocha.
1529
 
+ * Copyright (C) 2008 William Jon McCann <jmccann@redhat.com>
1530
 
+ *
1531
 
+ * This program is free software; you can redistribute it and/or modify
1532
 
+ * it under the terms of the GNU General Public License as published by
1533
 
+ * the Free Software Foundation; either version 2 of the License, or
1534
 
+ * (at your option) any later version.
1535
 
+ *
1536
 
+ * This program is distributed in the hope that it will be useful,
1537
 
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1538
 
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1539
 
+ * GNU General Public License for more details.
1540
 
+ *
1541
 
+ * You should have received a copy of the GNU General Public License
1542
 
+ * along with this program; if not, write to the Free Software
1543
 
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1544
 
+ *
1545
 
+ */
1546
 
+
1547
 
+#include <string.h>
1548
 
+
1549
 
+#include "gsm-util.h"
1550
 
+#include "gsp-app.h"
1551
 
+
1552
 
+#include "gsp-app-manager.h"
1553
 
+
1554
 
+static GspAppManager *manager = NULL;
1555
 
+
1556
 
+typedef struct {
1557
 
+        char         *dir;
1558
 
+        int           index;
1559
 
+        GFileMonitor *monitor;
1560
 
+} GspXdgDir;
1561
 
+
1562
 
+struct _GspAppManagerPrivate {
1563
 
+        GSList *apps;
1564
 
+        GSList *dirs;
1565
 
+};
1566
 
+
1567
 
+#define GSP_APP_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GSP_TYPE_APP_MANAGER, GspAppManagerPrivate))
1568
 
+
1569
 
+
1570
 
+enum {
1571
 
+        ADDED,
1572
 
+        REMOVED,
1573
 
+        LAST_SIGNAL
1574
 
+};
1575
 
+
1576
 
+static guint gsp_app_manager_signals[LAST_SIGNAL] = { 0 };
1577
 
+
1578
 
+
1579
 
+G_DEFINE_TYPE (GspAppManager, gsp_app_manager, G_TYPE_OBJECT)
1580
 
+
1581
 
+static void     gsp_app_manager_dispose      (GObject       *object);
1582
 
+static void     gsp_app_manager_finalize     (GObject       *object);
1583
 
+static void     _gsp_app_manager_app_unref   (GspApp        *app,
1584
 
+                                              GspAppManager *manager);
1585
 
+static void     _gsp_app_manager_app_removed (GspAppManager *manager,
1586
 
+                                              GspApp        *app);
1587
 
+
1588
 
+static GspXdgDir *
1589
 
+_gsp_xdg_dir_new (const char *dir,
1590
 
+                  int         index)
1591
 
+{
1592
 
+        GspXdgDir *xdgdir;
1593
 
+
1594
 
+        xdgdir = g_slice_new (GspXdgDir);
1595
 
+
1596
 
+        xdgdir->dir = g_strdup (dir);
1597
 
+        xdgdir->index = index;
1598
 
+        xdgdir->monitor = NULL;
1599
 
+
1600
 
+        return xdgdir;
1601
 
+}
1602
 
+
1603
 
+static void
1604
 
+_gsp_xdg_dir_free (GspXdgDir *xdgdir)
1605
 
+{
1606
 
+        if (xdgdir->dir) {
1607
 
+                g_free (xdgdir->dir);
1608
 
+                xdgdir->dir = NULL;
1609
 
+        }
1610
 
+
1611
 
+        if (xdgdir->monitor) {
1612
 
+                g_file_monitor_cancel (xdgdir->monitor);
1613
 
+                g_object_unref (xdgdir->monitor);
1614
 
+                xdgdir->monitor = NULL;
1615
 
+        }
1616
 
+
1617
 
+        g_slice_free (GspXdgDir, xdgdir);
1618
 
+}
1619
 
+
1620
 
+static void
1621
 
+gsp_app_manager_class_init (GspAppManagerClass *class)
1622
 
+{
1623
 
+        GObjectClass *gobject_class = G_OBJECT_CLASS (class);
1624
 
+
1625
 
+        gobject_class->dispose  = gsp_app_manager_dispose;
1626
 
+        gobject_class->finalize = gsp_app_manager_finalize;
1627
 
+
1628
 
+        gsp_app_manager_signals[ADDED] =
1629
 
+                g_signal_new ("added",
1630
 
+                              G_TYPE_FROM_CLASS (gobject_class),
1631
 
+                              G_SIGNAL_RUN_LAST,
1632
 
+                              G_STRUCT_OFFSET (GspAppManagerClass,
1633
 
+                                               added),
1634
 
+                              NULL,
1635
 
+                              NULL,
1636
 
+                              g_cclosure_marshal_VOID__OBJECT,
1637
 
+                              G_TYPE_NONE, 1, G_TYPE_OBJECT);
1638
 
+
1639
 
+        gsp_app_manager_signals[REMOVED] =
1640
 
+                g_signal_new ("removed",
1641
 
+                              G_TYPE_FROM_CLASS (gobject_class),
1642
 
+                              G_SIGNAL_RUN_LAST,
1643
 
+                              G_STRUCT_OFFSET (GspAppManagerClass,
1644
 
+                                               removed),
1645
 
+                              NULL,
1646
 
+                              NULL,
1647
 
+                              g_cclosure_marshal_VOID__OBJECT,
1648
 
+                              G_TYPE_NONE, 1, G_TYPE_OBJECT);
1649
 
+
1650
 
+        g_type_class_add_private (class, sizeof (GspAppManagerPrivate));
1651
 
+}
1652
 
+
1653
 
+static void
1654
 
+gsp_app_manager_init (GspAppManager *manager)
1655
 
+{
1656
 
+        manager->priv = GSP_APP_MANAGER_GET_PRIVATE (manager);
1657
 
+
1658
 
+        memset (manager->priv, 0, sizeof (GspAppManagerPrivate));
1659
 
+}
1660
 
+
1661
 
+static void
1662
 
+gsp_app_manager_dispose (GObject *object)
1663
 
+{
1664
 
+        GspAppManager *manager;
1665
 
+
1666
 
+        g_return_if_fail (object != NULL);
1667
 
+        g_return_if_fail (GSP_IS_APP_MANAGER (object));
1668
 
+
1669
 
+        manager = GSP_APP_MANAGER (object);
1670
 
+
1671
 
+        /* we unref GspApp objects in dispose since they might need to
1672
 
+         * reference us during their dispose/finalize */
1673
 
+        g_slist_foreach (manager->priv->apps,
1674
 
+                         (GFunc) _gsp_app_manager_app_unref, manager);
1675
 
+        g_slist_free (manager->priv->apps);
1676
 
+        manager->priv->apps = NULL;
1677
 
+
1678
 
+        G_OBJECT_CLASS (gsp_app_manager_parent_class)->dispose (object);
1679
 
+}
1680
 
+
1681
 
+static void
1682
 
+gsp_app_manager_finalize (GObject *object)
1683
 
+{
1684
 
+        GspAppManager *manager;
1685
 
+
1686
 
+        g_return_if_fail (object != NULL);
1687
 
+        g_return_if_fail (GSP_IS_APP_MANAGER (object));
1688
 
+
1689
 
+        manager = GSP_APP_MANAGER (object);
1690
 
+
1691
 
+        g_slist_foreach (manager->priv->dirs,
1692
 
+                         (GFunc) _gsp_xdg_dir_free, NULL);
1693
 
+        g_slist_free (manager->priv->dirs);
1694
 
+        manager->priv->dirs = NULL;
1695
 
+
1696
 
+        G_OBJECT_CLASS (gsp_app_manager_parent_class)->finalize (object);
1697
 
+
1698
 
+        manager = NULL;
1699
 
+}
1700
 
+
1701
 
+static void
1702
 
+_gsp_app_manager_emit_added (GspAppManager *manager,
1703
 
+                             GspApp        *app)
1704
 
+{
1705
 
+        g_signal_emit (G_OBJECT (manager), gsp_app_manager_signals[ADDED],
1706
 
+                       0, app);
1707
 
+}
1708
 
+
1709
 
+static void
1710
 
+_gsp_app_manager_emit_removed (GspAppManager *manager,
1711
 
+                               GspApp        *app)
1712
 
+{
1713
 
+        g_signal_emit (G_OBJECT (manager), gsp_app_manager_signals[REMOVED],
1714
 
+                       0, app);
1715
 
+}
1716
 
+
1717
 
+/*
1718
 
+ * Directories
1719
 
+ */
1720
 
+
1721
 
+static int
1722
 
+gsp_app_manager_get_dir_index (GspAppManager *manager,
1723
 
+                               const char    *dir)
1724
 
+{
1725
 
+        GSList    *l;
1726
 
+        GspXdgDir *xdgdir;
1727
 
+
1728
 
+        g_return_val_if_fail (GSP_IS_APP_MANAGER (manager), -1);
1729
 
+        g_return_val_if_fail (dir != NULL, -1);
1730
 
+
1731
 
+        for (l = manager->priv->dirs; l != NULL; l = l->next) {
1732
 
+                xdgdir = l->data;
1733
 
+                if (strcmp (dir, xdgdir->dir) == 0) {
1734
 
+                        return xdgdir->index;
1735
 
+                }
1736
 
+        }
1737
 
+
1738
 
+        return -1;
1739
 
+}
1740
 
+
1741
 
+const char *
1742
 
+gsp_app_manager_get_dir (GspAppManager *manager,
1743
 
+                         unsigned int   index)
1744
 
+{
1745
 
+        GSList    *l;
1746
 
+        GspXdgDir *xdgdir;
1747
 
+
1748
 
+        g_return_val_if_fail (GSP_IS_APP_MANAGER (manager), NULL);
1749
 
+
1750
 
+        for (l = manager->priv->dirs; l != NULL; l = l->next) {
1751
 
+                xdgdir = l->data;
1752
 
+                if (index == xdgdir->index) {
1753
 
+                        return xdgdir->dir;
1754
 
+                }
1755
 
+        }
1756
 
+
1757
 
+        return NULL;
1758
 
+}
1759
 
+
1760
 
+static int
1761
 
+_gsp_app_manager_find_dir_with_basename (GspAppManager *manager,
1762
 
+                                         const char    *basename,
1763
 
+                                         int            minimum_index)
1764
 
+{
1765
 
+        GSList    *l;
1766
 
+        GspXdgDir *xdgdir;
1767
 
+        char      *path;
1768
 
+        GKeyFile  *keyfile;
1769
 
+        int        result = -1;
1770
 
+
1771
 
+        path = NULL;
1772
 
+        keyfile = g_key_file_new ();
1773
 
+
1774
 
+        for (l = manager->priv->dirs; l != NULL; l = l->next) {
1775
 
+                xdgdir = l->data;
1776
 
+
1777
 
+                if (xdgdir->index <= minimum_index) {
1778
 
+                        continue;
1779
 
+                }
1780
 
+
1781
 
+                g_free (path);
1782
 
+                path = g_build_filename (xdgdir->dir, basename, NULL);
1783
 
+                if (!g_file_test (path, G_FILE_TEST_EXISTS)) {
1784
 
+                        continue;
1785
 
+                }
1786
 
+
1787
 
+                if (!g_key_file_load_from_file (keyfile, path,
1788
 
+                                                G_KEY_FILE_NONE, NULL)) {
1789
 
+                        continue;
1790
 
+                }
1791
 
+
1792
 
+                /* the file exists and is readable */
1793
 
+                if (result == -1) {
1794
 
+                        result = xdgdir->index;
1795
 
+                } else {
1796
 
+                        result = MIN (result, xdgdir->index);
1797
 
+                }
1798
 
+        }
1799
 
+
1800
 
+        g_key_file_free (keyfile);
1801
 
+        g_free (path);
1802
 
+
1803
 
+        return result;
1804
 
+}
1805
 
+
1806
 
+static void
1807
 
+_gsp_app_manager_handle_delete (GspAppManager *manager,
1808
 
+                                GspApp        *app,
1809
 
+                                const char    *basename,
1810
 
+                                int            index)
1811
 
+{
1812
 
+        unsigned int position;
1813
 
+        unsigned int system_position;
1814
 
+
1815
 
+        position = gsp_app_get_xdg_position (app);
1816
 
+        system_position = gsp_app_get_xdg_system_position (app);
1817
 
+
1818
 
+        if (system_position < index) {
1819
 
+                /* it got deleted, but we don't even care about it */
1820
 
+                return;
1821
 
+        }
1822
 
+
1823
 
+        if (index < position) {
1824
 
+                /* it got deleted, but in a position earlier than the current
1825
 
+                 * one. This happens when the user file was changed and became
1826
 
+                 * identical to the system file; in this case, the user file is
1827
 
+                 * simply removed. */
1828
 
+                 g_assert (index == 0);
1829
 
+                 return;
1830
 
+        }
1831
 
+
1832
 
+        if (position == index &&
1833
 
+            (system_position == index || system_position == G_MAXUINT)) {
1834
 
+                /* the file used by the user was deleted, and there's no other
1835
 
+                 * file in system directories. So it really got deleted. */
1836
 
+                _gsp_app_manager_app_removed (manager, app);
1837
 
+                return;
1838
 
+        }
1839
 
+
1840
 
+        if (system_position == index) {
1841
 
+                /* then we know that position != index; we just hae to tell
1842
 
+                 * GspApp if there's still a system directory containing this
1843
 
+                 * basename */
1844
 
+                int new_system;
1845
 
+
1846
 
+                new_system = _gsp_app_manager_find_dir_with_basename (manager,
1847
 
+                                                                      basename,
1848
 
+                                                                      index);
1849
 
+                if (new_system < 0) {
1850
 
+                        gsp_app_set_xdg_system_position (app, G_MAXUINT);
1851
 
+                } else {
1852
 
+                        gsp_app_set_xdg_system_position (app, new_system);
1853
 
+                }
1854
 
+
1855
 
+                return;
1856
 
+        }
1857
 
+
1858
 
+        if (position == index) {
1859
 
+                /* then we know that system_position != G_MAXUINT; we need to
1860
 
+                 * tell GspApp to change position to system_position */
1861
 
+                const char *dir;
1862
 
+
1863
 
+                dir = gsp_app_manager_get_dir (manager, system_position);
1864
 
+                if (dir) {
1865
 
+                        char *path;
1866
 
+
1867
 
+                        path = g_build_filename (dir, basename, NULL);
1868
 
+                        gsp_app_reload_at (app, path,
1869
 
+                                           (unsigned int) system_position);
1870
 
+                        g_free (path);
1871
 
+                } else {
1872
 
+                        _gsp_app_manager_app_removed (manager, app);
1873
 
+                }
1874
 
+
1875
 
+                return;
1876
 
+        }
1877
 
+
1878
 
+        g_assert_not_reached ();
1879
 
+}
1880
 
+
1881
 
+static gboolean
1882
 
+gsp_app_manager_xdg_dir_monitor (GFileMonitor      *monitor,
1883
 
+                                 GFile             *child,
1884
 
+                                 GFile             *other_file,
1885
 
+                                 GFileMonitorEvent  flags,
1886
 
+                                 gpointer           data)
1887
 
+{
1888
 
+        GspAppManager *manager;
1889
 
+        GspApp        *old_app;
1890
 
+        GspApp        *app;
1891
 
+        GFile         *parent;
1892
 
+        char          *basename;
1893
 
+        char          *dir;
1894
 
+        char          *path;
1895
 
+        int            index;
1896
 
+
1897
 
+        manager = GSP_APP_MANAGER (data);
1898
 
+
1899
 
+        basename = g_file_get_basename (child);
1900
 
+        if (!g_str_has_suffix (basename, ".desktop")) {
1901
 
+                /* not a desktop file, we can ignore */
1902
 
+                g_free (basename);
1903
 
+                return TRUE;
1904
 
+        }
1905
 
+        old_app = gsp_app_manager_find_app_with_basename (manager, basename);
1906
 
+
1907
 
+        parent = g_file_get_parent (child);
1908
 
+        dir = g_file_get_path (parent);
1909
 
+        g_object_unref (parent);
1910
 
+
1911
 
+        index = gsp_app_manager_get_dir_index (manager, dir);
1912
 
+        if (index < 0) {
1913
 
+                /* not a directory we know; should never happen, though */
1914
 
+                g_free (dir);
1915
 
+                return TRUE;
1916
 
+        }
1917
 
+
1918
 
+        path = g_file_get_path (child);
1919
 
+
1920
 
+        switch (flags) {
1921
 
+        case G_FILE_MONITOR_EVENT_CHANGED:
1922
 
+        case G_FILE_MONITOR_EVENT_CREATED:
1923
 
+                /* we just do as if it was a new file: GspApp is clever enough
1924
 
+                 * to do the right thing */
1925
 
+                app = gsp_app_new (path, (unsigned int) index);
1926
 
+
1927
 
+                /* we didn't have this app before, so add it */
1928
 
+                if (old_app == NULL && app != NULL) {
1929
 
+                        gsp_app_manager_add (manager, app);
1930
 
+                        g_object_unref (app);
1931
 
+                }
1932
 
+                /* else: it was just updated, GspApp took care of
1933
 
+                 * sending the event */
1934
 
+                break;
1935
 
+        case G_FILE_MONITOR_EVENT_DELETED:
1936
 
+                if (!old_app) {
1937
 
+                        /* it got deleted, but we don't know about it, so
1938
 
+                         * nothing to do */
1939
 
+                        break;
1940
 
+                }
1941
 
+
1942
 
+                _gsp_app_manager_handle_delete (manager, old_app,
1943
 
+                                                basename, index);
1944
 
+                break;
1945
 
+        default:
1946
 
+                break;
1947
 
+        }
1948
 
+
1949
 
+        g_free (path);
1950
 
+        g_free (dir);
1951
 
+        g_free (basename);
1952
 
+
1953
 
+        return TRUE;
1954
 
+}
1955
 
+
1956
 
+/*
1957
 
+ * Initialization
1958
 
+ */
1959
 
+
1960
 
+static void
1961
 
+_gsp_app_manager_fill_from_dir (GspAppManager *manager,
1962
 
+                                GspXdgDir     *xdgdir)
1963
 
+{
1964
 
+        GFile      *file;
1965
 
+        GDir       *dir;
1966
 
+        const char *name;
1967
 
+
1968
 
+        file = g_file_new_for_path (xdgdir->dir);
1969
 
+        xdgdir->monitor = g_file_monitor_directory (file, G_FILE_MONITOR_NONE,
1970
 
+                                                    NULL, NULL);
1971
 
+        g_object_unref (file);
1972
 
+
1973
 
+        if (xdgdir->monitor) {
1974
 
+                g_signal_connect (xdgdir->monitor, "changed",
1975
 
+                                  G_CALLBACK (gsp_app_manager_xdg_dir_monitor),
1976
 
+                                  manager);
1977
 
+        }
1978
 
+
1979
 
+        dir = g_dir_open (xdgdir->dir, 0, NULL);
1980
 
+        if (!dir) {
1981
 
+                return;
1982
 
+        }
1983
 
+
1984
 
+        while ((name = g_dir_read_name (dir))) {
1985
 
+                GspApp *app;
1986
 
+                char   *desktop_file_path;
1987
 
+
1988
 
+                if (!g_str_has_suffix (name, ".desktop")) {
1989
 
+                        continue;
1990
 
+                }
1991
 
+
1992
 
+                desktop_file_path = g_build_filename (xdgdir->dir, name, NULL);
1993
 
+                app = gsp_app_new (desktop_file_path, xdgdir->index);
1994
 
+
1995
 
+                if (app != NULL) {
1996
 
+                        gsp_app_manager_add (manager, app);
1997
 
+                        g_object_unref (app);
1998
 
+                }
1999
 
+
2000
 
+                g_free (desktop_file_path);
2001
 
+        }
2002
 
+
2003
 
+        g_dir_close (dir);
2004
 
+}
2005
 
+
2006
 
+void
2007
 
+gsp_app_manager_fill (GspAppManager *manager)
2008
 
+{
2009
 
+        char **autostart_dirs;
2010
 
+        int    i;
2011
 
+
2012
 
+        if (manager->priv->apps != NULL)
2013
 
+                return;
2014
 
+
2015
 
+        autostart_dirs = gsm_util_get_autostart_dirs ();
2016
 
+        /* we always assume that the first directory is the user one */
2017
 
+        g_assert (g_str_has_prefix (autostart_dirs[0],
2018
 
+                                    g_get_user_config_dir ()));
2019
 
+
2020
 
+        for (i = 0; autostart_dirs[i] != NULL; i++) {
2021
 
+                GspXdgDir *xdgdir;
2022
 
+
2023
 
+                if (gsp_app_manager_get_dir_index (manager,
2024
 
+                                                   autostart_dirs[i]) >= 0) {
2025
 
+                        continue;
2026
 
+                }
2027
 
+
2028
 
+                xdgdir = _gsp_xdg_dir_new (autostart_dirs[i], i);
2029
 
+                manager->priv->dirs = g_slist_prepend (manager->priv->dirs,
2030
 
+                                                       xdgdir);
2031
 
+
2032
 
+                _gsp_app_manager_fill_from_dir (manager, xdgdir);
2033
 
+        }
2034
 
+
2035
 
+        g_strfreev (autostart_dirs);
2036
 
+}
2037
 
+
2038
 
+/*
2039
 
+ * App handling
2040
 
+ */
2041
 
+
2042
 
+static void
2043
 
+_gsp_app_manager_app_unref (GspApp        *app,
2044
 
+                            GspAppManager *manager)
2045
 
+{
2046
 
+        g_signal_handlers_disconnect_by_func (app,
2047
 
+                                              _gsp_app_manager_app_removed,
2048
 
+                                              manager);
2049
 
+        g_object_unref (app);
2050
 
+}
2051
 
+
2052
 
+static void
2053
 
+_gsp_app_manager_app_removed (GspAppManager *manager,
2054
 
+                              GspApp        *app)
2055
 
+{
2056
 
+        _gsp_app_manager_emit_removed (manager, app);
2057
 
+        manager->priv->apps = g_slist_remove (manager->priv->apps, app);
2058
 
+        _gsp_app_manager_app_unref (app, manager);
2059
 
+}
2060
 
+
2061
 
+void
2062
 
+gsp_app_manager_add (GspAppManager *manager,
2063
 
+                     GspApp        *app)
2064
 
+{
2065
 
+        g_return_if_fail (GSP_IS_APP_MANAGER (manager));
2066
 
+        g_return_if_fail (GSP_IS_APP (app));
2067
 
+
2068
 
+        manager->priv->apps = g_slist_prepend (manager->priv->apps,
2069
 
+                                               g_object_ref (app));
2070
 
+        g_signal_connect_swapped (app, "removed",
2071
 
+                                  G_CALLBACK (_gsp_app_manager_app_removed),
2072
 
+                                  manager);
2073
 
+        _gsp_app_manager_emit_added (manager, app);
2074
 
+}
2075
 
+
2076
 
+GspApp *
2077
 
+gsp_app_manager_find_app_with_basename (GspAppManager *manager,
2078
 
+                                        const char    *basename)
2079
 
+{
2080
 
+        GSList *l;
2081
 
+        GspApp *app;
2082
 
+
2083
 
+        g_return_val_if_fail (GSP_IS_APP_MANAGER (manager), NULL);
2084
 
+        g_return_val_if_fail (basename != NULL, NULL);
2085
 
+
2086
 
+        for (l = manager->priv->apps; l != NULL; l = l->next) {
2087
 
+                app = GSP_APP (l->data);
2088
 
+                if (strcmp (basename, gsp_app_get_basename (app)) == 0)
2089
 
+                        return app;
2090
 
+        }
2091
 
+
2092
 
+        return NULL;
2093
 
+}
2094
 
+
2095
 
+/*
2096
 
+ * Singleton
2097
 
+ */
2098
 
+
2099
 
+GspAppManager *
2100
 
+gsp_app_manager_get (void)
2101
 
+{
2102
 
+        if (manager == NULL) {
2103
 
+                manager = g_object_new (GSP_TYPE_APP_MANAGER, NULL);
2104
 
+                return manager;
2105
 
+        } else {
2106
 
+                return g_object_ref (manager);
2107
 
+        }
2108
 
+}
2109
 
+
2110
 
+GSList *
2111
 
+gsp_app_manager_get_apps (GspAppManager *manager)
2112
 
+{
2113
 
+        g_return_val_if_fail (GSP_IS_APP_MANAGER (manager), NULL);
2114
 
+
2115
 
+        return g_slist_copy (manager->priv->apps);
2116
 
+}
2117
 
Index: gnome-session-3.28.0/capplet/gsp-app-manager.h
2118
 
===================================================================
2119
 
--- /dev/null
2120
 
+++ gnome-session-3.28.0/capplet/gsp-app-manager.h
2121
 
@@ -0,0 +1,81 @@
2122
 
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
2123
 
+ *
2124
 
+ * Copyright (C) 1999 Free Software Foundation, Inc.
2125
 
+ * Copyright (C) 2007, 2009 Vincent Untz.
2126
 
+ * Copyright (C) 2008 Lucas Rocha.
2127
 
+ * Copyright (C) 2008 William Jon McCann <jmccann@redhat.com>
2128
 
+ *
2129
 
+ * This program is free software; you can redistribute it and/or modify
2130
 
+ * it under the terms of the GNU General Public License as published by
2131
 
+ * the Free Software Foundation; either version 2 of the License, or
2132
 
+ * (at your option) any later version.
2133
 
+ *
2134
 
+ * This program is distributed in the hope that it will be useful,
2135
 
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
2136
 
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2137
 
+ * GNU General Public License for more details.
2138
 
+ *
2139
 
+ * You should have received a copy of the GNU General Public License
2140
 
+ * along with this program; if not, write to the Free Software
2141
 
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2142
 
+ *
2143
 
+ */
2144
 
+
2145
 
+#ifndef __GSP_APP_MANAGER_H
2146
 
+#define __GSP_APP_MANAGER_H
2147
 
+
2148
 
+#include <glib-object.h>
2149
 
+
2150
 
+#include <gsp-app.h>
2151
 
+
2152
 
+G_BEGIN_DECLS
2153
 
+
2154
 
+#define GSP_TYPE_APP_MANAGER            (gsp_app_manager_get_type ())
2155
 
+#define GSP_APP_MANAGER(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GSP_TYPE_APP_MANAGER, GspAppManager))
2156
 
+#define GSP_APP_MANAGER_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GSP_TYPE_APP_MANAGER, GspAppManagerClass))
2157
 
+#define GSP_IS_APP_MANAGER(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GSP_TYPE_APP_MANAGER))
2158
 
+#define GSP_IS_APP_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GSP_TYPE_APP_MANAGER))
2159
 
+#define GSP_APP_MANAGER_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GSP_TYPE_APP_MANAGER, GspAppManagerClass))
2160
 
+
2161
 
+typedef struct _GspAppManager        GspAppManager;
2162
 
+typedef struct _GspAppManagerClass   GspAppManagerClass;
2163
 
+
2164
 
+typedef struct _GspAppManagerPrivate GspAppManagerPrivate;
2165
 
+
2166
 
+struct _GspAppManagerClass
2167
 
+{
2168
 
+        GObjectClass parent_class;
2169
 
+
2170
 
+        void (* added)   (GspAppManager *manager,
2171
 
+                          GspApp        *app);
2172
 
+        void (* removed) (GspAppManager *manager,
2173
 
+                          GspApp        *app);
2174
 
+};
2175
 
+
2176
 
+struct _GspAppManager
2177
 
+{
2178
 
+        GObject parent_instance;
2179
 
+
2180
 
+        GspAppManagerPrivate *priv;
2181
 
+};
2182
 
+
2183
 
+GType           gsp_app_manager_get_type               (void);
2184
 
+
2185
 
+GspAppManager  *gsp_app_manager_get                    (void);
2186
 
+
2187
 
+void            gsp_app_manager_fill                   (GspAppManager *manager);
2188
 
+
2189
 
+GSList         *gsp_app_manager_get_apps               (GspAppManager *manager);
2190
 
+
2191
 
+GspApp         *gsp_app_manager_find_app_with_basename (GspAppManager *manager,
2192
 
+                                                        const char    *basename);
2193
 
+
2194
 
+const char     *gsp_app_manager_get_dir                (GspAppManager *manager,
2195
 
+                                                        unsigned int   index);
2196
 
+
2197
 
+void            gsp_app_manager_add                    (GspAppManager *manager,
2198
 
+                                                        GspApp        *app);
2199
 
+
2200
 
+G_END_DECLS
2201
 
+
2202
 
+#endif /* __GSP_APP_MANAGER_H */
2203
 
Index: gnome-session-3.28.0/capplet/gsp-app.c
2204
 
===================================================================
2205
 
--- /dev/null
2206
 
+++ gnome-session-3.28.0/capplet/gsp-app.c
2207
 
@@ -0,0 +1,1129 @@
2208
 
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
2209
 
+ *
2210
 
+ * Copyright (C) 1999 Free Software Foundation, Inc.
2211
 
+ * Copyright (C) 2007, 2009 Vincent Untz.
2212
 
+ * Copyright (C) 2008 Lucas Rocha.
2213
 
+ * Copyright (C) 2008 William Jon McCann <jmccann@redhat.com>
2214
 
+ *
2215
 
+ * This program is free software; you can redistribute it and/or modify
2216
 
+ * it under the terms of the GNU General Public License as published by
2217
 
+ * the Free Software Foundation; either version 2 of the License, or
2218
 
+ * (at your option) any later version.
2219
 
+ *
2220
 
+ * This program is distributed in the hope that it will be useful,
2221
 
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
2222
 
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2223
 
+ * GNU General Public License for more details.
2224
 
+ *
2225
 
+ * You should have received a copy of the GNU General Public License
2226
 
+ * along with this program; if not, write to the Free Software
2227
 
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2228
 
+ *
2229
 
+ */
2230
 
+
2231
 
+#ifdef HAVE_CONFIG_H
2232
 
+#include <config.h>
2233
 
+#endif
2234
 
+
2235
 
+#include <string.h>
2236
 
+#include <sys/stat.h>
2237
 
+
2238
 
+#include <glib/gi18n.h>
2239
 
+#include <glib/gstdio.h>
2240
 
+
2241
 
+#include "gsm-app-dialog.h"
2242
 
+#include "gsm-properties-dialog.h"
2243
 
+#include "gsm-util.h"
2244
 
+#include "gsp-app-manager.h"
2245
 
+#include "gsp-keyfile.h"
2246
 
+
2247
 
+#include "gsp-app.h"
2248
 
+
2249
 
+#define GSP_APP_SAVE_DELAY 2
2250
 
+
2251
 
+#define GSP_ASP_SAVE_MASK_HIDDEN     0x0001
2252
 
+#define GSP_ASP_SAVE_MASK_ENABLED    0x0002
2253
 
+#define GSP_ASP_SAVE_MASK_NAME       0x0004
2254
 
+#define GSP_ASP_SAVE_MASK_EXEC       0x0008
2255
 
+#define GSP_ASP_SAVE_MASK_COMMENT    0x0010
2256
 
+#define GSP_ASP_SAVE_MASK_NO_DISPLAY 0x0020
2257
 
+#define GSP_ASP_SAVE_MASK_ALL        0xffff
2258
 
+
2259
 
+struct _GspAppPrivate {
2260
 
+        char         *basename;
2261
 
+        char         *path;
2262
 
+
2263
 
+        gboolean      hidden;
2264
 
+        gboolean      no_display;
2265
 
+        gboolean      enabled;
2266
 
+        gboolean      shown;
2267
 
+
2268
 
+        char         *name;
2269
 
+        char         *exec;
2270
 
+        char         *comment;
2271
 
+        char         *icon;
2272
 
+
2273
 
+        GIcon        *gicon;
2274
 
+        char         *description;
2275
 
+
2276
 
+        /* position of the directory in the XDG environment variable */
2277
 
+        unsigned int  xdg_position;
2278
 
+        /* position of the first system directory in the XDG env var containing
2279
 
+         * this autostart app too (G_MAXUINT means none) */
2280
 
+        unsigned int  xdg_system_position;
2281
 
+
2282
 
+        unsigned int  save_timeout;
2283
 
+        /* mask of what has changed */
2284
 
+        unsigned int  save_mask;
2285
 
+        /* path that contains the original file that needs to be saved */
2286
 
+        char         *old_system_path;
2287
 
+        /* after writing to file, we skip the next file monitor event of type
2288
 
+         * CHANGED */
2289
 
+        gboolean      skip_next_monitor_event;
2290
 
+};
2291
 
+
2292
 
+#define GSP_APP_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GSP_TYPE_APP, GspAppPrivate))
2293
 
+
2294
 
+
2295
 
+enum {
2296
 
+        CHANGED,
2297
 
+        REMOVED,
2298
 
+        LAST_SIGNAL
2299
 
+};
2300
 
+
2301
 
+static guint gsp_app_signals[LAST_SIGNAL] = { 0 };
2302
 
+
2303
 
+
2304
 
+G_DEFINE_TYPE (GspApp, gsp_app, G_TYPE_OBJECT)
2305
 
+
2306
 
+static void     gsp_app_dispose  (GObject *object);
2307
 
+static void     gsp_app_finalize (GObject *object);
2308
 
+static gboolean _gsp_app_save    (gpointer data);
2309
 
+
2310
 
+
2311
 
+static gboolean
2312
 
+_gsp_str_equal (const char *a,
2313
 
+                const char *b)
2314
 
+{
2315
 
+        if (g_strcmp0 (a, b) == 0) {
2316
 
+                return TRUE;
2317
 
+        }
2318
 
+
2319
 
+        if (a && !b && a[0] == '\0') {
2320
 
+                return TRUE;
2321
 
+        }
2322
 
+
2323
 
+        if (b && !a && b[0] == '\0') {
2324
 
+                return TRUE;
2325
 
+        }
2326
 
+
2327
 
+        return FALSE;
2328
 
+}
2329
 
+
2330
 
+
2331
 
+static void
2332
 
+gsp_app_class_init (GspAppClass *class)
2333
 
+{
2334
 
+        GObjectClass *gobject_class = G_OBJECT_CLASS (class);
2335
 
+
2336
 
+        gobject_class->dispose  = gsp_app_dispose;
2337
 
+        gobject_class->finalize = gsp_app_finalize;
2338
 
+
2339
 
+        gsp_app_signals[CHANGED] =
2340
 
+                g_signal_new ("changed",
2341
 
+                              G_TYPE_FROM_CLASS (gobject_class),
2342
 
+                              G_SIGNAL_RUN_LAST,
2343
 
+                              G_STRUCT_OFFSET (GspAppClass,
2344
 
+                                               changed),
2345
 
+                              NULL,
2346
 
+                              NULL,
2347
 
+                              g_cclosure_marshal_VOID__VOID,
2348
 
+                              G_TYPE_NONE, 0);
2349
 
+
2350
 
+        gsp_app_signals[REMOVED] =
2351
 
+                g_signal_new ("removed",
2352
 
+                              G_TYPE_FROM_CLASS (gobject_class),
2353
 
+                              G_SIGNAL_RUN_LAST,
2354
 
+                              G_STRUCT_OFFSET (GspAppClass,
2355
 
+                                               removed),
2356
 
+                              NULL,
2357
 
+                              NULL,
2358
 
+                              g_cclosure_marshal_VOID__VOID,
2359
 
+                              G_TYPE_NONE, 0);
2360
 
+
2361
 
+        g_type_class_add_private (class, sizeof (GspAppPrivate));
2362
 
+}
2363
 
+
2364
 
+static void
2365
 
+gsp_app_init (GspApp *app)
2366
 
+{
2367
 
+        app->priv = GSP_APP_GET_PRIVATE (app);
2368
 
+
2369
 
+        memset (app->priv, 0, sizeof (GspAppPrivate));
2370
 
+        app->priv->xdg_position        = G_MAXUINT;
2371
 
+        app->priv->xdg_system_position = G_MAXUINT;
2372
 
+}
2373
 
+
2374
 
+static void
2375
 
+_gsp_app_free_reusable_data (GspApp *app)
2376
 
+{
2377
 
+        if (app->priv->path) {
2378
 
+                g_free (app->priv->path);
2379
 
+                app->priv->path = NULL;
2380
 
+        }
2381
 
+
2382
 
+        if (app->priv->name) {
2383
 
+                g_free (app->priv->name);
2384
 
+                app->priv->name = NULL;
2385
 
+        }
2386
 
+
2387
 
+        if (app->priv->exec) {
2388
 
+                g_free (app->priv->exec);
2389
 
+                app->priv->exec = NULL;
2390
 
+        }
2391
 
+
2392
 
+        if (app->priv->comment) {
2393
 
+                g_free (app->priv->comment);
2394
 
+                app->priv->comment = NULL;
2395
 
+        }
2396
 
+
2397
 
+        if (app->priv->icon) {
2398
 
+                g_free (app->priv->icon);
2399
 
+                app->priv->icon = NULL;
2400
 
+        }
2401
 
+
2402
 
+        if (app->priv->gicon) {
2403
 
+                g_object_unref (app->priv->gicon);
2404
 
+                app->priv->gicon = NULL;
2405
 
+        }
2406
 
+
2407
 
+        if (app->priv->description) {
2408
 
+                g_free (app->priv->description);
2409
 
+                app->priv->description = NULL;
2410
 
+        }
2411
 
+
2412
 
+        if (app->priv->old_system_path) {
2413
 
+                g_free (app->priv->old_system_path);
2414
 
+                app->priv->old_system_path = NULL;
2415
 
+        }
2416
 
+}
2417
 
+
2418
 
+static void
2419
 
+gsp_app_dispose (GObject *object)
2420
 
+{
2421
 
+        GspApp *app;
2422
 
+
2423
 
+        g_return_if_fail (object != NULL);
2424
 
+        g_return_if_fail (GSP_IS_APP (object));
2425
 
+
2426
 
+        app = GSP_APP (object);
2427
 
+
2428
 
+        /* we save in dispose since we might need to reference GspAppManager */
2429
 
+        if (app->priv->save_timeout) {
2430
 
+                g_source_remove (app->priv->save_timeout);
2431
 
+                app->priv->save_timeout = 0;
2432
 
+
2433
 
+                /* save now */
2434
 
+                _gsp_app_save (app);
2435
 
+        }
2436
 
+
2437
 
+        G_OBJECT_CLASS (gsp_app_parent_class)->dispose (object);
2438
 
+}
2439
 
+
2440
 
+static void
2441
 
+gsp_app_finalize (GObject *object)
2442
 
+{
2443
 
+        GspApp *app;
2444
 
+
2445
 
+        g_return_if_fail (object != NULL);
2446
 
+        g_return_if_fail (GSP_IS_APP (object));
2447
 
+
2448
 
+        app = GSP_APP (object);
2449
 
+
2450
 
+        if (app->priv->basename) {
2451
 
+                g_free (app->priv->basename);
2452
 
+                app->priv->basename = NULL;
2453
 
+        }
2454
 
+
2455
 
+        _gsp_app_free_reusable_data (app);
2456
 
+
2457
 
+        G_OBJECT_CLASS (gsp_app_parent_class)->finalize (object);
2458
 
+}
2459
 
+
2460
 
+static void
2461
 
+_gsp_app_emit_changed (GspApp *app)
2462
 
+{
2463
 
+        g_signal_emit (G_OBJECT (app), gsp_app_signals[CHANGED], 0);
2464
 
+}
2465
 
+
2466
 
+static void
2467
 
+_gsp_app_emit_removed (GspApp *app)
2468
 
+{
2469
 
+        g_signal_emit (G_OBJECT (app), gsp_app_signals[REMOVED], 0);
2470
 
+}
2471
 
+
2472
 
+static void
2473
 
+_gsp_app_update_description (GspApp *app)
2474
 
+{
2475
 
+        const char *primary;
2476
 
+        const char *secondary;
2477
 
+
2478
 
+        if (!gsm_util_text_is_blank (app->priv->name)) {
2479
 
+                primary = app->priv->name;
2480
 
+        } else if (!gsm_util_text_is_blank (app->priv->exec)) {
2481
 
+                primary = app->priv->exec;
2482
 
+        } else {
2483
 
+                primary = _("No name");
2484
 
+        }
2485
 
+
2486
 
+        if (!gsm_util_text_is_blank (app->priv->comment)) {
2487
 
+                secondary = app->priv->comment;
2488
 
+        } else {
2489
 
+                secondary = _("No description");
2490
 
+        }
2491
 
+
2492
 
+        g_free (app->priv->description);
2493
 
+        app->priv->description = g_markup_printf_escaped ("<b>%s</b>\n%s",
2494
 
+                                                          primary,
2495
 
+                                                          secondary);
2496
 
+}
2497
 
+
2498
 
+/*
2499
 
+ * Saving
2500
 
+ */
2501
 
+
2502
 
+static void
2503
 
+_gsp_ensure_user_autostart_dir (void)
2504
 
+{
2505
 
+        char *dir;
2506
 
+
2507
 
+        dir = g_build_filename (g_get_user_config_dir (), "autostart", NULL);
2508
 
+        g_mkdir_with_parents (dir, S_IRWXU);
2509
 
+
2510
 
+        g_free (dir);
2511
 
+}
2512
 
+
2513
 
+static char *
2514
 
+_gsp_get_current_desktop ()
2515
 
+{
2516
 
+        static char *current_desktop = NULL;
2517
 
+
2518
 
+        /* Support XDG_CURRENT_DESKTOP environment variable; this can be used
2519
 
+         * to abuse gnome-session in non-GNOME desktops. */
2520
 
+        if (!current_desktop) {
2521
 
+               const char *desktop;
2522
 
+
2523
 
+                desktop = g_getenv ("XDG_CURRENT_DESKTOP");
2524
 
+
2525
 
+                /* Note: if XDG_CURRENT_DESKTOP is set but empty, do as if it
2526
 
+                 * was not set */
2527
 
+                if (!desktop || desktop[0] == '\0')
2528
 
+                        current_desktop = g_strdup ("GNOME");
2529
 
+                else
2530
 
+                        current_desktop = g_strdup (desktop);
2531
 
+        }
2532
 
+
2533
 
+        /* Using "*" means skipping desktop-related checks */
2534
 
+        if (g_strcmp0 (current_desktop, "*") == 0)
2535
 
+                return NULL;
2536
 
+
2537
 
+        return current_desktop;
2538
 
+}
2539
 
+
2540
 
+static gboolean
2541
 
+_gsp_app_user_equal_system (GspApp  *app,
2542
 
+                            char   **system_path)
2543
 
+{
2544
 
+        GspAppManager *manager;
2545
 
+        const char    *system_dir;
2546
 
+        char          *path;
2547
 
+        char          *str;
2548
 
+        GKeyFile      *keyfile;
2549
 
+
2550
 
+        manager = gsp_app_manager_get ();
2551
 
+        system_dir = gsp_app_manager_get_dir (manager,
2552
 
+                                              app->priv->xdg_system_position);
2553
 
+        g_object_unref (manager);
2554
 
+        if (!system_dir) {
2555
 
+                return FALSE;
2556
 
+        }
2557
 
+
2558
 
+        path = g_build_filename (system_dir, app->priv->basename, NULL);
2559
 
+
2560
 
+        keyfile = g_key_file_new ();
2561
 
+        if (!g_key_file_load_from_file (keyfile, path, G_KEY_FILE_NONE, NULL)) {
2562
 
+                g_free (path);
2563
 
+                g_key_file_free (keyfile);
2564
 
+                return FALSE;
2565
 
+        }
2566
 
+
2567
 
+        if (gsp_key_file_get_boolean (keyfile,
2568
 
+                                      G_KEY_FILE_DESKTOP_KEY_HIDDEN,
2569
 
+                                      FALSE) != app->priv->hidden ||
2570
 
+            gsp_key_file_get_boolean (keyfile,
2571
 
+                                      GSP_KEY_FILE_DESKTOP_KEY_AUTOSTART_ENABLED,
2572
 
+                                      TRUE) != app->priv->enabled ||
2573
 
+            gsp_key_file_get_shown (keyfile,
2574
 
+                                    _gsp_get_current_desktop ()) != app->priv->shown) {
2575
 
+                g_free (path);
2576
 
+                g_key_file_free (keyfile);
2577
 
+                return FALSE;
2578
 
+        }
2579
 
+
2580
 
+        if (gsp_key_file_get_boolean (keyfile,
2581
 
+                                      G_KEY_FILE_DESKTOP_KEY_NO_DISPLAY,
2582
 
+                                      FALSE) != app->priv->no_display) {
2583
 
+                g_free (path);
2584
 
+                g_key_file_free (keyfile);
2585
 
+                return FALSE;
2586
 
+        }
2587
 
+
2588
 
+        str = gsp_key_file_get_locale_string (keyfile,
2589
 
+                                              G_KEY_FILE_DESKTOP_KEY_NAME);
2590
 
+        if (!_gsp_str_equal (str, app->priv->name)) {
2591
 
+                g_free (str);
2592
 
+                g_free (path);
2593
 
+                g_key_file_free (keyfile);
2594
 
+                return FALSE;
2595
 
+        }
2596
 
+        g_free (str);
2597
 
+
2598
 
+        str = gsp_key_file_get_locale_string (keyfile,
2599
 
+                                              G_KEY_FILE_DESKTOP_KEY_COMMENT);
2600
 
+        if (!_gsp_str_equal (str, app->priv->comment)) {
2601
 
+                g_free (str);
2602
 
+                g_free (path);
2603
 
+                g_key_file_free (keyfile);
2604
 
+                return FALSE;
2605
 
+        }
2606
 
+        g_free (str);
2607
 
+
2608
 
+        str = gsp_key_file_get_string (keyfile,
2609
 
+                                       G_KEY_FILE_DESKTOP_KEY_EXEC);
2610
 
+        if (!_gsp_str_equal (str, app->priv->exec)) {
2611
 
+                g_free (str);
2612
 
+                g_free (path);
2613
 
+                g_key_file_free (keyfile);
2614
 
+                return FALSE;
2615
 
+        }
2616
 
+        g_free (str);
2617
 
+
2618
 
+        str = gsp_key_file_get_locale_string (keyfile,
2619
 
+                                              G_KEY_FILE_DESKTOP_KEY_ICON);
2620
 
+        if (!_gsp_str_equal (str, app->priv->icon)) {
2621
 
+                g_free (str);
2622
 
+                g_free (path);
2623
 
+                g_key_file_free (keyfile);
2624
 
+                return FALSE;
2625
 
+        }
2626
 
+        g_free (str);
2627
 
+
2628
 
+        g_key_file_free (keyfile);
2629
 
+
2630
 
+        *system_path = path;
2631
 
+
2632
 
+        return TRUE;
2633
 
+}
2634
 
+
2635
 
+static inline void
2636
 
+_gsp_app_save_done_success (GspApp *app)
2637
 
+{
2638
 
+        app->priv->save_mask = 0;
2639
 
+
2640
 
+        if (app->priv->old_system_path) {
2641
 
+                g_free (app->priv->old_system_path);
2642
 
+                app->priv->old_system_path = NULL;
2643
 
+        }
2644
 
+}
2645
 
+
2646
 
+static gboolean
2647
 
+_gsp_app_save (gpointer data)
2648
 
+{
2649
 
+        GspApp   *app;
2650
 
+        char     *use_path;
2651
 
+        GKeyFile *keyfile;
2652
 
+        GError   *error;
2653
 
+
2654
 
+        app = GSP_APP (data);
2655
 
+
2656
 
+        /* first check if removing the data from the user dir and using the
2657
 
+         * data from the system dir is enough -- this helps us keep clean the
2658
 
+         * user config dir by removing unneeded files */
2659
 
+        if (_gsp_app_user_equal_system (app, &use_path)) {
2660
 
+                if (g_file_test (app->priv->path, G_FILE_TEST_EXISTS)) {
2661
 
+                        g_remove (app->priv->path);
2662
 
+                }
2663
 
+
2664
 
+                g_free (app->priv->path);
2665
 
+                app->priv->path = use_path;
2666
 
+
2667
 
+                app->priv->xdg_position = app->priv->xdg_system_position;
2668
 
+
2669
 
+                _gsp_app_save_done_success (app);
2670
 
+                return FALSE;
2671
 
+        }
2672
 
+
2673
 
+        if (app->priv->old_system_path)
2674
 
+                use_path = app->priv->old_system_path;
2675
 
+        else
2676
 
+                use_path = app->priv->path;
2677
 
+
2678
 
+        keyfile = g_key_file_new ();
2679
 
+
2680
 
+        error = NULL;
2681
 
+        g_key_file_load_from_file (keyfile, use_path,
2682
 
+                                   G_KEY_FILE_KEEP_COMMENTS|G_KEY_FILE_KEEP_TRANSLATIONS,
2683
 
+                                   &error);
2684
 
+
2685
 
+        if (error) {
2686
 
+                g_error_free (error);
2687
 
+                gsp_key_file_populate (keyfile);
2688
 
+        }
2689
 
+
2690
 
+        if (app->priv->save_mask & GSP_ASP_SAVE_MASK_HIDDEN) {
2691
 
+                gsp_key_file_set_boolean (keyfile,
2692
 
+                                          G_KEY_FILE_DESKTOP_KEY_HIDDEN,
2693
 
+                                          app->priv->hidden);
2694
 
+        }
2695
 
+
2696
 
+        if (app->priv->save_mask & GSP_ASP_SAVE_MASK_NO_DISPLAY) {
2697
 
+                gsp_key_file_set_boolean (keyfile,
2698
 
+                                          G_KEY_FILE_DESKTOP_KEY_NO_DISPLAY,
2699
 
+                                          app->priv->no_display);
2700
 
+        }
2701
 
+
2702
 
+        if (app->priv->save_mask & GSP_ASP_SAVE_MASK_ENABLED) {
2703
 
+                gsp_key_file_set_boolean (keyfile,
2704
 
+                                          GSP_KEY_FILE_DESKTOP_KEY_AUTOSTART_ENABLED,
2705
 
+                                          app->priv->enabled);
2706
 
+        }
2707
 
+
2708
 
+        if (app->priv->save_mask & GSP_ASP_SAVE_MASK_NAME) {
2709
 
+                gsp_key_file_set_locale_string (keyfile,
2710
 
+                                                G_KEY_FILE_DESKTOP_KEY_NAME,
2711
 
+                                                app->priv->name);
2712
 
+                gsp_key_file_ensure_C_key (keyfile, G_KEY_FILE_DESKTOP_KEY_NAME);
2713
 
+        }
2714
 
+
2715
 
+        if (app->priv->save_mask & GSP_ASP_SAVE_MASK_COMMENT) {
2716
 
+                gsp_key_file_set_locale_string (keyfile,
2717
 
+                                                G_KEY_FILE_DESKTOP_KEY_COMMENT,
2718
 
+                                                app->priv->comment);
2719
 
+                gsp_key_file_ensure_C_key (keyfile, G_KEY_FILE_DESKTOP_KEY_COMMENT);
2720
 
+        }
2721
 
+
2722
 
+        if (app->priv->save_mask & GSP_ASP_SAVE_MASK_EXEC) {
2723
 
+                gsp_key_file_set_string (keyfile,
2724
 
+                                         G_KEY_FILE_DESKTOP_KEY_EXEC,
2725
 
+                                         app->priv->exec);
2726
 
+        }
2727
 
+
2728
 
+        _gsp_ensure_user_autostart_dir ();
2729
 
+        if (gsp_key_file_to_file (keyfile, app->priv->path, NULL)) {
2730
 
+                app->priv->skip_next_monitor_event = TRUE;
2731
 
+                _gsp_app_save_done_success (app);
2732
 
+        } else {
2733
 
+                g_warning ("Could not save %s file", app->priv->path);
2734
 
+        }
2735
 
+
2736
 
+        g_key_file_free (keyfile);
2737
 
+
2738
 
+        app->priv->save_timeout = 0;
2739
 
+        return FALSE;
2740
 
+}
2741
 
+
2742
 
+static void
2743
 
+_gsp_app_queue_save (GspApp *app)
2744
 
+{
2745
 
+        if (app->priv->save_timeout) {
2746
 
+                g_source_remove (app->priv->save_timeout);
2747
 
+                app->priv->save_timeout = 0;
2748
 
+        }
2749
 
+
2750
 
+        /* if the file was not in the user directory, then we'll create a copy
2751
 
+         * there */
2752
 
+        if (app->priv->xdg_position != 0) {
2753
 
+                app->priv->xdg_position = 0;
2754
 
+
2755
 
+                if (app->priv->old_system_path == NULL) {
2756
 
+                        app->priv->old_system_path = app->priv->path;
2757
 
+                        /* if old_system_path was not NULL, then it means we
2758
 
+                         * tried to save and we failed; in that case, we want
2759
 
+                         * to try again and use the old file as a basis again */
2760
 
+                }
2761
 
+
2762
 
+                app->priv->path = g_build_filename (g_get_user_config_dir (),
2763
 
+                                                    "autostart",
2764
 
+                                                    app->priv->basename, NULL);
2765
 
+        }
2766
 
+
2767
 
+        app->priv->save_timeout = g_timeout_add_seconds (GSP_APP_SAVE_DELAY,
2768
 
+                                                         _gsp_app_save,
2769
 
+                                                         app);
2770
 
+}
2771
 
+
2772
 
+/*
2773
 
+ * Accessors
2774
 
+ */
2775
 
+
2776
 
+const char *
2777
 
+gsp_app_get_basename (GspApp *app)
2778
 
+{
2779
 
+        g_return_val_if_fail (GSP_IS_APP (app), NULL);
2780
 
+
2781
 
+        return app->priv->basename;
2782
 
+}
2783
 
+
2784
 
+const char *
2785
 
+gsp_app_get_path (GspApp *app)
2786
 
+{
2787
 
+        g_return_val_if_fail (GSP_IS_APP (app), NULL);
2788
 
+
2789
 
+        return app->priv->path;
2790
 
+}
2791
 
+
2792
 
+gboolean
2793
 
+gsp_app_get_hidden (GspApp *app)
2794
 
+{
2795
 
+        g_return_val_if_fail (GSP_IS_APP (app), FALSE);
2796
 
+
2797
 
+        return app->priv->hidden;
2798
 
+}
2799
 
+
2800
 
+gboolean
2801
 
+gsp_app_get_display (GspApp *app)
2802
 
+{
2803
 
+        g_return_val_if_fail (GSP_IS_APP (app), FALSE);
2804
 
+
2805
 
+        return !app->priv->no_display;
2806
 
+}
2807
 
+
2808
 
+gboolean
2809
 
+gsp_app_get_enabled (GspApp *app)
2810
 
+{
2811
 
+        g_return_val_if_fail (GSP_IS_APP (app), FALSE);
2812
 
+
2813
 
+        return app->priv->enabled;
2814
 
+}
2815
 
+
2816
 
+void
2817
 
+gsp_app_set_enabled (GspApp   *app,
2818
 
+                     gboolean  enabled)
2819
 
+{
2820
 
+        g_return_if_fail (GSP_IS_APP (app));
2821
 
+
2822
 
+        if (enabled == app->priv->enabled) {
2823
 
+                return;
2824
 
+        }
2825
 
+
2826
 
+        app->priv->enabled = enabled;
2827
 
+        app->priv->save_mask |= GSP_ASP_SAVE_MASK_ENABLED;
2828
 
+
2829
 
+        _gsp_app_queue_save (app);
2830
 
+        _gsp_app_emit_changed (app);
2831
 
+}
2832
 
+
2833
 
+gboolean
2834
 
+gsp_app_get_shown (GspApp *app)
2835
 
+{
2836
 
+        g_return_val_if_fail (GSP_IS_APP (app), FALSE);
2837
 
+
2838
 
+        return app->priv->shown;
2839
 
+}
2840
 
+
2841
 
+const char *
2842
 
+gsp_app_get_name (GspApp *app)
2843
 
+{
2844
 
+        g_return_val_if_fail (GSP_IS_APP (app), NULL);
2845
 
+
2846
 
+        return app->priv->name;
2847
 
+}
2848
 
+
2849
 
+const char *
2850
 
+gsp_app_get_exec (GspApp *app)
2851
 
+{
2852
 
+        g_return_val_if_fail (GSP_IS_APP (app), NULL);
2853
 
+
2854
 
+        return app->priv->exec;
2855
 
+}
2856
 
+
2857
 
+const char *
2858
 
+gsp_app_get_comment (GspApp *app)
2859
 
+{
2860
 
+        g_return_val_if_fail (GSP_IS_APP (app), NULL);
2861
 
+
2862
 
+        return app->priv->comment;
2863
 
+}
2864
 
+
2865
 
+GIcon *
2866
 
+gsp_app_get_icon (GspApp *app)
2867
 
+{
2868
 
+        g_return_val_if_fail (GSP_IS_APP (app), NULL);
2869
 
+
2870
 
+        if (app->priv->gicon) {
2871
 
+                return g_object_ref (app->priv->gicon);
2872
 
+        } else {
2873
 
+                return NULL;
2874
 
+        }
2875
 
+}
2876
 
+
2877
 
+unsigned int
2878
 
+gsp_app_get_xdg_position (GspApp *app)
2879
 
+{
2880
 
+        g_return_val_if_fail (GSP_IS_APP (app), G_MAXUINT);
2881
 
+
2882
 
+        return app->priv->xdg_position;
2883
 
+}
2884
 
+
2885
 
+unsigned int
2886
 
+gsp_app_get_xdg_system_position (GspApp *app)
2887
 
+{
2888
 
+        g_return_val_if_fail (GSP_IS_APP (app), G_MAXUINT);
2889
 
+
2890
 
+        return app->priv->xdg_system_position;
2891
 
+}
2892
 
+
2893
 
+void
2894
 
+gsp_app_set_xdg_system_position (GspApp       *app,
2895
 
+                                 unsigned int  position)
2896
 
+{
2897
 
+        g_return_if_fail (GSP_IS_APP (app));
2898
 
+
2899
 
+        app->priv->xdg_system_position = position;
2900
 
+}
2901
 
+
2902
 
+const char *
2903
 
+gsp_app_get_description (GspApp *app)
2904
 
+{
2905
 
+        g_return_val_if_fail (GSP_IS_APP (app), NULL);
2906
 
+
2907
 
+        return app->priv->description;
2908
 
+}
2909
 
+
2910
 
+/*
2911
 
+ * High-level edition
2912
 
+ */
2913
 
+
2914
 
+void
2915
 
+gsp_app_update (GspApp     *app,
2916
 
+                const char *name,
2917
 
+                const char *comment,
2918
 
+                const char *exec)
2919
 
+{
2920
 
+        gboolean    changed;
2921
 
+
2922
 
+        g_return_if_fail (GSP_IS_APP (app));
2923
 
+
2924
 
+        changed = FALSE;
2925
 
+
2926
 
+        if (!_gsp_str_equal (name, app->priv->name)) {
2927
 
+                changed = TRUE;
2928
 
+                g_free (app->priv->name);
2929
 
+                app->priv->name = g_strdup (name);
2930
 
+                app->priv->save_mask |= GSP_ASP_SAVE_MASK_NAME;
2931
 
+        }
2932
 
+
2933
 
+        if (!_gsp_str_equal (comment, app->priv->comment)) {
2934
 
+                changed = TRUE;
2935
 
+                g_free (app->priv->comment);
2936
 
+                app->priv->comment = g_strdup (comment);
2937
 
+                app->priv->save_mask |= GSP_ASP_SAVE_MASK_COMMENT;
2938
 
+        }
2939
 
+
2940
 
+        if (changed) {
2941
 
+                _gsp_app_update_description (app);
2942
 
+        }
2943
 
+
2944
 
+        if (!_gsp_str_equal (exec, app->priv->exec)) {
2945
 
+                changed = TRUE;
2946
 
+                g_free (app->priv->exec);
2947
 
+                app->priv->exec = g_strdup (exec);
2948
 
+                app->priv->save_mask |= GSP_ASP_SAVE_MASK_EXEC;
2949
 
+        }
2950
 
+
2951
 
+        if (changed) {
2952
 
+                _gsp_app_queue_save (app);
2953
 
+                _gsp_app_emit_changed (app);
2954
 
+        }
2955
 
+}
2956
 
+
2957
 
+void
2958
 
+gsp_app_delete (GspApp *app)
2959
 
+{
2960
 
+        g_return_if_fail (GSP_IS_APP (app));
2961
 
+
2962
 
+        if (app->priv->xdg_position == 0 &&
2963
 
+            app->priv->xdg_system_position == G_MAXUINT) {
2964
 
+                /* exists in user directory only */
2965
 
+                if (app->priv->save_timeout) {
2966
 
+                        g_source_remove (app->priv->save_timeout);
2967
 
+                        app->priv->save_timeout = 0;
2968
 
+                }
2969
 
+
2970
 
+                if (g_file_test (app->priv->path, G_FILE_TEST_EXISTS)) {
2971
 
+                        g_remove (app->priv->path);
2972
 
+                }
2973
 
+
2974
 
+                /* for extra safety */
2975
 
+                app->priv->hidden = TRUE;
2976
 
+                app->priv->save_mask |= GSP_ASP_SAVE_MASK_HIDDEN;
2977
 
+
2978
 
+                _gsp_app_emit_removed (app);
2979
 
+        } else {
2980
 
+                /* also exists in system directory, so we have to keep a file
2981
 
+                 * in the user directory */
2982
 
+                app->priv->hidden = TRUE;
2983
 
+                app->priv->save_mask |= GSP_ASP_SAVE_MASK_HIDDEN;
2984
 
+
2985
 
+                _gsp_app_queue_save (app);
2986
 
+                _gsp_app_emit_changed (app);
2987
 
+        }
2988
 
+}
2989
 
+
2990
 
+/*
2991
 
+ * New autostart app
2992
 
+ */
2993
 
+
2994
 
+void
2995
 
+gsp_app_reload_at (GspApp       *app,
2996
 
+                   const char   *path,
2997
 
+                   unsigned int  xdg_position)
2998
 
+{
2999
 
+        g_return_if_fail (GSP_IS_APP (app));
3000
 
+
3001
 
+        app->priv->xdg_position = G_MAXUINT;
3002
 
+        gsp_app_new (path, xdg_position);
3003
 
+}
3004
 
+
3005
 
+GspApp *
3006
 
+gsp_app_new (const char   *path,
3007
 
+             unsigned int  xdg_position)
3008
 
+{
3009
 
+        GspAppManager *manager;
3010
 
+        GspApp        *app;
3011
 
+        GKeyFile      *keyfile;
3012
 
+        char          *basename;
3013
 
+        gboolean       new;
3014
 
+
3015
 
+        basename = g_path_get_basename (path);
3016
 
+
3017
 
+        manager = gsp_app_manager_get ();
3018
 
+        app = gsp_app_manager_find_app_with_basename (manager, basename);
3019
 
+        g_object_unref (manager);
3020
 
+
3021
 
+        new = (app == NULL);
3022
 
+
3023
 
+        if (!new) {
3024
 
+                if (app->priv->xdg_position == xdg_position) {
3025
 
+                        if (app->priv->skip_next_monitor_event) {
3026
 
+                                app->priv->skip_next_monitor_event = FALSE;
3027
 
+                                return NULL;
3028
 
+                        }
3029
 
+                        /* else: the file got changed but not by us, we'll
3030
 
+                         * update our data from disk */
3031
 
+                }
3032
 
+
3033
 
+                if (app->priv->xdg_position < xdg_position ||
3034
 
+                    app->priv->save_timeout != 0) {
3035
 
+                        /* we don't really care about this file, since we
3036
 
+                         * already have something with a higher priority, or
3037
 
+                         * we're going to write something in the user config
3038
 
+                         * anyway.
3039
 
+                         * Note: xdg_position >= 1 so it's a system dir */
3040
 
+                        app->priv->xdg_system_position = MIN (xdg_position,
3041
 
+                                                              app->priv->xdg_system_position);
3042
 
+                        return NULL;
3043
 
+                }
3044
 
+        }
3045
 
+
3046
 
+        keyfile = g_key_file_new ();
3047
 
+        if (!g_key_file_load_from_file (keyfile, path, G_KEY_FILE_NONE, NULL)) {
3048
 
+                g_key_file_free (keyfile);
3049
 
+                g_free (basename);
3050
 
+                return NULL;
3051
 
+        }
3052
 
+
3053
 
+        if (new) {
3054
 
+                app = g_object_new (GSP_TYPE_APP, NULL);
3055
 
+                app->priv->basename = basename;
3056
 
+        } else {
3057
 
+                g_free (basename);
3058
 
+                _gsp_app_free_reusable_data (app);
3059
 
+        }
3060
 
+
3061
 
+        app->priv->path = g_strdup (path);
3062
 
+
3063
 
+        app->priv->hidden = gsp_key_file_get_boolean (keyfile,
3064
 
+                                                      G_KEY_FILE_DESKTOP_KEY_HIDDEN,
3065
 
+                                                      FALSE);
3066
 
+        app->priv->no_display = gsp_key_file_get_boolean (keyfile,
3067
 
+                                                          G_KEY_FILE_DESKTOP_KEY_NO_DISPLAY,
3068
 
+                                                          FALSE);
3069
 
+        app->priv->enabled = gsp_key_file_get_boolean (keyfile,
3070
 
+                                                       GSP_KEY_FILE_DESKTOP_KEY_AUTOSTART_ENABLED,
3071
 
+                                                       TRUE);
3072
 
+        app->priv->shown = gsp_key_file_get_shown (keyfile,
3073
 
+                                                   _gsp_get_current_desktop ());
3074
 
+
3075
 
+        app->priv->name = gsp_key_file_get_locale_string (keyfile,
3076
 
+                                                          G_KEY_FILE_DESKTOP_KEY_NAME);
3077
 
+        app->priv->exec = gsp_key_file_get_string (keyfile,
3078
 
+                                                   G_KEY_FILE_DESKTOP_KEY_EXEC);
3079
 
+        app->priv->comment = gsp_key_file_get_locale_string (keyfile,
3080
 
+                                                             G_KEY_FILE_DESKTOP_KEY_COMMENT);
3081
 
+
3082
 
+        if (gsm_util_text_is_blank (app->priv->name)) {
3083
 
+                g_free (app->priv->name);
3084
 
+                app->priv->name = g_strdup (app->priv->exec);
3085
 
+        }
3086
 
+
3087
 
+        app->priv->icon = gsp_key_file_get_locale_string (keyfile,
3088
 
+                                                          G_KEY_FILE_DESKTOP_KEY_ICON);
3089
 
+
3090
 
+        if (app->priv->icon) {
3091
 
+                /* look at icon and see if it's a themed icon or not */
3092
 
+                if (g_path_is_absolute (app->priv->icon)) {
3093
 
+                        GFile *iconfile;
3094
 
+
3095
 
+                        iconfile = g_file_new_for_path (app->priv->icon);
3096
 
+                        app->priv->gicon = g_file_icon_new (iconfile);
3097
 
+                        g_object_unref (iconfile);
3098
 
+                } else {
3099
 
+                        app->priv->gicon = g_themed_icon_new (app->priv->icon);
3100
 
+                }
3101
 
+        } else {
3102
 
+                app->priv->gicon = NULL;
3103
 
+        }
3104
 
+
3105
 
+        g_key_file_free (keyfile);
3106
 
+
3107
 
+        _gsp_app_update_description (app);
3108
 
+
3109
 
+        if (xdg_position > 0) {
3110
 
+                g_assert (xdg_position <= app->priv->xdg_system_position);
3111
 
+                app->priv->xdg_system_position = xdg_position;
3112
 
+        }
3113
 
+        /* else we keep the old value (which is G_MAXUINT if it wasn't set) */
3114
 
+        app->priv->xdg_position = xdg_position;
3115
 
+
3116
 
+        g_assert (!new || app->priv->save_timeout == 0);
3117
 
+        app->priv->save_timeout = 0;
3118
 
+        app->priv->old_system_path = NULL;
3119
 
+        app->priv->skip_next_monitor_event = FALSE;
3120
 
+
3121
 
+        if (!new) {
3122
 
+                _gsp_app_emit_changed (app);
3123
 
+        }
3124
 
+
3125
 
+        return app;
3126
 
+}
3127
 
+
3128
 
+static char *
3129
 
+_gsp_find_free_basename (const char *suggested_basename)
3130
 
+{
3131
 
+        GspAppManager *manager;
3132
 
+        char          *base_path;
3133
 
+        char          *filename;
3134
 
+        char          *basename;
3135
 
+        int            i;
3136
 
+
3137
 
+        if (g_str_has_suffix (suggested_basename, ".desktop")) {
3138
 
+                char *basename_no_ext;
3139
 
+
3140
 
+                basename_no_ext = g_strndup (suggested_basename,
3141
 
+                                             strlen (suggested_basename) - strlen (".desktop"));
3142
 
+                base_path = g_build_filename (g_get_user_config_dir (),
3143
 
+                                              "autostart",
3144
 
+                                              basename_no_ext, NULL);
3145
 
+                g_free (basename_no_ext);
3146
 
+        } else {
3147
 
+                base_path = g_build_filename (g_get_user_config_dir (),
3148
 
+                                              "autostart",
3149
 
+                                              suggested_basename, NULL);
3150
 
+        }
3151
 
+
3152
 
+        filename = g_strdup_printf ("%s.desktop", base_path);
3153
 
+        basename = g_path_get_basename (filename);
3154
 
+
3155
 
+        manager = gsp_app_manager_get ();
3156
 
+
3157
 
+        i = 1;
3158
 
+#define _GSP_FIND_MAX_TRY 10000
3159
 
+        while (gsp_app_manager_find_app_with_basename (manager,
3160
 
+                                                       basename) != NULL &&
3161
 
+               g_file_test (filename, G_FILE_TEST_EXISTS) &&
3162
 
+               i < _GSP_FIND_MAX_TRY) {
3163
 
+                g_free (filename);
3164
 
+                g_free (basename);
3165
 
+
3166
 
+                filename = g_strdup_printf ("%s-%d.desktop", base_path, i);
3167
 
+                basename = g_path_get_basename (filename);
3168
 
+
3169
 
+                i++;
3170
 
+        }
3171
 
+
3172
 
+        g_object_unref (manager);
3173
 
+
3174
 
+        g_free (base_path);
3175
 
+        g_free (filename);
3176
 
+
3177
 
+        if (i == _GSP_FIND_MAX_TRY) {
3178
 
+                g_free (basename);
3179
 
+                return NULL;
3180
 
+        }
3181
 
+
3182
 
+        return basename;
3183
 
+}
3184
 
+
3185
 
+void
3186
 
+gsp_app_create (const char *name,
3187
 
+                const char *comment,
3188
 
+                const char *exec)
3189
 
+{
3190
 
+        GspAppManager  *manager;
3191
 
+        GspApp         *app;
3192
 
+        char           *basename;
3193
 
+        char          **argv;
3194
 
+        int             argc;
3195
 
+
3196
 
+        g_return_if_fail (!gsm_util_text_is_blank (exec));
3197
 
+
3198
 
+        if (!g_shell_parse_argv (exec, &argc, &argv, NULL)) {
3199
 
+                return;
3200
 
+        }
3201
 
+
3202
 
+        basename = _gsp_find_free_basename (argv[0]);
3203
 
+        g_strfreev (argv);
3204
 
+        if (basename == NULL) {
3205
 
+                return;
3206
 
+        }
3207
 
+
3208
 
+        app = g_object_new (GSP_TYPE_APP, NULL);
3209
 
+
3210
 
+        app->priv->basename = basename;
3211
 
+        app->priv->path = g_build_filename (g_get_user_config_dir (),
3212
 
+                                            "autostart",
3213
 
+                                            app->priv->basename, NULL);
3214
 
+
3215
 
+        app->priv->hidden = FALSE;
3216
 
+        app->priv->no_display = FALSE;
3217
 
+        app->priv->enabled = TRUE;
3218
 
+        app->priv->shown = TRUE;
3219
 
+
3220
 
+        if (!gsm_util_text_is_blank (name)) {
3221
 
+                app->priv->name = g_strdup (name);
3222
 
+        } else {
3223
 
+                app->priv->name = g_strdup (exec);
3224
 
+        }
3225
 
+        app->priv->exec = g_strdup (exec);
3226
 
+        app->priv->comment = g_strdup (comment);
3227
 
+        app->priv->icon = NULL;
3228
 
+
3229
 
+        app->priv->gicon = NULL;
3230
 
+        _gsp_app_update_description (app);
3231
 
+
3232
 
+        /* by definition */
3233
 
+        app->priv->xdg_position = 0;
3234
 
+        app->priv->xdg_system_position = G_MAXUINT;
3235
 
+
3236
 
+        app->priv->save_timeout = 0;
3237
 
+        app->priv->save_mask |= GSP_ASP_SAVE_MASK_ALL;
3238
 
+        app->priv->old_system_path = NULL;
3239
 
+        app->priv->skip_next_monitor_event = FALSE;
3240
 
+
3241
 
+        _gsp_app_queue_save (app);
3242
 
+
3243
 
+        manager = gsp_app_manager_get ();
3244
 
+        gsp_app_manager_add (manager, app);
3245
 
+        g_object_unref (app);
3246
 
+        g_object_unref (manager);
3247
 
+}
3248
 
+
3249
 
+gboolean
3250
 
+gsp_app_copy_desktop_file (const char *uri)
3251
 
+{
3252
 
+        GspAppManager *manager;
3253
 
+        GspApp        *app;
3254
 
+        GFile         *src_file;
3255
 
+        char          *src_basename;
3256
 
+        char          *dst_basename;
3257
 
+        char          *dst_path;
3258
 
+        GFile         *dst_file;
3259
 
+        gboolean       changed;
3260
 
+
3261
 
+        g_return_val_if_fail (uri != NULL, FALSE);
3262
 
+
3263
 
+        src_file = g_file_new_for_uri (uri);
3264
 
+        src_basename = g_file_get_basename (src_file);
3265
 
+
3266
 
+        if (src_basename == NULL) {
3267
 
+                g_object_unref (src_file);
3268
 
+                return FALSE;
3269
 
+        }
3270
 
+
3271
 
+        dst_basename = _gsp_find_free_basename (src_basename);
3272
 
+        g_free (src_basename);
3273
 
+
3274
 
+        if (dst_basename == NULL) {
3275
 
+                g_object_unref (src_file);
3276
 
+                return FALSE;
3277
 
+        }
3278
 
+
3279
 
+        dst_path = g_build_filename (g_get_user_config_dir (),
3280
 
+                                     "autostart",
3281
 
+                                     dst_basename, NULL);
3282
 
+        g_free (dst_basename);
3283
 
+
3284
 
+        dst_file = g_file_new_for_path (dst_path);
3285
 
+
3286
 
+        _gsp_ensure_user_autostart_dir ();
3287
 
+        if (!g_file_copy (src_file, dst_file, G_FILE_COPY_NONE,
3288
 
+                          NULL, NULL, NULL, NULL)) {
3289
 
+                g_object_unref (src_file);
3290
 
+                g_object_unref (dst_file);
3291
 
+                g_free (dst_path);
3292
 
+                return FALSE;
3293
 
+        }
3294
 
+
3295
 
+        g_object_unref (src_file);
3296
 
+        g_object_unref (dst_file);
3297
 
+
3298
 
+        app = gsp_app_new (dst_path, 0);
3299
 
+        if (!app) {
3300
 
+                g_remove (dst_path);
3301
 
+                g_free (dst_path);
3302
 
+                return FALSE;
3303
 
+        }
3304
 
+
3305
 
+        g_free (dst_path);
3306
 
+
3307
 
+        changed = FALSE;
3308
 
+        if (app->priv->hidden) {
3309
 
+                changed = TRUE;
3310
 
+                app->priv->hidden = FALSE;
3311
 
+                app->priv->save_mask |= GSP_ASP_SAVE_MASK_HIDDEN;
3312
 
+        }
3313
 
+
3314
 
+        if (app->priv->no_display) {
3315
 
+                changed = TRUE;
3316
 
+                app->priv->no_display = FALSE;
3317
 
+                app->priv->save_mask |= GSP_ASP_SAVE_MASK_NO_DISPLAY;
3318
 
+        }
3319
 
+
3320
 
+        if (!app->priv->enabled) {
3321
 
+                changed = TRUE;
3322
 
+                app->priv->enabled = TRUE;
3323
 
+                app->priv->save_mask |= GSP_ASP_SAVE_MASK_ENABLED;
3324
 
+        }
3325
 
+
3326
 
+        if (changed) {
3327
 
+                _gsp_app_queue_save (app);
3328
 
+        }
3329
 
+
3330
 
+        manager = gsp_app_manager_get ();
3331
 
+        gsp_app_manager_add (manager, app);
3332
 
+        g_object_unref (app);
3333
 
+        g_object_unref (manager);
3334
 
+
3335
 
+        return TRUE;
3336
 
+}
3337
 
Index: gnome-session-3.28.0/capplet/gsp-app.h
3338
 
===================================================================
3339
 
--- /dev/null
3340
 
+++ gnome-session-3.28.0/capplet/gsp-app.h
3341
 
@@ -0,0 +1,108 @@
3342
 
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
3343
 
+ *
3344
 
+ * Copyright (C) 1999 Free Software Foundation, Inc.
3345
 
+ * Copyright (C) 2007, 2009 Vincent Untz.
3346
 
+ * Copyright (C) 2008 Lucas Rocha.
3347
 
+ * Copyright (C) 2008 William Jon McCann <jmccann@redhat.com>
3348
 
+ *
3349
 
+ * This program is free software; you can redistribute it and/or modify
3350
 
+ * it under the terms of the GNU General Public License as published by
3351
 
+ * the Free Software Foundation; either version 2 of the License, or
3352
 
+ * (at your option) any later version.
3353
 
+ *
3354
 
+ * This program is distributed in the hope that it will be useful,
3355
 
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
3356
 
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
3357
 
+ * GNU General Public License for more details.
3358
 
+ *
3359
 
+ * You should have received a copy of the GNU General Public License
3360
 
+ * along with this program; if not, write to the Free Software
3361
 
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3362
 
+ *
3363
 
+ */
3364
 
+
3365
 
+#ifndef __GSP_APP_H
3366
 
+#define __GSP_APP_H
3367
 
+
3368
 
+#include <glib-object.h>
3369
 
+#include <gio/gio.h>
3370
 
+
3371
 
+G_BEGIN_DECLS
3372
 
+
3373
 
+#define GSP_TYPE_APP            (gsp_app_get_type ())
3374
 
+#define GSP_APP(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GSP_TYPE_APP, GspApp))
3375
 
+#define GSP_APP_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GSP_TYPE_APP, GspAppClass))
3376
 
+#define GSP_IS_APP(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GSP_TYPE_APP))
3377
 
+#define GSP_IS_APP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GSP_TYPE_APP))
3378
 
+#define GSP_APP_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GSP_TYPE_APP, GspAppClass))
3379
 
+
3380
 
+typedef struct _GspApp        GspApp;
3381
 
+typedef struct _GspAppClass   GspAppClass;
3382
 
+
3383
 
+typedef struct _GspAppPrivate GspAppPrivate;
3384
 
+
3385
 
+struct _GspAppClass
3386
 
+{
3387
 
+        GObjectClass parent_class;
3388
 
+
3389
 
+        void (* changed) (GspApp *app);
3390
 
+        void (* removed) (GspApp *app);
3391
 
+};
3392
 
+
3393
 
+struct _GspApp
3394
 
+{
3395
 
+        GObject parent_instance;
3396
 
+
3397
 
+        GspAppPrivate *priv;
3398
 
+};
3399
 
+
3400
 
+GType            gsp_app_get_type          (void);
3401
 
+
3402
 
+void             gsp_app_create            (const char   *name,
3403
 
+                                            const char   *comment,
3404
 
+                                            const char   *exec);
3405
 
+void             gsp_app_update            (GspApp       *app,
3406
 
+                                            const char   *name,
3407
 
+                                            const char   *comment,
3408
 
+                                            const char   *exec);
3409
 
+
3410
 
+gboolean         gsp_app_copy_desktop_file (const char   *uri);
3411
 
+
3412
 
+void             gsp_app_delete            (GspApp       *app);
3413
 
+
3414
 
+const char      *gsp_app_get_basename      (GspApp       *app);
3415
 
+const char      *gsp_app_get_path          (GspApp       *app);
3416
 
+
3417
 
+gboolean         gsp_app_get_hidden        (GspApp       *app);
3418
 
+gboolean         gsp_app_get_display       (GspApp       *app);
3419
 
+
3420
 
+gboolean         gsp_app_get_enabled       (GspApp       *app);
3421
 
+void             gsp_app_set_enabled       (GspApp       *app,
3422
 
+                                            gboolean      enabled);
3423
 
+
3424
 
+gboolean         gsp_app_get_shown         (GspApp       *app);
3425
 
+
3426
 
+const char      *gsp_app_get_name          (GspApp       *app);
3427
 
+const char      *gsp_app_get_exec          (GspApp       *app);
3428
 
+const char      *gsp_app_get_comment       (GspApp       *app);
3429
 
+
3430
 
+const char      *gsp_app_get_description   (GspApp       *app);
3431
 
+GIcon           *gsp_app_get_icon          (GspApp       *app);
3432
 
+
3433
 
+/* private interface for GspAppManager only */
3434
 
+
3435
 
+GspApp          *gsp_app_new                      (const char   *path,
3436
 
+                                                   unsigned int  xdg_position);
3437
 
+
3438
 
+void             gsp_app_reload_at                (GspApp       *app,
3439
 
+                                                   const char   *path,
3440
 
+                                                   unsigned int  xdg_position);
3441
 
+
3442
 
+unsigned int     gsp_app_get_xdg_position         (GspApp       *app);
3443
 
+unsigned int     gsp_app_get_xdg_system_position  (GspApp       *app);
3444
 
+void             gsp_app_set_xdg_system_position  (GspApp       *app,
3445
 
+                                                   unsigned int  position);
3446
 
+
3447
 
+G_END_DECLS
3448
 
+
3449
 
+#endif /* __GSP_APP_H */
3450
 
Index: gnome-session-3.28.0/capplet/gsp-keyfile.c
3451
 
===================================================================
3452
 
--- /dev/null
3453
 
+++ gnome-session-3.28.0/capplet/gsp-keyfile.c
3454
 
@@ -0,0 +1,207 @@
3455
 
+/*
3456
 
+ * gsp-keyfile.c: GKeyFile extensions
3457
 
+ *
3458
 
+ * Copyright (C) 2008, 2009 Novell, Inc.
3459
 
+ *
3460
 
+ * Based on code from panel-keyfile.c (from gnome-panel)
3461
 
+ *
3462
 
+ * This program is free software; you can redistribute it and/or
3463
 
+ * modify it under the terms of the GNU General Public License as
3464
 
+ * published by the Free Software Foundation; either version 2 of the
3465
 
+ * License, or (at your option) any later version.
3466
 
+ *
3467
 
+ * This program is distributed in the hope that it will be useful, but
3468
 
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
3469
 
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3470
 
+ * General Public License for more details.
3471
 
+ *
3472
 
+ * You should have received a copy of the GNU General Public License
3473
 
+ * along with this program; if not, write to the Free Software
3474
 
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
3475
 
+ * 02111-1307, USA.
3476
 
+ *
3477
 
+ * Authors:
3478
 
+ *        Vincent Untz <vuntz@gnome.org>
3479
 
+ */
3480
 
+
3481
 
+#include <string.h>
3482
 
+
3483
 
+#include <glib.h>
3484
 
+
3485
 
+#include "gsp-keyfile.h"
3486
 
+
3487
 
+void
3488
 
+gsp_key_file_populate (GKeyFile *keyfile)
3489
 
+{
3490
 
+        gsp_key_file_set_string (keyfile,
3491
 
+                                 G_KEY_FILE_DESKTOP_KEY_TYPE,
3492
 
+                                 "Application");
3493
 
+
3494
 
+        gsp_key_file_set_string (keyfile,
3495
 
+                                 G_KEY_FILE_DESKTOP_KEY_EXEC,
3496
 
+                                 "/bin/false");
3497
 
+}
3498
 
+
3499
 
+//FIXME: kill this when bug #309224 is fixed
3500
 
+gboolean
3501
 
+gsp_key_file_to_file (GKeyFile     *keyfile,
3502
 
+                      const gchar  *path,
3503
 
+                      GError      **error)
3504
 
+{
3505
 
+        GError  *write_error;
3506
 
+        gchar   *data;
3507
 
+        gsize    length;
3508
 
+        gboolean res;
3509
 
+
3510
 
+        g_return_val_if_fail (keyfile != NULL, FALSE);
3511
 
+        g_return_val_if_fail (path != NULL, FALSE);
3512
 
+
3513
 
+        write_error = NULL;
3514
 
+        data = g_key_file_to_data (keyfile, &length, &write_error);
3515
 
+
3516
 
+        if (write_error) {
3517
 
+                g_propagate_error (error, write_error);
3518
 
+                return FALSE;
3519
 
+        }
3520
 
+
3521
 
+        res = g_file_set_contents (path, data, length, &write_error);
3522
 
+        g_free (data);
3523
 
+
3524
 
+        if (write_error) {
3525
 
+                g_propagate_error (error, write_error);
3526
 
+                return FALSE;
3527
 
+        }
3528
 
+
3529
 
+        return res;
3530
 
+}
3531
 
+
3532
 
+gboolean
3533
 
+gsp_key_file_get_boolean (GKeyFile    *keyfile,
3534
 
+                          const gchar *key,
3535
 
+                          gboolean     default_value)
3536
 
+{
3537
 
+        GError   *error;
3538
 
+        gboolean  retval;
3539
 
+
3540
 
+        error = NULL;
3541
 
+        retval = g_key_file_get_boolean (keyfile, G_KEY_FILE_DESKTOP_GROUP,
3542
 
+                                         key, &error);
3543
 
+        if (error != NULL) {
3544
 
+                retval = default_value;
3545
 
+                g_error_free (error);
3546
 
+        }
3547
 
+
3548
 
+        return retval;
3549
 
+}
3550
 
+
3551
 
+gboolean
3552
 
+gsp_key_file_get_shown (GKeyFile   *keyfile,
3553
 
+                        const char *current_desktop)
3554
 
+{
3555
 
+        char     **only_show_in, **not_show_in;
3556
 
+        gchar    **current_desktops = { NULL };
3557
 
+        gboolean   found;
3558
 
+        int        i;
3559
 
+
3560
 
+        if (!current_desktop)
3561
 
+                return TRUE;
3562
 
+
3563
 
+        only_show_in = g_key_file_get_string_list (keyfile, G_KEY_FILE_DESKTOP_GROUP,
3564
 
+                                                   G_KEY_FILE_DESKTOP_KEY_ONLY_SHOW_IN,
3565
 
+                                                   NULL, NULL);
3566
 
+
3567
 
+        if (current_desktop && current_desktop[0] != '\0')
3568
 
+                current_desktops = g_strsplit (current_desktop, ":", 0);
3569
 
+
3570
 
+        if (only_show_in) {
3571
 
+                found = FALSE;
3572
 
+                for (i = 0; only_show_in[i] != NULL; i++) {
3573
 
+                        if (g_strv_contains ((const gchar * const *) current_desktops, only_show_in[i])) {
3574
 
+                                found = TRUE;
3575
 
+                                break;
3576
 
+                        }
3577
 
+                }
3578
 
+
3579
 
+                g_strfreev (only_show_in);
3580
 
+
3581
 
+                if (!found)
3582
 
+                        return FALSE;
3583
 
+        }
3584
 
+
3585
 
+        not_show_in = g_key_file_get_string_list (keyfile, G_KEY_FILE_DESKTOP_GROUP,
3586
 
+                                                  G_KEY_FILE_DESKTOP_KEY_NOT_SHOW_IN,
3587
 
+                                                  NULL, NULL);
3588
 
+
3589
 
+        if (not_show_in) {
3590
 
+                found = FALSE;
3591
 
+                for (i = 0; not_show_in[i] != NULL; i++) {
3592
 
+                        if (g_strv_contains ((const gchar * const *) current_desktops, not_show_in[i])) {
3593
 
+                                found = TRUE;
3594
 
+                                break;
3595
 
+                        }
3596
 
+                }
3597
 
+
3598
 
+                g_strfreev (not_show_in);
3599
 
+
3600
 
+                if (found)
3601
 
+                        return FALSE;
3602
 
+        }
3603
 
+
3604
 
+        g_strfreev (current_desktops);
3605
 
+
3606
 
+        return TRUE;
3607
 
+}
3608
 
+
3609
 
+void
3610
 
+gsp_key_file_set_locale_string (GKeyFile    *keyfile,
3611
 
+                                const gchar *key,
3612
 
+                                const gchar *value)
3613
 
+{
3614
 
+        const char         *locale;
3615
 
+        const char * const *langs_pointer;
3616
 
+        int                 i;
3617
 
+
3618
 
+        if (value == NULL) {
3619
 
+                value = "";
3620
 
+        }
3621
 
+
3622
 
+        locale = NULL;
3623
 
+        langs_pointer = g_get_language_names ();
3624
 
+        for (i = 0; langs_pointer[i] != NULL; i++) {
3625
 
+                /* find first without encoding  */
3626
 
+                if (strchr (langs_pointer[i], '.') == NULL) {
3627
 
+                        locale = langs_pointer[i];
3628
 
+                        break;
3629
 
+                }
3630
 
+        }
3631
 
+
3632
 
+        if (locale != NULL) {
3633
 
+                g_key_file_set_locale_string (keyfile, G_KEY_FILE_DESKTOP_GROUP,
3634
 
+                                              key, locale, value);
3635
 
+        } else {
3636
 
+                g_key_file_set_string (keyfile, G_KEY_FILE_DESKTOP_GROUP,
3637
 
+                                       key, value);
3638
 
+        }
3639
 
+}
3640
 
+
3641
 
+void
3642
 
+gsp_key_file_ensure_C_key (GKeyFile   *keyfile,
3643
 
+                           const char *key)
3644
 
+{
3645
 
+        char *C_value;
3646
 
+        char *buffer;
3647
 
+
3648
 
+        /* Make sure we set the "C" locale strings to the terms we set here.
3649
 
+         * This is so that if the user logs into another locale they get their
3650
 
+         * own description there rather then empty. It is not the C locale
3651
 
+         * however, but the user created this entry herself so it's OK */
3652
 
+        C_value = gsp_key_file_get_string (keyfile, key);
3653
 
+        if (C_value == NULL || C_value [0] == '\0') {
3654
 
+                buffer = gsp_key_file_get_locale_string (keyfile, key);
3655
 
+                if (buffer) {
3656
 
+                        gsp_key_file_set_string (keyfile, key, buffer);
3657
 
+                        g_free (buffer);
3658
 
+                }
3659
 
+        }
3660
 
+        g_free (C_value);
3661
 
+}
3662
 
Index: gnome-session-3.28.0/capplet/gsp-keyfile.h
3663
 
===================================================================
3664
 
--- /dev/null
3665
 
+++ gnome-session-3.28.0/capplet/gsp-keyfile.h
3666
 
@@ -0,0 +1,65 @@
3667
 
+/*
3668
 
+ * gsp-keyfile.h: GKeyFile extensions
3669
 
+ *
3670
 
+ * Copyright (C) 2008, 2009 Novell, Inc.
3671
 
+ *
3672
 
+ * Based on code from panel-keyfile.h (from gnome-panel)
3673
 
+ *
3674
 
+ * This program is free software; you can redistribute it and/or
3675
 
+ * modify it under the terms of the GNU General Public License as
3676
 
+ * published by the Free Software Foundation; either version 2 of the
3677
 
+ * License, or (at your option) any later version.
3678
 
+ *
3679
 
+ * This program is distributed in the hope that it will be useful, but
3680
 
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
3681
 
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3682
 
+ * General Public License for more details.
3683
 
+ *
3684
 
+ * You should have received a copy of the GNU General Public License
3685
 
+ * along with this program; if not, write to the Free Software
3686
 
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
3687
 
+ * 02111-1307, USA.
3688
 
+ *
3689
 
+ * Authors:
3690
 
+ *        Vincent Untz <vuntz@gnome.org>
3691
 
+ */
3692
 
+
3693
 
+#ifndef GSP_KEYFILE_H
3694
 
+#define GSP_KEYFILE_H
3695
 
+
3696
 
+#include "glib.h"
3697
 
+
3698
 
+G_BEGIN_DECLS
3699
 
+
3700
 
+#define GSP_KEY_FILE_DESKTOP_KEY_AUTOSTART_ENABLED "X-GNOME-Autostart-enabled"
3701
 
+
3702
 
+void      gsp_key_file_populate        (GKeyFile *keyfile);
3703
 
+
3704
 
+gboolean  gsp_key_file_to_file         (GKeyFile       *keyfile,
3705
 
+                                        const gchar    *path,
3706
 
+                                        GError        **error);
3707
 
+
3708
 
+gboolean gsp_key_file_get_boolean      (GKeyFile       *keyfile,
3709
 
+                                        const gchar    *key,
3710
 
+                                        gboolean        default_value);
3711
 
+gboolean gsp_key_file_get_shown        (GKeyFile       *keyfile,
3712
 
+                                        const char     *current_desktop);
3713
 
+#define gsp_key_file_get_string(key_file, key) \
3714
 
+         g_key_file_get_string (key_file, G_KEY_FILE_DESKTOP_GROUP, key, NULL)
3715
 
+#define gsp_key_file_get_locale_string(key_file, key) \
3716
 
+         g_key_file_get_locale_string(key_file, G_KEY_FILE_DESKTOP_GROUP, key, NULL, NULL)
3717
 
+
3718
 
+#define gsp_key_file_set_boolean(key_file, key, value) \
3719
 
+         g_key_file_set_boolean (key_file, G_KEY_FILE_DESKTOP_GROUP, key, value)
3720
 
+#define gsp_key_file_set_string(key_file, key, value) \
3721
 
+         g_key_file_set_string (key_file, G_KEY_FILE_DESKTOP_GROUP, key, value)
3722
 
+void    gsp_key_file_set_locale_string (GKeyFile    *keyfile,
3723
 
+                                        const gchar *key,
3724
 
+                                        const gchar *value);
3725
 
+
3726
 
+void gsp_key_file_ensure_C_key         (GKeyFile   *keyfile,
3727
 
+                                        const char *key);
3728
 
+
3729
 
+G_END_DECLS
3730
 
+
3731
 
+#endif /* GSP_KEYFILE_H */
3732
 
Index: gnome-session-3.28.0/capplet/main.c
3733
 
===================================================================
3734
 
--- /dev/null
3735
 
+++ gnome-session-3.28.0/capplet/main.c
3736
 
@@ -0,0 +1,108 @@
3737
 
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
3738
 
+ * main.c
3739
 
+ * Copyright (C) 1999 Free Software Foundation, Inc.
3740
 
+ * Copyright (C) 2008 Lucas Rocha.
3741
 
+ *
3742
 
+ * This program is free software; you can redistribute it and/or
3743
 
+ * modify it under the terms of the GNU General Public License as
3744
 
+ * published by the Free Software Foundation; either version 2 of the
3745
 
+ * License, or (at your option) any later version.
3746
 
+ *
3747
 
+ * This program is distributed in the hope that it will be useful, but
3748
 
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
3749
 
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3750
 
+ * Lesser General Public License for more details.
3751
 
+ *
3752
 
+ * You should have received a copy of the GNU General Public License
3753
 
+ * along with this program; if not, write to the Free Software
3754
 
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
3755
 
+ * 02111-1307, USA.
3756
 
+ */
3757
 
+
3758
 
+#include <config.h>
3759
 
+
3760
 
+#include <unistd.h>
3761
 
+#include <stdlib.h>
3762
 
+
3763
 
+#include <glib/gi18n.h>
3764
 
+#include <gtk/gtk.h>
3765
 
+
3766
 
+#include "gsm-properties-dialog.h"
3767
 
+
3768
 
+static gboolean    show_version     = FALSE;
3769
 
+
3770
 
+static GOptionEntry options[] = {
3771
 
+        { "version", 0, 0, G_OPTION_ARG_NONE, &show_version, N_("Version of this application"), NULL },
3772
 
+        { NULL, 0, 0, 0, NULL, NULL, NULL }
3773
 
+};
3774
 
+
3775
 
+static void
3776
 
+dialog_response (GsmPropertiesDialog *dialog,
3777
 
+                 guint                response_id,
3778
 
+                 gpointer             data)
3779
 
+{
3780
 
+        GdkScreen *screen;
3781
 
+        GError    *error;
3782
 
+
3783
 
+        if (response_id == GTK_RESPONSE_HELP) {
3784
 
+                screen = gtk_widget_get_screen (GTK_WIDGET (dialog));
3785
 
+
3786
 
+                error = NULL;
3787
 
+                gtk_show_uri (screen, "ghelp:user-guide?gosstartsession-2",
3788
 
+                              gtk_get_current_event_time (), &error);
3789
 
+
3790
 
+                if (error != NULL) {
3791
 
+                        GtkWidget *d;
3792
 
+                        d = gtk_message_dialog_new (GTK_WINDOW (dialog),
3793
 
+                                                    GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
3794
 
+                                                    GTK_MESSAGE_ERROR,
3795
 
+                                                    GTK_BUTTONS_CLOSE,
3796
 
+                                                    "%s",
3797
 
+                                                    _("Could not display help document"));
3798
 
+                        gtk_message_dialog_format_secondary_text (
3799
 
+                                                GTK_MESSAGE_DIALOG (d),
3800
 
+                                                "%s", error->message);
3801
 
+                        g_error_free (error);
3802
 
+
3803
 
+                        gtk_dialog_run (GTK_DIALOG (d));
3804
 
+                        gtk_widget_destroy (d);
3805
 
+                }
3806
 
+        } else {
3807
 
+                gtk_widget_destroy (GTK_WIDGET (dialog));
3808
 
+                gtk_main_quit ();
3809
 
+        }
3810
 
+}
3811
 
+
3812
 
+int
3813
 
+main (int argc, char *argv[])
3814
 
+{
3815
 
+        GError    *error;
3816
 
+        GtkWidget *dialog;
3817
 
+
3818
 
+        bindtextdomain (GETTEXT_PACKAGE, LOCALE_DIR);
3819
 
+        bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
3820
 
+        textdomain (GETTEXT_PACKAGE);
3821
 
+
3822
 
+        error = NULL;
3823
 
+        if (! gtk_init_with_args (&argc, &argv, " - GNOME Session Properties", options, GETTEXT_PACKAGE, &error)) {
3824
 
+                g_warning ("Unable to start: %s", error->message);
3825
 
+                g_error_free (error);
3826
 
+                return 1;
3827
 
+        }
3828
 
+
3829
 
+        if (show_version) {
3830
 
+                g_print ("%s %s\n", argv [0], VERSION);
3831
 
+                return 0;
3832
 
+        }
3833
 
+
3834
 
+        dialog = gsm_properties_dialog_new ();
3835
 
+        g_signal_connect (dialog,
3836
 
+                          "response",
3837
 
+                          G_CALLBACK (dialog_response),
3838
 
+                          NULL);
3839
 
+        gtk_widget_show (dialog);
3840
 
+
3841
 
+        gtk_main ();
3842
 
+
3843
 
+        return 0;
3844
 
+}
3845
 
Index: gnome-session-3.28.0/capplet/meson.build
3846
 
===================================================================
3847
 
--- /dev/null
3848
 
+++ gnome-session-3.28.0/capplet/meson.build
3849
 
@@ -0,0 +1,36 @@
3850
 
+
3851
 
+cflags = [
3852
 
+       '-DLOCALE_DIR="@0@"'.format(session_localedir),
3853
 
+       '-DGTKBUILDER_DIR="@0@"'.format(session_pkgdatadir)
3854
 
+]
3855
 
+
3856
 
+deps = [
3857
 
+       gio_dep,
3858
 
+       glib_dep,
3859
 
+       gtk_dep
3860
 
+]
3861
 
+
3862
 
+sources = files(
3863
 
+       'main.c',
3864
 
+       'gsm-properties-dialog.c',
3865
 
+       'gsm-app-dialog.c',
3866
 
+       'gsp-app.c',
3867
 
+       'gsp-app-manager.c',
3868
 
+       'gsp-keyfile.c',
3869
 
+)
3870
 
+
3871
 
+includes = [
3872
 
+       top_inc,
3873
 
+       include_directories('../gnome-session')
3874
 
+]
3875
 
+
3876
 
+executable(
3877
 
+       'gnome-session-properties',
3878
 
+       sources,
3879
 
+       include_directories: includes,
3880
 
+       dependencies: deps,
3881
 
+       c_args: cflags,
3882
 
+       link_with: libgsmutil,
3883
 
+       install: true,
3884
 
+       install_dir: session_bindir
3885
 
+)
3886
 
Index: gnome-session-3.28.0/data/gnome-session-properties.desktop.in
3887
 
===================================================================
3888
 
--- /dev/null
3889
 
+++ gnome-session-3.28.0/data/gnome-session-properties.desktop.in
3890
 
@@ -0,0 +1,14 @@
3891
 
+[Desktop Entry]
3892
 
+Name=Startup Applications
3893
 
+Comment=Choose what applications to start when you log in
3894
 
+Exec=gnome-session-properties
3895
 
+Icon=session-properties
3896
 
+Terminal=false
3897
 
+Type=Application
3898
 
+StartupNotify=true
3899
 
+Categories=GTK;GNOME;Settings;X-GNOME-PersonalSettings;
3900
 
+OnlyShowIn=GNOME;Unity;
3901
 
+X-GNOME-Bugzilla-Bugzilla=GNOME
3902
 
+X-GNOME-Bugzilla-Product=gnome-session
3903
 
+X-GNOME-Bugzilla-Component=gnome-session-properties
3904
 
+X-GNOME-Bugzilla-Version=@VERSION@
3905
 
Index: gnome-session-3.28.0/data/icons/16x16/session-properties.svg
3906
 
===================================================================
3907
 
--- /dev/null
3908
 
+++ gnome-session-3.28.0/data/icons/16x16/session-properties.svg
3909
 
@@ -0,0 +1,394 @@
3910
 
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
3911
 
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
3912
 
+<svg
3913
 
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
3914
 
+   xmlns:cc="http://web.resource.org/cc/"
3915
 
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
3916
 
+   xmlns:svg="http://www.w3.org/2000/svg"
3917
 
+   xmlns="http://www.w3.org/2000/svg"
3918
 
+   xmlns:xlink="http://www.w3.org/1999/xlink"
3919
 
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
3920
 
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
3921
 
+   width="16"
3922
 
+   height="16"
3923
 
+   id="svg7854"
3924
 
+   sodipodi:version="0.32"
3925
 
+   inkscape:version="0.44+devel"
3926
 
+   version="1.0"
3927
 
+   sodipodi:docname="session-properties.svg"
3928
 
+   sodipodi:docbase="/home/jimmac/gfx/ximian/art/icons/control-center/22x22"
3929
 
+   inkscape:output_extension="org.inkscape.output.svg.inkscape"
3930
 
+   sodipodi:modified="true">
3931
 
+  <defs
3932
 
+     id="defs7856">
3933
 
+    <linearGradient
3934
 
+       inkscape:collect="always"
3935
 
+       id="linearGradient5650">
3936
 
+      <stop
3937
 
+         style="stop-color:#d3d7cf;stop-opacity:1;"
3938
 
+         offset="0"
3939
 
+         id="stop5652" />
3940
 
+      <stop
3941
 
+         style="stop-color:#9ea795;stop-opacity:1"
3942
 
+         offset="1"
3943
 
+         id="stop5654" />
3944
 
+    </linearGradient>
3945
 
+    <linearGradient
3946
 
+       inkscape:collect="always"
3947
 
+       id="linearGradient5642">
3948
 
+      <stop
3949
 
+         style="stop-color:#eeeeec;stop-opacity:1;"
3950
 
+         offset="0"
3951
 
+         id="stop5644" />
3952
 
+      <stop
3953
 
+         style="stop-color:#c3c3bc;stop-opacity:1"
3954
 
+         offset="1"
3955
 
+         id="stop5646" />
3956
 
+    </linearGradient>
3957
 
+    <linearGradient
3958
 
+       inkscape:collect="always"
3959
 
+       id="linearGradient5634">
3960
 
+      <stop
3961
 
+         style="stop-color:#ffffff;stop-opacity:1;"
3962
 
+         offset="0"
3963
 
+         id="stop5636" />
3964
 
+      <stop
3965
 
+         style="stop-color:#ffffff;stop-opacity:0;"
3966
 
+         offset="1"
3967
 
+         id="stop5638" />
3968
 
+    </linearGradient>
3969
 
+    <linearGradient
3970
 
+       inkscape:collect="always"
3971
 
+       id="linearGradient5598">
3972
 
+      <stop
3973
 
+         style="stop-color:#ffffff;stop-opacity:1;"
3974
 
+         offset="0"
3975
 
+         id="stop5600" />
3976
 
+      <stop
3977
 
+         style="stop-color:#ffffff;stop-opacity:0;"
3978
 
+         offset="1"
3979
 
+         id="stop5602" />
3980
 
+    </linearGradient>
3981
 
+    <linearGradient
3982
 
+       inkscape:collect="always"
3983
 
+       id="linearGradient5716">
3984
 
+      <stop
3985
 
+         style="stop-color:#ffffff;stop-opacity:1;"
3986
 
+         offset="0"
3987
 
+         id="stop5718" />
3988
 
+      <stop
3989
 
+         style="stop-color:#ffffff;stop-opacity:0;"
3990
 
+         offset="1"
3991
 
+         id="stop5720" />
3992
 
+    </linearGradient>
3993
 
+    <linearGradient
3994
 
+       inkscape:collect="always"
3995
 
+       id="linearGradient5700">
3996
 
+      <stop
3997
 
+         style="stop-color:#e4e4e4;stop-opacity:1;"
3998
 
+         offset="0"
3999
 
+         id="stop5702" />
4000
 
+      <stop
4001
 
+         id="stop5708"
4002
 
+         offset="0.639386"
4003
 
+         style="stop-color:#fefefe;stop-opacity:1" />
4004
 
+      <stop
4005
 
+         style="stop-color:#ffffff;stop-opacity:1"
4006
 
+         offset="0.79632628"
4007
 
+         id="stop5710" />
4008
 
+      <stop
4009
 
+         style="stop-color:#949494;stop-opacity:1"
4010
 
+         offset="1"
4011
 
+         id="stop5704" />
4012
 
+    </linearGradient>
4013
 
+    <linearGradient
4014
 
+       id="linearGradient3832">
4015
 
+      <stop
4016
 
+         id="stop3834"
4017
 
+         offset="0.0000000"
4018
 
+         style="stop-color:#ffffff;stop-opacity:1.0000000" />
4019
 
+      <stop
4020
 
+         id="stop3836"
4021
 
+         offset="1.0000000"
4022
 
+         style="stop-color:#e0e0e0;stop-opacity:1.0000000" />
4023
 
+    </linearGradient>
4024
 
+    <linearGradient
4025
 
+       id="linearGradient4816">
4026
 
+      <stop
4027
 
+         id="stop4818"
4028
 
+         offset="0.0000000"
4029
 
+         style="stop-color:#204a87;stop-opacity:1.0000000" />
4030
 
+      <stop
4031
 
+         id="stop4820"
4032
 
+         offset="1.0000000"
4033
 
+         style="stop-color:#204a87;stop-opacity:0.0000000" />
4034
 
+    </linearGradient>
4035
 
+    <linearGradient
4036
 
+       id="linearGradient5048">
4037
 
+      <stop
4038
 
+         id="stop5050"
4039
 
+         offset="0"
4040
 
+         style="stop-color:black;stop-opacity:0;" />
4041
 
+      <stop
4042
 
+         style="stop-color:black;stop-opacity:1;"
4043
 
+         offset="0.5"
4044
 
+         id="stop5056" />
4045
 
+      <stop
4046
 
+         id="stop5052"
4047
 
+         offset="1"
4048
 
+         style="stop-color:black;stop-opacity:0;" />
4049
 
+    </linearGradient>
4050
 
+    <linearGradient
4051
 
+       id="linearGradient5060"
4052
 
+       inkscape:collect="always">
4053
 
+      <stop
4054
 
+         id="stop5062"
4055
 
+         offset="0"
4056
 
+         style="stop-color:black;stop-opacity:1;" />
4057
 
+      <stop
4058
 
+         id="stop5064"
4059
 
+         offset="1"
4060
 
+         style="stop-color:black;stop-opacity:0;" />
4061
 
+    </linearGradient>
4062
 
+    <radialGradient
4063
 
+       inkscape:collect="always"
4064
 
+       xlink:href="#linearGradient5060"
4065
 
+       id="radialGradient5664"
4066
 
+       gradientUnits="userSpaceOnUse"
4067
 
+       gradientTransform="matrix(-6.6526975e-2,0,0,3.5014969e-2,47.812816,25.161837)"
4068
 
+       cx="605.71429"
4069
 
+       cy="486.64789"
4070
 
+       fx="605.71429"
4071
 
+       fy="486.64789"
4072
 
+       r="117.14286" />
4073
 
+    <radialGradient
4074
 
+       inkscape:collect="always"
4075
 
+       xlink:href="#linearGradient5060"
4076
 
+       id="radialGradient5667"
4077
 
+       gradientUnits="userSpaceOnUse"
4078
 
+       gradientTransform="matrix(6.6526975e-2,0,0,3.5014969e-2,-0.2505064,25.161837)"
4079
 
+       cx="605.71429"
4080
 
+       cy="486.64789"
4081
 
+       fx="605.71429"
4082
 
+       fy="486.64789"
4083
 
+       r="117.14286" />
4084
 
+    <linearGradient
4085
 
+       inkscape:collect="always"
4086
 
+       xlink:href="#linearGradient5048"
4087
 
+       id="linearGradient5670"
4088
 
+       gradientUnits="userSpaceOnUse"
4089
 
+       gradientTransform="matrix(6.6526975e-2,0,0,3.5014969e-2,-0.2635996,25.161837)"
4090
 
+       x1="302.85715"
4091
 
+       y1="366.64789"
4092
 
+       x2="302.85715"
4093
 
+       y2="609.50507" />
4094
 
+    <linearGradient
4095
 
+       inkscape:collect="always"
4096
 
+       xlink:href="#linearGradient3832"
4097
 
+       id="linearGradient5682"
4098
 
+       gradientUnits="userSpaceOnUse"
4099
 
+       gradientTransform="matrix(1.451927,0,0,1.3372801,-45.830775,7.6961475)"
4100
 
+       x1="17.88068"
4101
 
+       y1="11.072588"
4102
 
+       x2="17.88068"
4103
 
+       y2="21.767578" />
4104
 
+    <linearGradient
4105
 
+       inkscape:collect="always"
4106
 
+       xlink:href="#linearGradient4816"
4107
 
+       id="linearGradient5684"
4108
 
+       gradientUnits="userSpaceOnUse"
4109
 
+       gradientTransform="matrix(1.4668451,0,0,1.8750592,-45.628571,3.9919211)"
4110
 
+       x1="13.050564"
4111
 
+       y1="11.353518"
4112
 
+       x2="13.050564"
4113
 
+       y2="5.6173568" />
4114
 
+    <linearGradient
4115
 
+       inkscape:collect="always"
4116
 
+       xlink:href="#linearGradient5700"
4117
 
+       id="linearGradient5728"
4118
 
+       gradientUnits="userSpaceOnUse"
4119
 
+       gradientTransform="translate(0.5,0)"
4120
 
+       x1="24"
4121
 
+       y1="23"
4122
 
+       x2="45.505005"
4123
 
+       y2="23" />
4124
 
+    <linearGradient
4125
 
+       inkscape:collect="always"
4126
 
+       xlink:href="#linearGradient5716"
4127
 
+       id="linearGradient5730"
4128
 
+       gradientUnits="userSpaceOnUse"
4129
 
+       x1="40.745819"
4130
 
+       y1="23"
4131
 
+       x2="44.005268"
4132
 
+       y2="23" />
4133
 
+    <filter
4134
 
+       inkscape:collect="always"
4135
 
+       id="filter5786">
4136
 
+      <feGaussianBlur
4137
 
+         inkscape:collect="always"
4138
 
+         stdDeviation="0.62861987"
4139
 
+         id="feGaussianBlur5788" />
4140
 
+    </filter>
4141
 
+    <linearGradient
4142
 
+       inkscape:collect="always"
4143
 
+       xlink:href="#linearGradient5598"
4144
 
+       id="linearGradient5604"
4145
 
+       x1="25.627417"
4146
 
+       y1="8"
4147
 
+       x2="25.627417"
4148
 
+       y2="4.7617435"
4149
 
+       gradientUnits="userSpaceOnUse"
4150
 
+       gradientTransform="matrix(0.3170731,0,0,0.1513709,0.3902442,0.3687103)" />
4151
 
+    <filter
4152
 
+       inkscape:collect="always"
4153
 
+       x="-0.019480519"
4154
 
+       width="1.0389611"
4155
 
+       y="-0.14285713"
4156
 
+       height="1.2857143"
4157
 
+       id="filter5628">
4158
 
+      <feGaussianBlur
4159
 
+         inkscape:collect="always"
4160
 
+         stdDeviation="0.42857143"
4161
 
+         id="feGaussianBlur5630" />
4162
 
+    </filter>
4163
 
+    <linearGradient
4164
 
+       inkscape:collect="always"
4165
 
+       xlink:href="#linearGradient5634"
4166
 
+       id="linearGradient5640"
4167
 
+       x1="25.313259"
4168
 
+       y1="42.656792"
4169
 
+       x2="25.313261"
4170
 
+       y2="10.129107"
4171
 
+       gradientUnits="userSpaceOnUse"
4172
 
+       gradientTransform="matrix(0.3182502,0,0,0.3589572,0.3378627,-0.7556826)" />
4173
 
+    <linearGradient
4174
 
+       inkscape:collect="always"
4175
 
+       xlink:href="#linearGradient5642"
4176
 
+       id="linearGradient5648"
4177
 
+       x1="26.29347"
4178
 
+       y1="7.3125"
4179
 
+       x2="26.232994"
4180
 
+       y2="3.5357027"
4181
 
+       gradientUnits="userSpaceOnUse"
4182
 
+       gradientTransform="matrix(0.3500965,0,0,0.4000001,-0.3752413,-0.8999998)" />
4183
 
+    <linearGradient
4184
 
+       inkscape:collect="always"
4185
 
+       xlink:href="#linearGradient5650"
4186
 
+       id="linearGradient5656"
4187
 
+       x1="26.29347"
4188
 
+       y1="7.3125"
4189
 
+       x2="26.232994"
4190
 
+       y2="3.5357027"
4191
 
+       gradientUnits="userSpaceOnUse"
4192
 
+       gradientTransform="matrix(0.3500965,0,0,0.4000001,-0.3752413,-0.8999998)" />
4193
 
+  </defs>
4194
 
+  <sodipodi:namedview
4195
 
+     id="base"
4196
 
+     pagecolor="#ffffff"
4197
 
+     bordercolor="#e0e0e0"
4198
 
+     borderopacity="1"
4199
 
+     gridtolerance="10000"
4200
 
+     guidetolerance="10"
4201
 
+     objecttolerance="10"
4202
 
+     inkscape:pageopacity="0.0"
4203
 
+     inkscape:pageshadow="2"
4204
 
+     inkscape:zoom="1"
4205
 
+     inkscape:cx="13.920386"
4206
 
+     inkscape:cy="2.77771"
4207
 
+     inkscape:document-units="px"
4208
 
+     inkscape:current-layer="layer1"
4209
 
+     width="16px"
4210
 
+     height="16px"
4211
 
+     inkscape:showpageshadow="false"
4212
 
+     inkscape:window-width="1102"
4213
 
+     inkscape:window-height="958"
4214
 
+     inkscape:window-x="2117"
4215
 
+     inkscape:window-y="82"
4216
 
+     showgrid="false"
4217
 
+     borderlayer="true" />
4218
 
+  <metadata
4219
 
+     id="metadata7859">
4220
 
+    <rdf:RDF>
4221
 
+      <cc:Work
4222
 
+         rdf:about="">
4223
 
+        <dc:format>image/svg+xml</dc:format>
4224
 
+        <dc:type
4225
 
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
4226
 
+        <dc:creator>
4227
 
+          <cc:Agent>
4228
 
+            <dc:title>Jakub Steiner</dc:title>
4229
 
+          </cc:Agent>
4230
 
+        </dc:creator>
4231
 
+        <dc:source>http://jimmac.musichall.cz</dc:source>
4232
 
+        <cc:license
4233
 
+           rdf:resource="http://creativecommons.org/licenses/GPL/2.0/" />
4234
 
+        <dc:title>Gnome Session Properties</dc:title>
4235
 
+      </cc:Work>
4236
 
+      <cc:License
4237
 
+         rdf:about="http://creativecommons.org/licenses/GPL/2.0/">
4238
 
+        <cc:permits
4239
 
+           rdf:resource="http://web.resource.org/cc/Reproduction" />
4240
 
+        <cc:permits
4241
 
+           rdf:resource="http://web.resource.org/cc/Distribution" />
4242
 
+        <cc:requires
4243
 
+           rdf:resource="http://web.resource.org/cc/Notice" />
4244
 
+        <cc:permits
4245
 
+           rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
4246
 
+        <cc:requires
4247
 
+           rdf:resource="http://web.resource.org/cc/ShareAlike" />
4248
 
+        <cc:requires
4249
 
+           rdf:resource="http://web.resource.org/cc/SourceCode" />
4250
 
+      </cc:License>
4251
 
+    </rdf:RDF>
4252
 
+  </metadata>
4253
 
+  <g
4254
 
+     inkscape:label="Layer 1"
4255
 
+     inkscape:groupmode="layer"
4256
 
+     id="layer1">
4257
 
+    <rect
4258
 
+       style="opacity:1;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:evenodd;stroke:#3465a4;stroke-width:1.00000012;stroke-linecap:square;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
4259
 
+       id="rect4585"
4260
 
+       width="15.054147"
4261
 
+       height="14.931664"
4262
 
+       x="0.50000006"
4263
 
+       y="0.56833637"
4264
 
+       rx="0.80243546"
4265
 
+       ry="0.85151595" />
4266
 
+    <rect
4267
 
+       style="opacity:1;color:#000000;fill:url(#linearGradient5648);fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient5656);stroke-width:1.00000012;stroke-linecap:square;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
4268
 
+       id="rect5556"
4269
 
+       width="15.054147"
4270
 
+       height="1.9999999"
4271
 
+       x="0.5"
4272
 
+       y="0.50000006"
4273
 
+       rx="0.80249435"
4274
 
+       ry="0.91688365" />
4275
 
+    <rect
4276
 
+       ry="0"
4277
 
+       rx="0"
4278
 
+       y="0.90594715"
4279
 
+       x="1.5"
4280
 
+       height="13.594053"
4281
 
+       width="12.999999"
4282
 
+       id="rect5632"
4283
 
+       style="opacity:0.52571429;color:#000000;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient5640);stroke-width:1.00000012;stroke-linecap:square;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
4284
 
+    <g
4285
 
+       id="g5724"
4286
 
+       transform="matrix(0.4041599,0,0,0.4075968,-2.9205921,-0.7107676)">
4287
 
+      <path
4288
 
+         sodipodi:nodetypes="cccccccccc"
4289
 
+         id="path5698"
4290
 
+         d="M 11.121851,22.804198 L 23.199467,12.216748 L 23.199467,17.747078 L 36.633956,17.747078 C 44.741684,17.747078 45.5,23.213443 45.5,23.213443 L 45.5,36.603439 C 45.5,36.603439 43.628297,27.513864 36.758956,27.513864 L 23.199467,27.513864 L 23.199467,33 L 11.121851,22.804198 z "
4291
 
+         style="fill:url(#linearGradient5728);fill-opacity:1;fill-rule:evenodd;stroke:#555753;stroke-width:2.46381474px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
4292
 
+    </g>
4293
 
+    <rect
4294
 
+       ry="0.17072184"
4295
 
+       rx="0.35760722"
4296
 
+       y="1.0498793"
4297
 
+       x="1.5"
4298
 
+       height="0.45411268"
4299
 
+       width="13"
4300
 
+       id="rect4627"
4301
 
+       style="opacity:1;color:#000000;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient5604);stroke-width:0.99999982;stroke-linecap:square;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
4302
 
+  </g>
4303
 
+</svg>
4304
 
Index: gnome-session-3.28.0/data/icons/22x22/session-properties.svg
4305
 
===================================================================
4306
 
--- /dev/null
4307
 
+++ gnome-session-3.28.0/data/icons/22x22/session-properties.svg
4308
 
@@ -0,0 +1,440 @@
4309
 
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
4310
 
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
4311
 
+<svg
4312
 
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
4313
 
+   xmlns:cc="http://web.resource.org/cc/"
4314
 
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
4315
 
+   xmlns:svg="http://www.w3.org/2000/svg"
4316
 
+   xmlns="http://www.w3.org/2000/svg"
4317
 
+   xmlns:xlink="http://www.w3.org/1999/xlink"
4318
 
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
4319
 
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
4320
 
+   width="22"
4321
 
+   height="22"
4322
 
+   id="svg7854"
4323
 
+   sodipodi:version="0.32"
4324
 
+   inkscape:version="0.44+devel"
4325
 
+   version="1.0"
4326
 
+   sodipodi:docname="session-properties.svg"
4327
 
+   sodipodi:docbase="/home/jimmac/gfx/ximian/art/icons/control-center/32x32"
4328
 
+   inkscape:output_extension="org.inkscape.output.svg.inkscape"
4329
 
+   sodipodi:modified="true">
4330
 
+  <defs
4331
 
+     id="defs7856">
4332
 
+    <linearGradient
4333
 
+       inkscape:collect="always"
4334
 
+       id="linearGradient5650">
4335
 
+      <stop
4336
 
+         style="stop-color:#d3d7cf;stop-opacity:1;"
4337
 
+         offset="0"
4338
 
+         id="stop5652" />
4339
 
+      <stop
4340
 
+         style="stop-color:#9ea795;stop-opacity:1"
4341
 
+         offset="1"
4342
 
+         id="stop5654" />
4343
 
+    </linearGradient>
4344
 
+    <linearGradient
4345
 
+       inkscape:collect="always"
4346
 
+       id="linearGradient5642">
4347
 
+      <stop
4348
 
+         style="stop-color:#eeeeec;stop-opacity:1;"
4349
 
+         offset="0"
4350
 
+         id="stop5644" />
4351
 
+      <stop
4352
 
+         style="stop-color:#c3c3bc;stop-opacity:1"
4353
 
+         offset="1"
4354
 
+         id="stop5646" />
4355
 
+    </linearGradient>
4356
 
+    <linearGradient
4357
 
+       inkscape:collect="always"
4358
 
+       id="linearGradient5634">
4359
 
+      <stop
4360
 
+         style="stop-color:#ffffff;stop-opacity:1;"
4361
 
+         offset="0"
4362
 
+         id="stop5636" />
4363
 
+      <stop
4364
 
+         style="stop-color:#ffffff;stop-opacity:0;"
4365
 
+         offset="1"
4366
 
+         id="stop5638" />
4367
 
+    </linearGradient>
4368
 
+    <linearGradient
4369
 
+       inkscape:collect="always"
4370
 
+       id="linearGradient5598">
4371
 
+      <stop
4372
 
+         style="stop-color:#ffffff;stop-opacity:1;"
4373
 
+         offset="0"
4374
 
+         id="stop5600" />
4375
 
+      <stop
4376
 
+         style="stop-color:#ffffff;stop-opacity:0;"
4377
 
+         offset="1"
4378
 
+         id="stop5602" />
4379
 
+    </linearGradient>
4380
 
+    <linearGradient
4381
 
+       inkscape:collect="always"
4382
 
+       id="linearGradient5716">
4383
 
+      <stop
4384
 
+         style="stop-color:#ffffff;stop-opacity:1;"
4385
 
+         offset="0"
4386
 
+         id="stop5718" />
4387
 
+      <stop
4388
 
+         style="stop-color:#ffffff;stop-opacity:0;"
4389
 
+         offset="1"
4390
 
+         id="stop5720" />
4391
 
+    </linearGradient>
4392
 
+    <linearGradient
4393
 
+       inkscape:collect="always"
4394
 
+       id="linearGradient5700">
4395
 
+      <stop
4396
 
+         style="stop-color:#e4e4e4;stop-opacity:1;"
4397
 
+         offset="0"
4398
 
+         id="stop5702" />
4399
 
+      <stop
4400
 
+         id="stop5708"
4401
 
+         offset="0.639386"
4402
 
+         style="stop-color:#fefefe;stop-opacity:1" />
4403
 
+      <stop
4404
 
+         style="stop-color:#ffffff;stop-opacity:1"
4405
 
+         offset="0.79632628"
4406
 
+         id="stop5710" />
4407
 
+      <stop
4408
 
+         style="stop-color:#949494;stop-opacity:1"
4409
 
+         offset="1"
4410
 
+         id="stop5704" />
4411
 
+    </linearGradient>
4412
 
+    <linearGradient
4413
 
+       id="linearGradient3832">
4414
 
+      <stop
4415
 
+         id="stop3834"
4416
 
+         offset="0.0000000"
4417
 
+         style="stop-color:#ffffff;stop-opacity:1.0000000" />
4418
 
+      <stop
4419
 
+         id="stop3836"
4420
 
+         offset="1.0000000"
4421
 
+         style="stop-color:#e0e0e0;stop-opacity:1.0000000" />
4422
 
+    </linearGradient>
4423
 
+    <linearGradient
4424
 
+       id="linearGradient4816">
4425
 
+      <stop
4426
 
+         id="stop4818"
4427
 
+         offset="0.0000000"
4428
 
+         style="stop-color:#204a87;stop-opacity:1.0000000" />
4429
 
+      <stop
4430
 
+         id="stop4820"
4431
 
+         offset="1.0000000"
4432
 
+         style="stop-color:#204a87;stop-opacity:0.0000000" />
4433
 
+    </linearGradient>
4434
 
+    <linearGradient
4435
 
+       id="linearGradient5048">
4436
 
+      <stop
4437
 
+         id="stop5050"
4438
 
+         offset="0"
4439
 
+         style="stop-color:black;stop-opacity:0;" />
4440
 
+      <stop
4441
 
+         style="stop-color:black;stop-opacity:1;"
4442
 
+         offset="0.5"
4443
 
+         id="stop5056" />
4444
 
+      <stop
4445
 
+         id="stop5052"
4446
 
+         offset="1"
4447
 
+         style="stop-color:black;stop-opacity:0;" />
4448
 
+    </linearGradient>
4449
 
+    <linearGradient
4450
 
+       id="linearGradient5060"
4451
 
+       inkscape:collect="always">
4452
 
+      <stop
4453
 
+         id="stop5062"
4454
 
+         offset="0"
4455
 
+         style="stop-color:black;stop-opacity:1;" />
4456
 
+      <stop
4457
 
+         id="stop5064"
4458
 
+         offset="1"
4459
 
+         style="stop-color:black;stop-opacity:0;" />
4460
 
+    </linearGradient>
4461
 
+    <radialGradient
4462
 
+       inkscape:collect="always"
4463
 
+       xlink:href="#linearGradient5060"
4464
 
+       id="radialGradient5664"
4465
 
+       gradientUnits="userSpaceOnUse"
4466
 
+       gradientTransform="matrix(-6.6526975e-2,0,0,3.5014969e-2,47.812816,25.161837)"
4467
 
+       cx="605.71429"
4468
 
+       cy="486.64789"
4469
 
+       fx="605.71429"
4470
 
+       fy="486.64789"
4471
 
+       r="117.14286" />
4472
 
+    <radialGradient
4473
 
+       inkscape:collect="always"
4474
 
+       xlink:href="#linearGradient5060"
4475
 
+       id="radialGradient5667"
4476
 
+       gradientUnits="userSpaceOnUse"
4477
 
+       gradientTransform="matrix(6.6526975e-2,0,0,3.5014969e-2,-0.2505064,25.161837)"
4478
 
+       cx="605.71429"
4479
 
+       cy="486.64789"
4480
 
+       fx="605.71429"
4481
 
+       fy="486.64789"
4482
 
+       r="117.14286" />
4483
 
+    <linearGradient
4484
 
+       inkscape:collect="always"
4485
 
+       xlink:href="#linearGradient5048"
4486
 
+       id="linearGradient5670"
4487
 
+       gradientUnits="userSpaceOnUse"
4488
 
+       gradientTransform="matrix(6.6526975e-2,0,0,3.5014969e-2,-0.2635996,25.161837)"
4489
 
+       x1="302.85715"
4490
 
+       y1="366.64789"
4491
 
+       x2="302.85715"
4492
 
+       y2="609.50507" />
4493
 
+    <linearGradient
4494
 
+       inkscape:collect="always"
4495
 
+       xlink:href="#linearGradient3832"
4496
 
+       id="linearGradient5682"
4497
 
+       gradientUnits="userSpaceOnUse"
4498
 
+       gradientTransform="matrix(1.451927,0,0,1.3372801,-45.830775,7.6961475)"
4499
 
+       x1="17.88068"
4500
 
+       y1="11.072588"
4501
 
+       x2="17.88068"
4502
 
+       y2="21.767578" />
4503
 
+    <linearGradient
4504
 
+       inkscape:collect="always"
4505
 
+       xlink:href="#linearGradient4816"
4506
 
+       id="linearGradient5684"
4507
 
+       gradientUnits="userSpaceOnUse"
4508
 
+       gradientTransform="matrix(1.4668451,0,0,1.8750592,-45.628571,3.9919211)"
4509
 
+       x1="13.050564"
4510
 
+       y1="11.353518"
4511
 
+       x2="13.050564"
4512
 
+       y2="5.6173568" />
4513
 
+    <linearGradient
4514
 
+       inkscape:collect="always"
4515
 
+       xlink:href="#linearGradient5700"
4516
 
+       id="linearGradient5728"
4517
 
+       gradientUnits="userSpaceOnUse"
4518
 
+       gradientTransform="translate(0.5,0)"
4519
 
+       x1="24"
4520
 
+       y1="23"
4521
 
+       x2="45.505005"
4522
 
+       y2="23" />
4523
 
+    <linearGradient
4524
 
+       inkscape:collect="always"
4525
 
+       xlink:href="#linearGradient5716"
4526
 
+       id="linearGradient5730"
4527
 
+       gradientUnits="userSpaceOnUse"
4528
 
+       x1="40.745819"
4529
 
+       y1="23"
4530
 
+       x2="44.005268"
4531
 
+       y2="23" />
4532
 
+    <filter
4533
 
+       inkscape:collect="always"
4534
 
+       id="filter5786">
4535
 
+      <feGaussianBlur
4536
 
+         inkscape:collect="always"
4537
 
+         stdDeviation="0.62861987"
4538
 
+         id="feGaussianBlur5788" />
4539
 
+    </filter>
4540
 
+    <linearGradient
4541
 
+       inkscape:collect="always"
4542
 
+       xlink:href="#linearGradient5598"
4543
 
+       id="linearGradient5604"
4544
 
+       x1="25.627417"
4545
 
+       y1="8"
4546
 
+       x2="25.627417"
4547
 
+       y2="4.7617435"
4548
 
+       gradientUnits="userSpaceOnUse"
4549
 
+       gradientTransform="matrix(0.4311139,0,0,0.1911915,0.6155053,1.0660639)" />
4550
 
+    <filter
4551
 
+       inkscape:collect="always"
4552
 
+       x="-0.019480519"
4553
 
+       width="1.0389611"
4554
 
+       y="-0.14285713"
4555
 
+       height="1.2857143"
4556
 
+       id="filter5628">
4557
 
+      <feGaussianBlur
4558
 
+         inkscape:collect="always"
4559
 
+         stdDeviation="0.42857143"
4560
 
+         id="feGaussianBlur5630" />
4561
 
+    </filter>
4562
 
+    <linearGradient
4563
 
+       inkscape:collect="always"
4564
 
+       xlink:href="#linearGradient5634"
4565
 
+       id="linearGradient5640"
4566
 
+       x1="25.313259"
4567
 
+       y1="42.656792"
4568
 
+       x2="25.313261"
4569
 
+       y2="10.129107"
4570
 
+       gradientUnits="userSpaceOnUse"
4571
 
+       gradientTransform="matrix(0.4161734,0,0,0.4097743,0.9802818,8.45901e-2)" />
4572
 
+    <linearGradient
4573
 
+       inkscape:collect="always"
4574
 
+       xlink:href="#linearGradient5642"
4575
 
+       id="linearGradient5648"
4576
 
+       x1="26.29347"
4577
 
+       y1="7.3125"
4578
 
+       x2="26.232994"
4579
 
+       y2="3.5357027"
4580
 
+       gradientUnits="userSpaceOnUse"
4581
 
+       gradientTransform="matrix(0.4415111,0,0,0.3917361,0.3659716,0.1289237)" />
4582
 
+    <linearGradient
4583
 
+       inkscape:collect="always"
4584
 
+       xlink:href="#linearGradient5650"
4585
 
+       id="linearGradient5656"
4586
 
+       x1="26.29347"
4587
 
+       y1="7.3125"
4588
 
+       x2="26.232994"
4589
 
+       y2="3.5357027"
4590
 
+       gradientUnits="userSpaceOnUse"
4591
 
+       gradientTransform="matrix(0.4415111,0,0,0.3917361,0.3659716,0.1289237)" />
4592
 
+  </defs>
4593
 
+  <sodipodi:namedview
4594
 
+     id="base"
4595
 
+     pagecolor="#ffffff"
4596
 
+     bordercolor="#e0e0e0"
4597
 
+     borderopacity="1"
4598
 
+     gridtolerance="10000"
4599
 
+     guidetolerance="10"
4600
 
+     objecttolerance="10"
4601
 
+     inkscape:pageopacity="0.0"
4602
 
+     inkscape:pageshadow="2"
4603
 
+     inkscape:zoom="1"
4604
 
+     inkscape:cx="21.888246"
4605
 
+     inkscape:cy="13.442716"
4606
 
+     inkscape:document-units="px"
4607
 
+     inkscape:current-layer="layer1"
4608
 
+     width="22px"
4609
 
+     height="22px"
4610
 
+     inkscape:showpageshadow="false"
4611
 
+     inkscape:window-width="1102"
4612
 
+     inkscape:window-height="958"
4613
 
+     inkscape:window-x="2117"
4614
 
+     inkscape:window-y="82"
4615
 
+     showgrid="false"
4616
 
+     borderlayer="true" />
4617
 
+  <metadata
4618
 
+     id="metadata7859">
4619
 
+    <rdf:RDF>
4620
 
+      <cc:Work
4621
 
+         rdf:about="">
4622
 
+        <dc:format>image/svg+xml</dc:format>
4623
 
+        <dc:type
4624
 
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
4625
 
+        <dc:creator>
4626
 
+          <cc:Agent>
4627
 
+            <dc:title>Jakub Steiner</dc:title>
4628
 
+          </cc:Agent>
4629
 
+        </dc:creator>
4630
 
+        <dc:source>http://jimmac.musichall.cz</dc:source>
4631
 
+        <cc:license
4632
 
+           rdf:resource="http://creativecommons.org/licenses/GPL/2.0/" />
4633
 
+        <dc:title>Gnome Session Properties</dc:title>
4634
 
+      </cc:Work>
4635
 
+      <cc:License
4636
 
+         rdf:about="http://creativecommons.org/licenses/GPL/2.0/">
4637
 
+        <cc:permits
4638
 
+           rdf:resource="http://web.resource.org/cc/Reproduction" />
4639
 
+        <cc:permits
4640
 
+           rdf:resource="http://web.resource.org/cc/Distribution" />
4641
 
+        <cc:requires
4642
 
+           rdf:resource="http://web.resource.org/cc/Notice" />
4643
 
+        <cc:permits
4644
 
+           rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
4645
 
+        <cc:requires
4646
 
+           rdf:resource="http://web.resource.org/cc/ShareAlike" />
4647
 
+        <cc:requires
4648
 
+           rdf:resource="http://web.resource.org/cc/SourceCode" />
4649
 
+      </cc:License>
4650
 
+    </rdf:RDF>
4651
 
+  </metadata>
4652
 
+  <g
4653
 
+     inkscape:label="Layer 1"
4654
 
+     inkscape:groupmode="layer"
4655
 
+     id="layer1">
4656
 
+    <g
4657
 
+       id="g5672"
4658
 
+       style="opacity:0.53714288"
4659
 
+       transform="matrix(0.4617581,0,0,0.6375656,-4.8917036e-2,-9.3215937)">
4660
 
+      <rect
4661
 
+         y="38"
4662
 
+         x="7.7196383"
4663
 
+         height="8.5036354"
4664
 
+         width="32.123024"
4665
 
+         id="rect4173"
4666
 
+         style="opacity:1;color:#000000;fill:url(#linearGradient5670);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
4667
 
+      <path
4668
 
+         sodipodi:nodetypes="cccc"
4669
 
+         id="path5058"
4670
 
+         d="M 39.842663,38.000295 C 39.842663,38.000295 39.842663,46.503461 39.842663,46.503461 C 43.268636,46.519469 48.125002,44.598333 48.125,42.25133 C 48.125,39.904328 44.30187,38.000295 39.842663,38.000295 z "
4671
 
+         style="opacity:1;color:#000000;fill:url(#radialGradient5667);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
4672
 
+      <path
4673
 
+         style="opacity:1;color:#000000;fill:url(#radialGradient5664);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
4674
 
+         d="M 7.7196385,38.000295 C 7.7196385,38.000295 7.7196385,46.503461 7.7196385,46.503461 C 4.2936621,46.519469 -0.56270146,44.598333 -0.56270146,42.25133 C -0.56270146,39.904328 3.2604286,38.000295 7.7196385,38.000295 z "
4675
 
+         id="path5018"
4676
 
+         sodipodi:nodetypes="cccc" />
4677
 
+    </g>
4678
 
+    <rect
4679
 
+       style="opacity:1;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:evenodd;stroke:#3465a4;stroke-width:1;stroke-linecap:square;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
4680
 
+       id="rect4585"
4681
 
+       width="18.984974"
4682
 
+       height="16.920202"
4683
 
+       x="1.4697493"
4684
 
+       y="1.5550299"
4685
 
+       rx="1.0119615"
4686
 
+       ry="0.96491748" />
4687
 
+    <rect
4688
 
+       ry="2.2922091"
4689
 
+       rx="2.2922091"
4690
 
+       y="4.3838844"
4691
 
+       x="2.5"
4692
 
+       height="5"
4693
 
+       width="43"
4694
 
+       id="rect5606"
4695
 
+       style="opacity:0.27999998;color:#000000;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:2.34036613;stroke-linecap:square;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;filter:url(#filter5628);enable-background:accumulate"
4696
 
+       transform="matrix(0.4281431,0,0,0.4264257,0.8323174,7.5101245e-3)" />
4697
 
+    <rect
4698
 
+       style="opacity:1;color:#000000;fill:url(#linearGradient5648);fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient5656);stroke-width:1;stroke-linecap:square;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
4699
 
+       id="rect5556"
4700
 
+       width="18.984974"
4701
 
+       height="1.9586804"
4702
 
+       x="1.4697493"
4703
 
+       y="1.5"
4704
 
+       rx="1.0120357"
4705
 
+       ry="0.89794111" />
4706
 
+    <rect
4707
 
+       ry="0.32291412"
4708
 
+       rx="0.31787637"
4709
 
+       y="1.9814546"
4710
 
+       x="2.5"
4711
 
+       height="15.518545"
4712
 
+       width="16.999998"
4713
 
+       id="rect5632"
4714
 
+       style="opacity:0.52571429;color:#000000;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient5640);stroke-width:1;stroke-linecap:square;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
4715
 
+    <g
4716
 
+       id="g5724"
4717
 
+       transform="matrix(0.4754857,0,0,0.4735784,-1.225003,-0.5239366)">
4718
 
+      <path
4719
 
+         style="opacity:0.3142857;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter5786)"
4720
 
+         d="M 10.5,25.474874 L 20.5,15.474874 L 20.5,21.005204 L 40.5,21.005204 C 44.35508,21.005204 45.58678,20.95144 45.5,23 L 45.5,33 C 45.5,33 43.070425,29.988738 40.625,29.988738 L 20.5,29.988738 L 20.5,35.474874 L 10.5,25.474874 z "
4721
 
+         id="path5738"
4722
 
+         sodipodi:nodetypes="cccccccccc" />
4723
 
+      <path
4724
 
+         sodipodi:nodetypes="cccccccccc"
4725
 
+         id="path5698"
4726
 
+         d="M 10.5,23.279959 L 20.5,13.559918 L 20.5,19.090248 L 40.5,19.090248 C 44.35508,19.090248 45.58678,21.511358 45.5,23.559918 L 45.5,33 C 45.5,33 45.096959,27.513864 40.625,27.513864 L 20.5,27.513864 L 20.5,33 L 10.5,23.279959 z "
4727
 
+         style="fill:url(#linearGradient5728);fill-opacity:1;fill-rule:evenodd;stroke:#555753;stroke-width:2.10734344px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
4728
 
+      <path
4729
 
+         d="M 18.125,18.8125 L 13.9375,23 L 18.09375,27.15625 C 18.269985,25.965284 19.296092,25.085764 20.5,25.09375 L 40.625,25.09375 C 41.541275,25.09375 42.352276,25.289567 43.09375,25.59375 L 43.09375,23 C 43.093144,22.968753 43.093144,22.937497 43.09375,22.90625 C 43.114981,22.405075 42.966583,21.933517 42.6875,21.625 C 42.408417,21.316483 41.921956,20.9375 40.5,20.9375 L 20.5,20.9375 C 19.287205,20.925631 18.271136,20.016516 18.125,18.8125 z "
4730
 
+         inkscape:href="#path5698"
4731
 
+         id="path5712"
4732
 
+         style="opacity:0.62857145;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient5730);stroke-width:2.10734344px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
4733
 
+         xlink:href="#path5698"
4734
 
+         inkscape:original="M 20.5 13.5625 L 10.5 23.28125 L 20.5 33 L 20.5 27.5 L 40.625 27.5 C 45.096959 27.5 45.5 33 45.5 33 L 45.5 23.5625 C 45.58678 21.51394 44.35508 19.09375 40.5 19.09375 L 20.5 19.09375 L 20.5 13.5625 z "
4735
 
+         inkscape:radius="-2.4160075"
4736
 
+         sodipodi:type="inkscape:offset" />
4737
 
+    </g>
4738
 
+    <rect
4739
 
+       ry="0.21563303"
4740
 
+       rx="0.48622662"
4741
 
+       y="1.9264256"
4742
 
+       x="2.1244035"
4743
 
+       height="0.57357448"
4744
 
+       width="17.675669"
4745
 
+       id="rect4627"
4746
 
+       style="opacity:1;color:#000000;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient5604);stroke-width:0.99999988;stroke-linecap:square;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
4747
 
+  </g>
4748
 
+</svg>
4749
 
Index: gnome-session-3.28.0/data/icons/32x32/session-properties.svg
4750
 
===================================================================
4751
 
--- /dev/null
4752
 
+++ gnome-session-3.28.0/data/icons/32x32/session-properties.svg
4753
 
@@ -0,0 +1,490 @@
4754
 
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
4755
 
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
4756
 
+<svg
4757
 
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
4758
 
+   xmlns:cc="http://web.resource.org/cc/"
4759
 
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
4760
 
+   xmlns:svg="http://www.w3.org/2000/svg"
4761
 
+   xmlns="http://www.w3.org/2000/svg"
4762
 
+   xmlns:xlink="http://www.w3.org/1999/xlink"
4763
 
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
4764
 
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
4765
 
+   width="32"
4766
 
+   height="32"
4767
 
+   id="svg7854"
4768
 
+   sodipodi:version="0.32"
4769
 
+   inkscape:version="0.44+devel"
4770
 
+   version="1.0"
4771
 
+   sodipodi:docname="session-properties.svg"
4772
 
+   sodipodi:docbase="/home/jimmac/gfx/ximian/art/icons/control-center/scalable"
4773
 
+   inkscape:output_extension="org.inkscape.output.svg.inkscape"
4774
 
+   sodipodi:modified="true">
4775
 
+  <defs
4776
 
+     id="defs7856">
4777
 
+    <linearGradient
4778
 
+       inkscape:collect="always"
4779
 
+       id="linearGradient5650">
4780
 
+      <stop
4781
 
+         style="stop-color:#d3d7cf;stop-opacity:1;"
4782
 
+         offset="0"
4783
 
+         id="stop5652" />
4784
 
+      <stop
4785
 
+         style="stop-color:#9ea795;stop-opacity:1"
4786
 
+         offset="1"
4787
 
+         id="stop5654" />
4788
 
+    </linearGradient>
4789
 
+    <linearGradient
4790
 
+       inkscape:collect="always"
4791
 
+       id="linearGradient5642">
4792
 
+      <stop
4793
 
+         style="stop-color:#eeeeec;stop-opacity:1;"
4794
 
+         offset="0"
4795
 
+         id="stop5644" />
4796
 
+      <stop
4797
 
+         style="stop-color:#c3c3bc;stop-opacity:1"
4798
 
+         offset="1"
4799
 
+         id="stop5646" />
4800
 
+    </linearGradient>
4801
 
+    <linearGradient
4802
 
+       inkscape:collect="always"
4803
 
+       id="linearGradient5634">
4804
 
+      <stop
4805
 
+         style="stop-color:#ffffff;stop-opacity:1;"
4806
 
+         offset="0"
4807
 
+         id="stop5636" />
4808
 
+      <stop
4809
 
+         style="stop-color:#ffffff;stop-opacity:0;"
4810
 
+         offset="1"
4811
 
+         id="stop5638" />
4812
 
+    </linearGradient>
4813
 
+    <linearGradient
4814
 
+       inkscape:collect="always"
4815
 
+       id="linearGradient5598">
4816
 
+      <stop
4817
 
+         style="stop-color:#ffffff;stop-opacity:1;"
4818
 
+         offset="0"
4819
 
+         id="stop5600" />
4820
 
+      <stop
4821
 
+         style="stop-color:#ffffff;stop-opacity:0;"
4822
 
+         offset="1"
4823
 
+         id="stop5602" />
4824
 
+    </linearGradient>
4825
 
+    <linearGradient
4826
 
+       inkscape:collect="always"
4827
 
+       id="linearGradient5716">
4828
 
+      <stop
4829
 
+         style="stop-color:#ffffff;stop-opacity:1;"
4830
 
+         offset="0"
4831
 
+         id="stop5718" />
4832
 
+      <stop
4833
 
+         style="stop-color:#ffffff;stop-opacity:0;"
4834
 
+         offset="1"
4835
 
+         id="stop5720" />
4836
 
+    </linearGradient>
4837
 
+    <linearGradient
4838
 
+       inkscape:collect="always"
4839
 
+       id="linearGradient5700">
4840
 
+      <stop
4841
 
+         style="stop-color:#e4e4e4;stop-opacity:1;"
4842
 
+         offset="0"
4843
 
+         id="stop5702" />
4844
 
+      <stop
4845
 
+         id="stop5708"
4846
 
+         offset="0.639386"
4847
 
+         style="stop-color:#fefefe;stop-opacity:1" />
4848
 
+      <stop
4849
 
+         style="stop-color:#ffffff;stop-opacity:1"
4850
 
+         offset="0.79632628"
4851
 
+         id="stop5710" />
4852
 
+      <stop
4853
 
+         style="stop-color:#949494;stop-opacity:1"
4854
 
+         offset="1"
4855
 
+         id="stop5704" />
4856
 
+    </linearGradient>
4857
 
+    <linearGradient
4858
 
+       id="linearGradient3832">
4859
 
+      <stop
4860
 
+         id="stop3834"
4861
 
+         offset="0.0000000"
4862
 
+         style="stop-color:#ffffff;stop-opacity:1.0000000" />
4863
 
+      <stop
4864
 
+         id="stop3836"
4865
 
+         offset="1.0000000"
4866
 
+         style="stop-color:#e0e0e0;stop-opacity:1.0000000" />
4867
 
+    </linearGradient>
4868
 
+    <linearGradient
4869
 
+       id="linearGradient4816">
4870
 
+      <stop
4871
 
+         id="stop4818"
4872
 
+         offset="0.0000000"
4873
 
+         style="stop-color:#204a87;stop-opacity:1.0000000" />
4874
 
+      <stop
4875
 
+         id="stop4820"
4876
 
+         offset="1.0000000"
4877
 
+         style="stop-color:#204a87;stop-opacity:0.0000000" />
4878
 
+    </linearGradient>
4879
 
+    <linearGradient
4880
 
+       id="linearGradient5048">
4881
 
+      <stop
4882
 
+         id="stop5050"
4883
 
+         offset="0"
4884
 
+         style="stop-color:black;stop-opacity:0;" />
4885
 
+      <stop
4886
 
+         style="stop-color:black;stop-opacity:1;"
4887
 
+         offset="0.5"
4888
 
+         id="stop5056" />
4889
 
+      <stop
4890
 
+         id="stop5052"
4891
 
+         offset="1"
4892
 
+         style="stop-color:black;stop-opacity:0;" />
4893
 
+    </linearGradient>
4894
 
+    <linearGradient
4895
 
+       id="linearGradient5060"
4896
 
+       inkscape:collect="always">
4897
 
+      <stop
4898
 
+         id="stop5062"
4899
 
+         offset="0"
4900
 
+         style="stop-color:black;stop-opacity:1;" />
4901
 
+      <stop
4902
 
+         id="stop5064"
4903
 
+         offset="1"
4904
 
+         style="stop-color:black;stop-opacity:0;" />
4905
 
+    </linearGradient>
4906
 
+    <radialGradient
4907
 
+       inkscape:collect="always"
4908
 
+       xlink:href="#linearGradient5060"
4909
 
+       id="radialGradient5664"
4910
 
+       gradientUnits="userSpaceOnUse"
4911
 
+       gradientTransform="matrix(-6.6526975e-2,0,0,3.5014969e-2,47.812816,25.161837)"
4912
 
+       cx="605.71429"
4913
 
+       cy="486.64789"
4914
 
+       fx="605.71429"
4915
 
+       fy="486.64789"
4916
 
+       r="117.14286" />
4917
 
+    <radialGradient
4918
 
+       inkscape:collect="always"
4919
 
+       xlink:href="#linearGradient5060"
4920
 
+       id="radialGradient5667"
4921
 
+       gradientUnits="userSpaceOnUse"
4922
 
+       gradientTransform="matrix(6.6526975e-2,0,0,3.5014969e-2,-0.2505064,25.161837)"
4923
 
+       cx="605.71429"
4924
 
+       cy="486.64789"
4925
 
+       fx="605.71429"
4926
 
+       fy="486.64789"
4927
 
+       r="117.14286" />
4928
 
+    <linearGradient
4929
 
+       inkscape:collect="always"
4930
 
+       xlink:href="#linearGradient5048"
4931
 
+       id="linearGradient5670"
4932
 
+       gradientUnits="userSpaceOnUse"
4933
 
+       gradientTransform="matrix(6.6526975e-2,0,0,3.5014969e-2,-0.2635996,25.161837)"
4934
 
+       x1="302.85715"
4935
 
+       y1="366.64789"
4936
 
+       x2="302.85715"
4937
 
+       y2="609.50507" />
4938
 
+    <linearGradient
4939
 
+       inkscape:collect="always"
4940
 
+       xlink:href="#linearGradient3832"
4941
 
+       id="linearGradient5682"
4942
 
+       gradientUnits="userSpaceOnUse"
4943
 
+       gradientTransform="matrix(1.4257653,0,0,1.3494809,-45.841705,7.4048427)"
4944
 
+       x1="17.88068"
4945
 
+       y1="11.072588"
4946
 
+       x2="17.88068"
4947
 
+       y2="21.767578" />
4948
 
+    <linearGradient
4949
 
+       inkscape:collect="always"
4950
 
+       xlink:href="#linearGradient4816"
4951
 
+       id="linearGradient5684"
4952
 
+       gradientUnits="userSpaceOnUse"
4953
 
+       gradientTransform="matrix(1.2803684,0,0,1.2242141,-43.519693,10.324658)"
4954
 
+       x1="13.050564"
4955
 
+       y1="11.353518"
4956
 
+       x2="13.050564"
4957
 
+       y2="5.6173568" />
4958
 
+    <linearGradient
4959
 
+       inkscape:collect="always"
4960
 
+       xlink:href="#linearGradient3832"
4961
 
+       id="linearGradient5694"
4962
 
+       gradientUnits="userSpaceOnUse"
4963
 
+       gradientTransform="matrix(1.367592,0,0,1.259127,-45.521751,9.5621318)"
4964
 
+       x1="17.88068"
4965
 
+       y1="11.072588"
4966
 
+       x2="17.88068"
4967
 
+       y2="21.767578" />
4968
 
+    <linearGradient
4969
 
+       inkscape:collect="always"
4970
 
+       xlink:href="#linearGradient4816"
4971
 
+       id="linearGradient5696"
4972
 
+       gradientUnits="userSpaceOnUse"
4973
 
+       gradientTransform="matrix(1.325819,0,0,1.19936,-44.590631,11.169522)"
4974
 
+       x1="13.050564"
4975
 
+       y1="11.353518"
4976
 
+       x2="13.050564"
4977
 
+       y2="5.6173568" />
4978
 
+    <linearGradient
4979
 
+       inkscape:collect="always"
4980
 
+       xlink:href="#linearGradient5700"
4981
 
+       id="linearGradient5728"
4982
 
+       gradientUnits="userSpaceOnUse"
4983
 
+       gradientTransform="translate(0.5,0)"
4984
 
+       x1="24"
4985
 
+       y1="23"
4986
 
+       x2="45.505005"
4987
 
+       y2="23" />
4988
 
+    <linearGradient
4989
 
+       inkscape:collect="always"
4990
 
+       xlink:href="#linearGradient5716"
4991
 
+       id="linearGradient5730"
4992
 
+       gradientUnits="userSpaceOnUse"
4993
 
+       x1="40.745819"
4994
 
+       y1="23"
4995
 
+       x2="44.005268"
4996
 
+       y2="23" />
4997
 
+    <filter
4998
 
+       inkscape:collect="always"
4999
 
+       id="filter5786">
5000
 
+      <feGaussianBlur
5001
 
+         inkscape:collect="always"
5002
 
+         stdDeviation="0.62861987"
5003
 
+         id="feGaussianBlur5788" />
5004
 
+    </filter>
5005
 
+    <linearGradient
5006
 
+       inkscape:collect="always"
5007
 
+       xlink:href="#linearGradient5598"
5008
 
+       id="linearGradient5604"
5009
 
+       x1="25.627417"
5010
 
+       y1="8"
5011
 
+       x2="25.627417"
5012
 
+       y2="4.7617435"
5013
 
+       gradientUnits="userSpaceOnUse"
5014
 
+       gradientTransform="matrix(0.6585366,0,0,0.448956,0.195122,1.1328299)" />
5015
 
+    <filter
5016
 
+       inkscape:collect="always"
5017
 
+       x="-0.019480519"
5018
 
+       width="1.0389611"
5019
 
+       y="-0.14285713"
5020
 
+       height="1.2857143"
5021
 
+       id="filter5628">
5022
 
+      <feGaussianBlur
5023
 
+         inkscape:collect="always"
5024
 
+         stdDeviation="0.42857143"
5025
 
+         id="feGaussianBlur5630" />
5026
 
+    </filter>
5027
 
+    <linearGradient
5028
 
+       inkscape:collect="always"
5029
 
+       xlink:href="#linearGradient5634"
5030
 
+       id="linearGradient5640"
5031
 
+       x1="25.313259"
5032
 
+       y1="42.656792"
5033
 
+       x2="25.313261"
5034
 
+       y2="10.129107"
5035
 
+       gradientUnits="userSpaceOnUse"
5036
 
+       gradientTransform="matrix(0.6609814,0,0,0.6406647,8.63294e-2,0.2717499)" />
5037
 
+    <linearGradient
5038
 
+       inkscape:collect="always"
5039
 
+       xlink:href="#linearGradient5642"
5040
 
+       id="linearGradient5648"
5041
 
+       x1="26.29347"
5042
 
+       y1="7.3125"
5043
 
+       x2="26.232994"
5044
 
+       y2="3.5357027"
5045
 
+       gradientUnits="userSpaceOnUse"
5046
 
+       gradientTransform="matrix(0.6744186,0,0,0.6,-0.1860466,0.4000001)" />
5047
 
+    <linearGradient
5048
 
+       inkscape:collect="always"
5049
 
+       xlink:href="#linearGradient5650"
5050
 
+       id="linearGradient5656"
5051
 
+       x1="26.29347"
5052
 
+       y1="7.3125"
5053
 
+       x2="26.232994"
5054
 
+       y2="3.5357027"
5055
 
+       gradientUnits="userSpaceOnUse"
5056
 
+       gradientTransform="matrix(0.6744186,0,0,0.6,-0.1860466,0.4000001)" />
5057
 
+  </defs>
5058
 
+  <sodipodi:namedview
5059
 
+     id="base"
5060
 
+     pagecolor="#ffffff"
5061
 
+     bordercolor="#e0e0e0"
5062
 
+     borderopacity="1"
5063
 
+     gridtolerance="10000"
5064
 
+     guidetolerance="10"
5065
 
+     objecttolerance="10"
5066
 
+     inkscape:pageopacity="0.0"
5067
 
+     inkscape:pageshadow="2"
5068
 
+     inkscape:zoom="1"
5069
 
+     inkscape:cx="31.400129"
5070
 
+     inkscape:cy="-4.050017"
5071
 
+     inkscape:document-units="px"
5072
 
+     inkscape:current-layer="layer1"
5073
 
+     width="32px"
5074
 
+     height="32px"
5075
 
+     inkscape:showpageshadow="false"
5076
 
+     inkscape:window-width="1102"
5077
 
+     inkscape:window-height="958"
5078
 
+     inkscape:window-x="2117"
5079
 
+     inkscape:window-y="82"
5080
 
+     showgrid="false" />
5081
 
+  <metadata
5082
 
+     id="metadata7859">
5083
 
+    <rdf:RDF>
5084
 
+      <cc:Work
5085
 
+         rdf:about="">
5086
 
+        <dc:format>image/svg+xml</dc:format>
5087
 
+        <dc:type
5088
 
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
5089
 
+        <dc:creator>
5090
 
+          <cc:Agent>
5091
 
+            <dc:title>Jakub Steiner</dc:title>
5092
 
+          </cc:Agent>
5093
 
+        </dc:creator>
5094
 
+        <dc:source>http://jimmac.musichall.cz</dc:source>
5095
 
+        <cc:license
5096
 
+           rdf:resource="http://creativecommons.org/licenses/GPL/2.0/" />
5097
 
+        <dc:title>Gnome Session Properties</dc:title>
5098
 
+      </cc:Work>
5099
 
+      <cc:License
5100
 
+         rdf:about="http://creativecommons.org/licenses/GPL/2.0/">
5101
 
+        <cc:permits
5102
 
+           rdf:resource="http://web.resource.org/cc/Reproduction" />
5103
 
+        <cc:permits
5104
 
+           rdf:resource="http://web.resource.org/cc/Distribution" />
5105
 
+        <cc:requires
5106
 
+           rdf:resource="http://web.resource.org/cc/Notice" />
5107
 
+        <cc:permits
5108
 
+           rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
5109
 
+        <cc:requires
5110
 
+           rdf:resource="http://web.resource.org/cc/ShareAlike" />
5111
 
+        <cc:requires
5112
 
+           rdf:resource="http://web.resource.org/cc/SourceCode" />
5113
 
+      </cc:License>
5114
 
+    </rdf:RDF>
5115
 
+  </metadata>
5116
 
+  <g
5117
 
+     inkscape:label="Layer 1"
5118
 
+     inkscape:groupmode="layer"
5119
 
+     id="layer1">
5120
 
+    <g
5121
 
+       id="g5672"
5122
 
+       style="opacity:0.53714288"
5123
 
+       transform="matrix(0.7053465,0,0,0.9765232,-0.8197989,-14.074824)">
5124
 
+      <rect
5125
 
+         y="38"
5126
 
+         x="7.7196383"
5127
 
+         height="8.5036354"
5128
 
+         width="32.123024"
5129
 
+         id="rect4173"
5130
 
+         style="opacity:1;color:#000000;fill:url(#linearGradient5670);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
5131
 
+      <path
5132
 
+         sodipodi:nodetypes="cccc"
5133
 
+         id="path5058"
5134
 
+         d="M 39.842663,38.000295 C 39.842663,38.000295 39.842663,46.503461 39.842663,46.503461 C 43.268636,46.519469 48.125002,44.598333 48.125,42.25133 C 48.125,39.904328 44.30187,38.000295 39.842663,38.000295 z "
5135
 
+         style="opacity:1;color:#000000;fill:url(#radialGradient5667);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
5136
 
+      <path
5137
 
+         style="opacity:1;color:#000000;fill:url(#radialGradient5664);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
5138
 
+         d="M 7.7196385,38.000295 C 7.7196385,38.000295 7.7196385,46.503461 7.7196385,46.503461 C 4.2936621,46.519469 -0.56270146,44.598333 -0.56270146,42.25133 C -0.56270146,39.904328 3.2604286,38.000295 7.7196385,38.000295 z "
5139
 
+         id="path5018"
5140
 
+         sodipodi:nodetypes="cccc" />
5141
 
+    </g>
5142
 
+    <rect
5143
 
+       style="opacity:1;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:evenodd;stroke:#3465a4;stroke-width:1;stroke-linecap:square;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
5144
 
+       id="rect4585"
5145
 
+       width="29"
5146
 
+       height="25.915714"
5147
 
+       x="1.5"
5148
 
+       y="2.5842862"
5149
 
+       rx="1.5457952"
5150
 
+       ry="1.4779093" />
5151
 
+    <rect
5152
 
+       ry="2.2922091"
5153
 
+       rx="2.2922091"
5154
 
+       y="4.3838844"
5155
 
+       x="2.5"
5156
 
+       height="5"
5157
 
+       width="43"
5158
 
+       id="rect5606"
5159
 
+       style="opacity:0.27999998;color:#000000;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.53006899;stroke-linecap:square;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;filter:url(#filter5628);enable-background:accumulate"
5160
 
+       transform="matrix(0.6539988,0,0,0.6531321,0.5263077,0.2140377)" />
5161
 
+    <rect
5162
 
+       style="opacity:1;color:#000000;fill:url(#linearGradient5648);fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient5656);stroke-width:1;stroke-linecap:square;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
5163
 
+       id="rect5556"
5164
 
+       width="29"
5165
 
+       height="3"
5166
 
+       x="1.5"
5167
 
+       y="2.5"
5168
 
+       rx="1.5459085"
5169
 
+       ry="1.3753254" />
5170
 
+    <rect
5171
 
+       ry="0.50486249"
5172
 
+       rx="0.50486249"
5173
 
+       y="3.2374167"
5174
 
+       x="2.5"
5175
 
+       height="24.262585"
5176
 
+       width="27.000004"
5177
 
+       id="rect5632"
5178
 
+       style="opacity:0.52571429;color:#000000;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient5640);stroke-width:1;stroke-linecap:square;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
5179
 
+    <g
5180
 
+       id="g5677"
5181
 
+       transform="matrix(0.6539988,0,0,0.6531321,29.351952,-3.3803525)">
5182
 
+      <rect
5183
 
+         id="rect3818"
5184
 
+         style="color:#000000;fill:url(#linearGradient5682);fill-opacity:1;fill-rule:evenodd;stroke:#8d8d8d;stroke-width:1.5300703;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
5185
 
+         y="18.189814"
5186
 
+         x="-37.999996"
5187
 
+         ry="0.57820499"
5188
 
+         rx="0.56373626"
5189
 
+         height="21.435171"
5190
 
+         width="22.935822" />
5191
 
+      <rect
5192
 
+         id="rect3820"
5193
 
+         style="color:#000000;fill:url(#linearGradient5684);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
5194
 
+         y="20.486441"
5195
 
+         x="-35.706413"
5196
 
+         ry="0.097232968"
5197
 
+         rx="0.09710411"
5198
 
+         height="3.0621684"
5199
 
+         width="18.348656" />
5200
 
+      <rect
5201
 
+         id="rect4962"
5202
 
+         style="color:#000000;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:1.53007114;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.47878789;visibility:visible;display:inline;overflow:visible"
5203
 
+         y="19.7209"
5204
 
+         x="-36.47094"
5205
 
+         ry="0.16788077"
5206
 
+         rx="0.18690105"
5207
 
+         height="18.373005"
5208
 
+         width="19.877708" />
5209
 
+    </g>
5210
 
+    <g
5211
 
+       id="g5724"
5212
 
+       transform="matrix(0.6539988,0,0,0.6531321,0.5263077,5.4390943)">
5213
 
+      <path
5214
 
+         style="opacity:0.3142857;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter5786)"
5215
 
+         d="M 10.5,25.474874 L 20.5,15.474874 L 20.5,21.005204 L 40.5,21.005204 C 44.35508,21.005204 45.58678,20.95144 45.5,23 L 45.5,33 C 45.5,33 43.070425,29.988738 40.625,29.988738 L 20.5,29.988738 L 20.5,35.474874 L 10.5,25.474874 z "
5216
 
+         id="path5738"
5217
 
+         sodipodi:nodetypes="cccccccccc" />
5218
 
+      <path
5219
 
+         sodipodi:nodetypes="cccccccccc"
5220
 
+         id="path5698"
5221
 
+         d="M 10.5,23 L 20.5,13 L 20.5,18.53033 L 40.5,18.53033 C 44.35508,18.53033 45.58678,20.95144 45.5,23 L 45.5,33 C 45.5,33 45.096959,27.513864 40.625,27.513864 L 20.5,27.513864 L 20.5,33 L 10.5,23 z "
5222
 
+         style="fill:url(#linearGradient5728);fill-opacity:1;fill-rule:evenodd;stroke:#555753;stroke-width:1.53006899px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
5223
 
+      <path
5224
 
+         d="M 19.1875,16.1875 L 12.375,23 L 19.1875,29.8125 L 19.1875,27.5 C 19.191541,26.776807 19.776807,26.191541 20.5,26.1875 L 40.625,26.1875 C 42.124779,26.1875 43.279176,26.742626 44.1875,27.5 L 44.1875,23 C 44.187007,22.97917 44.187007,22.95833 44.1875,22.9375 C 44.218785,22.19897 44.005899,21.434255 43.5,20.875 C 42.994101,20.315745 42.151361,19.84375 40.5,19.84375 L 20.5,19.84375 C 19.776807,19.839709 19.191541,19.254443 19.1875,18.53125 L 19.1875,16.1875 z "
5225
 
+         inkscape:href="#path5698"
5226
 
+         id="path5712"
5227
 
+         style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient5730);stroke-width:1.53006899px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
5228
 
+         xlink:href="#path5698"
5229
 
+         inkscape:original="M 20.5 13 L 10.5 23 L 20.5 33 L 20.5 27.5 L 40.625 27.5 C 45.096959 27.5 45.5 33 45.5 33 L 45.5 23 C 45.58678 20.95144 44.35508 18.531249 40.5 18.53125 L 20.5 18.53125 L 20.5 13 z "
5230
 
+         inkscape:radius="-1.3197637"
5231
 
+         sodipodi:type="inkscape:offset" />
5232
 
+    </g>
5233
 
+    <rect
5234
 
+       ry="0.50634968"
5235
 
+       rx="0.74272269"
5236
 
+       y="3.153132"
5237
 
+       x="2.5"
5238
 
+       height="1.346868"
5239
 
+       width="27.000002"
5240
 
+       id="rect4627"
5241
 
+       style="opacity:1;color:#000000;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient5604);stroke-width:0.99999994;stroke-linecap:square;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
5242
 
+  </g>
5243
 
+</svg>
5244
 
Index: gnome-session-3.28.0/data/icons/scalable/session-properties.svg
5245
 
===================================================================
5246
 
--- /dev/null
5247
 
+++ gnome-session-3.28.0/data/icons/scalable/session-properties.svg
5248
 
@@ -0,0 +1,515 @@
5249
 
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
5250
 
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
5251
 
+<svg
5252
 
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
5253
 
+   xmlns:cc="http://web.resource.org/cc/"
5254
 
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
5255
 
+   xmlns:svg="http://www.w3.org/2000/svg"
5256
 
+   xmlns="http://www.w3.org/2000/svg"
5257
 
+   xmlns:xlink="http://www.w3.org/1999/xlink"
5258
 
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
5259
 
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
5260
 
+   width="48"
5261
 
+   height="48"
5262
 
+   id="svg7854"
5263
 
+   sodipodi:version="0.32"
5264
 
+   inkscape:version="0.44+devel"
5265
 
+   version="1.0"
5266
 
+   sodipodi:docname="session-properties.svg"
5267
 
+   sodipodi:docbase="/home/jimmac/gfx/ximian/art/icons/control-center/scalable"
5268
 
+   inkscape:output_extension="org.inkscape.output.svg.inkscape"
5269
 
+   sodipodi:modified="true">
5270
 
+  <defs
5271
 
+     id="defs7856">
5272
 
+    <linearGradient
5273
 
+       inkscape:collect="always"
5274
 
+       id="linearGradient5650">
5275
 
+      <stop
5276
 
+         style="stop-color:#d3d7cf;stop-opacity:1;"
5277
 
+         offset="0"
5278
 
+         id="stop5652" />
5279
 
+      <stop
5280
 
+         style="stop-color:#9ea795;stop-opacity:1"
5281
 
+         offset="1"
5282
 
+         id="stop5654" />
5283
 
+    </linearGradient>
5284
 
+    <linearGradient
5285
 
+       inkscape:collect="always"
5286
 
+       id="linearGradient5642">
5287
 
+      <stop
5288
 
+         style="stop-color:#eeeeec;stop-opacity:1;"
5289
 
+         offset="0"
5290
 
+         id="stop5644" />
5291
 
+      <stop
5292
 
+         style="stop-color:#c3c3bc;stop-opacity:1"
5293
 
+         offset="1"
5294
 
+         id="stop5646" />
5295
 
+    </linearGradient>
5296
 
+    <linearGradient
5297
 
+       inkscape:collect="always"
5298
 
+       id="linearGradient5634">
5299
 
+      <stop
5300
 
+         style="stop-color:#ffffff;stop-opacity:1;"
5301
 
+         offset="0"
5302
 
+         id="stop5636" />
5303
 
+      <stop
5304
 
+         style="stop-color:#ffffff;stop-opacity:0;"
5305
 
+         offset="1"
5306
 
+         id="stop5638" />
5307
 
+    </linearGradient>
5308
 
+    <linearGradient
5309
 
+       inkscape:collect="always"
5310
 
+       id="linearGradient5598">
5311
 
+      <stop
5312
 
+         style="stop-color:#ffffff;stop-opacity:1;"
5313
 
+         offset="0"
5314
 
+         id="stop5600" />
5315
 
+      <stop
5316
 
+         style="stop-color:#ffffff;stop-opacity:0;"
5317
 
+         offset="1"
5318
 
+         id="stop5602" />
5319
 
+    </linearGradient>
5320
 
+    <linearGradient
5321
 
+       inkscape:collect="always"
5322
 
+       id="linearGradient5716">
5323
 
+      <stop
5324
 
+         style="stop-color:#ffffff;stop-opacity:1;"
5325
 
+         offset="0"
5326
 
+         id="stop5718" />
5327
 
+      <stop
5328
 
+         style="stop-color:#ffffff;stop-opacity:0;"
5329
 
+         offset="1"
5330
 
+         id="stop5720" />
5331
 
+    </linearGradient>
5332
 
+    <linearGradient
5333
 
+       inkscape:collect="always"
5334
 
+       id="linearGradient5700">
5335
 
+      <stop
5336
 
+         style="stop-color:#e4e4e4;stop-opacity:1;"
5337
 
+         offset="0"
5338
 
+         id="stop5702" />
5339
 
+      <stop
5340
 
+         id="stop5708"
5341
 
+         offset="0.639386"
5342
 
+         style="stop-color:#fefefe;stop-opacity:1" />
5343
 
+      <stop
5344
 
+         style="stop-color:#ffffff;stop-opacity:1"
5345
 
+         offset="0.79632628"
5346
 
+         id="stop5710" />
5347
 
+      <stop
5348
 
+         style="stop-color:#949494;stop-opacity:1"
5349
 
+         offset="1"
5350
 
+         id="stop5704" />
5351
 
+    </linearGradient>
5352
 
+    <linearGradient
5353
 
+       id="linearGradient3832">
5354
 
+      <stop
5355
 
+         id="stop3834"
5356
 
+         offset="0.0000000"
5357
 
+         style="stop-color:#ffffff;stop-opacity:1.0000000" />
5358
 
+      <stop
5359
 
+         id="stop3836"
5360
 
+         offset="1.0000000"
5361
 
+         style="stop-color:#e0e0e0;stop-opacity:1.0000000" />
5362
 
+    </linearGradient>
5363
 
+    <linearGradient
5364
 
+       id="linearGradient4816">
5365
 
+      <stop
5366
 
+         id="stop4818"
5367
 
+         offset="0.0000000"
5368
 
+         style="stop-color:#204a87;stop-opacity:1.0000000" />
5369
 
+      <stop
5370
 
+         id="stop4820"
5371
 
+         offset="1.0000000"
5372
 
+         style="stop-color:#204a87;stop-opacity:0.0000000" />
5373
 
+    </linearGradient>
5374
 
+    <linearGradient
5375
 
+       id="linearGradient5048">
5376
 
+      <stop
5377
 
+         id="stop5050"
5378
 
+         offset="0"
5379
 
+         style="stop-color:black;stop-opacity:0;" />
5380
 
+      <stop
5381
 
+         style="stop-color:black;stop-opacity:1;"
5382
 
+         offset="0.5"
5383
 
+         id="stop5056" />
5384
 
+      <stop
5385
 
+         id="stop5052"
5386
 
+         offset="1"
5387
 
+         style="stop-color:black;stop-opacity:0;" />
5388
 
+    </linearGradient>
5389
 
+    <linearGradient
5390
 
+       id="linearGradient5060"
5391
 
+       inkscape:collect="always">
5392
 
+      <stop
5393
 
+         id="stop5062"
5394
 
+         offset="0"
5395
 
+         style="stop-color:black;stop-opacity:1;" />
5396
 
+      <stop
5397
 
+         id="stop5064"
5398
 
+         offset="1"
5399
 
+         style="stop-color:black;stop-opacity:0;" />
5400
 
+    </linearGradient>
5401
 
+    <radialGradient
5402
 
+       inkscape:collect="always"
5403
 
+       xlink:href="#linearGradient5060"
5404
 
+       id="radialGradient5664"
5405
 
+       gradientUnits="userSpaceOnUse"
5406
 
+       gradientTransform="matrix(-6.6526975e-2,0,0,3.5014969e-2,47.812816,25.161837)"
5407
 
+       cx="605.71429"
5408
 
+       cy="486.64789"
5409
 
+       fx="605.71429"
5410
 
+       fy="486.64789"
5411
 
+       r="117.14286" />
5412
 
+    <radialGradient
5413
 
+       inkscape:collect="always"
5414
 
+       xlink:href="#linearGradient5060"
5415
 
+       id="radialGradient5667"
5416
 
+       gradientUnits="userSpaceOnUse"
5417
 
+       gradientTransform="matrix(6.6526975e-2,0,0,3.5014969e-2,-0.2505064,25.161837)"
5418
 
+       cx="605.71429"
5419
 
+       cy="486.64789"
5420
 
+       fx="605.71429"
5421
 
+       fy="486.64789"
5422
 
+       r="117.14286" />
5423
 
+    <linearGradient
5424
 
+       inkscape:collect="always"
5425
 
+       xlink:href="#linearGradient5048"
5426
 
+       id="linearGradient5670"
5427
 
+       gradientUnits="userSpaceOnUse"
5428
 
+       gradientTransform="matrix(6.6526975e-2,0,0,3.5014969e-2,-0.2635996,25.161837)"
5429
 
+       x1="302.85715"
5430
 
+       y1="366.64789"
5431
 
+       x2="302.85715"
5432
 
+       y2="609.50507" />
5433
 
+    <linearGradient
5434
 
+       inkscape:collect="always"
5435
 
+       xlink:href="#linearGradient3832"
5436
 
+       id="linearGradient5682"
5437
 
+       gradientUnits="userSpaceOnUse"
5438
 
+       gradientTransform="matrix(1.367592,0,0,1.259127,-45.521751,9.5621318)"
5439
 
+       x1="17.880680"
5440
 
+       y1="11.072588"
5441
 
+       x2="17.880680"
5442
 
+       y2="21.767578" />
5443
 
+    <linearGradient
5444
 
+       inkscape:collect="always"
5445
 
+       xlink:href="#linearGradient4816"
5446
 
+       id="linearGradient5684"
5447
 
+       gradientUnits="userSpaceOnUse"
5448
 
+       gradientTransform="matrix(1.325819,0,0,1.19936,-44.590631,11.169522)"
5449
 
+       x1="13.050564"
5450
 
+       y1="11.353518"
5451
 
+       x2="13.050564"
5452
 
+       y2="5.6173568" />
5453
 
+    <linearGradient
5454
 
+       inkscape:collect="always"
5455
 
+       xlink:href="#linearGradient3832"
5456
 
+       id="linearGradient5694"
5457
 
+       gradientUnits="userSpaceOnUse"
5458
 
+       gradientTransform="matrix(1.367592,0,0,1.259127,-45.521751,9.5621318)"
5459
 
+       x1="17.880680"
5460
 
+       y1="11.072588"
5461
 
+       x2="17.880680"
5462
 
+       y2="21.767578" />
5463
 
+    <linearGradient
5464
 
+       inkscape:collect="always"
5465
 
+       xlink:href="#linearGradient4816"
5466
 
+       id="linearGradient5696"
5467
 
+       gradientUnits="userSpaceOnUse"
5468
 
+       gradientTransform="matrix(1.325819,0,0,1.19936,-44.590631,11.169522)"
5469
 
+       x1="13.050564"
5470
 
+       y1="11.353518"
5471
 
+       x2="13.050564"
5472
 
+       y2="5.6173568" />
5473
 
+    <linearGradient
5474
 
+       inkscape:collect="always"
5475
 
+       xlink:href="#linearGradient5700"
5476
 
+       id="linearGradient5728"
5477
 
+       gradientUnits="userSpaceOnUse"
5478
 
+       gradientTransform="translate(0.5,0)"
5479
 
+       x1="24"
5480
 
+       y1="23"
5481
 
+       x2="45.505004"
5482
 
+       y2="23" />
5483
 
+    <linearGradient
5484
 
+       inkscape:collect="always"
5485
 
+       xlink:href="#linearGradient5716"
5486
 
+       id="linearGradient5730"
5487
 
+       gradientUnits="userSpaceOnUse"
5488
 
+       x1="40.745819"
5489
 
+       y1="23"
5490
 
+       x2="44.005268"
5491
 
+       y2="23" />
5492
 
+    <filter
5493
 
+       inkscape:collect="always"
5494
 
+       id="filter5786">
5495
 
+      <feGaussianBlur
5496
 
+         inkscape:collect="always"
5497
 
+         stdDeviation="0.62861987"
5498
 
+         id="feGaussianBlur5788" />
5499
 
+    </filter>
5500
 
+    <linearGradient
5501
 
+       inkscape:collect="always"
5502
 
+       xlink:href="#linearGradient5598"
5503
 
+       id="linearGradient5604"
5504
 
+       x1="25.627417"
5505
 
+       y1="8"
5506
 
+       x2="25.627417"
5507
 
+       y2="4.7617435"
5508
 
+       gradientUnits="userSpaceOnUse" />
5509
 
+    <filter
5510
 
+       inkscape:collect="always"
5511
 
+       x="-0.019480519"
5512
 
+       width="1.038961"
5513
 
+       y="-0.14285714"
5514
 
+       height="1.2857143"
5515
 
+       id="filter5628">
5516
 
+      <feGaussianBlur
5517
 
+         inkscape:collect="always"
5518
 
+         stdDeviation="0.42857143"
5519
 
+         id="feGaussianBlur5630" />
5520
 
+    </filter>
5521
 
+    <linearGradient
5522
 
+       inkscape:collect="always"
5523
 
+       xlink:href="#linearGradient5634"
5524
 
+       id="linearGradient5640"
5525
 
+       x1="25.313259"
5526
 
+       y1="42.656792"
5527
 
+       x2="25.313261"
5528
 
+       y2="10.129107"
5529
 
+       gradientUnits="userSpaceOnUse" />
5530
 
+    <linearGradient
5531
 
+       inkscape:collect="always"
5532
 
+       xlink:href="#linearGradient5642"
5533
 
+       id="linearGradient5648"
5534
 
+       x1="26.29347"
5535
 
+       y1="7.3125"
5536
 
+       x2="26.232994"
5537
 
+       y2="3.5357027"
5538
 
+       gradientUnits="userSpaceOnUse" />
5539
 
+    <linearGradient
5540
 
+       inkscape:collect="always"
5541
 
+       xlink:href="#linearGradient5650"
5542
 
+       id="linearGradient5656"
5543
 
+       x1="26.29347"
5544
 
+       y1="7.3125"
5545
 
+       x2="26.232994"
5546
 
+       y2="3.5357027"
5547
 
+       gradientUnits="userSpaceOnUse" />
5548
 
+  </defs>
5549
 
+  <sodipodi:namedview
5550
 
+     id="base"
5551
 
+     pagecolor="#ffffff"
5552
 
+     bordercolor="#e0e0e0"
5553
 
+     borderopacity="1"
5554
 
+     gridtolerance="10000"
5555
 
+     guidetolerance="10"
5556
 
+     objecttolerance="10"
5557
 
+     inkscape:pageopacity="0.0"
5558
 
+     inkscape:pageshadow="2"
5559
 
+     inkscape:zoom="4"
5560
 
+     inkscape:cx="20.372005"
5561
 
+     inkscape:cy="14.768475"
5562
 
+     inkscape:document-units="px"
5563
 
+     inkscape:current-layer="layer1"
5564
 
+     width="48px"
5565
 
+     height="48px"
5566
 
+     inkscape:showpageshadow="false"
5567
 
+     inkscape:window-width="1102"
5568
 
+     inkscape:window-height="958"
5569
 
+     inkscape:window-x="2117"
5570
 
+     inkscape:window-y="82"
5571
 
+     showgrid="false" />
5572
 
+  <metadata
5573
 
+     id="metadata7859">
5574
 
+    <rdf:RDF>
5575
 
+      <cc:Work
5576
 
+         rdf:about="">
5577
 
+        <dc:format>image/svg+xml</dc:format>
5578
 
+        <dc:type
5579
 
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
5580
 
+        <dc:creator>
5581
 
+          <cc:Agent>
5582
 
+            <dc:title>Jakub Steiner</dc:title>
5583
 
+          </cc:Agent>
5584
 
+        </dc:creator>
5585
 
+        <dc:source>http://jimmac.musichall.cz</dc:source>
5586
 
+        <cc:license
5587
 
+           rdf:resource="http://creativecommons.org/licenses/GPL/2.0/" />
5588
 
+        <dc:title>Gnome Session Properties</dc:title>
5589
 
+      </cc:Work>
5590
 
+      <cc:License
5591
 
+         rdf:about="http://creativecommons.org/licenses/GPL/2.0/">
5592
 
+        <cc:permits
5593
 
+           rdf:resource="http://web.resource.org/cc/Reproduction" />
5594
 
+        <cc:permits
5595
 
+           rdf:resource="http://web.resource.org/cc/Distribution" />
5596
 
+        <cc:requires
5597
 
+           rdf:resource="http://web.resource.org/cc/Notice" />
5598
 
+        <cc:permits
5599
 
+           rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
5600
 
+        <cc:requires
5601
 
+           rdf:resource="http://web.resource.org/cc/ShareAlike" />
5602
 
+        <cc:requires
5603
 
+           rdf:resource="http://web.resource.org/cc/SourceCode" />
5604
 
+      </cc:License>
5605
 
+    </rdf:RDF>
5606
 
+  </metadata>
5607
 
+  <g
5608
 
+     inkscape:label="Layer 1"
5609
 
+     inkscape:groupmode="layer"
5610
 
+     id="layer1">
5611
 
+    <g
5612
 
+       id="g5672"
5613
 
+       style="opacity:0.53714286">
5614
 
+      <rect
5615
 
+         y="38"
5616
 
+         x="7.7196383"
5617
 
+         height="8.5036354"
5618
 
+         width="32.123024"
5619
 
+         id="rect4173"
5620
 
+         style="opacity:1;color:#000000;fill:url(#linearGradient5670);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
5621
 
+      <path
5622
 
+         sodipodi:nodetypes="cccc"
5623
 
+         id="path5058"
5624
 
+         d="M 39.842663,38.000295 C 39.842663,38.000295 39.842663,46.503461 39.842663,46.503461 C 43.268636,46.519469 48.125002,44.598333 48.125,42.25133 C 48.125,39.904328 44.30187,38.000295 39.842663,38.000295 z "
5625
 
+         style="opacity:1;color:#000000;fill:url(#radialGradient5667);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
5626
 
+      <path
5627
 
+         style="opacity:1;color:#000000;fill:url(#radialGradient5664);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
5628
 
+         d="M 7.7196385,38.000295 C 7.7196385,38.000295 7.7196385,46.503461 7.7196385,46.503461 C 4.2936621,46.519469 -0.56270146,44.598333 -0.56270146,42.25133 C -0.56270146,39.904328 3.2604286,38.000295 7.7196385,38.000295 z "
5629
 
+         id="path5018"
5630
 
+         sodipodi:nodetypes="cccc" />
5631
 
+    </g>
5632
 
+    <rect
5633
 
+       style="opacity:1;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:evenodd;stroke:#3465a4;stroke-width:1;stroke-linecap:square;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
5634
 
+       id="rect4585"
5635
 
+       width="42.848347"
5636
 
+       height="39.870949"
5637
 
+       x="2.6516504"
5638
 
+       y="3.6290491"
5639
 
+       rx="2.2839575"
5640
 
+       ry="2.273742" />
5641
 
+    <rect
5642
 
+       ry="2.2922091"
5643
 
+       rx="2.2922091"
5644
 
+       y="4.3838844"
5645
 
+       x="2.5"
5646
 
+       height="5"
5647
 
+       width="43"
5648
 
+       id="rect5606"
5649
 
+       style="opacity:0.28;color:#000000;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:square;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;filter:url(#filter5628)" />
5650
 
+    <rect
5651
 
+       style="opacity:1;color:#000000;fill:url(#linearGradient5648);fill-opacity:1.0;fill-rule:evenodd;stroke:url(#linearGradient5656);stroke-width:1;stroke-linecap:square;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
5652
 
+       id="rect5556"
5653
 
+       width="43"
5654
 
+       height="5"
5655
 
+       x="2.5"
5656
 
+       y="3.5"
5657
 
+       rx="2.2922091"
5658
 
+       ry="2.2922091" />
5659
 
+    <rect
5660
 
+       ry="1.2758038"
5661
 
+       rx="1.2758038"
5662
 
+       y="4.6290464"
5663
 
+       x="3.6516466"
5664
 
+       height="37.870953"
5665
 
+       width="40.848354"
5666
 
+       id="rect5632"
5667
 
+       style="opacity:0.52571429;color:#000000;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient5640);stroke-width:1;stroke-linecap:square;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
5668
 
+    <g
5669
 
+       id="g5677"
5670
 
+       transform="translate(43.499997,-2.124989)">
5671
 
+      <rect
5672
 
+         id="rect3818"
5673
 
+         style="color:#000000;fill:url(#linearGradient5682);fill-opacity:1;fill-rule:evenodd;stroke:#8d8d8d;stroke-width:1.00000095;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
5674
 
+         y="19.625"
5675
 
+         x="-37.999996"
5676
 
+         ry="0.53949153"
5677
 
+         rx="0.54073501"
5678
 
+         height="19.999989"
5679
 
+         width="22.000008" />
5680
 
+      <rect
5681
 
+         id="rect3820"
5682
 
+         style="color:#000000;fill:url(#linearGradient5684);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
5683
 
+         y="21.125"
5684
 
+         x="-36.499996"
5685
 
+         ry="0.095258936"
5686
 
+         rx="0.10055112"
5687
 
+         height="3"
5688
 
+         width="19" />
5689
 
+      <rect
5690
 
+         id="rect4962"
5691
 
+         style="color:#000000;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:1.00000143;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.47878789;visibility:visible;display:inline;overflow:visible"
5692
 
+         y="20.624994"
5693
 
+         x="-37"
5694
 
+         ry="0.16447251"
5695
 
+         rx="0.188051"
5696
 
+         height="18.000002"
5697
 
+         width="20.000011" />
5698
 
+    </g>
5699
 
+    <g
5700
 
+       transform="translate(53.499997,-7.124989)"
5701
 
+       id="g5686">
5702
 
+      <rect
5703
 
+         width="22.000008"
5704
 
+         height="19.999989"
5705
 
+         rx="0.54073501"
5706
 
+         ry="0.53949153"
5707
 
+         x="-37.999996"
5708
 
+         y="19.625"
5709
 
+         style="color:#000000;fill:url(#linearGradient5694);fill-opacity:1;fill-rule:evenodd;stroke:#8d8d8d;stroke-width:1.00000095;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
5710
 
+         id="rect5688" />
5711
 
+      <rect
5712
 
+         width="19"
5713
 
+         height="3"
5714
 
+         rx="0.10055112"
5715
 
+         ry="0.095258936"
5716
 
+         x="-36.499996"
5717
 
+         y="21.125"
5718
 
+         style="color:#000000;fill:url(#linearGradient5696);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
5719
 
+         id="rect5690" />
5720
 
+      <rect
5721
 
+         width="20.000011"
5722
 
+         height="18.000002"
5723
 
+         rx="0.188051"
5724
 
+         ry="0.16447251"
5725
 
+         x="-37"
5726
 
+         y="20.624994"
5727
 
+         style="color:#000000;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:1.00000143;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.47878789;visibility:visible;display:inline;overflow:visible"
5728
 
+         id="rect5692" />
5729
 
+    </g>
5730
 
+    <g
5731
 
+       id="g5724"
5732
 
+       transform="translate(0,8)">
5733
 
+      <path
5734
 
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;opacity:0.31428571;filter:url(#filter5786)"
5735
 
+         d="M 10.5,25.474874 L 20.5,15.474874 L 20.5,21.005204 L 40.5,21.005204 C 44.35508,21.005204 45.58678,20.95144 45.5,23 L 45.5,33 C 45.5,33 43.070425,29.988738 40.625,29.988738 L 20.5,29.988738 L 20.5,35.474874 L 10.5,25.474874 z "
5736
 
+         id="path5738"
5737
 
+         sodipodi:nodetypes="cccccccccc" />
5738
 
+      <path
5739
 
+         sodipodi:nodetypes="cccccccccc"
5740
 
+         id="path5698"
5741
 
+         d="M 10.5,23 L 20.5,13 L 20.5,18.53033 L 40.5,18.53033 C 44.35508,18.53033 45.58678,20.95144 45.5,23 L 45.5,33 C 45.5,33 45.096959,27.513864 40.625,27.513864 L 20.5,27.513864 L 20.5,33 L 10.5,23 z "
5742
 
+         style="fill:url(#linearGradient5728);fill-opacity:1;fill-rule:evenodd;stroke:#555753;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
5743
 
+      <path
5744
 
+         d="M 19.5625,15.25 L 11.8125,23 L 19.5625,30.75 L 19.5625,27.5 C 19.55998,27.250596 19.657943,27.010672 19.834307,26.834307 C 20.010672,26.657943 20.250596,26.55998 20.5,26.5625 L 40.625,26.5625 C 42.489029,26.5625 43.674657,27.497362 44.5625,28.5625 L 44.5625,23 C 44.562325,22.989584 44.562325,22.979166 44.5625,22.96875 C 44.597378,22.145414 44.36819,21.273844 43.78125,20.625 C 43.19431,19.976156 42.233327,19.46875 40.5,19.46875 L 20.5,19.46875 C 20.250596,19.47127 20.010672,19.373307 19.834307,19.196943 C 19.657943,19.020578 19.55998,18.780654 19.5625,18.53125 L 19.5625,15.25 z "
5745
 
+         inkscape:href="#path5698"
5746
 
+         id="path5712"
5747
 
+         style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient5730);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
5748
 
+         xlink:href="#path5698"
5749
 
+         inkscape:original="M 20.5 13 L 10.5 23 L 20.5 33 L 20.5 27.5 L 40.625 27.5 C 45.096959 27.5 45.5 33 45.5 33 L 45.5 23 C 45.58678 20.95144 44.35508 18.531249 40.5 18.53125 L 20.5 18.53125 L 20.5 13 z "
5750
 
+         inkscape:radius="-0.92807764"
5751
 
+         sodipodi:type="inkscape:offset" />
5752
 
+    </g>
5753
 
+    <rect
5754
 
+       ry="1.1278381"
5755
 
+       rx="1.1278381"
5756
 
+       y="4.5"
5757
 
+       x="3.5"
5758
 
+       height="3"
5759
 
+       width="41"
5760
 
+       id="rect4627"
5761
 
+       style="opacity:1;color:#000000;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient5604);stroke-width:1;stroke-linecap:square;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
5762
 
+  </g>
5763
 
+</svg>
5764
 
Index: gnome-session-3.28.0/data/icons/symbolic/session-properties-symbolic.svg
5765
 
===================================================================
5766
 
--- /dev/null
5767
 
+++ gnome-session-3.28.0/data/icons/symbolic/session-properties-symbolic.svg
5768
 
@@ -0,0 +1,28 @@
5769
 
+<?xml version='1.0' encoding='UTF-8' standalone='no'?>
5770
 
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
5771
 
+
5772
 
+<svg xmlns:cc='http://creativecommons.org/ns#' xmlns:dc='http://purl.org/dc/elements/1.1/' sodipodi:docname='gnome-session-properties-symbolic.svg' height='16.000015' id='svg7384' xmlns:inkscape='http://www.inkscape.org/namespaces/inkscape' xmlns:osb='http://www.openswatchbook.org/uri/2009/osb' xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:sodipodi='http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd' xmlns:svg='http://www.w3.org/2000/svg' version='1.1' inkscape:version='0.91 r13725' width='16.000013' xmlns='http://www.w3.org/2000/svg'>
5773
 
+  <metadata id='metadata90'>
5774
 
+    <rdf:RDF>
5775
 
+      <cc:Work rdf:about=''>
5776
 
+        <dc:format>image/svg+xml</dc:format>
5777
 
+        <dc:type rdf:resource='http://purl.org/dc/dcmitype/StillImage'/>
5778
 
+        <dc:title>Gnome Symbolic Icon Theme</dc:title>
5779
 
+      </cc:Work>
5780
 
+    </rdf:RDF>
5781
 
+  </metadata>
5782
 
+  <sodipodi:namedview inkscape:bbox-paths='true' bordercolor='#666666' borderopacity='1' inkscape:current-layer='layer9' inkscape:cx='16.984015' inkscape:cy='3.9235845' gridtolerance='10' inkscape:guide-bbox='true' guidetolerance='10' id='namedview88' inkscape:object-nodes='false' inkscape:object-paths='false' objecttolerance='10' pagecolor='#555753' inkscape:pageopacity='1' inkscape:pageshadow='2' showborder='false' showgrid='false' showguides='true' inkscape:snap-bbox='true' inkscape:snap-bbox-midpoints='false' inkscape:snap-global='true' inkscape:snap-grids='true' inkscape:snap-nodes='true' inkscape:snap-others='false' inkscape:snap-to-guides='true' inkscape:window-height='1376' inkscape:window-maximized='1' inkscape:window-width='2560' inkscape:window-x='0' inkscape:window-y='27' inkscape:zoom='1'>
5783
 
+    <inkscape:grid empspacing='2' enabled='true' id='grid4866' originx='-22' originy='-341.99999' snapvisiblegridlinesonly='true' spacingx='1px' spacingy='1px' type='xygrid' visible='true'/>
5784
 
+  </sodipodi:namedview>
5785
 
+  <title id='title9167'>Gnome Symbolic Icon Theme</title>
5786
 
+  <defs id='defs7386'>
5787
 
+    <linearGradient id='linearGradient7212' osb:paint='solid'>
5788
 
+      <stop id='stop7214' offset='0' style='stop-color:#000000;stop-opacity:1;'/>
5789
 
+    </linearGradient>
5790
 
+  </defs>
5791
 
+  <g inkscape:groupmode='layer' id='layer9' inkscape:label='apps' style='display:inline' transform='translate(-263.0002,125)'>
5792
 
+    <path inkscape:connector-curvature='0' d='m 264.03145,-125 c -0.56312,0 -1.03125,0.43688 -1.03125,1 l 0,2 16,0 0,-2 c 0,-0.56312 -0.43688,-1 -1,-1 z' id='rect10231' sodipodi:nodetypes='ssccsss' style='color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#bebebe;fill-opacity:0.36470588;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate'/>
5793
 
+    <path inkscape:connector-curvature='0' d='m 263.0002,-120.96865 0,10.9061 c 0,0.5631 0.46813,1.0314 1.03125,1.0314 l 13.96875,0 c 0.56312,0 1,-0.4683 1,-1.0314 l 0,-10.9061 z m 6,0.9686 9,0 0,7 -9,0 z m 1,2 0,4 7,0 0,-4 z m -5,1 3,0 0,2 -2,0 0,4 7,0 0,-0.9686 1,0 0,1.9686 -9,0 z' id='rect10231-3' sodipodi:nodetypes='cssssccccccccccccccccccccccc' style='color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate'/>
5794
 
+
5795
 
+  </g>
5796
 
+</svg>
5797
 
Index: gnome-session-3.28.0/data/meson.build
5798
 
===================================================================
5799
 
--- gnome-session-3.28.0.orig/data/meson.build
5800
 
+++ gnome-session-3.28.0/data/meson.build
5801
 
@@ -162,7 +162,30 @@ if enable_session_selector
5802
 
   )
5803
 
 endif
5804
 
 
5805
 
+desktop = configure_file(
5806
 
+  input: 'gnome-session-properties.desktop.in',
5807
 
+  output: 'gnome-session-properties.desktop',
5808
 
+  configuration: desktop_conf
5809
 
+)
5810
 
+
5811
 
+install_data(
5812
 
+  desktop,
5813
 
+  install_dir : join_paths(session_datadir, 'applications')
5814
 
+)
5815
 
+
5816
 
+data += files('session-properties.ui')
5817
 
+
5818
 
 install_data(
5819
 
   data,
5820
 
   install_dir: session_pkgdatadir
5821
 
 )
5822
 
+
5823
 
+icondir = join_paths(get_option('datadir'), 'icons/hicolor')
5824
 
+foreach size: ['16x16', '22x22', '32x32', 'symbolic']
5825
 
+  install_subdir('icons/' + size, install_dir: icondir)
5826
 
+endforeach
5827
 
+
5828
 
+install_data(
5829
 
+  'icons/scalable/session-properties.svg',
5830
 
+  install_dir: icondir + '/scalable/apps'
5831
 
+)
5832
 
Index: gnome-session-3.28.0/data/session-properties.ui
5833
 
===================================================================
5834
 
--- /dev/null
5835
 
+++ gnome-session-3.28.0/data/session-properties.ui
5836
 
@@ -0,0 +1,303 @@
5837
 
+<?xml version="1.0"?>
5838
 
+<interface>
5839
 
+  <requires lib="gtk+" version="2.16"/>
5840
 
+  <!-- interface-naming-policy toplevel-contextual -->
5841
 
+  <object class="GtkVBox" id="main-notebook">
5842
 
+    <property name="visible">True</property>
5843
 
+    <property name="border_width">6</property>
5844
 
+    <child>
5845
 
+      <object class="GtkVBox" id="vbox1">
5846
 
+        <property name="visible">True</property>
5847
 
+        <property name="border_width">12</property>
5848
 
+        <property name="orientation">vertical</property>
5849
 
+        <property name="spacing">3</property>
5850
 
+        <child>
5851
 
+          <object class="GtkLabel" id="label6">
5852
 
+            <property name="visible">True</property>
5853
 
+            <property name="xalign">0</property>
5854
 
+            <property name="xpad">3</property>
5855
 
+            <property name="ypad">3</property>
5856
 
+            <property name="label" translatable="yes">Additional startup _programs:</property>
5857
 
+            <property name="use_underline">True</property>
5858
 
+            <property name="mnemonic_widget">session_properties_treeview</property>
5859
 
+          </object>
5860
 
+          <packing>
5861
 
+            <property name="expand">False</property>
5862
 
+            <property name="position">0</property>
5863
 
+          </packing>
5864
 
+        </child>
5865
 
+        <child>
5866
 
+          <object class="GtkHBox" id="hbox1">
5867
 
+            <property name="visible">True</property>
5868
 
+            <property name="spacing">6</property>
5869
 
+            <child>
5870
 
+              <object class="GtkScrolledWindow" id="scrolledwindow1">
5871
 
+                <property name="visible">True</property>
5872
 
+                <property name="can_focus">True</property>
5873
 
+                <property name="hscrollbar_policy">never</property>
5874
 
+                <property name="vscrollbar_policy">automatic</property>
5875
 
+                <property name="shadow_type">etched-in</property>
5876
 
+                <child>
5877
 
+                  <object class="GtkTreeView" id="session_properties_treeview">
5878
 
+                    <property name="height_request">210</property>
5879
 
+                    <property name="visible">True</property>
5880
 
+                    <property name="can_focus">True</property>
5881
 
+                  </object>
5882
 
+                </child>
5883
 
+              </object>
5884
 
+              <packing>
5885
 
+                <property name="position">0</property>
5886
 
+              </packing>
5887
 
+            </child>
5888
 
+            <child>
5889
 
+              <object class="GtkVButtonBox" id="vbuttonbox1">
5890
 
+                <property name="visible">True</property>
5891
 
+                <property name="spacing">6</property>
5892
 
+                <property name="layout_style">start</property>
5893
 
+                <child>
5894
 
+                  <object class="GtkButton" id="session_properties_add_button">
5895
 
+                    <property name="label">gtk-add</property>
5896
 
+                    <property name="visible">True</property>
5897
 
+                    <property name="can_focus">True</property>
5898
 
+                    <property name="receives_default">True</property>
5899
 
+                    <property name="use_stock">True</property>
5900
 
+                  </object>
5901
 
+                  <packing>
5902
 
+                    <property name="expand">False</property>
5903
 
+                    <property name="fill">False</property>
5904
 
+                    <property name="position">0</property>
5905
 
+                  </packing>
5906
 
+                </child>
5907
 
+                <child>
5908
 
+                  <object class="GtkButton" id="session_properties_delete_button">
5909
 
+                    <property name="label">gtk-remove</property>
5910
 
+                    <property name="visible">True</property>
5911
 
+                    <property name="sensitive">False</property>
5912
 
+                    <property name="can_focus">True</property>
5913
 
+                    <property name="receives_default">True</property>
5914
 
+                    <property name="use_stock">True</property>
5915
 
+                  </object>
5916
 
+                  <packing>
5917
 
+                    <property name="expand">False</property>
5918
 
+                    <property name="fill">False</property>
5919
 
+                    <property name="position">1</property>
5920
 
+                  </packing>
5921
 
+                </child>
5922
 
+                <child>
5923
 
+                  <object class="GtkButton" id="session_properties_edit_button">
5924
 
+                    <property name="label">gtk-edit</property>
5925
 
+                    <property name="visible">True</property>
5926
 
+                    <property name="sensitive">False</property>
5927
 
+                    <property name="can_focus">True</property>
5928
 
+                    <property name="receives_default">True</property>
5929
 
+                    <property name="use_stock">True</property>
5930
 
+                  </object>
5931
 
+                  <packing>
5932
 
+                    <property name="expand">False</property>
5933
 
+                    <property name="fill">False</property>
5934
 
+                    <property name="position">2</property>
5935
 
+                  </packing>
5936
 
+                </child>
5937
 
+              </object>
5938
 
+              <packing>
5939
 
+                <property name="expand">False</property>
5940
 
+                <property name="fill">False</property>
5941
 
+                <property name="position">1</property>
5942
 
+              </packing>
5943
 
+            </child>
5944
 
+          </object>
5945
 
+          <packing>
5946
 
+            <property name="position">1</property>
5947
 
+          </packing>
5948
 
+        </child>
5949
 
+      </object>
5950
 
+    </child>
5951
 
+    <child>
5952
 
+      <object class="GtkVBox" id="vbox3">
5953
 
+        <property name="visible">False</property>
5954
 
+        <property name="border_width">12</property>
5955
 
+        <property name="orientation">vertical</property>
5956
 
+        <property name="spacing">6</property>
5957
 
+        <child>
5958
 
+          <object class="GtkCheckButton" id="session_properties_remember_toggle">
5959
 
+            <property name="label" translatable="yes">_Automatically remember running applications when logging out</property>
5960
 
+            <property name="visible">True</property>
5961
 
+            <property name="can_focus">True</property>
5962
 
+            <property name="receives_default">False</property>
5963
 
+            <property name="use_underline">True</property>
5964
 
+            <property name="draw_indicator">True</property>
5965
 
+          </object>
5966
 
+          <packing>
5967
 
+            <property name="expand">False</property>
5968
 
+            <property name="fill">False</property>
5969
 
+            <property name="position">0</property>
5970
 
+          </packing>
5971
 
+        </child>
5972
 
+        <child>
5973
 
+          <object class="GtkHButtonBox" id="hbuttonbox1">
5974
 
+            <property name="visible">True</property>
5975
 
+            <child>
5976
 
+              <object class="GtkButton" id="session_properties_save_button">
5977
 
+                <property name="can_focus">True</property>
5978
 
+                <property name="receives_default">True</property>
5979
 
+                <child>
5980
 
+                  <object class="GtkHBox" id="hbox2">
5981
 
+                    <property name="visible">True</property>
5982
 
+                    <property name="spacing">4</property>
5983
 
+                    <child>
5984
 
+                      <object class="GtkImage" id="image1">
5985
 
+                        <property name="visible">True</property>
5986
 
+                        <property name="stock">gtk-save</property>
5987
 
+                      </object>
5988
 
+                      <packing>
5989
 
+                        <property name="expand">False</property>
5990
 
+                        <property name="fill">False</property>
5991
 
+                        <property name="position">0</property>
5992
 
+                      </packing>
5993
 
+                    </child>
5994
 
+                    <child>
5995
 
+                      <object class="GtkLabel" id="label7">
5996
 
+                        <property name="visible">True</property>
5997
 
+                        <property name="label" translatable="yes">_Remember Currently Running Applications</property>
5998
 
+                        <property name="use_underline">True</property>
5999
 
+                      </object>
6000
 
+                      <packing>
6001
 
+                        <property name="position">1</property>
6002
 
+                      </packing>
6003
 
+                    </child>
6004
 
+                  </object>
6005
 
+                </child>
6006
 
+              </object>
6007
 
+              <packing>
6008
 
+                <property name="expand">False</property>
6009
 
+                <property name="fill">False</property>
6010
 
+                <property name="position">0</property>
6011
 
+              </packing>
6012
 
+            </child>
6013
 
+          </object>
6014
 
+          <packing>
6015
 
+            <property name="expand">False</property>
6016
 
+            <property name="fill">False</property>
6017
 
+            <property name="position">1</property>
6018
 
+          </packing>
6019
 
+        </child>
6020
 
+      </object>
6021
 
+      <packing>
6022
 
+        <property name="position">1</property>
6023
 
+      </packing>
6024
 
+    </child>
6025
 
+  </object>
6026
 
+  <object class="GtkTable" id="main-table">
6027
 
+    <property name="visible">True</property>
6028
 
+    <property name="border_width">6</property>
6029
 
+    <property name="n_rows">3</property>
6030
 
+    <property name="n_columns">2</property>
6031
 
+    <property name="column_spacing">12</property>
6032
 
+    <property name="row_spacing">6</property>
6033
 
+    <child>
6034
 
+      <object class="GtkHBox" id="hbox3">
6035
 
+        <property name="visible">True</property>
6036
 
+        <property name="spacing">12</property>
6037
 
+        <child>
6038
 
+          <object class="GtkEntry" id="session_properties_command_entry">
6039
 
+            <property name="visible">True</property>
6040
 
+            <property name="can_focus">True</property>
6041
 
+            <property name="invisible_char">&#x25CF;</property>
6042
 
+          </object>
6043
 
+          <packing>
6044
 
+            <property name="position">0</property>
6045
 
+          </packing>
6046
 
+        </child>
6047
 
+        <child>
6048
 
+          <object class="GtkButton" id="session_properties_browse_button">
6049
 
+            <property name="label" translatable="yes">Browse…</property>
6050
 
+            <property name="visible">True</property>
6051
 
+            <property name="can_focus">True</property>
6052
 
+            <property name="receives_default">True</property>
6053
 
+          </object>
6054
 
+          <packing>
6055
 
+            <property name="expand">False</property>
6056
 
+            <property name="fill">False</property>
6057
 
+            <property name="position">1</property>
6058
 
+          </packing>
6059
 
+        </child>
6060
 
+      </object>
6061
 
+      <packing>
6062
 
+        <property name="left_attach">1</property>
6063
 
+        <property name="right_attach">2</property>
6064
 
+        <property name="top_attach">1</property>
6065
 
+        <property name="bottom_attach">2</property>
6066
 
+        <property name="y_options">GTK_FILL</property>
6067
 
+      </packing>
6068
 
+    </child>
6069
 
+    <child>
6070
 
+      <object class="GtkEntry" id="session_properties_comment_entry">
6071
 
+        <property name="visible">True</property>
6072
 
+        <property name="can_focus">True</property>
6073
 
+        <property name="invisible_char">&#x25CF;</property>
6074
 
+      </object>
6075
 
+      <packing>
6076
 
+        <property name="left_attach">1</property>
6077
 
+        <property name="right_attach">2</property>
6078
 
+        <property name="top_attach">2</property>
6079
 
+        <property name="bottom_attach">3</property>
6080
 
+        <property name="y_options">GTK_FILL</property>
6081
 
+      </packing>
6082
 
+    </child>
6083
 
+    <child>
6084
 
+      <object class="GtkEntry" id="session_properties_name_entry">
6085
 
+        <property name="visible">True</property>
6086
 
+        <property name="can_focus">True</property>
6087
 
+        <property name="invisible_char">&#x25CF;</property>
6088
 
+      </object>
6089
 
+      <packing>
6090
 
+        <property name="left_attach">1</property>
6091
 
+        <property name="right_attach">2</property>
6092
 
+        <property name="y_options">GTK_FILL</property>
6093
 
+      </packing>
6094
 
+    </child>
6095
 
+    <child>
6096
 
+      <object class="GtkLabel" id="label3">
6097
 
+        <property name="visible">True</property>
6098
 
+        <property name="xalign">0</property>
6099
 
+        <property name="label" translatable="yes">Comm_ent:</property>
6100
 
+        <property name="use_underline">True</property>
6101
 
+        <property name="mnemonic_widget">label2</property>
6102
 
+      </object>
6103
 
+      <packing>
6104
 
+        <property name="top_attach">2</property>
6105
 
+        <property name="bottom_attach">3</property>
6106
 
+        <property name="x_options">GTK_FILL</property>
6107
 
+        <property name="y_options">GTK_FILL</property>
6108
 
+      </packing>
6109
 
+    </child>
6110
 
+    <child>
6111
 
+      <object class="GtkLabel" id="label2">
6112
 
+        <property name="visible">True</property>
6113
 
+        <property name="xalign">0</property>
6114
 
+        <property name="label" translatable="yes">Co_mmand:</property>
6115
 
+        <property name="use_underline">True</property>
6116
 
+        <property name="mnemonic_widget">session_properties_command_entry</property>
6117
 
+      </object>
6118
 
+      <packing>
6119
 
+        <property name="top_attach">1</property>
6120
 
+        <property name="bottom_attach">2</property>
6121
 
+        <property name="x_options">GTK_FILL</property>
6122
 
+        <property name="y_options">GTK_FILL</property>
6123
 
+      </packing>
6124
 
+    </child>
6125
 
+    <child>
6126
 
+      <object class="GtkLabel" id="label1">
6127
 
+        <property name="visible">True</property>
6128
 
+        <property name="xalign">0</property>
6129
 
+        <property name="label" translatable="yes">_Name:</property>
6130
 
+        <property name="use_underline">True</property>
6131
 
+        <property name="mnemonic_widget">session_properties_name_entry</property>
6132
 
+      </object>
6133
 
+      <packing>
6134
 
+        <property name="x_options">GTK_FILL</property>
6135
 
+        <property name="y_options">GTK_FILL</property>
6136
 
+      </packing>
6137
 
+    </child>
6138
 
+  </object>
6139
 
+</interface>
6140
 
Index: gnome-session-3.28.0/doc/man/gnome-session-properties.1
6141
 
===================================================================
6142
 
--- /dev/null
6143
 
+++ gnome-session-3.28.0/doc/man/gnome-session-properties.1
6144
 
@@ -0,0 +1,24 @@
6145
 
+.\"
6146
 
+.\" gnome-session-properties manual page.
6147
 
+.\" (C) 2009-2010 Vincent Untz (vuntz@gnome.org)
6148
 
+.\"
6149
 
+.TH GNOME-SESSION-PROPERTIES 1 "GNOME"
6150
 
+.SH NAME
6151
 
+gnome-session-properties \- Configure applications to start on login
6152
 
+.SH SYNOPSIS
6153
 
+.B gnome-session-properties
6154
 
+.SH DESCRIPTION
6155
 
+.PP
6156
 
+The \fIgnome-session-properties\fP program enables the users to
6157
 
+configure what applications should be started on login, in addition to
6158
 
+the default startup applications configured on the system.
6159
 
+.PP
6160
 
+It also proposes an interface to save a snapshot of the currently
6161
 
+running applications so that they can automatically be restored to
6162
 
+their current state on your next GNOME session.
6163
 
+.SH BUGS
6164
 
+If you find bugs in the \fIgnome-session-properties\fP program, please report
6165
 
+these on https://bugzilla.gnome.org.
6166
 
+.SH SEE ALSO
6167
 
+.BR gnome-session(1)
6168
 
+.BR gnome-session-quit(1)
6169
 
Index: gnome-session-3.28.0/doc/man/gnome-session.1
6170
 
===================================================================
6171
 
--- gnome-session-3.28.0.orig/doc/man/gnome-session.1
6172
 
+++ gnome-session-3.28.0/doc/man/gnome-session.1
6173
 
@@ -94,6 +94,7 @@ when gnome-session is invoked.
6174
 
 .B /usr/share/gnome/autostart
6175
 
 .IP
6176
 
 The applications defined in those directories will be started on login.
6177
 
+\fIgnome-session-properties(1)\fP can be used to easily configure them.
6178
 
 .PP
6179
 
 .B $XDG_CONFIG_HOME/gnome-session/sessions
6180
 
 .B $XDG_CONFIG_DIRS/gnome-session/sessions
6181
 
@@ -109,4 +110,5 @@ This directory contains the list of appl
6182
 
 If you find bugs in the \fIgnome-session\fP program, please report
6183
 
 these on https://bugzilla.gnome.org.
6184
 
 .SH SEE ALSO
6185
 
+.BR gnome-session-properties(1)
6186
 
 .BR gnome-session-quit(1)
6187
 
Index: gnome-session-3.28.0/doc/man/meson.build
6188
 
===================================================================
6189
 
--- gnome-session-3.28.0.orig/doc/man/meson.build
6190
 
+++ gnome-session-3.28.0/doc/man/meson.build
6191
 
@@ -34,7 +34,8 @@ endforeach
6192
 
 
6193
 
 man_data = files(
6194
 
   'gnome-session.1',
6195
 
-  'gnome-session-quit.1'
6196
 
+  'gnome-session-quit.1',
6197
 
+  'gnome-session-properties.1'
6198
 
 )
6199
 
 
6200
 
 install_data(
6201
 
Index: gnome-session-3.28.0/meson.build
6202
 
===================================================================
6203
 
--- gnome-session-3.28.0.orig/meson.build
6204
 
+++ gnome-session-3.28.0/meson.build
6205
 
@@ -179,6 +179,7 @@ top_inc = include_directories('.')
6206
 
 subdir('gnome-session')
6207
 
 subdir('tools')
6208
 
 subdir('data')
6209
 
+subdir('capplet')
6210
 
 
6211
 
 enable_docbook = get_option('docbook')
6212
 
 enable_man = get_option('man')
6213
 
Index: gnome-session-3.28.0/po/POTFILES.in
6214
 
===================================================================
6215
 
--- gnome-session-3.28.0.orig/po/POTFILES.in
6216
 
+++ gnome-session-3.28.0/po/POTFILES.in
6217
 
@@ -1,11 +1,17 @@
6218
 
 # List of source files containing translatable strings.
6219
 
 # Please keep this file sorted alphabetically.
6220
 
+capplet/gsm-app-dialog.c
6221
 
+capplet/gsm-properties-dialog.c
6222
 
+capplet/gsp-app.c
6223
 
+capplet/main.c
6224
 
 data/gnome-custom-session.desktop.in
6225
 
 data/gnome.desktop.in
6226
 
 data/gnome-xorg.desktop.in
6227
 
 data/gnome-dummy.session.desktop.in.in
6228
 
 data/gnome.session.desktop.in.in
6229
 
+data/gnome-session-properties.desktop.in
6230
 
 data/session-selector.ui
6231
 
+data/session-properties.ui
6232
 
 data/ubuntu.desktop.in
6233
 
 data/ubuntu-wayland.desktop.in
6234
 
 data/ubuntu-communitheme-snap.desktop.in
6235
 
Index: gnome-session-3.28.0/po/POTFILES.skip
6236
 
===================================================================
6237
 
--- gnome-session-3.28.0.orig/po/POTFILES.skip
6238
 
+++ gnome-session-3.28.0/po/POTFILES.skip
6239
 
@@ -3,3 +3,4 @@
6240
 
 # Please keep this file sorted alphabetically.
6241
 
 data/gnome-dummy.session.desktop.in
6242
 
 data/gnome.session.desktop.in
6243
 
+data/gnome-session-properties.desktop