OBS User unknown 2009-02-23 11:51:17 +00:00 committed by Git OBS Bridge
parent dbd9264191
commit 67e2e7ec60
5 changed files with 185 additions and 177 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c126b63b1396cdbf21ec4286010bcd03442ecf390ababf59953e45006d1c81a5
size 821899

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:71127fc6e6880f3cf52bc84926636e1d0fa237459002b564dc4b16075224885e
size 827918

View File

@ -1,8 +1,8 @@
Index: gnome-session/gsm-manager.c
===================================================================
--- gnome-session/gsm-manager.c (révision 5137)
+++ gnome-session/gsm-manager.c (copie de travail)
@@ -2180,7 +2180,8 @@ logout_dialog_response (GsmLogoutDialog
--- gnome-session/gsm-manager.c.orig
+++ gnome-session/gsm-manager.c
@@ -2363,7 +2363,8 @@ logout_dialog_response (GsmLogoutDialog
{
g_debug ("GsmManager: Logout dialog response: %d", response_id);
@ -12,7 +12,7 @@ Index: gnome-session/gsm-manager.c
/* In case of dialog cancel, switch user, hibernate and
* suspend, we just perform the respective action and return,
@@ -2190,6 +2191,10 @@ logout_dialog_response (GsmLogoutDialog
@@ -2373,6 +2374,10 @@ logout_dialog_response (GsmLogoutDialog
case GTK_RESPONSE_NONE:
case GTK_RESPONSE_DELETE_EVENT:
break;
@ -25,8 +25,8 @@ Index: gnome-session/gsm-manager.c
break;
Index: gnome-session/gsm-util.c
===================================================================
--- gnome-session/gsm-util.c (révision 5137)
+++ gnome-session/gsm-util.c (copie de travail)
--- gnome-session/gsm-util.c.orig
+++ gnome-session/gsm-util.c
@@ -21,6 +21,7 @@
#include <config.h>
#include <stdlib.h>
@ -35,7 +35,7 @@ Index: gnome-session/gsm-util.c
#include <sys/types.h>
#include <unistd.h>
#include <sys/time.h>
@@ -288,3 +289,75 @@ gsm_util_setenv (const char *variable,
@@ -292,3 +293,75 @@ gsm_util_setenv (const char *variable,
g_error_free (bus_error);
}
}
@ -113,8 +113,8 @@ Index: gnome-session/gsm-util.c
+}
Index: gnome-session/gsm-util.h
===================================================================
--- gnome-session/gsm-util.h (révision 5137)
+++ gnome-session/gsm-util.h (copie de travail)
--- gnome-session/gsm-util.h.orig
+++ gnome-session/gsm-util.h
@@ -21,6 +21,7 @@
#define __GSM_UTIL_H__
@ -135,9 +135,9 @@ Index: gnome-session/gsm-util.h
#endif /* __GSM_UTIL_H__ */
Index: gnome-session/Makefile.am
===================================================================
--- gnome-session/Makefile.am (révision 5137)
+++ gnome-session/Makefile.am (copie de travail)
@@ -21,6 +21,7 @@ INCLUDES = \
--- gnome-session/Makefile.am.orig
+++ gnome-session/Makefile.am
@@ -22,6 +22,7 @@ INCLUDES = \
-DDATA_DIR=\""$(datadir)/gnome-session"\" \
-DDBUS_LAUNCH=\"dbus-launch\" \
-DLIBEXECDIR=\"$(libexecdir)\" \
@ -147,8 +147,8 @@ Index: gnome-session/Makefile.am
-DGCONFTOOL_CMD=\"$(GCONFTOOL)\"
Index: gnome-session/gsm-logout-dialog.c
===================================================================
--- gnome-session/gsm-logout-dialog.c (révision 5137)
+++ gnome-session/gsm-logout-dialog.c (copie de travail)
--- gnome-session/gsm-logout-dialog.c.orig
+++ gnome-session/gsm-logout-dialog.c
@@ -37,8 +37,13 @@
#define AUTOMATIC_ACTION_TIMEOUT 60
@ -200,7 +200,9 @@ Index: gnome-session/gsm-logout-dialog.c
-};
-
-G_DEFINE_TYPE (GsmLogoutDialog, gsm_logout_dialog, GTK_TYPE_MESSAGE_DIALOG);
-
+static void gsm_logout_set_info_text (GsmLogoutDialog *logout_dialog,
+ int seconds);
-static void
-gsm_logout_dialog_set_property (GObject *object,
- guint prop_id,
@ -215,9 +217,7 @@ Index: gnome-session/gsm-logout-dialog.c
- break;
- }
-}
+static void gsm_logout_set_info_text (GsmLogoutDialog *logout_dialog,
+ int seconds);
-
-static void
-gsm_logout_dialog_get_property (GObject *object,
- guint prop_id,
@ -272,7 +272,7 @@ Index: gnome-session/gsm-logout-dialog.c
+ gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (logout_dialog)->vbox), 12);
+ gtk_container_set_border_width (GTK_CONTAINER (logout_dialog), 6);
+
+ gtk_dialog_add_button (GTK_DIALOG (logout_dialog), GTK_STOCK_HELP,
+ gtk_dialog_add_button (GTK_DIALOG (logout_dialog), GTK_STOCK_HELP,
+ GTK_RESPONSE_HELP);
+ logout_dialog->priv->cancel_button =
+ gtk_dialog_add_button (GTK_DIALOG (logout_dialog),
@ -281,151 +281,150 @@ Index: gnome-session/gsm-logout-dialog.c
logout_dialog->priv->power_manager = gsm_get_power_manager ();
logout_dialog->priv->consolekit = gsm_get_consolekit ();
@@ -247,17 +221,82 @@ gsm_logout_supports_shutdown (GsmLogoutD
@@ -247,40 +221,28 @@ gsm_logout_supports_shutdown (GsmLogoutD
}
static void
-gsm_logout_dialog_show (GsmLogoutDialog *logout_dialog, gpointer user_data)
+gsm_logout_dialog_show (GsmLogoutDialog *logout_dialog,
+ gpointer user_data)
+{
{
- gsm_logout_dialog_set_timeout (logout_dialog);
+ gsm_logout_set_info_text (logout_dialog, AUTOMATIC_ACTION_TIMEOUT);
+
+ if (logout_dialog->priv->default_response != GTK_RESPONSE_CANCEL)
+ gsm_logout_dialog_set_timeout (logout_dialog,
+ AUTOMATIC_ACTION_TIMEOUT);
+}
+
}
-static gboolean
-gsm_logout_dialog_timeout (gpointer data)
+static void
+gsm_logout_set_info_text (GsmLogoutDialog *logout_dialog,
+ int seconds)
+ int seconds_to_show)
{
- gsm_logout_dialog_set_timeout (logout_dialog);
+ const char *info_text;
+ char *buf;
+ char *markup;
+ char *name;
+
- GsmLogoutDialog *logout_dialog;
- char *seconds_warning;
- char *secondary_text;
- int seconds_to_show;
- static char *session_type = NULL;
+ const char *seconds_warning;
+ char *secondary_text;
+ char *buf;
+ char *markup;
+ static char *session_type = NULL;
- logout_dialog = (GsmLogoutDialog *) data;
-
- if (!logout_dialog->priv->timeout) {
- gtk_dialog_response (GTK_DIALOG (logout_dialog),
- logout_dialog->priv->default_response);
-
- return FALSE;
- }
-
- if (logout_dialog->priv->timeout <= 30) {
- seconds_to_show = logout_dialog->priv->timeout;
- } else {
- seconds_to_show = (logout_dialog->priv->timeout/10) * 10;
-
- if (logout_dialog->priv->timeout % 10)
- seconds_to_show += 10;
- }
-
- switch (logout_dialog->priv->type) {
- case GSM_DIALOG_LOGOUT_TYPE_LOGOUT:
+ switch (logout_dialog->priv->default_response) {
+ case GSM_LOGOUT_RESPONSE_LOGOUT:
+ info_text = ngettext ("You are currently logged in as "
+ "\"%s\".\n"
+ "You will be automatically logged out "
+ "in %d second.",
+ "You are currently logged in as "
+ "\"%s\".\n"
+ "You will be automatically logged out "
+ "in %d seconds.",
+ seconds);
+ break;
+
seconds_warning = ngettext ("You will be automatically logged "
"out in %d second.",
"You will be automatically logged "
@@ -288,7 +250,7 @@ gsm_logout_dialog_timeout (gpointer data
seconds_to_show);
break;
- case GSM_DIALOG_LOGOUT_TYPE_SHUTDOWN:
+ case GSM_LOGOUT_RESPONSE_SHUTDOWN:
+ info_text = ngettext ("You are currently logged in as "
+ "\"%s\".\n"
+ "This system will be automatically shut "
+ "down in %d second.",
+ "You are currently logged in as "
+ "\"%s\".\n"
+ "This system will be automatically shut "
+ "down in %d seconds.",
+ seconds);
+ break;
+
seconds_warning = ngettext ("This system will be automatically "
"shut down in %d second.",
"This system will be automatically "
@@ -296,6 +258,10 @@ gsm_logout_dialog_timeout (gpointer data
seconds_to_show);
break;
+ case GTK_RESPONSE_CANCEL:
+ info_text = _("You are currently logged in as \"%s\".\n");
+ seconds_warning = "";
+ break;
+
+ default:
+ g_assert_not_reached ();
+ }
+
+ name = g_locale_to_utf8 (g_get_real_name (), -1, NULL, NULL, NULL);
+
+ if (!name || name[0] == '\0' || strcmp (name, "Unknown") == 0) {
+ name = g_locale_to_utf8 (g_get_user_name (), -1 , NULL, NULL, NULL);
+ }
+
+ if (!name) {
+ name = g_strdup (g_get_user_name ());
+ }
+
+ buf = g_strdup_printf (info_text, name, seconds);
default:
g_assert_not_reached ();
}
@@ -330,25 +296,50 @@ gsm_logout_dialog_timeout (gpointer data
secondary_text = g_strdup (seconds_warning);
}
- gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (logout_dialog),
- secondary_text,
- seconds_to_show,
- NULL);
+ buf = g_strdup_printf (secondary_text, seconds_to_show);
+ markup = g_markup_printf_escaped ("<i>%s</i>", buf);
+ g_free (buf);
+ gtk_label_set_markup (GTK_LABEL (logout_dialog->priv->info_label),
+ markup);
+ g_free (markup);
+}
- logout_dialog->priv->timeout--;
+static gboolean
+gsm_logout_dialog_timeout (gpointer data)
+{
+ GsmLogoutDialog *logout_dialog;
+ int seconds_to_show;
+
+ logout_dialog = (GsmLogoutDialog *) data;
+
+ if (!logout_dialog->priv->timeout) {
+ gtk_dialog_response (GTK_DIALOG (logout_dialog),
+ logout_dialog->priv->default_response);
+
+ return FALSE;
+ }
+
+ if (logout_dialog->priv->timeout <= 30) {
+ seconds_to_show = logout_dialog->priv->timeout;
+ } else {
+ seconds_to_show = (logout_dialog->priv->timeout/10) * 10;
+
+ if (logout_dialog->priv->timeout % 10)
+ seconds_to_show += 10;
+ }
+
+ g_free (name);
}
static gboolean
gsm_logout_dialog_timeout (gpointer data)
{
GsmLogoutDialog *logout_dialog;
- char *secondary_text;
- char *name;
int seconds_to_show;
logout_dialog = (GsmLogoutDialog *) data;
@@ -278,73 +317,129 @@ gsm_logout_dialog_timeout (gpointer data
seconds_to_show += 10;
}
- switch (logout_dialog->priv->type) {
- case GSM_DIALOG_LOGOUT_TYPE_LOGOUT:
- secondary_text = ngettext ("You are currently logged in as "
- "\"%s\".\n"
- "You will be automatically logged "
- "out in %d second.",
- "You are currently logged in as "
- "\"%s\".\n"
- "You will be automatically logged "
- "out in %d seconds.",
- seconds_to_show);
- break;
+ gsm_logout_set_info_text (logout_dialog, seconds_to_show);
- case GSM_DIALOG_LOGOUT_TYPE_SHUTDOWN:
- secondary_text = ngettext ("You are currently logged in as "
- "\"%s\".\n"
- "This system will be automatically "
- "shut down in %d second.",
- "You are currently logged in as "
- "\"%s\".\n"
- "This system will be automatically "
- "shut down in %d seconds.",
- seconds_to_show);
- break;
- g_free (secondary_text);
+ logout_dialog->priv->timeout--;
- default:
- g_assert_not_reached ();
- }
+ return TRUE;
+}
return TRUE;
}
- name = g_locale_to_utf8 (g_get_real_name (), -1, NULL, NULL, NULL);
+static void
static void
-gsm_logout_dialog_set_timeout (GsmLogoutDialog *logout_dialog)
+gsm_logout_dialog_set_timeout (GsmLogoutDialog *logout_dialog,
+ int seconds)
+{
{
- logout_dialog->priv->timeout = AUTOMATIC_ACTION_TIMEOUT;
-
- /* Sets the secondary text */
- gsm_logout_dialog_timeout (logout_dialog);
+ logout_dialog->priv->timeout = seconds;
- if (!name || name[0] == '\0' || strcmp (name, "Unknown") == 0) {
- name = g_locale_to_utf8 (g_get_user_name (), -1 , NULL, NULL, NULL);
+ if (logout_dialog->priv->timeout_id != 0) {
+ g_source_remove (logout_dialog->priv->timeout_id);
}
if (logout_dialog->priv->timeout_id != 0) {
g_source_remove (logout_dialog->priv->timeout_id);
@@ -360,13 +351,118 @@ gsm_logout_dialog_set_timeout (GsmLogout
}
- if (!name) {
- name = g_strdup (g_get_user_name ());
+ logout_dialog->priv->timeout_id = g_timeout_add (1000,
+ gsm_logout_dialog_timeout,
+ logout_dialog);
+}
+
+static GtkWidget *
static GtkWidget *
+gsm_logout_tile_new (const char *icon_name,
+ const char *title,
+ const char *description)
@ -453,27 +452,19 @@ Index: gnome-session/gsm-logout-dialog.c
+ image = gtk_image_new_from_icon_name (icon_name,
+ GTK_ICON_SIZE_DIALOG);
+ gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0);
}
- gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (logout_dialog),
- secondary_text,
- name,
- seconds_to_show,
- NULL);
+ }
+
+ vbox = gtk_vbox_new (FALSE, 2);
- logout_dialog->priv->timeout--;
+
+ markup = g_markup_printf_escaped ("<span weight=\"bold\">%s</span>",
+ title);
+ label = gtk_label_new (markup);
+ g_free (markup);
- g_free (name);
+
+ gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
+ gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
+ gtk_label_set_use_underline (GTK_LABEL (label), TRUE);
- return TRUE;
+
+ gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
+
+ if (description != NULL) {
@ -482,7 +473,7 @@ Index: gnome-session/gsm-logout-dialog.c
+ GtkWidget *label;
+
+ color = &GTK_WIDGET (button)->style->fg[GTK_STATE_INSENSITIVE];
+ markup = g_markup_printf_escaped ("<span size=\"small\" foreground=\"#%.2x%.2x%.2x\">%s</span>",
+ markup = g_markup_printf_escaped ("<span size=\"small\" foreground=\"#%.2x%.2x%.2x\">%s</span>",
+ color->red,
+ color->green,
+ color->blue,
@ -501,27 +492,20 @@ Index: gnome-session/gsm-logout-dialog.c
+ gtk_box_pack_start (GTK_BOX (hbox), vbox, FALSE, FALSE, 0);
+
+ return button;
}
static void
-gsm_logout_dialog_set_timeout (GsmLogoutDialog *logout_dialog)
+}
+
+static void
+gsm_logout_tile_clicked (GtkWidget *tile,
+ gpointer response_p)
{
- logout_dialog->priv->timeout = AUTOMATIC_ACTION_TIMEOUT;
+{
+ GtkWidget *dialog;
- /* Sets the secondary text */
- gsm_logout_dialog_timeout (logout_dialog);
+
+ dialog = gtk_widget_get_toplevel (tile);
+ g_assert (GTK_IS_DIALOG (dialog));
+ gtk_dialog_response (GTK_DIALOG (dialog),
+ GPOINTER_TO_UINT (response_p));
+}
- if (logout_dialog->priv->timeout_id != 0) {
- g_source_remove (logout_dialog->priv->timeout_id);
- }
+
+static GtkWidget *
+gsm_logout_append_tile (GtkWidget *vbox,
+ unsigned int response,
@ -539,15 +523,13 @@ Index: gnome-session/gsm-logout-dialog.c
+ "clicked",
+ G_CALLBACK (gsm_logout_tile_clicked),
+ GUINT_TO_POINTER (response));
- logout_dialog->priv->timeout_id = g_timeout_add (1000,
- gsm_logout_dialog_timeout,
- logout_dialog);
+
+ return tile;
}
static GtkWidget *
@@ -353,8 +448,10 @@ gsm_get_dialog (GsmDialogLogoutType type
+}
+
+static GtkWidget *
gsm_get_dialog (GsmDialogLogoutType type,
GdkScreen *screen,
guint32 activate_time)
{
GsmLogoutDialog *logout_dialog;
@ -559,7 +541,7 @@ Index: gnome-session/gsm-logout-dialog.c
if (current_dialog != NULL) {
gtk_widget_destroy (GTK_WIDGET (current_dialog));
@@ -364,82 +461,119 @@ gsm_get_dialog (GsmDialogLogoutType type
@@ -376,82 +472,119 @@ gsm_get_dialog (GsmDialogLogoutType type
current_dialog = logout_dialog;

View File

@ -1,3 +1,20 @@
-------------------------------------------------------------------
Mon Feb 23 02:01:21 CET 2009 - vuntz@novell.com
- Update to version 2.25.91:
+ Fix copy & paste error in debug output
+ Avoid restarting applications when shutting down
+ Improve logout/shutdown dialog messages
+ Change the capplet name in
+ Remove obsolete logout_option gconf key
+ Update description of required_components_list gconf key
+ Updated translations.
- Remove BuildRequires: gnome-desktop-devel, gnome-keyring-devel,
libgnomekbd
- Add BuildRequires: gconf2-devel
- Do not pass unknown --with-rsh-command configure option
- Respin gnome-session-bgo507101-tile-ui.patch.
-------------------------------------------------------------------
Fri Feb 20 00:01:43 CET 2009 - vuntz@novell.com

View File

@ -1,5 +1,5 @@
#
# spec file for package gnome-session (Version 2.25.90)
# spec file for package gnome-session (Version 2.25.91)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@ -20,22 +20,20 @@
Name: gnome-session
BuildRequires: PolicyKit-gnome-devel
BuildRequires: fdupes
BuildRequires: gnome-common
BuildRequires: gnome-desktop-devel
BuildRequires: gnome-keyring-devel
BuildRequires: fdupes
BuildRequires: gconf2-devel
BuildRequires: gnome-patch-translation
BuildRequires: gnome-settings-daemon-devel
BuildRequires: hicolor-icon-theme
BuildRequires: intltool
BuildRequires: libglade2-devel
BuildRequires: libgnomekbd
BuildRequires: tcpd-devel
BuildRequires: update-desktop-files
License: GPL v2 or later; LGPL v2.1 or later
Group: System/GUI/GNOME
Version: 2.25.90
Release: 2
Version: 2.25.91
Release: 1
Summary: Session Tools for the GNOME 2.x Desktop
Url: http://www.gnome.org
Source: %{name}-%{version}.tar.bz2
@ -117,10 +115,7 @@ gnome-patch-translation-update
%build
autoreconf -f -i
# needed for gnome-session--2.17.91:
#export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
%configure \
--with-rsh-command=/usr/bin/rsh \
--with-at-spi-registryd-directory=%{_prefix}/lib/at-spi
%__make %{?jobs:-j%jobs}
@ -183,6 +178,20 @@ rm -rf $RPM_BUILD_ROOT
##%endif
%changelog
* Mon Feb 23 2009 vuntz@novell.com
- Update to version 2.25.91:
+ Fix copy & paste error in debug output
+ Avoid restarting applications when shutting down
+ Improve logout/shutdown dialog messages
+ Change the capplet name in
+ Remove obsolete logout_option gconf key
+ Update description of required_components_list gconf key
+ Updated translations.
- Remove BuildRequires: gnome-desktop-devel, gnome-keyring-devel,
libgnomekbd
- Add BuildRequires: gconf2-devel
- Do not pass unknown --with-rsh-command configure option
- Respin gnome-session-bgo507101-tile-ui.patch.
* Fri Feb 20 2009 vuntz@novell.com
- Don't requires bug-buddy anymore. This is not the case since
2.23.x.