OBS User unknown 2007-08-24 21:49:08 +00:00 committed by Git OBS Bridge
parent 2a8f7ad0df
commit 1bdaf400b3
4 changed files with 135 additions and 72 deletions

View File

@ -0,0 +1,46 @@
--- gnome-session-2.19.6/gnome-session/main.c
+++ gnome-session-2.19.6/gnome-session/main.c
@@ -641,17 +641,6 @@
gconf_client = gsm_get_conf_client ();
gconf_client_add_dir (gconf_client, GSM_GCONF_CONFIG_PREFIX, GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
- env_a_t_support = g_getenv (ACCESSIBILITY_ENV);
- if (env_a_t_support)
- a_t_support = atoi (env_a_t_support);
- else
- a_t_support = gconf_client_get_bool (gconf_client, ACCESSIBILITY_KEY, NULL);
-
- if (a_t_support)
- {
- gsm_assistive_registry_start ();
- gsm_at_set_gtk_modules ();
- }
goption_context = g_option_context_new (N_("- Manage the GNOME session"));
g_option_context_set_translation_domain (goption_context, GETTEXT_PACKAGE);
@@ -670,9 +659,25 @@
exit (1);
}
+/* set up the SESSION_MANAGER environ */
initialize_ice ();
fprintf (stderr, "SESSION_MANAGER=%s\n", g_getenv ("SESSION_MANAGER"));
+
+/* moved here to ensure it gets the SESSION_MANAGER environ */
+ env_a_t_support = g_getenv (ACCESSIBILITY_ENV);
+ if (env_a_t_support)
+ a_t_support = atoi (env_a_t_support);
+ else
+ a_t_support = gconf_client_get_bool (gconf_client, ACCESSIBILITY_KEY, NULL);
+
+ if (a_t_support)
+ {
+ gsm_assistive_registry_start ();
+ gsm_at_set_gtk_modules ();
+ }
+
+
/* Make sure children see the right value for DISPLAY. This is
useful if --display was specified on the command line. */
display_str = gdk_get_display ();

View File

