Copy F12 work over
This commit is contained in:
parent
bfb46d3b20
commit
499787d68b
88
0001-Don-t-show-lock-screen-option-if-locked-down.patch
Normal file
88
0001-Don-t-show-lock-screen-option-if-locked-down.patch
Normal file
@ -0,0 +1,88 @@
|
||||
diff -up gdm-2.28.1/gui/user-switch-applet/applet.c.dont-show-lock-screen-if-locked-down gdm-2.28.1/gui/user-switch-applet/applet.c
|
||||
--- gdm-2.28.1/gui/user-switch-applet/applet.c.dont-show-lock-screen-if-locked-down 2009-10-19 18:12:45.000000000 -0400
|
||||
+++ gdm-2.28.1/gui/user-switch-applet/applet.c 2009-10-31 19:57:21.700544070 -0400
|
||||
@@ -44,7 +44,9 @@
|
||||
#include "gdm-entry-menu-item.h"
|
||||
|
||||
#define LOCKDOWN_DIR "/desktop/gnome/lockdown"
|
||||
-#define LOCKDOWN_KEY LOCKDOWN_DIR "/disable_user_switching"
|
||||
+#define LOCKDOWN_USER_SWITCHING_KEY LOCKDOWN_DIR "/disable_user_switching"
|
||||
+#define LOCKDOWN_LOCK_SCREEN_KEY LOCKDOWN_DIR "/disable_lock_screen"
|
||||
+#define LOCKDOWN_COMMAND_LINE_KEY LOCKDOWN_DIR "/disable_command_line"
|
||||
|
||||
typedef enum {
|
||||
GSM_PRESENCE_STATUS_AVAILABLE = 0,
|
||||
@@ -1163,7 +1165,11 @@ create_sub_menu (GdmAppletData *adata)
|
||||
G_CALLBACK (menuitem_style_set_cb), adata);
|
||||
g_signal_connect (adata->lock_screen_item, "activate",
|
||||
G_CALLBACK (on_lock_screen_activate), adata);
|
||||
- gtk_widget_show (adata->lock_screen_item);
|
||||
+ if (gconf_client_get_bool (adata->client, LOCKDOWN_LOCK_SCREEN_KEY, NULL)) {
|
||||
+ gtk_widget_hide (adata->lock_screen_item);
|
||||
+ } else {
|
||||
+ gtk_widget_show (adata->lock_screen_item);
|
||||
+ }
|
||||
|
||||
adata->login_screen_item = gtk_image_menu_item_new_with_label (_("Switch User"));
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (adata->login_screen_item),
|
||||
@@ -1174,7 +1180,7 @@ create_sub_menu (GdmAppletData *adata)
|
||||
G_CALLBACK (menuitem_style_set_cb), adata);
|
||||
g_signal_connect (adata->login_screen_item, "activate",
|
||||
G_CALLBACK (on_login_screen_activate), adata);
|
||||
- /* Only show switch user if there are other users */
|
||||
+ update_switch_user (adata);
|
||||
|
||||
adata->quit_session_item = gtk_image_menu_item_new_with_label (_("Quit..."));
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (adata->quit_session_item),
|
||||
@@ -1229,11 +1235,17 @@ client_notify_lockdown_func (GConfClient
|
||||
return;
|
||||
}
|
||||
|
||||
- if (strcmp (key, LOCKDOWN_KEY) == 0) {
|
||||
+ if (strcmp (key, LOCKDOWN_USER_SWITCHING_KEY) == 0) {
|
||||
if (gconf_value_get_bool (value)) {
|
||||
- set_menu_visibility (adata, FALSE);
|
||||
+ gtk_widget_hide (adata->login_screen_item);
|
||||
} else {
|
||||
- set_menu_visibility (adata, TRUE);
|
||||
+ gtk_widget_show (adata->login_screen_item);
|
||||
+ }
|
||||
+ } else if (strcmp (key, LOCKDOWN_LOCK_SCREEN_KEY) == 0) {
|
||||
+ if (gconf_value_get_bool (value)) {
|
||||
+ gtk_widget_hide (adata->lock_screen_item);
|
||||
+ } else {
|
||||
+ gtk_widget_show (adata->lock_screen_item);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1430,7 +1442,7 @@ fill_applet (PanelApplet *applet)
|
||||
|
||||
/* Hide the admin context menu items if locked down or no cmd-line */
|
||||
if (gconf_client_get_bool (adata->client,
|
||||
- "/desktop/gnome/lockdown/inhibit_command_line",
|
||||
+ LOCKDOWN_COMMAND_LINE_KEY,
|
||||
NULL) ||
|
||||
panel_applet_get_locked_down (applet)) {
|
||||
bonobo_ui_component_set_prop (popup_component,
|
||||
@@ -1502,14 +1514,19 @@ fill_applet (PanelApplet *applet)
|
||||
adata->manager = gdm_user_manager_ref_default ();
|
||||
setup_current_user (adata);
|
||||
|
||||
+ gconf_client_add_dir (adata->client,
|
||||
+ LOCKDOWN_DIR,
|
||||
+ GCONF_CLIENT_PRELOAD_ONELEVEL,
|
||||
+ NULL);
|
||||
+
|
||||
adata->client_notify_lockdown_id = gconf_client_notify_add (adata->client,
|
||||
- LOCKDOWN_KEY,
|
||||
+ LOCKDOWN_DIR,
|
||||
(GConfClientNotifyFunc)client_notify_lockdown_func,
|
||||
adata,
|
||||
NULL,
|
||||
NULL);
|
||||
|
||||
- if (gconf_client_get_bool (adata->client, LOCKDOWN_KEY, NULL)) {
|
||||
+ if (gconf_client_get_bool (adata->client, LOCKDOWN_USER_SWITCHING_KEY, NULL)) {
|
||||
set_menu_visibility (adata, FALSE);
|
||||
} else {
|
||||
set_menu_visibility (adata, TRUE);
|
@ -1,35 +0,0 @@
|
||||
From 9fd603874caa65791cd74aa88daf61f9f196d5c3 Mon Sep 17 00:00:00 2001
|
||||
From: Ray Strode <rstrode@redhat.com>
|
||||
Date: Fri, 25 Sep 2009 15:07:54 -0400
|
||||
Subject: [PATCH] Fix gdm_slave_get_timed_login_details
|
||||
|
||||
Before it would fail if a NULL username was passed in,
|
||||
breaking autologin on the multi-stack branch.
|
||||
---
|
||||
daemon/gdm-slave.c | 10 ++++++++++
|
||||
1 files changed, 10 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/daemon/gdm-slave.c b/daemon/gdm-slave.c
|
||||
index 7bc98c5..94a32ee 100644
|
||||
--- a/daemon/gdm-slave.c
|
||||
+++ b/daemon/gdm-slave.c
|
||||
@@ -881,6 +881,16 @@ gdm_slave_get_timed_login_details (GdmSlave *slave,
|
||||
if (usernamep != NULL) {
|
||||
*usernamep = gdm_slave_parse_enriched_login (slave,
|
||||
username, slave->priv->display_name);
|
||||
+ } else {
|
||||
+ g_free (username);
|
||||
+
|
||||
+ if (enabledp != NULL) {
|
||||
+ *enabledp = enabled;
|
||||
+ }
|
||||
+ if (delayp != NULL) {
|
||||
+ *delayp = delay;
|
||||
+ }
|
||||
+ return TRUE;
|
||||
}
|
||||
g_free (username);
|
||||
|
||||
--
|
||||
1.6.4.2
|
||||
|
168
fix-clock.patch
Normal file
168
fix-clock.patch
Normal file
@ -0,0 +1,168 @@
|
||||
From 87248d5c3e0a90c3b0748c7be05a9e6eac231737 Mon Sep 17 00:00:00 2001
|
||||
From: Ray Strode <rstrode@redhat.com>
|
||||
Date: Wed, 21 Oct 2009 10:57:59 -0400
|
||||
Subject: [PATCH] Move date to tooltip in panel clock
|
||||
|
||||
It's a bit long at the moment. Dropping the
|
||||
date makes the screen look a little cleaner, and putting
|
||||
the date in the tooltip makes it still available for those
|
||||
people who want to see it.
|
||||
---
|
||||
gui/simple-greeter/gdm-clock-widget.c | 97 +++++++++++++++++++++++----------
|
||||
1 files changed, 67 insertions(+), 30 deletions(-)
|
||||
|
||||
diff --git a/gui/simple-greeter/gdm-clock-widget.c b/gui/simple-greeter/gdm-clock-widget.c
|
||||
index a3816d2..9008e6d 100644
|
||||
--- a/gui/simple-greeter/gdm-clock-widget.c
|
||||
+++ b/gui/simple-greeter/gdm-clock-widget.c
|
||||
@@ -44,8 +44,10 @@ struct GdmClockWidgetPrivate
|
||||
{
|
||||
GtkWidget *label;
|
||||
char *time_format;
|
||||
+ char *tooltip_format;
|
||||
guint update_clock_id;
|
||||
guint should_show_seconds : 1;
|
||||
+ guint should_show_date : 1;
|
||||
};
|
||||
|
||||
static void gdm_clock_widget_class_init (GdmClockWidgetClass *klass);
|
||||
@@ -55,38 +57,59 @@ static gboolean update_timeout_cb (GdmClockWidget *clock);
|
||||
|
||||
G_DEFINE_TYPE (GdmClockWidget, gdm_clock_widget, GTK_TYPE_ALIGNMENT)
|
||||
|
||||
-static char *
|
||||
-get_time_format (GdmClockWidget *clock)
|
||||
+static void
|
||||
+update_time_format (GdmClockWidget *clock)
|
||||
{
|
||||
- const char *time_format;
|
||||
- const char *date_format;
|
||||
char *clock_format;
|
||||
- char *result;
|
||||
-
|
||||
- time_format = clock->priv->should_show_seconds ? _("%l:%M:%S %p") : _("%l:%M %p");
|
||||
- /* translators: replace %e with %d if, when the day of the
|
||||
- * month as a decimal number is a single digit, it
|
||||
- * should begin with a 0 in your locale (e.g. "May
|
||||
- * 01" instead of "May 1").
|
||||
- */
|
||||
- date_format = _("%a %b %e");
|
||||
- /* translators: reverse the order of these arguments
|
||||
- * if the time should come before the
|
||||
- * date on a clock in your locale.
|
||||
- */
|
||||
- clock_format = g_strdup_printf (_("%1$s, %2$s"),
|
||||
- date_format,
|
||||
- time_format);
|
||||
-
|
||||
- result = g_locale_from_utf8 (clock_format, -1, NULL, NULL, NULL);
|
||||
- g_free (clock_format);
|
||||
-
|
||||
- return result;
|
||||
+ char *tooltip_format;
|
||||
+
|
||||
+ if (clock->priv->should_show_date && clock->priv->should_show_seconds) {
|
||||
+ /* translators: This is the time format to use when both
|
||||
+ * the date and time with seconds are being shown together.
|
||||
+ */
|
||||
+ clock_format = _("%a %b %e, %l:%M:%S %p");
|
||||
+ tooltip_format = NULL;
|
||||
+ } else if (clock->priv->should_show_date && !clock->priv->should_show_seconds) {
|
||||
+ /* translators: This is the time format to use when both
|
||||
+ * the date and time without seconds are being shown together.
|
||||
+ */
|
||||
+ clock_format = _("%a %b %e, %l:%M %p");
|
||||
+
|
||||
+ tooltip_format = NULL;
|
||||
+ } else if (!clock->priv->should_show_date && clock->priv->should_show_seconds) {
|
||||
+ /* translators: This is the time format to use when there is
|
||||
+ * no date, just weekday and time with seconds.
|
||||
+ */
|
||||
+ clock_format = _("%a %l:%M:%S %p");
|
||||
+
|
||||
+ /* translators: This is the time format to use for the date
|
||||
+ */
|
||||
+ tooltip_format = _("%x");
|
||||
+ } else {
|
||||
+ /* translators: This is the time format to use when there is
|
||||
+ * no date, just weekday and time without seconds.
|
||||
+ */
|
||||
+ clock_format = _("%a %l:%M %p");
|
||||
+
|
||||
+ tooltip_format = _("%x");
|
||||
+ }
|
||||
+
|
||||
+ g_free (clock->priv->time_format);
|
||||
+ clock->priv->time_format = g_locale_from_utf8 (clock_format, -1, NULL, NULL, NULL);
|
||||
+
|
||||
+ g_free (clock->priv->tooltip_format);
|
||||
+
|
||||
+ if (tooltip_format != NULL) {
|
||||
+ clock->priv->tooltip_format = g_locale_from_utf8 (tooltip_format, -1, NULL, NULL, NULL);
|
||||
+ } else {
|
||||
+ clock->priv->tooltip_format = NULL;
|
||||
+ }
|
||||
}
|
||||
|
||||
static void
|
||||
update_clock (GtkLabel *label,
|
||||
- const char *format)
|
||||
+ const char *clock_format,
|
||||
+ const char *tooltip_format)
|
||||
{
|
||||
time_t t;
|
||||
struct tm *tm;
|
||||
@@ -99,13 +122,25 @@ update_clock (GtkLabel *label,
|
||||
g_warning ("Unable to get broken down local time");
|
||||
return;
|
||||
}
|
||||
- if (strftime (buf, sizeof (buf), format, tm) == 0) {
|
||||
- g_warning ("Couldn't format time: %s", format);
|
||||
+ if (strftime (buf, sizeof (buf), clock_format, tm) == 0) {
|
||||
+ g_warning ("Couldn't format time: %s", clock_format);
|
||||
strcpy (buf, "???");
|
||||
}
|
||||
utf8 = g_locale_to_utf8 (buf, -1, NULL, NULL, NULL);
|
||||
gtk_label_set_text (label, utf8);
|
||||
g_free (utf8);
|
||||
+
|
||||
+ if (tooltip_format != NULL) {
|
||||
+ if (strftime (buf, sizeof (buf), tooltip_format, tm) == 0) {
|
||||
+ g_warning ("Couldn't format tooltip date: %s", tooltip_format);
|
||||
+ strcpy (buf, "???");
|
||||
+ }
|
||||
+ utf8 = g_locale_to_utf8 (buf, -1, NULL, NULL, NULL);
|
||||
+ gtk_widget_set_tooltip_text (GTK_WIDGET (label), utf8);
|
||||
+ g_free (utf8);
|
||||
+ } else {
|
||||
+ gtk_widget_set_has_tooltip (GTK_WIDGET (label), FALSE);
|
||||
+ }
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -142,7 +177,8 @@ update_timeout_cb (GdmClockWidget *clock)
|
||||
|
||||
if (clock->priv->label != NULL) {
|
||||
update_clock (GTK_LABEL (clock->priv->label),
|
||||
- clock->priv->time_format);
|
||||
+ clock->priv->time_format,
|
||||
+ clock->priv->tooltip_format);
|
||||
}
|
||||
|
||||
set_clock_timeout (clock, new_time);
|
||||
@@ -214,10 +250,11 @@ gdm_clock_widget_init (GdmClockWidget *widget)
|
||||
gtk_container_add (GTK_CONTAINER (widget), box);
|
||||
|
||||
widget->priv->label = gtk_label_new ("");
|
||||
+
|
||||
gtk_widget_show (widget->priv->label);
|
||||
gtk_box_pack_start (GTK_BOX (box), widget->priv->label, FALSE, FALSE, 0);
|
||||
|
||||
- widget->priv->time_format = get_time_format (widget);
|
||||
+ update_time_format (widget);
|
||||
update_timeout_cb (widget);
|
||||
}
|
||||
|
||||
--
|
||||
1.6.5.rc2
|
||||
|
104
fix-computer-info.patch
Normal file
104
fix-computer-info.patch
Normal file
@ -0,0 +1,104 @@
|
||||
From 18bf08d14ed77db00a17e74c5ce04c812ef251af Mon Sep 17 00:00:00 2001
|
||||
From: Ray Strode <rstrode@redhat.com>
|
||||
Date: Mon, 26 Oct 2009 10:45:49 -0400
|
||||
Subject: [PATCH 1/2] Use gethostname instead of g_get_host_name in greeter
|
||||
|
||||
The latter is unreliable when the hostname changes at runtime.
|
||||
---
|
||||
gui/simple-greeter/gdm-greeter-login-window.c | 6 +++++-
|
||||
1 files changed, 5 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/gui/simple-greeter/gdm-greeter-login-window.c b/gui/simple-greeter/gdm-greeter-login-window.c
|
||||
index 9a29a2e..9d75b8c 100644
|
||||
--- a/gui/simple-greeter/gdm-greeter-login-window.c
|
||||
+++ b/gui/simple-greeter/gdm-greeter-login-window.c
|
||||
@@ -996,7 +996,11 @@ create_computer_info (GdmGreeterLoginWindow *login_window)
|
||||
|
||||
label = glade_xml_get_widget (login_window->priv->xml, "computer-info-name-label");
|
||||
if (label != NULL) {
|
||||
- gtk_label_set_text (GTK_LABEL (label), g_get_host_name ());
|
||||
+ char localhost[HOST_NAME_MAX + 1] = "";•
|
||||
+
|
||||
+ if (gethostname (localhost, HOST_NAME_MAX) == 0) {•
|
||||
+ gtk_label_set_text (GTK_LABEL (label), localhost);
|
||||
+ }
|
||||
}
|
||||
|
||||
label = glade_xml_get_widget (login_window->priv->xml, "computer-info-version-label");
|
||||
--
|
||||
1.6.5.1
|
||||
|
||||
|
||||
From 03e01936f5c11580a1485c492355eb0a468ea0f6 Mon Sep 17 00:00:00 2001
|
||||
From: Ray Strode <rstrode@redhat.com>
|
||||
Date: Mon, 26 Oct 2009 10:53:25 -0400
|
||||
Subject: [PATCH 2/2] Don't bother showing hostname if it's not unique
|
||||
|
||||
The advantage of showing hostname by default is it is a
|
||||
unique identifier for people who have multiple machines.
|
||||
|
||||
If it only says "localhost" or "localhost.localdomain"
|
||||
that advantage is mitigated, and it's probably better to
|
||||
show OS release.
|
||||
---
|
||||
gui/simple-greeter/gdm-greeter-login-window.c | 27 +++++++++++++++++++-----
|
||||
1 files changed, 21 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/gui/simple-greeter/gdm-greeter-login-window.c b/gui/simple-greeter/gdm-greeter-login-window.c
|
||||
index 9d75b8c..8de74df 100644
|
||||
--- a/gui/simple-greeter/gdm-greeter-login-window.c
|
||||
+++ b/gui/simple-greeter/gdm-greeter-login-window.c
|
||||
@@ -887,10 +887,8 @@ on_user_unchosen (GdmUserChooserWidget *user_chooser,
|
||||
do_cancel (login_window);
|
||||
}
|
||||
|
||||
-static gboolean
|
||||
-on_computer_info_label_button_press (GtkWidget *widget,
|
||||
- GdkEventButton *event,
|
||||
- GdmGreeterLoginWindow *login_window)
|
||||
+static void
|
||||
+rotate_computer_info (GdmGreeterLoginWindow *login_window)
|
||||
{
|
||||
GtkWidget *notebook;
|
||||
int current_page;
|
||||
@@ -907,6 +905,14 @@ on_computer_info_label_button_press (GtkWidget *widget,
|
||||
gtk_notebook_set_current_page (GTK_NOTEBOOK (notebook), 0);
|
||||
}
|
||||
|
||||
+}
|
||||
+
|
||||
+static gboolean
|
||||
+on_computer_info_label_button_press (GtkWidget *widget,
|
||||
+ GdkEventButton *event,
|
||||
+ GdmGreeterLoginWindow *login_window)
|
||||
+{
|
||||
+ rotate_computer_info (login_window);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -996,11 +1002,20 @@ create_computer_info (GdmGreeterLoginWindow *login_window)
|
||||
|
||||
label = glade_xml_get_widget (login_window->priv->xml, "computer-info-name-label");
|
||||
if (label != NULL) {
|
||||
- char localhost[HOST_NAME_MAX + 1] = "";•
|
||||
+ char localhost[HOST_NAME_MAX + 1] = "";
|
||||
|
||||
- if (gethostname (localhost, HOST_NAME_MAX) == 0) {•
|
||||
+ if (gethostname (localhost, HOST_NAME_MAX) == 0) {
|
||||
gtk_label_set_text (GTK_LABEL (label), localhost);
|
||||
}
|
||||
+
|
||||
+ /* If this isn't actually unique identifier for the computer, then
|
||||
+ * don't bother showing it by default.
|
||||
+ */
|
||||
+ if (strcmp (localhost, "localhost") == 0 ||
|
||||
+ strcmp (localhost, "localhost.localdomain") == 0) {
|
||||
+
|
||||
+ rotate_computer_info (login_window);
|
||||
+ }
|
||||
}
|
||||
|
||||
label = glade_xml_get_widget (login_window->priv->xml, "computer-info-version-label");
|
||||
--
|
||||
1.6.5.1
|
||||
|
1586
fix-na-tray.patch
Normal file
1586
fix-na-tray.patch
Normal file
File diff suppressed because it is too large
Load Diff
370
fix-run-dir-permissions.patch
Normal file
370
fix-run-dir-permissions.patch
Normal file
@ -0,0 +1,370 @@
|
||||
From 5475c0a823cf94f817821105b40760d902d9ace5 Mon Sep 17 00:00:00 2001
|
||||
From: Ray Strode <rstrode@redhat.com>
|
||||
Date: Tue, 27 Oct 2009 10:40:55 -0400
|
||||
Subject: [PATCH 1/4] Make screenshot dir a configure argument
|
||||
|
||||
This provides a little more flexibility to distributors,
|
||||
but more importantly makes it less hard coded in gdm-screenshot.c
|
||||
---
|
||||
configure.ac | 17 +++++++++++++++++
|
||||
data/Makefile.am | 8 ++++++++
|
||||
utils/Makefile.am | 1 +
|
||||
utils/gdm-screenshot.c | 5 +----
|
||||
4 files changed, 27 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 4fe4430..0dd2658 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -1237,6 +1237,23 @@ fi
|
||||
AC_SUBST(GDM_XAUTH_DIR)
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
+dnl - Directory for greeter screenshot
|
||||
+dnl ---------------------------------------------------------------------------
|
||||
+
|
||||
+AC_ARG_WITH(screenshot-dir,
|
||||
+ AS_HELP_STRING([--with-screenshot-dir=<dir>],
|
||||
+ [directory to store greeter screenshot]))
|
||||
+
|
||||
+if ! test -z "$with_screenshot_dir"; then
|
||||
+ GDM_SCREENSHOT_DIR=$with_screenshot_dir
|
||||
+else
|
||||
+ GDM_SCREENSHOT_DIR=${localstatedir}/run/gdm
|
||||
+fi
|
||||
+
|
||||
+AC_SUBST(GDM_SCREENSHOT_DIR)
|
||||
+
|
||||
+
|
||||
+dnl ---------------------------------------------------------------------------
|
||||
dnl - Finish
|
||||
dnl ---------------------------------------------------------------------------
|
||||
|
||||
diff --git a/data/Makefile.am b/data/Makefile.am
|
||||
index 73fa106..608194d 100644
|
||||
--- a/data/Makefile.am
|
||||
+++ b/data/Makefile.am
|
||||
@@ -13,6 +13,7 @@ predir = $(gdmconfdir)/PreSession
|
||||
postlogindir = $(gdmconfdir)/PostLogin
|
||||
workingdir = $(GDM_WORKING_DIR)
|
||||
xauthdir = $(GDM_XAUTH_DIR)
|
||||
+screenshotdir = $(GDM_SCREENSHOT_DIR)
|
||||
cachedir = $(localstatedir)/cache/gdm
|
||||
|
||||
Xsession: $(srcdir)/Xsession.in
|
||||
@@ -123,6 +124,7 @@ uninstall-hook:
|
||||
-rf \
|
||||
$(DESTDIR)$(workingdir)/.gconf.mandatory \
|
||||
$(DESTDIR)$(xauthdir)
|
||||
+ $(DESTDIR)$(screenshotdir)
|
||||
|
||||
install-data-hook: gdm.conf-custom Xsession Init PostSession PreSession gconf.path
|
||||
if test '!' -d $(DESTDIR)$(gdmconfdir); then \
|
||||
@@ -204,6 +206,12 @@ install-data-hook: gdm.conf-custom Xsession Init PostSession PreSession gconf.pa
|
||||
chown root:gdm $(DESTDIR)$(xauthdir) || : ; \
|
||||
fi
|
||||
|
||||
+ if test '!' -d $(DESTDIR)$(screenshotdir); then \
|
||||
+ $(mkinstalldirs) $(DESTDIR)$(screenshotdir); \
|
||||
+ chmod 0755 $(DESTDIR)$(screenshotdir); \
|
||||
+ chown gdm:gdm $(DESTDIR)$(screenshotdir) || : ; \
|
||||
+ fi
|
||||
+
|
||||
if test '!' -d $(DESTDIR)$(workingdir); then \
|
||||
$(mkinstalldirs) $(DESTDIR)$(workingdir); \
|
||||
chmod 1770 $(DESTDIR)$(workingdir); \
|
||||
diff --git a/utils/Makefile.am b/utils/Makefile.am
|
||||
index 0b6ea04..f1ff331 100644
|
||||
--- a/utils/Makefile.am
|
||||
+++ b/utils/Makefile.am
|
||||
@@ -4,6 +4,7 @@ AM_CPPFLAGS = \
|
||||
-I. \
|
||||
-I.. \
|
||||
-DLOCALSTATEDIR=\""$(localstatedir)"\" \
|
||||
+ -DGDM_SCREENSHOT_DIR=\""$(GDM_SCREENSHOT_DIR)"\"\
|
||||
-DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
|
||||
$(UTILS_CFLAGS) \
|
||||
$(CANBERRA_GTK_CFLAGS) \
|
||||
diff --git a/utils/gdm-screenshot.c b/utils/gdm-screenshot.c
|
||||
index f66de46..12102f2 100644
|
||||
--- a/utils/gdm-screenshot.c
|
||||
+++ b/utils/gdm-screenshot.c
|
||||
@@ -163,11 +163,8 @@ screenshot_save (GdkPixbuf *pixbuf)
|
||||
char *filename;
|
||||
gboolean res;
|
||||
GError *error;
|
||||
- const char *save_dir;
|
||||
|
||||
- save_dir = LOCALSTATEDIR "/run/gdm";
|
||||
-
|
||||
- filename = g_build_filename (save_dir,
|
||||
+ filename = g_build_filename (GDM_SCREENSHOT_DIR,
|
||||
"GDM-Screenshot.png",
|
||||
NULL);
|
||||
|
||||
--
|
||||
1.6.5.1
|
||||
|
||||
|
||||
From 1fe51c8f69dc93033d2035c27389377090f21b78 Mon Sep 17 00:00:00 2001
|
||||
From: Ray Strode <rstrode@redhat.com>
|
||||
Date: Tue, 27 Oct 2009 11:25:19 -0400
|
||||
Subject: [PATCH 2/4] Create screenshot dir at runtime if not available
|
||||
|
||||
We want the screenshot dir to be owned by the GDM user,
|
||||
so the greeter can write screenshots to it.
|
||||
---
|
||||
daemon/Makefile.am | 1 +
|
||||
daemon/gdm-greeter-session.c | 1 +
|
||||
daemon/gdm-welcome-session.c | 32 ++++++++++++++++++++++++++++++++
|
||||
3 files changed, 34 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/daemon/Makefile.am b/daemon/Makefile.am
|
||||
index a122a15..ab10dc5 100644
|
||||
--- a/daemon/Makefile.am
|
||||
+++ b/daemon/Makefile.am
|
||||
@@ -15,6 +15,7 @@ AM_CPPFLAGS = \
|
||||
-DSBINDIR=\"$(sbindir)\" \
|
||||
-DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
|
||||
-DGDM_XAUTH_DIR=\"$(GDM_XAUTH_DIR)\" \
|
||||
+ -DGDM_SCREENSHOT_DIR=\"$(GDM_SCREENSHOT_DIR)\" \
|
||||
-DGDM_CACHE_DIR=\""$(localstatedir)/cache/gdm"\" \
|
||||
-DGDM_SESSION_DEFAULT_PATH=\"$(GDM_SESSION_DEFAULT_PATH)\" \
|
||||
$(DISABLE_DEPRECATED_CFLAGS) \
|
||||
diff --git a/daemon/gdm-greeter-session.c b/daemon/gdm-greeter-session.c
|
||||
index aae1928..994acbc 100644
|
||||
--- a/daemon/gdm-greeter-session.c
|
||||
+++ b/daemon/gdm-greeter-session.c
|
||||
@@ -156,6 +156,7 @@ gdm_greeter_session_new (const char *display_name,
|
||||
"x11-display-device", display_device,
|
||||
"x11-display-hostname", display_hostname,
|
||||
"x11-display-is-local", display_is_local,
|
||||
+ "runtime-dir", GDM_SCREENSHOT_DIR,
|
||||
NULL);
|
||||
|
||||
return GDM_GREETER_SESSION (object);
|
||||
diff --git a/daemon/gdm-welcome-session.c b/daemon/gdm-welcome-session.c
|
||||
index b58e855..f340660 100644
|
||||
--- a/daemon/gdm-welcome-session.c
|
||||
+++ b/daemon/gdm-welcome-session.c
|
||||
@@ -63,6 +63,7 @@ struct GdmWelcomeSessionPrivate
|
||||
|
||||
char *user_name;
|
||||
char *group_name;
|
||||
+ char *runtime_dir;
|
||||
|
||||
char *x11_display_name;
|
||||
char *x11_display_device;
|
||||
@@ -91,6 +92,7 @@ enum {
|
||||
PROP_X11_DISPLAY_IS_LOCAL,
|
||||
PROP_USER_NAME,
|
||||
PROP_GROUP_NAME,
|
||||
+ PROP_RUNTIME_DIR,
|
||||
PROP_SERVER_ADDRESS,
|
||||
PROP_COMMAND,
|
||||
PROP_SERVER_DBUS_PATH,
|
||||
@@ -408,6 +410,7 @@ rotate_logs (const char *path,
|
||||
typedef struct {
|
||||
const char *user_name;
|
||||
const char *group_name;
|
||||
+ const char *runtime_dir;
|
||||
const char *log_file;
|
||||
} SpawnChildData;
|
||||
|
||||
@@ -435,6 +438,10 @@ spawn_child_setup (SpawnChildData *data)
|
||||
_exit (1);
|
||||
}
|
||||
|
||||
+ g_debug ("GdmWelcomeSession: Setting up run time dir %s", data->runtime_dir);
|
||||
+ g_mkdir (data->runtime_dir, 0755);
|
||||
+ chown (data->runtime_dir, pwent->pw_uid, pwent->pw_gid);
|
||||
+
|
||||
g_debug ("GdmWelcomeSession: Changing (uid:gid) for child process to (%d:%d)",
|
||||
pwent->pw_uid,
|
||||
grent->gr_gid);
|
||||
@@ -552,6 +559,7 @@ static gboolean
|
||||
spawn_command_line_async_as_user (const char *command_line,
|
||||
const char *user_name,
|
||||
const char *group_name,
|
||||
+ const char *runtime_dir,
|
||||
const char *log_file,
|
||||
char **env,
|
||||
GPid *child_pid,
|
||||
@@ -575,6 +583,7 @@ spawn_command_line_async_as_user (const char *command_line,
|
||||
|
||||
data.user_name = user_name;
|
||||
data.group_name = group_name;
|
||||
+ data.runtime_dir = runtime_dir;
|
||||
data.log_file = log_file;
|
||||
|
||||
local_error = NULL;
|
||||
@@ -756,6 +765,7 @@ gdm_welcome_session_spawn (GdmWelcomeSession *welcome_session)
|
||||
ret = spawn_command_line_async_as_user (welcome_session->priv->command,
|
||||
welcome_session->priv->user_name,
|
||||
welcome_session->priv->group_name,
|
||||
+ welcome_session->priv->runtime_dir,
|
||||
log_path,
|
||||
(char **)env->pdata,
|
||||
&welcome_session->priv->pid,
|
||||
@@ -928,6 +938,14 @@ _gdm_welcome_session_set_group_name (GdmWelcomeSession *welcome_session,
|
||||
}
|
||||
|
||||
static void
|
||||
+_gdm_welcome_session_set_runtime_dir (GdmWelcomeSession *welcome_session,
|
||||
+ const char *dir)
|
||||
+{
|
||||
+ g_free (welcome_session->priv->runtime_dir);
|
||||
+ welcome_session->priv->runtime_dir = g_strdup (dir);
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
_gdm_welcome_session_set_server_dbus_path (GdmWelcomeSession *welcome_session,
|
||||
const char *name)
|
||||
{
|
||||
@@ -998,6 +1016,9 @@ gdm_welcome_session_set_property (GObject *object,
|
||||
case PROP_GROUP_NAME:
|
||||
_gdm_welcome_session_set_group_name (self, g_value_get_string (value));
|
||||
break;
|
||||
+ case PROP_RUNTIME_DIR:
|
||||
+ _gdm_welcome_session_set_runtime_dir (self, g_value_get_string (value));
|
||||
+ break;
|
||||
case PROP_SERVER_ADDRESS:
|
||||
gdm_welcome_session_set_server_address (self, g_value_get_string (value));
|
||||
break;
|
||||
@@ -1054,6 +1075,9 @@ gdm_welcome_session_get_property (GObject *object,
|
||||
case PROP_GROUP_NAME:
|
||||
g_value_set_string (value, self->priv->group_name);
|
||||
break;
|
||||
+ case PROP_RUNTIME_DIR:
|
||||
+ g_value_set_string (value, self->priv->runtime_dir);
|
||||
+ break;
|
||||
case PROP_SERVER_ADDRESS:
|
||||
g_value_set_string (value, self->priv->server_address);
|
||||
break;
|
||||
@@ -1154,6 +1178,13 @@ gdm_welcome_session_class_init (GdmWelcomeSessionClass *klass)
|
||||
GDM_GROUPNAME,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
|
||||
g_object_class_install_property (object_class,
|
||||
+ PROP_RUNTIME_DIR,
|
||||
+ g_param_spec_string ("runtime-dir",
|
||||
+ "runtime dir",
|
||||
+ "runtime dir",
|
||||
+ NULL,
|
||||
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
|
||||
+ g_object_class_install_property (object_class,
|
||||
PROP_SERVER_ADDRESS,
|
||||
g_param_spec_string ("server-address",
|
||||
"server address",
|
||||
@@ -1267,6 +1298,7 @@ gdm_welcome_session_finalize (GObject *object)
|
||||
g_free (welcome_session->priv->command);
|
||||
g_free (welcome_session->priv->user_name);
|
||||
g_free (welcome_session->priv->group_name);
|
||||
+ g_free (welcome_session->priv->runtime_dir);
|
||||
g_free (welcome_session->priv->x11_display_name);
|
||||
g_free (welcome_session->priv->x11_display_device);
|
||||
g_free (welcome_session->priv->x11_display_hostname);
|
||||
--
|
||||
1.6.5.1
|
||||
|
||||
|
||||
From 81870b019c929694ea392359b0a66b0a500c7d5c Mon Sep 17 00:00:00 2001
|
||||
From: Ray Strode <rstrode@redhat.com>
|
||||
Date: Tue, 27 Oct 2009 11:43:15 -0400
|
||||
Subject: [PATCH 3/4] Move default screenshot dir to it's own subdirectory
|
||||
|
||||
---
|
||||
configure.ac | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 0dd2658..93917e2 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -1247,7 +1247,7 @@ AC_ARG_WITH(screenshot-dir,
|
||||
if ! test -z "$with_screenshot_dir"; then
|
||||
GDM_SCREENSHOT_DIR=$with_screenshot_dir
|
||||
else
|
||||
- GDM_SCREENSHOT_DIR=${localstatedir}/run/gdm
|
||||
+ GDM_SCREENSHOT_DIR=${localstatedir}/run/gdm/greeter
|
||||
fi
|
||||
|
||||
AC_SUBST(GDM_SCREENSHOT_DIR)
|
||||
--
|
||||
1.6.5.1
|
||||
|
||||
|
||||
From c96697431529ed87dbdbb987ed92ac2286b247b7 Mon Sep 17 00:00:00 2001
|
||||
From: Ray Strode <rstrode@redhat.com>
|
||||
Date: Tue, 27 Oct 2009 10:35:37 -0400
|
||||
Subject: [PATCH 4/4] Lock down /var/run/gdm
|
||||
|
||||
We don't need it so open now that screenshots are written to their
|
||||
own directory, and having it open has implications for quota abuse.
|
||||
---
|
||||
daemon/gdm-display-access-file.c | 14 +++++++-------
|
||||
data/Makefile.am | 2 +-
|
||||
2 files changed, 8 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/daemon/gdm-display-access-file.c b/daemon/gdm-display-access-file.c
|
||||
index a3d3e2f..1b52f15 100644
|
||||
--- a/daemon/gdm-display-access-file.c
|
||||
+++ b/daemon/gdm-display-access-file.c
|
||||
@@ -268,10 +268,10 @@ _create_xauth_file_for_user (const char *username,
|
||||
fp = NULL;
|
||||
fd = -1;
|
||||
|
||||
- /* Create directory if not exist, then set permission 01775 and ownership root:gdm */
|
||||
+ /* Create directory if not exist, then set permission 0711 and ownership root:gdm */
|
||||
if (g_file_test (GDM_XAUTH_DIR, G_FILE_TEST_IS_DIR) == FALSE) {
|
||||
g_unlink (GDM_XAUTH_DIR);
|
||||
- if (g_mkdir (GDM_XAUTH_DIR, S_ISVTX | S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH) != 0) {
|
||||
+ if (g_mkdir (GDM_XAUTH_DIR, 0711) != 0) {
|
||||
g_set_error (error,
|
||||
G_FILE_ERROR,
|
||||
g_file_error_from_errno (errno),
|
||||
@@ -279,15 +279,15 @@ _create_xauth_file_for_user (const char *username,
|
||||
goto out;
|
||||
}
|
||||
|
||||
- g_chmod (GDM_XAUTH_DIR, S_ISVTX | S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
|
||||
+ g_chmod (GDM_XAUTH_DIR, 0711);
|
||||
_get_uid_and_gid_for_user (GDM_USERNAME, &uid, &gid);
|
||||
if (chown (GDM_XAUTH_DIR, 0, gid) != 0) {
|
||||
g_warning ("Unable to change owner of '%s'",
|
||||
GDM_XAUTH_DIR);
|
||||
}
|
||||
} else {
|
||||
- /* if it does exist make sure it has correct mode 01775 */
|
||||
- g_chmod (GDM_XAUTH_DIR, S_ISVTX | S_IRWXU |S_IRWXG | S_IROTH | S_IXOTH);
|
||||
+ /* if it does exist make sure it has correct mode 0711 */
|
||||
+ g_chmod (GDM_XAUTH_DIR, 0711);
|
||||
|
||||
/* and clean up any stale auth subdirs */
|
||||
clean_up_stale_auth_subdirs ();
|
||||
@@ -368,8 +368,8 @@ _create_xauth_file_for_user (const char *username,
|
||||
}
|
||||
|
||||
/* now open up permissions on per-session directory */
|
||||
- g_debug ("GdmDisplayAccessFile: chmoding %s to 1777", dir_name);
|
||||
- g_chmod (dir_name, S_ISVTX | S_IRWXU | S_IRWXG | S_IRWXO);
|
||||
+ g_debug ("GdmDisplayAccessFile: chmoding %s to 0711", dir_name);
|
||||
+ g_chmod (dir_name, 0711);
|
||||
|
||||
errno = 0;
|
||||
fp = fdopen (fd, "w");
|
||||
diff --git a/data/Makefile.am b/data/Makefile.am
|
||||
index 608194d..dfbd096 100644
|
||||
--- a/data/Makefile.am
|
||||
+++ b/data/Makefile.am
|
||||
@@ -202,7 +202,7 @@ install-data-hook: gdm.conf-custom Xsession Init PostSession PreSession gconf.pa
|
||||
|
||||
if test '!' -d $(DESTDIR)$(xauthdir); then \
|
||||
$(mkinstalldirs) $(DESTDIR)$(xauthdir); \
|
||||
- chmod 1777 $(DESTDIR)$(xauthdir); \
|
||||
+ chmod 0711 $(DESTDIR)$(xauthdir); \
|
||||
chown root:gdm $(DESTDIR)$(xauthdir) || : ; \
|
||||
fi
|
||||
|
||||
--
|
||||
1.6.5.1
|
||||
|
66
fix-timer.patch
Normal file
66
fix-timer.patch
Normal file
@ -0,0 +1,66 @@
|
||||
From 88d4e5d79ca5ded0f9e88af67044d53342ff0897 Mon Sep 17 00:00:00 2001
|
||||
From: Ray Strode <rstrode@redhat.com>
|
||||
Date: Thu, 22 Oct 2009 17:39:27 -0400
|
||||
Subject: [PATCH 1/2] Force cell renderer to be a specific height
|
||||
|
||||
Before it was growing and shrinking all the time causing,
|
||||
flicker.
|
||||
---
|
||||
gui/simple-greeter/gdm-cell-renderer-timer.c | 12 ++----------
|
||||
1 files changed, 2 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/gui/simple-greeter/gdm-cell-renderer-timer.c b/gui/simple-greeter/gdm-cell-renderer-timer.c
|
||||
index 7918b48..9453d7e 100644
|
||||
--- a/gui/simple-greeter/gdm-cell-renderer-timer.c
|
||||
+++ b/gui/simple-greeter/gdm-cell-renderer-timer.c
|
||||
@@ -108,19 +108,11 @@ gdm_cell_renderer_timer_get_size (GtkCellRenderer *cell,
|
||||
}
|
||||
|
||||
if (width != NULL) {
|
||||
- if (cell->width >= 0) {
|
||||
- *width = cell->width;
|
||||
- } else {
|
||||
- *width = renderer->priv->value <= G_MINDOUBLE? 0 : 64;
|
||||
- }
|
||||
+ *width = cell->xpad * 2 + 24;
|
||||
}
|
||||
|
||||
if (height != NULL) {
|
||||
- if (cell->height >= 0) {
|
||||
- *height = cell->height;
|
||||
- } else {
|
||||
- *height = renderer->priv->value <= G_MINDOUBLE? 0 : 64;
|
||||
- }
|
||||
+ *height = cell->ypad * 2 + 24;
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
1.6.5.rc2
|
||||
|
||||
|
||||
From a87b05fac2c2de7cff80a183e397f33416bfc893 Mon Sep 17 00:00:00 2001
|
||||
From: Ray Strode <rstrode@redhat.com>
|
||||
Date: Thu, 22 Oct 2009 17:45:13 -0400
|
||||
Subject: [PATCH 2/2] Drop set_operator (SOURCE) in cell renderer
|
||||
|
||||
I'm not sure why I was doing it, when it looks
|
||||
find using OVER, so I'm going to take it out.
|
||||
---
|
||||
gui/simple-greeter/gdm-cell-renderer-timer.c | 1 -
|
||||
1 files changed, 0 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/gui/simple-greeter/gdm-cell-renderer-timer.c b/gui/simple-greeter/gdm-cell-renderer-timer.c
|
||||
index 9453d7e..0fb404c 100644
|
||||
--- a/gui/simple-greeter/gdm-cell-renderer-timer.c
|
||||
+++ b/gui/simple-greeter/gdm-cell-renderer-timer.c
|
||||
@@ -164,7 +164,6 @@ draw_timer (GdmCellRendererTimer *renderer,
|
||||
cairo_arc (context, 0, 0, radius + 1, 0, 2 * G_PI);
|
||||
cairo_fill (context);
|
||||
|
||||
- cairo_set_operator (context, CAIRO_OPERATOR_SOURCE);
|
||||
cairo_set_source_rgb (context,
|
||||
bg->red / 65535.0,
|
||||
bg->green / 65535.0,
|
||||
--
|
||||
1.6.5.rc2
|
File diff suppressed because it is too large
Load Diff
@ -1,186 +0,0 @@
|
||||
From aa132a553b871a19a8d23fe8e9d93f736f2a4faf Mon Sep 17 00:00:00 2001
|
||||
From: Richard Hughes <richard@hughsie.com>
|
||||
Date: Mon, 28 Sep 2009 09:14:33 +0100
|
||||
Subject: [PATCH] Convert gdm from using gnome-power-manager to DeviceKit-power
|
||||
|
||||
---
|
||||
configure.ac | 7 ++
|
||||
gui/simple-greeter/Makefile.am | 4 +
|
||||
gui/simple-greeter/gdm-greeter-login-window.c | 84 ++++++-------------------
|
||||
3 files changed, 31 insertions(+), 64 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 756890a..2cae1cf 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -51,6 +51,7 @@ LIBXKLAVIER_REQUIRED_VERSION=4.0
|
||||
LIBCANBERRA_GTK_REQUIRED_VERSION=0.4
|
||||
#FONTCONFIG_REQUIRED_VERSION=2.6.0
|
||||
FONTCONFIG_REQUIRED_VERSION=2.5.0
|
||||
+DEVKIT_POWER_REQUIRED_VERSION=008
|
||||
|
||||
EXTRA_COMPILE_WARNINGS(yes)
|
||||
|
||||
@@ -103,6 +104,12 @@ PKG_CHECK_MODULES(GCONF,
|
||||
AC_SUBST(GCONF_CFLAGS)
|
||||
AC_SUBST(GCONF_LIBS)
|
||||
|
||||
+PKG_CHECK_MODULES(DEVKIT_POWER,
|
||||
+ devkit-power-gobject >= $DEVKIT_POWER_REQUIRED_VERSION
|
||||
+)
|
||||
+AC_SUBST(DEVKIT_POWER_CFLAGS)
|
||||
+AC_SUBST(DEVKIT_POWER_LIBS)
|
||||
+
|
||||
PKG_CHECK_MODULES(SIMPLE_GREETER,
|
||||
dbus-glib-1 >= $DBUS_GLIB_REQUIRED_VERSION
|
||||
gtk+-2.0 >= $GTK_REQUIRED_VERSION
|
||||
diff --git a/gui/simple-greeter/Makefile.am b/gui/simple-greeter/Makefile.am
|
||||
index 8c9ae46..4c06bc3 100644
|
||||
--- a/gui/simple-greeter/Makefile.am
|
||||
+++ b/gui/simple-greeter/Makefile.am
|
||||
@@ -18,6 +18,8 @@ AM_CPPFLAGS = \
|
||||
-DSBINDIR=\""$(sbindir)"\" \
|
||||
-DGDM_CACHE_DIR=\""$(localstatedir)/cache/gdm"\" \
|
||||
-DAT_SPI_REGISTRYD_DIR="\"$(AT_SPI_REGISTRYD_DIR)\"" \
|
||||
+ $(DEVKIT_POWER_CFLAGS) \
|
||||
+ -DI_KNOW_THE_DEVICEKIT_POWER_API_IS_SUBJECT_TO_CHANGE \
|
||||
$(DISABLE_DEPRECATED_CFLAGS) \
|
||||
$(GTK_CFLAGS) \
|
||||
$(SIMPLE_GREETER_CFLAGS) \
|
||||
@@ -90,6 +92,7 @@ test_greeter_login_window_LDADD = \
|
||||
libgdmuser.la \
|
||||
$(COMMON_LIBS) \
|
||||
$(SIMPLE_GREETER_LIBS) \
|
||||
+ $(DEVKIT_POWER_LIBS) \
|
||||
$(RBAC_LIBS) \
|
||||
$(NULL)
|
||||
|
||||
@@ -324,6 +327,7 @@ gdm_simple_greeter_LDADD = \
|
||||
$(SIMPLE_GREETER_LIBS) \
|
||||
$(RBAC_LIBS) \
|
||||
$(LIBXKLAVIER_LIBS) \
|
||||
+ $(DEVKIT_POWER_LIBS) \
|
||||
$(NULL)
|
||||
|
||||
gladedir = $(pkgdatadir)
|
||||
diff --git a/gui/simple-greeter/gdm-greeter-login-window.c b/gui/simple-greeter/gdm-greeter-login-window.c
|
||||
index c7ea5d6..7d4ef83 100644
|
||||
--- a/gui/simple-greeter/gdm-greeter-login-window.c
|
||||
+++ b/gui/simple-greeter/gdm-greeter-login-window.c
|
||||
@@ -56,6 +56,8 @@
|
||||
#include <dbus/dbus-glib.h>
|
||||
#include <dbus/dbus-glib-lowlevel.h>
|
||||
|
||||
+#include <devkit-power-gobject/devicekit-power.h>
|
||||
+
|
||||
#include "gdm-settings-client.h"
|
||||
#include "gdm-settings-keys.h"
|
||||
#include "gdm-profile.h"
|
||||
@@ -79,10 +81,6 @@
|
||||
#define CK_SEAT_INTERFACE "org.freedesktop.ConsoleKit.Seat"
|
||||
#define CK_SESSION_INTERFACE "org.freedesktop.ConsoleKit.Session"
|
||||
|
||||
-#define GPM_DBUS_NAME "org.freedesktop.PowerManagement"
|
||||
-#define GPM_DBUS_PATH "/org/freedesktop/PowerManagement"
|
||||
-#define GPM_DBUS_INTERFACE "org.freedesktop.PowerManagement"
|
||||
-
|
||||
#define GLADE_XML_FILE "gdm-greeter-login-window.glade"
|
||||
|
||||
#define KEY_GREETER_DIR "/apps/gdm/simple-greeter"
|
||||
@@ -480,40 +478,15 @@ adjust_other_login_visibility(GdmGreeterLoginWindow *login_window)
|
||||
static gboolean
|
||||
can_suspend (GdmGreeterLoginWindow *login_window)
|
||||
{
|
||||
- DBusGConnection *connection;
|
||||
- DBusGProxy *proxy;
|
||||
- GError *error;
|
||||
- gboolean ret;
|
||||
- gboolean res;
|
||||
-
|
||||
- error = NULL;
|
||||
- connection = dbus_g_bus_get (DBUS_BUS_SESSION, &error);
|
||||
- if (error != NULL) {
|
||||
- g_warning ("Couldn't connect to power manager: %s", error->message);
|
||||
- g_error_free (error);
|
||||
- return FALSE;
|
||||
- }
|
||||
- proxy = dbus_g_proxy_new_for_name (connection,
|
||||
- GPM_DBUS_NAME,
|
||||
- GPM_DBUS_PATH,
|
||||
- GPM_DBUS_INTERFACE);
|
||||
- ret = FALSE;
|
||||
-
|
||||
- res = dbus_g_proxy_call (proxy, "CanSuspend",
|
||||
- &error,
|
||||
- G_TYPE_INVALID,
|
||||
- G_TYPE_BOOLEAN,
|
||||
- &ret,
|
||||
- G_TYPE_INVALID);
|
||||
- if (! res) {
|
||||
- if (error != NULL) {
|
||||
- g_warning ("Could not ask power manager if user can suspend: %s",
|
||||
- error->message);
|
||||
- g_error_free (error);
|
||||
- }
|
||||
- ret = FALSE;
|
||||
- }
|
||||
+ gboolean ret;
|
||||
+ DkpClient *dkp_client;
|
||||
|
||||
+ /* use DeviceKit-power to get data */
|
||||
+ dkp_client = dkp_client_new ();
|
||||
+ g_object_get (dkp_client,
|
||||
+ "can-suspend", &ret,
|
||||
+ NULL);
|
||||
+ g_object_unref (dkp_client);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -655,36 +628,19 @@ do_disconnect (GdmGreeterLoginWindow *login_window)
|
||||
static void
|
||||
do_suspend (GdmGreeterLoginWindow *login_window)
|
||||
{
|
||||
- GError *error;
|
||||
- DBusGConnection *connection;
|
||||
- DBusGProxy *proxy;
|
||||
+ gboolean ret;
|
||||
+ DkpClient *dkp_client;
|
||||
+ GError *error = NULL;
|
||||
|
||||
- g_debug ("GdmGreeterLoginWindow: Suspend button clicked");
|
||||
-
|
||||
- error = NULL;
|
||||
- connection = dbus_g_bus_get (DBUS_BUS_SESSION, &error);
|
||||
- if (error != NULL) {
|
||||
+ /* use DeviceKit-power to get data */
|
||||
+ dkp_client = dkp_client_new ();
|
||||
+ ret = dkp_client_suspend (dkp_client, &error);
|
||||
+ if (!ret) {
|
||||
g_warning ("Couldn't suspend: %s", error->message);
|
||||
g_error_free (error);
|
||||
return;
|
||||
}
|
||||
- proxy = dbus_g_proxy_new_for_name (connection,
|
||||
- GPM_DBUS_NAME,
|
||||
- GPM_DBUS_PATH,
|
||||
- GPM_DBUS_INTERFACE);
|
||||
- error = NULL;
|
||||
- dbus_g_proxy_call (proxy,
|
||||
- "Suspend",
|
||||
- &error,
|
||||
- G_TYPE_INVALID,
|
||||
- G_TYPE_INVALID);
|
||||
- if (error != NULL) {
|
||||
- g_warning ("Couldn't suspend: %s", error->message);
|
||||
- g_error_free (error);
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- g_object_unref (proxy);
|
||||
+ g_object_unref (dkp_client);
|
||||
}
|
||||
|
||||
static void
|
||||
--
|
||||
1.6.4.4
|
||||
|
1326
gdm-2.28.1-move-shutdown-functions.patch
Normal file
1326
gdm-2.28.1-move-shutdown-functions.patch
Normal file
File diff suppressed because it is too large
Load Diff
15
gdm-bubble-location.patch
Normal file
15
gdm-bubble-location.patch
Normal file
@ -0,0 +1,15 @@
|
||||
diff -up gdm-2.28.0/data/session-setup.entries.bubble-location gdm-2.28.0/data/session-setup.entries
|
||||
--- gdm-2.28.0/data/session-setup.entries.bubble-location 2009-10-09 09:38:01.315620045 -0400
|
||||
+++ gdm-2.28.0/data/session-setup.entries 2009-10-09 09:39:11.354874396 -0400
|
||||
@@ -755,5 +755,11 @@
|
||||
<string>/bin/true</string>
|
||||
</value>
|
||||
</entry>
|
||||
+ <entry>
|
||||
+ <key>/apps/notification-daemon/popup_location</key>
|
||||
+ <value>
|
||||
+ <string>bottom_right</string>
|
||||
+ </value>
|
||||
+ </entry>
|
||||
</entrylist>
|
||||
</gconfentryfile>
|
17814
gdm-multistack.patch
17814
gdm-multistack.patch
File diff suppressed because it is too large
Load Diff
@ -1,17 +1,22 @@
|
||||
diff -up gdm-2.25.2/configure.ac.system-keyboard gdm-2.25.2/configure.ac
|
||||
--- gdm-2.25.2/configure.ac.system-keyboard 2009-02-24 22:51:00.058815966 -0500
|
||||
+++ gdm-2.25.2/configure.ac 2009-02-24 22:51:00.154816109 -0500
|
||||
@@ -69,6 +69,7 @@ AC_SUBST(COMMON_LIBS)
|
||||
PKG_CHECK_MODULES(DAEMON,
|
||||
#
|
||||
# Description: Get default keyboard layout from hal
|
||||
# Ubuntu: https://bugs.launchpad.net/bugs/395103
|
||||
# Fedora: http://cvs.fedoraproject.org/viewvc//devel/gdm/gdm-system-keyboard.patch?view=markup
|
||||
#
|
||||
diff -Nur -x '*.orig' -x '*~' gdm-2.28.0/configure.ac gdm-2.28.0.new/configure.ac
|
||||
--- gdm-2.28.0/configure.ac 2009-09-21 22:06:40.000000000 +0200
|
||||
+++ gdm-2.28.0.new/configure.ac 2009-10-01 12:35:50.345762314 +0200
|
||||
@@ -70,6 +70,7 @@
|
||||
dbus-glib-1 >= $DBUS_GLIB_REQUIRED_VERSION
|
||||
gobject-2.0 >= $GLIB_REQUIRED_VERSION
|
||||
+ hal
|
||||
gio-2.0 >= $GLIB_REQUIRED_VERSION
|
||||
+ hal
|
||||
)
|
||||
AC_SUBST(DAEMON_CFLAGS)
|
||||
AC_SUBST(DAEMON_LIBS)
|
||||
diff -up gdm-2.25.2/daemon/gdm-session-direct.c.system-keyboard gdm-2.25.2/daemon/gdm-session-direct.c
|
||||
--- gdm-2.25.2/daemon/gdm-session-direct.c.system-keyboard 2008-08-26 15:04:00.000000000 -0400
|
||||
+++ gdm-2.25.2/daemon/gdm-session-direct.c 2009-02-24 22:55:02.656566009 -0500
|
||||
diff -Nur -x '*.orig' -x '*~' gdm-2.28.0/daemon/gdm-session-direct.c gdm-2.28.0.new/daemon/gdm-session-direct.c
|
||||
--- gdm-2.28.0/daemon/gdm-session-direct.c 2009-09-21 22:05:27.000000000 +0200
|
||||
+++ gdm-2.28.0.new/daemon/gdm-session-direct.c 2009-10-01 12:34:43.000000000 +0200
|
||||
@@ -45,6 +45,8 @@
|
||||
#include <dbus/dbus-glib.h>
|
||||
#include <dbus/dbus-glib-lowlevel.h>
|
||||
@ -21,7 +26,7 @@ diff -up gdm-2.25.2/daemon/gdm-session-direct.c.system-keyboard gdm-2.25.2/daemo
|
||||
#include "gdm-session-direct.h"
|
||||
#include "gdm-session.h"
|
||||
#include "gdm-session-private.h"
|
||||
@@ -595,14 +597,66 @@ get_default_language_name (GdmSessionDir
|
||||
@@ -598,14 +600,87 @@
|
||||
return setlocale (LC_MESSAGES, NULL);
|
||||
}
|
||||
|
||||
@ -33,6 +38,7 @@ diff -up gdm-2.25.2/daemon/gdm-session-direct.c.system-keyboard gdm-2.25.2/daemo
|
||||
+ char **devices;
|
||||
+ int n_devices;
|
||||
+ char *layout;
|
||||
+ char *variant;
|
||||
+ char *result;
|
||||
+
|
||||
+ result = NULL;
|
||||
@ -60,8 +66,27 @@ diff -up gdm-2.25.2/daemon/gdm-session-direct.c.system-keyboard gdm-2.25.2/daemo
|
||||
+ "input.xkb.layout",
|
||||
+ NULL);
|
||||
+ }
|
||||
+ result = g_strdup (layout);
|
||||
+ libhal_free_string (layout);
|
||||
+ if (!layout)
|
||||
+ goto out;
|
||||
+
|
||||
+ variant = libhal_device_get_property_string (ctx,
|
||||
+ devices[0],
|
||||
+ "input.x11_options.XkbVariant",
|
||||
+ NULL);
|
||||
+ if (!variant) {
|
||||
+ variant = libhal_device_get_property_string (ctx,
|
||||
+ devices[0],
|
||||
+ "input.xkb.variant",
|
||||
+ NULL);
|
||||
+ }
|
||||
+
|
||||
+ if (variant != NULL && variant[0] != '\0') {
|
||||
+ result = g_strdup_printf("%s\t%s", layout, variant);
|
||||
+ libhal_free_string (variant);
|
||||
+ } else {
|
||||
+ result = g_strdup (layout);
|
||||
+ }
|
||||
+ libhal_free_string (layout);
|
||||
+ }
|
||||
+
|
||||
+ libhal_free_string_array (devices);
|
||||
@ -74,6 +99,7 @@ diff -up gdm-2.25.2/daemon/gdm-session-direct.c.system-keyboard gdm-2.25.2/daemo
|
||||
+ result = g_strdup ("us");
|
||||
+ }
|
||||
+
|
||||
+ g_debug ("GdmSessionDirect: System default keyboard layout: '%s'", result);
|
||||
+ return result;
|
||||
+}
|
||||
+
|
||||
@ -82,7 +108,7 @@ diff -up gdm-2.25.2/daemon/gdm-session-direct.c.system-keyboard gdm-2.25.2/daemo
|
||||
{
|
||||
- if (session->priv->saved_layout != NULL) {
|
||||
- return session->priv->saved_layout;
|
||||
+ if (session->priv->saved_layout == NULL) {
|
||||
+ if (!session->priv->saved_layout) {
|
||||
+ session->priv->saved_layout = get_system_default_layout (session);
|
||||
}
|
||||
|
||||
@ -91,16 +117,3 @@ diff -up gdm-2.25.2/daemon/gdm-session-direct.c.system-keyboard gdm-2.25.2/daemo
|
||||
}
|
||||
|
||||
static char *
|
||||
diff -up gdm-2.25.2/daemon/gdm-session-settings.c.system-keyboard gdm-2.25.2/daemon/gdm-session-settings.c
|
||||
--- gdm-2.25.2/daemon/gdm-session-settings.c.system-keyboard 2008-08-26 15:04:00.000000000 -0400
|
||||
+++ gdm-2.25.2/daemon/gdm-session-settings.c 2009-02-24 22:51:00.158815919 -0500
|
||||
@@ -149,8 +149,7 @@ gdm_session_settings_set_layout_name (Gd
|
||||
{
|
||||
g_return_if_fail (GDM_IS_SESSION_SETTINGS (settings));
|
||||
|
||||
- if (settings->priv->layout_name == NULL ||
|
||||
- strcmp (settings->priv->layout_name, layout_name) != 0) {
|
||||
+ if (g_strcmp0 (settings->priv->layout_name, layout_name) != 0) {
|
||||
settings->priv->layout_name = g_strdup (layout_name);
|
||||
g_object_notify (G_OBJECT (settings), "layout-name");
|
||||
}
|
||||
|
122
gdm.spec
122
gdm.spec
@ -15,8 +15,8 @@
|
||||
|
||||
Summary: The GNOME Display Manager
|
||||
Name: gdm
|
||||
Version: 2.28.0
|
||||
Release: 5%{?dist}
|
||||
Version: 2.28.1
|
||||
Release: 20%{?dist}
|
||||
Epoch: 1
|
||||
License: GPLv2+
|
||||
Group: User Interface/X
|
||||
@ -95,17 +95,24 @@ Requires: audit-libs >= %{libauditver}
|
||||
Patch2: gdm-2.26.0-force-active-vt.patch
|
||||
Patch3: gdm-2.23.92-save-root-window.patch
|
||||
|
||||
# https://bugzilla.gnome.org/show_bug.cgi?id=596569
|
||||
Patch4: gdm-2.28.0-use-devicekit-power.patch
|
||||
|
||||
# uses /etc/sysconfig/keyboard and is thus not directly upstreamable
|
||||
# should probably be changed to get the system layout from the X server
|
||||
# https://bugzilla.gnome.org/show_bug.cgi?id=572765
|
||||
Patch13: gdm-system-keyboard.patch
|
||||
|
||||
Patch19: gdm-multistack.patch
|
||||
Patch20: 0001-Fix-gdm_slave_get_timed_login_details.patch
|
||||
Patch20: gdm-2.28.1-move-shutdown-functions.patch
|
||||
Patch21: fix-clock.patch
|
||||
Patch22: fix-timer.patch
|
||||
Patch23: fix-na-tray.patch
|
||||
Patch24: fix-computer-info.patch
|
||||
Patch25: fix-run-dir-permissions.patch
|
||||
Patch26: make-user-list-animation-smoother.patch
|
||||
Patch27: 0001-Don-t-show-lock-screen-option-if-locked-down.patch
|
||||
|
||||
Patch96: gdm-multistack.patch
|
||||
# Fedora-specific
|
||||
Patch97: gdm-bubble-location.patch
|
||||
Patch98: tray-padding.patch
|
||||
Patch99: gdm-2.23.1-fedora-logo.patch
|
||||
|
||||
%package user-switch-applet
|
||||
@ -145,12 +152,20 @@ The GDM fingerprint plugin provides functionality necessary to use a fingerprint
|
||||
%setup -q
|
||||
%patch2 -p1 -b .force-active-vt
|
||||
%patch3 -p1 -b .save-root-window
|
||||
%patch4 -p1 -b .use-devicekit-power
|
||||
%patch13 -p1 -b .system-keyboard
|
||||
|
||||
%patch19 -p1 -b .multistack
|
||||
%patch20 -p1 -b .autologin
|
||||
%patch20 -p1 -b .move-shutdown-functions
|
||||
%patch21 -p1 -b .fix-clock
|
||||
%patch22 -p1 -b .fix-timer
|
||||
%patch23 -p1 -b .fix-na-tray
|
||||
%patch24 -p1 -b .fix-computer-info
|
||||
%patch25 -p1 -b .fix-run-dir-permission
|
||||
%patch26 -p1 -b .make-user-list-animation-smoother
|
||||
%patch27 -p1 -b .dont-show-lock-screen-if-locked-down
|
||||
|
||||
%patch96 -p1 -b .multistack
|
||||
%patch97 -p1 -b .bubble-location
|
||||
%patch98 -p1 -b .tray-padding
|
||||
%patch99 -p1 -b .fedora-logo
|
||||
|
||||
autoreconf -i -f
|
||||
@ -219,6 +234,8 @@ mkdir -p $RPM_BUILD_ROOT%{_datadir}/gdm/autostart/LoginWindow
|
||||
# temporarily manually copy this
|
||||
cp -f %{SOURCE10} $RPM_BUILD_ROOT%{_datadir}/gdm/autostart/LoginWindow/polkit-gnome-authentication-agent-1.desktop
|
||||
|
||||
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/gdm/greeter
|
||||
|
||||
rm -rf $RPM_BUILD_ROOT%{_localstatedir}/scrollkeeper
|
||||
|
||||
find $RPM_BUILD_ROOT -name '*.a' -delete
|
||||
@ -372,10 +389,12 @@ fi
|
||||
%config %{_datadir}/gdm/autostart/LoginWindow/*
|
||||
%dir %{_localstatedir}/log/gdm
|
||||
%dir %{_localstatedir}/spool/gdm
|
||||
%dir %{_localstatedir}/run/gdm/greeter
|
||||
%attr(1770, gdm, gdm) %dir %{_localstatedir}/lib/gdm
|
||||
%attr(1750, gdm, gdm) %dir %{_localstatedir}/lib/gdm/.gconf.mandatory
|
||||
%attr(1640, gdm, gdm) %dir %{_localstatedir}/lib/gdm/.gconf.mandatory/*.xml
|
||||
%attr(1640, gdm, gdm) %dir %{_localstatedir}/lib/gdm/.gconf.path
|
||||
%attr(1755, gdm, gdm) %dir %{_localstatedir}/run/gdm/greeter
|
||||
%attr(1770, root, gdm) %dir %{_localstatedir}/gdm
|
||||
%attr(1777, root, gdm) %dir %{_localstatedir}/run/gdm
|
||||
%attr(1755, root, gdm) %dir %{_localstatedir}/cache/gdm
|
||||
@ -400,8 +419,87 @@ fi
|
||||
%{_libdir}/gdm/simple-greeter/plugins/fingerprint.so
|
||||
|
||||
%changelog
|
||||
* Wed Oct 07 2009 Ray Strode <rstrode@redhat.com> - 1:2.28.0-5
|
||||
- Fix xguest
|
||||
* Sat Oct 31 2009 Matthias Clasen <mclasen@redhat.com> 2.28.1-20
|
||||
- Don't show 'Lock Screen' in the user switcher if locked down
|
||||
|
||||
* Sat Oct 31 2009 Matthias Clasen <mclasen@redhat.com> 2.28.1-18
|
||||
- Actually set up statusicon padding
|
||||
|
||||
* Fri Oct 30 2009 Ray Strode <rstrode@redhat.com> 2.28.1-17
|
||||
- Make the user list slide animation smoother
|
||||
|
||||
* Thu Oct 29 2009 Ray Strode <rstrode@redhat.com> 2.28.1-16
|
||||
- Shrink autologin timer
|
||||
- Make language dialog not double spaced
|
||||
|
||||
* Thu Oct 29 2009 Ray Strode <rstrode@redhat.com> 2.28.1-15
|
||||
- Don't show fingerprint task button unless fingerprint is
|
||||
enabled
|
||||
- Don't show smartcard task button and list item unless
|
||||
pcscd is running.
|
||||
|
||||
* Wed Oct 28 2009 Ray Strode <rstrode@redhat.com> 2.28.1-14
|
||||
- Don't show image on login button
|
||||
|
||||
* Wed Oct 28 2009 Ray Strode <rstrode@redhat.com> 2.28.1-13
|
||||
- Fix double free during user switching (might address
|
||||
bug 512944)
|
||||
|
||||
* Tue Oct 27 2009 Ray Strode <rstrode@redhat.com> 2.28.1-12
|
||||
- One more go at bug 527920
|
||||
|
||||
* Tue Oct 27 2009 Ray Strode <rstrode@redhat.com> 2.28.1-11
|
||||
- Tighten permissions on /var/run/gdm (bug 531063)
|
||||
|
||||
* Mon Oct 26 2009 Ray Strode <rstrode@redhat.com> 2.28.1-10
|
||||
- Position shutdown menu properly on multihead machines
|
||||
|
||||
* Fri Oct 23 2009 Ray Strode <rstrode@redhat.com> 2.28.1-9
|
||||
- Don't show hostname by default if it's localhost
|
||||
|
||||
* Fri Oct 23 2009 Ray Strode <rstrode@redhat.com> 2.28.1-8
|
||||
- Attempt to fix crash some users see.
|
||||
- Clean up rebase
|
||||
|
||||
* Fri Oct 23 2009 Ray Strode <rstrode@redhat.com> 2.28.1-7
|
||||
- Show Other user even when there are no other users
|
||||
(bug 527920)
|
||||
|
||||
* Fri Oct 23 2009 Ray Strode <rstrode@redhat.com> 2.28.1-6
|
||||
- Properly read default keyboard layout (bug 530452)
|
||||
|
||||
* Fri Oct 23 2009 Ray Strode <rstrode@redhat.com> 2.28.1-5
|
||||
- Remove tool tip from login button
|
||||
|
||||
* Thu Oct 22 2009 Ray Strode <rstrode@redhat.com> 2.28.1-4
|
||||
- Fix autologin window spasms
|
||||
- Fix autologin timer animation
|
||||
- Make autologin and multistack play better together
|
||||
- Add padding to notification tray
|
||||
|
||||
* Wed Oct 21 2009 Ray Strode <rstrode@redhat.com> 2.28.1-3
|
||||
- Move date from panel to clock tooltip
|
||||
|
||||
* Tue Oct 20 2009 Ray Strode <rstrode@redhat.com> 2.28.1-2
|
||||
- Move shutdown functions to panel from login window
|
||||
|
||||
* Tue Oct 20 2009 Ray Strode <rstrode@redhat.com> 2.28.1-1
|
||||
- Update to 2.28.1
|
||||
|
||||
* Fri Oct 09 2009 Ray Strode <rstrode@redhat.com> 2.28.0-9
|
||||
- Fix Other... user.
|
||||
|
||||
* Fri Oct 9 2009 Matthias Clasen <mclasen@redhat.com> - 1:2.28.0-8
|
||||
- Move bubbles to the lower right on the login screen
|
||||
|
||||
* Wed Oct 07 2009 Ray Strode <rstrode@redhat.com> - 1:2.28.0-7
|
||||
- Fix gdm-password / xguest interaction (bug 524421)
|
||||
|
||||
* Mon Oct 5 2009 Matthias Clasen <mclasen@redhat.com> - 1:2.28.4-6
|
||||
- Fix the autostart file for at-spi-registryd
|
||||
|
||||
* Thu Oct 1 2009 Matthias Clasen <mclasen@redhat.com> - 1:2.28.4-5
|
||||
- Handle keyboard layout variants
|
||||
|
||||
* Mon Sep 28 2009 Ray Strode <rstrode@redhat.com> - 1:2.28.0-4
|
||||
- Add cache dir to package manifest
|
||||
|
408
make-user-list-animation-smoother.patch
Normal file
408
make-user-list-animation-smoother.patch
Normal file
@ -0,0 +1,408 @@
|
||||
From 7980049944d064e803522aca8241256a62e90925 Mon Sep 17 00:00:00 2001
|
||||
From: Ray Strode <rstrode@redhat.com>
|
||||
Date: Fri, 30 Oct 2009 11:18:13 -0400
|
||||
Subject: [PATCH 1/6] Fix typo in chooser grow code
|
||||
|
||||
---
|
||||
gui/simple-greeter/gdm-chooser-widget.c | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/gui/simple-greeter/gdm-chooser-widget.c b/gui/simple-greeter/gdm-chooser-widget.c
|
||||
index cbd5072..9347eee 100644
|
||||
--- a/gui/simple-greeter/gdm-chooser-widget.c
|
||||
+++ b/gui/simple-greeter/gdm-chooser-widget.c
|
||||
@@ -894,7 +894,7 @@ start_grow_animation (GdmChooserWidget *widget)
|
||||
height = get_height_of_screen (widget);
|
||||
}
|
||||
gdm_scrollable_widget_slide_to_height (GDM_SCROLLABLE_WIDGET (widget->priv->scrollable_widget),
|
||||
- widget->priv->height_when_grown,
|
||||
+ height,
|
||||
(GdmScrollableWidgetSlideStepFunc)
|
||||
on_grow_animation_step, widget,
|
||||
(GdmScrollableWidgetSlideDoneFunc)
|
||||
--
|
||||
1.6.5.1
|
||||
|
||||
|
||||
From e2cde131a24e2933588bed8c741ca14bb007c6eb Mon Sep 17 00:00:00 2001
|
||||
From: Ray Strode <rstrode@redhat.com>
|
||||
Date: Fri, 30 Oct 2009 12:13:32 -0400
|
||||
Subject: [PATCH 2/6] Don't start grow animation until chooser is loaded
|
||||
|
||||
This makes it smoother when first starting up
|
||||
---
|
||||
gui/simple-greeter/gdm-chooser-widget.c | 37 ++----------------------------
|
||||
1 files changed, 3 insertions(+), 34 deletions(-)
|
||||
|
||||
diff --git a/gui/simple-greeter/gdm-chooser-widget.c b/gui/simple-greeter/gdm-chooser-widget.c
|
||||
index 9347eee..1147104 100644
|
||||
--- a/gui/simple-greeter/gdm-chooser-widget.c
|
||||
+++ b/gui/simple-greeter/gdm-chooser-widget.c
|
||||
@@ -92,7 +92,6 @@ struct GdmChooserWidgetPrivate
|
||||
|
||||
guint32 should_hide_inactive_items : 1;
|
||||
guint32 emit_activated_after_resize_animation : 1;
|
||||
- guint32 was_fully_grown : 1;
|
||||
|
||||
GdmChooserWidgetPosition separator_position;
|
||||
GdmChooserWidgetState state;
|
||||
@@ -807,29 +806,12 @@ on_grow_animation_complete (GdmScrollableWidget *scrollable_widget,
|
||||
{
|
||||
g_assert (widget->priv->state == GDM_CHOOSER_WIDGET_STATE_GROWING);
|
||||
widget->priv->state = GDM_CHOOSER_WIDGET_STATE_GROWN;
|
||||
- widget->priv->was_fully_grown = TRUE;
|
||||
gtk_tree_view_set_enable_search (GTK_TREE_VIEW (widget->priv->items_view), TRUE);
|
||||
|
||||
_grab_focus (GTK_WIDGET (widget));
|
||||
}
|
||||
|
||||
static int
|
||||
-get_height_of_screen (GdmChooserWidget *widget)
|
||||
-{
|
||||
- GdkScreen *screen;
|
||||
- GdkRectangle area;
|
||||
- int monitor;
|
||||
-
|
||||
- screen = gtk_widget_get_screen (GTK_WIDGET (widget));
|
||||
-
|
||||
- monitor = gdk_screen_get_monitor_at_window (screen,
|
||||
- gdk_screen_get_root_window (screen));
|
||||
- gdk_screen_get_monitor_geometry (screen, monitor, &area);
|
||||
-
|
||||
- return area.height;
|
||||
-}
|
||||
-
|
||||
-static int
|
||||
get_number_of_on_screen_rows (GdmChooserWidget *widget)
|
||||
{
|
||||
GtkTreePath *start_path;
|
||||
@@ -876,7 +858,6 @@ start_grow_animation (GdmChooserWidget *widget)
|
||||
{
|
||||
int number_of_visible_rows;
|
||||
int number_of_rows;
|
||||
- int height;
|
||||
|
||||
number_of_visible_rows = gtk_tree_model_iter_n_children (GTK_TREE_MODEL (widget->priv->model_sorter), NULL);
|
||||
number_of_rows = gtk_tree_model_iter_n_children (GTK_TREE_MODEL (widget->priv->list_store), NULL);
|
||||
@@ -888,13 +869,8 @@ start_grow_animation (GdmChooserWidget *widget)
|
||||
|
||||
set_inactive_items_visible (widget, TRUE);
|
||||
|
||||
- if (widget->priv->was_fully_grown) {
|
||||
- height = widget->priv->height_when_grown;
|
||||
- } else {
|
||||
- height = get_height_of_screen (widget);
|
||||
- }
|
||||
gdm_scrollable_widget_slide_to_height (GDM_SCROLLABLE_WIDGET (widget->priv->scrollable_widget),
|
||||
- height,
|
||||
+ widget->priv->height_when_grown,
|
||||
(GdmScrollableWidgetSlideStepFunc)
|
||||
on_grow_animation_step, widget,
|
||||
(GdmScrollableWidgetSlideDoneFunc)
|
||||
@@ -912,7 +888,6 @@ skip_resize_animation (GdmChooserWidget *widget)
|
||||
set_inactive_items_visible (GDM_CHOOSER_WIDGET (widget), TRUE);
|
||||
gtk_tree_view_set_enable_search (GTK_TREE_VIEW (widget->priv->items_view), TRUE);
|
||||
widget->priv->state = GDM_CHOOSER_WIDGET_STATE_GROWN;
|
||||
- widget->priv->was_fully_grown = FALSE;
|
||||
_grab_focus (GTK_WIDGET (widget));
|
||||
}
|
||||
}
|
||||
@@ -922,7 +897,6 @@ gdm_chooser_widget_grow (GdmChooserWidget *widget)
|
||||
{
|
||||
if (widget->priv->state == GDM_CHOOSER_WIDGET_STATE_SHRINKING) {
|
||||
gdm_scrollable_widget_stop_sliding (GDM_SCROLLABLE_WIDGET (widget->priv->scrollable_widget));
|
||||
- widget->priv->was_fully_grown = FALSE;
|
||||
}
|
||||
|
||||
gtk_alignment_set (GTK_ALIGNMENT (widget->priv->frame_alignment),
|
||||
@@ -1233,9 +1207,7 @@ gdm_chooser_widget_size_allocate (GtkWidget *widget,
|
||||
chooser_widget = GDM_CHOOSER_WIDGET (widget);
|
||||
|
||||
if (chooser_widget->priv->state == GDM_CHOOSER_WIDGET_STATE_GROWN) {
|
||||
- if (chooser_widget->priv->was_fully_grown) {
|
||||
- chooser_widget->priv->height_when_grown = allocation->height;
|
||||
- }
|
||||
+ chooser_widget->priv->height_when_grown = allocation->height;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1801,8 +1773,6 @@ gdm_chooser_widget_init (GdmChooserWidget *widget)
|
||||
*/
|
||||
GTK_WIDGET_SET_FLAGS (widget, GTK_CAN_FOCUS);
|
||||
|
||||
- widget->priv->height_when_grown = get_height_of_screen (widget);
|
||||
-
|
||||
gtk_alignment_set_padding (GTK_ALIGNMENT (widget), 0, 0, 0, 0);
|
||||
|
||||
add_frame (widget);
|
||||
@@ -1935,9 +1905,7 @@ gdm_chooser_widget_init (GdmChooserWidget *widget)
|
||||
gtk_tree_row_reference_free);
|
||||
|
||||
add_separator (widget);
|
||||
-
|
||||
queue_column_visibility_update (widget);
|
||||
- gdm_chooser_widget_grow (widget);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -2544,5 +2512,6 @@ gdm_chooser_widget_propagate_pending_key_events (GdmChooserWidget *widget)
|
||||
void
|
||||
gdm_chooser_widget_loaded (GdmChooserWidget *widget)
|
||||
{
|
||||
+ gdm_chooser_widget_grow (widget);
|
||||
g_signal_emit (widget, signals[LOADED], 0);
|
||||
}
|
||||
--
|
||||
1.6.5.1
|
||||
|
||||
|
||||
From 3f707bba808b3484be7380a11aebfadb2bc98ab6 Mon Sep 17 00:00:00 2001
|
||||
From: Ray Strode <rstrode@redhat.com>
|
||||
Date: Fri, 30 Oct 2009 14:41:54 -0400
|
||||
Subject: [PATCH 3/6] Hide user list frame when list is empty.
|
||||
|
||||
---
|
||||
gui/simple-greeter/gdm-chooser-widget.c | 4 ++--
|
||||
1 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/gui/simple-greeter/gdm-chooser-widget.c b/gui/simple-greeter/gdm-chooser-widget.c
|
||||
index 1147104..4124195 100644
|
||||
--- a/gui/simple-greeter/gdm-chooser-widget.c
|
||||
+++ b/gui/simple-greeter/gdm-chooser-widget.c
|
||||
@@ -600,9 +600,9 @@ static void
|
||||
update_chooser_visibility (GdmChooserWidget *widget)
|
||||
{
|
||||
if (gdm_chooser_widget_get_number_of_items (widget) > 0) {
|
||||
- gtk_widget_show (widget->priv->scrollable_widget);
|
||||
+ gtk_widget_show (widget->priv->frame);
|
||||
} else {
|
||||
- gtk_widget_hide (widget->priv->scrollable_widget);
|
||||
+ gtk_widget_hide (widget->priv->frame);
|
||||
}
|
||||
g_object_notify (G_OBJECT (widget), "list-visible");
|
||||
}
|
||||
--
|
||||
1.6.5.1
|
||||
|
||||
|
||||
From 6197ec180d369899bf4b87c5e8adaed62ed3fdeb Mon Sep 17 00:00:00 2001
|
||||
From: Ray Strode <rstrode@redhat.com>
|
||||
Date: Fri, 30 Oct 2009 14:52:04 -0400
|
||||
Subject: [PATCH 4/6] Dynamically slide destination from step function
|
||||
|
||||
This lets us add items or swift directions while the animation is going.
|
||||
---
|
||||
gui/simple-greeter/gdm-chooser-widget.c | 10 +++++-----
|
||||
gui/simple-greeter/gdm-scrollable-widget.c | 19 ++++++++++++++++++-
|
||||
gui/simple-greeter/gdm-scrollable-widget.h | 1 +
|
||||
3 files changed, 24 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/gui/simple-greeter/gdm-chooser-widget.c b/gui/simple-greeter/gdm-chooser-widget.c
|
||||
index 4124195..4df03a6 100644
|
||||
--- a/gui/simple-greeter/gdm-chooser-widget.c
|
||||
+++ b/gui/simple-greeter/gdm-chooser-widget.c
|
||||
@@ -97,7 +97,6 @@ struct GdmChooserWidgetPrivate
|
||||
GdmChooserWidgetState state;
|
||||
|
||||
double active_row_normalized_position;
|
||||
- int height_when_grown;
|
||||
};
|
||||
|
||||
enum {
|
||||
@@ -552,6 +551,7 @@ set_frame_text (GdmChooserWidget *widget,
|
||||
static void
|
||||
on_shrink_animation_step (GdmScrollableWidget *scrollable_widget,
|
||||
double progress,
|
||||
+ int *new_height,
|
||||
GdmChooserWidget *widget)
|
||||
{
|
||||
GtkTreePath *active_row_path;
|
||||
@@ -839,6 +839,7 @@ get_number_of_on_screen_rows (GdmChooserWidget *widget)
|
||||
static void
|
||||
on_grow_animation_step (GdmScrollableWidget *scrollable_widget,
|
||||
double progress,
|
||||
+ int *new_height,
|
||||
GdmChooserWidget *widget)
|
||||
{
|
||||
int number_of_visible_rows;
|
||||
@@ -851,6 +852,8 @@ on_grow_animation_step (GdmScrollableWidget *scrollable_widget,
|
||||
gdm_scrollable_widget_stop_sliding (scrollable_widget);
|
||||
return;
|
||||
}
|
||||
+
|
||||
+ *new_height = GTK_BIN (scrollable_widget)->child->requisition.height;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -870,7 +873,7 @@ start_grow_animation (GdmChooserWidget *widget)
|
||||
set_inactive_items_visible (widget, TRUE);
|
||||
|
||||
gdm_scrollable_widget_slide_to_height (GDM_SCROLLABLE_WIDGET (widget->priv->scrollable_widget),
|
||||
- widget->priv->height_when_grown,
|
||||
+ GTK_BIN (widget->priv->scrollable_widget)->child->requisition.height,
|
||||
(GdmScrollableWidgetSlideStepFunc)
|
||||
on_grow_animation_step, widget,
|
||||
(GdmScrollableWidgetSlideDoneFunc)
|
||||
@@ -1206,9 +1209,6 @@ gdm_chooser_widget_size_allocate (GtkWidget *widget,
|
||||
|
||||
chooser_widget = GDM_CHOOSER_WIDGET (widget);
|
||||
|
||||
- if (chooser_widget->priv->state == GDM_CHOOSER_WIDGET_STATE_GROWN) {
|
||||
- chooser_widget->priv->height_when_grown = allocation->height;
|
||||
- }
|
||||
}
|
||||
|
||||
static gboolean
|
||||
diff --git a/gui/simple-greeter/gdm-scrollable-widget.c b/gui/simple-greeter/gdm-scrollable-widget.c
|
||||
index 2c0407d..6d9dc83 100644
|
||||
--- a/gui/simple-greeter/gdm-scrollable-widget.c
|
||||
+++ b/gui/simple-greeter/gdm-scrollable-widget.c
|
||||
@@ -132,9 +132,26 @@ on_animation_tick (GdmScrollableWidgetAnimation *animation,
|
||||
gtk_widget_set_size_request (animation->widget, width, height);
|
||||
|
||||
if (animation->step_func != NULL) {
|
||||
+ GdmTimer *timer;
|
||||
+
|
||||
+ height = animation->desired_height;
|
||||
+
|
||||
+ height -= animation->widget->style->ythickness * 2;
|
||||
+ height -= GTK_CONTAINER (animation->widget)->border_width * 2;
|
||||
+
|
||||
+ timer = g_object_ref (animation->timer);
|
||||
animation->step_func (GDM_SCROLLABLE_WIDGET (animation->widget),
|
||||
progress,
|
||||
+ &height,
|
||||
animation->step_func_user_data);
|
||||
+
|
||||
+ if (gdm_timer_is_started (timer)) {
|
||||
+ height += animation->widget->style->ythickness * 2;
|
||||
+ height += GTK_CONTAINER (animation->widget)->border_width * 2;
|
||||
+
|
||||
+ animation->desired_height = height;
|
||||
+ }
|
||||
+ g_object_unref (timer);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -708,7 +725,7 @@ gdm_scrollable_widget_slide_to_height (GdmScrollableWidget *scrollable_widget,
|
||||
|
||||
if (!input_redirected || gdm_scrollable_widget_animations_are_disabled (scrollable_widget)) {
|
||||
if (step_func != NULL) {
|
||||
- step_func (scrollable_widget, 0.0, step_user_data);
|
||||
+ step_func (scrollable_widget, 0.0, &height, step_user_data);
|
||||
}
|
||||
|
||||
if (done_func != NULL) {
|
||||
diff --git a/gui/simple-greeter/gdm-scrollable-widget.h b/gui/simple-greeter/gdm-scrollable-widget.h
|
||||
index 9b8877e..2241cb1 100644
|
||||
--- a/gui/simple-greeter/gdm-scrollable-widget.h
|
||||
+++ b/gui/simple-greeter/gdm-scrollable-widget.h
|
||||
@@ -40,6 +40,7 @@ typedef struct GdmScrollableWidget GdmScrollableWidget;
|
||||
typedef struct GdmScrollableWidgetPrivate GdmScrollableWidgetPrivate;
|
||||
typedef void (* GdmScrollableWidgetSlideStepFunc) (GdmScrollableWidget *scrollable_widget,
|
||||
double progress,
|
||||
+ int *new_height,
|
||||
gpointer *user_data);
|
||||
typedef void (* GdmScrollableWidgetSlideDoneFunc) (GdmScrollableWidget *scrollable_widget,
|
||||
gpointer *user_data);
|
||||
--
|
||||
1.6.5.1
|
||||
|
||||
|
||||
From a31d6dd70213fd3ab8572da2923b99fcbe5449a6 Mon Sep 17 00:00:00 2001
|
||||
From: Ray Strode <rstrode@redhat.com>
|
||||
Date: Fri, 30 Oct 2009 14:47:45 -0400
|
||||
Subject: [PATCH 5/6] Drop checks for growing too far
|
||||
|
||||
We're now very exact about where to grow so we don't need it.
|
||||
---
|
||||
gui/simple-greeter/gdm-chooser-widget.c | 16 ----------------
|
||||
1 files changed, 0 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/gui/simple-greeter/gdm-chooser-widget.c b/gui/simple-greeter/gdm-chooser-widget.c
|
||||
index 4df03a6..6c29d23 100644
|
||||
--- a/gui/simple-greeter/gdm-chooser-widget.c
|
||||
+++ b/gui/simple-greeter/gdm-chooser-widget.c
|
||||
@@ -848,28 +848,12 @@ on_grow_animation_step (GdmScrollableWidget *scrollable_widget,
|
||||
number_of_visible_rows = gtk_tree_model_iter_n_children (GTK_TREE_MODEL (widget->priv->model_sorter), NULL);
|
||||
number_of_on_screen_rows = get_number_of_on_screen_rows (widget);
|
||||
|
||||
- if (number_of_on_screen_rows >= number_of_visible_rows) {
|
||||
- gdm_scrollable_widget_stop_sliding (scrollable_widget);
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
*new_height = GTK_BIN (scrollable_widget)->child->requisition.height;
|
||||
}
|
||||
|
||||
static void
|
||||
start_grow_animation (GdmChooserWidget *widget)
|
||||
{
|
||||
- int number_of_visible_rows;
|
||||
- int number_of_rows;
|
||||
-
|
||||
- number_of_visible_rows = gtk_tree_model_iter_n_children (GTK_TREE_MODEL (widget->priv->model_sorter), NULL);
|
||||
- number_of_rows = gtk_tree_model_iter_n_children (GTK_TREE_MODEL (widget->priv->list_store), NULL);
|
||||
-
|
||||
- if (number_of_visible_rows >= number_of_rows) {
|
||||
- on_grow_animation_complete (GDM_SCROLLABLE_WIDGET (widget->priv->scrollable_widget), widget);
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
set_inactive_items_visible (widget, TRUE);
|
||||
|
||||
gdm_scrollable_widget_slide_to_height (GDM_SCROLLABLE_WIDGET (widget->priv->scrollable_widget),
|
||||
--
|
||||
1.6.5.1
|
||||
|
||||
|
||||
From f685f9fe038d891026fce69a47a7ab7c3e438d37 Mon Sep 17 00:00:00 2001
|
||||
From: Ray Strode <rstrode@redhat.com>
|
||||
Date: Fri, 30 Oct 2009 16:44:29 -0400
|
||||
Subject: [PATCH 6/6] Compute needs-scrollbar logic differently
|
||||
|
||||
This way is a little clearer to read and seems to work
|
||||
around a bug where the scrollbar gets shown briefly at
|
||||
the end of an animation.
|
||||
---
|
||||
gui/simple-greeter/gdm-scrollable-widget.c | 16 +++++++++++++---
|
||||
1 files changed, 13 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/gui/simple-greeter/gdm-scrollable-widget.c b/gui/simple-greeter/gdm-scrollable-widget.c
|
||||
index 6d9dc83..d55013d 100644
|
||||
--- a/gui/simple-greeter/gdm-scrollable-widget.c
|
||||
+++ b/gui/simple-greeter/gdm-scrollable-widget.c
|
||||
@@ -252,7 +252,7 @@ gdm_scrollable_widget_animation_stop (GdmScrollableWidgetAnimation *animation)
|
||||
static gboolean
|
||||
gdm_scrollable_widget_needs_scrollbar (GdmScrollableWidget *widget)
|
||||
{
|
||||
- GtkAdjustment *adjustment;
|
||||
+ gboolean needs_scrollbar;
|
||||
|
||||
if (widget->priv->scrollbar == NULL) {
|
||||
return FALSE;
|
||||
@@ -266,9 +266,19 @@ gdm_scrollable_widget_needs_scrollbar (GdmScrollableWidget *widget)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
- adjustment = gtk_range_get_adjustment (GTK_RANGE (widget->priv->scrollbar));
|
||||
+ if (GTK_BIN (widget)->child != NULL) {
|
||||
+ GtkRequisition child_requisition;
|
||||
+ int available_height;
|
||||
+
|
||||
+ gtk_widget_get_child_requisition (GTK_BIN (widget)->child,
|
||||
+ &child_requisition);
|
||||
+ available_height = GTK_WIDGET (widget)->allocation.height;
|
||||
+ needs_scrollbar = child_requisition.height > available_height;
|
||||
+ } else {
|
||||
+ needs_scrollbar = FALSE;
|
||||
+ }
|
||||
|
||||
- return adjustment->upper - adjustment->lower > adjustment->page_size;
|
||||
+ return needs_scrollbar;
|
||||
}
|
||||
|
||||
static void
|
||||
--
|
||||
1.6.5.1
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
7724929a6b75ba269fd519d4a4995bbb gdm-2.28.0.tar.bz2
|
||||
917dc80f5ef6adcdc15193de238476db gdm-2.28.1.tar.bz2
|
||||
|
15
tray-padding.patch
Normal file
15
tray-padding.patch
Normal file
@ -0,0 +1,15 @@
|
||||
diff -up gdm-2.28.1/data/session-setup.entries.tray-padding gdm-2.28.1/data/session-setup.entries
|
||||
--- gdm-2.28.1/data/session-setup.entries.tray-padding 2009-10-31 18:07:29.437799765 -0400
|
||||
+++ gdm-2.28.1/data/session-setup.entries 2009-10-31 18:08:20.758793871 -0400
|
||||
@@ -761,5 +761,11 @@
|
||||
<string>bottom_right</string>
|
||||
</value>
|
||||
</entry>
|
||||
+ <entry>
|
||||
+ <key>/apps/notification_area_applet/prefs/padding</key>
|
||||
+ <value>
|
||||
+ <int>3</int>
|
||||
+ </value>
|
||||
+ </entry>
|
||||
</entrylist>
|
||||
</gconfentryfile>
|
Loading…
Reference in New Issue
Block a user