rpms/gnome-screensaver/devel gnome-screensaver-2.13.90-lock-dialog.patch, NONE, 1.1 .cvsignore, 1.13, 1.14 gnome-screensaver.spec, 1.49, 1.50 sources, 1.15, 1.16

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Tue Jan 31 04:44:32 UTC 2006


Author: mclasen

Update of /cvs/dist/rpms/gnome-screensaver/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv21585

Modified Files:
	.cvsignore gnome-screensaver.spec sources 
Added Files:
	gnome-screensaver-2.13.90-lock-dialog.patch 
Log Message:
2.13.90


gnome-screensaver-2.13.90-lock-dialog.patch:
 configure           |    4 -
 configure.ac        |    1 
 src/gs-job.c        |    1 
 src/gs-lock-plug.c  |  130 ++++++++++++++++++++++++++++++++++++++++++++++++++--
 src/gs-manager.c    |    2 
 src/gs-window-x11.c |    1 
 6 files changed, 134 insertions(+), 5 deletions(-)

--- NEW FILE gnome-screensaver-2.13.90-lock-dialog.patch ---
--- gnome-screensaver-2.13.90/src/gs-lock-plug.c.lock-dialog	2006-01-04 10:58:58.000000000 -0500
+++ gnome-screensaver-2.13.90/src/gs-lock-plug.c	2006-01-30 23:38:07.000000000 -0500
@@ -36,6 +36,7 @@
 #include <gdk/gdkx.h>
 #include <X11/XKBlib.h>
 #include <gtk/gtk.h>
+#include <glade/glade-xml.h>
 
 /* for fast user switching */
 #include <libgnomevfs/gnome-vfs-init.h>
@@ -179,6 +180,9 @@
 
         plug = GS_LOCK_PLUG (widget);
 
+        if (!plug->vbox)
+                return;
+
         gtk_container_set_border_width (GTK_CONTAINER (plug->vbox), 24);
         gtk_box_set_spacing (GTK_BOX (plug->vbox), 12);
 
@@ -266,7 +270,8 @@
 set_status_text (GSLockPlug *plug,
                  const char *text)
 {
-        gtk_label_set_text (GTK_LABEL (plug->priv->status_label), text);
+        if (plug->priv->status_label)
+                gtk_label_set_text (GTK_LABEL (plug->priv->status_label), text);
 }
 
 static void
