? depcomp ? stamp-h1 Index: gnome-session/main.c =================================================================== RCS file: /cvs/gnome/gnome-session/gnome-session/main.c,v retrieving revision 1.67 diff -u -p -r1.67 main.c --- gnome-session/main.c 25 Jul 2005 07:13:53 -0000 1.67 +++ gnome-session/main.c 18 Aug 2005 11:08:30 -0000 @@ -313,6 +313,29 @@ gsm_shutdown_gconfd (void) g_free (command); } +static gboolean +display_message_of_the_day (gpointer data) +{ + GtkWidget *dialog; + gchar *contents; + gsize length; + + if (g_file_get_contents ("/etc/motd", &contents, &length, NULL)) + { + if (length > 0) + { + dialog = gtk_message_dialog_new_with_markup (NULL, 0, GTK_MESSAGE_INFO, GTK_BUTTONS_CLOSE, + "%s\n%s", + _("Message of the Day"), contents); + g_signal_connect (G_OBJECT (dialog), "response", G_CALLBACK (gtk_widget_destroy), NULL); + gtk_widget_show (dialog); + } + g_free (contents); + } + + return FALSE; +} + int main (int argc, char *argv[]) { @@ -460,6 +483,8 @@ main (int argc, char *argv[]) if (a_t_support) /* the ATs are happier if the session has started */ gsm_assistive_technologies_start (); + + g_timeout_add (5000, (GSourceFunc) display_message_of_the_day, NULL); gtk_main ();