patches/gnome-session-02-gnome-about.diff
author niall
Wed, 02 Jul 2008 08:47:37 +0000
changeset 12752 7a38a411c0be
child 13029 4be2c81a1c27
permissions -rw-r--r--
2008-07-02 Niall Power <[email protected]> * base-specs/gnome-session.spec: Collapse patch numbers, bump remaining unported trusted-extensions patch to end of list. * patches/gnome-session-02-logout-effect.diff: Remove since session manager doesn't do logout effects anymore. * patches/gnome-session-03-wait-for-postrun.diff: Refactor to apply cleanly for both --with-sun-branding and --with-indiana- branding options.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12752
7a38a411c0be 2008-07-02 Niall Power <[email protected]>
niall
parents:
diff changeset
     1
--- gnome-session-2.23.4/gnome-session/gsm.h-orig	2008-06-19 15:12:05.273155000 -0500
7a38a411c0be 2008-07-02 Niall Power <[email protected]>
niall
parents:
diff changeset
     2
+++ gnome-session-2.23.4/gnome-session/gsm.h	2008-06-19 15:12:29.015042000 -0500
7a38a411c0be 2008-07-02 Niall Power <[email protected]>
niall
parents:
diff changeset
     3
@@ -4,6 +4,9 @@
7a38a411c0be 2008-07-02 Niall Power <[email protected]>
niall
parents:
diff changeset
     4
 #define GSM_GCONF_DEFAULT_SESSION_KEY           "/desktop/gnome/session/default-session"
7a38a411c0be 2008-07-02 Niall Power <[email protected]>
niall
parents:
diff changeset
     5
 #define GSM_GCONF_REQUIRED_COMPONENTS_DIRECTORY "/desktop/gnome/session/required-components"
7a38a411c0be 2008-07-02 Niall Power <[email protected]>
niall
parents:
diff changeset
     6
 
7a38a411c0be 2008-07-02 Niall Power <[email protected]>
niall
parents:
diff changeset
     7
+/* Start gnome-about on first-time startup */
7a38a411c0be 2008-07-02 Niall Power <[email protected]>
niall
parents:
diff changeset
     8
+#define ABOUT_PROMPT_KEY                        "/desktop/gnome/session/sun_extensions/viewed_about_jds_three"
7a38a411c0be 2008-07-02 Niall Power <[email protected]>
niall
parents:
diff changeset
     9
+
7a38a411c0be 2008-07-02 Niall Power <[email protected]>
niall
parents:
diff changeset
    10
 void gsm_initialization_error (gboolean fatal, const char *format, ...);
7a38a411c0be 2008-07-02 Niall Power <[email protected]>
niall
parents:
diff changeset
    11
 
7a38a411c0be 2008-07-02 Niall Power <[email protected]>
niall
parents:
diff changeset
    12
 extern GsmSession *global_session;
7a38a411c0be 2008-07-02 Niall Power <[email protected]>
niall
parents:
diff changeset
    13
--- gnome-session-2.23.4/gnome-session/main.c-orig	2008-06-19 16:26:15.033705000 -0500
7a38a411c0be 2008-07-02 Niall Power <[email protected]>
niall
parents:
diff changeset
    14
+++ gnome-session-2.23.4/gnome-session/main.c	2008-06-19 16:34:42.940141000 -0500
7a38a411c0be 2008-07-02 Niall Power <[email protected]>
niall
parents:
diff changeset
    15
@@ -37,6 +37,21 @@ static GOptionEntry entries[] = {
7a38a411c0be 2008-07-02 Niall Power <[email protected]>
niall
parents:
diff changeset
    16
   { NULL, 0, 0, 0, NULL, NULL, NULL }
7a38a411c0be 2008-07-02 Niall Power <[email protected]>
niall
parents:
diff changeset
    17
 };
7a38a411c0be 2008-07-02 Niall Power <[email protected]>
niall
parents:
diff changeset
    18
 
7a38a411c0be 2008-07-02 Niall Power <[email protected]>
niall
parents:
diff changeset
    19
+static gint
7a38a411c0be 2008-07-02 Niall Power <[email protected]>
niall
parents:
diff changeset
    20
+show_gnome_about (gpointer data)
7a38a411c0be 2008-07-02 Niall Power <[email protected]>
niall
parents:
diff changeset
    21
+{
7a38a411c0be 2008-07-02 Niall Power <[email protected]>
niall
parents:
diff changeset
    22
+  int status;
7a38a411c0be 2008-07-02 Niall Power <[email protected]>
niall
parents:
diff changeset
    23
+
7a38a411c0be 2008-07-02 Niall Power <[email protected]>
niall
parents:
diff changeset
    24
+  if (g_spawn_command_line_async("gnome-about", NULL))
7a38a411c0be 2008-07-02 Niall Power <[email protected]>
niall
parents:
diff changeset
    25
+    {
7a38a411c0be 2008-07-02 Niall Power <[email protected]>
niall
parents:
diff changeset
    26
+      GConfClient *gconf_client = gconf_client_get_default ();
7a38a411c0be 2008-07-02 Niall Power <[email protected]>
niall
parents:
diff changeset
    27
+      gconf_client_set_bool (gconf_client, ABOUT_PROMPT_KEY, TRUE, NULL);
7a38a411c0be 2008-07-02 Niall Power <[email protected]>
niall
parents:
diff changeset
    28
+      g_object_unref (gconf_client);
7a38a411c0be 2008-07-02 Niall Power <[email protected]>
niall
parents:
diff changeset
    29
+    }
7a38a411c0be 2008-07-02 Niall Power <[email protected]>
niall
parents:
diff changeset
    30
+
7a38a411c0be 2008-07-02 Niall Power <[email protected]>
niall
parents:
diff changeset
    31
+  return FALSE;
7a38a411c0be 2008-07-02 Niall Power <[email protected]>
niall
parents:
diff changeset
    32
+}
7a38a411c0be 2008-07-02 Niall Power <[email protected]>
niall
parents:
diff changeset
    33
