Re: Removing GNOME splash screens?



Am Freitag, den 15.10.2004, 16:14 +0200 schrieb Christian Neumair:
> Am Freitag, den 15.10.2004, 06:19 -0400 schrieb Ricardo Veguilla:
> > On Fri, 2004-10-15 at 19:00 +0900, janne wrote:
> > > fre 2004-10-15 klockan 10:33 +0100 skrev Iain *:
> > > > > Particularly if you consider that the splash screen serves no useful
> > > > > purpose anyway.

> I now feel like having a splash screen is like looking at your watch
> while waiting for the bus - it won't drive faster, you're just
> disappointed that it's late and get upset.
> 
> What about removing it completely? Do we really need "Welcome to
> GNOME"-fashioned branding?

The attached patch should do the trick for GNOME session. It is a first
shot. I'm not sure whether utils.[ch] is suitable for GUI-related
helpers. Comments, suggestions?

regs,
 Chris
Index: gnome-session/Makefile.am
===================================================================
RCS file: /cvs/gnome/gnome-session/gnome-session/Makefile.am,v
retrieving revision 1.106
diff -u -r1.106 Makefile.am
--- gnome-session/Makefile.am	7 Oct 2004 01:28:43 -0000	1.106
+++ gnome-session/Makefile.am	15 Oct 2004 17:41:03 -0000
@@ -30,14 +30,12 @@
 gnome_session_save_LDADD = $(GNOME_SESSION_LIBS)
 gnome_session_remove_LDADD = $(GNOME_SESSION_LIBS)
 gnome_session_properties_LDADD = $(GNOME_SESSION_LIBS)
-splash_test_LDADD = $(X_LIBS) $(GNOME_SESSION_LIBS)
 logout_test_LDADD = $(X_LIBS) $(GNOME_SESSION_LIBS)
 
 if SESSION
 @INTLTOOL_DESKTOP_RULE@
 
 noinst_PROGRAMS = \
-	splash-test \
 	logout-test
 
 bin_PROGRAMS = \
@@ -55,11 +53,6 @@
 	egg-screen-url.h	\
 	egg-screen-url.c
 
-splash_test_SOURCES =	\
-	splash-widget.c	\
-	splash-widget.h	\
-	splash-test.c
-
 logout_test_SOURCES =		\
 	logout-test.c		\
 	util.c			\
@@ -85,8 +78,6 @@
 	remote.h		\
 	logout.c		\
 	logout.h		\
-	splash-widget.c		\
-	splash-widget.h		\
 	gsm-xrandr.c		\
 	gsm-xrandr.h		\
 	gsm-keyring.c		\
@@ -166,9 +157,6 @@
 		< $(srcdir)/default.wm.in > default.wm.tmp \
 	  && mv default.wm.tmp default.wm
 
-pixmapdir = $(datadir)/pixmaps/splash/
-pixmap_DATA = gnome-splash.png
-
 schemasdir       = $(GCONF_SCHEMA_FILE_DIR)
 schemas_in_files = gnome-session.schemas.in
 schemas_DATA     = $(schemas_in_files:.schemas.in=.schemas)
@@ -191,7 +179,6 @@
 	default.in		\
 	default.wm.in		\
 	gnome-wm 		\
-	$(pixmap_DATA)		\
 	$(schemas_in_files)	\
 	gsm-marshal.list	\
 	session-properties.desktop.in
Index: gnome-session/gnome-session.schemas.in
===================================================================
RCS file: /cvs/gnome/gnome-session/gnome-session/gnome-session.schemas.in,v
retrieving revision 1.1
diff -u -r1.1 gnome-session.schemas.in
--- gnome-session/gnome-session.schemas.in	13 Nov 2003 12:34:40 -0000	1.1
+++ gnome-session/gnome-session.schemas.in	15 Oct 2004 17:41:03 -0000
@@ -2,17 +2,6 @@
 <gconfschemafile>
    <schemalist>
       <schema>
-         <key>/schemas/apps/gnome-session/options/show_splash_screen</key>
-         <applyto>/apps/gnome-session/options/show_splash_screen</applyto>
-         <owner>gnome</owner>
-         <type>bool</type>
-         <default>true</default>
-         <locale name="C">
-            <short>Show the splash screen</short>
-            <long>Show the splash screen when the session starts up</long>
-         </locale>
-      </schema>
-      <schema>
          <key>/schemas/apps/gnome-session/options/auto_save_session</key>
          <applyto>/apps/gnome-session/options/auto_save_session</applyto>
          <owner>gnome</owner>
@@ -43,17 +32,6 @@
          <locale name="C">
             <short>Allow TCP connections</short>
             <long>For security reasons,  on platforms which have _IceTcpTransNoListen() (XFree86 systems), gnome-session does not listen for connections on TCP ports.  This option will allow connections from (authorized) remote hosts.  gnome-session must be restarted for this to take effect.</long>
