rpms/gnome-session/devel show-lock.patch, NONE, 1.1 unresponsive-timeout.patch, NONE, 1.1 xsmp-stop.patch, NONE, 1.1 gnome-session.spec, 1.252, 1.253 polkit1.patch, 1.4, NONE watch-spew.patch, 1.2, NONE
Matthias Clasen
mclasen at fedoraproject.org
Mon Nov 2 05:06:56 UTC 2009
- Previous message: rpms/gnome-session/F-12 gnome-session.spec,1.254,1.255
- Next message: rpms/gnome-power-manager/devel 0001-Do-not-show-About-and-Help-menu-items-on-the-panel-i.patch, NONE, 1.1 0001-Use-gnome-settings-daemon-popup-code.patch, NONE, 1.1 0002-Make-the-left-and-right-buttons-on-the-status-icon-b.patch, NONE, 1.1 hibernate-button.patch, NONE, 1.1 gnome-power-manager.spec, 1.175, 1.176 sources, 1.70, 1.71
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: mclasen
Update of /cvs/pkgs/rpms/gnome-session/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv2984
Modified Files:
gnome-session.spec
Added Files:
show-lock.patch unresponsive-timeout.patch xsmp-stop.patch
Removed Files:
polkit1.patch watch-spew.patch
Log Message:
copy F12 work over
show-lock.patch:
gsm-inhibit-dialog.c | 38 ++++++++++++++++++++++++++++++++++----
gsm-manager.c | 1 +
2 files changed, 35 insertions(+), 4 deletions(-)
--- NEW FILE show-lock.patch ---
diff -up gnome-session-2.28.0/gnome-session/gsm-inhibit-dialog.c.show-lock gnome-session-2.28.0/gnome-session/gsm-inhibit-dialog.c
--- gnome-session-2.28.0/gnome-session/gsm-inhibit-dialog.c.show-lock 2009-08-25 04:03:42.000000000 -0400
+++ gnome-session-2.28.0/gnome-session/gsm-inhibit-dialog.c 2009-10-14 10:50:42.337489281 -0400
@@ -71,13 +71,16 @@ struct GsmInhibitDialogPrivate
gboolean have_xrender;
int xrender_event_base;
int xrender_error_base;
+ gboolean show_lock;
+ GtkWidget *lock_button;
};
enum {
PROP_0,
PROP_ACTION,
PROP_INHIBITOR_STORE,
- PROP_CLIENT_STORE
+ PROP_CLIENT_STORE,
+ PROP_SHOW_LOCK
};
enum {
@@ -134,6 +137,15 @@ gsm_inhibit_dialog_set_action (GsmInhibi
dialog->priv->action = action;
}
+static void
+gsm_inhibit_dialog_set_show_lock (GsmInhibitDialog *dialog,
+ gboolean show_lock)
+{
+ dialog->priv->show_lock = show_lock;
+ gtk_widget_set_no_show_all (dialog->priv->lock_button, TRUE);
+ gtk_widget_set_visible (dialog->priv->lock_button, show_lock);
+}
+
static gboolean
find_inhibitor (GsmInhibitDialog *dialog,
const char *id,
@@ -809,6 +821,9 @@ gsm_inhibit_dialog_set_property (GObject
case PROP_CLIENT_STORE:
gsm_inhibit_dialog_set_client_store (dialog, g_value_get_object (value));
break;
+ case PROP_SHOW_LOCK:
+ gsm_inhibit_dialog_set_show_lock (dialog, g_value_get_boolean (value));
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -833,6 +848,9 @@ gsm_inhibit_dialog_get_property (GObject
case PROP_CLIENT_STORE:
g_value_set_object (value, dialog->priv->clients);
break;
+ case PROP_SHOW_LOCK:
+ g_value_set_boolean (value, dialog->priv->show_lock);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -920,9 +938,10 @@ setup_dialog (GsmInhibitDialog *dialog)
break;
}
- gtk_dialog_add_button (GTK_DIALOG (dialog),
- _("Lock Screen"),
- DIALOG_RESPONSE_LOCK_SCREEN);
+ dialog->priv->lock_button =
+ gtk_dialog_add_button (GTK_DIALOG (dialog),
+ _("Lock Screen"),
+ DIALOG_RESPONSE_LOCK_SCREEN);
gtk_dialog_add_button (GTK_DIALOG (dialog),
_("Cancel"),
GTK_RESPONSE_CANCEL);
@@ -1006,6 +1025,7 @@ gsm_inhibit_dialog_constructor (GType
setup_dialog (dialog);
gtk_widget_show_all (GTK_WIDGET (dialog));
+ gsm_inhibit_dialog_set_show_lock (dialog, TRUE);
return G_OBJECT (dialog);
}
@@ -1082,6 +1102,14 @@ gsm_inhibit_dialog_class_init (GsmInhibi
GSM_TYPE_STORE,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+ g_object_class_install_property (object_class,
+ PROP_SHOW_LOCK,
+ g_param_spec_boolean ("show-lock",
+ NULL,
+ NULL,
+ TRUE,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+
g_type_class_add_private (klass, sizeof (GsmInhibitDialogPrivate));
}
@@ -1094,6 +1122,8 @@ gsm_inhibit_dialog_init (GsmInhibitDialo
dialog->priv = GSM_INHIBIT_DIALOG_GET_PRIVATE (dialog);
+ dialog->priv->show_lock = TRUE;
+
dialog->priv->xml = gtk_builder_new ();
gtk_builder_set_translation_domain (dialog->priv->xml, GETTEXT_PACKAGE);
diff -up gnome-session-2.28.0/gnome-session/gsm-manager.c.show-lock gnome-session-2.28.0/gnome-session/gsm-manager.c
--- gnome-session-2.28.0/gnome-session/gsm-manager.c.show-lock 2009-10-14 10:50:42.313467505 -0400
+++ gnome-session-2.28.0/gnome-session/gsm-manager.c 2009-10-14 10:51:32.889465604 -0400
@@ -1200,6 +1200,7 @@ query_end_session_complete (GsmManager *
G_CALLBACK (inhibit_dialog_response),
manager);
if (! gsm_manager_has_responsive_inhibitor (manager)) {
+ g_object_set (manager->priv->inhibit_dialog, "show-lock", FALSE, NULL);
manager->priv->inhibit_timeout_id =
g_timeout_add_seconds (120, on_inhibit_dialog_timeout, manager);
}
unresponsive-timeout.patch:
gsm-manager.c | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 65 insertions(+), 1 deletion(-)
--- NEW FILE unresponsive-timeout.patch ---
diff -up gnome-session-2.28.0/gnome-session/gsm-manager.c.unresponsive-timeout gnome-session-2.28.0/gnome-session/gsm-manager.c
--- gnome-session-2.28.0/gnome-session/gsm-manager.c.unresponsive-timeout 2009-09-18 12:36:04.000000000 -0400
+++ gnome-session-2.28.0/gnome-session/gsm-manager.c 2009-10-14 10:49:34.724468379 -0400
@@ -122,6 +122,7 @@ struct GsmManagerPrivate
GsmManagerLogoutType logout_type;
GtkWidget *inhibit_dialog;
+ guint inhibit_timeout_id;
/* List of clients which were disconnected due to disabled condition
* and shouldn't be automatically restarted */
@@ -797,6 +798,24 @@ inhibitor_has_flag (gpointer key,
}
static gboolean
+is_responsive_inhibitor (gpointer key,
+ GsmInhibitor *inhibitor,
+ gpointer data)
+{
+ guint flag;
+ guint flags;
+ const gchar *reason;
+
+ flag = GPOINTER_TO_UINT (data);
+
+ flags = gsm_inhibitor_peek_flags (inhibitor);
+ reason = gsm_inhibitor_peek_reason (inhibitor);
+
+ return (flags & flag) &&
+ g_strcmp0 (_("Not responding"), reason) != 0;
+}
+
+static gboolean
gsm_manager_is_logout_inhibited (GsmManager *manager)
{
GsmInhibitor *inhibitor;
@@ -833,6 +852,24 @@ gsm_manager_is_idle_inhibited (GsmManage
}
static gboolean
+gsm_manager_has_responsive_inhibitor (GsmManager *manager)
+{
+ GsmInhibitor *inhibitor;
+
+ if (manager->priv->inhibitors == NULL) {
+ return FALSE;
+ }
+
+ inhibitor = (GsmInhibitor *)gsm_store_find (manager->priv->inhibitors,
+ (GsmStoreFunc)is_responsive_inhibitor,
+ GUINT_TO_POINTER (GSM_INHIBITOR_FLAG_LOGOUT));
+ if (inhibitor == NULL) {
+ return FALSE;
+ }
+ return TRUE;
+}
+
+static gboolean
_client_cancel_end_session (const char *id,
GsmClient *client,
GsmManager *manager)
@@ -1055,6 +1092,11 @@ inhibit_dialog_response (GsmInhibitDialo
g_debug ("GsmManager: Inhibit dialog response: %d", response_id);
+ if (manager->priv->inhibit_timeout_id > 0) {
+ g_source_remove (manager->priv->inhibit_timeout_id);
+ manager->priv->inhibit_timeout_id = 0;
+ }
+
/* must destroy dialog before cancelling since we'll
remove JIT inhibitors and we don't want to trigger
action. */
@@ -1085,6 +1127,20 @@ inhibit_dialog_response (GsmInhibitDialo
}
}
+static gboolean
+on_inhibit_dialog_timeout (gpointer data)
+{
+ GsmManager *manager = data;
+
+ manager->priv->inhibit_timeout_id = 0;
+
+ inhibit_dialog_response (GSM_INHIBIT_DIALOG (manager->priv->inhibit_dialog),
+ GTK_RESPONSE_ACCEPT,
+ manager);
+
+ return FALSE;
+}
+
static void
query_end_session_complete (GsmManager *manager)
{
@@ -1143,8 +1199,11 @@ query_end_session_complete (GsmManager *
"response",
G_CALLBACK (inhibit_dialog_response),
manager);
+ if (! gsm_manager_has_responsive_inhibitor (manager)) {
+ manager->priv->inhibit_timeout_id =
+ g_timeout_add_seconds (120, on_inhibit_dialog_timeout, manager);
+ }
gtk_widget_show (manager->priv->inhibit_dialog);
-
}
static guint32
@@ -2459,6 +2518,11 @@ gsm_manager_finalize (GObject *object)
g_return_if_fail (manager->priv != NULL);
+ if (manager->priv->inhibit_timeout_id > 0) {
+ g_source_remove (manager->priv->inhibit_timeout_id);
+ manager->priv->inhibit_timeout_id = 0;
+ }
+
G_OBJECT_CLASS (gsm_manager_parent_class)->finalize (object);
}
xsmp-stop.patch:
gsm-xsmp-client.c | 11 +++++++++++
1 file changed, 11 insertions(+)
--- NEW FILE xsmp-stop.patch ---
diff -up gnome-session-2.28.0/gnome-session/gsm-xsmp-client.c.xsmp-stop gnome-session-2.28.0/gnome-session/gsm-xsmp-client.c
--- gnome-session-2.28.0/gnome-session/gsm-xsmp-client.c.xsmp-stop 2009-10-23 10:47:51.555179151 -0400
+++ gnome-session-2.28.0/gnome-session/gsm-xsmp-client.c 2009-10-23 10:47:10.255456283 -0400
@@ -713,6 +713,17 @@ xsmp_stop (GsmClient *client,
g_debug ("GsmXSMPClient: xsmp_stop ('%s')", xsmp->priv->description);
+ /*FIXME: What do we do if the client can't be stoped ?
+ * (probably a cleaner solution exists...)
+ */
+ if (xsmp->priv->conn == NULL) {
+ g_set_error (error,
+ GSM_CLIENT_ERROR,
+ GSM_CLIENT_ERROR_NOT_REGISTERED,
+ "Client is not registered");
+ return FALSE;
+ }
+
SmsDie (xsmp->priv->conn);
return TRUE;
Index: gnome-session.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gnome-session/devel/gnome-session.spec,v
retrieving revision 1.252
retrieving revision 1.253
diff -u -p -r1.252 -r1.253
--- gnome-session.spec 24 Sep 2009 00:55:22 -0000 1.252
+++ gnome-session.spec 2 Nov 2009 05:06:55 -0000 1.253
@@ -10,7 +10,7 @@
Summary: GNOME session manager
Name: gnome-session
Version: 2.28.0
-Release: 1%{?dist}
+Release: 2%{?dist}
URL: http://www.gnome.org
Source0: http://download.gnome.org/sources/gnome-session/2.28/%{name}-%{version}.tar.bz2
Source2: gnome.desktop
@@ -67,6 +67,12 @@ Requires(pre): GConf2 >= %{gconf2_versio
Requires(post): GConf2 >= %{gconf2_version}
Requires(preun): GConf2 >= %{gconf2_version}
+# https://bugzilla.gnome.org/show_bug.cgi?id=592520
+#Patch0: unresponsive-timeout.patch
+# https://bugzilla.gnome.org/show_bug.cgi?id=592519
+#Patch1: show-lock.patch
+# https://bugzilla.gnome.org/show_bug.cgi?id=598211
+Patch2: xsmp-stop.patch
%description
gnome-session manages a GNOME desktop or GDM login session. It starts up
@@ -82,6 +88,9 @@ Desktop file to add GNOME to display man
%prep
%setup -q
+#%patch0 -p1 -b .unresponsive-timeout
+#%patch1 -p1 -b .show-lock
+%patch2 -p1 -b .xsmp-stop
echo "ACLOCAL_AMFLAGS = -I m4" >> Makefile.am
@@ -169,6 +178,9 @@ fi
%changelog
+* Fri Oct 23 2009 Matthias Clasen <mclasen at redhat.com> - 2.28.0-2
+- Avoid a crash on certain xsmp error conditions
+
* Wed Sep 23 2009 Matthias Clasen <mclasen at redhat.com> - 2.28.0-1
- Update to 2.28.0
--- polkit1.patch DELETED ---
--- watch-spew.patch DELETED ---
- Previous message: rpms/gnome-session/F-12 gnome-session.spec,1.254,1.255
- Next message: rpms/gnome-power-manager/devel 0001-Do-not-show-About-and-Help-menu-items-on-the-panel-i.patch, NONE, 1.1 0001-Use-gnome-settings-daemon-popup-code.patch, NONE, 1.1 0002-Make-the-left-and-right-buttons-on-the-status-icon-b.patch, NONE, 1.1 hibernate-button.patch, NONE, 1.1 gnome-power-manager.spec, 1.175, 1.176 sources, 1.70, 1.71
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the scm-commits
mailing list