+
7a38a411c0be 2008-07-02 Niall Power <[email protected]>
niall
parents:
diff changeset
    34
 /**
7a38a411c0be 2008-07-02 Niall Power <[email protected]>
niall
parents:
diff changeset
    35
  * gsm_initialization_error:
7a38a411c0be 2008-07-02 Niall Power <[email protected]>
niall
parents:
diff changeset
    36
  * @fatal: whether or not the error is fatal to the login session
7a38a411c0be 2008-07-02 Niall Power <[email protected]>
niall
parents:
diff changeset
    37
@@ -94,6 +109,8 @@ main (int argc, char **argv)
7a38a411c0be 2008-07-02 Niall Power <[email protected]>
niall
parents:
diff changeset
    38
   char *display_str;
7a38a411c0be 2008-07-02 Niall Power <[email protected]>
niall
parents:
diff changeset
    39
   Display *xdisp;
7a38a411c0be 2008-07-02 Niall Power <[email protected]>
niall
parents:
diff changeset
    40
   GdkDisplay *gdisp;
7a38a411c0be 2008-07-02 Niall Power <[email protected]>
niall
parents:
diff changeset
    41
+  gboolean show_about;
7a38a411c0be 2008-07-02 Niall Power <[email protected]>
niall
parents:
diff changeset
    42
+  GConfClient *gconf_client;
7a38a411c0be 2008-07-02 Niall Power <[email protected]>
niall
parents:
diff changeset
    43
 
7a38a411c0be 2008-07-02 Niall Power <[email protected]>
niall
parents:
diff changeset
    44
   bindtextdomain (GETTEXT_PACKAGE, LOCALE_DIR);
7a38a411c0be 2008-07-02 Niall Power <[email protected]>
niall
parents:
diff changeset
    45
   bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
7a38a411c0be 2008-07-02 Niall Power <[email protected]>
niall
parents:
diff changeset
    46
@@ -143,6 +160,18 @@ main (int argc, char **argv)
7a38a411c0be 2008-07-02 Niall Power <[email protected]>
niall
parents:
diff changeset
    47
 
7a38a411c0be 2008-07-02 Niall Power <[email protected]>
niall
parents:
diff changeset
    48
   gsm_session_start (global_session);
7a38a411c0be 2008-07-02 Niall Power <[email protected]>
niall
parents:
diff changeset
    49
 
7a38a411c0be 2008-07-02 Niall Power <[email protected]>
niall
parents:
diff changeset
    50
+  gconf_client = gconf_client_get_default ();
7a38a411c0be 2008-07-02 Niall Power <[email protected]>
niall
parents:
diff changeset
    51
+  show_about = gconf_client_get_bool (gconf_client, ABOUT_PROMPT_KEY, NULL);
7a38a411c0be 2008-07-02 Niall Power <[email protected]>
niall
parents:
diff changeset
    52
+
7a38a411c0be 2008-07-02 Niall Power <[email protected]>
niall
parents:
diff changeset
    53
+#ifndef HAVE_XTSOL
7a38a411c0be 2008-07-02 Niall Power <[email protected]>
niall
parents:
diff changeset
    54
+  if (! show_about)
7a38a411c0be 2008-07-02 Niall Power <[email protected]>
niall
parents:
diff changeset
    55
+    gtk_timeout_add (4000, show_gnome_about, NULL);
7a38a411c0be 2008-07-02 Niall Power <[email protected]>
niall
parents:
diff changeset
    56
+#else
7a38a411c0be 2008-07-02 Niall Power <[email protected]>
niall
parents:
diff changeset
    57
+  if (! trusted_session)
7a38a411c0be 2008-07-02 Niall Power <[email protected]>
niall
parents:
diff changeset
    58
+    if (! show_about)
7a38a411c0be 2008-07-02 Niall Power <[email protected]>
niall
parents:
diff changeset
    59
+      gtk_timeout_add (4000, show_gnome_about, NULL);
7a38a411c0be 2008-07-02 Niall Power <[email protected]>
niall
parents:
diff changeset
    60
+#endif
7a38a411c0be 2008-07-02 Niall Power <[email protected]>
niall
parents:
diff changeset
    61
+
7a38a411c0be 2008-07-02 Niall Power <[email protected]>
niall
parents:
diff changeset
    62
   gtk_main ();
7a38a411c0be 2008-07-02 Niall Power <[email protected]>
niall
parents:
diff changeset
    63
 
7a38a411c0be 2008-07-02 Niall Power <[email protected]>
niall
parents:
diff changeset
    64
   gsm_xsmp_shutdown ();