-         </locale>
-      </schema>
-      <schema>
-         <key>/schemas/apps/gnome-session/options/splash_image</key>
-         <applyto>/apps/gnome-session/options/splash_image</applyto>
-         <owner>gnome</owner>
-         <type>string</type>
-         <default>splash/gnome-splash.png</default>
-         <locale name="C">
-            <short>Splash Screen Image</short>
-            <long>Preferred Image to use for the splash screen when logging in to the GNOME Desktop</long>
          </locale>
       </schema>
    </schemalist>
Index: gnome-session/headers.h
===================================================================
RCS file: /cvs/gnome/gnome-session/gnome-session/headers.h,v
retrieving revision 1.13
diff -u -r1.13 headers.h
--- gnome-session/headers.h	13 Sep 2004 17:02:41 -0000	1.13
+++ gnome-session/headers.h	15 Oct 2004 17:41:03 -0000
@@ -56,8 +56,6 @@
  */
 
 #define GSM_GCONF_CONFIG_PREFIX    "/apps/gnome-session/options"
-/* Name of key used to store whether show the splash screen */
-#define SPLASH_SCREEN_KEY          GSM_GCONF_CONFIG_PREFIX "/show_splash_screen"
 
 /* Name of key used to store autosave mode. */
 #define AUTOSAVE_MODE_KEY          GSM_GCONF_CONFIG_PREFIX "/auto_save_session"
Index: gnome-session/main.c
===================================================================
RCS file: /cvs/gnome/gnome-session/gnome-session/main.c,v
retrieving revision 1.64
diff -u -r1.64 main.c
--- gnome-session/main.c	16 Aug 2004 14:46:49 -0000	1.64
+++ gnome-session/main.c	15 Oct 2004 17:41:03 -0000
@@ -40,7 +40,6 @@
 #include "ice.h"
 #include "save.h"
 #include "command.h"
-#include "splash-widget.h"
 #include "util.h"
 #include "gsm-sound.h"
 #include "gsm-gsd.h"
