6611183 xscreensaver needs to put Sun logos in files loaded at runtime
authorMahmood Ali <Mahmood.Ali@Sun.COM>
Tue, 26 Feb 2008 17:17:28 -0800
changeset 336 3d1f724208a5
parent 335 32180fb30fd9
child 337 4d1a5dcaada1
6611183 xscreensaver needs to put Sun logos in files loaded at runtime
open-src/app/xscreensaver/Makefile
open-src/app/xscreensaver/sun-src/driver/lock-Gtk.c
packages/SUNWxwsvr/prototype
--- a/open-src/app/xscreensaver/Makefile	Tue Feb 26 16:11:46 2008 -0800
+++ b/open-src/app/xscreensaver/Makefile	Tue Feb 26 17:17:28 2008 -0800
@@ -2,7 +2,7 @@
 #
 # Xscreensaver Makefile
 #
-# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
+# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
 # Use subject to license terms.
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
@@ -30,7 +30,7 @@
 # or other dealings in this Software without prior written authorization
 # of the copyright holder.
 #
-# @(#)Makefile	1.84	08/02/15
+# @(#)Makefile	1.85	08/02/26
 #
 
 PWD:sh=pwd
@@ -122,6 +122,9 @@
 XS_POT=$(SOURCE_DIR)/po/xscreensaver.pot
 POT_DEST=$(PROTODIR)/usr/X11/share/locale/C/LC_MESSAGES
 
+# Logo images
+LOGO_DEST=$(PROTODIR)/usr/X11/lib/xscreensaver/config
+
 # Man pages
 XS_MAN=$(SOURCE_DIR)/driver/xscreensaver.man.orig
 
@@ -197,4 +200,6 @@
 	 $(MAKE) -e $(XS_MAKE_ENV) install )
 	mkdir -p $(POT_DEST)
 	cp -p $(XS_POT) $(POT_DEST)/xscreensaver.pot
+	mkdir -p $(LOGO_DEST)
+	cp -p driver/*logo.xpm $(LOGO_DEST)
 
--- a/open-src/app/xscreensaver/sun-src/driver/lock-Gtk.c	Tue Feb 26 16:11:46 2008 -0800
+++ b/open-src/app/xscreensaver/sun-src/driver/lock-Gtk.c	Tue Feb 26 17:17:28 2008 -0800
@@ -74,10 +74,6 @@
 #include <atk/atkobject.h>
 
 #include "remote.h"
-#include XPM_LOGO_FILE
-#ifdef TRUSTED_XPM_LOGO_FILE
-# include TRUSTED_XPM_LOGO_FILE
-#endif
 #include "trusted-utils.h"
 
 /* AT-enabled */
@@ -293,13 +289,10 @@
   /* image */
 #ifdef TRUSTED_XPM_LOGO_NAME
   if ( tsol_is_multi_label_session() )
-    pb = gdk_pixbuf_new_from_xpm_data ((const char **)TRUSTED_XPM_LOGO_NAME);
+      image = gtk_image_new_from_file (TRUSTED_XPM_LOGO_FILE);
   else
 #endif      
-    pb = gdk_pixbuf_new_from_xpm_data ((const char **)XPM_LOGO_NAME);
-  image = gtk_image_new_from_pixbuf (pb);
-  g_object_unref (pb);
-
+  image = gtk_image_new_from_file (XPM_LOGO_FILE);
 
   gtk_container_add (GTK_CONTAINER (frame2), image);
 
@@ -548,7 +541,6 @@
   char *s;
   gchar *format_string_locale, *format_string_utf8;
 
-
   /* taken from lock.c */
   char buf[256];
   gchar *utf8_format;
@@ -603,12 +595,11 @@
   /* image */
 #ifdef TRUSTED_XPM_LOGO_NAME
   if ( tsol_is_multi_label_session() )
-    pb = gdk_pixbuf_new_from_xpm_data ((const char **)TRUSTED_XPM_LOGO_NAME);
+    image = gtk_image_new_from_file (TRUSTED_XPM_LOGO_FILE);
   else
 #endif      
-    pb = gdk_pixbuf_new_from_xpm_data ((const char **)XPM_LOGO_NAME);
-  image = gtk_image_new_from_pixbuf (pb);
-  g_object_unref (pb);
+  image = gtk_image_new_from_file (XPM_LOGO_FILE);
+
   gtk_container_add (GTK_CONTAINER (frame), image);
 
   /* progress thing */
@@ -871,8 +862,6 @@
   char *label;
   char* hmsg= (char*) NULL;  /* This is the heading of lock dialog..shows status**/
 
-
-
  read_line:
   status = g_io_channel_read_line (source, &str, NULL, NULL, NULL);
   if (status == G_IO_STATUS_AGAIN)
@@ -963,6 +952,7 @@
 ** is located at password label
 */
       gtk_widget_grab_focus(pwd->passwd_entry);
+      XSync (GDK_DISPLAY(), False);
       }
 
       g_free (str);
--- a/packages/SUNWxwsvr/prototype	Tue Feb 26 16:11:46 2008 -0800
+++ b/packages/SUNWxwsvr/prototype	Tue Feb 26 17:17:28 2008 -0800
@@ -27,7 +27,7 @@
 # of the copyright holder.
 # 
 #
-# ident	"@(#)prototype	1.8	06/08/09 SMI"
+# ident	"@(#)prototype	1.9	08/02/26 SMI"
 #
 # XScreenSaver daemon and utility programs
 
@@ -117,3 +117,5 @@
 f none X11/lib/xscreensaver/config/xscreensaver-demo.glade2 0444 root bin
 !search	     $HOME/share/pixmaps
 f none X11/lib/xscreensaver/config/xscreensaver.xpm 0444 root bin
+f none X11/lib/xscreensaver/config/sunlogo.xpm 0444 root bin
+f none X11/lib/xscreensaver/config/tsunlogo.xpm 0444 root bin