rpms/gdm/F-12 fix-computer-info.patch, NONE, 1.1 gdm.spec, 1.504, 1.505

Ray Strode rstrode at fedoraproject.org
Mon Oct 26 14:57:11 UTC 2009


Author: rstrode

Update of /cvs/pkgs/rpms/gdm/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv29085

Modified Files:
	gdm.spec 
Added Files:
	fix-computer-info.patch 
Log Message:
- Don't show hostname by default if it's localhost


fix-computer-info.patch:
 gdm-greeter-login-window.c |   28 +++++++++++++++++++++-------
 1 file changed, 21 insertions(+), 7 deletions(-)

--- NEW FILE fix-computer-info.patch ---
>From 03e01936f5c11580a1485c492355eb0a468ea0f6 Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode at redhat.com>
Date: Mon, 26 Oct 2009 10:53:25 -0400
Subject: [PATCH] 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



Index: gdm.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gdm/F-12/gdm.spec,v
retrieving revision 1.504
retrieving revision 1.505
diff -u -p -r1.504 -r1.505
--- gdm.spec	26 Oct 2009 14:39:59 -0000	1.504
+++ gdm.spec	26 Oct 2009 14:57:11 -0000	1.505
@@ -16,7 +16,7 @@
 Summary: The GNOME Display Manager
 Name: gdm
 Version: 2.28.1
-Release: 8%{?dist}
+Release: 9%{?dist}
 Epoch: 1
 License: GPLv2+
 Group: User Interface/X
@@ -104,6 +104,7 @@ Patch20: gdm-2.28.1-move-shutdown-functi
 Patch21: fix-clock.patch
 Patch22: fix-timer.patch
 Patch23: fix-na-tray.patch
+Patch24: fix-computer-info.patch
 
 Patch97: gdm-multistack.patch
 # Fedora-specific
@@ -153,6 +154,7 @@ The GDM fingerprint plugin provides func
 %patch21 -p1 -b .fix-clock
 %patch22 -p1 -b .fix-timer
 %patch23 -p1 -b .fix-na-tray
+%patch24 -p1 -b .fix-computer-info
 
 %patch97 -p1 -b .multistack
 %patch98 -p1 -b .bubble-location
@@ -405,6 +407,9 @@ fi
 %{_libdir}/gdm/simple-greeter/plugins/fingerprint.so
 
 %changelog
+* Fri Oct 23 2009 Ray Strode <rstrode at redhat.com> 2.28.1-9
+- Don't show hostname by default if it's localhost
+
 * Fri Oct 23 2009 Ray Strode <rstrode at redhat.com> 2.28.1-8
 - Attempt to fix crash some users see.
 - Clean up rebase




More information about the fedora-extras-commits mailing list