@@ -257,6 +256,8 @@
 
   while (!check_for_dns ())
     {
+      set_gdk_cursor (GDK_LEFT_PTR);
+
       if (!tmp_msgbox)
 	{
 	  tmp_msgbox = gtk_message_dialog_new (NULL, 0,
@@ -320,7 +321,6 @@
   char *session_name_env;
   Session *the_session;
   GConfClient *gconf_client;
-  gboolean splashing;
   gboolean a_t_support;
   GError *err;
   int status;
@@ -344,13 +344,8 @@
 
   /* We need to do this as early as possible */
   gsm_set_display_properties ();
-  
-  /* Make sure the splash screen has the SM_CLIENT_ID
-   * property set so smproxy doesn't try and session
-   * manage us.
-   * See http://bugzilla.gnome.org/show_bug.cgi?id=118063
-   */
-  gdk_set_sm_client_id ("gnome-session-dummy-id");
+
+  set_gdk_cursor (GDK_WATCH);
 
   gnome_login_check ();
 
@@ -404,7 +399,6 @@
   gconf_client = gconf_client_get_default ();
 
   gconf_client_add_dir (gconf_client, GSM_GCONF_CONFIG_PREFIX, GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
-  splashing      = gconf_client_get_bool (gconf_client, SPLASH_SCREEN_KEY, NULL);
   autosave       = gconf_client_get_bool (gconf_client, AUTOSAVE_MODE_KEY, NULL);
   logout_prompt  = gconf_client_get_bool (gconf_client, LOGOUT_PROMPT_KEY, NULL);
   a_t_support    = gconf_client_get_bool (gconf_client, ACCESSIBILITY_KEY, NULL);
@@ -456,9 +450,6 @@
   gsm_gsd_start ();
 
   gsm_remote_desktop_start ();
-
-  if (splashing)
-    splash_start ();
 
   start_session (the_session);
 
Index: gnome-session/manager.c
===================================================================
RCS file: /cvs/gnome/gnome-session/gnome-session/manager.c,v
retrieving revision 1.80
diff -u -r1.80 manager.c
--- gnome-session/manager.c	27 Sep 2004 17:48:49 -0000	1.80
+++ gnome-session/manager.c	15 Oct 2004 17:41:04 -0000
@@ -33,7 +33,6 @@
 #include "session.h"
 #include "prop.h"
 #include "command.h"
-#include "splash-widget.h"
 #include "remote.h"
 #include "save.h"
 #include "logout.h"
@@ -430,8 +429,6 @@
       envv = NULL; /* sanity */
       envc = 0;
 
-      splash_update (argv [0]);
-
       restart_info = NULL;
       find_string_property (client, GsmRestartService, &restart_info);
       pid = remote_start (restart_info, argc, argv, dir, envpc, envp);
@@ -1385,8 +1382,9 @@
 	}
       save_state = MANAGER_IDLE;
       save_state_changed ();
-      splash_stop ();
-     }    
+
+      set_gdk_cursor (GDK_LEFT_PTR);
+     }
 
   if (save_state == SAVE_PHASE_1)
     {
Index: gnome-session/session-properties-capplet.c
===================================================================
RCS file: /cvs/gnome/gnome-session/gnome-session/session-properties-capplet.c,v
retrieving revision 1.33
diff -u -r1.33 session-properties-capplet.c
--- gnome-session/session-properties-capplet.c	24 Aug 2004 12:45:00 -0000	1.33
+++ gnome-session/session-properties-capplet.c	15 Oct 2004 17:41:05 -0000
@@ -68,7 +68,6 @@
 static GtkWidget *capplet;
 static GtkWidget *autosave_button;
 static GtkWidget *logout_prompt_button;
-static GtkWidget *login_splash_button;
 
 static GtkWidget *startup_command_dialog;
 static GtkWidget *session_command_dialog;
@@ -267,16 +266,6 @@
   util_vbox = gtk_vbox_new (FALSE, 0);
   gtk_box_pack_start (GTK_BOX (vbox), util_vbox, FALSE, FALSE, 0);
   gtk_container_set_border_width (GTK_CONTAINER (vbox) , GNOME_PAD);
-  /* Splash screen */
-  a = gtk_alignment_new (0.0, 0.5, 0.0, 0.0);
-  gtk_box_pack_start (GTK_BOX (util_vbox), a, FALSE, FALSE, 0);
-  login_splash_button = gtk_check_button_new_with_mnemonic (_("Show splash screen on _login"));
-  gtk_container_add (GTK_CONTAINER (a), login_splash_button);
-  g_object_set_data (G_OBJECT (login_splash_button), "key", SPLASH_SCREEN_KEY);
-  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (login_splash_button),
-				gconf_client_get_bool (client, SPLASH_SCREEN_KEY, NULL));
-  gconf_client_notify_add (client, SPLASH_SCREEN_KEY, spc_value_notify, login_splash_button, NULL, NULL);
-  g_signal_connect (login_splash_button, "toggled", G_CALLBACK (spc_value_toggled), client);
 
   /* Logout prompt */
   a = gtk_alignment_new (0.0, 0.5, 0.0, 0.0);
Index: gnome-session/util.c
===================================================================
RCS file: /cvs/gnome/gnome-session/gnome-session/util.c,v
retrieving revision 1.3
diff -u -r1.3 util.c
--- gnome-session/util.c	27 Sep 2004 17:48:49 -0000	1.3
+++ gnome-session/util.c	15 Oct 2004 17:41:05 -0000
@@ -8,6 +8,11 @@
 #include <stdio.h>
 #include <string.h>
 
+#include <gdk/gdkcursor.h>
+#include <gdk/gdkdisplay.h>
+#include <gdk/gdkdisplaymanager.h>
+#include <gdk/gdkwindow.h>
+
 static gboolean is_verbose = FALSE;
 static int indent_level = 0;
 
@@ -139,4 +144,19 @@
 			return FALSE;
 
 	return TRUE;
+}
+
+#define DEFAULT_DISPLAY() (gdk_display_manager_get_default_display ( \
+				gdk_display_manager_get ()))
+
+void
+set_gdk_cursor (GdkCursorType type)
+{
+	GdkCursor *cursor;
+
+	cursor = gdk_cursor_new (type);
+	gdk_window_set_cursor (GDK_ROOT_PARENT(), cursor);
+	gdk_cursor_unref (cursor);
+
+	gdk_display_flush (DEFAULT_DISPLAY());
 }
Index: gnome-session/util.h
===================================================================
RCS file: /cvs/gnome/gnome-session/gnome-session/util.h,v
retrieving revision 1.3
diff -u -r1.3 util.h
--- gnome-session/util.h	27 Sep 2004 17:48:49 -0000	1.3
+++ gnome-session/util.h	15 Oct 2004 17:41:05 -0000
@@ -4,6 +4,8 @@
 #include <glib.h>
 #include <stdio.h>
 
+#include <gdk/gdkcursor.h>
+
 void gsm_warning    (const char *format,
                      ...) G_GNUC_PRINTF (1, 2);
 void gsm_fatal      (const char *format,
@@ -18,5 +20,7 @@
 
 gboolean gsm_compare_commands (int argc1, char **argv1,
 			       int argc2, char **argv2);
+
+void set_gdk_cursor (GdkCursorType type);
 
 #endif /* UTIL_H */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]