@ -190,7 +190,7 @@
gsm_verbose ("display_gui: showing logout dialog\n");
@@ -387,106 +441,188 @@
@@ -387,106 +441,190 @@
gtk_dialog_set_has_separator (GTK_DIALOG (box), FALSE);
@ -317,82 +317,85 @@
+
+
+ // ============ SHUTDOWN TILE ============
+ //if(panel_power_manager_can_power_down (powerManager))
+ if(gdm_supports_logout_action (GDM_LOGOUT_ACTION_SHUTDOWN))
+ image = NULL;
+ if(gtk_icon_theme_has_icon(iconTheme, "system-shutdown"))
+ {
+ image = NULL;
+ if(gtk_icon_theme_has_icon(iconTheme, "system-shutdown"))
+ {
+ themePixbuf = gtk_icon_theme_load_icon(iconTheme,
+ "system-shutdown", 48, 0, &error);
+ if(themePixbuf != NULL)
+ image = gtk_image_new_from_pixbuf(themePixbuf);
+ else
+ image = NULL;
+ }
+ else if(gtk_icon_theme_has_icon(iconTheme, "gnome-shutdown"))
+ {
+ themePixbuf = gtk_icon_theme_load_icon(iconTheme,
+ "gnome-shutdown", 48, 0, &error);
+ if(themePixbuf != NULL)
+ image = gtk_image_new_from_pixbuf(themePixbuf);
+ else
+ image = NULL;
+ }
+ if(image == NULL)
+ {
+ image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_QUESTION,
+ GTK_ICON_SIZE_DIALOG);
+ }
+ tile = get_tile(image, _("_Shutdown"),
+ _("Ends your session and turns off the computer."));
+ g_signal_connect (G_OBJECT (tile), "clicked",
+ G_CALLBACK (shutdown_button_clicked), box);
+
+ gtk_box_pack_start (GTK_BOX (vbox), tile, TRUE, TRUE, 0);
+ gtk_widget_show_all(tile);
+ themePixbuf = gtk_icon_theme_load_icon(iconTheme,
+ "system-shutdown", 48, 0, &error);
+ if(themePixbuf != NULL)
+ image = gtk_image_new_from_pixbuf(themePixbuf);
+ else
+ image = NULL;
+ }
+ else if(gtk_icon_theme_has_icon(iconTheme, "gnome-shutdown"))
+ {
+ themePixbuf = gtk_icon_theme_load_icon(iconTheme,
+ "gnome-shutdown", 48, 0, &error);
+ if(themePixbuf != NULL)
+ image = gtk_image_new_from_pixbuf(themePixbuf);
+ else
+ image = NULL;
+ }
+ if(image == NULL)
+ {
+ image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_QUESTION,
+ GTK_ICON_SIZE_DIALOG);
+ }
+ tile = get_tile(image, _("_Shutdown"),
+ _("Ends your session and turns off the computer."));
+ g_signal_connect (G_OBJECT (tile), "clicked",
+ G_CALLBACK (shutdown_button_clicked), box);
+
+ //if(panel_power_manager_can_power_down (powerManager))
+ if(!gdm_supports_logout_action (GDM_LOGOUT_ACTION_SHUTDOWN))
+ {
+ gtk_widget_set_sensitive(tile, FALSE);
+ }
+
+ gtk_box_pack_start (GTK_BOX (vbox), tile, TRUE, TRUE, 0);
+ gtk_widget_show_all(tile);
+
+
+
+ // ============ RESTART TILE ============
+ //if(panel_power_manager_can_power_down (powerManager))
+ if(gdm_supports_logout_action (GDM_LOGOUT_ACTION_REBOOT))
+ image = NULL;
+ if(gtk_icon_theme_has_icon(iconTheme, "stock_refresh"))
+ {
+ image = NULL;
+ if(gtk_icon_theme_has_icon(iconTheme, "stock_refresh"))
+ {
+ themePixbuf = gtk_icon_theme_load_icon(iconTheme,
+ "stock_refresh", 48, 0, &error);
+ if(themePixbuf != NULL)
+ image = gtk_image_new_from_pixbuf(themePixbuf);
+ else
+ image = NULL;
+ }
+ else if(gtk_icon_theme_has_icon(iconTheme, "gnome-reboot"))
+ {
+ themePixbuf = gtk_icon_theme_load_icon(iconTheme,
+ "gnome-reboot", 48, 0, &error);
+ if(themePixbuf != NULL)
+ image = gtk_image_new_from_pixbuf(themePixbuf);
+ else
+ image = NULL;
+ }
+ if(image == NULL)
+ {
+ image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_QUESTION,
+ GTK_ICON_SIZE_DIALOG);
+ }
+ tile = get_tile(image, _("_Restart"),
+ _("Ends your session and restarts the computer."));
+ g_signal_connect (G_OBJECT (tile), "clicked",
+ G_CALLBACK (restart_button_clicked), box);
+ themePixbuf = gtk_icon_theme_load_icon(iconTheme,
+ "stock_refresh", 48, 0, &error);
+ if(themePixbuf != NULL)
+ image = gtk_image_new_from_pixbuf(themePixbuf);
+ else
+ image = NULL;
+ }
+ else if(gtk_icon_theme_has_icon(iconTheme, "gnome-reboot"))
+ {
+ themePixbuf = gtk_icon_theme_load_icon(iconTheme,
+ "gnome-reboot", 48, 0, &error);
+ if(themePixbuf != NULL)
+ image = gtk_image_new_from_pixbuf(themePixbuf);
+ else
+ image = NULL;
+ }
+ if(image == NULL)
+ {
+ image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_QUESTION,
+ GTK_ICON_SIZE_DIALOG);
+ }
+ tile = get_tile(image, _("_Restart"),
+ _("Ends your session and restarts the computer."));
+ g_signal_connect (G_OBJECT (tile), "clicked",
+ G_CALLBACK (restart_button_clicked), box);
+
+ gtk_box_pack_start (GTK_BOX (vbox), tile, TRUE, TRUE, 0);
+ gtk_widget_show_all(tile);
+ //if(panel_power_manager_can_power_down (powerManager))
+ if(!gdm_supports_logout_action (GDM_LOGOUT_ACTION_REBOOT))
+ {
+ gtk_widget_set_sensitive(tile, FALSE);
+ }
- gtk_container_set_border_width (GTK_CONTAINER (box), 5);
+ gtk_box_pack_start (GTK_BOX (vbox), tile, TRUE, TRUE, 0);
+ gtk_widget_show_all(tile);
- if (!autosave)
- {
@ -441,9 +444,6 @@
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (r), (selected_option == OPTION_LOGOUT));
- gtk_box_pack_start (GTK_BOX (action_vbox), r, FALSE, FALSE, 0);
- gtk_widget_show (r);
+ gtk_dialog_set_default_response (GTK_DIALOG (box),
+ GTK_RESPONSE_CANCEL);
+
- if (halt_supported)
- {
@ -452,6 +452,8 @@
- gtk_box_pack_start (GTK_BOX (action_vbox), r, FALSE, FALSE, 0);
- gtk_widget_show (r);
- }
+ gtk_dialog_set_default_response (GTK_DIALOG (box),
+ GTK_RESPONSE_CANCEL);
- if (reboot_supported)
- {
@ -471,7 +473,7 @@
gsm_center_window_on_screen (GTK_WINDOW (box), screen, monitor);
@@ -518,27 +654,6 @@
@@ -518,27 +656,6 @@
response = gtk_dialog_run (GTK_DIALOG (box));
@ -499,7 +501,7 @@
gtk_widget_destroy (box);
gtk_widget_destroy (invisible);
@@ -558,62 +673,62 @@
@@ -558,62 +675,62 @@
}
switch (response) {

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Fri Aug 24 19:21:14 CEST 2007 - cgaisford@novell.com
- Changed logout UI to always show options but to disable them
if they are not available. Fix for Novell Bug 238299
- Included patch to fix up load time that is pending review
upstream. I'll add it to the spec file once approved
-------------------------------------------------------------------
Tue Aug 7 22:04:37 CEST 2007 - maw@suse.de

View File

@ -16,7 +16,7 @@ BuildRequires: CASA-devel control-center2-devel fdupes gnome-common gnome-deskt
License: GPL v2 or later, LGPL v2 or later
Group: System/GUI/GNOME
Version: 2.19.6
Release: 6
Release: 14
Summary: Session Tools for the GNOME 2.x Desktop
Source: %{name}-%{version}.tar.bz2
Source1: gnome
@ -57,6 +57,7 @@ Patch11: gnome-session-migrate-session-manual.patch
Patch12: gnome-session-wm-switch.patch
Patch13: gnome-session-no-devel-fatals.patch
Patch14: gnome-session-tile-ui.patch
Patch15: gnome-session-main-init.patch
URL: http://www.gnome.org
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Autoreqprov: on
@ -105,6 +106,7 @@ gnome-patch-translation-prepare
%patch12
%patch13
%patch14 -p1
#%patch15 -p1
%endif
gnome-patch-translation-update
@ -159,6 +161,11 @@ rm -rf $RPM_BUILD_ROOT
%files lang -f %{name}-2.0.lang
%changelog
* Fri Aug 24 2007 - cgaisford@novell.com
- Changed logout UI to always show options but to disable them
if they are not available. Fix for Novell Bug 238299
- Included patch to fix up load time that is pending review
upstream. I'll add it to the spec file once approved
* Tue Aug 07 2007 - maw@suse.de
- Use %%fdupes
- Split off a -lang subpackage.