@@ -339,7 +344,10 @@
         }
 
         if (response_id == GS_LOCK_PLUG_RESPONSE_OK) {
-                gint current_page = gtk_notebook_get_current_page (GTK_NOTEBOOK (plug->priv->notebook));
+                gint current_page = AUTH_PAGE;
+
+                if (plug->priv->notebook)
+                        current_page = gtk_notebook_get_current_page (GTK_NOTEBOOK (plug->priv->notebook));
 
                 if (current_page == AUTH_PAGE) {
                         set_dialog_sensitive (plug, FALSE);
@@ -409,6 +417,9 @@
 
         plug->priv->caps_lock_on = is_on;
 
+        if (!plug->priv->capslock_label)
+                return;
+
         if (is_on)
                 gtk_label_set_text (GTK_LABEL (plug->priv->capslock_label),
                                     _("You have the Caps Lock key on."));
@@ -472,12 +483,17 @@
 gs_lock_plug_size_request (GtkWidget      *widget,
                            GtkRequisition *requisition)
 {
+	GSLockPlug *plug = GS_LOCK_PLUG (widget);
         int mod_width;
         int mod_height;
 
         if (GTK_WIDGET_CLASS (parent_class)->size_request)
                 GTK_WIDGET_CLASS (parent_class)->size_request (widget, requisition);
 
+	/* don't constrain size when themed */
+	if (plug->vbox == NULL)
+		return; 
+
         mod_width = requisition->height * 1.3;
         mod_height = requisition->width / 1.6;
         if (requisition->width < mod_width) {
@@ -487,7 +503,6 @@
                 /* if the dialog is wide fill out the height */
                 requisition->height = mod_height;
         }
-
 }
 
 static void
@@ -502,6 +517,9 @@
         plug->priv->logout_enabled = logout_enabled;
         g_object_notify (G_OBJECT (plug), "logout-enabled");
 
+        if (!plug->priv->logout_button)
+                return;
+
         if (logout_enabled)
                 gtk_widget_show (plug->priv->logout_button);
         else
@@ -1567,6 +1585,105 @@
         profile_end ("end", "buttons");
 }
 
+
+static void
+unlock_button_clicked (GtkButton  *button,
+                       GSLockPlug *plug)
+{
+        gs_lock_plug_response (plug, GS_LOCK_PLUG_RESPONSE_OK);
+}
+
+static void
+cancel_button_clicked (GtkButton  *button,
+                       GSLockPlug *plug)
+{
+        gs_lock_plug_response (plug, GS_LOCK_PLUG_RESPONSE_CANCEL);
+}
+
+static gboolean
+load_theme (GSLockPlug *plug)
+{
+        const gchar *theme;
+        gchar *glade;
+        gchar *rc;
+        GladeXML *xml;
+        GtkWidget *lock_dialog;
+        GtkWidget *unlock_button;
+        const gchar themedir[] = "/usr/share/gnome-screensaver/themes/";
+        gchar *str;
+
+        theme = g_getenv ("GNOME_SCREENSAVER_THEME");
+
+        if (!theme)
+                return FALSE;
+        
+	/* FIXME use prefix here */
+        glade = g_strconcat (themedir, theme, "-lock-dialog.glade", NULL);
+        if (!g_file_test (glade, G_FILE_TEST_IS_REGULAR)) {
+                g_free (glade);
+                return FALSE;
+        }
+
+        rc = g_strconcat (themedir, theme, "-lock-dialog.gtkrc", NULL);
+        if (g_file_test (rc, G_FILE_TEST_IS_REGULAR))
+                gtk_rc_parse (rc);
+        g_free (rc);
+        
+        xml = glade_xml_new (glade, "lock-dialog", NULL);
+
+        if (!xml) {
+                g_warning ("Failed to load '%s'\n", glade);
+                g_free (glade);
+                return FALSE;
+        }
+        g_free (glade);
+
+        lock_dialog = glade_xml_get_widget (xml, "lock-dialog");
+        gtk_container_add (GTK_CONTAINER (plug), lock_dialog);
+        gtk_widget_show_all (lock_dialog);
+
+        plug->vbox = NULL;
+        plug->action_area = glade_xml_get_widget (xml, "action-area");
+        plug->priv->notebook = NULL;
+        plug->priv->username_label = glade_xml_get_widget (xml, "username-label");
+        plug->priv->password_entry = glade_xml_get_widget (xml, "password-entry");
+        plug->priv->password_entry = glade_xml_get_widget (xml, "password-entry");
+        plug->priv->capslock_label = glade_xml_get_widget (xml, "capslock-label");
+        plug->priv->status_label = glade_xml_get_widget (xml, "status-label");
+        plug->priv->user_treeview = NULL;
+        plug->priv->ok_button = NULL;
+        plug->priv->cancel_button = glade_xml_get_widget (xml, "cancel-button");
+        plug->priv->logout_button = glade_xml_get_widget (xml, "logout-button");
+        plug->priv->switch_button = NULL;
+        unlock_button = glade_xml_get_widget (xml, "unlock-button");
+	gtk_widget_grab_default (unlock_button);
+
+        /* FIXME should let the theme determine the font size */
+	str = g_strdup_printf ("<big><big><big><big><big>%s</big></big></big></big></big>", g_get_user_name ());
+        gtk_label_set_markup (GTK_LABEL (plug->priv->username_label), str);
+        g_free (str);
+
+        plug->priv->timeout = DIALOG_TIMEOUT_MSEC;
+
+        g_signal_connect (plug->priv->password_entry, "button_press_event",
+                          G_CALLBACK (entry_button_press), NULL);
+
+        g_signal_connect (plug->priv->password_entry, "key_press_event",
+                          G_CALLBACK (entry_key_press), plug);
+
+        g_signal_connect (unlock_button, "clicked",
+                          G_CALLBACK (unlock_button_clicked), plug);
+
+        g_signal_connect (plug->priv->cancel_button, "clicked",
+                          G_CALLBACK (cancel_button_clicked), plug);
+
+        if (plug->priv->logout_button)
+                g_signal_connect (plug->priv->logout_button, "clicked",
+                                  G_CALLBACK (logout_button_clicked), plug);
+
+        return TRUE;
+}
+
 static void
 gs_lock_plug_init (GSLockPlug *plug)
 {
@@ -1576,6 +1693,13 @@
 
         plug->priv->fusa_manager = NULL;
 
+        if (load_theme (plug)) {
+
+                profile_end ("end", NULL);
+                
+                return;
+        }
+
         /* Dialog emulation */
 
         plug->vbox = gtk_vbox_new (FALSE, 0);
--- gnome-screensaver-2.13.90/src/gs-manager.c.lock-dialog	2006-01-21 19:15:26.000000000 -0500
+++ gnome-screensaver-2.13.90/src/gs-manager.c	2006-01-30 23:38:07.000000000 -0500
@@ -791,6 +791,8 @@
         job = gs_job_new_for_widget (GTK_WIDGET (window));
 
         theme = select_theme (manager);
+	/* FIXME: quick hack using an env var to communicate */
+        g_setenv ("GNOME_SCREENSAVER_THEME", theme, TRUE);
         gs_job_set_theme (job, theme, NULL);
 
         if (! manager->priv->throttle_enabled) {
--- gnome-screensaver-2.13.90/src/gs-job.c.lock-dialog	2006-01-21 19:35:24.000000000 -0500
+++ gnome-screensaver-2.13.90/src/gs-job.c	2006-01-30 23:41:43.000000000 -0500
@@ -571,6 +571,7 @@
                 "XAUTHORITY",
                 "XAUTHLOCALHOSTNAME",
                 "LANG",
+		"GNOME_SCREENSAVER_THEME",
                 "LANGUAGE"
         };
 
--- gnome-screensaver-2.13.90/src/gs-window-x11.c.lock-dialog	2006-01-21 19:34:03.000000000 -0500
+++ gnome-screensaver-2.13.90/src/gs-window-x11.c	2006-01-30 23:41:07.000000000 -0500
@@ -559,6 +559,7 @@
                 "XAUTHORITY",
                 "XAUTHLOCALHOSTNAME",
                 "LANG",
+		"GNOME_SCREENSAVER_THEME",
                 "LANGUAGE"
         };
 
--- gnome-screensaver-2.13.90/configure.lock-dialog	2006-01-17 17:32:05.000000000 -0500
+++ gnome-screensaver-2.13.90/configure	2006-01-30 23:38:07.000000000 -0500
@@ -23697,7 +23697,7 @@
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; then
-  pkg_cv_GNOME_SCREENSAVER_DIALOG_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= $GTK_REQUIRED_VERSION" 2>/dev/null`
+  pkg_cv_GNOME_SCREENSAVER_DIALOG_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= $GTK_REQUIRED_VERSION libglade-2.0 >= $GLADE_REQUIRED_VERSION" 2>/dev/null`
 else
   pkg_failed=yes
 fi
@@ -23711,7 +23711,7 @@
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; then
-  pkg_cv_GNOME_SCREENSAVER_DIALOG_LIBS=`$PKG_CONFIG --libs "gtk+-2.0 >= $GTK_REQUIRED_VERSION" 2>/dev/null`
+  pkg_cv_GNOME_SCREENSAVER_DIALOG_LIBS=`$PKG_CONFIG --libs "gtk+-2.0 >= $GTK_REQUIRED_VERSION libglade-2.0 >= $GLADE_REQUIRED_VERSION" 2>/dev/null`
 else
   pkg_failed=yes
 fi
--- gnome-screensaver-2.13.90/configure.ac.lock-dialog	2006-01-16 15:20:17.000000000 -0500
+++ gnome-screensaver-2.13.90/configure.ac	2006-01-30 23:38:07.000000000 -0500
@@ -60,6 +60,7 @@
 AC_SUBST(GNOME_SCREENSAVER_LIBS)
 
 PKG_CHECK_MODULES(GNOME_SCREENSAVER_DIALOG,
+        libglade-2.0 >= $GLADE_REQUIRED_VERSION
         gtk+-2.0 >= $GTK_REQUIRED_VERSION)
 AC_SUBST(GNOME_SCREENSAVER_DIALOG_CFLAGS)
 AC_SUBST(GNOME_SCREENSAVER_DIALOG_LIBS)


Index: .cvsignore
===================================================================
RCS file: /cvs/dist/rpms/gnome-screensaver/devel/.cvsignore,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- .cvsignore	17 Jan 2006 17:31:05 -0000	1.13
+++ .cvsignore	31 Jan 2006 04:44:30 -0000	1.14
@@ -4,3 +4,4 @@
 gnome-screensaver-0.0.23.tar.bz2
 gnome-screensaver-0.0.24.tar.bz2
 gnome-screensaver-2.13.5.tar.bz2
+gnome-screensaver-2.13.90.tar.bz2


Index: gnome-screensaver.spec
===================================================================
RCS file: /cvs/dist/rpms/gnome-screensaver/devel/gnome-screensaver.spec,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -r1.49 -r1.50
--- gnome-screensaver.spec	22 Jan 2006 20:22:22 -0000	1.49
+++ gnome-screensaver.spec	31 Jan 2006 04:44:30 -0000	1.50
@@ -13,8 +13,8 @@
 
 Summary: GNOME Sreensaver
 Name: gnome-screensaver
-Version: 2.13.5
-Release: 4
+Version: 2.13.90
+Release: 1
 License: GPL
 Group: Amusement/Graphics
 Source0: %{name}-%{version}.tar.bz2
@@ -23,9 +23,8 @@
 Source3: gnome-compiler-flags.m4
 Source4: fedoralogo-floaters.desktop
 
-Patch0: gnome-screensaver-0.0.22-lock-dialog.patch
+Patch0: gnome-screensaver-2.13.90-lock-dialog.patch
 Patch1: gnome-screensaver-0.0.23-use-floaters-by-default.patch
-Patch2: gnome-screensaver-2.13.5-use-less-cpu.patch
 
 BuildRoot: %{_tmppath}/%{name}-root
 URL: http://www.gnome.org
@@ -61,7 +60,6 @@
 %setup -q -a2
 %patch0 -p1 -b .lock-dialog
 %patch1 -p1 -b .use-floaters-by-default
-%patch2 -p1 -b .use-less-cpu
 
 %build
 intltoolize --force
@@ -122,6 +120,9 @@
 %{_sysconfdir}/pam.d/*
 
 %changelog
+* Mon Jan 30 2006 Matthias Clasen <mclasen at redhat.com> - 2.13.90-1
+- Update to 2.13.90
+
 * Sun Jan 22 2006 Ray Strode <rstrode at redhat.com> - 2.13.5-4
 - throttle cpu usage in floaters screensaver to allow things
   like background compiles to be faster (bug 178496).


Index: sources
===================================================================
RCS file: /cvs/dist/rpms/gnome-screensaver/devel/sources,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- sources	19 Jan 2006 21:06:28 -0000	1.15
+++ sources	31 Jan 2006 04:44:30 -0000	1.16
@@ -1,2 +1,2 @@
-2ab5b1c5b432f6b763f40c3a4a2b1c94  gnome-screensaver-2.13.5.tar.bz2
 661b1551a16e6aa948248b2443bad117  fedoralogo-floaters-lock-dialog.tar.gz
+8ff40bd9914a6272d6a9ace15edea207  gnome-screensaver-2.13.90.tar.bz2




More information about the fedora-cvs-commits mailing list