diff --git a/.gitignore b/.gitignore index 3458b47..69067b6 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/gnome-session-3.8.4.tar.xz +SOURCES/gnome-session-3.14.0.tar.xz diff --git a/.gnome-session.metadata b/.gnome-session.metadata index a620dee..d647b10 100644 --- a/.gnome-session.metadata +++ b/.gnome-session.metadata @@ -1 +1 @@ -a838fb530a226dc909d18df92f32ade92d5384f1 SOURCES/gnome-session-3.8.4.tar.xz +0df66062c4ff7286bcf951517a7a8728133f6469 SOURCES/gnome-session-3.14.0.tar.xz diff --git a/SOURCES/0001-Fix-a-possible-crash-in-the-presence-interface.patch b/SOURCES/0001-Fix-a-possible-crash-in-the-presence-interface.patch deleted file mode 100644 index 3f48e1a..0000000 --- a/SOURCES/0001-Fix-a-possible-crash-in-the-presence-interface.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 90714db611d6ced5202421ef3ba99334f1e9e6ec Mon Sep 17 00:00:00 2001 -From: Matthias Clasen -Date: Fri, 1 Nov 2013 16:30:06 -0400 -Subject: [PATCH] Fix a possible crash in the presence interface - -Improper error handling in gsm_presence_set_status_text() would -lead to a double free on the next call to that function. -Found using the dfuzzer tool, -https://github.com/matusmarhefka/dfuzzer ---- - gnome-session/gsm-presence.c | 9 +++++---- - 1 file changed, 5 insertions(+), 4 deletions(-) - -diff --git a/gnome-session/gsm-presence.c b/gnome-session/gsm-presence.c -index f6a022f..93ca1a0 100644 ---- a/gnome-session/gsm-presence.c -+++ b/gnome-session/gsm-presence.c -@@ -365,6 +365,7 @@ gsm_presence_set_status_text (GsmPresence *presence, - g_return_val_if_fail (GSM_IS_PRESENCE (presence), FALSE); - - g_free (presence->priv->status_text); -+ presence->priv->status_text = NULL; - - /* check length */ - if (status_text != NULL && strlen (status_text) > MAX_STATUS_TEXT) { -@@ -377,11 +378,11 @@ gsm_presence_set_status_text (GsmPresence *presence, - - if (status_text != NULL) { - presence->priv->status_text = g_strdup (status_text); -- } else { -- presence->priv->status_text = g_strdup (""); - } -+ - g_object_notify (G_OBJECT (presence), "status-text"); -- g_signal_emit (presence, signals[STATUS_TEXT_CHANGED], 0, presence->priv->status_text); -+ g_signal_emit (presence, signals[STATUS_TEXT_CHANGED], 0, -+ presence->priv->status_text ? presence->priv->status_text : ""); - return TRUE; - } - -@@ -457,7 +458,7 @@ gsm_presence_get_property (GObject *object, - g_value_set_uint (value, self->priv->status); - break; - case PROP_STATUS_TEXT: -- g_value_set_string (value, self->priv->status_text); -+ g_value_set_string (value, self->priv->status_text ? self->priv->status_text : ""); - break; - case PROP_IDLE_ENABLED: - g_value_set_boolean (value, self->priv->idle_enabled); --- -1.8.4.2 - diff --git a/SOURCES/0001-fail-whale-dialog-Implement-hfw-size-requests.patch b/SOURCES/0001-fail-whale-dialog-Implement-hfw-size-requests.patch deleted file mode 100644 index 76d6be2..0000000 --- a/SOURCES/0001-fail-whale-dialog-Implement-hfw-size-requests.patch +++ /dev/null @@ -1,69 +0,0 @@ -From 3c9e3e1850f0690a02f351c4d8fac23bc5234cde Mon Sep 17 00:00:00 2001 -From: Benjamin Otte -Date: Wed, 27 Nov 2013 19:04:14 +0100 -Subject: [PATCH] fail-whale-dialog: Implement hfw size requests - -In case of the failure dialog, height-for-width size requests should -not behave differently from regular size requests, so implement -those methods to avoid falling back to GtkBin's implementation, -which results in a mispositioned dialog. ---- - gnome-session/gsm-fail-whale-dialog.c | 28 ++++++++++++++++++++++++++++ - 1 file changed, 28 insertions(+) - -diff --git a/gnome-session/gsm-fail-whale-dialog.c b/gnome-session/gsm-fail-whale-dialog.c -index f35be6a..0703f24 100644 ---- a/gnome-session/gsm-fail-whale-dialog.c -+++ b/gnome-session/gsm-fail-whale-dialog.c -@@ -195,6 +195,19 @@ gsm_fail_whale_dialog_get_preferred_width (GtkWidget *widget, - } - - static void -+gsm_fail_whale_dialog_get_preferred_width_for_height (GtkWidget *widget, -+ gint for_height, -+ gint *minimal_width, -+ gint *natural_width) -+{ -+ GtkRequisition requisition; -+ -+ gsm_fail_whale_dialog_size_request (widget, &requisition); -+ -+ *minimal_width = *natural_width = requisition.width; -+} -+ -+static void - gsm_fail_whale_dialog_get_preferred_height (GtkWidget *widget, - gint *minimal_height, - gint *natural_height) -@@ -207,6 +220,19 @@ gsm_fail_whale_dialog_get_preferred_height (GtkWidget *widget, - } - - static void -+gsm_fail_whale_dialog_get_preferred_height_for_width (GtkWidget *widget, -+ gint for_width, -+ gint *minimal_height, -+ gint *natural_height) -+{ -+ GtkRequisition requisition; -+ -+ gsm_fail_whale_dialog_size_request (widget, &requisition); -+ -+ *minimal_height = *natural_height = requisition.height; -+} -+ -+static void - gsm_fail_whale_dialog_class_init (GsmFailWhaleDialogClass *klass) - { - GtkWidgetClass *widget_class; -@@ -217,6 +243,8 @@ gsm_fail_whale_dialog_class_init (GsmFailWhaleDialogClass *klass) - widget_class->unrealize = gsm_fail_whale_dialog_unrealize; - widget_class->get_preferred_width = gsm_fail_whale_dialog_get_preferred_width; - widget_class->get_preferred_height = gsm_fail_whale_dialog_get_preferred_height; -+ widget_class->get_preferred_width_for_height = gsm_fail_whale_dialog_get_preferred_width_for_height; -+ widget_class->get_preferred_height_for_width = gsm_fail_whale_dialog_get_preferred_height_for_width; - - g_type_class_add_private (klass, sizeof (GsmFailWhaleDialogPrivate)); - } --- -1.8.4.2 - diff --git a/SOURCES/0001-gsm-manager-Don-t-abort-when-all-clients-exit.patch b/SOURCES/0001-gsm-manager-Don-t-abort-when-all-clients-exit.patch deleted file mode 100644 index 8f7c87b..0000000 --- a/SOURCES/0001-gsm-manager-Don-t-abort-when-all-clients-exit.patch +++ /dev/null @@ -1,90 +0,0 @@ -From 7d333c2eff424bfae19ca6ca59835fd65fb919cc Mon Sep 17 00:00:00 2001 -From: Colin Walters -Date: Fri, 18 Oct 2013 18:15:14 -0400 -Subject: [PATCH] gsm-manager: Don't abort when all clients exit - -If all of our clients exit, remove_clients_for_connection() -calls end_phase() which in turn invokes gsm_manager_quit() that -checks the logout type. - -But at this point we only have _LOGOUT_NONE, so we end up aborting. -It's fine to just call _quit() in this case, and this avoids us -dumping core. - -This was happening to me when session startup failed for other -reasons. - -https://bugzilla.gnome.org/show_bug.cgi?id=710480 ---- - gnome-session/gsm-manager.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/gnome-session/gsm-manager.c b/gnome-session/gsm-manager.c -index f6ccb62..57cbb36 100644 ---- a/gnome-session/gsm-manager.c -+++ b/gnome-session/gsm-manager.c -@@ -465,60 +465,61 @@ phase_num_to_name (guint phase) - case GSM_MANAGER_PHASE_RUNNING: - name = "RUNNING"; - break; - case GSM_MANAGER_PHASE_QUERY_END_SESSION: - name = "QUERY_END_SESSION"; - break; - case GSM_MANAGER_PHASE_END_SESSION: - name = "END_SESSION"; - break; - case GSM_MANAGER_PHASE_EXIT: - name = "EXIT"; - break; - default: - g_assert_not_reached (); - break; - } - - return name; - } - - static void start_phase (GsmManager *manager); - - static void - gsm_manager_quit (GsmManager *manager) - { - /* See the comment in request_reboot() for some more details about how - * this works. */ - - switch (manager->priv->logout_type) { - case GSM_MANAGER_LOGOUT_LOGOUT: -+ case GSM_MANAGER_LOGOUT_NONE: - gtk_main_quit (); - break; - case GSM_MANAGER_LOGOUT_REBOOT: - case GSM_MANAGER_LOGOUT_REBOOT_INTERACT: - gdm_set_logout_action (GDM_LOGOUT_ACTION_NONE); - gsm_system_complete_shutdown (manager->priv->system); - break; - case GSM_MANAGER_LOGOUT_REBOOT_GDM: - gdm_set_logout_action (GDM_LOGOUT_ACTION_REBOOT); - gtk_main_quit (); - break; - case GSM_MANAGER_LOGOUT_SHUTDOWN: - case GSM_MANAGER_LOGOUT_SHUTDOWN_INTERACT: - gdm_set_logout_action (GDM_LOGOUT_ACTION_NONE); - gsm_system_complete_shutdown (manager->priv->system); - break; - case GSM_MANAGER_LOGOUT_SHUTDOWN_GDM: - gdm_set_logout_action (GDM_LOGOUT_ACTION_SHUTDOWN); - gtk_main_quit (); - break; - default: - g_assert_not_reached (); - break; - } - } - - static gboolean do_query_end_session_exit (GsmManager *manager); - - static void - end_phase (GsmManager *manager) --- -1.8.4.2 - diff --git a/SOURCES/0001-main-Set-XDG_MENU_PREFIX.patch b/SOURCES/0001-main-Set-XDG_MENU_PREFIX.patch new file mode 100644 index 0000000..3e74dcd --- /dev/null +++ b/SOURCES/0001-main-Set-XDG_MENU_PREFIX.patch @@ -0,0 +1,28 @@ +From 6bda8ba424d2dbd2441d9a7e6553608dceaa8454 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Florian=20M=C3=BCllner?= +Date: Thu, 18 Oct 2012 16:53:12 +0200 +Subject: [PATCH] main: Set XDG_MENU_PREFIX + +--- + gnome-session/main.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/gnome-session/main.c b/gnome-session/main.c +index 1903381..147daec 100644 +--- a/gnome-session/main.c ++++ b/gnome-session/main.c +@@ -347,6 +347,11 @@ main (int argc, char **argv) + */ + gsm_util_setenv ("GNOME_DESKTOP_SESSION_ID", "this-is-deprecated"); + ++ /* We want to use the GNOME menus which has the designed categories, ++ * not the legacy redhat-menus. ++ */ ++ gsm_util_setenv ("XDG_MENU_PREFIX", "gnome-"); ++ + client_store = gsm_store_new (); + + xsmp_server = gsm_xsmp_server_new (client_store); +-- +1.7.12.1 + diff --git a/SOURCES/custom-sessions.patch b/SOURCES/custom-sessions.patch index a41c8fb..adc625b 100644 --- a/SOURCES/custom-sessions.patch +++ b/SOURCES/custom-sessions.patch @@ -1,7 +1,4840 @@ -From 1a767008113013cdefbb5b5de0bbfb77cd30b679 Mon Sep 17 00:00:00 2001 +From 8d967c46fe8debcd3eedbb0bbf43a6545429b243 Mon Sep 17 00:00:00 2001 +From: Ray Strode +Date: Fri, 8 May 2015 16:24:59 -0400 +Subject: [PATCH 01/17] Revert "Remove gnome-session-properties" + +This reverts commit ea285af9962313ee2675fff27d3a852bb61e936a. +--- + Makefile.am | 1 + + capplet/Makefile.am | 31 + + capplet/gsm-app-dialog.c | 540 +++++++++++++ + capplet/gsm-app-dialog.h | 66 ++ + capplet/gsm-properties-dialog.c | 774 +++++++++++++++++++ + capplet/gsm-properties-dialog.h | 57 ++ + capplet/gsp-app-manager.c | 593 ++++++++++++++ + capplet/gsp-app-manager.h | 81 ++ + capplet/gsp-app.c | 1102 +++++++++++++++++++++++++++ + capplet/gsp-app.h | 108 +++ + capplet/gsp-keyfile.c | 201 +++++ + capplet/gsp-keyfile.h | 65 ++ + capplet/main.c | 108 +++ + configure.ac | 2 + + data/Makefile.am | 6 + + data/gnome-session-properties.desktop.in.in | 15 + + doc/man/Makefile.am | 1 + + doc/man/gnome-session-properties.1 | 24 + + po/POTFILES.in | 5 + + 19 files changed, 3780 insertions(+) + create mode 100644 capplet/Makefile.am + create mode 100644 capplet/gsm-app-dialog.c + create mode 100644 capplet/gsm-app-dialog.h + create mode 100644 capplet/gsm-properties-dialog.c + create mode 100644 capplet/gsm-properties-dialog.h + create mode 100644 capplet/gsp-app-manager.c + create mode 100644 capplet/gsp-app-manager.h + create mode 100644 capplet/gsp-app.c + create mode 100644 capplet/gsp-app.h + create mode 100644 capplet/gsp-keyfile.c + create mode 100644 capplet/gsp-keyfile.h + create mode 100644 capplet/main.c + create mode 100644 data/gnome-session-properties.desktop.in.in + create mode 100644 doc/man/gnome-session-properties.1 + +diff --git a/Makefile.am b/Makefile.am +index 6560a4e..6b6a47b 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -1,32 +1,33 @@ + SUBDIRS = \ + gnome-session \ ++ capplet \ + tools \ + data \ + doc \ + po + + ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} + + EXTRA_DIST = \ + HACKING \ + MAINTAINERS + + MAINTAINERCLEANFILES = \ + $(srcdir)/INSTALL \ + $(srcdir)/aclocal.m4 \ + $(srcdir)/config.guess \ + $(srcdir)/config.h.in \ + $(srcdir)/config.sub \ + $(srcdir)/depcomp \ + $(srcdir)/install-sh \ + $(srcdir)/ltmain.sh \ + $(srcdir)/missing \ + $(srcdir)/mkinstalldirs \ + $(srcdir)/configure \ + $(srcdir)/m4/intltool.m4 \ + `find "$(srcdir)" -type f -name Makefile.in -print` + + CHANGELOG_GIT_RANGE = GNOME_SESSION_2_26_1.. + dist-hook: + $(AM_V_GEN)if test -d "$(srcdir)/.git"; then \ + ( echo '# Generated by Makefile. Do not edit.'; echo; \ +diff --git a/capplet/Makefile.am b/capplet/Makefile.am +new file mode 100644 +index 0000000..c2e563c +--- /dev/null ++++ b/capplet/Makefile.am +@@ -0,0 +1,31 @@ ++bin_PROGRAMS = gnome-session-properties ++ ++AM_CPPFLAGS = \ ++ $(SESSION_PROPERTIES_CFLAGS) \ ++ $(GCONF_CFLAGS) \ ++ -I$(top_srcdir)/gnome-session \ ++ -DLOCALE_DIR=\""$(datadir)/locale"\" \ ++ -DGTKBUILDER_DIR=\""$(pkgdatadir)"\" \ ++ $(DISABLE_DEPRECATED_CFLAGS) ++ ++AM_CFLAGS = $(WARN_CFLAGS) ++ ++gnome_session_properties_SOURCES = \ ++ main.c \ ++ gsm-properties-dialog.h \ ++ gsm-properties-dialog.c \ ++ gsm-app-dialog.h \ ++ gsm-app-dialog.c \ ++ gsp-app.h \ ++ gsp-app.c \ ++ gsp-app-manager.h \ ++ gsp-app-manager.c \ ++ gsp-keyfile.h \ ++ gsp-keyfile.c ++ ++gnome_session_properties_LDADD = \ ++ $(SESSION_PROPERTIES_LIBS) \ ++ $(top_builddir)/gnome-session/libgsmutil.la \ ++ $(GCONF_LIBS) ++ ++-include $(top_srcdir)/git.mk +diff --git a/capplet/gsm-app-dialog.c b/capplet/gsm-app-dialog.c +new file mode 100644 +index 0000000..e7369dd +--- /dev/null ++++ b/capplet/gsm-app-dialog.c +@@ -0,0 +1,540 @@ ++/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- ++ * ++ * Copyright (C) 2008 William Jon McCann ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ++ * ++ */ ++ ++#include "config.h" ++ ++#include ++#include ++#include ++ ++#include "gsm-util.h" ++ ++#include "gsm-app-dialog.h" ++ ++#define GTKBUILDER_FILE "session-properties.ui" ++ ++#define CAPPLET_NAME_ENTRY_WIDGET_NAME "session_properties_name_entry" ++#define CAPPLET_COMMAND_ENTRY_WIDGET_NAME "session_properties_command_entry" ++#define CAPPLET_COMMENT_ENTRY_WIDGET_NAME "session_properties_comment_entry" ++#define CAPPLET_BROWSE_WIDGET_NAME "session_properties_browse_button" ++ ++ ++#define GSM_APP_DIALOG_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GSM_TYPE_APP_DIALOG, GsmAppDialogPrivate)) ++ ++struct GsmAppDialogPrivate ++{ ++ GtkWidget *name_entry; ++ GtkWidget *command_entry; ++ GtkWidget *comment_entry; ++ GtkWidget *browse_button; ++ char *name; ++ char *command; ++ char *comment; ++}; ++ ++static void gsm_app_dialog_class_init (GsmAppDialogClass *klass); ++static void gsm_app_dialog_init (GsmAppDialog *app_dialog); ++static void gsm_app_dialog_finalize (GObject *object); ++ ++enum { ++ PROP_0, ++ PROP_NAME, ++ PROP_COMMAND, ++ PROP_COMMENT ++}; ++ ++G_DEFINE_TYPE (GsmAppDialog, gsm_app_dialog, GTK_TYPE_DIALOG) ++ ++static char * ++make_exec_uri (const char *exec) ++{ ++ GString *str; ++ const char *c; ++ ++ if (exec == NULL) { ++ return g_strdup (""); ++ } ++ ++ if (strchr (exec, ' ') == NULL) { ++ return g_strdup (exec); ++ } ++ ++ str = g_string_new_len (NULL, strlen (exec)); ++ ++ str = g_string_append_c (str, '"'); ++ for (c = exec; *c != '\0'; c++) { ++ /* FIXME: GKeyFile will add an additional backslach so we'll ++ * end up with toto\\" instead of toto\" ++ * We could use g_key_file_set_value(), but then we don't ++ * benefit from the other escaping that glib is doing... ++ */ ++ if (*c == '"') { ++ str = g_string_append (str, "\\\""); ++ } else { ++ str = g_string_append_c (str, *c); ++ } ++ } ++ str = g_string_append_c (str, '"'); ++ ++ return g_string_free (str, FALSE); ++} ++ ++static void ++on_browse_button_clicked (GtkWidget *widget, ++ GsmAppDialog *dialog) ++{ ++ GtkWidget *chooser; ++ int response; ++ ++ chooser = gtk_file_chooser_dialog_new ("", ++ GTK_WINDOW (dialog), ++ GTK_FILE_CHOOSER_ACTION_OPEN, ++ GTK_STOCK_CANCEL, ++ GTK_RESPONSE_CANCEL, ++ GTK_STOCK_OPEN, ++ GTK_RESPONSE_ACCEPT, ++ NULL); ++ ++ gtk_window_set_transient_for (GTK_WINDOW (chooser), ++ GTK_WINDOW (dialog)); ++ ++ gtk_window_set_destroy_with_parent (GTK_WINDOW (chooser), TRUE); ++ ++ gtk_window_set_title (GTK_WINDOW (chooser), _("Select Command")); ++ ++ gtk_widget_show (chooser); ++ ++ response = gtk_dialog_run (GTK_DIALOG (chooser)); ++ ++ if (response == GTK_RESPONSE_ACCEPT) { ++ char *text; ++ char *uri; ++ ++ text = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (chooser)); ++ ++ uri = make_exec_uri (text); ++ ++ g_free (text); ++ ++ gtk_entry_set_text (GTK_ENTRY (dialog->priv->command_entry), uri); ++ ++ g_free (uri); ++ } ++ ++ gtk_widget_destroy (chooser); ++} ++ ++static void ++on_entry_activate (GtkEntry *entry, ++ GsmAppDialog *dialog) ++{ ++ gtk_dialog_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK); ++} ++ ++static void ++setup_dialog (GsmAppDialog *dialog) ++{ ++ GtkWidget *content_area; ++ GtkWidget *widget; ++ GtkBuilder *xml; ++ GError *error; ++ ++ xml = gtk_builder_new (); ++ gtk_builder_set_translation_domain (xml, GETTEXT_PACKAGE); ++ ++ error = NULL; ++ if (!gtk_builder_add_from_file (xml, ++ GTKBUILDER_DIR "/" GTKBUILDER_FILE, ++ &error)) { ++ if (error) { ++ g_warning ("Could not load capplet UI file: %s", ++ error->message); ++ g_error_free (error); ++ } else { ++ g_warning ("Could not load capplet UI file."); ++ } ++ } ++ ++ content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog)); ++ widget = GTK_WIDGET (gtk_builder_get_object (xml, "main-table")); ++ gtk_container_add (GTK_CONTAINER (content_area), widget); ++ ++ gtk_container_set_border_width (GTK_CONTAINER (dialog), 6); ++ gtk_window_set_icon_name (GTK_WINDOW (dialog), "session-properties"); ++ ++ g_object_set (dialog, ++ "allow-shrink", FALSE, ++ "allow-grow", FALSE, ++ NULL); ++ ++ gtk_dialog_add_button (GTK_DIALOG (dialog), ++ GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL); ++ ++ if (dialog->priv->name == NULL ++ && dialog->priv->command == NULL ++ && dialog->priv->comment == NULL) { ++ gtk_window_set_title (GTK_WINDOW (dialog), _("Add Startup Program")); ++ gtk_dialog_add_button (GTK_DIALOG (dialog), ++ GTK_STOCK_ADD, GTK_RESPONSE_OK); ++ } else { ++ gtk_window_set_title (GTK_WINDOW (dialog), _("Edit Startup Program")); ++ gtk_dialog_add_button (GTK_DIALOG (dialog), ++ GTK_STOCK_SAVE, GTK_RESPONSE_OK); ++ } ++ ++ dialog->priv->name_entry = GTK_WIDGET (gtk_builder_get_object (xml, CAPPLET_NAME_ENTRY_WIDGET_NAME)); ++ g_signal_connect (dialog->priv->name_entry, ++ "activate", ++ G_CALLBACK (on_entry_activate), ++ dialog); ++ if (dialog->priv->name != NULL) { ++ gtk_entry_set_text (GTK_ENTRY (dialog->priv->name_entry), dialog->priv->name); ++ } ++ ++ dialog->priv->browse_button = GTK_WIDGET (gtk_builder_get_object (xml, CAPPLET_BROWSE_WIDGET_NAME)); ++ g_signal_connect (dialog->priv->browse_button, ++ "clicked", ++ G_CALLBACK (on_browse_button_clicked), ++ dialog); ++ ++ dialog->priv->command_entry = GTK_WIDGET (gtk_builder_get_object (xml, CAPPLET_COMMAND_ENTRY_WIDGET_NAME)); ++ g_signal_connect (dialog->priv->command_entry, ++ "activate", ++ G_CALLBACK (on_entry_activate), ++ dialog); ++ if (dialog->priv->command != NULL) { ++ gtk_entry_set_text (GTK_ENTRY (dialog->priv->command_entry), dialog->priv->command); ++ } ++ ++ dialog->priv->comment_entry = GTK_WIDGET (gtk_builder_get_object (xml, CAPPLET_COMMENT_ENTRY_WIDGET_NAME)); ++ g_signal_connect (dialog->priv->comment_entry, ++ "activate", ++ G_CALLBACK (on_entry_activate), ++ dialog); ++ if (dialog->priv->comment != NULL) { ++ gtk_entry_set_text (GTK_ENTRY (dialog->priv->comment_entry), dialog->priv->comment); ++ } ++ ++ if (xml != NULL) { ++ g_object_unref (xml); ++ } ++} ++ ++static GObject * ++gsm_app_dialog_constructor (GType type, ++ guint n_construct_app, ++ GObjectConstructParam *construct_app) ++{ ++ GsmAppDialog *dialog; ++ ++ dialog = GSM_APP_DIALOG (G_OBJECT_CLASS (gsm_app_dialog_parent_class)->constructor (type, ++ n_construct_app, ++ construct_app)); ++ ++ setup_dialog (dialog); ++ ++ gtk_widget_show_all (GTK_WIDGET (dialog)); ++ ++ return G_OBJECT (dialog); ++} ++ ++static void ++gsm_app_dialog_dispose (GObject *object) ++{ ++ GsmAppDialog *dialog; ++ ++ g_return_if_fail (object != NULL); ++ g_return_if_fail (GSM_IS_APP_DIALOG (object)); ++ ++ dialog = GSM_APP_DIALOG (object); ++ ++ g_free (dialog->priv->name); ++ dialog->priv->name = NULL; ++ g_free (dialog->priv->command); ++ dialog->priv->command = NULL; ++ g_free (dialog->priv->comment); ++ dialog->priv->comment = NULL; ++ ++ G_OBJECT_CLASS (gsm_app_dialog_parent_class)->dispose (object); ++} ++ ++static void ++gsm_app_dialog_set_name (GsmAppDialog *dialog, ++ const char *name) ++{ ++ g_return_if_fail (GSM_IS_APP_DIALOG (dialog)); ++ ++ g_free (dialog->priv->name); ++ ++ dialog->priv->name = g_strdup (name); ++ g_object_notify (G_OBJECT (dialog), "name"); ++} ++ ++static void ++gsm_app_dialog_set_command (GsmAppDialog *dialog, ++ const char *name) ++{ ++ g_return_if_fail (GSM_IS_APP_DIALOG (dialog)); ++ ++ g_free (dialog->priv->command); ++ ++ dialog->priv->command = g_strdup (name); ++ g_object_notify (G_OBJECT (dialog), "command"); ++} ++ ++static void ++gsm_app_dialog_set_comment (GsmAppDialog *dialog, ++ const char *name) ++{ ++ g_return_if_fail (GSM_IS_APP_DIALOG (dialog)); ++ ++ g_free (dialog->priv->comment); ++ ++ dialog->priv->comment = g_strdup (name); ++ g_object_notify (G_OBJECT (dialog), "comment"); ++} ++ ++const char * ++gsm_app_dialog_get_name (GsmAppDialog *dialog) ++{ ++ g_return_val_if_fail (GSM_IS_APP_DIALOG (dialog), NULL); ++ return gtk_entry_get_text (GTK_ENTRY (dialog->priv->name_entry)); ++} ++ ++const char * ++gsm_app_dialog_get_command (GsmAppDialog *dialog) ++{ ++ g_return_val_if_fail (GSM_IS_APP_DIALOG (dialog), NULL); ++ return gtk_entry_get_text (GTK_ENTRY (dialog->priv->command_entry)); ++} ++ ++const char * ++gsm_app_dialog_get_comment (GsmAppDialog *dialog) ++{ ++ g_return_val_if_fail (GSM_IS_APP_DIALOG (dialog), NULL); ++ return gtk_entry_get_text (GTK_ENTRY (dialog->priv->comment_entry)); ++} ++ ++static void ++gsm_app_dialog_set_property (GObject *object, ++ guint prop_id, ++ const GValue *value, ++ GParamSpec *pspec) ++{ ++ GsmAppDialog *dialog = GSM_APP_DIALOG (object); ++ ++ switch (prop_id) { ++ case PROP_NAME: ++ gsm_app_dialog_set_name (dialog, g_value_get_string (value)); ++ break; ++ case PROP_COMMAND: ++ gsm_app_dialog_set_command (dialog, g_value_get_string (value)); ++ break; ++ case PROP_COMMENT: ++ gsm_app_dialog_set_comment (dialog, g_value_get_string (value)); ++ break; ++ default: ++ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); ++ break; ++ } ++} ++ ++static void ++gsm_app_dialog_get_property (GObject *object, ++ guint prop_id, ++ GValue *value, ++ GParamSpec *pspec) ++{ ++ GsmAppDialog *dialog = GSM_APP_DIALOG (object); ++ ++ switch (prop_id) { ++ case PROP_NAME: ++ g_value_set_string (value, dialog->priv->name); ++ break; ++ case PROP_COMMAND: ++ g_value_set_string (value, dialog->priv->command); ++ break; ++ case PROP_COMMENT: ++ g_value_set_string (value, dialog->priv->comment); ++ break; ++ default: ++ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); ++ break; ++ } ++} ++ ++static void ++gsm_app_dialog_class_init (GsmAppDialogClass *klass) ++{ ++ GObjectClass *object_class = G_OBJECT_CLASS (klass); ++ ++ object_class->get_property = gsm_app_dialog_get_property; ++ object_class->set_property = gsm_app_dialog_set_property; ++ object_class->constructor = gsm_app_dialog_constructor; ++ object_class->dispose = gsm_app_dialog_dispose; ++ object_class->finalize = gsm_app_dialog_finalize; ++ ++ g_object_class_install_property (object_class, ++ PROP_NAME, ++ g_param_spec_string ("name", ++ "name", ++ "name", ++ NULL, ++ G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); ++ g_object_class_install_property (object_class, ++ PROP_COMMAND, ++ g_param_spec_string ("command", ++ "command", ++ "command", ++ NULL, ++ G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); ++ g_object_class_install_property (object_class, ++ PROP_COMMENT, ++ g_param_spec_string ("comment", ++ "comment", ++ "comment", ++ NULL, ++ G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); ++ ++ g_type_class_add_private (klass, sizeof (GsmAppDialogPrivate)); ++} ++ ++static void ++gsm_app_dialog_init (GsmAppDialog *dialog) ++{ ++ ++ dialog->priv = GSM_APP_DIALOG_GET_PRIVATE (dialog); ++} ++ ++static void ++gsm_app_dialog_finalize (GObject *object) ++{ ++ GsmAppDialog *dialog; ++ ++ g_return_if_fail (object != NULL); ++ g_return_if_fail (GSM_IS_APP_DIALOG (object)); ++ ++ dialog = GSM_APP_DIALOG (object); ++ ++ g_return_if_fail (dialog->priv != NULL); ++ ++ G_OBJECT_CLASS (gsm_app_dialog_parent_class)->finalize (object); ++} ++ ++GtkWidget * ++gsm_app_dialog_new (const char *name, ++ const char *command, ++ const char *comment) ++{ ++ GObject *object; ++ ++ object = g_object_new (GSM_TYPE_APP_DIALOG, ++ "name", name, ++ "command", command, ++ "comment", comment, ++ NULL); ++ ++ return GTK_WIDGET (object); ++} ++ ++gboolean ++gsm_app_dialog_run (GsmAppDialog *dialog, ++ char **name_p, ++ char **command_p, ++ char **comment_p) ++{ ++ gboolean retval; ++ ++ retval = FALSE; ++ ++ while (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_OK) { ++ const char *name; ++ const char *exec; ++ const char *comment; ++ const char *error_msg; ++ GError *error; ++ char **argv; ++ int argc; ++ ++ name = gsm_app_dialog_get_name (GSM_APP_DIALOG (dialog)); ++ exec = gsm_app_dialog_get_command (GSM_APP_DIALOG (dialog)); ++ comment = gsm_app_dialog_get_comment (GSM_APP_DIALOG (dialog)); ++ ++ error = NULL; ++ error_msg = NULL; ++ ++ if (gsm_util_text_is_blank (exec)) { ++ error_msg = _("The startup command cannot be empty"); ++ } else { ++ if (!g_shell_parse_argv (exec, &argc, &argv, &error)) { ++ if (error != NULL) { ++ error_msg = error->message; ++ } else { ++ error_msg = _("The startup command is not valid"); ++ } ++ } ++ } ++ ++ if (error_msg != NULL) { ++ GtkWidget *msgbox; ++ ++ msgbox = gtk_message_dialog_new (GTK_WINDOW (dialog), ++ GTK_DIALOG_MODAL, ++ GTK_MESSAGE_ERROR, ++ GTK_BUTTONS_CLOSE, ++ "%s", error_msg); ++ ++ if (error != NULL) { ++ g_error_free (error); ++ } ++ ++ gtk_dialog_run (GTK_DIALOG (msgbox)); ++ ++ gtk_widget_destroy (msgbox); ++ ++ continue; ++ } ++ ++ if (gsm_util_text_is_blank (name)) { ++ name = argv[0]; ++ } ++ ++ if (name_p) { ++ *name_p = g_strdup (name); ++ } ++ ++ g_strfreev (argv); ++ ++ if (command_p) { ++ *command_p = g_strdup (exec); ++ } ++ ++ if (comment_p) { ++ *comment_p = g_strdup (comment); ++ } ++ ++ retval = TRUE; ++ break; ++ } ++ ++ gtk_widget_destroy (GTK_WIDGET (dialog)); ++ ++ return retval; ++} +diff --git a/capplet/gsm-app-dialog.h b/capplet/gsm-app-dialog.h +new file mode 100644 +index 0000000..ced0628 +--- /dev/null ++++ b/capplet/gsm-app-dialog.h +@@ -0,0 +1,66 @@ ++/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- ++ * ++ * Copyright (C) 2008 William Jon McCann ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ++ * ++ */ ++ ++#ifndef __GSM_APP_DIALOG_H ++#define __GSM_APP_DIALOG_H ++ ++#include ++#include ++ ++G_BEGIN_DECLS ++ ++#define GSM_TYPE_APP_DIALOG (gsm_app_dialog_get_type ()) ++#define GSM_APP_DIALOG(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSM_TYPE_APP_DIALOG, GsmAppDialog)) ++#define GSM_APP_DIALOG_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GSM_TYPE_APP_DIALOG, GsmAppDialogClass)) ++#define GSM_IS_APP_DIALOG(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSM_TYPE_APP_DIALOG)) ++#define GSM_IS_APP_DIALOG_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GSM_TYPE_APP_DIALOG)) ++#define GSM_APP_DIALOG_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GSM_TYPE_APP_DIALOG, GsmAppDialogClass)) ++ ++typedef struct GsmAppDialogPrivate GsmAppDialogPrivate; ++ ++typedef struct ++{ ++ GtkDialog parent; ++ GsmAppDialogPrivate *priv; ++} GsmAppDialog; ++ ++typedef struct ++{ ++ GtkDialogClass parent_class; ++} GsmAppDialogClass; ++ ++GType gsm_app_dialog_get_type (void); ++ ++GtkWidget * gsm_app_dialog_new (const char *name, ++ const char *command, ++ const char *comment); ++ ++gboolean gsm_app_dialog_run (GsmAppDialog *dialog, ++ char **name_p, ++ char **command_p, ++ char **comment_p); ++ ++const char * gsm_app_dialog_get_name (GsmAppDialog *dialog); ++const char * gsm_app_dialog_get_command (GsmAppDialog *dialog); ++const char * gsm_app_dialog_get_comment (GsmAppDialog *dialog); ++ ++G_END_DECLS ++ ++#endif /* __GSM_APP_DIALOG_H */ +diff --git a/capplet/gsm-properties-dialog.c b/capplet/gsm-properties-dialog.c +new file mode 100644 +index 0000000..33812b8 +--- /dev/null ++++ b/capplet/gsm-properties-dialog.c +@@ -0,0 +1,774 @@ ++/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- ++ * ++ * Copyright (C) 1999 Free Software Foundation, Inc. ++ * Copyright (C) 2007 Vincent Untz. ++ * Copyright (C) 2008 Lucas Rocha. ++ * Copyright (C) 2008 William Jon McCann ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ++ * ++ */ ++ ++#include "config.h" ++ ++#include ++#include ++#include ++ ++#include "gsm-properties-dialog.h" ++#include "gsm-app-dialog.h" ++#include "gsm-util.h" ++#include "gsp-app.h" ++#include "gsp-app-manager.h" ++ ++#define GSM_PROPERTIES_DIALOG_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GSM_TYPE_PROPERTIES_DIALOG, GsmPropertiesDialogPrivate)) ++ ++#define GTKBUILDER_FILE "session-properties.ui" ++ ++#define CAPPLET_TREEVIEW_WIDGET_NAME "session_properties_treeview" ++#define CAPPLET_ADD_WIDGET_NAME "session_properties_add_button" ++#define CAPPLET_DELETE_WIDGET_NAME "session_properties_delete_button" ++#define CAPPLET_EDIT_WIDGET_NAME "session_properties_edit_button" ++#define CAPPLET_SAVE_WIDGET_NAME "session_properties_save_button" ++#define CAPPLET_REMEMBER_WIDGET_NAME "session_properties_remember_toggle" ++ ++#define STARTUP_APP_ICON "system-run" ++ ++#define SPC_SETTINGS_SCHEMA "org.gnome.SessionManager" ++#define SPC_SETTINGS_AUTOSAVE_KEY "auto-save-session" ++ ++struct GsmPropertiesDialogPrivate ++{ ++ GtkBuilder *xml; ++ GtkListStore *list_store; ++ GtkTreeModel *tree_filter; ++ ++ GtkTreeView *treeview; ++ GtkWidget *add_button; ++ GtkWidget *delete_button; ++ GtkWidget *edit_button; ++ ++ GSettings *settings; ++ ++ GspAppManager *manager; ++}; ++ ++enum { ++ STORE_COL_VISIBLE = 0, ++ STORE_COL_ENABLED, ++ STORE_COL_GICON, ++ STORE_COL_DESCRIPTION, ++ STORE_COL_APP, ++ STORE_COL_SEARCH, ++ NUMBER_OF_COLUMNS ++}; ++ ++static void gsm_properties_dialog_class_init (GsmPropertiesDialogClass *klass); ++static void gsm_properties_dialog_init (GsmPropertiesDialog *properties_dialog); ++static void gsm_properties_dialog_finalize (GObject *object); ++ ++G_DEFINE_TYPE (GsmPropertiesDialog, gsm_properties_dialog, GTK_TYPE_DIALOG) ++ ++static gboolean ++find_by_app (GtkTreeModel *model, ++ GtkTreeIter *iter, ++ GspApp *app) ++{ ++ GspApp *iter_app = NULL; ++ ++ if (!gtk_tree_model_get_iter_first (model, iter)) { ++ return FALSE; ++ } ++ ++ do { ++ gtk_tree_model_get (model, iter, ++ STORE_COL_APP, &iter_app, ++ -1); ++ ++ if (iter_app == app) { ++ g_object_unref (iter_app); ++ return TRUE; ++ } ++ } while (gtk_tree_model_iter_next (model, iter)); ++ ++ return FALSE; ++} ++ ++static void ++_fill_iter_from_app (GtkListStore *list_store, ++ GtkTreeIter *iter, ++ GspApp *app) ++{ ++ gboolean hidden; ++ gboolean display; ++ gboolean enabled; ++ gboolean shown; ++ GIcon *icon; ++ const char *description; ++ const char *app_name; ++ ++ hidden = gsp_app_get_hidden (app); ++ display = gsp_app_get_display (app); ++ enabled = gsp_app_get_enabled (app); ++ shown = gsp_app_get_shown (app); ++ icon = gsp_app_get_icon (app); ++ description = gsp_app_get_description (app); ++ app_name = gsp_app_get_name (app); ++ ++ if (G_IS_THEMED_ICON (icon)) { ++ GtkIconTheme *theme; ++ const char * const *icon_names; ++ ++ theme = gtk_icon_theme_get_default (); ++ icon_names = g_themed_icon_get_names (G_THEMED_ICON (icon)); ++ if (icon_names[0] == NULL || ++ !gtk_icon_theme_has_icon (theme, icon_names[0])) { ++ g_object_unref (icon); ++ icon = NULL; ++ } ++ } else if (G_IS_FILE_ICON (icon)) { ++ GFile *iconfile; ++ ++ iconfile = g_file_icon_get_file (G_FILE_ICON (icon)); ++ if (!g_file_query_exists (iconfile, NULL)) { ++ g_object_unref (icon); ++ icon = NULL; ++ } ++ } ++ ++ if (icon == NULL) { ++ icon = g_themed_icon_new (STARTUP_APP_ICON); ++ } ++ ++ gtk_list_store_set (list_store, iter, ++ STORE_COL_VISIBLE, !hidden && shown && display, ++ STORE_COL_ENABLED, enabled, ++ STORE_COL_GICON, icon, ++ STORE_COL_DESCRIPTION, description, ++ STORE_COL_APP, app, ++ STORE_COL_SEARCH, app_name, ++ -1); ++ g_object_unref (icon); ++} ++ ++static void ++_app_changed (GsmPropertiesDialog *dialog, ++ GspApp *app) ++{ ++ GtkTreeIter iter; ++ ++ if (!find_by_app (GTK_TREE_MODEL (dialog->priv->list_store), ++ &iter, app)) { ++ return; ++ } ++ ++ _fill_iter_from_app (dialog->priv->list_store, &iter, app); ++} ++ ++static void ++append_app (GsmPropertiesDialog *dialog, ++ GspApp *app) ++{ ++ GtkTreeIter iter; ++ ++ gtk_list_store_append (dialog->priv->list_store, &iter); ++ _fill_iter_from_app (dialog->priv->list_store, &iter, app); ++ ++ g_signal_connect_swapped (app, "changed", ++ G_CALLBACK (_app_changed), dialog); ++} ++ ++static void ++_app_added (GsmPropertiesDialog *dialog, ++ GspApp *app, ++ GspAppManager *manager) ++{ ++ append_app (dialog, app); ++} ++ ++static void ++_app_removed (GsmPropertiesDialog *dialog, ++ GspApp *app, ++ GspAppManager *manager) ++{ ++ GtkTreeIter iter; ++ ++ if (!find_by_app (GTK_TREE_MODEL (dialog->priv->list_store), ++ &iter, app)) { ++ return; ++ } ++ ++ g_signal_handlers_disconnect_by_func (app, ++ _app_changed, ++ dialog); ++ gtk_list_store_remove (dialog->priv->list_store, &iter); ++} ++ ++static void ++populate_model (GsmPropertiesDialog *dialog) ++{ ++ GSList *apps; ++ GSList *l; ++ ++ apps = gsp_app_manager_get_apps (dialog->priv->manager); ++ for (l = apps; l != NULL; l = l->next) { ++ append_app (dialog, GSP_APP (l->data)); ++ } ++ g_slist_free (apps); ++} ++ ++static void ++on_selection_changed (GtkTreeSelection *selection, ++ GsmPropertiesDialog *dialog) ++{ ++ gboolean sel; ++ ++ sel = gtk_tree_selection_get_selected (selection, NULL, NULL); ++ ++ gtk_widget_set_sensitive (dialog->priv->edit_button, sel); ++ gtk_widget_set_sensitive (dialog->priv->delete_button, sel); ++} ++ ++static void ++on_startup_enabled_toggled (GtkCellRendererToggle *cell_renderer, ++ char *path, ++ GsmPropertiesDialog *dialog) ++{ ++ GtkTreeIter iter; ++ GspApp *app; ++ gboolean active; ++ ++ if (!gtk_tree_model_get_iter_from_string (GTK_TREE_MODEL (dialog->priv->tree_filter), ++ &iter, path)) { ++ return; ++ } ++ ++ app = NULL; ++ gtk_tree_model_get (GTK_TREE_MODEL (dialog->priv->tree_filter), ++ &iter, ++ STORE_COL_APP, &app, ++ -1); ++ ++ active = gtk_cell_renderer_toggle_get_active (cell_renderer); ++ active = !active; ++ ++ if (app) { ++ gsp_app_set_enabled (app, active); ++ g_object_unref (app); ++ } ++} ++ ++static void ++on_drag_data_received (GtkWidget *widget, ++ GdkDragContext *drag_context, ++ gint x, ++ gint y, ++ GtkSelectionData *data, ++ guint info, ++ guint time, ++ GsmPropertiesDialog *dialog) ++{ ++ gboolean dnd_success; ++ ++ dnd_success = FALSE; ++ ++ if (data != NULL) { ++ char **filenames; ++ int i; ++ ++ filenames = gtk_selection_data_get_uris (data); ++ ++ for (i = 0; filenames[i] && filenames[i][0]; i++) { ++ /* Return success if at least one file succeeded */ ++ gboolean file_success; ++ file_success = gsp_app_copy_desktop_file (filenames[i]); ++ dnd_success = dnd_success || file_success; ++ } ++ ++ g_strfreev (filenames); ++ } ++ ++ gtk_drag_finish (drag_context, dnd_success, FALSE, time); ++ g_signal_stop_emission_by_name (widget, "drag_data_received"); ++} ++ ++static void ++on_drag_begin (GtkWidget *widget, ++ GdkDragContext *context, ++ GsmPropertiesDialog *dialog) ++{ ++ GtkTreePath *path; ++ GtkTreeIter iter; ++ GspApp *app; ++ ++ gtk_tree_view_get_cursor (GTK_TREE_VIEW (widget), &path, NULL); ++ gtk_tree_model_get_iter (GTK_TREE_MODEL (dialog->priv->tree_filter), ++ &iter, path); ++ gtk_tree_path_free (path); ++ ++ gtk_tree_model_get (GTK_TREE_MODEL (dialog->priv->tree_filter), ++ &iter, ++ STORE_COL_APP, &app, ++ -1); ++ ++ if (app) { ++ g_object_set_data_full (G_OBJECT (context), "gsp-app", ++ g_object_ref (app), g_object_unref); ++ g_object_unref (app); ++ } ++ ++} ++ ++static void ++on_drag_data_get (GtkWidget *widget, ++ GdkDragContext *context, ++ GtkSelectionData *selection_data, ++ guint info, ++ guint time, ++ GsmPropertiesDialog *dialog) ++{ ++ GspApp *app; ++ ++ app = g_object_get_data (G_OBJECT (context), "gsp-app"); ++ if (app) { ++ const char *uris[2]; ++ char *uri; ++ ++ uri = g_filename_to_uri (gsp_app_get_path (app), NULL, NULL); ++ ++ uris[0] = uri; ++ uris[1] = NULL; ++ gtk_selection_data_set_uris (selection_data, (char **) uris); ++ ++ g_free (uri); ++ } ++} ++ ++static void ++on_add_app_clicked (GtkWidget *widget, ++ GsmPropertiesDialog *dialog) ++{ ++ GtkWidget *add_dialog; ++ char *name; ++ char *exec; ++ char *comment; ++ ++ add_dialog = gsm_app_dialog_new (NULL, NULL, NULL); ++ gtk_window_set_transient_for (GTK_WINDOW (add_dialog), ++ GTK_WINDOW (dialog)); ++ ++ if (gsm_app_dialog_run (GSM_APP_DIALOG (add_dialog), ++ &name, &exec, &comment)) { ++ gsp_app_create (name, comment, exec); ++ g_free (name); ++ g_free (exec); ++ g_free (comment); ++ } ++} ++ ++static void ++on_delete_app_clicked (GtkWidget *widget, ++ GsmPropertiesDialog *dialog) ++{ ++ GtkTreeSelection *selection; ++ GtkTreeIter iter; ++ GspApp *app; ++ ++ selection = gtk_tree_view_get_selection (dialog->priv->treeview); ++ ++ if (!gtk_tree_selection_get_selected (selection, NULL, &iter)) { ++ return; ++ } ++ ++ app = NULL; ++ gtk_tree_model_get (GTK_TREE_MODEL (dialog->priv->tree_filter), ++ &iter, ++ STORE_COL_APP, &app, ++ -1); ++ ++ if (app) { ++ gsp_app_delete (app); ++ g_object_unref (app); ++ } ++} ++ ++static void ++on_edit_app_clicked (GtkWidget *widget, ++ GsmPropertiesDialog *dialog) ++{ ++ GtkTreeSelection *selection; ++ GtkTreeIter iter; ++ GspApp *app; ++ ++ selection = gtk_tree_view_get_selection (dialog->priv->treeview); ++ ++ if (!gtk_tree_selection_get_selected (selection, NULL, &iter)) { ++ return; ++ } ++ ++ app = NULL; ++ gtk_tree_model_get (GTK_TREE_MODEL (dialog->priv->tree_filter), ++ &iter, ++ STORE_COL_APP, &app, ++ -1); ++ ++ if (app) { ++ GtkWidget *edit_dialog; ++ char *name; ++ char *exec; ++ char *comment; ++ ++ edit_dialog = gsm_app_dialog_new (gsp_app_get_name (app), ++ gsp_app_get_exec (app), ++ gsp_app_get_comment (app)); ++ gtk_window_set_transient_for (GTK_WINDOW (edit_dialog), ++ GTK_WINDOW (dialog)); ++ ++ if (gsm_app_dialog_run (GSM_APP_DIALOG (edit_dialog), ++ &name, &exec, &comment)) { ++ gsp_app_update (app, name, comment, exec); ++ g_free (name); ++ g_free (exec); ++ g_free (comment); ++ } ++ ++ g_object_unref (app); ++ } ++} ++ ++static void ++on_row_activated (GtkTreeView *tree_view, ++ GtkTreePath *path, ++ GtkTreeViewColumn *column, ++ GsmPropertiesDialog *dialog) ++{ ++ on_edit_app_clicked (NULL, dialog); ++} ++ ++static void ++on_save_session_clicked (GtkWidget *widget, ++ GsmPropertiesDialog *dialog) ++{ ++ g_debug ("Session saving is not implemented yet!"); ++} ++ ++static void ++setup_dialog (GsmPropertiesDialog *dialog) ++{ ++ GtkTreeView *treeview; ++ GtkWidget *button; ++ GtkTreeModel *tree_filter; ++ GtkTreeViewColumn *column; ++ GtkCellRenderer *renderer; ++ GtkTreeSelection *selection; ++ GtkTargetList *targetlist; ++ ++ gtk_dialog_add_buttons (GTK_DIALOG (dialog), ++ GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE, ++ NULL); ++ ++ dialog->priv->list_store = gtk_list_store_new (NUMBER_OF_COLUMNS, ++ G_TYPE_BOOLEAN, ++ G_TYPE_BOOLEAN, ++ G_TYPE_ICON, ++ G_TYPE_STRING, ++ G_TYPE_OBJECT, ++ G_TYPE_STRING); ++ tree_filter = gtk_tree_model_filter_new (GTK_TREE_MODEL (dialog->priv->list_store), ++ NULL); ++ g_object_unref (dialog->priv->list_store); ++ dialog->priv->tree_filter = tree_filter; ++ ++ gtk_tree_model_filter_set_visible_column (GTK_TREE_MODEL_FILTER (tree_filter), ++ STORE_COL_VISIBLE); ++ ++ treeview = GTK_TREE_VIEW (gtk_builder_get_object (dialog->priv->xml, ++ CAPPLET_TREEVIEW_WIDGET_NAME)); ++ dialog->priv->treeview = treeview; ++ ++ gtk_tree_view_set_model (treeview, tree_filter); ++ g_object_unref (tree_filter); ++ ++ gtk_tree_view_set_headers_visible (treeview, FALSE); ++ g_signal_connect (treeview, ++ "row-activated", ++ G_CALLBACK (on_row_activated), ++ dialog); ++ ++ selection = gtk_tree_view_get_selection (treeview); ++ gtk_tree_selection_set_mode (selection, GTK_SELECTION_BROWSE); ++ g_signal_connect (selection, ++ "changed", ++ G_CALLBACK (on_selection_changed), ++ dialog); ++ ++ /* CHECKBOX COLUMN */ ++ renderer = gtk_cell_renderer_toggle_new (); ++ column = gtk_tree_view_column_new_with_attributes (_("Enabled"), ++ renderer, ++ "active", STORE_COL_ENABLED, ++ NULL); ++ gtk_tree_view_append_column (treeview, column); ++ g_signal_connect (renderer, ++ "toggled", ++ G_CALLBACK (on_startup_enabled_toggled), ++ dialog); ++ ++ /* ICON COLUMN */ ++ renderer = gtk_cell_renderer_pixbuf_new (); ++ column = gtk_tree_view_column_new_with_attributes (_("Icon"), ++ renderer, ++ "gicon", STORE_COL_GICON, ++ "sensitive", STORE_COL_ENABLED, ++ NULL); ++ g_object_set (renderer, ++ "stock-size", GSM_PROPERTIES_ICON_SIZE, ++ NULL); ++ gtk_tree_view_append_column (treeview, column); ++ ++ /* NAME COLUMN */ ++ renderer = gtk_cell_renderer_text_new (); ++ column = gtk_tree_view_column_new_with_attributes (_("Program"), ++ renderer, ++ "markup", STORE_COL_DESCRIPTION, ++ "sensitive", STORE_COL_ENABLED, ++ NULL); ++ g_object_set (renderer, ++ "ellipsize", PANGO_ELLIPSIZE_END, ++ NULL); ++ gtk_tree_view_append_column (treeview, column); ++ ++ ++ gtk_tree_view_column_set_sort_column_id (column, STORE_COL_DESCRIPTION); ++ gtk_tree_view_set_search_column (treeview, STORE_COL_SEARCH); ++ gtk_tree_view_set_rules_hint (treeview, TRUE); ++ ++ gtk_tree_view_enable_model_drag_source (treeview, ++ GDK_BUTTON1_MASK|GDK_BUTTON2_MASK, ++ NULL, 0, ++ GDK_ACTION_COPY); ++ gtk_drag_source_add_uri_targets (GTK_WIDGET (treeview)); ++ ++ gtk_drag_dest_set (GTK_WIDGET (treeview), ++ GTK_DEST_DEFAULT_ALL, ++ NULL, 0, ++ GDK_ACTION_COPY); ++ ++ gtk_drag_dest_add_uri_targets (GTK_WIDGET (treeview)); ++ /* we don't want to accept drags coming from this widget */ ++ targetlist = gtk_drag_dest_get_target_list (GTK_WIDGET (treeview)); ++ if (targetlist != NULL) { ++ GtkTargetEntry *targets; ++ gint n_targets; ++ gint i; ++ ++ targets = gtk_target_table_new_from_list (targetlist, &n_targets); ++ for (i = 0; i < n_targets; i++) ++ targets[i].flags = GTK_TARGET_OTHER_WIDGET; ++ ++ targetlist = gtk_target_list_new (targets, n_targets); ++ gtk_drag_dest_set_target_list (GTK_WIDGET (treeview), targetlist); ++ gtk_target_list_unref (targetlist); ++ ++ gtk_target_table_free (targets, n_targets); ++ } ++ ++ g_signal_connect (treeview, "drag_begin", ++ G_CALLBACK (on_drag_begin), ++ dialog); ++ g_signal_connect (treeview, "drag_data_get", ++ G_CALLBACK (on_drag_data_get), ++ dialog); ++ g_signal_connect (treeview, "drag_data_received", ++ G_CALLBACK (on_drag_data_received), ++ dialog); ++ ++ gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (dialog->priv->list_store), ++ STORE_COL_DESCRIPTION, ++ GTK_SORT_ASCENDING); ++ ++ ++ button = GTK_WIDGET (gtk_builder_get_object (dialog->priv->xml, ++ CAPPLET_ADD_WIDGET_NAME)); ++ dialog->priv->add_button = button; ++ g_signal_connect (button, ++ "clicked", ++ G_CALLBACK (on_add_app_clicked), ++ dialog); ++ ++ button = GTK_WIDGET (gtk_builder_get_object (dialog->priv->xml, ++ CAPPLET_DELETE_WIDGET_NAME)); ++ dialog->priv->delete_button = button; ++ g_signal_connect (button, ++ "clicked", ++ G_CALLBACK (on_delete_app_clicked), ++ dialog); ++ ++ button = GTK_WIDGET (gtk_builder_get_object (dialog->priv->xml, ++ CAPPLET_EDIT_WIDGET_NAME)); ++ dialog->priv->edit_button = button; ++ g_signal_connect (button, ++ "clicked", ++ G_CALLBACK (on_edit_app_clicked), ++ dialog); ++ ++ button = GTK_WIDGET (gtk_builder_get_object (dialog->priv->xml, ++ CAPPLET_REMEMBER_WIDGET_NAME)); ++ g_settings_bind (dialog->priv->settings, SPC_SETTINGS_AUTOSAVE_KEY, ++ button, "active", G_SETTINGS_BIND_DEFAULT); ++ ++ button = GTK_WIDGET (gtk_builder_get_object (dialog->priv->xml, ++ CAPPLET_SAVE_WIDGET_NAME)); ++ g_signal_connect (button, ++ "clicked", ++ G_CALLBACK (on_save_session_clicked), ++ dialog); ++ ++ dialog->priv->manager = gsp_app_manager_get (); ++ gsp_app_manager_fill (dialog->priv->manager); ++ g_signal_connect_swapped (dialog->priv->manager, "added", ++ G_CALLBACK (_app_added), dialog); ++ g_signal_connect_swapped (dialog->priv->manager, "removed", ++ G_CALLBACK (_app_removed), dialog); ++ ++ populate_model (dialog); ++} ++ ++static GObject * ++gsm_properties_dialog_constructor (GType type, ++ guint n_construct_properties, ++ GObjectConstructParam *construct_properties) ++{ ++ GsmPropertiesDialog *dialog; ++ ++ dialog = GSM_PROPERTIES_DIALOG (G_OBJECT_CLASS (gsm_properties_dialog_parent_class)->constructor (type, ++ n_construct_properties, ++ construct_properties)); ++ ++ setup_dialog (dialog); ++ ++ gtk_widget_show (GTK_WIDGET (dialog)); ++ ++ return G_OBJECT (dialog); ++} ++ ++static void ++gsm_properties_dialog_dispose (GObject *object) ++{ ++ GsmPropertiesDialog *dialog; ++ ++ g_return_if_fail (object != NULL); ++ g_return_if_fail (GSM_IS_PROPERTIES_DIALOG (object)); ++ ++ dialog = GSM_PROPERTIES_DIALOG (object); ++ ++ if (dialog->priv->xml != NULL) { ++ g_object_unref (dialog->priv->xml); ++ dialog->priv->xml = NULL; ++ } ++ ++ if (dialog->priv->settings != NULL) { ++ g_object_unref (dialog->priv->settings); ++ dialog->priv->settings = NULL; ++ } ++ ++ G_OBJECT_CLASS (gsm_properties_dialog_parent_class)->dispose (object); ++ ++ /* it's important to do this after chaining to the parent dispose ++ * method because we want to make sure the treeview has been disposed ++ * and removed all its references to GspApp objects */ ++ if (dialog->priv->manager != NULL) { ++ g_object_unref (dialog->priv->manager); ++ dialog->priv->manager = NULL; ++ } ++} ++ ++static void ++gsm_properties_dialog_class_init (GsmPropertiesDialogClass *klass) ++{ ++ GObjectClass *object_class = G_OBJECT_CLASS (klass); ++ ++ object_class->constructor = gsm_properties_dialog_constructor; ++ object_class->dispose = gsm_properties_dialog_dispose; ++ object_class->finalize = gsm_properties_dialog_finalize; ++ ++ g_type_class_add_private (klass, sizeof (GsmPropertiesDialogPrivate)); ++} ++ ++static void ++gsm_properties_dialog_init (GsmPropertiesDialog *dialog) ++{ ++ GtkWidget *content_area; ++ GtkWidget *widget; ++ GError *error; ++ ++ dialog->priv = GSM_PROPERTIES_DIALOG_GET_PRIVATE (dialog); ++ ++ dialog->priv->settings = g_settings_new (SPC_SETTINGS_SCHEMA); ++ ++ dialog->priv->xml = gtk_builder_new (); ++ gtk_builder_set_translation_domain (dialog->priv->xml, GETTEXT_PACKAGE); ++ ++ error = NULL; ++ if (!gtk_builder_add_from_file (dialog->priv->xml, ++ GTKBUILDER_DIR "/" GTKBUILDER_FILE, ++ &error)) { ++ if (error) { ++ g_warning ("Could not load capplet UI file: %s", ++ error->message); ++ g_error_free (error); ++ } else { ++ g_warning ("Could not load capplet UI file."); ++ } ++ } ++ ++ content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog)); ++ widget = GTK_WIDGET (gtk_builder_get_object (dialog->priv->xml, ++ "main-notebook")); ++ gtk_box_pack_start (GTK_BOX (content_area), widget, TRUE, TRUE, 0); ++ ++ gtk_window_set_default_size (GTK_WINDOW (dialog), 600, 450); ++ gtk_window_set_resizable (GTK_WINDOW (dialog), TRUE); ++ gtk_container_set_border_width (GTK_CONTAINER (dialog), 6); ++ gtk_box_set_spacing (GTK_BOX (content_area), 2); ++ gtk_window_set_icon_name (GTK_WINDOW (dialog), "session-properties"); ++ gtk_window_set_title (GTK_WINDOW (dialog), _("Startup Applications Preferences")); ++} ++ ++static void ++gsm_properties_dialog_finalize (GObject *object) ++{ ++ GsmPropertiesDialog *dialog; ++ ++ g_return_if_fail (object != NULL); ++ g_return_if_fail (GSM_IS_PROPERTIES_DIALOG (object)); ++ ++ dialog = GSM_PROPERTIES_DIALOG (object); ++ ++ g_return_if_fail (dialog->priv != NULL); ++ ++ G_OBJECT_CLASS (gsm_properties_dialog_parent_class)->finalize (object); ++} ++ ++GtkWidget * ++gsm_properties_dialog_new (void) ++{ ++ GObject *object; ++ ++ object = g_object_new (GSM_TYPE_PROPERTIES_DIALOG, ++ NULL); ++ ++ return GTK_WIDGET (object); ++} +diff --git a/capplet/gsm-properties-dialog.h b/capplet/gsm-properties-dialog.h +new file mode 100644 +index 0000000..df4915e +--- /dev/null ++++ b/capplet/gsm-properties-dialog.h +@@ -0,0 +1,57 @@ ++/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- ++ * ++ * Copyright (C) 2008 William Jon McCann ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ++ * ++ */ ++ ++#ifndef __GSM_PROPERTIES_DIALOG_H ++#define __GSM_PROPERTIES_DIALOG_H ++ ++#include ++#include ++ ++G_BEGIN_DECLS ++ ++#define GSM_TYPE_PROPERTIES_DIALOG (gsm_properties_dialog_get_type ()) ++#define GSM_PROPERTIES_DIALOG(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSM_TYPE_PROPERTIES_DIALOG, GsmPropertiesDialog)) ++#define GSM_PROPERTIES_DIALOG_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GSM_TYPE_PROPERTIES_DIALOG, GsmPropertiesDialogClass)) ++#define GSM_IS_PROPERTIES_DIALOG(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSM_TYPE_PROPERTIES_DIALOG)) ++#define GSM_IS_PROPERTIES_DIALOG_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GSM_TYPE_PROPERTIES_DIALOG)) ++#define GSM_PROPERTIES_DIALOG_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GSM_TYPE_PROPERTIES_DIALOG, GsmPropertiesDialogClass)) ++ ++typedef struct GsmPropertiesDialogPrivate GsmPropertiesDialogPrivate; ++ ++typedef struct ++{ ++ GtkDialog parent; ++ GsmPropertiesDialogPrivate *priv; ++} GsmPropertiesDialog; ++ ++typedef struct ++{ ++ GtkDialogClass parent_class; ++} GsmPropertiesDialogClass; ++ ++GType gsm_properties_dialog_get_type (void); ++ ++GtkWidget * gsm_properties_dialog_new (void); ++ ++#define GSM_PROPERTIES_ICON_SIZE GTK_ICON_SIZE_LARGE_TOOLBAR ++ ++G_END_DECLS ++ ++#endif /* __GSM_PROPERTIES_DIALOG_H */ +diff --git a/capplet/gsp-app-manager.c b/capplet/gsp-app-manager.c +new file mode 100644 +index 0000000..bcd6d40 +--- /dev/null ++++ b/capplet/gsp-app-manager.c +@@ -0,0 +1,593 @@ ++/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- ++ * ++ * Copyright (C) 1999 Free Software Foundation, Inc. ++ * Copyright (C) 2007, 2009 Vincent Untz. ++ * Copyright (C) 2008 Lucas Rocha. ++ * Copyright (C) 2008 William Jon McCann ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ++ * ++ */ ++ ++#include ++ ++#include "gsm-util.h" ++#include "gsp-app.h" ++ ++#include "gsp-app-manager.h" ++ ++static GspAppManager *manager = NULL; ++ ++typedef struct { ++ char *dir; ++ int index; ++ GFileMonitor *monitor; ++} GspXdgDir; ++ ++struct _GspAppManagerPrivate { ++ GSList *apps; ++ GSList *dirs; ++}; ++ ++#define GSP_APP_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GSP_TYPE_APP_MANAGER, GspAppManagerPrivate)) ++ ++ ++enum { ++ ADDED, ++ REMOVED, ++ LAST_SIGNAL ++}; ++ ++static guint gsp_app_manager_signals[LAST_SIGNAL] = { 0 }; ++ ++ ++G_DEFINE_TYPE (GspAppManager, gsp_app_manager, G_TYPE_OBJECT) ++ ++static void gsp_app_manager_dispose (GObject *object); ++static void gsp_app_manager_finalize (GObject *object); ++static void _gsp_app_manager_app_unref (GspApp *app, ++ GspAppManager *manager); ++static void _gsp_app_manager_app_removed (GspAppManager *manager, ++ GspApp *app); ++ ++static GspXdgDir * ++_gsp_xdg_dir_new (const char *dir, ++ int index) ++{ ++ GspXdgDir *xdgdir; ++ ++ xdgdir = g_slice_new (GspXdgDir); ++ ++ xdgdir->dir = g_strdup (dir); ++ xdgdir->index = index; ++ xdgdir->monitor = NULL; ++ ++ return xdgdir; ++} ++ ++static void ++_gsp_xdg_dir_free (GspXdgDir *xdgdir) ++{ ++ if (xdgdir->dir) { ++ g_free (xdgdir->dir); ++ xdgdir->dir = NULL; ++ } ++ ++ if (xdgdir->monitor) { ++ g_file_monitor_cancel (xdgdir->monitor); ++ g_object_unref (xdgdir->monitor); ++ xdgdir->monitor = NULL; ++ } ++ ++ g_slice_free (GspXdgDir, xdgdir); ++} ++ ++static void ++gsp_app_manager_class_init (GspAppManagerClass *class) ++{ ++ GObjectClass *gobject_class = G_OBJECT_CLASS (class); ++ ++ gobject_class->dispose = gsp_app_manager_dispose; ++ gobject_class->finalize = gsp_app_manager_finalize; ++ ++ gsp_app_manager_signals[ADDED] = ++ g_signal_new ("added", ++ G_TYPE_FROM_CLASS (gobject_class), ++ G_SIGNAL_RUN_LAST, ++ G_STRUCT_OFFSET (GspAppManagerClass, ++ added), ++ NULL, ++ NULL, ++ g_cclosure_marshal_VOID__OBJECT, ++ G_TYPE_NONE, 1, G_TYPE_OBJECT); ++ ++ gsp_app_manager_signals[REMOVED] = ++ g_signal_new ("removed", ++ G_TYPE_FROM_CLASS (gobject_class), ++ G_SIGNAL_RUN_LAST, ++ G_STRUCT_OFFSET (GspAppManagerClass, ++ removed), ++ NULL, ++ NULL, ++ g_cclosure_marshal_VOID__OBJECT, ++ G_TYPE_NONE, 1, G_TYPE_OBJECT); ++ ++ g_type_class_add_private (class, sizeof (GspAppManagerPrivate)); ++} ++ ++static void ++gsp_app_manager_init (GspAppManager *manager) ++{ ++ manager->priv = GSP_APP_MANAGER_GET_PRIVATE (manager); ++ ++ memset (manager->priv, 0, sizeof (GspAppManagerPrivate)); ++} ++ ++static void ++gsp_app_manager_dispose (GObject *object) ++{ ++ GspAppManager *manager; ++ ++ g_return_if_fail (object != NULL); ++ g_return_if_fail (GSP_IS_APP_MANAGER (object)); ++ ++ manager = GSP_APP_MANAGER (object); ++ ++ /* we unref GspApp objects in dispose since they might need to ++ * reference us during their dispose/finalize */ ++ g_slist_foreach (manager->priv->apps, ++ (GFunc) _gsp_app_manager_app_unref, manager); ++ g_slist_free (manager->priv->apps); ++ manager->priv->apps = NULL; ++ ++ G_OBJECT_CLASS (gsp_app_manager_parent_class)->dispose (object); ++} ++ ++static void ++gsp_app_manager_finalize (GObject *object) ++{ ++ GspAppManager *manager; ++ ++ g_return_if_fail (object != NULL); ++ g_return_if_fail (GSP_IS_APP_MANAGER (object)); ++ ++ manager = GSP_APP_MANAGER (object); ++ ++ g_slist_foreach (manager->priv->dirs, ++ (GFunc) _gsp_xdg_dir_free, NULL); ++ g_slist_free (manager->priv->dirs); ++ manager->priv->dirs = NULL; ++ ++ G_OBJECT_CLASS (gsp_app_manager_parent_class)->finalize (object); ++ ++ manager = NULL; ++} ++ ++static void ++_gsp_app_manager_emit_added (GspAppManager *manager, ++ GspApp *app) ++{ ++ g_signal_emit (G_OBJECT (manager), gsp_app_manager_signals[ADDED], ++ 0, app); ++} ++ ++static void ++_gsp_app_manager_emit_removed (GspAppManager *manager, ++ GspApp *app) ++{ ++ g_signal_emit (G_OBJECT (manager), gsp_app_manager_signals[REMOVED], ++ 0, app); ++} ++ ++/* ++ * Directories ++ */ ++ ++static int ++gsp_app_manager_get_dir_index (GspAppManager *manager, ++ const char *dir) ++{ ++ GSList *l; ++ GspXdgDir *xdgdir; ++ ++ g_return_val_if_fail (GSP_IS_APP_MANAGER (manager), -1); ++ g_return_val_if_fail (dir != NULL, -1); ++ ++ for (l = manager->priv->dirs; l != NULL; l = l->next) { ++ xdgdir = l->data; ++ if (strcmp (dir, xdgdir->dir) == 0) { ++ return xdgdir->index; ++ } ++ } ++ ++ return -1; ++} ++ ++const char * ++gsp_app_manager_get_dir (GspAppManager *manager, ++ unsigned int index) ++{ ++ GSList *l; ++ GspXdgDir *xdgdir; ++ ++ g_return_val_if_fail (GSP_IS_APP_MANAGER (manager), NULL); ++ ++ for (l = manager->priv->dirs; l != NULL; l = l->next) { ++ xdgdir = l->data; ++ if (index == xdgdir->index) { ++ return xdgdir->dir; ++ } ++ } ++ ++ return NULL; ++} ++ ++static int ++_gsp_app_manager_find_dir_with_basename (GspAppManager *manager, ++ const char *basename, ++ int minimum_index) ++{ ++ GSList *l; ++ GspXdgDir *xdgdir; ++ char *path; ++ GKeyFile *keyfile; ++ int result = -1; ++ ++ path = NULL; ++ keyfile = g_key_file_new (); ++ ++ for (l = manager->priv->dirs; l != NULL; l = l->next) { ++ xdgdir = l->data; ++ ++ if (xdgdir->index <= minimum_index) { ++ continue; ++ } ++ ++ g_free (path); ++ path = g_build_filename (xdgdir->dir, basename, NULL); ++ if (!g_file_test (path, G_FILE_TEST_EXISTS)) { ++ continue; ++ } ++ ++ if (!g_key_file_load_from_file (keyfile, path, ++ G_KEY_FILE_NONE, NULL)) { ++ continue; ++ } ++ ++ /* the file exists and is readable */ ++ if (result == -1) { ++ result = xdgdir->index; ++ } else { ++ result = MIN (result, xdgdir->index); ++ } ++ } ++ ++ g_key_file_free (keyfile); ++ g_free (path); ++ ++ return result; ++} ++ ++static void ++_gsp_app_manager_handle_delete (GspAppManager *manager, ++ GspApp *app, ++ const char *basename, ++ int index) ++{ ++ unsigned int position; ++ unsigned int system_position; ++ ++ position = gsp_app_get_xdg_position (app); ++ system_position = gsp_app_get_xdg_system_position (app); ++ ++ if (system_position < index) { ++ /* it got deleted, but we don't even care about it */ ++ return; ++ } ++ ++ if (index < position) { ++ /* it got deleted, but in a position earlier than the current ++ * one. This happens when the user file was changed and became ++ * identical to the system file; in this case, the user file is ++ * simply removed. */ ++ g_assert (index == 0); ++ return; ++ } ++ ++ if (position == index && ++ (system_position == index || system_position == G_MAXUINT)) { ++ /* the file used by the user was deleted, and there's no other ++ * file in system directories. So it really got deleted. */ ++ _gsp_app_manager_app_removed (manager, app); ++ return; ++ } ++ ++ if (system_position == index) { ++ /* then we know that position != index; we just hae to tell ++ * GspApp if there's still a system directory containing this ++ * basename */ ++ int new_system; ++ ++ new_system = _gsp_app_manager_find_dir_with_basename (manager, ++ basename, ++ index); ++ if (new_system < 0) { ++ gsp_app_set_xdg_system_position (app, G_MAXUINT); ++ } else { ++ gsp_app_set_xdg_system_position (app, new_system); ++ } ++ ++ return; ++ } ++ ++ if (position == index) { ++ /* then we know that system_position != G_MAXUINT; we need to ++ * tell GspApp to change position to system_position */ ++ const char *dir; ++ ++ dir = gsp_app_manager_get_dir (manager, system_position); ++ if (dir) { ++ char *path; ++ ++ path = g_build_filename (dir, basename, NULL); ++ gsp_app_reload_at (app, path, ++ (unsigned int) system_position); ++ g_free (path); ++ } else { ++ _gsp_app_manager_app_removed (manager, app); ++ } ++ ++ return; ++ } ++ ++ g_assert_not_reached (); ++} ++ ++static gboolean ++gsp_app_manager_xdg_dir_monitor (GFileMonitor *monitor, ++ GFile *child, ++ GFile *other_file, ++ GFileMonitorEvent flags, ++ gpointer data) ++{ ++ GspAppManager *manager; ++ GspApp *old_app; ++ GspApp *app; ++ GFile *parent; ++ char *basename; ++ char *dir; ++ char *path; ++ int index; ++ ++ manager = GSP_APP_MANAGER (data); ++ ++ basename = g_file_get_basename (child); ++ if (!g_str_has_suffix (basename, ".desktop")) { ++ /* not a desktop file, we can ignore */ ++ g_free (basename); ++ return TRUE; ++ } ++ old_app = gsp_app_manager_find_app_with_basename (manager, basename); ++ ++ parent = g_file_get_parent (child); ++ dir = g_file_get_path (parent); ++ g_object_unref (parent); ++ ++ index = gsp_app_manager_get_dir_index (manager, dir); ++ if (index < 0) { ++ /* not a directory we know; should never happen, though */ ++ g_free (dir); ++ return TRUE; ++ } ++ ++ path = g_file_get_path (child); ++ ++ switch (flags) { ++ case G_FILE_MONITOR_EVENT_CHANGED: ++ case G_FILE_MONITOR_EVENT_CREATED: ++ /* we just do as if it was a new file: GspApp is clever enough ++ * to do the right thing */ ++ app = gsp_app_new (path, (unsigned int) index); ++ ++ /* we didn't have this app before, so add it */ ++ if (old_app == NULL && app != NULL) { ++ gsp_app_manager_add (manager, app); ++ g_object_unref (app); ++ } ++ /* else: it was just updated, GspApp took care of ++ * sending the event */ ++ break; ++ case G_FILE_MONITOR_EVENT_DELETED: ++ if (!old_app) { ++ /* it got deleted, but we don't know about it, so ++ * nothing to do */ ++ break; ++ } ++ ++ _gsp_app_manager_handle_delete (manager, old_app, ++ basename, index); ++ break; ++ default: ++ break; ++ } ++ ++ g_free (path); ++ g_free (dir); ++ g_free (basename); ++ ++ return TRUE; ++} ++ ++/* ++ * Initialization ++ */ ++ ++static void ++_gsp_app_manager_fill_from_dir (GspAppManager *manager, ++ GspXdgDir *xdgdir) ++{ ++ GFile *file; ++ GDir *dir; ++ const char *name; ++ ++ file = g_file_new_for_path (xdgdir->dir); ++ xdgdir->monitor = g_file_monitor_directory (file, G_FILE_MONITOR_NONE, ++ NULL, NULL); ++ g_object_unref (file); ++ ++ if (xdgdir->monitor) { ++ g_signal_connect (xdgdir->monitor, "changed", ++ G_CALLBACK (gsp_app_manager_xdg_dir_monitor), ++ manager); ++ } ++ ++ dir = g_dir_open (xdgdir->dir, 0, NULL); ++ if (!dir) { ++ return; ++ } ++ ++ while ((name = g_dir_read_name (dir))) { ++ GspApp *app; ++ char *desktop_file_path; ++ ++ if (!g_str_has_suffix (name, ".desktop")) { ++ continue; ++ } ++ ++ desktop_file_path = g_build_filename (xdgdir->dir, name, NULL); ++ app = gsp_app_new (desktop_file_path, xdgdir->index); ++ ++ if (app != NULL) { ++ gsp_app_manager_add (manager, app); ++ g_object_unref (app); ++ } ++ ++ g_free (desktop_file_path); ++ } ++ ++ g_dir_close (dir); ++} ++ ++void ++gsp_app_manager_fill (GspAppManager *manager) ++{ ++ char **autostart_dirs; ++ int i; ++ ++ if (manager->priv->apps != NULL) ++ return; ++ ++ autostart_dirs = gsm_util_get_autostart_dirs (); ++ /* we always assume that the first directory is the user one */ ++ g_assert (g_str_has_prefix (autostart_dirs[0], ++ g_get_user_config_dir ())); ++ ++ for (i = 0; autostart_dirs[i] != NULL; i++) { ++ GspXdgDir *xdgdir; ++ ++ if (gsp_app_manager_get_dir_index (manager, ++ autostart_dirs[i]) >= 0) { ++ continue; ++ } ++ ++ xdgdir = _gsp_xdg_dir_new (autostart_dirs[i], i); ++ manager->priv->dirs = g_slist_prepend (manager->priv->dirs, ++ xdgdir); ++ ++ _gsp_app_manager_fill_from_dir (manager, xdgdir); ++ } ++ ++ g_strfreev (autostart_dirs); ++} ++ ++/* ++ * App handling ++ */ ++ ++static void ++_gsp_app_manager_app_unref (GspApp *app, ++ GspAppManager *manager) ++{ ++ g_signal_handlers_disconnect_by_func (app, ++ _gsp_app_manager_app_removed, ++ manager); ++ g_object_unref (app); ++} ++ ++static void ++_gsp_app_manager_app_removed (GspAppManager *manager, ++ GspApp *app) ++{ ++ _gsp_app_manager_emit_removed (manager, app); ++ manager->priv->apps = g_slist_remove (manager->priv->apps, app); ++ _gsp_app_manager_app_unref (app, manager); ++} ++ ++void ++gsp_app_manager_add (GspAppManager *manager, ++ GspApp *app) ++{ ++ g_return_if_fail (GSP_IS_APP_MANAGER (manager)); ++ g_return_if_fail (GSP_IS_APP (app)); ++ ++ manager->priv->apps = g_slist_prepend (manager->priv->apps, ++ g_object_ref (app)); ++ g_signal_connect_swapped (app, "removed", ++ G_CALLBACK (_gsp_app_manager_app_removed), ++ manager); ++ _gsp_app_manager_emit_added (manager, app); ++} ++ ++GspApp * ++gsp_app_manager_find_app_with_basename (GspAppManager *manager, ++ const char *basename) ++{ ++ GSList *l; ++ GspApp *app; ++ ++ g_return_val_if_fail (GSP_IS_APP_MANAGER (manager), NULL); ++ g_return_val_if_fail (basename != NULL, NULL); ++ ++ for (l = manager->priv->apps; l != NULL; l = l->next) { ++ app = GSP_APP (l->data); ++ if (strcmp (basename, gsp_app_get_basename (app)) == 0) ++ return app; ++ } ++ ++ return NULL; ++} ++ ++/* ++ * Singleton ++ */ ++ ++GspAppManager * ++gsp_app_manager_get (void) ++{ ++ if (manager == NULL) { ++ manager = g_object_new (GSP_TYPE_APP_MANAGER, NULL); ++ return manager; ++ } else { ++ return g_object_ref (manager); ++ } ++} ++ ++GSList * ++gsp_app_manager_get_apps (GspAppManager *manager) ++{ ++ g_return_val_if_fail (GSP_IS_APP_MANAGER (manager), NULL); ++ ++ return g_slist_copy (manager->priv->apps); ++} +diff --git a/capplet/gsp-app-manager.h b/capplet/gsp-app-manager.h +new file mode 100644 +index 0000000..777f8d6 +--- /dev/null ++++ b/capplet/gsp-app-manager.h +@@ -0,0 +1,81 @@ ++/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- ++ * ++ * Copyright (C) 1999 Free Software Foundation, Inc. ++ * Copyright (C) 2007, 2009 Vincent Untz. ++ * Copyright (C) 2008 Lucas Rocha. ++ * Copyright (C) 2008 William Jon McCann ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ++ * ++ */ ++ ++#ifndef __GSP_APP_MANAGER_H ++#define __GSP_APP_MANAGER_H ++ ++#include ++ ++#include ++ ++G_BEGIN_DECLS ++ ++#define GSP_TYPE_APP_MANAGER (gsp_app_manager_get_type ()) ++#define GSP_APP_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GSP_TYPE_APP_MANAGER, GspAppManager)) ++#define GSP_APP_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GSP_TYPE_APP_MANAGER, GspAppManagerClass)) ++#define GSP_IS_APP_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GSP_TYPE_APP_MANAGER)) ++#define GSP_IS_APP_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GSP_TYPE_APP_MANAGER)) ++#define GSP_APP_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GSP_TYPE_APP_MANAGER, GspAppManagerClass)) ++ ++typedef struct _GspAppManager GspAppManager; ++typedef struct _GspAppManagerClass GspAppManagerClass; ++ ++typedef struct _GspAppManagerPrivate GspAppManagerPrivate; ++ ++struct _GspAppManagerClass ++{ ++ GObjectClass parent_class; ++ ++ void (* added) (GspAppManager *manager, ++ GspApp *app); ++ void (* removed) (GspAppManager *manager, ++ GspApp *app); ++}; ++ ++struct _GspAppManager ++{ ++ GObject parent_instance; ++ ++ GspAppManagerPrivate *priv; ++}; ++ ++GType gsp_app_manager_get_type (void); ++ ++GspAppManager *gsp_app_manager_get (void); ++ ++void gsp_app_manager_fill (GspAppManager *manager); ++ ++GSList *gsp_app_manager_get_apps (GspAppManager *manager); ++ ++GspApp *gsp_app_manager_find_app_with_basename (GspAppManager *manager, ++ const char *basename); ++ ++const char *gsp_app_manager_get_dir (GspAppManager *manager, ++ unsigned int index); ++ ++void gsp_app_manager_add (GspAppManager *manager, ++ GspApp *app); ++ ++G_END_DECLS ++ ++#endif /* __GSP_APP_MANAGER_H */ +diff --git a/capplet/gsp-app.c b/capplet/gsp-app.c +new file mode 100644 +index 0000000..c92b8da +--- /dev/null ++++ b/capplet/gsp-app.c +@@ -0,0 +1,1102 @@ ++/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- ++ * ++ * Copyright (C) 1999 Free Software Foundation, Inc. ++ * Copyright (C) 2007, 2009 Vincent Untz. ++ * Copyright (C) 2008 Lucas Rocha. ++ * Copyright (C) 2008 William Jon McCann ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ++ * ++ */ ++ ++#ifdef HAVE_CONFIG_H ++#include ++#endif ++ ++#include ++#include ++ ++#include ++#include ++ ++#include "gsm-app-dialog.h" ++#include "gsm-properties-dialog.h" ++#include "gsm-util.h" ++#include "gsp-app-manager.h" ++#include "gsp-keyfile.h" ++ ++#include "gsp-app.h" ++ ++#define GSP_APP_SAVE_DELAY 2 ++ ++#define GSP_ASP_SAVE_MASK_HIDDEN 0x0001 ++#define GSP_ASP_SAVE_MASK_ENABLED 0x0002 ++#define GSP_ASP_SAVE_MASK_NAME 0x0004 ++#define GSP_ASP_SAVE_MASK_EXEC 0x0008 ++#define GSP_ASP_SAVE_MASK_COMMENT 0x0010 ++#define GSP_ASP_SAVE_MASK_NO_DISPLAY 0x0020 ++#define GSP_ASP_SAVE_MASK_ALL 0xffff ++ ++struct _GspAppPrivate { ++ char *basename; ++ char *path; ++ ++ gboolean hidden; ++ gboolean no_display; ++ gboolean enabled; ++ gboolean shown; ++ ++ char *name; ++ char *exec; ++ char *comment; ++ char *icon; ++ ++ GIcon *gicon; ++ char *description; ++ ++ /* position of the directory in the XDG environment variable */ ++ unsigned int xdg_position; ++ /* position of the first system directory in the XDG env var containing ++ * this autostart app too (G_MAXUINT means none) */ ++ unsigned int xdg_system_position; ++ ++ unsigned int save_timeout; ++ /* mask of what has changed */ ++ unsigned int save_mask; ++ /* path that contains the original file that needs to be saved */ ++ char *old_system_path; ++ /* after writing to file, we skip the next file monitor event of type ++ * CHANGED */ ++ gboolean skip_next_monitor_event; ++}; ++ ++#define GSP_APP_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GSP_TYPE_APP, GspAppPrivate)) ++ ++ ++enum { ++ CHANGED, ++ REMOVED, ++ LAST_SIGNAL ++}; ++ ++static guint gsp_app_signals[LAST_SIGNAL] = { 0 }; ++ ++ ++G_DEFINE_TYPE (GspApp, gsp_app, G_TYPE_OBJECT) ++ ++static void gsp_app_dispose (GObject *object); ++static void gsp_app_finalize (GObject *object); ++static gboolean _gsp_app_save (gpointer data); ++ ++ ++static gboolean ++_gsp_str_equal (const char *a, ++ const char *b) ++{ ++ if (g_strcmp0 (a, b) == 0) { ++ return TRUE; ++ } ++ ++ if (a && !b && a[0] == '\0') { ++ return TRUE; ++ } ++ ++ if (b && !a && b[0] == '\0') { ++ return TRUE; ++ } ++ ++ return FALSE; ++} ++ ++ ++static void ++gsp_app_class_init (GspAppClass *class) ++{ ++ GObjectClass *gobject_class = G_OBJECT_CLASS (class); ++ ++ gobject_class->dispose = gsp_app_dispose; ++ gobject_class->finalize = gsp_app_finalize; ++ ++ gsp_app_signals[CHANGED] = ++ g_signal_new ("changed", ++ G_TYPE_FROM_CLASS (gobject_class), ++ G_SIGNAL_RUN_LAST, ++ G_STRUCT_OFFSET (GspAppClass, ++ changed), ++ NULL, ++ NULL, ++ g_cclosure_marshal_VOID__VOID, ++ G_TYPE_NONE, 0); ++ ++ gsp_app_signals[REMOVED] = ++ g_signal_new ("removed", ++ G_TYPE_FROM_CLASS (gobject_class), ++ G_SIGNAL_RUN_LAST, ++ G_STRUCT_OFFSET (GspAppClass, ++ removed), ++ NULL, ++ NULL, ++ g_cclosure_marshal_VOID__VOID, ++ G_TYPE_NONE, 0); ++ ++ g_type_class_add_private (class, sizeof (GspAppPrivate)); ++} ++ ++static void ++gsp_app_init (GspApp *app) ++{ ++ app->priv = GSP_APP_GET_PRIVATE (app); ++ ++ memset (app->priv, 0, sizeof (GspAppPrivate)); ++ app->priv->xdg_position = G_MAXUINT; ++ app->priv->xdg_system_position = G_MAXUINT; ++} ++ ++static void ++_gsp_app_free_reusable_data (GspApp *app) ++{ ++ if (app->priv->path) { ++ g_free (app->priv->path); ++ app->priv->path = NULL; ++ } ++ ++ if (app->priv->name) { ++ g_free (app->priv->name); ++ app->priv->name = NULL; ++ } ++ ++ if (app->priv->exec) { ++ g_free (app->priv->exec); ++ app->priv->exec = NULL; ++ } ++ ++ if (app->priv->comment) { ++ g_free (app->priv->comment); ++ app->priv->comment = NULL; ++ } ++ ++ if (app->priv->icon) { ++ g_free (app->priv->icon); ++ app->priv->icon = NULL; ++ } ++ ++ if (app->priv->gicon) { ++ g_object_unref (app->priv->gicon); ++ app->priv->gicon = NULL; ++ } ++ ++ if (app->priv->description) { ++ g_free (app->priv->description); ++ app->priv->description = NULL; ++ } ++ ++ if (app->priv->old_system_path) { ++ g_free (app->priv->old_system_path); ++ app->priv->old_system_path = NULL; ++ } ++} ++ ++static void ++gsp_app_dispose (GObject *object) ++{ ++ GspApp *app; ++ ++ g_return_if_fail (object != NULL); ++ g_return_if_fail (GSP_IS_APP (object)); ++ ++ app = GSP_APP (object); ++ ++ /* we save in dispose since we might need to reference GspAppManager */ ++ if (app->priv->save_timeout) { ++ g_source_remove (app->priv->save_timeout); ++ app->priv->save_timeout = 0; ++ ++ /* save now */ ++ _gsp_app_save (app); ++ } ++ ++ G_OBJECT_CLASS (gsp_app_parent_class)->dispose (object); ++} ++ ++static void ++gsp_app_finalize (GObject *object) ++{ ++ GspApp *app; ++ ++ g_return_if_fail (object != NULL); ++ g_return_if_fail (GSP_IS_APP (object)); ++ ++ app = GSP_APP (object); ++ ++ if (app->priv->basename) { ++ g_free (app->priv->basename); ++ app->priv->basename = NULL; ++ } ++ ++ _gsp_app_free_reusable_data (app); ++ ++ G_OBJECT_CLASS (gsp_app_parent_class)->finalize (object); ++} ++ ++static void ++_gsp_app_emit_changed (GspApp *app) ++{ ++ g_signal_emit (G_OBJECT (app), gsp_app_signals[CHANGED], 0); ++} ++ ++static void ++_gsp_app_emit_removed (GspApp *app) ++{ ++ g_signal_emit (G_OBJECT (app), gsp_app_signals[REMOVED], 0); ++} ++ ++static void ++_gsp_app_update_description (GspApp *app) ++{ ++ const char *primary; ++ const char *secondary; ++ ++ if (!gsm_util_text_is_blank (app->priv->name)) { ++ primary = app->priv->name; ++ } else if (!gsm_util_text_is_blank (app->priv->exec)) { ++ primary = app->priv->exec; ++ } else { ++ primary = _("No name"); ++ } ++ ++ if (!gsm_util_text_is_blank (app->priv->comment)) { ++ secondary = app->priv->comment; ++ } else { ++ secondary = _("No description"); ++ } ++ ++ g_free (app->priv->description); ++ app->priv->description = g_markup_printf_escaped ("%s\n%s", ++ primary, ++ secondary); ++} ++ ++/* ++ * Saving ++ */ ++ ++static void ++_gsp_ensure_user_autostart_dir (void) ++{ ++ char *dir; ++ ++ dir = g_build_filename (g_get_user_config_dir (), "autostart", NULL); ++ g_mkdir_with_parents (dir, S_IRWXU); ++ ++ g_free (dir); ++} ++ ++static gboolean ++_gsp_app_user_equal_system (GspApp *app, ++ char **system_path) ++{ ++ GspAppManager *manager; ++ const char *system_dir; ++ char *path; ++ char *str; ++ GKeyFile *keyfile; ++ ++ manager = gsp_app_manager_get (); ++ system_dir = gsp_app_manager_get_dir (manager, ++ app->priv->xdg_system_position); ++ g_object_unref (manager); ++ if (!system_dir) { ++ return FALSE; ++ } ++ ++ path = g_build_filename (system_dir, app->priv->basename, NULL); ++ ++ keyfile = g_key_file_new (); ++ if (!g_key_file_load_from_file (keyfile, path, G_KEY_FILE_NONE, NULL)) { ++ g_free (path); ++ g_key_file_free (keyfile); ++ return FALSE; ++ } ++ ++ if (gsp_key_file_get_boolean (keyfile, ++ G_KEY_FILE_DESKTOP_KEY_HIDDEN, ++ FALSE) != app->priv->hidden || ++ gsp_key_file_get_boolean (keyfile, ++ GSP_KEY_FILE_DESKTOP_KEY_AUTOSTART_ENABLED, ++ TRUE) != app->priv->enabled || ++ gsp_key_file_get_shown (keyfile, ++ gsm_util_get_current_desktop ()) != app->priv->shown) { ++ g_free (path); ++ g_key_file_free (keyfile); ++ return FALSE; ++ } ++ ++ if (gsp_key_file_get_boolean (keyfile, ++ G_KEY_FILE_DESKTOP_KEY_NO_DISPLAY, ++ FALSE) != app->priv->no_display) { ++ g_free (path); ++ g_key_file_free (keyfile); ++ return FALSE; ++ } ++ ++ str = gsp_key_file_get_locale_string (keyfile, ++ G_KEY_FILE_DESKTOP_KEY_NAME); ++ if (!_gsp_str_equal (str, app->priv->name)) { ++ g_free (str); ++ g_free (path); ++ g_key_file_free (keyfile); ++ return FALSE; ++ } ++ g_free (str); ++ ++ str = gsp_key_file_get_locale_string (keyfile, ++ G_KEY_FILE_DESKTOP_KEY_COMMENT); ++ if (!_gsp_str_equal (str, app->priv->comment)) { ++ g_free (str); ++ g_free (path); ++ g_key_file_free (keyfile); ++ return FALSE; ++ } ++ g_free (str); ++ ++ str = gsp_key_file_get_string (keyfile, ++ G_KEY_FILE_DESKTOP_KEY_EXEC); ++ if (!_gsp_str_equal (str, app->priv->exec)) { ++ g_free (str); ++ g_free (path); ++ g_key_file_free (keyfile); ++ return FALSE; ++ } ++ g_free (str); ++ ++ str = gsp_key_file_get_locale_string (keyfile, ++ G_KEY_FILE_DESKTOP_KEY_ICON); ++ if (!_gsp_str_equal (str, app->priv->icon)) { ++ g_free (str); ++ g_free (path); ++ g_key_file_free (keyfile); ++ return FALSE; ++ } ++ g_free (str); ++ ++ g_key_file_free (keyfile); ++ ++ *system_path = path; ++ ++ return TRUE; ++} ++ ++static inline void ++_gsp_app_save_done_success (GspApp *app) ++{ ++ app->priv->save_mask = 0; ++ ++ if (app->priv->old_system_path) { ++ g_free (app->priv->old_system_path); ++ app->priv->old_system_path = NULL; ++ } ++} ++ ++static gboolean ++_gsp_app_save (gpointer data) ++{ ++ GspApp *app; ++ char *use_path; ++ GKeyFile *keyfile; ++ GError *error; ++ ++ app = GSP_APP (data); ++ ++ /* first check if removing the data from the user dir and using the ++ * data from the system dir is enough -- this helps us keep clean the ++ * user config dir by removing unneeded files */ ++ if (_gsp_app_user_equal_system (app, &use_path)) { ++ if (g_file_test (app->priv->path, G_FILE_TEST_EXISTS)) { ++ g_remove (app->priv->path); ++ } ++ ++ g_free (app->priv->path); ++ app->priv->path = use_path; ++ ++ app->priv->xdg_position = app->priv->xdg_system_position; ++ ++ _gsp_app_save_done_success (app); ++ return FALSE; ++ } ++ ++ if (app->priv->old_system_path) ++ use_path = app->priv->old_system_path; ++ else ++ use_path = app->priv->path; ++ ++ keyfile = g_key_file_new (); ++ ++ error = NULL; ++ g_key_file_load_from_file (keyfile, use_path, ++ G_KEY_FILE_KEEP_COMMENTS|G_KEY_FILE_KEEP_TRANSLATIONS, ++ &error); ++ ++ if (error) { ++ g_error_free (error); ++ gsp_key_file_populate (keyfile); ++ } ++ ++ if (app->priv->save_mask & GSP_ASP_SAVE_MASK_HIDDEN) { ++ gsp_key_file_set_boolean (keyfile, ++ G_KEY_FILE_DESKTOP_KEY_HIDDEN, ++ app->priv->hidden); ++ } ++ ++ if (app->priv->save_mask & GSP_ASP_SAVE_MASK_NO_DISPLAY) { ++ gsp_key_file_set_boolean (keyfile, ++ G_KEY_FILE_DESKTOP_KEY_NO_DISPLAY, ++ app->priv->no_display); ++ } ++ ++ if (app->priv->save_mask & GSP_ASP_SAVE_MASK_ENABLED) { ++ gsp_key_file_set_boolean (keyfile, ++ GSP_KEY_FILE_DESKTOP_KEY_AUTOSTART_ENABLED, ++ app->priv->enabled); ++ } ++ ++ if (app->priv->save_mask & GSP_ASP_SAVE_MASK_NAME) { ++ gsp_key_file_set_locale_string (keyfile, ++ G_KEY_FILE_DESKTOP_KEY_NAME, ++ app->priv->name); ++ gsp_key_file_ensure_C_key (keyfile, G_KEY_FILE_DESKTOP_KEY_NAME); ++ } ++ ++ if (app->priv->save_mask & GSP_ASP_SAVE_MASK_COMMENT) { ++ gsp_key_file_set_locale_string (keyfile, ++ G_KEY_FILE_DESKTOP_KEY_COMMENT, ++ app->priv->comment); ++ gsp_key_file_ensure_C_key (keyfile, G_KEY_FILE_DESKTOP_KEY_COMMENT); ++ } ++ ++ if (app->priv->save_mask & GSP_ASP_SAVE_MASK_EXEC) { ++ gsp_key_file_set_string (keyfile, ++ G_KEY_FILE_DESKTOP_KEY_EXEC, ++ app->priv->exec); ++ } ++ ++ _gsp_ensure_user_autostart_dir (); ++ if (gsp_key_file_to_file (keyfile, app->priv->path, NULL)) { ++ app->priv->skip_next_monitor_event = TRUE; ++ _gsp_app_save_done_success (app); ++ } else { ++ g_warning ("Could not save %s file", app->priv->path); ++ } ++ ++ g_key_file_free (keyfile); ++ ++ app->priv->save_timeout = 0; ++ return FALSE; ++} ++ ++static void ++_gsp_app_queue_save (GspApp *app) ++{ ++ if (app->priv->save_timeout) { ++ g_source_remove (app->priv->save_timeout); ++ app->priv->save_timeout = 0; ++ } ++ ++ /* if the file was not in the user directory, then we'll create a copy ++ * there */ ++ if (app->priv->xdg_position != 0) { ++ app->priv->xdg_position = 0; ++ ++ if (app->priv->old_system_path == NULL) { ++ app->priv->old_system_path = app->priv->path; ++ /* if old_system_path was not NULL, then it means we ++ * tried to save and we failed; in that case, we want ++ * to try again and use the old file as a basis again */ ++ } ++ ++ app->priv->path = g_build_filename (g_get_user_config_dir (), ++ "autostart", ++ app->priv->basename, NULL); ++ } ++ ++ app->priv->save_timeout = g_timeout_add_seconds (GSP_APP_SAVE_DELAY, ++ _gsp_app_save, ++ app); ++} ++ ++/* ++ * Accessors ++ */ ++ ++const char * ++gsp_app_get_basename (GspApp *app) ++{ ++ g_return_val_if_fail (GSP_IS_APP (app), NULL); ++ ++ return app->priv->basename; ++} ++ ++const char * ++gsp_app_get_path (GspApp *app) ++{ ++ g_return_val_if_fail (GSP_IS_APP (app), NULL); ++ ++ return app->priv->path; ++} ++ ++gboolean ++gsp_app_get_hidden (GspApp *app) ++{ ++ g_return_val_if_fail (GSP_IS_APP (app), FALSE); ++ ++ return app->priv->hidden; ++} ++ ++gboolean ++gsp_app_get_display (GspApp *app) ++{ ++ g_return_val_if_fail (GSP_IS_APP (app), FALSE); ++ ++ return !app->priv->no_display; ++} ++ ++gboolean ++gsp_app_get_enabled (GspApp *app) ++{ ++ g_return_val_if_fail (GSP_IS_APP (app), FALSE); ++ ++ return app->priv->enabled; ++} ++ ++void ++gsp_app_set_enabled (GspApp *app, ++ gboolean enabled) ++{ ++ g_return_if_fail (GSP_IS_APP (app)); ++ ++ if (enabled == app->priv->enabled) { ++ return; ++ } ++ ++ app->priv->enabled = enabled; ++ app->priv->save_mask |= GSP_ASP_SAVE_MASK_ENABLED; ++ ++ _gsp_app_queue_save (app); ++ _gsp_app_emit_changed (app); ++} ++ ++gboolean ++gsp_app_get_shown (GspApp *app) ++{ ++ g_return_val_if_fail (GSP_IS_APP (app), FALSE); ++ ++ return app->priv->shown; ++} ++ ++const char * ++gsp_app_get_name (GspApp *app) ++{ ++ g_return_val_if_fail (GSP_IS_APP (app), NULL); ++ ++ return app->priv->name; ++} ++ ++const char * ++gsp_app_get_exec (GspApp *app) ++{ ++ g_return_val_if_fail (GSP_IS_APP (app), NULL); ++ ++ return app->priv->exec; ++} ++ ++const char * ++gsp_app_get_comment (GspApp *app) ++{ ++ g_return_val_if_fail (GSP_IS_APP (app), NULL); ++ ++ return app->priv->comment; ++} ++ ++GIcon * ++gsp_app_get_icon (GspApp *app) ++{ ++ g_return_val_if_fail (GSP_IS_APP (app), NULL); ++ ++ if (app->priv->gicon) { ++ return g_object_ref (app->priv->gicon); ++ } else { ++ return NULL; ++ } ++} ++ ++unsigned int ++gsp_app_get_xdg_position (GspApp *app) ++{ ++ g_return_val_if_fail (GSP_IS_APP (app), G_MAXUINT); ++ ++ return app->priv->xdg_position; ++} ++ ++unsigned int ++gsp_app_get_xdg_system_position (GspApp *app) ++{ ++ g_return_val_if_fail (GSP_IS_APP (app), G_MAXUINT); ++ ++ return app->priv->xdg_system_position; ++} ++ ++void ++gsp_app_set_xdg_system_position (GspApp *app, ++ unsigned int position) ++{ ++ g_return_if_fail (GSP_IS_APP (app)); ++ ++ app->priv->xdg_system_position = position; ++} ++ ++const char * ++gsp_app_get_description (GspApp *app) ++{ ++ g_return_val_if_fail (GSP_IS_APP (app), NULL); ++ ++ return app->priv->description; ++} ++ ++/* ++ * High-level edition ++ */ ++ ++void ++gsp_app_update (GspApp *app, ++ const char *name, ++ const char *comment, ++ const char *exec) ++{ ++ gboolean changed; ++ ++ g_return_if_fail (GSP_IS_APP (app)); ++ ++ changed = FALSE; ++ ++ if (!_gsp_str_equal (name, app->priv->name)) { ++ changed = TRUE; ++ g_free (app->priv->name); ++ app->priv->name = g_strdup (name); ++ app->priv->save_mask |= GSP_ASP_SAVE_MASK_NAME; ++ } ++ ++ if (!_gsp_str_equal (comment, app->priv->comment)) { ++ changed = TRUE; ++ g_free (app->priv->comment); ++ app->priv->comment = g_strdup (comment); ++ app->priv->save_mask |= GSP_ASP_SAVE_MASK_COMMENT; ++ } ++ ++ if (changed) { ++ _gsp_app_update_description (app); ++ } ++ ++ if (!_gsp_str_equal (exec, app->priv->exec)) { ++ changed = TRUE; ++ g_free (app->priv->exec); ++ app->priv->exec = g_strdup (exec); ++ app->priv->save_mask |= GSP_ASP_SAVE_MASK_EXEC; ++ } ++ ++ if (changed) { ++ _gsp_app_queue_save (app); ++ _gsp_app_emit_changed (app); ++ } ++} ++ ++void ++gsp_app_delete (GspApp *app) ++{ ++ g_return_if_fail (GSP_IS_APP (app)); ++ ++ if (app->priv->xdg_position == 0 && ++ app->priv->xdg_system_position == G_MAXUINT) { ++ /* exists in user directory only */ ++ if (app->priv->save_timeout) { ++ g_source_remove (app->priv->save_timeout); ++ app->priv->save_timeout = 0; ++ } ++ ++ if (g_file_test (app->priv->path, G_FILE_TEST_EXISTS)) { ++ g_remove (app->priv->path); ++ } ++ ++ /* for extra safety */ ++ app->priv->hidden = TRUE; ++ app->priv->save_mask |= GSP_ASP_SAVE_MASK_HIDDEN; ++ ++ _gsp_app_emit_removed (app); ++ } else { ++ /* also exists in system directory, so we have to keep a file ++ * in the user directory */ ++ app->priv->hidden = TRUE; ++ app->priv->save_mask |= GSP_ASP_SAVE_MASK_HIDDEN; ++ ++ _gsp_app_queue_save (app); ++ _gsp_app_emit_changed (app); ++ } ++} ++ ++/* ++ * New autostart app ++ */ ++ ++void ++gsp_app_reload_at (GspApp *app, ++ const char *path, ++ unsigned int xdg_position) ++{ ++ g_return_if_fail (GSP_IS_APP (app)); ++ ++ app->priv->xdg_position = G_MAXUINT; ++ gsp_app_new (path, xdg_position); ++} ++ ++GspApp * ++gsp_app_new (const char *path, ++ unsigned int xdg_position) ++{ ++ GspAppManager *manager; ++ GspApp *app; ++ GKeyFile *keyfile; ++ char *basename; ++ gboolean new; ++ ++ basename = g_path_get_basename (path); ++ ++ manager = gsp_app_manager_get (); ++ app = gsp_app_manager_find_app_with_basename (manager, basename); ++ g_object_unref (manager); ++ ++ new = (app == NULL); ++ ++ if (!new) { ++ if (app->priv->xdg_position == xdg_position) { ++ if (app->priv->skip_next_monitor_event) { ++ app->priv->skip_next_monitor_event = FALSE; ++ return NULL; ++ } ++ /* else: the file got changed but not by us, we'll ++ * update our data from disk */ ++ } ++ ++ if (app->priv->xdg_position < xdg_position || ++ app->priv->save_timeout != 0) { ++ /* we don't really care about this file, since we ++ * already have something with a higher priority, or ++ * we're going to write something in the user config ++ * anyway. ++ * Note: xdg_position >= 1 so it's a system dir */ ++ app->priv->xdg_system_position = MIN (xdg_position, ++ app->priv->xdg_system_position); ++ return NULL; ++ } ++ } ++ ++ keyfile = g_key_file_new (); ++ if (!g_key_file_load_from_file (keyfile, path, G_KEY_FILE_NONE, NULL)) { ++ g_key_file_free (keyfile); ++ g_free (basename); ++ return NULL; ++ } ++ ++ if (new) { ++ app = g_object_new (GSP_TYPE_APP, NULL); ++ app->priv->basename = basename; ++ } else { ++ g_free (basename); ++ _gsp_app_free_reusable_data (app); ++ } ++ ++ app->priv->path = g_strdup (path); ++ ++ app->priv->hidden = gsp_key_file_get_boolean (keyfile, ++ G_KEY_FILE_DESKTOP_KEY_HIDDEN, ++ FALSE); ++ app->priv->no_display = gsp_key_file_get_boolean (keyfile, ++ G_KEY_FILE_DESKTOP_KEY_NO_DISPLAY, ++ FALSE); ++ app->priv->enabled = gsp_key_file_get_boolean (keyfile, ++ GSP_KEY_FILE_DESKTOP_KEY_AUTOSTART_ENABLED, ++ TRUE); ++ app->priv->shown = gsp_key_file_get_shown (keyfile, ++ gsm_util_get_current_desktop ()); ++ ++ app->priv->name = gsp_key_file_get_locale_string (keyfile, ++ G_KEY_FILE_DESKTOP_KEY_NAME); ++ app->priv->exec = gsp_key_file_get_string (keyfile, ++ G_KEY_FILE_DESKTOP_KEY_EXEC); ++ app->priv->comment = gsp_key_file_get_locale_string (keyfile, ++ G_KEY_FILE_DESKTOP_KEY_COMMENT); ++ ++ if (gsm_util_text_is_blank (app->priv->name)) { ++ g_free (app->priv->name); ++ app->priv->name = g_strdup (app->priv->exec); ++ } ++ ++ app->priv->icon = gsp_key_file_get_locale_string (keyfile, ++ G_KEY_FILE_DESKTOP_KEY_ICON); ++ ++ if (app->priv->icon) { ++ /* look at icon and see if it's a themed icon or not */ ++ if (g_path_is_absolute (app->priv->icon)) { ++ GFile *iconfile; ++ ++ iconfile = g_file_new_for_path (app->priv->icon); ++ app->priv->gicon = g_file_icon_new (iconfile); ++ g_object_unref (iconfile); ++ } else { ++ app->priv->gicon = g_themed_icon_new (app->priv->icon); ++ } ++ } else { ++ app->priv->gicon = NULL; ++ } ++ ++ g_key_file_free (keyfile); ++ ++ _gsp_app_update_description (app); ++ ++ if (xdg_position > 0) { ++ g_assert (xdg_position <= app->priv->xdg_system_position); ++ app->priv->xdg_system_position = xdg_position; ++ } ++ /* else we keep the old value (which is G_MAXUINT if it wasn't set) */ ++ app->priv->xdg_position = xdg_position; ++ ++ g_assert (!new || app->priv->save_timeout == 0); ++ app->priv->save_timeout = 0; ++ app->priv->old_system_path = NULL; ++ app->priv->skip_next_monitor_event = FALSE; ++ ++ if (!new) { ++ _gsp_app_emit_changed (app); ++ } ++ ++ return app; ++} ++ ++static char * ++_gsp_find_free_basename (const char *suggested_basename) ++{ ++ GspAppManager *manager; ++ char *base_path; ++ char *filename; ++ char *basename; ++ int i; ++ ++ if (g_str_has_suffix (suggested_basename, ".desktop")) { ++ char *basename_no_ext; ++ ++ basename_no_ext = g_strndup (suggested_basename, ++ strlen (suggested_basename) - strlen (".desktop")); ++ base_path = g_build_filename (g_get_user_config_dir (), ++ "autostart", ++ basename_no_ext, NULL); ++ g_free (basename_no_ext); ++ } else { ++ base_path = g_build_filename (g_get_user_config_dir (), ++ "autostart", ++ suggested_basename, NULL); ++ } ++ ++ filename = g_strdup_printf ("%s.desktop", base_path); ++ basename = g_path_get_basename (filename); ++ ++ manager = gsp_app_manager_get (); ++ ++ i = 1; ++#define _GSP_FIND_MAX_TRY 10000 ++ while (gsp_app_manager_find_app_with_basename (manager, ++ basename) != NULL && ++ g_file_test (filename, G_FILE_TEST_EXISTS) && ++ i < _GSP_FIND_MAX_TRY) { ++ g_free (filename); ++ g_free (basename); ++ ++ filename = g_strdup_printf ("%s-%d.desktop", base_path, i); ++ basename = g_path_get_basename (filename); ++ ++ i++; ++ } ++ ++ g_object_unref (manager); ++ ++ g_free (base_path); ++ g_free (filename); ++ ++ if (i == _GSP_FIND_MAX_TRY) { ++ g_free (basename); ++ return NULL; ++ } ++ ++ return basename; ++} ++ ++void ++gsp_app_create (const char *name, ++ const char *comment, ++ const char *exec) ++{ ++ GspAppManager *manager; ++ GspApp *app; ++ char *basename; ++ char **argv; ++ int argc; ++ ++ g_return_if_fail (!gsm_util_text_is_blank (exec)); ++ ++ if (!g_shell_parse_argv (exec, &argc, &argv, NULL)) { ++ return; ++ } ++ ++ basename = _gsp_find_free_basename (argv[0]); ++ g_strfreev (argv); ++ if (basename == NULL) { ++ return; ++ } ++ ++ app = g_object_new (GSP_TYPE_APP, NULL); ++ ++ app->priv->basename = basename; ++ app->priv->path = g_build_filename (g_get_user_config_dir (), ++ "autostart", ++ app->priv->basename, NULL); ++ ++ app->priv->hidden = FALSE; ++ app->priv->no_display = FALSE; ++ app->priv->enabled = TRUE; ++ app->priv->shown = TRUE; ++ ++ if (!gsm_util_text_is_blank (name)) { ++ app->priv->name = g_strdup (name); ++ } else { ++ app->priv->name = g_strdup (exec); ++ } ++ app->priv->exec = g_strdup (exec); ++ app->priv->comment = g_strdup (comment); ++ app->priv->icon = NULL; ++ ++ app->priv->gicon = NULL; ++ _gsp_app_update_description (app); ++ ++ /* by definition */ ++ app->priv->xdg_position = 0; ++ app->priv->xdg_system_position = G_MAXUINT; ++ ++ app->priv->save_timeout = 0; ++ app->priv->save_mask |= GSP_ASP_SAVE_MASK_ALL; ++ app->priv->old_system_path = NULL; ++ app->priv->skip_next_monitor_event = FALSE; ++ ++ _gsp_app_queue_save (app); ++ ++ manager = gsp_app_manager_get (); ++ gsp_app_manager_add (manager, app); ++ g_object_unref (app); ++ g_object_unref (manager); ++} ++ ++gboolean ++gsp_app_copy_desktop_file (const char *uri) ++{ ++ GspAppManager *manager; ++ GspApp *app; ++ GFile *src_file; ++ char *src_basename; ++ char *dst_basename; ++ char *dst_path; ++ GFile *dst_file; ++ gboolean changed; ++ ++ g_return_val_if_fail (uri != NULL, FALSE); ++ ++ src_file = g_file_new_for_uri (uri); ++ src_basename = g_file_get_basename (src_file); ++ ++ if (src_basename == NULL) { ++ g_object_unref (src_file); ++ return FALSE; ++ } ++ ++ dst_basename = _gsp_find_free_basename (src_basename); ++ g_free (src_basename); ++ ++ if (dst_basename == NULL) { ++ g_object_unref (src_file); ++ return FALSE; ++ } ++ ++ dst_path = g_build_filename (g_get_user_config_dir (), ++ "autostart", ++ dst_basename, NULL); ++ g_free (dst_basename); ++ ++ dst_file = g_file_new_for_path (dst_path); ++ ++ _gsp_ensure_user_autostart_dir (); ++ if (!g_file_copy (src_file, dst_file, G_FILE_COPY_NONE, ++ NULL, NULL, NULL, NULL)) { ++ g_object_unref (src_file); ++ g_object_unref (dst_file); ++ g_free (dst_path); ++ return FALSE; ++ } ++ ++ g_object_unref (src_file); ++ g_object_unref (dst_file); ++ ++ app = gsp_app_new (dst_path, 0); ++ if (!app) { ++ g_remove (dst_path); ++ g_free (dst_path); ++ return FALSE; ++ } ++ ++ g_free (dst_path); ++ ++ changed = FALSE; ++ if (app->priv->hidden) { ++ changed = TRUE; ++ app->priv->hidden = FALSE; ++ app->priv->save_mask |= GSP_ASP_SAVE_MASK_HIDDEN; ++ } ++ ++ if (app->priv->no_display) { ++ changed = TRUE; ++ app->priv->no_display = FALSE; ++ app->priv->save_mask |= GSP_ASP_SAVE_MASK_NO_DISPLAY; ++ } ++ ++ if (!app->priv->enabled) { ++ changed = TRUE; ++ app->priv->enabled = TRUE; ++ app->priv->save_mask |= GSP_ASP_SAVE_MASK_ENABLED; ++ } ++ ++ if (changed) { ++ _gsp_app_queue_save (app); ++ } ++ ++ manager = gsp_app_manager_get (); ++ gsp_app_manager_add (manager, app); ++ g_object_unref (app); ++ g_object_unref (manager); ++ ++ return TRUE; ++} +diff --git a/capplet/gsp-app.h b/capplet/gsp-app.h +new file mode 100644 +index 0000000..a199795 +--- /dev/null ++++ b/capplet/gsp-app.h +@@ -0,0 +1,108 @@ ++/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- ++ * ++ * Copyright (C) 1999 Free Software Foundation, Inc. ++ * Copyright (C) 2007, 2009 Vincent Untz. ++ * Copyright (C) 2008 Lucas Rocha. ++ * Copyright (C) 2008 William Jon McCann ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ++ * ++ */ ++ ++#ifndef __GSP_APP_H ++#define __GSP_APP_H ++ ++#include ++#include ++ ++G_BEGIN_DECLS ++ ++#define GSP_TYPE_APP (gsp_app_get_type ()) ++#define GSP_APP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GSP_TYPE_APP, GspApp)) ++#define GSP_APP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GSP_TYPE_APP, GspAppClass)) ++#define GSP_IS_APP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GSP_TYPE_APP)) ++#define GSP_IS_APP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GSP_TYPE_APP)) ++#define GSP_APP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GSP_TYPE_APP, GspAppClass)) ++ ++typedef struct _GspApp GspApp; ++typedef struct _GspAppClass GspAppClass; ++ ++typedef struct _GspAppPrivate GspAppPrivate; ++ ++struct _GspAppClass ++{ ++ GObjectClass parent_class; ++ ++ void (* changed) (GspApp *app); ++ void (* removed) (GspApp *app); ++}; ++ ++struct _GspApp ++{ ++ GObject parent_instance; ++ ++ GspAppPrivate *priv; ++}; ++ ++GType gsp_app_get_type (void); ++ ++void gsp_app_create (const char *name, ++ const char *comment, ++ const char *exec); ++void gsp_app_update (GspApp *app, ++ const char *name, ++ const char *comment, ++ const char *exec); ++ ++gboolean gsp_app_copy_desktop_file (const char *uri); ++ ++void gsp_app_delete (GspApp *app); ++ ++const char *gsp_app_get_basename (GspApp *app); ++const char *gsp_app_get_path (GspApp *app); ++ ++gboolean gsp_app_get_hidden (GspApp *app); ++gboolean gsp_app_get_display (GspApp *app); ++ ++gboolean gsp_app_get_enabled (GspApp *app); ++void gsp_app_set_enabled (GspApp *app, ++ gboolean enabled); ++ ++gboolean gsp_app_get_shown (GspApp *app); ++ ++const char *gsp_app_get_name (GspApp *app); ++const char *gsp_app_get_exec (GspApp *app); ++const char *gsp_app_get_comment (GspApp *app); ++ ++const char *gsp_app_get_description (GspApp *app); ++GIcon *gsp_app_get_icon (GspApp *app); ++ ++/* private interface for GspAppManager only */ ++ ++GspApp *gsp_app_new (const char *path, ++ unsigned int xdg_position); ++ ++void gsp_app_reload_at (GspApp *app, ++ const char *path, ++ unsigned int xdg_position); ++ ++unsigned int gsp_app_get_xdg_position (GspApp *app); ++unsigned int gsp_app_get_xdg_system_position (GspApp *app); ++void gsp_app_set_xdg_system_position (GspApp *app, ++ unsigned int position); ++ ++G_END_DECLS ++ ++#endif /* __GSP_APP_H */ +diff --git a/capplet/gsp-keyfile.c b/capplet/gsp-keyfile.c +new file mode 100644 +index 0000000..de9fac0 +--- /dev/null ++++ b/capplet/gsp-keyfile.c +@@ -0,0 +1,201 @@ ++/* ++ * gsp-keyfile.c: GKeyFile extensions ++ * ++ * Copyright (C) 2008, 2009 Novell, Inc. ++ * ++ * Based on code from panel-keyfile.c (from gnome-panel) ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of the ++ * License, or (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, but ++ * WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ++ * 02111-1307, USA. ++ * ++ * Authors: ++ * Vincent Untz ++ */ ++ ++#include ++ ++#include ++ ++#include "gsp-keyfile.h" ++ ++void ++gsp_key_file_populate (GKeyFile *keyfile) ++{ ++ gsp_key_file_set_string (keyfile, ++ G_KEY_FILE_DESKTOP_KEY_TYPE, ++ "Application"); ++ ++ gsp_key_file_set_string (keyfile, ++ G_KEY_FILE_DESKTOP_KEY_EXEC, ++ "/bin/false"); ++} ++ ++//FIXME: kill this when bug #309224 is fixed ++gboolean ++gsp_key_file_to_file (GKeyFile *keyfile, ++ const gchar *path, ++ GError **error) ++{ ++ GError *write_error; ++ gchar *data; ++ gsize length; ++ gboolean res; ++ ++ g_return_val_if_fail (keyfile != NULL, FALSE); ++ g_return_val_if_fail (path != NULL, FALSE); ++ ++ write_error = NULL; ++ data = g_key_file_to_data (keyfile, &length, &write_error); ++ ++ if (write_error) { ++ g_propagate_error (error, write_error); ++ return FALSE; ++ } ++ ++ res = g_file_set_contents (path, data, length, &write_error); ++ g_free (data); ++ ++ if (write_error) { ++ g_propagate_error (error, write_error); ++ return FALSE; ++ } ++ ++ return res; ++} ++ ++gboolean ++gsp_key_file_get_boolean (GKeyFile *keyfile, ++ const gchar *key, ++ gboolean default_value) ++{ ++ GError *error; ++ gboolean retval; ++ ++ error = NULL; ++ retval = g_key_file_get_boolean (keyfile, G_KEY_FILE_DESKTOP_GROUP, ++ key, &error); ++ if (error != NULL) { ++ retval = default_value; ++ g_error_free (error); ++ } ++ ++ return retval; ++} ++ ++gboolean ++gsp_key_file_get_shown (GKeyFile *keyfile, ++ const char *current_desktop) ++{ ++ char **only_show_in, **not_show_in; ++ gboolean found; ++ int i; ++ ++ if (!current_desktop) ++ return TRUE; ++ ++ only_show_in = g_key_file_get_string_list (keyfile, G_KEY_FILE_DESKTOP_GROUP, ++ G_KEY_FILE_DESKTOP_KEY_ONLY_SHOW_IN, ++ NULL, NULL); ++ ++ if (only_show_in) { ++ found = FALSE; ++ for (i = 0; only_show_in[i] != NULL; i++) { ++ if (g_strcmp0 (current_desktop, only_show_in[i]) == 0) { ++ found = TRUE; ++ break; ++ } ++ } ++ ++ g_strfreev (only_show_in); ++ ++ if (!found) ++ return FALSE; ++ } ++ ++ not_show_in = g_key_file_get_string_list (keyfile, G_KEY_FILE_DESKTOP_GROUP, ++ G_KEY_FILE_DESKTOP_KEY_NOT_SHOW_IN, ++ NULL, NULL); ++ ++ if (not_show_in) { ++ found = FALSE; ++ for (i = 0; not_show_in[i] != NULL; i++) { ++ if (g_strcmp0 (current_desktop, not_show_in[i]) == 0) { ++ found = TRUE; ++ break; ++ } ++ } ++ ++ g_strfreev (not_show_in); ++ ++ if (found) ++ return FALSE; ++ } ++ ++ return TRUE; ++} ++ ++void ++gsp_key_file_set_locale_string (GKeyFile *keyfile, ++ const gchar *key, ++ const gchar *value) ++{ ++ const char *locale; ++ const char * const *langs_pointer; ++ int i; ++ ++ if (value == NULL) { ++ value = ""; ++ } ++ ++ locale = NULL; ++ langs_pointer = g_get_language_names (); ++ for (i = 0; langs_pointer[i] != NULL; i++) { ++ /* find first without encoding */ ++ if (strchr (langs_pointer[i], '.') == NULL) { ++ locale = langs_pointer[i]; ++ break; ++ } ++ } ++ ++ if (locale != NULL) { ++ g_key_file_set_locale_string (keyfile, G_KEY_FILE_DESKTOP_GROUP, ++ key, locale, value); ++ } else { ++ g_key_file_set_string (keyfile, G_KEY_FILE_DESKTOP_GROUP, ++ key, value); ++ } ++} ++ ++void ++gsp_key_file_ensure_C_key (GKeyFile *keyfile, ++ const char *key) ++{ ++ char *C_value; ++ char *buffer; ++ ++ /* Make sure we set the "C" locale strings to the terms we set here. ++ * This is so that if the user logs into another locale they get their ++ * own description there rather then empty. It is not the C locale ++ * however, but the user created this entry herself so it's OK */ ++ C_value = gsp_key_file_get_string (keyfile, key); ++ if (C_value == NULL || C_value [0] == '\0') { ++ buffer = gsp_key_file_get_locale_string (keyfile, key); ++ if (buffer) { ++ gsp_key_file_set_string (keyfile, key, buffer); ++ g_free (buffer); ++ } ++ } ++ g_free (C_value); ++} +diff --git a/capplet/gsp-keyfile.h b/capplet/gsp-keyfile.h +new file mode 100644 +index 0000000..d94f667 +--- /dev/null ++++ b/capplet/gsp-keyfile.h +@@ -0,0 +1,65 @@ ++/* ++ * gsp-keyfile.h: GKeyFile extensions ++ * ++ * Copyright (C) 2008, 2009 Novell, Inc. ++ * ++ * Based on code from panel-keyfile.h (from gnome-panel) ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of the ++ * License, or (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, but ++ * WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ++ * 02111-1307, USA. ++ * ++ * Authors: ++ * Vincent Untz ++ */ ++ ++#ifndef GSP_KEYFILE_H ++#define GSP_KEYFILE_H ++ ++#include "glib.h" ++ ++G_BEGIN_DECLS ++ ++#define GSP_KEY_FILE_DESKTOP_KEY_AUTOSTART_ENABLED "X-GNOME-Autostart-enabled" ++ ++void gsp_key_file_populate (GKeyFile *keyfile); ++ ++gboolean gsp_key_file_to_file (GKeyFile *keyfile, ++ const gchar *path, ++ GError **error); ++ ++gboolean gsp_key_file_get_boolean (GKeyFile *keyfile, ++ const gchar *key, ++ gboolean default_value); ++gboolean gsp_key_file_get_shown (GKeyFile *keyfile, ++ const char *current_desktop); ++#define gsp_key_file_get_string(key_file, key) \ ++ g_key_file_get_string (key_file, G_KEY_FILE_DESKTOP_GROUP, key, NULL) ++#define gsp_key_file_get_locale_string(key_file, key) \ ++ g_key_file_get_locale_string(key_file, G_KEY_FILE_DESKTOP_GROUP, key, NULL, NULL) ++ ++#define gsp_key_file_set_boolean(key_file, key, value) \ ++ g_key_file_set_boolean (key_file, G_KEY_FILE_DESKTOP_GROUP, key, value) ++#define gsp_key_file_set_string(key_file, key, value) \ ++ g_key_file_set_string (key_file, G_KEY_FILE_DESKTOP_GROUP, key, value) ++void gsp_key_file_set_locale_string (GKeyFile *keyfile, ++ const gchar *key, ++ const gchar *value); ++ ++void gsp_key_file_ensure_C_key (GKeyFile *keyfile, ++ const char *key); ++ ++G_END_DECLS ++ ++#endif /* GSP_KEYFILE_H */ +diff --git a/capplet/main.c b/capplet/main.c +new file mode 100644 +index 0000000..3c7177b +--- /dev/null ++++ b/capplet/main.c +@@ -0,0 +1,108 @@ ++/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- ++ * main.c ++ * Copyright (C) 1999 Free Software Foundation, Inc. ++ * Copyright (C) 2008 Lucas Rocha. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of the ++ * License, or (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, but ++ * WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ++ * 02111-1307, USA. ++ */ ++ ++#include ++ ++#include ++#include ++ ++#include ++#include ++ ++#include "gsm-properties-dialog.h" ++ ++static gboolean show_version = FALSE; ++ ++static GOptionEntry options[] = { ++ { "version", 0, 0, G_OPTION_ARG_NONE, &show_version, N_("Version of this application"), NULL }, ++ { NULL, 0, 0, 0, NULL, NULL, NULL } ++}; ++ ++static void ++dialog_response (GsmPropertiesDialog *dialog, ++ guint response_id, ++ gpointer data) ++{ ++ GdkScreen *screen; ++ GError *error; ++ ++ if (response_id == GTK_RESPONSE_HELP) { ++ screen = gtk_widget_get_screen (GTK_WIDGET (dialog)); ++ ++ error = NULL; ++ gtk_show_uri (screen, "ghelp:user-guide?gosstartsession-2", ++ gtk_get_current_event_time (), &error); ++ ++ if (error != NULL) { ++ GtkWidget *d; ++ d = gtk_message_dialog_new (GTK_WINDOW (dialog), ++ GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, ++ GTK_MESSAGE_ERROR, ++ GTK_BUTTONS_CLOSE, ++ "%s", ++ _("Could not display help document")); ++ gtk_message_dialog_format_secondary_text ( ++ GTK_MESSAGE_DIALOG (d), ++ "%s", error->message); ++ g_error_free (error); ++ ++ gtk_dialog_run (GTK_DIALOG (d)); ++ gtk_widget_destroy (d); ++ } ++ } else { ++ gtk_widget_destroy (GTK_WIDGET (dialog)); ++ gtk_main_quit (); ++ } ++} ++ ++int ++main (int argc, char *argv[]) ++{ ++ GError *error; ++ GtkWidget *dialog; ++ ++ bindtextdomain (GETTEXT_PACKAGE, LOCALE_DIR); ++ bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); ++ textdomain (GETTEXT_PACKAGE); ++ ++ error = NULL; ++ if (! gtk_init_with_args (&argc, &argv, " - GNOME Session Properties", options, GETTEXT_PACKAGE, &error)) { ++ g_warning ("Unable to start: %s", error->message); ++ g_error_free (error); ++ return 1; ++ } ++ ++ if (show_version) { ++ g_print ("%s %s\n", argv [0], VERSION); ++ return 0; ++ } ++ ++ dialog = gsm_properties_dialog_new (); ++ g_signal_connect (dialog, ++ "response", ++ G_CALLBACK (dialog_response), ++ NULL); ++ gtk_widget_show (dialog); ++ ++ gtk_main (); ++ ++ return 0; ++} +diff --git a/configure.ac b/configure.ac +index 6485d57..b67c0e6 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -301,65 +301,67 @@ if test $enable_ipv6 = yes; then + ]])], + [have_ipv6=yes], + [have_ipv6=no] + ) + AC_MSG_RESULT($have_ipv6) + + dnl ================================================================= + dnl Now we would check for specific function like getaddrinfo. + dnl ================================================================= + have_getaddrinfo=no + if test $have_ipv6=yes; then + AC_CHECK_FUNC(getaddrinfo, have_getaddrinfo=yes) + if test $have_getaddrinfo != yes; then + # getaddrinfo is not in the default libraries. See if it's in some other. + for lib in bsd socket inet; do + AC_CHECK_LIB($lib, getaddrinfo, [LIBS="$LIBS -l$lib";have_getaddrinfo=yes; break]) + done + fi + if test $have_getaddrinfo=yes; then + AC_DEFINE(ENABLE_IPV6, 1, [Define if IPV6 is supported]) + have_full_ipv6=yes + fi + fi + fi + dnl ============================================================================== + dnl End of IPv6 checks + dnl ============================================================================== + + AC_CONFIG_FILES([ + Makefile ++capplet/Makefile + doc/Makefile + doc/dbus/Makefile + doc/dbus/gnome-session.xml + doc/man/Makefile + data/Makefile ++data/gnome-session-properties.desktop.in + data/org.gnome.SessionManager.gschema.xml + data/icons/Makefile + data/icons/16x16/Makefile + data/icons/22x22/Makefile + data/icons/24x24/Makefile + data/icons/32x32/Makefile + data/icons/48x48/Makefile + data/icons/scalable/Makefile + gnome-session/Makefile + tools/Makefile + po/Makefile.in + ]) + AC_OUTPUT + + dnl --------------------------------------------------------------------------- + dnl - Show summary + dnl --------------------------------------------------------------------------- + + echo " + gnome-session $VERSION + `echo gnome-session $VERSION | sed "s/./=/g"` + + prefix: ${prefix} + exec_prefix: ${exec_prefix} + libdir: ${libdir} + bindir: ${bindir} + sbindir: ${sbindir} + sysconfdir: ${sysconfdir} + localstatedir: ${localstatedir} + datadir: ${datadir} +diff --git a/data/Makefile.am b/data/Makefile.am +index d1d8d25..524cc6e 100644 +--- a/data/Makefile.am ++++ b/data/Makefile.am +@@ -1,68 +1,74 @@ + SUBDIRS = icons + + uidir = $(pkgdatadir) + ui_DATA = \ + session-properties.ui + + if BUILD_SESSION_SELECTOR + ui_DATA += session-selector.ui + endif + + hwcompatdir = $(pkgdatadir) + hwcompat_DATA = hardware-compatibility + + xsessiondir = $(datadir)/xsessions + xsession_in_files = gnome.desktop.in + + if BUILD_SESSION_SELECTOR + xsession_in_files += gnome-custom-session.desktop.in + endif + + xsession_DATA = $(xsession_in_files:.desktop.in=.desktop) + + wayland_sessiondir = $(datadir)/wayland-sessions + wayland_session_in_files = gnome-wayland.desktop.in + wayland_session_DATA = $(wayland_session_in_files:.desktop.in=.desktop) + ++desktopdir = $(datadir)/applications ++desktop_in_files = gnome-session-properties.desktop.in ++desktop_DATA = $(desktop_in_files:.desktop.in=.desktop) ++ + sessiondir = $(datadir)/gnome-session/sessions + session_in_in_files = gnome.session.desktop.in.in gnome-dummy.session.desktop.in.in gnome-wayland.session.desktop.in.in + session_in_files = $(session_in_in_files:.session.desktop.in.in=.session.desktop.in) + session_DATA = $(session_in_files:.session.desktop.in=.session) + + %.session.desktop.in: %.session.desktop.in.in Makefile + $(AM_V_GEN)sed \ + -e "s|\@LIBEXECDIR\@|$(libexecdir)|" \ + $< > $@ + + %.session: %.session.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@ + + @INTLTOOL_DESKTOP_RULE@ + @INTLTOOL_XML_NOMERGE_RULE@ + + gsettings_SCHEMAS = org.gnome.SessionManager.gschema.xml + @GSETTINGS_RULES@ + + migrationdir = $(datadir)/GConf/gsettings + dist_migration_DATA = gnome-session.convert + + EXTRA_DIST = \ + $(xsession_in_files) \ + $(session_in_in_files) \ + $(wayland_session_in_files) \ + $(gsettings_SCHEMAS:.xml=.xml.in) \ + session-selector.ui \ + gnome-custom-session.desktop.in \ + $(ui_DATA) \ + $(hwcompat_DATA) + + CLEANFILES = \ + $(gsettings_SCHEMAS) \ + $(xsession_DATA) \ + $(wayland_session_DATA) \ ++ $(desktop_DATA) \ + $(session_DATA) + + DISTCLEANFILES = \ + $(gsettings_SCHEMAS) \ ++ $(desktop_in_files) \ + $(wayland_session_in_files) + + -include $(top_srcdir)/git.mk +diff --git a/data/gnome-session-properties.desktop.in.in b/data/gnome-session-properties.desktop.in.in +new file mode 100644 +index 0000000..3dc7b03 +--- /dev/null ++++ b/data/gnome-session-properties.desktop.in.in +@@ -0,0 +1,15 @@ ++[Desktop Entry] ++_Name=Startup Applications ++_Comment=Choose what applications to start when you log in ++Exec=gnome-session-properties ++Icon=session-properties ++Terminal=false ++Type=Application ++StartupNotify=true ++Categories=GTK;GNOME;Settings;X-GNOME-PersonalSettings; ++OnlyShowIn=GNOME;Unity; ++NoDisplay=true ++X-GNOME-Bugzilla-Bugzilla=GNOME ++X-GNOME-Bugzilla-Product=gnome-session ++X-GNOME-Bugzilla-Component=gnome-session-properties ++X-GNOME-Bugzilla-Version=@VERSION@ +diff --git a/doc/man/Makefile.am b/doc/man/Makefile.am +index 02e5c62..2879423 100644 +--- a/doc/man/Makefile.am ++++ b/doc/man/Makefile.am +@@ -1,29 +1,30 @@ + XSLTPROC_FLAGS = \ + --nonet \ + --stringparam man.output.quietly 1 \ + --stringparam funcsynopsis.style ansi \ + --stringparam man.th.extra1.suppress 1 \ + --stringparam man.authors.section.enabled 0 \ + --stringparam man.copyright.section.enabled 0 + + .xml.1: + $(AM_V_GEN) $(XSLTPROC) $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< + + man_MANS = \ + gnome-session.1 \ ++ gnome-session-properties.1 \ + gnome-session-quit.1 \ + gnome-session-inhibit.1 + + if BUILD_SESSION_SELECTOR + man_MANS += gnome-session-selector.1 + endif + + EXTRA_DIST = \ + gnome-session-inhibit.xml \ + gnome-session-selector.xml \ + $(man_MANS) + + CLEANFILES = \ + gnome-session-inhibit.1 + + -include $(top_srcdir)/git.mk +diff --git a/doc/man/gnome-session-properties.1 b/doc/man/gnome-session-properties.1 +new file mode 100644 +index 0000000..c7ef1af +--- /dev/null ++++ b/doc/man/gnome-session-properties.1 +@@ -0,0 +1,24 @@ ++.\" ++.\" gnome-session-properties manual page. ++.\" (C) 2009-2010 Vincent Untz (vuntz@gnome.org) ++.\" ++.TH GNOME-SESSION-PROPERTIES 1 "GNOME" ++.SH NAME ++gnome-session-properties \- Configure applications to start on login ++.SH SYNOPSIS ++.B gnome-session-properties ++.SH DESCRIPTION ++.PP ++The \fIgnome-session-properties\fP program enables the users to ++configure what applications should be started on login, in addition to ++the default startup applications configured on the system. ++.PP ++It also proposes an interface to save a snapshot of the currently ++running applications so that they can automatically be restored to ++their current state on your next GNOME session. ++.SH BUGS ++If you find bugs in the \fIgnome-session-properties\fP program, please report ++these on https://bugzilla.gnome.org. ++.SH SEE ALSO ++.BR gnome-session(1) ++.BR gnome-session-quit(1) +diff --git a/po/POTFILES.in b/po/POTFILES.in +index 5a887ec..9221412 100644 +--- a/po/POTFILES.in ++++ b/po/POTFILES.in +@@ -1,20 +1,25 @@ + # List of source files containing translatable strings. + # Please keep this file sorted alphabetically. ++capplet/gsm-app-dialog.c ++capplet/gsm-properties-dialog.c ++capplet/gsp-app.c ++capplet/main.c + data/gnome-custom-session.desktop.in + data/gnome.desktop.in + data/gnome-dummy.session.desktop.in.in + data/gnome.session.desktop.in.in ++data/gnome-session-properties.desktop.in.in + data/gnome-wayland.desktop.in + data/gnome-wayland.session.desktop.in.in + [type: gettext/glade]data/session-selector.ui + [type: gettext/glade]data/session-properties.ui + gnome-session/gsm-fail-whale-dialog.c + gnome-session/gsm-manager.c + gnome-session/gsm-process-helper.c + gnome-session/gsm-util.c + gnome-session/gsm-xsmp-client.c + gnome-session/gsm-xsmp-server.c + gnome-session/main.c + tools/gnome-session-inhibit.c + tools/gnome-session-selector.c + tools/gnome-session-quit.c +-- +2.3.7 + + +From 36694037511ac9d61270c7194118cb3fbb438ab7 Mon Sep 17 00:00:00 2001 +From: Ray Strode +Date: Fri, 8 May 2015 16:27:15 -0400 +Subject: [PATCH 02/17] Revert "Rename the desktop file to + gnome-session-properties.desktop" + +This reverts commit ac9fd0dc97a17674cb082f80df0b1fcc45bc92bf. +--- + configure.ac | 2 +- + data/Makefile.am | 2 +- + data/gnome-session-properties.desktop.in.in | 15 --------------- + data/session-properties.desktop.in.in | 15 +++++++++++++++ + po/POTFILES.in | 1 + + po/POTFILES.skip | 3 ++- + 6 files changed, 20 insertions(+), 18 deletions(-) + delete mode 100644 data/gnome-session-properties.desktop.in.in + create mode 100644 data/session-properties.desktop.in.in + +diff --git a/configure.ac b/configure.ac +index b67c0e6..0990e70 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -307,61 +307,61 @@ if test $enable_ipv6 = yes; then + dnl ================================================================= + dnl Now we would check for specific function like getaddrinfo. + dnl ================================================================= + have_getaddrinfo=no + if test $have_ipv6=yes; then + AC_CHECK_FUNC(getaddrinfo, have_getaddrinfo=yes) + if test $have_getaddrinfo != yes; then + # getaddrinfo is not in the default libraries. See if it's in some other. + for lib in bsd socket inet; do + AC_CHECK_LIB($lib, getaddrinfo, [LIBS="$LIBS -l$lib";have_getaddrinfo=yes; break]) + done + fi + if test $have_getaddrinfo=yes; then + AC_DEFINE(ENABLE_IPV6, 1, [Define if IPV6 is supported]) + have_full_ipv6=yes + fi + fi + fi + dnl ============================================================================== + dnl End of IPv6 checks + dnl ============================================================================== + + AC_CONFIG_FILES([ + Makefile + capplet/Makefile + doc/Makefile + doc/dbus/Makefile + doc/dbus/gnome-session.xml + doc/man/Makefile + data/Makefile +-data/gnome-session-properties.desktop.in ++data/session-properties.desktop.in + data/org.gnome.SessionManager.gschema.xml + data/icons/Makefile + data/icons/16x16/Makefile + data/icons/22x22/Makefile + data/icons/24x24/Makefile + data/icons/32x32/Makefile + data/icons/48x48/Makefile + data/icons/scalable/Makefile + gnome-session/Makefile + tools/Makefile + po/Makefile.in + ]) + AC_OUTPUT + + dnl --------------------------------------------------------------------------- + dnl - Show summary + dnl --------------------------------------------------------------------------- + + echo " + gnome-session $VERSION + `echo gnome-session $VERSION | sed "s/./=/g"` + + prefix: ${prefix} + exec_prefix: ${exec_prefix} + libdir: ${libdir} + bindir: ${bindir} + sbindir: ${sbindir} + sysconfdir: ${sysconfdir} + localstatedir: ${localstatedir} + datadir: ${datadir} +diff --git a/data/Makefile.am b/data/Makefile.am +index 524cc6e..8834fcb 100644 +--- a/data/Makefile.am ++++ b/data/Makefile.am +@@ -1,58 +1,58 @@ + SUBDIRS = icons + + uidir = $(pkgdatadir) + ui_DATA = \ + session-properties.ui + + if BUILD_SESSION_SELECTOR + ui_DATA += session-selector.ui + endif + + hwcompatdir = $(pkgdatadir) + hwcompat_DATA = hardware-compatibility + + xsessiondir = $(datadir)/xsessions + xsession_in_files = gnome.desktop.in + + if BUILD_SESSION_SELECTOR + xsession_in_files += gnome-custom-session.desktop.in + endif + + xsession_DATA = $(xsession_in_files:.desktop.in=.desktop) + + wayland_sessiondir = $(datadir)/wayland-sessions + wayland_session_in_files = gnome-wayland.desktop.in + wayland_session_DATA = $(wayland_session_in_files:.desktop.in=.desktop) + + desktopdir = $(datadir)/applications +-desktop_in_files = gnome-session-properties.desktop.in ++desktop_in_files = session-properties.desktop.in + desktop_DATA = $(desktop_in_files:.desktop.in=.desktop) + + sessiondir = $(datadir)/gnome-session/sessions + session_in_in_files = gnome.session.desktop.in.in gnome-dummy.session.desktop.in.in gnome-wayland.session.desktop.in.in + session_in_files = $(session_in_in_files:.session.desktop.in.in=.session.desktop.in) + session_DATA = $(session_in_files:.session.desktop.in=.session) + + %.session.desktop.in: %.session.desktop.in.in Makefile + $(AM_V_GEN)sed \ + -e "s|\@LIBEXECDIR\@|$(libexecdir)|" \ + $< > $@ + + %.session: %.session.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@ + + @INTLTOOL_DESKTOP_RULE@ + @INTLTOOL_XML_NOMERGE_RULE@ + + gsettings_SCHEMAS = org.gnome.SessionManager.gschema.xml + @GSETTINGS_RULES@ + + migrationdir = $(datadir)/GConf/gsettings + dist_migration_DATA = gnome-session.convert + + EXTRA_DIST = \ + $(xsession_in_files) \ + $(session_in_in_files) \ + $(wayland_session_in_files) \ + $(gsettings_SCHEMAS:.xml=.xml.in) \ + session-selector.ui \ + gnome-custom-session.desktop.in \ +diff --git a/data/gnome-session-properties.desktop.in.in b/data/gnome-session-properties.desktop.in.in +deleted file mode 100644 +index 3dc7b03..0000000 +--- a/data/gnome-session-properties.desktop.in.in ++++ /dev/null +@@ -1,15 +0,0 @@ +-[Desktop Entry] +-_Name=Startup Applications +-_Comment=Choose what applications to start when you log in +-Exec=gnome-session-properties +-Icon=session-properties +-Terminal=false +-Type=Application +-StartupNotify=true +-Categories=GTK;GNOME;Settings;X-GNOME-PersonalSettings; +-OnlyShowIn=GNOME;Unity; +-NoDisplay=true +-X-GNOME-Bugzilla-Bugzilla=GNOME +-X-GNOME-Bugzilla-Product=gnome-session +-X-GNOME-Bugzilla-Component=gnome-session-properties +-X-GNOME-Bugzilla-Version=@VERSION@ +diff --git a/data/session-properties.desktop.in.in b/data/session-properties.desktop.in.in +new file mode 100644 +index 0000000..3dc7b03 +--- /dev/null ++++ b/data/session-properties.desktop.in.in +@@ -0,0 +1,15 @@ ++[Desktop Entry] ++_Name=Startup Applications ++_Comment=Choose what applications to start when you log in ++Exec=gnome-session-properties ++Icon=session-properties ++Terminal=false ++Type=Application ++StartupNotify=true ++Categories=GTK;GNOME;Settings;X-GNOME-PersonalSettings; ++OnlyShowIn=GNOME;Unity; ++NoDisplay=true ++X-GNOME-Bugzilla-Bugzilla=GNOME ++X-GNOME-Bugzilla-Product=gnome-session ++X-GNOME-Bugzilla-Component=gnome-session-properties ++X-GNOME-Bugzilla-Version=@VERSION@ +diff --git a/po/POTFILES.in b/po/POTFILES.in +index 9221412..b18fcab 100644 +--- a/po/POTFILES.in ++++ b/po/POTFILES.in +@@ -1,25 +1,26 @@ + # List of source files containing translatable strings. + # Please keep this file sorted alphabetically. + capplet/gsm-app-dialog.c + capplet/gsm-properties-dialog.c + capplet/gsp-app.c + capplet/main.c + data/gnome-custom-session.desktop.in + data/gnome.desktop.in + data/gnome-dummy.session.desktop.in.in + data/gnome.session.desktop.in.in + data/gnome-session-properties.desktop.in.in + data/gnome-wayland.desktop.in + data/gnome-wayland.session.desktop.in.in + [type: gettext/glade]data/session-selector.ui ++data/session-properties.desktop.in.in + [type: gettext/glade]data/session-properties.ui + gnome-session/gsm-fail-whale-dialog.c + gnome-session/gsm-manager.c + gnome-session/gsm-process-helper.c + gnome-session/gsm-util.c + gnome-session/gsm-xsmp-client.c + gnome-session/gsm-xsmp-server.c + gnome-session/main.c + tools/gnome-session-inhibit.c + tools/gnome-session-selector.c + tools/gnome-session-quit.c +diff --git a/po/POTFILES.skip b/po/POTFILES.skip +index c5d4ac9..6f57edc 100644 +--- a/po/POTFILES.skip ++++ b/po/POTFILES.skip +@@ -1,9 +1,10 @@ + # List of source files containing translatable strings that should not be + # translated. + # Please keep this file sorted alphabetically. + data/gnome-dummy.session.desktop.in + data/gnome.session.desktop.in +-data/gnome-session-properties.desktop.in ++data/session-properties.desktop.in. + data/gnome-session.schemas.in + data/gnome-wayland.session.desktop.in + data/gnome-wm.desktop.in ++data/session-properties.desktop.in +-- +2.3.7 + + +From 2ed0c1357a3fc729b2f5a86662fb15609c1d81a5 Mon Sep 17 00:00:00 2001 +From: Ray Strode +Date: Wed, 13 May 2015 10:56:09 -0400 +Subject: [PATCH 03/17] stop using gsm_util_get_current_desktop + +It no longer exists. +--- + capplet/gsp-app.c | 111 +++++++++++++++++++++++++++++------------------------- + 1 file changed, 60 insertions(+), 51 deletions(-) + +diff --git a/capplet/gsp-app.c b/capplet/gsp-app.c +index c92b8da..123ab21 100644 +--- a/capplet/gsp-app.c ++++ b/capplet/gsp-app.c +@@ -3,60 +3,61 @@ + * Copyright (C) 1999 Free Software Foundation, Inc. + * Copyright (C) 2007, 2009 Vincent Untz. + * Copyright (C) 2008 Lucas Rocha. + * Copyright (C) 2008 William Jon McCann + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + */ + + #ifdef HAVE_CONFIG_H + #include + #endif + + #include + #include + + #include + #include ++#include + + #include "gsm-app-dialog.h" + #include "gsm-properties-dialog.h" + #include "gsm-util.h" + #include "gsp-app-manager.h" + #include "gsp-keyfile.h" + + #include "gsp-app.h" + + #define GSP_APP_SAVE_DELAY 2 + + #define GSP_ASP_SAVE_MASK_HIDDEN 0x0001 + #define GSP_ASP_SAVE_MASK_ENABLED 0x0002 + #define GSP_ASP_SAVE_MASK_NAME 0x0004 + #define GSP_ASP_SAVE_MASK_EXEC 0x0008 + #define GSP_ASP_SAVE_MASK_COMMENT 0x0010 + #define GSP_ASP_SAVE_MASK_NO_DISPLAY 0x0020 + #define GSP_ASP_SAVE_MASK_ALL 0xffff + + struct _GspAppPrivate { + char *basename; + char *path; + + gboolean hidden; + gboolean no_display; + gboolean enabled; + gboolean shown; + + char *name; + char *exec; +@@ -281,148 +282,145 @@ _gsp_app_update_description (GspApp *app) + } else { + secondary = _("No description"); + } + + g_free (app->priv->description); + app->priv->description = g_markup_printf_escaped ("%s\n%s", + primary, + secondary); + } + + /* + * Saving + */ + + static void + _gsp_ensure_user_autostart_dir (void) + { + char *dir; + + dir = g_build_filename (g_get_user_config_dir (), "autostart", NULL); + g_mkdir_with_parents (dir, S_IRWXU); + + g_free (dir); + } + + static gboolean + _gsp_app_user_equal_system (GspApp *app, + char **system_path) + { + GspAppManager *manager; +- const char *system_dir; +- char *path; +- char *str; +- GKeyFile *keyfile; ++ gboolean return_value = FALSE; ++ const char *system_dir = NULL; ++ char *path = NULL; ++ char *str = NULL; ++ GKeyFile *keyfile = NULL; ++ GDesktopAppInfo *app_info = NULL; + + manager = gsp_app_manager_get (); + system_dir = gsp_app_manager_get_dir (manager, + app->priv->xdg_system_position); + g_object_unref (manager); + if (!system_dir) { +- return FALSE; ++ goto out; + } + + path = g_build_filename (system_dir, app->priv->basename, NULL); + + keyfile = g_key_file_new (); + if (!g_key_file_load_from_file (keyfile, path, G_KEY_FILE_NONE, NULL)) { +- g_free (path); +- g_key_file_free (keyfile); +- return FALSE; ++ goto out; + } + +- if (gsp_key_file_get_boolean (keyfile, +- G_KEY_FILE_DESKTOP_KEY_HIDDEN, +- FALSE) != app->priv->hidden || +- gsp_key_file_get_boolean (keyfile, +- GSP_KEY_FILE_DESKTOP_KEY_AUTOSTART_ENABLED, +- TRUE) != app->priv->enabled || +- gsp_key_file_get_shown (keyfile, +- gsm_util_get_current_desktop ()) != app->priv->shown) { +- g_free (path); +- g_key_file_free (keyfile); +- return FALSE; ++ app_info = g_desktop_app_info_new_from_keyfile (keyfile); ++ ++ if (!app_info) { ++ goto out; + } + +- if (gsp_key_file_get_boolean (keyfile, +- G_KEY_FILE_DESKTOP_KEY_NO_DISPLAY, +- FALSE) != app->priv->no_display) { +- g_free (path); +- g_key_file_free (keyfile); +- return FALSE; ++ if (g_desktop_app_info_get_is_hidden (app_info)) { ++ goto out; ++ } ++ ++ if (g_desktop_app_info_has_key (app_info, ++ GSP_KEY_FILE_DESKTOP_KEY_AUTOSTART_ENABLED) && ++ !g_desktop_app_info_get_boolean (app_info, ++ GSP_KEY_FILE_DESKTOP_KEY_AUTOSTART_ENABLED)) { ++ goto out; ++ } ++ ++ if (!g_desktop_app_info_get_show_in (app_info, NULL)) { ++ goto out; ++ } ++ ++ if (g_desktop_app_info_get_nodisplay (app_info)) { ++ goto out; + } + + str = gsp_key_file_get_locale_string (keyfile, + G_KEY_FILE_DESKTOP_KEY_NAME); + if (!_gsp_str_equal (str, app->priv->name)) { +- g_free (str); +- g_free (path); +- g_key_file_free (keyfile); +- return FALSE; ++ goto out; + } +- g_free (str); ++ g_clear_pointer (&str, g_free); + + str = gsp_key_file_get_locale_string (keyfile, + G_KEY_FILE_DESKTOP_KEY_COMMENT); + if (!_gsp_str_equal (str, app->priv->comment)) { +- g_free (str); +- g_free (path); +- g_key_file_free (keyfile); +- return FALSE; ++ goto out; + } +- g_free (str); ++ g_clear_pointer (&str, g_free); + + str = gsp_key_file_get_string (keyfile, + G_KEY_FILE_DESKTOP_KEY_EXEC); + if (!_gsp_str_equal (str, app->priv->exec)) { +- g_free (str); +- g_free (path); +- g_key_file_free (keyfile); +- return FALSE; ++ goto out; + } +- g_free (str); ++ g_clear_pointer (&str, g_free); + + str = gsp_key_file_get_locale_string (keyfile, + G_KEY_FILE_DESKTOP_KEY_ICON); + if (!_gsp_str_equal (str, app->priv->icon)) { +- g_free (str); +- g_free (path); +- g_key_file_free (keyfile); +- return FALSE; ++ goto out; + } +- g_free (str); +- +- g_key_file_free (keyfile); ++ g_clear_pointer (&str, g_free); + + *system_path = path; +- +- return TRUE; ++ path = NULL; ++ return_value = TRUE; ++out: ++ g_clear_pointer (&path, g_free); ++ g_clear_pointer (&str, g_free); ++ g_clear_object (&app_info); ++ g_clear_pointer (&keyfile, g_key_file_free); ++ ++ return return_value; + } + + static inline void + _gsp_app_save_done_success (GspApp *app) + { + app->priv->save_mask = 0; + + if (app->priv->old_system_path) { + g_free (app->priv->old_system_path); + app->priv->old_system_path = NULL; + } + } + + static gboolean + _gsp_app_save (gpointer data) + { + GspApp *app; + char *use_path; + GKeyFile *keyfile; + GError *error; + + app = GSP_APP (data); + + /* first check if removing the data from the user dir and using the + * data from the system dir is enough -- this helps us keep clean the + * user config dir by removing unneeded files */ + if (_gsp_app_user_equal_system (app, &use_path)) { + if (g_file_test (app->priv->path, G_FILE_TEST_EXISTS)) { + g_remove (app->priv->path); + } +@@ -748,153 +746,164 @@ gsp_app_delete (GspApp *app) + app->priv->hidden = TRUE; + app->priv->save_mask |= GSP_ASP_SAVE_MASK_HIDDEN; + + _gsp_app_queue_save (app); + _gsp_app_emit_changed (app); + } + } + + /* + * New autostart app + */ + + void + gsp_app_reload_at (GspApp *app, + const char *path, + unsigned int xdg_position) + { + g_return_if_fail (GSP_IS_APP (app)); + + app->priv->xdg_position = G_MAXUINT; + gsp_app_new (path, xdg_position); + } + + GspApp * + gsp_app_new (const char *path, + unsigned int xdg_position) + { + GspAppManager *manager; + GspApp *app; + GKeyFile *keyfile; ++ GDesktopAppInfo *app_info; + char *basename; + gboolean new; + + basename = g_path_get_basename (path); + + manager = gsp_app_manager_get (); + app = gsp_app_manager_find_app_with_basename (manager, basename); + g_object_unref (manager); + + new = (app == NULL); + + if (!new) { + if (app->priv->xdg_position == xdg_position) { + if (app->priv->skip_next_monitor_event) { + app->priv->skip_next_monitor_event = FALSE; + return NULL; + } + /* else: the file got changed but not by us, we'll + * update our data from disk */ + } + + if (app->priv->xdg_position < xdg_position || + app->priv->save_timeout != 0) { + /* we don't really care about this file, since we + * already have something with a higher priority, or + * we're going to write something in the user config + * anyway. + * Note: xdg_position >= 1 so it's a system dir */ + app->priv->xdg_system_position = MIN (xdg_position, + app->priv->xdg_system_position); + return NULL; + } + } + + keyfile = g_key_file_new (); + if (!g_key_file_load_from_file (keyfile, path, G_KEY_FILE_NONE, NULL)) { + g_key_file_free (keyfile); + g_free (basename); + return NULL; + } + ++ app_info = g_desktop_app_info_new_from_keyfile (keyfile); ++ ++ if (!app_info) { ++ g_object_unref (app_info); ++ g_key_file_free (keyfile); ++ g_free (basename); ++ return NULL; ++ } ++ + if (new) { + app = g_object_new (GSP_TYPE_APP, NULL); + app->priv->basename = basename; + } else { + g_free (basename); + _gsp_app_free_reusable_data (app); + } + ++ + app->priv->path = g_strdup (path); + + app->priv->hidden = gsp_key_file_get_boolean (keyfile, + G_KEY_FILE_DESKTOP_KEY_HIDDEN, + FALSE); + app->priv->no_display = gsp_key_file_get_boolean (keyfile, + G_KEY_FILE_DESKTOP_KEY_NO_DISPLAY, + FALSE); + app->priv->enabled = gsp_key_file_get_boolean (keyfile, + GSP_KEY_FILE_DESKTOP_KEY_AUTOSTART_ENABLED, + TRUE); +- app->priv->shown = gsp_key_file_get_shown (keyfile, +- gsm_util_get_current_desktop ()); ++ app->priv->shown = g_desktop_app_info_get_show_in (app_info, NULL); + + app->priv->name = gsp_key_file_get_locale_string (keyfile, + G_KEY_FILE_DESKTOP_KEY_NAME); + app->priv->exec = gsp_key_file_get_string (keyfile, + G_KEY_FILE_DESKTOP_KEY_EXEC); + app->priv->comment = gsp_key_file_get_locale_string (keyfile, + G_KEY_FILE_DESKTOP_KEY_COMMENT); + + if (gsm_util_text_is_blank (app->priv->name)) { + g_free (app->priv->name); + app->priv->name = g_strdup (app->priv->exec); + } + + app->priv->icon = gsp_key_file_get_locale_string (keyfile, + G_KEY_FILE_DESKTOP_KEY_ICON); + + if (app->priv->icon) { + /* look at icon and see if it's a themed icon or not */ + if (g_path_is_absolute (app->priv->icon)) { + GFile *iconfile; + + iconfile = g_file_new_for_path (app->priv->icon); + app->priv->gicon = g_file_icon_new (iconfile); + g_object_unref (iconfile); + } else { + app->priv->gicon = g_themed_icon_new (app->priv->icon); + } + } else { + app->priv->gicon = NULL; + } + ++ g_object_unref (app_info); + g_key_file_free (keyfile); + + _gsp_app_update_description (app); + + if (xdg_position > 0) { + g_assert (xdg_position <= app->priv->xdg_system_position); + app->priv->xdg_system_position = xdg_position; + } + /* else we keep the old value (which is G_MAXUINT if it wasn't set) */ + app->priv->xdg_position = xdg_position; + + g_assert (!new || app->priv->save_timeout == 0); + app->priv->save_timeout = 0; + app->priv->old_system_path = NULL; + app->priv->skip_next_monitor_event = FALSE; + + if (!new) { + _gsp_app_emit_changed (app); + } + + return app; + } + + static char * + _gsp_find_free_basename (const char *suggested_basename) + { + GspAppManager *manager; + char *base_path; + char *filename; + char *basename; +-- +2.3.7 + + +From 6b24a33c89913eec63a1547d5e372833e5c25a30 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Fri, 20 Dec 2013 10:48:03 -0500 -Subject: [PATCH 01/14] session-properties: show it in the menus again +Subject: [PATCH 04/17] session-properties: show it in the menus again It provides functionality for adjusting the session which customers rely on, so make it show up in the menus again. @@ -30,13 +4863,13 @@ index 3dc7b03..1a506d9 100644 X-GNOME-Bugzilla-Component=gnome-session-properties X-GNOME-Bugzilla-Version=@VERSION@ -- -1.8.3.1 +2.3.7 -From 68083665c3e7cb7d1915062820074f9b7fb42160 Mon Sep 17 00:00:00 2001 +From 9fe478de117315c714d63a73b6c143b50a57912e Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Fri, 20 Dec 2013 15:07:35 -0500 -Subject: [PATCH 02/14] session-properties: get out of Other +Subject: [PATCH 05/17] session-properties: get out of Other Put it in the menus next to Settings and Software --- @@ -64,13 +4897,13 @@ index 1a506d9..e615d5c 100644 X-GNOME-Bugzilla-Component=gnome-session-properties X-GNOME-Bugzilla-Version=@VERSION@ -- -1.8.3.1 +2.3.7 -From 80e68ffa8eaa7dbff7097521e92dbc9bb18e0b82 Mon Sep 17 00:00:00 2001 +From 0e2261200550ebe0a0e455b550b227d12c47ac50 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Fri, 20 Dec 2013 10:53:33 -0500 -Subject: [PATCH 03/14] session-properties: refresh from recent glade +Subject: [PATCH 06/17] session-properties: refresh from recent glade The ui file is rather old. This commit just opens it up in a recent glade and resaves it, so we have a fresh starting point to make @@ -442,13 +5275,13 @@ index 1f0cb9a..47a30f7 100644 -- -1.8.3.1 +2.3.7 -From 94629d6620f5b46482f72e62cc2fb58c52e01268 Mon Sep 17 00:00:00 2001 +From 70e758b03d9b4a018c196cf58d4147709ae1eb5e Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Fri, 20 Dec 2013 16:14:16 -0500 -Subject: [PATCH 04/14] manager: Don't clear saved session if autosaving is +Subject: [PATCH 07/17] manager: Don't clear saved session if autosaving is disabled Now that we support on-demand saving again, we need to make sure @@ -458,15 +5291,15 @@ we don't wipe that away at log out. 1 file changed, 1 deletion(-) diff --git a/gnome-session/gsm-manager.c b/gnome-session/gsm-manager.c -index bcd4a7e..1620bd9 100644 +index 596db92..c32bbe4 100644 --- a/gnome-session/gsm-manager.c +++ b/gnome-session/gsm-manager.c -@@ -2099,61 +2099,60 @@ on_xsmp_client_register_request (GsmXSMPClient *client, - out: - g_free (*id); - *id = new_id; +@@ -1952,61 +1952,60 @@ on_xsmp_client_register_confirmed (GsmXSMPClient *client, + app = find_app_for_startup_id (manager, id); - return handled; + if (app != NULL) { + gsm_app_registered (app); + } } static gboolean @@ -524,13 +5357,13 @@ index bcd4a7e..1620bd9 100644 cancel_end_session (manager); return; -- -1.8.3.1 +2.3.7 -From bca5ebaa433125439d4f5dad94af13b2cb4bc13f Mon Sep 17 00:00:00 2001 +From 4d41334693ccf1617f242326d1c5a9e367a54169 Mon Sep 17 00:00:00 2001 From: Josselin Mouette Date: Mon, 21 Jun 2010 15:22:23 -0400 -Subject: [PATCH 05/14] Add "Remember Currently Running Applications" button +Subject: [PATCH 08/17] Add "Remember Currently Running Applications" button This adds back session saving that's not at logout. --- @@ -548,7 +5381,7 @@ This adds back session saving that's not at logout. 11 files changed, 303 insertions(+), 4 deletions(-) diff --git a/capplet/gsm-properties-dialog.c b/capplet/gsm-properties-dialog.c -index 24bf907..4cc453a 100644 +index 33812b8..d2be778 100644 --- a/capplet/gsm-properties-dialog.c +++ b/capplet/gsm-properties-dialog.c @@ -5,70 +5,77 @@ @@ -654,7 +5487,7 @@ index 24bf907..4cc453a 100644 on_row_activated (GtkTreeView *tree_view, GtkTreePath *path, GtkTreeViewColumn *column, - GsmPropertiesDialog *dialog) + GsmPropertiesDialog *dialog) { on_edit_app_clicked (NULL, dialog); } @@ -750,16 +5583,10 @@ index 24bf907..4cc453a 100644 gtk_tree_model_filter_set_visible_column (GTK_TREE_MODEL_FILTER (tree_filter), diff --git a/configure.ac b/configure.ac -index a049b01..b71c979 100644 +index 0990e70..505292c 100644 --- a/configure.ac +++ b/configure.ac -@@ -46,60 +46,61 @@ AC_ARG_ENABLE(session-selector, AS_HELP_STRING([--enable-session-selector], - - AM_CONDITIONAL(BUILD_SESSION_SELECTOR, - [test "$enable_session_selector" = yes]) - - if test "$enable_session_selector" = yes; then - PKG_CHECK_MODULES(SESSION_SELECTOR, gtk+-3.0 gio-2.0) +@@ -52,60 +52,61 @@ if test "$enable_session_selector" = yes; then fi dnl ==================================================================== @@ -774,13 +5601,19 @@ index a049b01..b71c979 100644 PKG_CHECK_MODULES(GNOME_SESSION, glib-2.0 >= $GLIB_REQUIRED gio-2.0 >= $GLIB_REQUIRED - gtk+-3.0 >= $GTK3_REQUIRED dbus-glib-1 >= $DBUS_GLIB_REQUIRED - upower-glib >= $UPOWER_REQUIRED json-glib-1.0 >= $JSON_GLIB_REQUIRED gnome-desktop-3.0 >= $GNOME_DESKTOP_REQUIRED ) + dnl We can only support old upower + dnl https://bugzilla.gnome.org/show_bug.cgi?id=710383 + PKG_CHECK_MODULES(UPOWER, upower-glib < 0.99.0, have_old_upower=yes, have_old_upower=no) + AS_IF([test x$have_old_upower = xyes], [ + AC_DEFINE([HAVE_OLD_UPOWER], [1], [Define if we have an older upower]) + ]) + AM_CONDITIONAL(HAVE_OLD_UPOWER, test x$have_old_upower = xyes) + PKG_CHECK_MODULES(SESSION_PROPERTIES, glib-2.0 >= $GLIB_REQUIRED gtk+-3.0 >= $GTK3_REQUIRED @@ -941,10 +5774,10 @@ index 47a30f7..b43759f 100644 False 12 diff --git a/gnome-session/gsm-client.c b/gnome-session/gsm-client.c -index efabde0..46b71c1 100644 +index 543d7ef..23f0f56 100644 --- a/gnome-session/gsm-client.c +++ b/gnome-session/gsm-client.c -@@ -495,49 +495,59 @@ gsm_client_query_end_session (GsmClient *client, +@@ -493,49 +493,59 @@ gsm_client_query_end_session (GsmClient *client, g_return_val_if_fail (GSM_IS_CLIENT (client), FALSE); return GSM_CLIENT_GET_CLASS (client)->impl_query_end_session (client, flags, error); @@ -1005,10 +5838,10 @@ index efabde0..46b71c1 100644 is_ok, do_last, cancel, reason); } diff --git a/gnome-session/gsm-client.h b/gnome-session/gsm-client.h -index aeb03c2..4a90300 100644 +index 4ef5dc9..46c913a 100644 --- a/gnome-session/gsm-client.h +++ b/gnome-session/gsm-client.h -@@ -65,105 +65,111 @@ struct _GsmClient +@@ -63,105 +63,111 @@ struct _GsmClient GObject parent; GsmClientPrivate *priv; }; @@ -1121,10 +5954,10 @@ index aeb03c2..4a90300 100644 G_END_DECLS diff --git a/gnome-session/gsm-dbus-client.c b/gnome-session/gsm-dbus-client.c -index 3f7621a..691156c 100644 +index fdd43d2..16c3df0 100644 --- a/gnome-session/gsm-dbus-client.c +++ b/gnome-session/gsm-dbus-client.c -@@ -384,60 +384,73 @@ gsm_dbus_client_set_property (GObject *object, +@@ -388,60 +388,73 @@ gsm_dbus_client_set_property (GObject *object, static void gsm_dbus_client_get_property (GObject *object, guint prop_id, @@ -1198,7 +6031,7 @@ index 3f7621a..691156c 100644 if (message == NULL) { goto out; } -@@ -636,60 +649,61 @@ dbus_client_cancel_end_session (GsmClient *client, +@@ -640,60 +653,61 @@ dbus_client_cancel_end_session (GsmClient *client, return ret; } @@ -1261,17 +6094,17 @@ index 3f7621a..691156c 100644 "bus-name", bus_name, NULL); diff --git a/gnome-session/gsm-manager.c b/gnome-session/gsm-manager.c -index 1620bd9..e2a493f 100644 +index c32bbe4..67e0c82 100644 --- a/gnome-session/gsm-manager.c +++ b/gnome-session/gsm-manager.c -@@ -60,60 +60,61 @@ +@@ -55,60 +55,61 @@ + #include "gsm-xsmp-client.h" + #include "gsm-dbus-client.h" + #include "gsm-autostart-app.h" #include "gsm-util.h" - #include "gdm.h" - #include "gsm-logout-dialog.h" #include "gsm-icon-names.h" - #include "gsm-inhibit-dialog.h" #include "gsm-system.h" #include "gsm-session-save.h" #include "gsm-shell-extensions.h" @@ -1325,8 +6158,13 @@ index 1620bd9..e2a493f 100644 GSM_MANAGER_LOGOUT_LOGOUT, GSM_MANAGER_LOGOUT_REBOOT, GSM_MANAGER_LOGOUT_REBOOT_INTERACT, - GSM_MANAGER_LOGOUT_REBOOT_GDM, -@@ -1338,60 +1339,123 @@ end_session_or_show_shell_dialog (GsmManager *manager) + GSM_MANAGER_LOGOUT_SHUTDOWN, +@@ -1177,60 +1178,123 @@ end_session_or_show_shell_dialog (GsmManager *manager) + end_phase (manager); + } + break; + + case GSM_MANAGER_LOGOUT_MODE_FORCE: end_phase (manager); break; default: @@ -1349,12 +6187,7 @@ index 1620bd9..e2a493f 100644 manager->priv->query_timeout_id = 0; } - if (gsm_shell_is_running (manager->priv->shell)) { - end_session_or_show_shell_dialog (manager); - } else { - end_session_or_show_fallback_dialog (manager); - } - + end_session_or_show_shell_dialog (manager); } +static gboolean @@ -1450,7 +6283,7 @@ index 1620bd9..e2a493f 100644 manager->priv->query_timeout_id = 0; g_debug ("GsmManager: query end session timed out"); -@@ -1418,60 +1482,75 @@ _on_query_end_session_timeout (GsmManager *manager) +@@ -1257,60 +1321,75 @@ _on_query_end_session_timeout (GsmManager *manager) bus_name = NULL; } @@ -1526,7 +6359,7 @@ index 1620bd9..e2a493f 100644 } static void -@@ -2119,67 +2198,86 @@ maybe_save_session (GsmManager *manager) +@@ -1972,67 +2051,86 @@ maybe_save_session (GsmManager *manager) return; /* We only allow session saving when session is running or when @@ -1615,7 +6448,7 @@ index 1620bd9..e2a493f 100644 } cookie = _generate_unique_cookie (manager); -@@ -2240,80 +2338,93 @@ on_client_end_session_response (GsmClient *client, +@@ -2093,84 +2191,97 @@ on_client_end_session_response (GsmClient *client, client, is_ok, do_last, @@ -1672,6 +6505,10 @@ index 1620bd9..e2a493f 100644 G_CALLBACK (on_xsmp_client_register_request), manager); g_signal_connect (client, + "register-confirmed", + G_CALLBACK (on_xsmp_client_register_confirmed), + manager); + g_signal_connect (client, "logout-request", G_CALLBACK (on_xsmp_client_logout_request), manager); @@ -1709,31 +6546,31 @@ index 1620bd9..e2a493f 100644 if (store != NULL) { g_object_ref (store); } -@@ -3506,60 +3617,95 @@ gsm_manager_reboot (GsmManager *manager, - g_return_val_if_fail (GSM_IS_MANAGER (manager), FALSE); - +@@ -3127,60 +3238,95 @@ gsm_manager_reboot (GsmManager *manager, if (manager->priv->phase != GSM_MANAGER_PHASE_RUNNING) { - g_set_error (error, - GSM_MANAGER_ERROR, - GSM_MANAGER_ERROR_NOT_IN_RUNNING, - "Reboot interface is only available during the Running phase"); + error = g_error_new (GSM_MANAGER_ERROR, + GSM_MANAGER_ERROR_NOT_IN_RUNNING, + "Reboot interface is only available during the Running phase"); + dbus_g_method_return_error (context, error); + g_error_free (error); return FALSE; } if (_log_out_is_locked_down (manager)) { - g_set_error (error, - GSM_MANAGER_ERROR, - GSM_MANAGER_ERROR_LOCKED_DOWN, - "Logout has been locked down"); + error = g_error_new (GSM_MANAGER_ERROR, + GSM_MANAGER_ERROR_LOCKED_DOWN, + "Logout has been locked down"); + dbus_g_method_return_error (context, error); + g_error_free (error); return FALSE; } - shell_running = gsm_shell_is_running (manager->priv->shell); + task = g_task_new (manager, manager->priv->end_session_cancellable, (GAsyncReadyCallback) complete_end_session_task, context); - if (!shell_running) - show_fallback_shutdown_dialog (manager, TRUE); - else - request_reboot (manager); + manager->priv->pending_end_session_tasks = g_slist_prepend (manager->priv->pending_end_session_tasks, + task); + + request_reboot (manager); return TRUE; } @@ -1806,10 +6643,10 @@ index 1620bd9..e2a493f 100644 GSM_MANAGER_ERROR, GSM_MANAGER_ERROR_NOT_IN_RUNNING, diff --git a/gnome-session/gsm-manager.h b/gnome-session/gsm-manager.h -index f9632d7..9dbc814 100644 +index a0030b9..bc16654 100644 --- a/gnome-session/gsm-manager.h +++ b/gnome-session/gsm-manager.h -@@ -134,60 +134,63 @@ void _gsm_manager_set_active_session (GsmManager * +@@ -137,60 +137,63 @@ void _gsm_manager_set_active_session (GsmManager * /* exported methods */ @@ -1836,9 +6673,9 @@ index f9632d7..9dbc814 100644 GError *error); gboolean gsm_manager_shutdown (GsmManager *manager, - GError **error); + DBusGMethodInvocation *context); gboolean gsm_manager_reboot (GsmManager *manager, - GError **error); + DBusGMethodInvocation *context); +gboolean gsm_manager_save_session (GsmManager *manager, + GError **error); @@ -1874,11 +6711,10 @@ index f9632d7..9dbc814 100644 gboolean *handled, GError **error); diff --git a/gnome-session/gsm-xsmp-client.c b/gnome-session/gsm-xsmp-client.c -index f84fab3..a80e79b 100644 +index c256acb..1cfb47f 100644 --- a/gnome-session/gsm-xsmp-client.c +++ b/gnome-session/gsm-xsmp-client.c -@@ -40,60 +40,61 @@ - +@@ -39,60 +39,61 @@ #define GsmDesktopFile "_GSM_DesktopFile" #define GSM_XSMP_CLIENT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GSM_TYPE_XSMP_CLIENT, GsmXSMPClientPrivate)) @@ -1907,6 +6743,7 @@ index f84fab3..a80e79b 100644 enum { REGISTER_REQUEST, + REGISTER_CONFIRMED, LOGOUT_REQUEST, + SAVE_REQUEST, LAST_SIGNAL @@ -1939,7 +6776,7 @@ index f84fab3..a80e79b 100644 keep_going = FALSE; break; -@@ -473,60 +474,84 @@ xsmp_interact (GsmClient *client) +@@ -472,60 +473,84 @@ xsmp_interact (GsmClient *client) SmsInteract (xsmp->priv->conn); } @@ -2024,7 +6861,7 @@ index f84fab3..a80e79b 100644 desktop_file_path = gsm_util_find_desktop_file_for_app_name (program_name, TRUE, FALSE); -@@ -956,90 +981,102 @@ xsmp_get_unix_process_id (GsmClient *client) +@@ -955,100 +980,112 @@ xsmp_get_unix_process_id (GsmClient *client) gboolean res; g_debug ("GsmXSMPClient: getting pid"); @@ -2075,6 +6912,16 @@ index f84fab3..a80e79b 100644 NULL, G_TYPE_BOOLEAN, 1, G_TYPE_POINTER); + signals[REGISTER_CONFIRMED] = + g_signal_new ("register-confirmed", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (GsmXSMPClientClass, register_confirmed), + NULL, + NULL, + NULL, + G_TYPE_NONE, + 1, G_TYPE_POINTER); signals[LOGOUT_REQUEST] = g_signal_new ("logout-request", G_OBJECT_CLASS_TYPE (object_class), @@ -2128,12 +6975,10 @@ index f84fab3..a80e79b 100644 gboolean handled; char *id; diff --git a/gnome-session/gsm-xsmp-client.h b/gnome-session/gsm-xsmp-client.h -index b80f933..8f9ddd9 100644 +index 1bb2797..6b95c51 100644 --- a/gnome-session/gsm-xsmp-client.h +++ b/gnome-session/gsm-xsmp-client.h -@@ -27,61 +27,62 @@ - - G_BEGIN_DECLS +@@ -27,61 +27,62 @@ G_BEGIN_DECLS #define GSM_TYPE_XSMP_CLIENT (gsm_xsmp_client_get_type ()) #define GSM_XSMP_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GSM_TYPE_XSMP_CLIENT, GsmXSMPClient)) @@ -2160,6 +7005,8 @@ index b80f933..8f9ddd9 100644 /* signals */ gboolean (*register_request) (GsmXSMPClient *client, char **client_id); + void (*register_confirmed) (GsmXSMPClient *client, + const char *client_id); gboolean (*logout_request) (GsmXSMPClient *client, gboolean prompt); - @@ -2196,12 +7043,10 @@ index b80f933..8f9ddd9 100644 G_END_DECLS diff --git a/gnome-session/org.gnome.SessionManager.xml b/gnome-session/org.gnome.SessionManager.xml -index eb69180..873e250 100644 +index 8c31694..eacac4b 100644 --- a/gnome-session/org.gnome.SessionManager.xml +++ b/gnome-session/org.gnome.SessionManager.xml -@@ -259,60 +259,68 @@ - - +@@ -261,60 +261,68 @@ True if condition is handled, false otherwise @@ -2215,6 +7060,7 @@ index eb69180..873e250 100644 + Request a shutdown dialog. @@ -2223,6 +7069,7 @@ index eb69180..873e250 100644 + Request a reboot dialog. @@ -2269,13 +7116,13 @@ index eb69180..873e250 100644 Normal. -- -1.8.3.1 +2.3.7 -From 50ed23822cd3318518f6427f19889b944f4d4cc8 Mon Sep 17 00:00:00 2001 +From 7b1c1782ef895a536f95d83e0d6596dd076ee32f Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Fri, 20 Dec 2013 11:22:07 -0500 -Subject: [PATCH 06/14] Revert "Allow saved-session to be a symlink" +Subject: [PATCH 09/17] Revert "Allow saved-session to be a symlink" This reverts commit b733c2ee519b65c3c4eab0d0e93056412f995f3f. --- @@ -2284,18 +7131,18 @@ This reverts commit b733c2ee519b65c3c4eab0d0e93056412f995f3f. 2 files changed, 34 insertions(+), 4 deletions(-) diff --git a/gnome-session/gsm-session-save.c b/gnome-session/gsm-session-save.c -index aeb575f..ceea177 100644 +index 025eeea..131a58b 100644 --- a/gnome-session/gsm-session-save.c +++ b/gnome-session/gsm-session-save.c -@@ -11,61 +11,61 @@ +@@ -9,61 +9,61 @@ + * + * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * along with this program; if not, see . */ #include @@ -2350,7 +7197,7 @@ index aeb575f..ceea177 100644 } contents = g_key_file_to_data (keyfile, &length, &local_error); -@@ -114,89 +114,113 @@ save_one_client (char *id, +@@ -112,89 +112,113 @@ save_one_client (char *id, } g_debug ("GsmSessionSave: saved client %s to %s", id, filename); @@ -2444,7 +7291,7 @@ index aeb575f..ceea177 100644 GHashTable *discard_hash) { gboolean result = TRUE; - GKeyFile *key_file = NULL; + GKeyFile *key_file; char *discard_exec = NULL; g_debug ("GsmSessionSave: removing '%s' from saved session", filename); @@ -2468,10 +7315,10 @@ index aeb575f..ceea177 100644 if (!g_shell_parse_argv (discard_exec, &argc, &argv, NULL)) goto out; diff --git a/gnome-session/gsm-util.c b/gnome-session/gsm-util.c -index b4036f6..402ac69 100644 +index ff6484c..bf24830 100644 --- a/gnome-session/gsm-util.c +++ b/gnome-session/gsm-util.c -@@ -73,63 +73,69 @@ gsm_util_find_desktop_file_for_app_name (const char *name, +@@ -71,63 +71,69 @@ gsm_util_find_desktop_file_for_app_name (const char *name, g_debug ("GsmUtil: found in XDG dirs: '%s'", app_path); } @@ -2542,13 +7389,13 @@ index b4036f6..402ac69 100644 if (dir) { while ((filename = g_dir_read_name (dir))) { -- -1.8.3.1 +2.3.7 -From ca6ffa85dfc46ba5085ba5e81c3824214abc3ac6 Mon Sep 17 00:00:00 2001 +From efdb8db827399dadd3b8638b201e7da81f6e9592 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Fri, 20 Dec 2013 11:22:53 -0500 -Subject: [PATCH 07/14] Allow saved-session directory to be a symlink +Subject: [PATCH 10/17] Allow saved-session directory to be a symlink This gives us the option of adding a rudimentary session chooser later. @@ -2558,10 +7405,10 @@ chooser later. 2 files changed, 30 insertions(+), 12 deletions(-) diff --git a/gnome-session/gsm-session-save.c b/gnome-session/gsm-session-save.c -index ceea177..2fe0bb0 100644 +index 131a58b..ea23be5 100644 --- a/gnome-session/gsm-session-save.c +++ b/gnome-session/gsm-session-save.c -@@ -150,67 +150,91 @@ gsm_session_save (GsmStore *client_store, +@@ -148,67 +148,91 @@ gsm_session_save (GsmStore *client_store, * one shot only) */ settings = g_settings_new (GSM_MANAGER_SCHEMA); @@ -2646,7 +7493,7 @@ index ceea177..2fe0bb0 100644 GHashTable *discard_hash) { gboolean result = TRUE; - GKeyFile *key_file = NULL; + GKeyFile *key_file; char *discard_exec = NULL; g_debug ("GsmSessionSave: removing '%s' from saved session", filename); @@ -2660,10 +7507,10 @@ index ceea177..2fe0bb0 100644 discard_exec = g_key_file_get_string (key_file, G_KEY_FILE_DESKTOP_GROUP, diff --git a/gnome-session/gsm-util.c b/gnome-session/gsm-util.c -index 402ac69..b4036f6 100644 +index bf24830..ff6484c 100644 --- a/gnome-session/gsm-util.c +++ b/gnome-session/gsm-util.c -@@ -73,69 +73,63 @@ gsm_util_find_desktop_file_for_app_name (const char *name, +@@ -71,69 +71,63 @@ gsm_util_find_desktop_file_for_app_name (const char *name, g_debug ("GsmUtil: found in XDG dirs: '%s'", app_path); } @@ -2734,13 +7581,13 @@ index 402ac69..b4036f6 100644 if (dir) { while ((filename = g_dir_read_name (dir))) { -- -1.8.3.1 +2.3.7 -From ce646ac4da600b46dfc5a0605ec0c85f0a3a4f35 Mon Sep 17 00:00:00 2001 +From fdc43e0cc51bf0d16bb9173bd3a23cf27c1ed2b3 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Fri, 20 Dec 2013 11:28:53 -0500 -Subject: [PATCH 08/14] Tie session selector to properties dialog +Subject: [PATCH 11/17] Tie session selector to properties dialog --- capplet/gsm-properties-dialog.c | 30 +++++- @@ -2751,7 +7598,7 @@ Subject: [PATCH 08/14] Tie session selector to properties dialog 5 files changed, 200 insertions(+), 47 deletions(-) diff --git a/capplet/gsm-properties-dialog.c b/capplet/gsm-properties-dialog.c -index 4cc453a..cabe96a 100644 +index d2be778..51fa510 100644 --- a/capplet/gsm-properties-dialog.c +++ b/capplet/gsm-properties-dialog.c @@ -471,88 +471,114 @@ session_saved_message (GsmPropertiesDialog *dialog, @@ -2872,10 +7719,10 @@ index 4cc453a..cabe96a 100644 treeview = GTK_TREE_VIEW (gtk_builder_get_object (dialog->priv->xml, diff --git a/configure.ac b/configure.ac -index b71c979..a61d88e 100644 +index 505292c..9b97c15 100644 --- a/configure.ac +++ b/configure.ac -@@ -21,86 +21,85 @@ LT_PREREQ([2.2.6]) +@@ -21,92 +21,91 @@ LT_PREREQ([2.2.6]) LT_INIT([dlopen disable-static]) GNOME_MAINTAINER_MODE_DEFINES @@ -2896,7 +7743,7 @@ index b71c979..a61d88e 100644 DBUS_GLIB_REQUIRED=0.76 UPOWER_REQUIRED=0.9.0 JSON_GLIB_REQUIRED=0.10 - GNOME_DESKTOP_REQUIRED=3.7.90 + GNOME_DESKTOP_REQUIRED=3.9.91 AC_ARG_ENABLE(session-selector, AS_HELP_STRING([--enable-session-selector], [enable building a custom session selector dialog]), @@ -2922,13 +7769,19 @@ index b71c979..a61d88e 100644 PKG_CHECK_MODULES(GNOME_SESSION, glib-2.0 >= $GLIB_REQUIRED gio-2.0 >= $GLIB_REQUIRED - gtk+-3.0 >= $GTK3_REQUIRED dbus-glib-1 >= $DBUS_GLIB_REQUIRED - upower-glib >= $UPOWER_REQUIRED json-glib-1.0 >= $JSON_GLIB_REQUIRED gnome-desktop-3.0 >= $GNOME_DESKTOP_REQUIRED ) + dnl We can only support old upower + dnl https://bugzilla.gnome.org/show_bug.cgi?id=710383 + PKG_CHECK_MODULES(UPOWER, upower-glib < 0.99.0, have_old_upower=yes, have_old_upower=no) + AS_IF([test x$have_old_upower = xyes], [ + AC_DEFINE([HAVE_OLD_UPOWER], [1], [Define if we have an older upower]) + ]) + AM_CONDITIONAL(HAVE_OLD_UPOWER, test x$have_old_upower = xyes) + PKG_CHECK_MODULES(SESSION_PROPERTIES, glib-2.0 >= $GLIB_REQUIRED gtk+-3.0 >= $GTK3_REQUIRED @@ -3031,11 +7884,10 @@ index 1c55712..1534a74 100644 True never diff --git a/tools/Makefile.am b/tools/Makefile.am -index ba8a6e8..2685609 100644 +index 57b82c7..715affe 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am -@@ -47,37 +47,38 @@ gnome_session_check_accelerated_helper_SOURCES = \ - gnome_session_check_accelerated_helper_CPPFLAGS = \ +@@ -49,37 +49,38 @@ gnome_session_check_accelerated_helper_CPPFLAGS = \ -DPKGDATADIR=\""$(pkgdatadir)"\" \ $(GL_TEST_CFLAGS) @@ -3043,7 +7895,8 @@ index ba8a6e8..2685609 100644 $(GL_TEST_LIBS) \ $(X11_LIBS) - gnome_session_check_accelerated_SOURCES = \ + gnome_session_check_accelerated_SOURCES = \ + gnome-session-check-accelerated-common.h \ gnome-session-check-accelerated.c gnome_session_check_accelerated_CPPFLAGS = \ @@ -3074,10 +7927,11 @@ index ba8a6e8..2685609 100644 -include $(top_srcdir)/git.mk diff --git a/tools/gnome-session-selector.c b/tools/gnome-session-selector.c -index dad88b4..54541d3 100644 +index d7584ff..8f37eca 100644 --- a/tools/gnome-session-selector.c +++ b/tools/gnome-session-selector.c -@@ -8,126 +8,133 @@ +@@ -7,126 +7,133 @@ + * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, @@ -3086,8 +7940,7 @@ index dad88b4..54541d3 100644 * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * along with this program; if not, see . * * Written by: Matthias Clasen */ @@ -3213,7 +8066,7 @@ index dad88b4..54541d3 100644 } while (gtk_tree_model_iter_next (GTK_TREE_MODEL (store), &iter)); info_bar = (GtkWidget *) gtk_builder_get_object (builder, "info-bar"); -@@ -183,517 +190,637 @@ populate_session_list (GtkWidget *session_list) +@@ -182,517 +189,637 @@ populate_session_list (GtkWidget *session_list) default_name = NULL; if (readlink (saved_session, last_session, PATH_MAX - 1) > 0) { default_name = g_path_get_basename (last_session); @@ -3892,13 +8745,13 @@ index dad88b4..54541d3 100644 return 0; } -- -1.8.3.1 +2.3.7 -From da7acee836dc0c06079811f445d9054cf9f7ab73 Mon Sep 17 00:00:00 2001 +From ebf36d525604940d33f23732ddeb6c8ab306a7b0 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Fri, 20 Dec 2013 11:32:52 -0500 -Subject: [PATCH 09/14] make save-session stall until it finishes +Subject: [PATCH 12/17] make save-session stall until it finishes --- gnome-session/gsm-manager.c | 58 ++++++++++++++++++++++++++---- @@ -3907,13 +8760,13 @@ Subject: [PATCH 09/14] make save-session stall until it finishes 3 files changed, 53 insertions(+), 8 deletions(-) diff --git a/gnome-session/gsm-manager.c b/gnome-session/gsm-manager.c -index e2a493f..30b31f9 100644 +index 67e0c82..2af3358 100644 --- a/gnome-session/gsm-manager.c +++ b/gnome-session/gsm-manager.c -@@ -121,60 +121,61 @@ typedef enum +@@ -114,60 +114,61 @@ typedef enum + GSM_MANAGER_LOGOUT_REBOOT_INTERACT, GSM_MANAGER_LOGOUT_SHUTDOWN, GSM_MANAGER_LOGOUT_SHUTDOWN_INTERACT, - GSM_MANAGER_LOGOUT_SHUTDOWN_GDM } GsmManagerLogoutType; struct GsmManagerPrivate @@ -3945,12 +8798,13 @@ index e2a493f..30b31f9 100644 /* This is the action that will be done just before we exit */ GsmManagerLogoutType logout_type; - GtkWidget *inhibit_dialog; - /* List of clients which were disconnected due to disabled condition * and shouldn't be automatically restarted */ GSList *condition_clients; + GSList *pending_end_session_tasks; + GCancellable *end_session_cancellable; + GSettings *settings; GSettings *session_settings; GSettings *screensaver_settings; @@ -3971,8 +8825,7 @@ index e2a493f..30b31f9 100644 enum { PROP_0, - PROP_CLIENT_STORE, -@@ -1369,90 +1370,124 @@ query_end_session_complete (GsmManager *manager) +@@ -1208,90 +1209,124 @@ query_end_session_complete (GsmManager *manager) static gboolean _client_request_save (GsmClient *client, ClientEndSessionData *data) @@ -4097,31 +8950,31 @@ index e2a493f..30b31f9 100644 { GSList *l; -@@ -3617,92 +3652,101 @@ gsm_manager_reboot (GsmManager *manager, - g_return_val_if_fail (GSM_IS_MANAGER (manager), FALSE); - +@@ -3238,92 +3273,101 @@ gsm_manager_reboot (GsmManager *manager, if (manager->priv->phase != GSM_MANAGER_PHASE_RUNNING) { - g_set_error (error, - GSM_MANAGER_ERROR, - GSM_MANAGER_ERROR_NOT_IN_RUNNING, - "Reboot interface is only available during the Running phase"); + error = g_error_new (GSM_MANAGER_ERROR, + GSM_MANAGER_ERROR_NOT_IN_RUNNING, + "Reboot interface is only available during the Running phase"); + dbus_g_method_return_error (context, error); + g_error_free (error); return FALSE; } if (_log_out_is_locked_down (manager)) { - g_set_error (error, - GSM_MANAGER_ERROR, - GSM_MANAGER_ERROR_LOCKED_DOWN, - "Logout has been locked down"); + error = g_error_new (GSM_MANAGER_ERROR, + GSM_MANAGER_ERROR_LOCKED_DOWN, + "Logout has been locked down"); + dbus_g_method_return_error (context, error); + g_error_free (error); return FALSE; } - shell_running = gsm_shell_is_running (manager->priv->shell); + task = g_task_new (manager, manager->priv->end_session_cancellable, (GAsyncReadyCallback) complete_end_session_task, context); - if (!shell_running) - show_fallback_shutdown_dialog (manager, TRUE); - else - request_reboot (manager); + manager->priv->pending_end_session_tasks = g_slist_prepend (manager->priv->pending_end_session_tasks, + task); + + request_reboot (manager); return TRUE; } @@ -4207,10 +9060,10 @@ index e2a493f..30b31f9 100644 if (manager->priv->phase != GSM_MANAGER_PHASE_RUNNING) { diff --git a/gnome-session/gsm-manager.h b/gnome-session/gsm-manager.h -index 9dbc814..ca29b65 100644 +index bc16654..c365596 100644 --- a/gnome-session/gsm-manager.h +++ b/gnome-session/gsm-manager.h -@@ -135,61 +135,61 @@ void _gsm_manager_set_active_session (GsmManager * +@@ -138,61 +138,61 @@ void _gsm_manager_set_active_session (GsmManager * /* exported methods */ gboolean gsm_manager_register_client (GsmManager *manager, @@ -4236,9 +9089,9 @@ index 9dbc814..ca29b65 100644 GError *error); gboolean gsm_manager_shutdown (GsmManager *manager, - GError **error); + DBusGMethodInvocation *context); gboolean gsm_manager_reboot (GsmManager *manager, - GError **error); + DBusGMethodInvocation *context); gboolean gsm_manager_save_session (GsmManager *manager, - GError **error); @@ -4274,12 +9127,10 @@ index 9dbc814..ca29b65 100644 const char *condition, gboolean *handled, diff --git a/gnome-session/org.gnome.SessionManager.xml b/gnome-session/org.gnome.SessionManager.xml -index 873e250..d9fb216 100644 +index eacac4b..81d3da1 100644 --- a/gnome-session/org.gnome.SessionManager.xml +++ b/gnome-session/org.gnome.SessionManager.xml -@@ -260,60 +260,61 @@ - - +@@ -262,60 +262,61 @@ True if condition is handled, false otherwise @@ -4292,6 +9143,7 @@ index 873e250..d9fb216 100644 + Request a shutdown dialog. @@ -4300,6 +9152,7 @@ index 873e250..d9fb216 100644 + Request a reboot dialog. @@ -4340,13 +9193,13 @@ index 873e250..d9fb216 100644 Request a logout dialog -- -1.8.3.1 +2.3.7 -From e41b19c1d28b672f0c9d166d52b4e7028b92c451 Mon Sep 17 00:00:00 2001 +From b7ed1a7fd45a0dac66353f8ec5b8f30a5f0207a8 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Fri, 20 Dec 2013 15:32:04 -0500 -Subject: [PATCH 10/14] manager: save session type in session dir +Subject: [PATCH 13/17] manager: save session type in session dir If a user saved their session when in classic mode, make sure we record that information so subsequent calls to gnome-session will @@ -4360,10 +9213,10 @@ restore classic mode. 5 files changed, 72 insertions(+), 10 deletions(-) diff --git a/gnome-session/gsm-manager.c b/gnome-session/gsm-manager.c -index 30b31f9..f6ccb62 100644 +index 2af3358..8a8943d 100644 --- a/gnome-session/gsm-manager.c +++ b/gnome-session/gsm-manager.c -@@ -1426,61 +1426,61 @@ finish_pending_save_invocations (GsmManager *manager) +@@ -1265,61 +1265,61 @@ finish_pending_save_invocations (GsmManager *manager) g_slist_free (manager->priv->pending_save_invocations); manager->priv->pending_save_invocations = NULL; } @@ -4426,10 +9279,10 @@ index 30b31f9..f6ccb62 100644 } while (gsm_store_find (manager->priv->inhibitors, (GsmStoreFunc)_find_by_cookie, &cookie) != NULL); return cookie; -@@ -1687,60 +1687,77 @@ debug_app_summary (GsmManager *manager) +@@ -1532,60 +1532,77 @@ debug_app_summary (GsmManager *manager) g_debug ("GsmManager: App startup summary"); - for (phase = GSM_MANAGER_PHASE_INITIALIZATION; phase < GSM_MANAGER_PHASE_RUNNING; phase++) { + for (phase = GSM_MANAGER_PHASE_EARLY_INITIALIZATION; phase < GSM_MANAGER_PHASE_RUNNING; phase++) { g_debug ("GsmManager: Phase %s", phase_num_to_name (phase)); gsm_store_foreach (manager->priv->apps, (GsmStoreFunc)_debug_app_for_phase, @@ -4445,7 +9298,7 @@ index 30b31f9..f6ccb62 100644 g_return_if_fail (GSM_IS_MANAGER (manager)); gsm_xsmp_server_start (manager->priv->xsmp_server); - gsm_manager_set_phase (manager, GSM_MANAGER_PHASE_INITIALIZATION); + gsm_manager_set_phase (manager, GSM_MANAGER_PHASE_EARLY_INITIALIZATION); debug_app_summary (manager); start_phase (manager); } @@ -4504,8 +9357,8 @@ index 30b31f9..f6ccb62 100644 (GsmStoreFunc)_app_has_app_id, (char *)app_id); return app; -@@ -2217,61 +2234,61 @@ on_xsmp_client_register_request (GsmXSMPClient *client, - return handled; +@@ -2070,61 +2087,61 @@ on_xsmp_client_register_confirmed (GsmXSMPClient *client, + } } static gboolean @@ -4568,10 +9421,10 @@ index 30b31f9..f6ccb62 100644 manager->priv->query_clients = g_slist_remove (manager->priv->query_clients, client); diff --git a/gnome-session/gsm-manager.h b/gnome-session/gsm-manager.h -index ca29b65..6f94f92 100644 +index c365596..d10879b 100644 --- a/gnome-session/gsm-manager.h +++ b/gnome-session/gsm-manager.h -@@ -100,60 +100,61 @@ typedef enum +@@ -103,60 +103,61 @@ typedef enum } GsmManagerError; #define GSM_MANAGER_ERROR gsm_manager_error_quark () @@ -4634,10 +9487,10 @@ index ca29b65..6f94f92 100644 gboolean gsm_manager_shutdown (GsmManager *manager, diff --git a/gnome-session/gsm-session-save.c b/gnome-session/gsm-session-save.c -index 2fe0bb0..07956b7 100644 +index ea23be5..06eeeb1 100644 --- a/gnome-session/gsm-session-save.c +++ b/gnome-session/gsm-session-save.c -@@ -1,75 +1,107 @@ +@@ -1,73 +1,105 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- * gsm-session-save.c * Copyright (C) 2008 Lucas Rocha. @@ -4653,9 +9506,7 @@ index 2fe0bb0..07956b7 100644 * Lesser General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * along with this program; if not, see . */ #include @@ -4745,7 +9596,7 @@ index 2fe0bb0..07956b7 100644 if (local_error) { goto out; } -@@ -109,112 +141,114 @@ save_one_client (char *id, +@@ -107,112 +139,114 @@ save_one_client (char *id, GSM_AUTOSTART_APP_DISCARD_KEY, NULL); if (discard_exec) { @@ -4863,7 +9714,7 @@ index 2fe0bb0..07956b7 100644 g_hash_table_destroy (data.discard_hash); g_free (tmp_dir); -@@ -294,31 +328,32 @@ gsm_session_clear_saved_session (const char *directory, +@@ -292,31 +326,32 @@ gsm_session_clear_saved_session (const char *directory, while ((filename = g_dir_read_name (dir))) { char *path = g_build_filename (directory, @@ -4897,10 +9748,10 @@ index 2fe0bb0..07956b7 100644 + clear_session_type (save_dir); } diff --git a/gnome-session/gsm-session-save.h b/gnome-session/gsm-session-save.h -index 10b5005..ed7fea2 100644 +index e623260..c91b561 100644 --- a/gnome-session/gsm-session-save.h +++ b/gnome-session/gsm-session-save.h -@@ -1,35 +1,36 @@ +@@ -1,33 +1,34 @@ /* gsm-session-save.h * Copyright (C) 2008 Lucas Rocha. * @@ -4915,9 +9766,7 @@ index 10b5005..ed7fea2 100644 * Lesser General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * along with this program; if not, see . */ #ifndef __GSM_SESSION_SAVE_H__ @@ -4940,14 +9789,10 @@ index 10b5005..ed7fea2 100644 #endif /* __GSM_SESSION_SAVE_H__ */ diff --git a/gnome-session/main.c b/gnome-session/main.c -index dc6db5f..b72f2bc 100644 +index fce5e86..52d2aaa 100644 --- a/gnome-session/main.c +++ b/gnome-session/main.c -@@ -252,60 +252,61 @@ require_dbus_session (int argc, - } - - /* Should not be reached */ - return TRUE; +@@ -270,60 +270,61 @@ require_dbus_session (int argc, } static gboolean @@ -4956,6 +9801,11 @@ index dc6db5f..b72f2bc 100644 int status; char *argv[] = { LIBEXECDIR "/gnome-session-check-accelerated", NULL }; + if (getenv ("DISPLAY") == NULL) { + /* Not connected to X11, someone else will take care of checking GL */ + return TRUE; + } + if (!g_spawn_sync (NULL, (char **) argv, NULL, 0, NULL, NULL, NULL, NULL, &status, error)) { return FALSE; @@ -4968,7 +9818,6 @@ index dc6db5f..b72f2bc 100644 main (int argc, char **argv) { GError *error = NULL; - char *display_str; GsmManager *manager; GsmStore *client_store; static char **override_autostart_dirs = NULL; @@ -4976,6 +9825,7 @@ index dc6db5f..b72f2bc 100644 const char *session_name; + char *saved_session_name = NULL; gboolean gl_failed = FALSE; + GOptionContext *options; static GOptionEntry entries[] = { { "autostart", 'a', 0, G_OPTION_ARG_STRING_ARRAY, &override_autostart_dirs, N_("Override standard autostart directories"), N_("AUTOSTART_DIR") }, { "session", 0, 0, G_OPTION_ARG_STRING, &opt_session_name, N_("Session to use"), N_("SESSION_NAME") }, @@ -5004,8 +9854,7 @@ index dc6db5f..b72f2bc 100644 if (!check_gl (&error)) { g_warning ("software acceleration check failed: %s", error? error->message : ""); - g_clear_error (&error); -@@ -382,53 +383,60 @@ main (int argc, char **argv) +@@ -402,53 +403,60 @@ main (int argc, char **argv) gsm_util_setenv ("XDG_MENU_PREFIX", "gnome-"); client_store = gsm_store_new (); @@ -5019,7 +9868,7 @@ index dc6db5f..b72f2bc 100644 if (!acquire_name ()) { gsm_fail_whale_dialog_we_failed (TRUE, TRUE, NULL); - gtk_main (); + gsm_main (); exit (1); } @@ -5058,7 +9907,7 @@ index dc6db5f..b72f2bc 100644 gsm_manager_start (manager); - gtk_main (); + gsm_main (); g_clear_object (&manager); g_clear_object (&client_store); @@ -5070,13 +9919,13 @@ index dc6db5f..b72f2bc 100644 return 0; } -- -1.8.3.1 +2.3.7 -From 3dc13d7502b8dc4a9fa0f168ade9aa776cf2d5e9 Mon Sep 17 00:00:00 2001 +From c9c7daa61e77f86a4b3cd53ae55af3ad93e8b406 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Tue, 7 Jan 2014 21:16:23 -0500 -Subject: [PATCH 11/14] session-selector: restore saved session mode +Subject: [PATCH 14/17] session-selector: restore saved session mode When using the custom session selector, we need to know whether to use classic mode or not. @@ -5113,13 +9962,13 @@ index 07fdb0c..358aee0 100644 + +exec gnome-session "$session_type_argument" -- -1.8.3.1 +2.3.7 -From 25088eb65e4bf96a2b17028ae97eb48cf3c5a4dd Mon Sep 17 00:00:00 2001 +From ded037a059a781042d61e3bc7ef1ced0c9ee706f Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Fri, 20 Dec 2013 10:53:33 -0500 -Subject: [PATCH 12/14] session-selector: refresh from recent glade +Subject: [PATCH 15/17] session-selector: refresh from recent glade The ui file is rather old. This commit just opens it up in a recent glade and resaves it, so we have a fresh starting point to make @@ -5383,13 +10232,13 @@ index 1534a74..4d1e300 100644 + -- -1.8.3.1 +2.3.7 -From d6274d2a56ca17001d8530ec6fd00b918d196356 Mon Sep 17 00:00:00 2001 +From 34d666e847c142545c3de244df08705f6a19b933 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Tue, 7 Jan 2014 21:02:02 -0500 -Subject: [PATCH 13/14] session-selector: add toggle for classic/normal +Subject: [PATCH 16/17] session-selector: add toggle for classic/normal selection Since we offer both classic mode and regular mode when @@ -5514,11 +10363,11 @@ index 4d1e300..beab73a 100644 diff --git a/tools/gnome-session-selector.c b/tools/gnome-session-selector.c -index 54541d3..1011a52 100644 +index 8f37eca..dbe3bda 100644 --- a/tools/gnome-session-selector.c +++ b/tools/gnome-session-selector.c -@@ -17,60 +17,61 @@ - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +@@ -16,60 +16,61 @@ + * along with this program; if not, see . * * Written by: Matthias Clasen */ @@ -5579,7 +10428,7 @@ index 54541d3..1011a52 100644 g_free (path); return name; } -@@ -126,104 +127,126 @@ is_valid_session_name (const char *name) +@@ -125,104 +126,126 @@ is_valid_session_name (const char *name) gtk_tree_model_get_iter_first (GTK_TREE_MODEL (store), &iter); do { gtk_tree_model_get (GTK_TREE_MODEL (store), &iter, 0, &n, -1); @@ -5706,7 +10555,7 @@ index 54541d3..1011a52 100644 if (readlink (saved_session, last_session, PATH_MAX - 1) > 0) { name = g_path_get_basename (last_session); -@@ -261,60 +284,136 @@ remove_session (const char *name) +@@ -260,60 +283,136 @@ remove_session (const char *name) GError *error; path1 = get_session_path ("saved-session"); @@ -5843,7 +10692,7 @@ index 54541d3..1011a52 100644 selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (session_list)); if (gtk_tree_selection_get_selected (selection, &model, &iter)) { -@@ -493,60 +592,62 @@ static void +@@ -492,60 +591,62 @@ static void create_session_and_begin_rename (void) { gchar *name; @@ -5906,7 +10755,7 @@ index 54541d3..1011a52 100644 path = gtk_tree_path_new_from_string (path_string); gtk_tree_model_get_iter (GTK_TREE_MODEL (sort_model), &sort_iter, path); -@@ -752,75 +853,79 @@ main (int argc, char *argv[]) +@@ -751,75 +852,80 @@ main (int argc, char *argv[]) gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (sort_model), 0, GTK_SORT_ASCENDING); g_signal_connect (store, "row-deleted", G_CALLBACK (on_row_deleted), NULL); @@ -5969,6 +10818,7 @@ index 54541d3..1011a52 100644 if (g_strcmp0 (action, "load") == 0) { make_session_current (selected_session); ++ save_session_type_from_switch (); auto_save_next_session_if_needed (); } else if (g_strcmp0 (action, "save") == 0) { char *last_session; @@ -5987,24 +10837,24 @@ index 54541d3..1011a52 100644 return 0; } -- -1.8.3.1 +2.3.7 -From acc1f8715b9e3a9153eeb0c2281cb156a8925c3c Mon Sep 17 00:00:00 2001 +From c056d368938c75b1d6227e84f3daba40e8d39d71 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Wed, 8 Jan 2014 10:15:29 -0500 -Subject: [PATCH 14/14] session-selector: use classic mode by default +Subject: [PATCH 17/17] session-selector: use classic mode by default --- tools/gnome-session-selector.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/gnome-session-selector.c b/tools/gnome-session-selector.c -index 1011a52..e18023c 100644 +index dbe3bda..3e0b32e 100644 --- a/tools/gnome-session-selector.c +++ b/tools/gnome-session-selector.c -@@ -17,61 +17,61 @@ - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +@@ -16,61 +16,61 @@ + * along with this program; if not, see . * * Written by: Matthias Clasen */ @@ -6067,5 +10917,5 @@ index 1011a52..e18023c 100644 return name; } -- -1.8.3.1 +2.3.7 diff --git a/SOURCES/gnome-session-3.3.92-nv30.patch b/SOURCES/gnome-session-3.3.92-nv30.patch index 8bb1d85..dcafc82 100644 --- a/SOURCES/gnome-session-3.3.92-nv30.patch +++ b/SOURCES/gnome-session-3.3.92-nv30.patch @@ -1,6 +1,38 @@ ---- gnome-session/data/hardware-compatibility 2012-03-21 16:30:06.269104695 -0700 -+++ gnome-session/data/hardware-compatibility.new 2012-03-22 23:26:37.201967075 -0700 -@@ -19,6 +19,9 @@ +From b524466482c9c64c11a55fb5d0174080471a1d5a Mon Sep 17 00:00:00 2001 +From: Adam Williamson +Date: Fri, 8 May 2015 16:41:38 -0400 +Subject: [PATCH] blacklist NV30 adapter on nouveau until #745202 is fixed + +--- + data/hardware-compatibility | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/data/hardware-compatibility b/data/hardware-compatibility +index 48b7946..3daef68 100644 +--- a/data/hardware-compatibility ++++ b/data/hardware-compatibility +@@ -1,32 +1,35 @@ + ## + ## This file contains a list of blacklist/whitelist regular expressions for + ## renderer strings. + ## + ## The regular expressions are case-insensitive POSIX Extended Regular + ## Expressions. See regex(7) for details. + ## + ## Syntax: + ## - Comment lines start with '#' + ## - Lines starting with '+' are whitelisting. + ## - Lines starting with '-' are blacklisting. + ## - Lines not starting with '#', '+', '-' are ignored. + ## + + # Intel 830-865 + -Intel\(R\) 8[[:digit:]]{2,2}[^[:digit:]] + + # Intel IGD + -Intel IGD + + # Pre-R300 radeon -Mesa DRI R[12]00[^[:digit:]] -Mesa DRI R[12]00$ @@ -10,3 +42,11 @@ # Old Mesa software GL renderer -software rasterizer + # Gallium has softpipe; we explicitly enable llvmpipe + -softpipe + + # nouveau vieux NV25 doesn't work too well + -Mesa DRI nv25 +-- +2.3.7 + diff --git a/SOURCES/gnome-session-3.6.2-swrast.patch b/SOURCES/gnome-session-3.6.2-swrast.patch index 7366971..7d505bb 100644 --- a/SOURCES/gnome-session-3.6.2-swrast.patch +++ b/SOURCES/gnome-session-3.6.2-swrast.patch @@ -1,12 +1,56 @@ -diff -up gnome-session-3.6.2/data/hardware-compatibility.jx gnome-session-3.6.2/data/hardware-compatibility ---- gnome-session-3.6.2/data/hardware-compatibility.jx 2012-12-10 12:43:06.000000000 -0500 -+++ gnome-session-3.6.2/data/hardware-compatibility 2012-12-10 12:43:50.424352484 -0500 -@@ -23,7 +23,7 @@ +From 69c18aa6324e7d3fd6f93ea7a79ce99bed1a452d Mon Sep 17 00:00:00 2001 +From: Adam Jackson +Date: Fri, 8 May 2015 16:46:47 -0400 +Subject: [PATCH] Allow running on the classic software renderer + +No effect on arches where we build llvmpipe, +but on ppc/s390 classic swrast is marginally +less painful than softpipe. +--- + data/hardware-compatibility | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/data/hardware-compatibility b/data/hardware-compatibility +index 3daef68..fd06230 100644 +--- a/data/hardware-compatibility ++++ b/data/hardware-compatibility +@@ -1,35 +1,35 @@ + ## + ## This file contains a list of blacklist/whitelist regular expressions for + ## renderer strings. + ## + ## The regular expressions are case-insensitive POSIX Extended Regular + ## Expressions. See regex(7) for details. + ## + ## Syntax: + ## - Comment lines start with '#' + ## - Lines starting with '+' are whitelisting. + ## - Lines starting with '-' are blacklisting. + ## - Lines not starting with '#', '+', '-' are ignored. + ## + + # Intel 830-865 + -Intel\(R\) 8[[:digit:]]{2,2}[^[:digit:]] + + # Intel IGD + -Intel IGD + + # Pre-R300 radeon + -Mesa DRI R[12]00[^[:digit:]] + -Mesa DRI R[12]00$ + + # NV30 family on Nouveau: https://bugzilla.redhat.com/show_bug.cgi?id=745202 -Gallium .* on NV3[0-9A-F]$ # Old Mesa software GL renderer --software rasterizer +#software rasterizer - # Gallium has softpipe and llvmpipe + # Gallium has softpipe; we explicitly enable llvmpipe -softpipe + + # nouveau vieux NV25 doesn't work too well + -Mesa DRI nv25 +-- +2.3.7 + diff --git a/SOURCES/translations.patch b/SOURCES/translations.patch deleted file mode 100644 index 4ec32ec..0000000 --- a/SOURCES/translations.patch +++ /dev/null @@ -1,2425 +0,0 @@ ---- a/gnome-session-3.8.4/po/bn_IN.po 2013-11-28 16:12:19.195382022 +0530 -+++ a/gnome-session-3.8.4/po/bn_IN.po 2013-11-28 16:13:12.819872081 +0530 -@@ -6,22 +6,23 @@ - # Khandakar Mujahidul Islam , 2003-2005. - # Runa Bhattacharjee , 2008. - # Runa Bhattacharjee , 2008, 2009, 2010, 2011, 2012. -+# sray , 2013. #zanata - msgid "" - msgstr "" - "Project-Id-Version: bn_IN\n" - "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-" - "session&keywords=I18N+L10N&component=general\n" - "POT-Creation-Date: 2012-07-17 02:00+0000\n" --"PO-Revision-Date: 2012-09-21 15:17+0530\n" --"Last-Translator: Runa Bhattacharjee \n" -+"PO-Revision-Date: 2013-09-25 07:13-0400\n" -+"Last-Translator: sray \n" - "Language-Team: Bengali (India) \n" --"Language: \n" - "MIME-Version: 1.0\n" - "Content-Type: text/plain; charset=UTF-8\n" - "Content-Transfer-Encoding: 8bit\n" --"X-Generator: Lokalize 1.2\n" -+"Language: bn-IN\n" - "Plural-Forms: nplurals=2; plural=(n != 1);\n" - "\n" -+"X-Generator: Zanata 3.1.2\n" - - #: ../capplet/gsm-app-dialog.c:120 - msgid "Select Command" -@@ -43,31 +44,32 @@ - msgid "The startup command is not valid" - msgstr "প্রারম্ভিক কমান্ডের নাম উল্লেখ করা আবশ্যক" - --#: ../capplet/gsm-properties-dialog.c:518 -+#: ../capplet/gsm-properties-dialog.c:519 - msgid "Enabled" - msgstr "সক্রিয়" - --#: ../capplet/gsm-properties-dialog.c:530 -+#: ../capplet/gsm-properties-dialog.c:531 - msgid "Icon" - msgstr "আইকন" - --#: ../capplet/gsm-properties-dialog.c:542 -+#: ../capplet/gsm-properties-dialog.c:543 - msgid "Program" - msgstr "প্রোগ্রাম" - --#: ../capplet/gsm-properties-dialog.c:746 -+#: ../capplet/gsm-properties-dialog.c:747 - msgid "Startup Applications Preferences" - msgstr "প্রারম্ভিক অ্যাপ্লিকেশন সংক্রান্ত পছন্দ" - --#: ../capplet/gsp-app.c:274 -+#: ../capplet/gsp-app.c:276 - msgid "No name" - msgstr "নামবিহীন" - --#: ../capplet/gsp-app.c:280 -+#: ../capplet/gsp-app.c:282 - msgid "No description" - msgstr "বিবরণ অনুপস্থিত" - --#: ../capplet/main.c:35 ../gnome-session/main.c:294 -+#: ../capplet/main.c:35 -+#: ../gnome-session/main.c:288 - msgid "Version of this application" - msgstr "অ্যাপ্লিকেশনের সংস্করণ" - -@@ -75,11 +77,8 @@ - msgid "Could not display help document" - msgstr "সহায়ক নথিপত্র প্রদর্শন করতে ব্যর্থ" - --#: ../data/gnome-fallback.session.desktop.in.in.h:1 --msgid "GNOME fallback" --msgstr "GNOME ফল-ব্যাক" -- --#: ../data/gnome.session.desktop.in.in.h:1 ../data/gnome.desktop.in.h:1 -+#: ../data/gnome.desktop.in.h:1 -+#: ../data/gnome.session.desktop.in.in.h:1 - msgid "GNOME" - msgstr "GNOME" - -@@ -87,19 +86,51 @@ - msgid "This session logs you into GNOME" - msgstr "এই সেশানের মাধ্যমে GNOME-এ লগ-ইন করা যাবে" - --#: ../data/gsm-inhibit-dialog.ui.h:1 ../gnome-session/gsm-inhibit-dialog.c:643 -+# auto translated by TM merge from project: system-config-printer, version: 1.1.16-23, DocId: system-config-printer -+#: ../data/gnome-custom-session.desktop.in.h:1 -+msgid "Custom" -+msgstr "স্বনির্ধারিত" -+ -+#: ../data/gnome-custom-session.desktop.in.h:2 -+msgid "This entry lets you select a saved session" -+msgstr "এই এন্ট্রি অাপনাকে একটি সংরক্ষিত সেশন নির্বাচন করতে দেয়" -+ -+#: ../data/gnome-dummy.session.desktop.in.in.h:1 -+msgid "GNOME dummy" -+msgstr "GNOME ডামি" -+ -+# auto translated by TM merge from project: gdm, version: 3.8.4, DocId: gdm -+#: ../data/session-selector.ui.h:1 -+msgid "Custom Session" -+msgstr "স্বনির্ধারিত সেশান" -+ -+#: ../data/session-selector.ui.h:2 -+#: ../tools/gnome-session-selector.c:103 -+msgid "Please select a custom session to run" -+msgstr "চালাতে অনুগ্রহ করে একটি স্বনির্বাচিত সেশন নির্বাচন করুন" -+ -+#: ../data/session-selector.ui.h:3 -+msgid "_New Session" -+msgstr "নতুন সেশন (_N)" -+ -+#: ../data/session-selector.ui.h:4 -+msgid "_Remove Session" -+msgstr "সেশন সরান (_R)" -+ -+#: ../data/session-selector.ui.h:5 -+msgid "Rena_me Session" -+msgstr "সেশনের নাম পরিবর্তন করুন (_m)" -+ -+# auto translated by TM merge from project: brasero, version: 3.8.0, DocId: brasero -+#: ../data/session-selector.ui.h:6 -+msgid "_Continue" -+msgstr "এগিয়ে চলুন (_C)" -+ -+#: ../data/gsm-inhibit-dialog.ui.h:1 -+#: ../gnome-session/gsm-inhibit-dialog.c:514 - msgid "Some programs are still running:" - msgstr "কয়েকটি প্রোগ্রাম চলছে:" - --#: ../data/gsm-inhibit-dialog.ui.h:2 ../gnome-session/gsm-inhibit-dialog.c:640 --msgid "" --"Waiting for the program to finish. Interrupting the program may cause you " --"to lose work." --msgstr "" --"প্রোগ্রাম সমাপ্তির অপেক্ষা করা হচ্ছে। প্রোগ্রাম বিঘ্নিত হলে সঞ্চালিত কর্মের " --"তথ্য মুছে " --"যাওয়ার সম্ভাবনা রয়েছে।" -- - #: ../data/session-properties.desktop.in.in.h:1 - msgid "Startup Applications" - msgstr "প্রারম্ভিক অ্যাপ্লিকেশন" -@@ -123,7 +154,6 @@ - "(_A)" - - #: ../data/session-properties.ui.h:4 --#| msgid "_Remember Currently Running Application" - msgid "_Remember Currently Running Applications" - msgstr "বর্তমানে চলমান অ্যাপ্লিকেশনের তালিকা মনে রাখা হবে (_R)" - -@@ -216,259 +246,302 @@ - msgid "Show session management options" - msgstr "সেশন পরিচালনা সংক্রান্ত বিকল্প প্রদর্শন করা হবে" - --#: ../gnome-session/gsm-inhibit-dialog.c:253 --#, c-format --msgid "Icon '%s' not found" --msgstr "'%s' আইকন পাওয়া যায়নি" -+#: ../gnome-session/gsm-fail-whale-dialog.c:286 -+msgid "Oh no! Something has gone wrong." -+msgstr "ওহ হো! কিছু সমস্যা হয়েছে।" -+ -+#: ../gnome-session/gsm-fail-whale-dialog.c:293 -+msgid "" -+"A problem has occurred and the system can't recover. Please contact a system " -+"administrator" -+msgstr "" -+"একটি সমস্যা হয়েছে এবং সিস্টেমটি পুনরুদ্ধার করা সম্ভব নয়। অনুগ্রহ করে সিস্টেম " -+"অ্যাডমিনিস্ট্রেটরের সাথে যোগাযোগ করুন।" -+ -+#: ../gnome-session/gsm-fail-whale-dialog.c:295 -+msgid "" -+"A problem has occurred and the system can't recover. All extensions have " -+"been disabled as a precaution." -+msgstr "" -+"একটি সমস্যা হয়েছে এবং সিস্টেমটি পুনরুদ্ধার করা সম্ভব নয়। সাবধানতা হিসাবে সকল " -+"এক্সটেনশন নিষ্ক্রিয় করা হয়েছে।" -+ -+#: ../gnome-session/gsm-fail-whale-dialog.c:297 -+msgid "" -+"A problem has occurred and the system can't recover.\n" -+"Please log out and try again." -+msgstr "" -+"একটি সমস্যা হয়েছে এবং সিস্টেমটি পুনরুদ্ধার করা সম্ভব নয়।\n" -+"অনুগ্রহ করে লগ আউট করে পুনরায় প্রয়াস করুন।" -+ -+#: ../gnome-session/gsm-fail-whale-dialog.c:312 -+#: ../gnome-session/gsm-logout-dialog.c:384 -+msgid "_Log Out" -+msgstr "লগ-আউট করুন (_L)" -+ -+#: ../gnome-session/gsm-fail-whale-dialog.c:334 -+#: ../gnome-session/main.c:286 -+msgid "Enable debugging code" -+msgstr "কোড ডিবাগ ব্যবস্থা সক্রিয় করুন" -+ -+#: ../gnome-session/gsm-fail-whale-dialog.c:335 -+msgid "Allow logout" -+msgstr "লগ অাউটের অনুমতি দিন" -+ -+#: ../gnome-session/gsm-fail-whale-dialog.c:336 -+msgid "Show extension warning" -+msgstr "এক্সটেনশন সর্তকতা দেখান" - --#: ../gnome-session/gsm-inhibit-dialog.c:588 -+#: ../gnome-session/gsm-inhibit-dialog.c:462 - msgid "Unknown" - msgstr "অজানা" - --#: ../gnome-session/gsm-inhibit-dialog.c:639 -+#: ../gnome-session/gsm-inhibit-dialog.c:510 - msgid "A program is still running:" - msgstr "একটি প্রোগ্রাম বর্তমানে চলছে:" - --#: ../gnome-session/gsm-inhibit-dialog.c:644 -+#: ../gnome-session/gsm-inhibit-dialog.c:511 - msgid "" --"Waiting for programs to finish. Interrupting these programs may cause you " --"to lose work." -+"Waiting for the program to finish. Interrupting the program may cause you to " -+"lose work." - msgstr "" --"প্রোগ্রাম সমাপ্তির অপেক্ষা করা হচ্ছে। প্রোগ্রাম বিঘ্নিত হলে সঞ্চালিত কর্মের " --"ফলে মুছে " --"যাওয়ার সম্ভাবনা রয়েছে।" -+"প্রোগ্রাম সমাপ্ত হওয়ার অপেক্ষা করা হয়েছে। প্রোগ্রামটিকে মাঝপথে বাধা দিলে " -+"অাপনার করা কাজ অাপনাকে হারাতে হতে পারে।" - --#: ../gnome-session/gsm-inhibit-dialog.c:874 -+#: ../gnome-session/gsm-inhibit-dialog.c:515 -+msgid "" -+"Waiting for programs to finish. Interrupting these programs may cause you to " -+"lose work." -+msgstr "" -+"প্রোগ্রামগুলি সমাপ্ত হওয়ার অপেক্ষা করা হচ্ছে। এই প্রোগ্রামগুলিকে মাঝপথে বাধা " -+"দিলে অাপনার করা কাজ অাপনাকে হারাতে হতে পারে।" -+ -+#: ../gnome-session/gsm-inhibit-dialog.c:745 - msgid "Switch User Anyway" - msgstr "তথাপি ব্যবহারকারী অ্যাকাউন্ট পরিবর্তন করা হবে" - --#: ../gnome-session/gsm-inhibit-dialog.c:877 -+#: ../gnome-session/gsm-inhibit-dialog.c:748 - msgid "Log Out Anyway" - msgstr "তথাপি লগ-আউট করা হবে" - --#: ../gnome-session/gsm-inhibit-dialog.c:880 -+#: ../gnome-session/gsm-inhibit-dialog.c:751 - msgid "Suspend Anyway" - msgstr "তথাপি স্থগিত করা হবে" - --#: ../gnome-session/gsm-inhibit-dialog.c:883 -+#: ../gnome-session/gsm-inhibit-dialog.c:754 - msgid "Hibernate Anyway" - msgstr "তথাপি নিদ্রিত করা হবে" - --#: ../gnome-session/gsm-inhibit-dialog.c:886 -+#: ../gnome-session/gsm-inhibit-dialog.c:757 - msgid "Shut Down Anyway" - msgstr "তথাপি বন্ধ করা হবে" - --#: ../gnome-session/gsm-inhibit-dialog.c:889 --#| msgid "Reboot Anyway" -+#: ../gnome-session/gsm-inhibit-dialog.c:760 - msgid "Restart Anyway" - msgstr "তথাপি পুনরারম্ভ করা হবে" - --#: ../gnome-session/gsm-inhibit-dialog.c:897 -+#: ../gnome-session/gsm-inhibit-dialog.c:768 - msgid "Lock Screen" - msgstr "পর্দা লক করুন" - --#: ../gnome-session/gsm-inhibit-dialog.c:900 -+#: ../gnome-session/gsm-inhibit-dialog.c:771 - msgid "Cancel" - msgstr "বাতিল" - - #. This string is shared with gsm-fail-whale-dialog.c --#: ../gnome-session/gsm-logout-dialog.c:266 -+#: ../gnome-session/gsm-logout-dialog.c:263 - #, c-format - msgid "You will be automatically logged out in %d second." - msgid_plural "You will be automatically logged out in %d seconds." - msgstr[0] "%d সেকেন্ড অতিক্রান্ত হলে স্বয়ংক্রিয়রূপে আপনাকে লগ-আউট করা হবে।" - msgstr[1] "%d সেকেন্ড অতিক্রান্ত হলে স্বয়ংক্রিয়রূপে আপনাকে লগ-আউট করা হবে।" - --#: ../gnome-session/gsm-logout-dialog.c:274 -+#: ../gnome-session/gsm-logout-dialog.c:271 - #, c-format - msgid "This system will be automatically shut down in %d second." - msgid_plural "This system will be automatically shut down in %d seconds." - msgstr[0] "%d সেকেন্ড অতিক্রান্ত হলে স্বয়ংক্রিয়রূপে সিস্টেম বন্ধ করা হবে।" - msgstr[1] "%d সেকেন্ড অতিক্রান্ত হলে স্বয়ংক্রিয়রূপে সিস্টেম বন্ধ করা হবে।" - --#: ../gnome-session/gsm-logout-dialog.c:282 -+#: ../gnome-session/gsm-logout-dialog.c:279 - #, c-format --#| msgid "This system will be automatically shut down in %d second." --#| msgid_plural "This system will be automatically shut down in %d seconds." - msgid "This system will be automatically restarted in %d second." - msgid_plural "This system will be automatically restarted in %d seconds." --msgstr[0] "%d সেকেন্ড অতিক্রান্ত হলে স্বয়ংক্রিয়রূপে সিস্টেম পুনরারম্ভ করা হবে।" --msgstr[1] "%d সেকেন্ড অতিক্রান্ত হলে স্বয়ংক্রিয়রূপে সিস্টেম পুনরারম্ভ করা হবে।" -+msgstr[0] "" -+"%d সেকেন্ড অতিক্রান্ত হলে স্বয়ংক্রিয়রূপে সিস্টেম পুনরারম্ভ করা হবে।" -+msgstr[1] "" -+"%d সেকেন্ড অতিক্রান্ত হলে স্বয়ংক্রিয়রূপে সিস্টেম পুনরারম্ভ করা হবে।" - --#: ../gnome-session/gsm-logout-dialog.c:306 -+#: ../gnome-session/gsm-logout-dialog.c:303 - #, c-format - msgid "You are currently logged in as \"%s\"." - msgstr "বর্তমানে \"%s\" পরিচয়ে লগ-ইন করা হয়েছে।" - --#: ../gnome-session/gsm-logout-dialog.c:372 -+#: ../gnome-session/gsm-logout-dialog.c:369 - msgid "Log out of this system now?" - msgstr "এই মুহূর্তে সিস্টেম থেকে লগ-আউট করা হবে কি?" - --#: ../gnome-session/gsm-logout-dialog.c:378 -+#: ../gnome-session/gsm-logout-dialog.c:375 - msgid "_Switch User" - msgstr "ব্যবহারকারী পরিবর্তন করুন (_S)" - --#: ../gnome-session/gsm-logout-dialog.c:387 --#: ../gnome-session/gsm-fail-whale-dialog.c:337 --#: ../gnome-session/gsm-util.c:389 --msgid "_Log Out" --msgstr "লগ-আউট করুন (_L)" -- --#: ../gnome-session/gsm-logout-dialog.c:393 -+#: ../gnome-session/gsm-logout-dialog.c:390 - msgid "Shut down this system now?" - msgstr "এই মুহূর্তে সিস্টেম বন্ধ করা হবে কি?" - --#: ../gnome-session/gsm-logout-dialog.c:399 -+#: ../gnome-session/gsm-logout-dialog.c:396 - msgid "S_uspend" - msgstr "স্থগিত করা হবে (_u)" - --#: ../gnome-session/gsm-logout-dialog.c:405 -+#: ../gnome-session/gsm-logout-dialog.c:402 - msgid "_Hibernate" - msgstr "নিদ্রিত অবস্থা (_H)" - --#: ../gnome-session/gsm-logout-dialog.c:411 --#: ../gnome-session/gsm-logout-dialog.c:437 -+#: ../gnome-session/gsm-logout-dialog.c:408 -+#: ../gnome-session/gsm-logout-dialog.c:434 - msgid "_Restart" - msgstr "পুনরারম্ভ (_R)" - --#: ../gnome-session/gsm-logout-dialog.c:421 -+#: ../gnome-session/gsm-logout-dialog.c:418 - msgid "_Shut Down" - msgstr "বন্ধ করুন (_S)" - --#: ../gnome-session/gsm-logout-dialog.c:427 --#| msgid "Shut down this system now?" -+#: ../gnome-session/gsm-logout-dialog.c:424 - msgid "Restart this system now?" - msgstr "অবিলম্বে সিস্টেম পুনরারম্ভ করা হবে কি?" - --#: ../gnome-session/gsm-fail-whale-dialog.c:311 --msgid "Oh no! Something has gone wrong." --msgstr "ওহ হো! কিছু সমস্যা হয়েছে।" -- --#: ../gnome-session/gsm-fail-whale-dialog.c:318 --msgid "" --"A problem has occurred and the system can't recover. Please contact a system " --"administrator" --msgstr "" --"একটি সমস্যা হয়েছে এবং সিস্টেমটি পুনরুদ্ধার করা সম্ভব নয়। অনুগ্রহ করে সিস্টেম " --"অ্যাডমিনিস্ট্রেটরের সাথে যোগাযোগ করুন।" -- --#: ../gnome-session/gsm-fail-whale-dialog.c:320 --msgid "" --"A problem has occurred and the system can't recover. All extensions have " --"been disabled as a precaution." --msgstr "" --"একটি সমস্যা হয়েছে এবং সিস্টেমটি পুনরুদ্ধার করা সম্ভব নয়। সাবধানতা হিসাবে সকল " --"এক্সটেনশন নিষ্ক্রিয় করা হয়েছে।" -- --#: ../gnome-session/gsm-fail-whale-dialog.c:322 --msgid "" --"A problem has occurred and the system can't recover.\n" --"Please log out and try again." --msgstr "" --"একটি সমস্যা হয়েছে এবং সিস্টেমটি পুনরুদ্ধার করা সম্ভব নয়।\n" --"অনুগ্রহ করে লগ আউট করে পুনরায় প্রয়াস করুন।" -- --#: ../gnome-session/gsm-manager.c:1393 --msgid "GNOME 3 Failed to Load" --msgstr "GNOME 3 লোড করতে ব্যর্থ" -- --#: ../gnome-session/gsm-manager.c:1394 --#| msgid "" --#| "Unfortunately GNOME 3 failed to start properly and started in the " --#| "fallback mode.\n" --#| "\n" --#| "This most likely means your graphics hardwayre is not capable to run the " --#| "full GNOME 3 experience" --msgid "" --"Unfortunately GNOME 3 failed to start properly and started in the " --"fallback mode.\n" --"\n" --"This most likely means your system (graphics hardware or driver) is not " --"capable of delivering the full GNOME 3 experience." --msgstr "" --"দুর্ভাগ্যবসত, GNOME 3 সঠিকভাবে আরম্ভ করতে ব্যর্থ হয়েছে ও ফল-ব্যাক মোডে " --"আরম্ভ " --"করা হয়েছে।\n" --"\n" --"সম্ভবত GNOME 3-র সম্পূর্ণ ব্যবহারের অভিজ্ঞতার জন্য আপনার সিস্টেমের " --"হার্ডওয়্যারের (গ্রাফিক্স হার্ডওয়্যার অথবা ড্রাইভার)" --"প্রয়োজনীয় ক্ষমতা নেই।" -- --#: ../gnome-session/gsm-manager.c:1396 --msgid "Learn more about GNOME 3" --msgstr "GNOME 3 সম্বন্ধে অধিক তথ্য" -- --#: ../gnome-session/gsm-manager.c:1493 ../gnome-session/gsm-manager.c:2234 -+#: ../gnome-session/gsm-manager.c:1432 -+#: ../gnome-session/gsm-manager.c:2190 - msgid "Not responding" - msgstr "কোনো প্রতিক্রিয়া হয়নি" - -+# auto translated by TM merge from project: gnome-session, version: 3.8.4, DocId: gnome-session-3.0 -+#: ../gnome-session/gsm-util.c:411 -+msgid "_Log out" -+msgstr "লগ-আউট করুন (_L)" -+ - #. It'd be really surprising to reach this code: if we're here, - #. * then the XSMP client already has set several XSMP - #. * properties. But it could still be that SmProgram is not set. --#. --#: ../gnome-session/gsm-xsmp-client.c:559 --#| msgid "_Remember Currently Running Application" -+#: ../gnome-session/gsm-xsmp-client.c:558 - msgid "Remembered Application" - msgstr "অ্যাপ্লিকোশন মনে রাখা হবে" - --#: ../gnome-session/gsm-xsmp-client.c:1197 -+#: ../gnome-session/gsm-xsmp-client.c:1196 - msgid "This program is blocking logout." - msgstr "এই প্রোগ্রাম দ্বারা লগ-আউট করতে প্রতিরোধ করা হচ্ছে।" - --#: ../gnome-session/gsm-xsmp-server.c:326 -+#: ../gnome-session/gsm-xsmp-server.c:341 - msgid "" - "Refusing new client connection because the session is currently being shut " - "down\n" - msgstr "" - "সিস্টেম বর্তমানে বন্ধ করার প্রচেষ্টা করা হচ্ছে ও এই কারণে নতুন ক্লায়েন্টের " --"সাথে সংযোগ " --"স্থাপনের অনুরোধ প্রত্যাখ্যান করা হচ্ছে।\n" -+"সাথে সংযোগ স্থাপনের অনুরোধ প্রত্যাখ্যান করা হচ্ছে।\n" - --#: ../gnome-session/gsm-xsmp-server.c:595 -+#: ../gnome-session/gsm-xsmp-server.c:610 - #, c-format - msgid "Could not create ICE listening socket: %s" - msgstr "ICE অপেক্ষার সকেট নির্মাণ করতে ব্যর্থ: %s" - --#. Oh well, no X for you! --#: ../gnome-session/gsm-util.c:373 --#, c-format --msgid "Unable to start login session (and unable to connect to the X server)" --msgstr "" --"লগ-ইন সেশান আরম্ভ করতে ব্যর্থ (X সার্ভারের সাথে সংযোগ স্থাপন করতে ব্যর্থ)" -- --#: ../gnome-session/main.c:290 -+#: ../gnome-session/main.c:284 - msgid "Override standard autostart directories" - msgstr "প্রমিত autostart ডিরেক্টরির মান উপেক্ষা করা হবে" - --#: ../gnome-session/main.c:290 -+#: ../gnome-session/main.c:284 - msgid "AUTOSTART_DIR" - msgstr "AUTOSTART_DIR" - --#: ../gnome-session/main.c:291 -+#: ../gnome-session/main.c:285 - msgid "Session to use" - msgstr "ব্যবহারযোগ্য সেশান" - --#: ../gnome-session/main.c:291 -+#: ../gnome-session/main.c:285 - msgid "SESSION_NAME" - msgstr "SESSION_NAME" - --#: ../gnome-session/main.c:292 --msgid "Enable debugging code" --msgstr "কোড ডিবাগ ব্যবস্থা সক্রিয় করুন" -- --#: ../gnome-session/main.c:293 -+#: ../gnome-session/main.c:287 - msgid "Do not load user-specified applications" - msgstr "ব্যবহারকারী দ্বারা নির্ধারিত অ্যাপ্লিকেশন লোড করা হবে না" - - #. Translators: the 'fail whale' is the black dialog we show when something goes seriously wrong --#: ../gnome-session/main.c:296 -+#: ../gnome-session/main.c:290 - msgid "Show the fail whale dialog for testing" - msgstr "পরীক্ষার জন্য ফেইল-ওয়েইল ডায়লগটি প্রদর্শন করা হবে" - --#: ../gnome-session/main.c:316 -+#: ../gnome-session/main.c:324 - msgid " - the GNOME session manager" - msgstr "- GNOME সেশান পরিচালনা ব্যবস্থা" - -+#: ../tools/gnome-session-inhibit.c:110 -+#, c-format -+msgid "" -+"%s [OPTION...] COMMAND\n" -+"\n" -+"Execute COMMAND while inhibiting some session functionality.\n" -+"\n" -+" -h, --help Show this help\n" -+" --version Show program version\n" -+" --app-id ID The application id to use\n" -+" when inhibiting (optional)\n" -+" --reason REASON The reason for inhibiting (optional)\n" -+" --inhibit ARG Things to inhibit, colon-separated list of:\n" -+" logout, switch-user, suspend, idle, automount\n" -+" --inhibit-only Do not launch COMMAND and wait forever instead\n" -+"\n" -+"If no --inhibit option is specified, idle is assumed.\n" -+msgstr "" -+"%s [OPTION...] COMMAND\n" -+"\n" -+"Execute COMMAND while inhibiting some session functionality.\n" -+"\n" -+" -h, --help Show this help\n" -+" --version Show program version\n" -+" --app-id ID The application id to use\n" -+" when inhibiting (optional)\n" -+" --reason REASON The reason for inhibiting (optional)\n" -+" --inhibit ARG Things to inhibit, colon-separated list of:\n" -+" logout, switch-user, suspend, idle, automount\n" -+" --inhibit-only Do not launch COMMAND and wait forever instead\n" -+"\n" -+"If no --inhibit option is specified, idle is assumed.\n" -+ -+#: ../tools/gnome-session-inhibit.c:148 -+#, c-format -+msgid "Failed to execute %s\n" -+msgstr "%s সম্পাদন করা গেল না\n" -+ -+#: ../tools/gnome-session-inhibit.c:208 -+#: ../tools/gnome-session-inhibit.c:218 -+#: ../tools/gnome-session-inhibit.c:228 -+#, c-format -+msgid "%s requires an argument\n" -+msgstr "%s এর একটি অার্গুমেন্টের অাবশ্যক\n" -+ -+#: ../tools/gnome-session-selector.c:62 -+#, c-format -+msgid "Session %d" -+msgstr "সেশন %d" -+ -+#: ../tools/gnome-session-selector.c:108 -+msgid "" -+"Session names are not allowed to start with ‘.’ or contain ‘/’ characters" -+msgstr "" -+"সেশন নামগুলি ‘.’ দিয়ে শুরু করা যাবে না বা তাতে ‘/’ অক্ষর থাকলে চলবে না" -+ -+#: ../tools/gnome-session-selector.c:112 -+msgid "Session names are not allowed to start with ‘.’" -+msgstr "সেশন নামগুলি ‘.’ দিয়ে শুরু হলে চলবে না" -+ -+#: ../tools/gnome-session-selector.c:116 -+msgid "Session names are not allowed to contain ‘/’ characters" -+msgstr "সেশন নামগুলিতে ‘/’ অক্ষর থাকলে চলবে না" -+ -+#: ../tools/gnome-session-selector.c:124 -+#, c-format -+msgid "A session named ‘%s’ already exists" -+msgstr "‘%s’ নামের একটি সেশন ইতিমধ্যেই উপস্থিত" -+ - #: ../tools/gnome-session-quit.c:53 - msgid "Log out" - msgstr "লগ-আউট" -@@ -478,139 +551,22 @@ - msgstr "বন্ধ করুন" - - #: ../tools/gnome-session-quit.c:55 --#| msgid "Reboot Anyway" - msgid "Reboot" - msgstr "পুনরারম্ভ" - - #: ../tools/gnome-session-quit.c:56 --#| msgid "Log out, ignoring any existing inhibitors" - msgid "Ignoring any existing inhibitors" - msgstr "কোনো উপস্থিত প্রতিরোধ অগ্রাহ্য করা হবে" - - #: ../tools/gnome-session-quit.c:57 --#| msgid "Do not require confirmation" - msgid "Don't prompt for user confirmation" - msgstr "ব্যবহারকারী দ্বারা নিশ্চিত করার অনুরোধ করা হবে না" - --#: ../tools/gnome-session-quit.c:91 ../tools/gnome-session-quit.c:101 -+#: ../tools/gnome-session-quit.c:91 -+#: ../tools/gnome-session-quit.c:101 - msgid "Could not connect to the session manager" - msgstr "সেশান পরিচালনব্যবস্থার সাথে সংযোগ স্থাপন করতে ব্যর্থ" - - #: ../tools/gnome-session-quit.c:203 - msgid "Program called with conflicting options" - msgstr "দ্বন্দ্বযুক্ত বিকল্প সহ প্রোগ্রাম আরম্ভের প্রচেষ্টা করা হয়েছে" -- --#~ msgid "Some programs are still running:" --#~ msgstr "কয়েকটি প্রোগ্রাম এখনো চলছে:" -- --#~ msgid "" --#~ "There is a problem with the configuration server.\n" --#~ "(%s exited with status %d)" --#~ msgstr "" --#~ "কনফিগারেশন সার্ভারে কিছু সমস্যা উপস্থিত রয়েছে।\n" --#~ "(%s প্রস্থানকালে %d অবস্থা উৎপন্ন হয়েছে)" -- --#~ msgid "Show logout dialog" --#~ msgstr "লগ-আউটের ডায়লগ বক্স প্রদর্শন করা হবে" -- --#~ msgid "Show shutdown dialog" --#~ msgstr "বন্ধ করার ডায়লগ বক্স প্রদর্শন করা হবে" -- --#~ msgid "Use dialog boxes for errors" --#~ msgstr "ত্রুটির ক্ষেত্রে ডায়লগ বক্স ব্যবহার করুন" -- --#~ msgid "Set the current session name" --#~ msgstr "বর্তমান সেশনের নাম নির্ধারণ করুন" -- --#~ msgid "NAME" --#~ msgstr "NAME" -- --#~ msgid "Kill session" --#~ msgstr "সেশান kill করুন" -- --#~ msgid "Default session" --#~ msgstr "ডিফল্ট সেশান" -- --#~ msgid "File Manager" --#~ msgstr "ফাইল পরিচালন ব্যবস্থা" -- --#~ msgid "" --#~ "If enabled, gnome-session will prompt the user before ending a session." --#~ msgstr "" --#~ "সক্রিয় থাকলে, সেশান সমাপ্ত করার পূর্বে gnome-session দ্বারা ব্যবহারকারীকে সতর্ক " --#~ "করা হবে" -- --#~| msgid "" --#~| "If enabled, gnome-session will prompt the user before ending a session." --#~ msgid "If enabled, gnome-session will save the session automatically." --#~ msgstr "সক্রিয় থাকলে, gnome-session দ্বারা স্বয়ংক্রিয়ভাবে সেশান সংরক্ষণ করা হবে।" -- --#~ msgid "List of applications that are part of the default session." --#~ msgstr "ডিফল্ট সেশানের জন্য অ্যাপ্লিকেশনের তালিকা।" -- --#~ msgid "" --#~ "List of components that are required as part of the session. (Each " --#~ "element names a key under \"/desktop/gnome/session/required_components" --#~ "\"). The Startup Applications preferences tool will not normally allow " --#~ "users to remove a required component from the session, and the session " --#~ "manager will automatically add the required components back to the " --#~ "session at login time if they do get removed." --#~ msgstr "" --#~ "সেশানের জন্য আবশ্যক সমাগ্রীর তালিকা। (প্রতিটি বস্তুর জন্য \"/desktop/gnome/" --#~ "session/required-components\"-র অধীন একটি কি চিহ্নিত করা হয়েছে।) প্রারম্ভিক " --#~ "অ্যাপ্লিকেশনের পছন্দ নির্ধারণের বৈশিষ্ট্যের ফলে ব্যবহারকারীরা সেশানের কোনো আবশ্যক " --#~ "সামগ্রী সরাতে পারবেন না। কোনো সমাগ্রী মুছে ফেলা হলে, সেশান পরিচালন ব্যবস্থা " --#~ "দ্বারা তা পুনরায় যোগ করা হবে।" -- --#~ msgid "Logout prompt" --#~ msgstr "লগ-আউট প্রম্পট" -- --#~ msgid "Panel" --#~ msgstr "প্যানেল" -- --#~ msgid "Required session components" --#~ msgstr "সেশানের আবশ্যক সামগ্রী" -- --#~ msgid "Save sessions" --#~ msgstr "সেশন সংরক্ষণ করা হবে" -- --#~ msgid "" --#~ "The file manager provides the desktop icons and allows you to interact " --#~ "with your saved files." --#~ msgstr "" --#~ "ফাইল পরিচালন ব্যবস্থা দ্বারা ডেস্কটপ আইকন উপলব্ধ করা হয় ও সংরক্ষিত ফাইলগুলির " --#~ "সাথে ইন্টারেক্ট করার সুবিধা উপস্থিত করা হয়।" -- --#~ msgid "" --#~ "The number of minutes of inactivity before the session is considered idle." --#~ msgstr "সেশানকে কর্মবিহীন ধার্য করার পূর্বে চিহ্নিত মিনিট অবধি অপেক্ষা করা হবে।" -- --#~ msgid "" --#~ "The panel provides the bar at the top or bottom of the screen containing " --#~ "menus, the window list, status icons, the clock, etc." --#~ msgstr "" --#~ "প্যানেলের সাহায্যে পর্দার উপর অথবা নীচের অংশে মেনু, উইন্ডো তালিকা, অবস্থাসূচক " --#~ "আইকন, ঘড়ি প্রভৃতি বার উপলব্ধ করা হয়।" -- --#~ msgid "" --#~ "The window manager is the program that draws the title bar and borders " --#~ "around windows, and allows you to move and resize windows." --#~ msgstr "" --#~ "উইন্ডো পরিচালন ব্যবস্থার সাহায্যে উইন্ডোর শিরোনামের বার ও প্রান্তরেখা আঁকা হয় ও " --#~ "উইন্ডোর অবস্থান ও মাপ পরিবর্তন করা সম্ভব হবে।" -- --#~ msgid "Time before session is considered idle" --#~ msgstr "সেশান কর্মবিহীন ধার্য করার পূর্বে কত সময় অপেক্ষা করা হবে" -- --#~ msgid "Window Manager" --#~ msgstr "উইন্ডো পরিচালন ব্যবস্থা" -- --#~ msgid "" --#~ "Waiting for program to finish. Interrupting program may cause you to " --#~ "lose work." --#~ msgstr "" --#~ "প্রোগ্রাম সমাপ্তির অপেক্ষা করা হচ্ছে। প্রোগ্রাম বিঘ্নিত হলে সঞ্চালিত কর্মের ফলাফল " --#~ "মুছে যাওয়ার সম্ভাবনা রয়েছে।" -- --#~ msgid "GConf key used to lookup default session" --#~ msgstr "ডিফল্ট সেশান অনুসন্ধানের জন্য ব্যবহৃত GConf-কি" ---- a/gnome-session-3.8.4/po/ja.po 2013-11-28 16:12:19.199382059 +0530 -+++ a/gnome-session-3.8.4/po/ja.po 2013-11-28 16:13:12.818872072 +0530 -@@ -14,20 +14,22 @@ - # Jiro Matsuzawa , 2011, 2012. - # Hideki Yamane , 2011, 2012. - # Noriko Mizumoto , 2012. --# -+# noriko , 2013. #zanata - msgid "" - msgstr "" - "Project-Id-Version: gnome-session master\n" --"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-session&keywords=I18N+L10N&component=general\n" -+"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-" -+"session&keywords=I18N+L10N&component=general\n" - "POT-Creation-Date: 2013-03-06 04:38+0000\n" --"PO-Revision-Date: 2013-02-04 19:22+0900\n" --"Last-Translator: Carrot031 \n" -+"PO-Revision-Date: 2013-09-25 03:20-0400\n" -+"Last-Translator: noriko \n" - "Language-Team: Japanese \n" --"Language: ja\n" - "MIME-Version: 1.0\n" - "Content-Type: text/plain; charset=UTF-8\n" - "Content-Transfer-Encoding: 8bit\n" -+"Language: ja\n" - "Plural-Forms: nplurals=1; plural=0;\n" -+"X-Generator: Zanata 3.1.2\n" - - #: ../capplet/gsm-app-dialog.c:120 - msgid "Select Command" -@@ -49,31 +51,32 @@ - msgid "The startup command is not valid" - msgstr "コマンド名が間違っています" - --#: ../capplet/gsm-properties-dialog.c:517 -+#: ../capplet/gsm-properties-dialog.c:519 - msgid "Enabled" - msgstr "有効" - --#: ../capplet/gsm-properties-dialog.c:529 -+#: ../capplet/gsm-properties-dialog.c:531 - msgid "Icon" - msgstr "アイコン" - --#: ../capplet/gsm-properties-dialog.c:541 -+#: ../capplet/gsm-properties-dialog.c:543 - msgid "Program" - msgstr "プログラム" - --#: ../capplet/gsm-properties-dialog.c:745 -+#: ../capplet/gsm-properties-dialog.c:747 - msgid "Startup Applications Preferences" - msgstr "自動起動するアプリケーションの設定" - --#: ../capplet/gsp-app.c:274 -+#: ../capplet/gsp-app.c:276 - msgid "No name" - msgstr "名前なし" - --#: ../capplet/gsp-app.c:280 -+#: ../capplet/gsp-app.c:282 - msgid "No description" - msgstr "(説明なし)" - --#: ../capplet/main.c:35 ../gnome-session/main.c:284 -+#: ../capplet/main.c:35 -+#: ../gnome-session/main.c:288 - msgid "Version of this application" - msgstr "このアプリケーションのバージョンを表示する" - -@@ -81,7 +84,8 @@ - msgid "Could not display help document" - msgstr "ヘルプのドキュメントを表示できませんでした" - --#: ../data/gnome.desktop.in.h:1 ../data/gnome.session.desktop.in.in.h:1 -+#: ../data/gnome.desktop.in.h:1 -+#: ../data/gnome.session.desktop.in.in.h:1 - msgid "GNOME" - msgstr "GNOME" - -@@ -91,25 +95,24 @@ - - #: ../data/gnome-custom-session.desktop.in.h:1 - msgid "Custom" --msgstr "" -+msgstr "カスタム" - - #: ../data/gnome-custom-session.desktop.in.h:2 - msgid "This entry lets you select a saved session" --msgstr "" -+msgstr "このエントリーから保存したセッションを選択できます" - - #: ../data/gnome-dummy.session.desktop.in.in.h:1 --#, fuzzy --#| msgid "GNOME" - msgid "GNOME dummy" --msgstr "GNOME" -+msgstr "GNOME ダミー" - - #: ../data/session-selector.ui.h:1 - msgid "Custom Session" --msgstr "" -+msgstr "カスタムセッション" - --#: ../data/session-selector.ui.h:2 ../tools/gnome-session-selector.c:103 -+#: ../data/session-selector.ui.h:2 -+#: ../tools/gnome-session-selector.c:103 - msgid "Please select a custom session to run" --msgstr "" -+msgstr "起動するカスタムセッションを選択してください" - - #: ../data/session-selector.ui.h:3 - msgid "_New Session" -@@ -127,7 +130,8 @@ - msgid "_Continue" - msgstr "続行(_C)" - --#: ../data/gsm-inhibit-dialog.ui.h:1 ../gnome-session/gsm-inhibit-dialog.c:514 -+#: ../data/gsm-inhibit-dialog.ui.h:1 -+#: ../gnome-session/gsm-inhibit-dialog.c:514 - msgid "Some programs are still running:" - msgstr "いくつかのプログラムが未だ実行中です:" - -@@ -248,19 +252,22 @@ - msgstr "あれっ! 何かおかしいです。" - - #: ../gnome-session/gsm-fail-whale-dialog.c:293 --msgid "A problem has occurred and the system can't recover. Please contact a system administrator" -+msgid "" -+"A problem has occurred and the system can't recover. Please contact a system " -+"administrator" - msgstr "問題が発生して、システムの復帰ができません。システム管理者に連絡してください" - - #: ../gnome-session/gsm-fail-whale-dialog.c:295 --msgid "A problem has occurred and the system can't recover. All extensions have been disabled as a precaution." -+msgid "" -+"A problem has occurred and the system can't recover. All extensions have " -+"been disabled as a precaution." - msgstr "問題が発生して、システムの復帰ができません。念のため、すべての拡張を無効にしました。" - - #: ../gnome-session/gsm-fail-whale-dialog.c:297 - msgid "" - "A problem has occurred and the system can't recover.\n" - "Please log out and try again." --msgstr "" --"問題が発生して、システムの復帰ができません。\n" -+msgstr "問題が発生して、システムの復帰ができません。\n" - "ログアウトして再度試してください。" - - #: ../gnome-session/gsm-fail-whale-dialog.c:312 -@@ -268,17 +275,18 @@ - msgid "_Log Out" - msgstr "ログアウト(_L)" - --#: ../gnome-session/gsm-fail-whale-dialog.c:334 ../gnome-session/main.c:282 -+#: ../gnome-session/gsm-fail-whale-dialog.c:334 -+#: ../gnome-session/main.c:286 - msgid "Enable debugging code" - msgstr "デバッグモードにする" - - #: ../gnome-session/gsm-fail-whale-dialog.c:335 - msgid "Allow logout" --msgstr "" -+msgstr "ログアウトを許可する" - - #: ../gnome-session/gsm-fail-whale-dialog.c:336 - msgid "Show extension warning" --msgstr "" -+msgstr "拡張機能に関する警告を表示する" - - #: ../gnome-session/gsm-inhibit-dialog.c:462 - msgid "Unknown" -@@ -289,11 +297,15 @@ - msgstr "プログラムが未だ実行中です:" - - #: ../gnome-session/gsm-inhibit-dialog.c:511 --msgid "Waiting for the program to finish. Interrupting the program may cause you to lose work." -+msgid "" -+"Waiting for the program to finish. Interrupting the program may cause you to " -+"lose work." - msgstr "プログラムが終了するのを待っています。プログラムの実行を強制的に中断すると、作業内容を失うことになるかもしれません。" - - #: ../gnome-session/gsm-inhibit-dialog.c:515 --msgid "Waiting for programs to finish. Interrupting these programs may cause you to lose work." -+msgid "" -+"Waiting for programs to finish. Interrupting these programs may cause you to " -+"lose work." - msgstr "プログラムが終了するのを待っています。実行中のプログラムを途中で強制終了させてしまうと、これまでの処理結果を失ってしまう可能性があります。" - - #: ../gnome-session/gsm-inhibit-dialog.c:745 -@@ -385,7 +397,8 @@ - msgid "Restart this system now?" - msgstr "このシステムを今すぐ再起動しますか?" - --#: ../gnome-session/gsm-manager.c:1429 ../gnome-session/gsm-manager.c:2178 -+#: ../gnome-session/gsm-manager.c:1432 -+#: ../gnome-session/gsm-manager.c:2190 - msgid "Not responding" - msgstr "応答なし" - -@@ -396,7 +409,6 @@ - #. It'd be really surprising to reach this code: if we're here, - #. * then the XSMP client already has set several XSMP - #. * properties. But it could still be that SmProgram is not set. --#. - #: ../gnome-session/gsm-xsmp-client.c:558 - msgid "Remembered Application" - msgstr "実行していたアプリケーション" -@@ -406,7 +418,9 @@ - msgstr "このプログラムがログアウトできないようにしています。" - - #: ../gnome-session/gsm-xsmp-server.c:341 --msgid "Refusing new client connection because the session is currently being shut down\n" -+msgid "" -+"Refusing new client connection because the session is currently being shut " -+"down\n" - msgstr "セッションがシャットダウンを実行しているため、新しいクライアントとの接続を拒否しました。\n" - - #: ../gnome-session/gsm-xsmp-server.c:610 -@@ -414,32 +428,32 @@ - msgid "Could not create ICE listening socket: %s" - msgstr "ICE の監視ソケットを生成できませんでした: %s" - --#: ../gnome-session/main.c:280 -+#: ../gnome-session/main.c:284 - msgid "Override standard autostart directories" - msgstr "標準の自動起動フォルダーをオーバーライドする" - --#: ../gnome-session/main.c:280 -+#: ../gnome-session/main.c:284 - msgid "AUTOSTART_DIR" - msgstr "AUTOSTART_DIR" - --#: ../gnome-session/main.c:281 -+#: ../gnome-session/main.c:285 - msgid "Session to use" - msgstr "使用するセッション" - --#: ../gnome-session/main.c:281 -+#: ../gnome-session/main.c:285 - msgid "SESSION_NAME" - msgstr "SESSION_NAME" - --#: ../gnome-session/main.c:283 -+#: ../gnome-session/main.c:287 - msgid "Do not load user-specified applications" - msgstr "ユーザーが指定したアプリケーションを起動しない" - - #. Translators: the 'fail whale' is the black dialog we show when something goes seriously wrong --#: ../gnome-session/main.c:286 -+#: ../gnome-session/main.c:290 - msgid "Show the fail whale dialog for testing" - msgstr "テスト用にエラー画面を表示する" - --#: ../gnome-session/main.c:320 -+#: ../gnome-session/main.c:324 - msgid " - the GNOME session manager" - msgstr "- GNOME セッションマネージャー" - -@@ -461,13 +475,28 @@ - "\n" - "If no --inhibit option is specified, idle is assumed.\n" - msgstr "" -+"%s [OPTION...] COMMAND\n" -+"\n" -+"\n" -+"COMMAND を起動し、その間セッションのいくつかの機能を抑止します。\n" -+"\n" -+" -h, --help このヘルプを表示する\n" -+" --version プログラムのバージョンを表示する\n" -+" --app-id ID 抑止時に使用するアプリケーションID (オプション)\n" -+" --reason REASON 抑止する理由を指定する (オプション)\n" -+" --inhibit ARG 抑止する機能をコロン区切りで以下から指定する:\n" -+" logout, switch-user, suspend, idle, automount\n" -+" --inhibit-only COMMAND を起動せずに待機する\n" -+"\n" -+"--inhibit オプションが無指定の場合 idle を指定したものと扱います。\n" - - #: ../tools/gnome-session-inhibit.c:148 - #, c-format - msgid "Failed to execute %s\n" - msgstr "%s を起動できませんでした。\n" - --#: ../tools/gnome-session-inhibit.c:208 ../tools/gnome-session-inhibit.c:218 -+#: ../tools/gnome-session-inhibit.c:208 -+#: ../tools/gnome-session-inhibit.c:218 - #: ../tools/gnome-session-inhibit.c:228 - #, c-format - msgid "%s requires an argument\n" -@@ -479,7 +508,8 @@ - msgstr "セッション %d" - - #: ../tools/gnome-session-selector.c:108 --msgid "Session names are not allowed to start with ‘.’ or contain ‘/’ characters" -+msgid "" -+"Session names are not allowed to start with ‘.’ or contain ‘/’ characters" - msgstr "セッション名は‘.’から始めたり、‘/’を含めることはできません。" - - #: ../tools/gnome-session-selector.c:112 -@@ -515,53 +545,11 @@ - msgid "Don't prompt for user confirmation" - msgstr "ユーザーに確認をしない" - --#: ../tools/gnome-session-quit.c:91 ../tools/gnome-session-quit.c:101 -+#: ../tools/gnome-session-quit.c:91 -+#: ../tools/gnome-session-quit.c:101 - msgid "Could not connect to the session manager" - msgstr "セッションマネージャーに接続できませんでした" - - #: ../tools/gnome-session-quit.c:203 - msgid "Program called with conflicting options" - msgstr "同時には適用できないオプションを指定しました" -- --#~ msgid "GNOME fallback" --#~ msgstr "GNOME フォールバック" -- --#~ msgid "Icon '%s' not found" --#~ msgstr "'%s' というアイコンが見つかりませんでした" -- --#~ msgid "GNOME 3 Failed to Load" --#~ msgstr "GNOME 3 を読み込むのに失敗しました" -- --#~ msgid "" --#~ "Unfortunately GNOME 3 failed to start properly and started in the fallback mode.\n" --#~ "\n" --#~ "This most likely means your system (graphics hardware or driver) is not capable of delivering the full GNOME 3 experience." --#~ msgstr "" --#~ "残念ながら GNOME 3 が正しく起動せず、フォールバックモード で起動しました。\n" --#~ "\n" --#~ "おそらく、このシステム (グラフィックのハードウェアやドライバー) は GNOME 3 を満足に動かすことができないようです。" -- --#~ msgid "Learn more about GNOME 3" --#~ msgstr "GNOME 3 について詳しく知る" -- --#~ msgid "Unable to start login session (and unable to connect to the X server)" --#~ msgstr "ログインセッションを起動できません (X サーバーにも接続できません)" -- --#~ msgid "Some programs are still running:" --#~ msgstr "いくつかのプログラムが未だ実行中です:" -- --#~ msgid "Exited with code %d" --#~ msgstr "コード %d で終了しました" -- --#~ msgid "Killed by signal %d" --#~ msgstr "シグナル %d で終了させられました" -- --#~ msgid "Stopped by signal %d" --#~ msgstr "シグナル %d で停止させられました" -- --#~ msgid "" --#~ "A problem has occurred and the system can't recover. Some of the extensions below may have caused this.\n" --#~ "Please try disabling some of these, and then log out and try again." --#~ msgstr "" --#~ "問題が発生して、システムの復帰ができません。これは以下の拡張のどれかが引き起こした可能性があります。\n" --#~ "これらのどれかを無効にして、ログアウトして再度試してください。" ---- a/gnome-session-3.8.4/po/ta.po 2013-11-28 16:12:19.195382022 +0530 -+++ a/gnome-session-3.8.4/po/ta.po 2013-11-28 16:13:12.819872081 +0530 -@@ -2,30 +2,30 @@ - # translation of ta.po to - # Tamil translation of Gnome-Session messages. - # Copyright (C) 2001, 2004, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. --# -+# - # Dinesh Nadarajah , 2004. - # Jayaradha N , 2004. - # Felix , 2006. - # Dr.T.Vasudevan , 2007, 2008, 2009, 2010, 2011, 2012. - # I. Felix , 2008, 2009, 2011. - # Shantha kumar , 2013. -+# shkumar , 2013. #zanata - msgid "" - msgstr "" - "Project-Id-Version: gnome-session.HEAD.ta\n" --"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug." --"cgi?product=gnome-session&keywords=I18N+L10N&component=general\n" -+"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-" -+"session&keywords=I18N+L10N&component=general\n" - "POT-Creation-Date: 2013-02-19 18:36+0000\n" --"PO-Revision-Date: 2013-03-22 16:29+0530\n" --"Last-Translator: Shantha kumar \n" -+"PO-Revision-Date: 2013-11-12 02:45-0500\n" -+"Last-Translator: shkumar \n" - "Language-Team: American English <>\n" --"Language: \n" - "MIME-Version: 1.0\n" - "Content-Type: text/plain; charset=UTF-8\n" - "Content-Transfer-Encoding: 8bit\n" --"Plural-Forms: nplurals=2; plural=(n!=1);\\n" -+"Language: ta\n" -+"Plural-Forms: nplurals=2; plural=(n!=1);\\n\n" - "\n" --"\n" --"X-Generator: Lokalize 1.0\n" -+"X-Generator: Zanata 3.1.2\n" - - # gsm/session-properties-capplet.c:292 - #: ../capplet/gsm-app-dialog.c:120 -@@ -52,33 +52,34 @@ - msgid "The startup command is not valid" - msgstr "துவக்க கட்டளை செல்லுபடியாகாதது" - --#: ../capplet/gsm-properties-dialog.c:517 -+#: ../capplet/gsm-properties-dialog.c:519 - msgid "Enabled" - msgstr "செயலாக்கப்பட்டது" - - # gsm/logout.c:240 --#: ../capplet/gsm-properties-dialog.c:529 -+#: ../capplet/gsm-properties-dialog.c:531 - msgid "Icon" - msgstr "சின்னம்" - - # gsm/gsm-client-list.c:112 --#: ../capplet/gsm-properties-dialog.c:541 -+#: ../capplet/gsm-properties-dialog.c:543 - msgid "Program" - msgstr "நிரல்" - --#: ../capplet/gsm-properties-dialog.c:745 -+#: ../capplet/gsm-properties-dialog.c:747 - msgid "Startup Applications Preferences" - msgstr "துவக்க பயன்பாடுகள் விருப்பங்கள்" - --#: ../capplet/gsp-app.c:274 -+#: ../capplet/gsp-app.c:276 - msgid "No name" - msgstr "பெயர் இல்லை" - --#: ../capplet/gsp-app.c:280 -+#: ../capplet/gsp-app.c:282 - msgid "No description" - msgstr "விவரணம் இல்லை" - --#: ../capplet/main.c:35 ../gnome-session/main.c:269 -+#: ../capplet/main.c:35 -+#: ../gnome-session/main.c:288 - msgid "Version of this application" - msgstr "இந்த பயன்பாட்டின் பதிப்பு " - -@@ -86,13 +87,14 @@ - msgid "Could not display help document" - msgstr "உதவி ஆவணத்தை காட்ட இயலவில்லை" - --#: ../data/gnome.desktop.in.h:1 ../data/gnome.session.desktop.in.in.h:1 -+#: ../data/gnome.desktop.in.h:1 -+#: ../data/gnome.session.desktop.in.in.h:1 - msgid "GNOME" - msgstr "GNOME" - - #: ../data/gnome.desktop.in.h:2 - msgid "This session logs you into GNOME" --msgstr "இந்த அமர்வு க்நோம் இல் உங்களை நுழைக்கும் " -+msgstr "இந்த அமர்வு GNOME இல் உங்களை புகுபதிவு செய்யும்" - - #: ../data/gnome-custom-session.desktop.in.h:1 - msgid "Custom" -@@ -103,35 +105,31 @@ - msgstr "இந்த உள்ளீடானது ஒரு சேமிக்கப்பட்ட அமர்வை தேர்ந்தெடுக்கிறது" - - #: ../data/gnome-dummy.session.desktop.in.in.h:1 --#| msgid "GNOME" - msgid "GNOME dummy" - msgstr "GNOME டம்மி" - - # gsm/save-session.c:43 - #: ../data/session-selector.ui.h:1 --#| msgid "Default session" - msgid "Custom Session" - msgstr "தனிப்பயன் அமர்வு" - --#: ../data/session-selector.ui.h:2 ../tools/gnome-session-selector.c:103 -+#: ../data/session-selector.ui.h:2 -+#: ../tools/gnome-session-selector.c:103 - msgid "Please select a custom session to run" - msgstr "ஒரு தனிப்பயன் அமர்வை இயக்குவதற்கு தேர்ந்தெடுக்கவும் " - - # gsm/session-properties.c:272 - #: ../data/session-selector.ui.h:3 --#| msgid "Save sessions" - msgid "_New Session" - msgstr "புதிய அமர்வு (_N)" - - # gsm/session-properties.c:272 - #: ../data/session-selector.ui.h:4 --#| msgid "Save sessions" - msgid "_Remove Session" - msgstr "அமர்வை நீக்கு (_R)" - - # gsm/session-properties.c:272 - #: ../data/session-selector.ui.h:5 --#| msgid "Save sessions" - msgid "Rena_me Session" - msgstr "அமர்வை மறுபெயரிடு (_m)" - -@@ -139,9 +137,10 @@ - msgid "_Continue" - msgstr "தொடரவும் (_C)" - --#: ../data/gsm-inhibit-dialog.ui.h:1 ../gnome-session/gsm-inhibit-dialog.c:514 -+#: ../data/gsm-inhibit-dialog.ui.h:1 -+#: ../gnome-session/gsm-inhibit-dialog.c:514 - msgid "Some programs are still running:" --msgstr "நிரல்கள் சில இன்னும் ஒடுகின்றன:" -+msgstr "நிரல்கள் சில இன்னும் இயங்குகின்றன:" - - #: ../data/session-properties.desktop.in.in.h:1 - msgid "Startup Applications" -@@ -149,7 +148,8 @@ - - #: ../data/session-properties.desktop.in.in.h:2 - msgid "Choose what applications to start when you log in" --msgstr "நீங்கள் புகுபதிவு செய்யும் போது எந்த பயன்பாடுகள் தேர்ந்தெடுக்கப்படவேண்டும்" -+msgstr "" -+"நீங்கள் புகுபதிவு செய்யும் போது எந்த பயன்பாடுகள் தேர்ந்தெடுக்கப்படவேண்டும்" - - # gsm/startup-programs.c:373 - #: ../data/session-properties.ui.h:1 -@@ -265,25 +265,27 @@ - msgid "Show session management options" - msgstr "அமர்வு மேலாண்மை தேர்வுகளை காட்டுக" - --#: ../gnome-session/gsm-fail-whale-dialog.c:297 -+#: ../gnome-session/gsm-fail-whale-dialog.c:286 - msgid "Oh no! Something has gone wrong." - msgstr "அடடா! ஏதோ தவறு நிகழ்ந்துவிட்டது" - --#: ../gnome-session/gsm-fail-whale-dialog.c:304 -+#: ../gnome-session/gsm-fail-whale-dialog.c:293 - msgid "" - "A problem has occurred and the system can't recover. Please contact a system " - "administrator" --msgstr "ஒரு பிரச்சினை நிகழ்ந்தது. கணினி மீள இயலாது. ஒரு கணினி மேலாளரை தொடர்பு கொள்ளவும்." -+msgstr "" -+"ஒரு பிரச்சினை நிகழ்ந்தது. கணினி மீள இயலாது. ஒரு கணினி மேலாளரை தொடர்பு " -+"கொள்ளவும்." - --#: ../gnome-session/gsm-fail-whale-dialog.c:306 -+#: ../gnome-session/gsm-fail-whale-dialog.c:295 - msgid "" - "A problem has occurred and the system can't recover. All extensions have " - "been disabled as a precaution." - msgstr "" --"ஒரு பிரச்சினை நிகழ்ந்தது. கணினி மீள இயலாது. முன் எச்சரிக்கையாக எல்லா நீட்சிகளும் செயல் " --"இழக்கப்பட்டுள்ளன." -+"ஒரு பிரச்சினை நிகழ்ந்தது. கணினி மீள இயலாது. முன் எச்சரிக்கையாக எல்லா " -+"நீட்சிகளும் செயல் இழக்கப்பட்டுள்ளன." - --#: ../gnome-session/gsm-fail-whale-dialog.c:308 -+#: ../gnome-session/gsm-fail-whale-dialog.c:297 - msgid "" - "A problem has occurred and the system can't recover.\n" - "Please log out and try again." -@@ -292,21 +294,21 @@ - "வெளியேறி மீண்டும் முயற்சிக்கவும்" - - # panel/logout.c:73 panel/menu.c:5339 --#: ../gnome-session/gsm-fail-whale-dialog.c:323 -+#: ../gnome-session/gsm-fail-whale-dialog.c:312 - #: ../gnome-session/gsm-logout-dialog.c:384 - msgid "_Log Out" - msgstr "(_L) விலகவும்" - --#: ../gnome-session/gsm-fail-whale-dialog.c:345 ../gnome-session/main.c:267 -+#: ../gnome-session/gsm-fail-whale-dialog.c:334 -+#: ../gnome-session/main.c:286 - msgid "Enable debugging code" - msgstr "பிழைத்திருத்த குறியீட்டை செயல்படுத்து." - --#: ../gnome-session/gsm-fail-whale-dialog.c:346 --#| msgid "Show logout dialog" -+#: ../gnome-session/gsm-fail-whale-dialog.c:335 - msgid "Allow logout" - msgstr "வெளிசெல்ல அனுமதி" - --#: ../gnome-session/gsm-fail-whale-dialog.c:347 -+#: ../gnome-session/gsm-fail-whale-dialog.c:336 - msgid "Show extension warning" - msgstr "நீட்டிப்பு எச்சரிக்கையைக் காட்டு" - -@@ -320,26 +322,20 @@ - msgstr "ஒரு நிரல் இன்னும் ஒடுகிறது:" - - #: ../gnome-session/gsm-inhibit-dialog.c:511 --#| msgid "" --#| "Waiting for the program to finish. Interrupting the program may cause " --#| "you to lose work." - msgid "" - "Waiting for the program to finish. Interrupting the program may cause you to " - "lose work." - msgstr "" --"நிரல் இயங்கி முடிய காத்திருக்கிறது. நிரல் இயக்கத்தை தடை செய்வது உங்கள் வேலையை " --"சேமிக்காமல் போகச் செய்யும்." -+"நிரல் இயங்கி முடிய காத்திருக்கிறது. நிரல் இயக்கத்தை தடை செய்வது உங்கள் " -+"வேலையை சேமிக்காமல் போகச் செய்யும்." - - #: ../gnome-session/gsm-inhibit-dialog.c:515 --#| msgid "" --#| "Waiting for programs to finish. Interrupting these programs may cause " --#| "you to lose work." - msgid "" - "Waiting for programs to finish. Interrupting these programs may cause you to " - "lose work." - msgstr "" --"நிரல்கள் தங்கள் வேலையை முடிக்கக் காத்திருக்கிறது. குறுக்கிட்டால் நீங்கள் செய்த பணிகள் " --"இழக்கப்படலாம்." -+"நிரல்கள் தங்கள் வேலையை முடிக்கக் காத்திருக்கிறது. குறுக்கிட்டால் நீங்கள் " -+"செய்த பணிகள் இழக்கப்படலாம்." - - #: ../gnome-session/gsm-inhibit-dialog.c:745 - msgid "Switch User Anyway" -@@ -434,20 +430,19 @@ - msgid "Restart this system now?" - msgstr "இப்போது இந்த கணினியை மீண்டும் துவக்கவா? " - --#: ../gnome-session/gsm-manager.c:1429 ../gnome-session/gsm-manager.c:2177 -+#: ../gnome-session/gsm-manager.c:1432 -+#: ../gnome-session/gsm-manager.c:2190 - msgid "Not responding" - msgstr "பதிலளிக்க இல்லை" - - # panel/logout.c:73 panel/menu.c:5339 - #: ../gnome-session/gsm-util.c:411 --#| msgid "Log out" - msgid "_Log out" - msgstr "வெளியேறு (_L)" - - #. It'd be really surprising to reach this code: if we're here, - #. * then the XSMP client already has set several XSMP - #. * properties. But it could still be that SmProgram is not set. --#. - #: ../gnome-session/gsm-xsmp-client.c:558 - msgid "Remembered Application" - msgstr "நினைவில் கொண்ட பயன்பாடு" -@@ -456,43 +451,44 @@ - msgid "This program is blocking logout." - msgstr "இந்த நிரல் வெளியேறுவதை தடுக்கிறது" - --#: ../gnome-session/gsm-xsmp-server.c:333 -+#: ../gnome-session/gsm-xsmp-server.c:341 - msgid "" - "Refusing new client connection because the session is currently being shut " - "down\n" --msgstr "புதிய சார்ந்தோன் இணைப்பை மறுக்கிறது; ஏனெனில் இப்போதைய அமர்வு மூடப்படுகிறது\n" -+msgstr "" -+"புதிய சார்ந்தோன் இணைப்பை மறுக்கிறது; ஏனெனில் இப்போதைய அமர்வு மூடப்படுகிறது\n" - --#: ../gnome-session/gsm-xsmp-server.c:602 -+#: ../gnome-session/gsm-xsmp-server.c:610 - #, c-format - msgid "Could not create ICE listening socket: %s" - msgstr "ஐஸ் கேட்கும் பொருத்துவாயை உருவாக்க முடியவில்லை : %s" - --#: ../gnome-session/main.c:265 -+#: ../gnome-session/main.c:284 - msgid "Override standard autostart directories" - msgstr "செந்தர தானியங்கி அடைவுகளை வலுவாக புறக்கணி" - --#: ../gnome-session/main.c:265 -+#: ../gnome-session/main.c:284 - msgid "AUTOSTART_DIR" - msgstr "AUTOSTART_DIR" - --#: ../gnome-session/main.c:266 -+#: ../gnome-session/main.c:285 - msgid "Session to use" - msgstr "பயன்படுத்த அமர்வு" - --#: ../gnome-session/main.c:266 -+#: ../gnome-session/main.c:285 - msgid "SESSION_NAME" - msgstr "SESSION_NAME" - --#: ../gnome-session/main.c:268 -+#: ../gnome-session/main.c:287 - msgid "Do not load user-specified applications" - msgstr "பயனர் குறித்த நிரல்களை ஏற்றாதே" - - #. Translators: the 'fail whale' is the black dialog we show when something goes seriously wrong --#: ../gnome-session/main.c:271 -+#: ../gnome-session/main.c:290 - msgid "Show the fail whale dialog for testing" - msgstr "சோதனைக்கு பெய்ல் வேல் உரையாடலை காட்டுக" - --#: ../gnome-session/main.c:286 -+#: ../gnome-session/main.c:324 - msgid " - the GNOME session manager" - msgstr "- க்னோம் அமர்வு மேலாலாளர்" - -@@ -534,7 +530,8 @@ - msgid "Failed to execute %s\n" - msgstr "%s ஐச் செயல்படுத்துவது தோல்வி\n" - --#: ../tools/gnome-session-inhibit.c:208 ../tools/gnome-session-inhibit.c:218 -+#: ../tools/gnome-session-inhibit.c:208 -+#: ../tools/gnome-session-inhibit.c:218 - #: ../tools/gnome-session-inhibit.c:228 - #, c-format - msgid "%s requires an argument\n" -@@ -542,13 +539,14 @@ - - #: ../tools/gnome-session-selector.c:62 - #, c-format --#| msgid "Session to use" - msgid "Session %d" - msgstr "அமர்வு %d" - - #: ../tools/gnome-session-selector.c:108 --msgid "Session names are not allowed to start with ‘.’ or contain ‘/’ characters" --msgstr "அமர்வு பெயர்கள் ஒரு '.' அல்லது ‘/’ எழுத்துக்களுடன் துவக்க அனுமதிப்பதில்லை" -+msgid "" -+"Session names are not allowed to start with ‘.’ or contain ‘/’ characters" -+msgstr "" -+"அமர்வு பெயர்கள் ஒரு '.' அல்லது ‘/’ எழுத்துக்களுடன் துவக்க அனுமதிப்பதில்லை" - - #: ../tools/gnome-session-selector.c:112 - msgid "Session names are not allowed to start with ‘.’" -@@ -585,221 +583,11 @@ - msgstr "பயனர் உறுதிபடுத்தலுக்கு தூண்டாதே" - - # gsm/save-session.c:93 --#: ../tools/gnome-session-quit.c:91 ../tools/gnome-session-quit.c:101 -+#: ../tools/gnome-session-quit.c:91 -+#: ../tools/gnome-session-quit.c:101 - msgid "Could not connect to the session manager" - msgstr "அமர்வு மேலாளருடன் இணைக்க முடியவில்லை" - - #: ../tools/gnome-session-quit.c:203 - msgid "Program called with conflicting options" - msgstr "நிரல் முரணான தேர்வுகளை அழைத்தது" -- --#~ msgid "GNOME fallback" --#~ msgstr "க்னோம் பின்சார்தல்" -- --#~ msgid "Icon '%s' not found" --#~ msgstr "'%s' சின்னம் காணப்படவில்லை" -- --#~ msgid "GNOME 3 Failed to Load" --#~ msgstr "க்னோம் 3 ஏற்றத்தில் தோல்வியுற்றது" -- --#~ msgid "" --#~ "Unfortunately GNOME 3 failed to start properly and started in the " --#~ "fallback mode.\n" --#~ "\n" --#~ "This most likely means your system (graphics hardware or driver) is not " --#~ "capable of delivering the full GNOME 3 experience." --#~ msgstr "" --#~ "துரத்ருஷ்ட வசமாக க்னோம் 3 சரியாக துவங்கவில்லை; அது இந்த நிலையில் துவங்கியது. " --#~ "பின் சார்தல்.\n" --#~ "\n" --#~ "அனேகமாக இதன் பொரூல் என்னவென்றால் உங்கள் கணினி (வரைகலை வன்பொருள் அல்லது இயக்கி) முழு " --#~ "க்னோம் 3 அனுபவத்தை தர பொருத்தமில்லை." -- --#~ msgid "Learn more about GNOME 3" --#~ msgstr "மேலும் க்னோம் 3 பற்றி" -- --#~ msgid "" --#~ "Unable to start login session (and unable to connect to the X server)" --#~ msgstr "" --#~ "உள்நுழைவு அமர்வை துவக்க முடியவில்லை ( மற்றும் எக்ஸ் சேவையகத்துடன் இணைக்க இயலவில்லை)" -- --#~ msgid "Some programs are still running:" --#~ msgstr " சில நிரல்கள் இன்னும் ஒடுகிறன" -- --#~ msgid "" --#~ "A problem has occurred and the system can't recover. Some of the " --#~ "extensions below may have caused this.\n" --#~ "Please try disabling some of these, and then log out and try again." --#~ msgstr "" --#~ "ஒரு பிரச்சினை நிகழ்ந்தது. கணினி மீள இயலாது. கீழ் காணும் சில நீட்சிகள் இதை உருவாக்கி " --#~ "இருக்கலாம்\n" --#~ "தயை செய்து அவற்றில் சிலதை செயல் நீக்கிவிட்டு, வெளியேறி மீண்டும் முயற்சிக்கவும்" -- --#~ msgid "Exited with code %d" --#~ msgstr " கோட் %d உடன் வெளியேறியது" -- --#~ msgid "Killed by signal %d" --#~ msgstr "சமிக்ஞை %d ஆல் கொல்லப்பட்டது" -- --#~ msgid "Stopped by signal %d" --#~ msgstr "சமிக்ஞை %d ஆல் நிறுத்தப்பட்டது" -- --#~ msgid "" --#~ "There is a problem with the configuration server.\n" --#~ "(%s exited with status %d)" --#~ msgstr "" --#~ "வடிவமைப்பு சேவையகத்துடன் ஒரு பிரச்சினை உள்ளது\n" --#~ "(%s வெளியேறியது நிலை %d)" -- --# gsm/splash.c:67 --#~ msgid "File Manager" --#~ msgstr "சாளர மேலாளர்" -- --#~ msgid "" --#~ "If enabled, gnome-session will prompt the user before ending a session." --#~ msgstr "செயல்படுத்தப்பட்ட,gnome அமர்வுகளை பயன்படுத்தி அமர்வுகளை முடி." -- --#~ msgid "If enabled, gnome-session will save the session automatically." --#~ msgstr "செயல்படுத்தப்பட்டால், க்னோம் அமர்வை தானியங்கியாக சேமிக்கும்." -- --#~ msgid "List of applications that are part of the default session." --#~ msgstr "முன்னிருப்பு அமர்வுக்கு பங்களிக்கும் பயன்பாடுகள்." -- --#~ msgid "" --#~ "List of components that are required as part of the session. (Each " --#~ "element names a key under \"/desktop/gnome/session/required_components" --#~ "\"). The Startup Applications preferences tool will not normally allow " --#~ "users to remove a required component from the session, and the session " --#~ "manager will automatically add the required components back to the " --#~ "session at login time if they do get removed." --#~ msgstr "" --#~ "அமர்வின் பாகமாக அவசியம் இருக்க வேண்டிய உருப்புகளின் பட்டியல். (ஒவ்வொரு உருப்படியும் " --#~ "\"/desktop/gnome/session/required-components\" இன் கீழ் ஒரு விசையை " --#~ "குறிக்கிறது. அமர்வு தேர்வுகள் சாதாரணமாக பயனர்களை அவசியம் வேன்டிய உருப்படியை நீக்க " --#~ "அனுமதிக்காது. அப்படி நீக்கினால் மீண்டும் அமர்வு மேலாளரால் அவை தானியங்கியாக " --#~ "சேர்க்கப்படும்." -- --# gsm/logout.c:248 --#~ msgid "Logout prompt" --#~ msgstr "வெளிச்செல் ப்ராம்ட்" -- --# gsm/splash.c:65 --#~ msgid "Panel" --#~ msgstr "பலகம்" -- --#~ msgid "Required session components" --#~ msgstr "தேவையான அமர்வு கூறுகள்" -- --#~ msgid "" --#~ "The file manager provides the desktop icons and allows you to interact " --#~ "with your saved files." --#~ msgstr "" --#~ "கோப்பு மேலாளர் மேல்மேசை சின்னங்களை அளித்து உங்கள் சேமித்த கோப்புகளுடன் ஊடாட " --#~ "அனுமதிக்கிறது." -- --#~ msgid "" --#~ "The number of minutes of inactivity before the session is considered idle." --#~ msgstr "அமர்வு வெறுமையாக இருப்பதற்கு முன் செயலிழக்கப்பட்ட நிமிடங்கள்" -- --#~ msgid "" --#~ "The panel provides the bar at the top or bottom of the screen containing " --#~ "menus, the window list, status icons, the clock, etc." --#~ msgstr "" --#~ "பலகம் ஒரு பட்டியை திரையின் மேல் அல்லது கீழ் தருகிறது. இதில் சாளர பட்டியல் இருப்பு " --#~ "நிலை சின்னங்கள், கடிகாரம் முதலியன இருக்கும்." -- --#~ msgid "" --#~ "The window manager is the program that draws the title bar and borders " --#~ "around windows, and allows you to move and resize windows." --#~ msgstr "" --#~ "சாளரம் மேலாளர் தலைப்பு பட்டி மற்றும் சாளரங்கள் ஓரத்தில் எல்லைகள் மற்றும் சாளரங்களை " --#~ "நகர்த்தவும் மற்றும் மறுஅளவு செய்யவும் உதவும் நிரல் " -- --#~ msgid "Time before session is considered idle" --#~ msgstr "அமர்வுக்கு முன் வெறுமையாக இருக்கும்" -- --# gsm/splash.c:67 --#~ msgid "Window Manager" --#~ msgstr "சாளரமேலாளர்" -- --#~ msgid "GConf key used to look up default session" --#~ msgstr "முன்னிருப்பு அமர்வை காண ஜிகான்ஃப் விசை பயன்பட்டது " -- --#~ msgid "Show shutdown dialog" --#~ msgstr "கணினி நிறுத்த உரையாடலை காட்டுக" -- --# gsm/save-session.c:44 --#~ msgid "Use dialog boxes for errors" --#~ msgstr "பிழைகளுக்கு உரையாடல் பெட்டிகளை உபயோகி" -- --# gsm/session-properties-capplet.c:206 --#~ msgid "Set the current session name" --#~ msgstr "நடப்பு அமர்வு பெயரை அமைக்கவும்" -- --#~ msgid "NAME" --#~ msgstr "NAME" -- --# gsm/save-session.c:43 --#~ msgid "Kill session" --#~ msgstr "அமர்வைக் கொல்" -- --#~ msgid "" --#~ "Assistive technology support has been requested for this session, but the " --#~ "accessibility registry was not found. Please ensure that the AT-SPI " --#~ "package is installed. Your session has been started without assistive " --#~ "technology support." --#~ msgstr "" --#~ "உதவி தொழில்நுட்ப ஆதரவு இந்த அமர்வுக்கு வேண்டப்பட்டது. ஆனால் அணுகல் பதிவேடு " --#~ "காணப்படவில்லை. AT-SPI பொதி நிறுவப்பட்டுள்ளதா என சோதிக்கவும். உங்கள் அமர்வு உதவி " --#~ "தொழில்நுட்ப ஆதரவு இல்லாமல் துவக்கப்பட்டுள்ளது." -- --#~ msgid "AT SPI Registry Wrapper" --#~ msgstr "AT SPI பதிவேட்டு உறை" -- --#~ msgid "GNOME Settings Daemon Helper" --#~ msgstr "GNOME அமைப்புகள் டெய்மன் உதவியாளர்" -- --#~ msgid "" --#~ "If enabled, gnome-session will save the session automatically. Otherwise, " --#~ "the logout dialog will have an option to save the session." --#~ msgstr "செயல்படுத்தப்பட்ட gnome -அமர்வுகளை தானாகவே சேமித்துக்கொள்ள முடியும்." -- --#~ msgid "Preferred Image to use for login splash screen" --#~ msgstr "உள் அனுமதி திரையில் விரும்பிய படத்தை பயன்படுத்தவும்" -- --# gsm/session-properties-capplet.c:192 --#~ msgid "Show the splash screen" --#~ msgstr "தொடக்க ஓவியத்தைக் காண்பிக்கவும்" -- --#~ msgid "Show the splash screen when the session starts up" --#~ msgstr "அமர்வு தொடங்கும்போது தொடக்க-ஓவியம் காண்பிக்கவும்" -- --#~ msgid "" --#~ "This is a relative path value based off the $datadir/pixmaps/ directory. " --#~ "Sub-directories and image names are valid values. Changing this value " --#~ "will effect the next session login." --#~ msgstr "" --#~ "$datadir/pixmaps/ அடைவுக்கு தொடர்புடைய பாதையாகும். துணை-அடைவுகள் மற்றும் பட " --#~ "பெயர்கள் ஆகியவை சரியான மதிப்புகளாகும். இந்த மதிப்புகளை மாற்றினால்அடுத்த அமர்வினை " --#~ "பாதிக்கும்." -- --#~ msgid "" --#~ "Waiting for program to finish. Interrupting program may cause you to " --#~ "lose work." --#~ msgstr "" --#~ "நிரல் இயங்கி முடிய காத்திருக்கிறது. நிரல் இயக்கத்தை தடை செய்வது உங்கள் வேலையை " --#~ "சேமிக்காமல் போகச் செய்யும்." -- --# gsm/session-properties-capplet.c:192 --#~ msgid "- GNOME Splash Screen" --#~ msgstr "க்னோம் தொடக்க ஓவியம்" -- --#~ msgid "GNOME Splash Screen" --#~ msgstr "க்னோம் துவக்க திரை" -- --# gsm/startup-programs.c:333 --#~ msgid "The name of the startup program cannot be empty" --#~ msgstr "துவக்க நிரல் பெயர் காலியாக இருக்க முடியாது" -- --#~ msgid "Sessions Preferences" --#~ msgstr "அமர்வுகள் விருப்பங்கள்" ---- a/gnome-session-3.8.4/po/zh_CN.po 2013-11-28 16:12:19.196382031 +0530 -+++ a/gnome-session-3.8.4/po/zh_CN.po 2013-11-28 16:13:12.818872072 +0530 -@@ -13,22 +13,22 @@ - # tuhaihe <1132321739qq@gmail.com>, 2012. - # nhm <572348382@qq.com>, 2013. - # Wylmer Wang , 2013. --# -+# Leah Liu , 2013. #zanata - msgid "" - msgstr "" - "Project-Id-Version: gnome-session master\n" - "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-" - "session&keywords=I18N+L10N&component=general\n" - "POT-Creation-Date: 2013-04-01 13:36+0000\n" --"PO-Revision-Date: 2013-04-02 11:41+0800\n" --"Last-Translator: nhm <572348382@qq.com>\n" -+"PO-Revision-Date: 2013-09-23 02:30-0400\n" -+"Last-Translator: Leah Liu \n" - "Language-Team: Chinese/Simplified \n" --"Language: \n" - "MIME-Version: 1.0\n" - "Content-Type: text/plain; charset=UTF-8\n" - "Content-Transfer-Encoding: 8bit\n" -+"Language: zh-CN\n" - "Plural-Forms: nplurals=1; plural=0;\n" --"X-Generator: Poedit 1.5.5\n" -+"X-Generator: Zanata 3.1.2\n" - - # help-browser/toc-man.c:19 help-browser/toc2-man.c:21 - #: ../capplet/gsm-app-dialog.c:120 -@@ -51,33 +51,34 @@ - msgid "The startup command is not valid" - msgstr "启动命令无效" - --#: ../capplet/gsm-properties-dialog.c:517 -+#: ../capplet/gsm-properties-dialog.c:519 - msgid "Enabled" - msgstr "启用" - - # gsm/logout.c:240 --#: ../capplet/gsm-properties-dialog.c:529 -+#: ../capplet/gsm-properties-dialog.c:531 - msgid "Icon" - msgstr "图标" - - # applets/gkb/gkb.c:262 --#: ../capplet/gsm-properties-dialog.c:541 -+#: ../capplet/gsm-properties-dialog.c:543 - msgid "Program" - msgstr "程序" - --#: ../capplet/gsm-properties-dialog.c:745 -+#: ../capplet/gsm-properties-dialog.c:747 - msgid "Startup Applications Preferences" - msgstr "启动应用程序首选项" - --#: ../capplet/gsp-app.c:274 -+#: ../capplet/gsp-app.c:276 - msgid "No name" - msgstr "无名称" - --#: ../capplet/gsp-app.c:280 -+#: ../capplet/gsp-app.c:282 - msgid "No description" - msgstr "无描述" - --#: ../capplet/main.c:35 ../gnome-session/main.c:284 -+#: ../capplet/main.c:35 -+#: ../gnome-session/main.c:288 - msgid "Version of this application" - msgstr "此应用程序的版本" - -@@ -85,7 +86,8 @@ - msgid "Could not display help document" - msgstr "不能显示帮助文档" - --#: ../data/gnome.desktop.in.h:1 ../data/gnome.session.desktop.in.in.h:1 -+#: ../data/gnome.desktop.in.h:1 -+#: ../data/gnome.session.desktop.in.in.h:1 - msgid "GNOME" - msgstr "GNOME" - -@@ -103,13 +105,14 @@ - - #: ../data/gnome-dummy.session.desktop.in.in.h:1 - msgid "GNOME dummy" --msgstr "" -+msgstr "GNOME 模拟" - - #: ../data/session-selector.ui.h:1 - msgid "Custom Session" - msgstr "自定义会话" - --#: ../data/session-selector.ui.h:2 ../tools/gnome-session-selector.c:103 -+#: ../data/session-selector.ui.h:2 -+#: ../tools/gnome-session-selector.c:103 - msgid "Please select a custom session to run" - msgstr "请选择一个要运行的自定义会话" - -@@ -129,7 +132,8 @@ - msgid "_Continue" - msgstr "继续(_C)" - --#: ../data/gsm-inhibit-dialog.ui.h:1 ../gnome-session/gsm-inhibit-dialog.c:514 -+#: ../data/gsm-inhibit-dialog.ui.h:1 -+#: ../gnome-session/gsm-inhibit-dialog.c:514 - msgid "Some programs are still running:" - msgstr "有些程序仍在运行中:" - -@@ -282,7 +286,8 @@ - msgid "_Log Out" - msgstr "注销(_L)" - --#: ../gnome-session/gsm-fail-whale-dialog.c:334 ../gnome-session/main.c:282 -+#: ../gnome-session/gsm-fail-whale-dialog.c:334 -+#: ../gnome-session/main.c:286 - msgid "Enable debugging code" - msgstr "启用调试代码" - -@@ -404,7 +409,8 @@ - msgid "Restart this system now?" - msgstr "现在重启该系统吗?" - --#: ../gnome-session/gsm-manager.c:1429 ../gnome-session/gsm-manager.c:2178 -+#: ../gnome-session/gsm-manager.c:1432 -+#: ../gnome-session/gsm-manager.c:2190 - msgid "Not responding" - msgstr "无响应" - -@@ -416,7 +422,6 @@ - #. It'd be really surprising to reach this code: if we're here, - #. * then the XSMP client already has set several XSMP - #. * properties. But it could still be that SmProgram is not set. --#. - #: ../gnome-session/gsm-xsmp-client.c:558 - msgid "Remembered Application" - msgstr "记住的应用程序" -@@ -436,32 +441,32 @@ - msgid "Could not create ICE listening socket: %s" - msgstr "无法创建 ICE 监听套接字:%s" - --#: ../gnome-session/main.c:280 -+#: ../gnome-session/main.c:284 - msgid "Override standard autostart directories" - msgstr "取代默认的自动启动目录" - --#: ../gnome-session/main.c:280 -+#: ../gnome-session/main.c:284 - msgid "AUTOSTART_DIR" - msgstr "自动启动目录" - --#: ../gnome-session/main.c:281 -+#: ../gnome-session/main.c:285 - msgid "Session to use" - msgstr "要使用的会话" - --#: ../gnome-session/main.c:281 -+#: ../gnome-session/main.c:285 - msgid "SESSION_NAME" - msgstr "会话名称" - --#: ../gnome-session/main.c:283 -+#: ../gnome-session/main.c:287 - msgid "Do not load user-specified applications" - msgstr "不装入用户指定的应用程序" - - #. Translators: the 'fail whale' is the black dialog we show when something goes seriously wrong --#: ../gnome-session/main.c:286 -+#: ../gnome-session/main.c:290 - msgid "Show the fail whale dialog for testing" - msgstr "显示用于测试的鲸鱼失败对话框" - --#: ../gnome-session/main.c:320 -+#: ../gnome-session/main.c:324 - msgid " - the GNOME session manager" - msgstr "- GNOME 会话管理器" - -@@ -502,7 +507,8 @@ - msgid "Failed to execute %s\n" - msgstr "执行 %s 失败\n" - --#: ../tools/gnome-session-inhibit.c:208 ../tools/gnome-session-inhibit.c:218 -+#: ../tools/gnome-session-inhibit.c:208 -+#: ../tools/gnome-session-inhibit.c:218 - #: ../tools/gnome-session-inhibit.c:228 - #, c-format - msgid "%s requires an argument\n" -@@ -553,64 +559,11 @@ - msgstr "不提示用户确认" - - # gsm/save-session.c:86 --#: ../tools/gnome-session-quit.c:91 ../tools/gnome-session-quit.c:101 -+#: ../tools/gnome-session-quit.c:91 -+#: ../tools/gnome-session-quit.c:101 - msgid "Could not connect to the session manager" - msgstr "无法连接到会话管理器" - - #: ../tools/gnome-session-quit.c:203 - msgid "Program called with conflicting options" - msgstr "调用程序的选项互相冲突" -- --#~ msgid "GNOME fallback" --#~ msgstr "GNOME 后备模式" -- --#~ msgid "Icon '%s' not found" --#~ msgstr "图标“%s”未找到" -- --#~ msgid "GNOME 3 Failed to Load" --#~ msgstr "GNOME 3 加载失败" -- --#~ msgid "" --#~ "Unfortunately GNOME 3 failed to start properly and started in the " --#~ "fallback mode.\n" --#~ "\n" --#~ "This most likely means your system (graphics hardware or driver) is not " --#~ "capable of delivering the full GNOME 3 experience." --#~ msgstr "" --#~ "很遗憾 GNOME 3 无法正常启动,并已启动到后备模式。\n" --#~ "\n" --#~ "这可能是因为您的显卡硬件或驱动不足以完全运行 GNOME 3。" -- --#~ msgid "Learn more about GNOME 3" --#~ msgstr "进一步了解 GNOME 3" -- --#~ msgid "" --#~ "Unable to start login session (and unable to connect to the X server)" --#~ msgstr "无法启动登录会话(并且无法连接到 X 服务器)" -- --#~ msgid "Some programs are still running:" --#~ msgstr "某些程序仍在运行中:" -- --#~ msgid "Exited with code %d" --#~ msgstr "以代码 %d 退出" -- --#~ msgid "Killed by signal %d" --#~ msgstr "被信号 %d 杀死" -- --#~ msgid "Stopped by signal %d" --#~ msgstr "被信号 %d 停止" -- --#~ msgid "" --#~ "A problem has occurred and the system can't recover. Some of the " --#~ "extensions below may have caused this.\n" --#~ "Please try disabling some of these, and then log out and try again." --#~ msgstr "" --#~ "系统出错并无法恢复。这可能是下面的一些扩展导致的。\n" --#~ "请尝试禁用一些,并注销重试。" -- --#~ msgid "" --#~ "There is a problem with the configuration server.\n" --#~ "(%s exited with status %d)" --#~ msgstr "" --#~ "配置服务器有错。\n" --#~ "(%s 的退出状态为 %d)" ---- a/gnome-session-3.8.4/po/as.po 2014-01-20 17:20:13.346030125 +0530 -+++ a/gnome-session-3.8.4/po/as.po 2014-01-20 17:20:30.625183627 +0530 -@@ -1,23 +1,24 @@ - # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER - # This file is distributed under the same license as the PACKAGE package. --# -+# - # Amitakhya Phukan , 2009, 2010. - # Nilamdyuti Goswami , 2011, 2012, 2013. -+# ngoswami , 2014. #zanata - msgid "" - msgstr "" - "Project-Id-Version: as\n" - "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-" - "session&keywords=I18N+L10N&component=general\n" - "POT-Creation-Date: 2013-02-23 07:03+0000\n" --"PO-Revision-Date: 2013-03-05 18:57+0530\n" --"Last-Translator: Nilamdyuti Goswami \n" -+"PO-Revision-Date: 2014-01-06 06:27-0500\n" -+"Last-Translator: ngoswami \n" - "Language-Team: Assamese \n" --"Language: as_IN\n" - "MIME-Version: 1.0\n" - "Content-Type: text/plain; charset=UTF-8\n" - "Content-Transfer-Encoding: 8bit\n" -+"Language: as\n" - "Plural-Forms: nplurals=2; plural=n != 1;\n" --"X-Generator: Lokalize 1.5\n" -+"X-Generator: Zanata 3.2.1\n" - - #: ../capplet/gsm-app-dialog.c:120 - msgid "Select Command" -@@ -39,33 +40,32 @@ - msgid "The startup command is not valid" - msgstr "আৰম্ভৰ কমান্ড অবৈধ" - --#: ../capplet/gsm-properties-dialog.c:517 -+#: ../capplet/gsm-properties-dialog.c:519 - msgid "Enabled" - msgstr "সামৰ্থবান" - --#: ../capplet/gsm-properties-dialog.c:529 -+#: ../capplet/gsm-properties-dialog.c:531 - msgid "Icon" - msgstr "আইকন" - --# --#: ../capplet/gsm-properties-dialog.c:541 -+#: ../capplet/gsm-properties-dialog.c:543 - msgid "Program" - msgstr "প্ৰগ্ৰাম" - --#: ../capplet/gsm-properties-dialog.c:745 -+#: ../capplet/gsm-properties-dialog.c:747 - msgid "Startup Applications Preferences" - msgstr "আৰম্ভৰ এপ্লিকেচন পছন্দসমূহ" - --#: ../capplet/gsp-app.c:274 -+#: ../capplet/gsp-app.c:276 - msgid "No name" - msgstr "নাম নোহোৱা" - --#: ../capplet/gsp-app.c:280 -+#: ../capplet/gsp-app.c:282 - msgid "No description" - msgstr "বিৱৰণ নাই" - --# --#: ../capplet/main.c:35 ../gnome-session/main.c:269 -+#: ../capplet/main.c:35 -+#: ../gnome-session/main.c:288 - msgid "Version of this application" - msgstr "এই এপ্লিকেচনৰ সংস্কৰণ" - -@@ -73,7 +73,8 @@ - msgid "Could not display help document" - msgstr "সহায় দস্তাবেজ প্ৰদৰ্শন কৰিবলৈ ব্যৰ্থ" - --#: ../data/gnome.desktop.in.h:1 ../data/gnome.session.desktop.in.in.h:1 -+#: ../data/gnome.desktop.in.h:1 -+#: ../data/gnome.session.desktop.in.in.h:1 - msgid "GNOME" - msgstr "GNOME" - -@@ -90,7 +91,6 @@ - msgstr "এই প্ৰৱিষ্টিয়ে আপোনাক এটা সংৰক্ষিত অধিবেশন নিৰ্বাচন কৰাত সহায় কৰে" - - #: ../data/gnome-dummy.session.desktop.in.in.h:1 --#| msgid "GNOME" - msgid "GNOME dummy" - msgstr "GNOME ডামি" - -@@ -98,7 +98,8 @@ - msgid "Custom Session" - msgstr "স্বনিৰ্বাচিত অধিবেশন" - --#: ../data/session-selector.ui.h:2 ../tools/gnome-session-selector.c:103 -+#: ../data/session-selector.ui.h:2 -+#: ../tools/gnome-session-selector.c:103 - msgid "Please select a custom session to run" - msgstr "অনুগ্ৰহ কৰি চলাবলে এটা স্বনিৰ্বাচিত অধিবেশন বাছক" - -@@ -118,7 +119,8 @@ - msgid "_Continue" - msgstr "অব্যাহত ৰাখক (_C)" - --#: ../data/gsm-inhibit-dialog.ui.h:1 ../gnome-session/gsm-inhibit-dialog.c:514 -+#: ../data/gsm-inhibit-dialog.ui.h:1 -+#: ../gnome-session/gsm-inhibit-dialog.c:514 - msgid "Some programs are still running:" - msgstr "কিছুমান প্ৰগ্ৰাম চলি আছে:" - -@@ -146,7 +148,6 @@ - msgid "_Remember Currently Running Applications" - msgstr "বৰ্তমানে চলি থকা এপ্লিকেচনসমূহ মনত ৰাখক (_R)" - --# - #: ../data/session-properties.ui.h:5 - msgid "Options" - msgstr "বিকল্পসমূহ" -@@ -159,12 +160,10 @@ - msgid "Comm_ent:" - msgstr "মন্তব্য (_e):" - --# - #: ../data/session-properties.ui.h:8 - msgid "Co_mmand:" - msgstr "কমান্ড (_m):" - --# - #: ../data/session-properties.ui.h:9 - msgid "_Name:" - msgstr "নাম (_N):" -@@ -210,22 +209,18 @@ - msgid "Not a launchable item" - msgstr "এটা লঞ্চ কৰিব পৰা বস্তু নহয় " - --# - #: ../egg/eggsmclient.c:226 - msgid "Disable connection to session manager" - msgstr "অধিবেশন ব্যৱস্থাপকৰ সৈতে সংযোগ বিচ্ছিন্ন কৰক" - --# - #: ../egg/eggsmclient.c:229 - msgid "Specify file containing saved configuration" - msgstr "সংৰক্ষিত সংৰূপ অন্তৰ্ভুক্ত কৰা ফাইল ধাৰ্য্য কৰক" - --# - #: ../egg/eggsmclient.c:229 - msgid "FILE" - msgstr "FILE" - --# - #: ../egg/eggsmclient.c:232 - msgid "Specify session management ID" - msgstr "অধিবেশন ব্যৱস্থাপনাৰ ID উল্লেখ কৰক" -@@ -242,28 +237,27 @@ - msgid "Show session management options" - msgstr "অধিবেশন ব্যৱস্থাপনা বিকল্পসমূহ দেখুৱাওক" - --#: ../gnome-session/gsm-fail-whale-dialog.c:297 -+#: ../gnome-session/gsm-fail-whale-dialog.c:286 - msgid "Oh no! Something has gone wrong." - msgstr "ইচচ! কিবা এটা ভুল হৈছে।" - --#: ../gnome-session/gsm-fail-whale-dialog.c:304 -+#: ../gnome-session/gsm-fail-whale-dialog.c:293 - msgid "" - "A problem has occurred and the system can't recover. Please contact a system " - "administrator" - msgstr "" --"এটা সমস্যা দেখা দিছে আৰু চিস্টেমটো উদ্ধাৰ হব পৰা নাই। অনুগ্ৰহ কৰি এজন চিস্টেম " --"প্ৰশাসকক যোগাযোগ কৰক" -+"এটা সমস্যা দেখা দিছে আৰু চিস্টেমটো উদ্ধাৰ হব পৰা নাই। অনুগ্ৰহ কৰি এজন " -+"চিস্টেম প্ৰশাসকক যোগাযোগ কৰক" - --#: ../gnome-session/gsm-fail-whale-dialog.c:306 -+#: ../gnome-session/gsm-fail-whale-dialog.c:295 - msgid "" - "A problem has occurred and the system can't recover. All extensions have " - "been disabled as a precaution." - msgstr "" - "এটা সমস্যা দেখা দিছে আৰু চিস্টেমটো উদ্ধাৰ হব পৰা নাই। সকলো সম্প্ৰসাৰন এটা " --"সাৱধানতা " --"হিচাপে অসামৰ্থবান কৰা হৈছে।" -+"সাৱধানতা হিচাপে অসামৰ্থবান কৰা হৈছে।" - --#: ../gnome-session/gsm-fail-whale-dialog.c:308 -+#: ../gnome-session/gsm-fail-whale-dialog.c:297 - msgid "" - "A problem has occurred and the system can't recover.\n" - "Please log out and try again." -@@ -271,26 +265,24 @@ - "এটা সমস্যা দেখা দিছে আৰু চিস্টেমটো উদ্ধাৰ হব পৰা নাই।\n" - "অনুগ্ৰহ কৰি লগআউট কৰক আৰু পুনৰ চেষ্টা কৰক।" - --# --#: ../gnome-session/gsm-fail-whale-dialog.c:323 -+#: ../gnome-session/gsm-fail-whale-dialog.c:312 - #: ../gnome-session/gsm-logout-dialog.c:384 - msgid "_Log Out" - msgstr "লগআউট কৰক (_L)" - --# --#: ../gnome-session/gsm-fail-whale-dialog.c:345 ../gnome-session/main.c:267 -+#: ../gnome-session/gsm-fail-whale-dialog.c:334 -+#: ../gnome-session/main.c:286 - msgid "Enable debugging code" - msgstr "ক'ড ডিবাগিং সামৰ্থবান কৰক" - --#: ../gnome-session/gsm-fail-whale-dialog.c:346 -+#: ../gnome-session/gsm-fail-whale-dialog.c:335 - msgid "Allow logout" - msgstr "লগআউটৰ অনুমতি দিয়ক" - --#: ../gnome-session/gsm-fail-whale-dialog.c:347 -+#: ../gnome-session/gsm-fail-whale-dialog.c:336 - msgid "Show extension warning" - msgstr "সম্প্ৰসাৰনৰ সতৰ্কবাৰ্তা দেখুৱাওক" - --# - #: ../gnome-session/gsm-inhibit-dialog.c:462 - msgid "Unknown" - msgstr "অজ্ঞাত" -@@ -305,8 +297,7 @@ - "lose work." - msgstr "" - "প্ৰগ্ৰাম সমাপ্ত হোৱাৰ অপেক্ষা কৰা হৈছে। প্ৰগ্ৰাম বিঘ্নিত হ'লে আপুনি কাৰ্য্য " --"হেৰুৱাব " --"পাৰে।" -+"হেৰুৱাব পাৰে।" - - #: ../gnome-session/gsm-inhibit-dialog.c:515 - msgid "" -@@ -314,8 +305,7 @@ - "lose work." - msgstr "" - "প্ৰগ্ৰামসমূহ সমাপ্ত হোৱাৰ বাবে অপেক্ষা কৰা হৈছে। প্ৰগ্ৰামসমূহ বিঘ্নিত হ'লে " --"আপুনি কাৰ্য্য " --"হেৰুৱাব পাৰে।" -+"আপুনি কাৰ্য্য হেৰুৱাব পাৰে।" - - #: ../gnome-session/gsm-inhibit-dialog.c:745 - msgid "Switch User Anyway" -@@ -341,12 +331,10 @@ - msgid "Restart Anyway" - msgstr "তথাপিও পুনৰাম্ভ কৰক" - --# - #: ../gnome-session/gsm-inhibit-dialog.c:768 - msgid "Lock Screen" - msgstr "পৰ্দা লক কৰক" - --# - #: ../gnome-session/gsm-inhibit-dialog.c:771 - msgid "Cancel" - msgstr "বাতিল কৰক" -@@ -382,12 +370,10 @@ - msgid "Log out of this system now?" - msgstr "এতিয়াই চিস্টেমৰ পৰা লগআউট কৰিব নে?" - --# - #: ../gnome-session/gsm-logout-dialog.c:375 - msgid "_Switch User" - msgstr "ব্যৱহাৰকাৰী পৰিবৰ্তন কৰক (_S)" - --# - #: ../gnome-session/gsm-logout-dialog.c:390 - msgid "Shut down this system now?" - msgstr "এই মুহূৰ্তে চিস্টেম বন্ধ কৰিব নে?" -@@ -400,7 +386,6 @@ - msgid "_Hibernate" - msgstr "হাইবাৰনেইট কৰক (_H)" - --# - #: ../gnome-session/gsm-logout-dialog.c:408 - #: ../gnome-session/gsm-logout-dialog.c:434 - msgid "_Restart" -@@ -414,7 +399,8 @@ - msgid "Restart this system now?" - msgstr "এই চিস্টেম এতিয়া পুনৰাম্ভ কৰিব নে?" - --#: ../gnome-session/gsm-manager.c:1429 ../gnome-session/gsm-manager.c:2178 -+#: ../gnome-session/gsm-manager.c:1432 -+#: ../gnome-session/gsm-manager.c:2190 - msgid "Not responding" - msgstr "কোনো প্ৰতিক্ৰিয়া নাই" - -@@ -425,7 +411,6 @@ - #. It'd be really surprising to reach this code: if we're here, - #. * then the XSMP client already has set several XSMP - #. * properties. But it could still be that SmProgram is not set. --#. - #: ../gnome-session/gsm-xsmp-client.c:558 - msgid "Remembered Application" - msgstr "মনত ৰখা এপ্লিকেচন" -@@ -440,40 +425,39 @@ - "down\n" - msgstr "" - "চিস্টেম বৰ্তমানে বন্ধ কৰাৰ প্ৰচেষ্টা কৰা হৈছে আৰু এই কাৰণে নতুন গ্ৰাহকৰ সৈতে " --"সংযোগ " --"স্থাপনৰ অনুৰোধ প্ৰত্যাখ্যান কৰা হৈছে।\n" -+"সংযোগ স্থাপনৰ অনুৰোধ প্ৰত্যাখ্যান কৰা হৈছে।\n" - - #: ../gnome-session/gsm-xsmp-server.c:610 - #, c-format - msgid "Could not create ICE listening socket: %s" - msgstr "ICE অপেক্ষাৰ ছ'কেট নিৰ্মাণ কৰিবলৈ ব্যৰ্থ: %s" - --#: ../gnome-session/main.c:265 -+#: ../gnome-session/main.c:284 - msgid "Override standard autostart directories" - msgstr "প্ৰামাণিক স্বআৰম্ভ ডাইৰেকটৰিসমূহ অভাৰৰাইড কৰক" - --#: ../gnome-session/main.c:265 -+#: ../gnome-session/main.c:284 - msgid "AUTOSTART_DIR" - msgstr "AUTOSTART_DIR" - --#: ../gnome-session/main.c:266 -+#: ../gnome-session/main.c:285 - msgid "Session to use" - msgstr "ব্যৱহাৰ হ'ব লগিয়া অধিবেশন" - --#: ../gnome-session/main.c:266 -+#: ../gnome-session/main.c:285 - msgid "SESSION_NAME" - msgstr "SESSION_NAME" - --#: ../gnome-session/main.c:268 -+#: ../gnome-session/main.c:287 - msgid "Do not load user-specified applications" - msgstr "ব্যৱহাৰকাৰী দ্বাৰা নিৰ্ধাৰিত এপ্লিকেচনসমূহ ল'ড নকৰিব" - - #. Translators: the 'fail whale' is the black dialog we show when something goes seriously wrong --#: ../gnome-session/main.c:271 -+#: ../gnome-session/main.c:290 - msgid "Show the fail whale dialog for testing" - msgstr "পৰিক্ষণৰ বাবে ব্যৰ্থ হোৱেইল ডাইলগ দেখুৱাওক" - --#: ../gnome-session/main.c:286 -+#: ../gnome-session/main.c:324 - msgid " - the GNOME session manager" - msgstr "- GNOME অধিবেশন ব্যৱস্থাপক" - -@@ -497,25 +481,26 @@ - msgstr "" - "%s [OPTION...] COMMAND\n" - "\n" --"Execute COMMAND while inhibiting some session functionality.\n" -+"অধিবেশনৰ কাৰ্য্যকৰীতাক বাধা দিওতে COMMAND এক্সিকিউট কৰক। \n" - "\n" --" -h, --help Show this help\n" --" --version Show program version\n" --" --app-id ID The application id to use\n" --" when inhibiting (optional)\n" --" --reason REASON The reason for inhibiting (optional)\n" --" --inhibit ARG Things to inhibit, colon-separated list of:\n" -+" -h, --help এই সহায় দেখুৱাওক\n" -+" --version প্ৰগ্ৰামৰ সংস্কৰণ দেখুৱাওক\n" -+" --app-id ID বাধা দিওতে ব্যৱহাৰ কৰিন লগিয়া\n" -+" এপ্লিকেচন আইডি (বৈকল্পিক)\n" -+" --reason REASON বাধা দিয়াৰ কাৰণ (বৈকল্পিক)\n" -+" --inhibit ARG বাধা দিব লগিয়া বস্তু, কলন-পৃথকিত তালিকা:\n" - " logout, switch-user, suspend, idle, automount\n" --" --inhibit-only Do not launch COMMAND and wait forever instead\n" -+" --inhibit-only ইয়াৰ পৰিৱৰ্তে COMMAND লঞ্চ কৰি সদায়ৰ বাবে অপেক্ষা নকৰিব\n" - "\n" --"If no --inhibit option is specified, idle is assumed.\n" -+"যদি কোনো --inhibit বিকল্প ধাৰ্য্য কৰা হোৱা নাই, idle ধৰি লোৱা হয়।\n" - - #: ../tools/gnome-session-inhibit.c:148 - #, c-format - msgid "Failed to execute %s\n" - msgstr "%s এক্সিকিউট কৰিবলে ব্যৰ্থ\n" - --#: ../tools/gnome-session-inhibit.c:208 ../tools/gnome-session-inhibit.c:218 -+#: ../tools/gnome-session-inhibit.c:208 -+#: ../tools/gnome-session-inhibit.c:218 - #: ../tools/gnome-session-inhibit.c:228 - #, c-format - msgid "%s requires an argument\n" -@@ -523,7 +508,6 @@ - - #: ../tools/gnome-session-selector.c:62 - #, c-format --#| msgid "Session to use" - msgid "Session %d" - msgstr "অধিবেশন %d" - -@@ -547,14 +531,13 @@ - msgid "A session named ‘%s’ already exists" - msgstr "‘%s’ নামৰ এটা অধিবেশন ইতিমধ্যে অস্তিত্ববান" - --# - #: ../tools/gnome-session-quit.c:53 - msgid "Log out" - msgstr "লগআউট কৰক" - - #: ../tools/gnome-session-quit.c:54 - msgid "Power off" --msgstr "পাওৱাৰ অফ কৰক" -+msgstr "বন্ধ কৰক" - - #: ../tools/gnome-session-quit.c:55 - msgid "Reboot" -@@ -568,93 +551,11 @@ - msgid "Don't prompt for user confirmation" - msgstr "ব্যৱহাৰকাৰী নিশ্চিতকৰণৰ কাৰণে প্ৰমপ্ট নকৰিব" - --#: ../tools/gnome-session-quit.c:91 ../tools/gnome-session-quit.c:101 -+#: ../tools/gnome-session-quit.c:91 -+#: ../tools/gnome-session-quit.c:101 - msgid "Could not connect to the session manager" - msgstr "অধিবেশন ব্যৱস্থাপকৰ সৈতে সংযোগ স্থাপন কৰিবলৈ ব্যৰ্থ" - - #: ../tools/gnome-session-quit.c:203 - msgid "Program called with conflicting options" - msgstr "দ্বন্দ্বযুক্ত বিকল্প সহ প্ৰগ্ৰামক কল কৰা হৈছে" -- --#~ msgid "GNOME fallback" --#~ msgstr "GNOME ফলবেক" -- --#~ msgid "%d hour" --#~ msgid_plural "%d hours" --#~ msgstr[0] "%d ঘন্টা" --#~ msgstr[1] "%d ঘন্টা" -- --#~ msgid "%d minute" --#~ msgid_plural "%d minutes" --#~ msgstr[0] "%d মিনিট" --#~ msgstr[1] "%d মিনিট" -- --#~ msgid "%d second" --#~ msgid_plural "%d seconds" --#~ msgstr[0] "%d ছেকেণ্ড" --#~ msgstr[1] "%d ছেকেণ্ড" -- --#~ msgid "0 seconds" --#~ msgstr "0 ছেকেণ্ড" -- --#~ msgid "Automatic logout in %s" --#~ msgstr "%s ত স্বচালিতভাৱে লগআউট কৰা হব" -- --#~ msgid "" --#~ "This session is configured to automatically log out after a period of " --#~ "inactivity." --#~ msgstr "" --#~ "এই অধিবেশন নিষ্ক্ৰিয়তাৰ এটা অৱধিৰ পিছত স্বচালিতভাৱে লগ আউট কৰিবলে সংৰূপণ কৰা " --#~ "আছে।" -- --#~ msgid "Icon '%s' not found" --#~ msgstr "'%s' আইকন পোৱা নগল" -- --#~ msgid "GNOME 3 Failed to Load" --#~ msgstr "GNOME 3 ল'ড হ'বলৈ ব্যৰ্থ" -- --#~ msgid "" --#~ "Unfortunately GNOME 3 failed to start properly and started in the " --#~ "fallback mode.\n" --#~ "\n" --#~ "This most likely means your system (graphics hardware or driver) is not " --#~ "capable of delivering the full GNOME 3 experience." --#~ msgstr "" --#~ "দুৰ্ভাগ্যজনকভাৱে GNOME 3 সঠিকভাৱে আৰম্ভ হ'বলৈ ব্যৰ্থ হল আৰু ফলবেক অৱস্থাত " --#~ "আৰম্ভ হল।\n" --#~ "\n" --#~ "এইটোৱে খুব সম্ভব এয়া বুজায় যে আপোনাৰ চিস্টেম (গ্ৰাফিক্স হাৰ্ডওৱেৰ বা ড্ৰাইভাৰ) " --#~ "পূৰ্ণ GNOME 3 অনুভুতি চলাবলে সক্ষম নহয়।" -- --#~ msgid "Learn more about GNOME 3" --#~ msgstr "GNOME 3 ৰ বিষয়ে অধিক জানক" -- --#~ msgid "" --#~ "Unable to start login session (and unable to connect to the X server)" --#~ msgstr "" --#~ "লগিন অধিবেশন আৰম্ভ কৰিবলৈ ব্যৰ্থ (X চাৰ্ভাৰৰ সৈতে সংযোগ স্থাপন কৰিবলৈ ব্যৰ্থ)" -- --#~ msgid "Exited with code %d" --#~ msgstr "%d ক'ডৰ সৈতে প্ৰস্থান কৰা হৈছে" -- --#~ msgid "Killed by signal %d" --#~ msgstr "%d সঙ্কেত দ্বাৰা কিল কৰা হৈছে" -- --#~ msgid "Stopped by signal %d" --#~ msgstr "%d সঙ্কেত দ্বাৰা বন্ধ কৰা হৈছে" -- --#~ msgid "Some programs are still running:" --#~ msgstr "কিছুমান প্ৰগ্ৰাম এতিয়াও চলি আছে:" -- --#~| msgid "" --#~| "A problem has occurred and the system can't recover.\n" --#~| "Please log out and try again." --#~ msgid "" --#~ "A problem has occurred and the system can't recover. Some of the " --#~ "extensions below may have caused this.\n" --#~ "Please try disabling some of these, and then log out and try again." --#~ msgstr "" --#~ "এটা সমস্যা দেখা দিছে আৰু চিস্টেমটো উদ্ধাৰ হব পৰা নাই। তলত থকা কিছুমান " --#~ "সম্প্ৰসাৰনৰ বাবে এনে হব পাৰে।\n" --#~ "অনুগ্ৰহ কৰি কিছুমান অসামৰ্থবান কৰাৰ চেষ্টা কৰক, আৰু তাৰ পিছত লগ আউট কৰক আৰু পুনৰ " --#~ "চেষ্টা কৰক।" diff --git a/SPECS/gnome-session.spec b/SPECS/gnome-session.spec index 7d18ff7..4e7c545 100644 --- a/SPECS/gnome-session.spec +++ b/SPECS/gnome-session.spec @@ -3,33 +3,23 @@ %define po_package gnome-session-3.0 %define _default_patch_fuzz 2 -%if 0%{?fedora} -%else -%global with_session_selector 1 -%endif - Summary: GNOME session manager Name: gnome-session -Version: 3.8.4 -Release: 11%{?dist} +Version: 3.14.0 +Release: 4%{?dist} URL: http://www.gnome.org #VCS: git:git://git.gnome.org/gnome-session -Source0: http://download.gnome.org/sources/gnome-session/3.8/%{name}-%{version}.tar.xz +Source0: http://download.gnome.org/sources/gnome-session/3.14/%{name}-%{version}.tar.xz # Blacklist NV30: https://bugzilla.redhat.com/show_bug.cgi?id=745202 Patch1: gnome-session-3.3.92-nv30.patch +Patch2: 0001-main-Set-XDG_MENU_PREFIX.patch Patch3: gnome-session-3.6.2-swrast.patch -Patch4: 0001-Fix-a-possible-crash-in-the-presence-interface.patch -Patch5: 0001-fail-whale-dialog-Implement-hfw-size-requests.patch -Patch6: translations.patch # https://bugzilla.redhat.com/show_bug.cgi?id=1031182 # https://bugzilla.redhat.com/show_bug.cgi?id=1031188 Patch7: custom-sessions.patch -# https://bugzilla.redhat.com/show_bug.cgi?id=1036038 -Patch8: 0001-gsm-manager-Don-t-abort-when-all-clients-exit.patch - License: GPLv2+ Group: User Interface/Desktops @@ -101,12 +91,9 @@ lets the user manage multiple saved sessions. %prep %setup -q %patch1 -p1 -b .nv30 +%patch2 -p1 -b .set-xdg-menu-prefix %patch3 -p1 -b .swrast -%patch4 -p1 -b .dfuzz -%patch5 -p1 -b .fix-fail-whale-position -%patch6 -p2 -b .translations %patch7 -p1 -b .custom-sessions -%patch8 -p1 -b .dont-abort-when-all-clients-exit echo "ACLOCAL_AMFLAGS = -I m4" >> Makefile.am @@ -114,10 +101,7 @@ autoreconf -i -f %build %configure --enable-docbook-docs \ -%if 0%{?with_session_selector} --enable-session-selector \ -%endif - --docdir=%{_datadir}/doc/%{name}-%{version} \ --enable-systemd make %{?_smp_mflags} V=1 @@ -125,11 +109,11 @@ make %{?_smp_mflags} V=1 make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p" desktop-file-install --vendor gnome --delete-original \ - --dir $RPM_BUILD_ROOT%{_datadir}/applications \ + --dir $RPM_BUILD_ROOT%{_datadir}/applications \ --add-only-show-in GNOME \ $RPM_BUILD_ROOT%{_datadir}/applications/* -cp -p AUTHORS COPYING NEWS README $RPM_BUILD_ROOT%{_datadir}/doc/%{name}-%{version} +rm -rf $RPM_BUILD_ROOT%{_datadir}/wayland-sessions %find_lang %{po_package} @@ -153,7 +137,6 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &>/dev/null || : %{_datadir}/xsessions/* %files custom-session -%defattr(-,root,root) %{_datadir}/xsessions/gnome-custom-session.desktop %{_bindir}/gnome-session-selector %{_bindir}/gnome-session-custom-session @@ -161,30 +144,33 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &>/dev/null || : %doc %{_mandir}/man*/gnome-session-selector* %files -f %{po_package}.lang -%doc %dir %{_datadir}/doc/%{name}-%{version} -%doc %{_datadir}/doc/%{name}-%{version}/AUTHORS -%doc %{_datadir}/doc/%{name}-%{version}/COPYING -%doc %{_datadir}/doc/%{name}-%{version}/NEWS -%doc %{_datadir}/doc/%{name}-%{version}/README -%doc %dir %{_datadir}/doc/%{name}-%{version}/dbus -%doc %{_datadir}/doc/%{name}-%{version}/dbus/* +%doc AUTHORS COPYING NEWS README %doc %{_mandir}/man*/* -%{_datadir}/applications/gnome-session-properties.desktop -%dir %{_datadir}/gnome-session -%dir %{_datadir}/gnome-session/sessions -%{_datadir}/gnome-session/sessions/gnome.session -%{_datadir}/gnome-session/sessions/gnome-dummy.session %{_bindir}/* %{_libexecdir}/gnome-session-check-accelerated %{_libexecdir}/gnome-session-check-accelerated-helper %{_libexecdir}/gnome-session-failed -%{_datadir}/gnome-session/* +%{_datadir}/applications/gnome-session-properties.desktop +%{_datadir}/gnome-session/ +%{_datadir}/doc/gnome-session/dbus/gnome-session.html %{_datadir}/icons/hicolor/*/apps/session-properties.png %{_datadir}/icons/hicolor/scalable/apps/session-properties.svg %{_datadir}/GConf/gsettings/gnome-session.convert %{_datadir}/glib-2.0/schemas/org.gnome.SessionManager.gschema.xml %changelog +* Fri Jul 03 2015 Ray Strode 3.14.0-4 +- Fix up custom sessions patch more + Resolves: #1091453 + +* Wed May 13 2015 Ray Strode 3.14.0-3 +- Fix up custom sessions patch +- Related: #1174597 + +* Mon Mar 23 2015 Richard Hughes - 3.14.0-1 +- Update to 3.14.0 +- Resolves: #1174597 + * Mon Mar 10 2014 Ray Strode 3.8.4-11 - Require mesa-dri-drivers be installed so software GL is available.