Mailinglist Archive: opensuse-commit (2092 mails)

< Previous Next >
commit libssui
  • From: root@xxxxxxxxxxxxxxx (h_root)
  • Date: Fri, 24 Aug 2007 23:03:41 +0200
  • Message-id: <20070824210342.1D4E067832C@xxxxxxxxxxxxxxx>

Hello community,

here is the log from the commit of package libssui
checked in at Fri Aug 24 23:03:41 CEST 2007.

--------
--- GNOME/libssui/libssui.changes       2007-08-19 06:08:22.000000000 +0200
+++ /mounts/work_src_done/STABLE/libssui/libssui.changes        2007-08-24 19:25:26.083295000 +0200
@@ -1,0 +2,6 @@
+Fri Aug 24 19:24:27 CEST 2007 - cgaisford@xxxxxxxxxx
+
+- Changed logout UI to always show options but to disable them
+  if they are not available.  Fix for Novell Bug 238299
+
+-------------------------------------------------------------------

New:
----
  libssui-missing-options.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libssui.spec ++++++
--- /var/tmp/diff_new_pack.a25983/_old  2007-08-24 23:02:13.000000000 +0200
+++ /var/tmp/diff_new_pack.a25983/_new  2007-08-24 23:02:13.000000000 +0200
@@ -16,11 +16,12 @@
 Group:          System/GUI/GNOME
 Autoreqprov:    on
 Version:        0.5.7
-Release:        1
+Release:        5
 Summary:        Session UI for SLED
 Source:         libssui-%{version}.tar.gz
 Source1:        libssui-po.tar.bz2
 Patch0:         libssui-linguas.patch
+Patch1:         libssui-missing-options.patch
 URL:            http://code.google.com/p/libssui/
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 PreReq:         filesystem gconf2
@@ -57,6 +58,7 @@
 %prep
 %setup -n libssui-%{version} -a 1
 %patch0
+%patch1 -p1
 
 %build
 autoreconf -f -i
@@ -99,6 +101,9 @@
 %{_prefix}/include/libssui/*
 
 %changelog
+* Fri Aug 24 2007 - cgaisford@xxxxxxxxxx
+- Changed logout UI to always show options but to disable them
+  if they are not available.  Fix for Novell Bug 238299
 * Sun Aug 19 2007 - cgaisford@xxxxxxxxxx
 - Removed shsh.patch as it's included in tarball now
 - Updated sources from gnome-session, fusa, and power-manager dbus

++++++ libssui-missing-options.patch ++++++
--- libssui-0.5.7/src/logout-dialog.c
+++ libssui-0.5.7/src/logout-dialog.c
@@ -190,7 +190,6 @@
 //     GdkWindow       *parent;
        int monitor = 0;
        int selected_option;
-       gboolean        haveOption = FALSE;
 
        //      gsm_verbose ("display_gui: showing logout dialog\n");
 
@@ -257,7 +256,6 @@
 
        if(dlg_option & SSUI_OPTION_LOGOUT)
        {
-               haveOption = TRUE;
                image = NULL;
                if(gtk_icon_theme_has_icon(iconTheme, "system-log-out"))
                {
@@ -295,7 +293,6 @@
 
        if(dlg_option & SSUI_OPTION_LOCK)
        {
-               haveOption = TRUE;
                image = NULL;
                if(gtk_icon_theme_has_icon(iconTheme, "system-lock-screen"))
                {
@@ -333,150 +330,154 @@
 
        if(dlg_option & SSUI_OPTION_SHUTDOWN)
        {
-               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 = ssui_get_tile(image, _("_Shutdown"),
-                                       _("Ends your session and turns off the computer."));
-                       g_signal_connect (G_OBJECT (tile), "clicked",
-                                       G_CALLBACK (shutdown_button_clicked), logoutDlg);
+                       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 = ssui_get_tile(image, _("_Shutdown"),
+                               _("Ends your session and turns off the computer."));
+               g_signal_connect (G_OBJECT (tile), "clicked",
+                               G_CALLBACK (shutdown_button_clicked), logoutDlg);
 
-                       gtk_box_pack_start (GTK_BOX (vbox), tile, TRUE, TRUE, 0);
-                       gtk_widget_show_all(tile);
+               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);
        }
 
 
 
        if(dlg_option & SSUI_OPTION_RESTART)
        {
-               if(gdm_supports_logout_action (GDM_LOGOUT_ACTION_REBOOT))
+               image = NULL;
+               if(gtk_icon_theme_has_icon(iconTheme, "stock_refresh"))
                {
-                       haveOption = TRUE;
-                       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 = ssui_get_tile(image, _("_Restart"),
-                                       _("Ends your session and restarts the computer."));
-                       g_signal_connect (G_OBJECT (tile), "clicked",
-                                       G_CALLBACK (restart_button_clicked), logoutDlg);
+                       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 = ssui_get_tile(image, _("_Restart"),
+                               _("Ends your session and restarts the computer."));
+               g_signal_connect (G_OBJECT (tile), "clicked",
+                               G_CALLBACK (restart_button_clicked), logoutDlg);
 
-                       gtk_box_pack_start (GTK_BOX (vbox), tile, TRUE, TRUE, 0);
-                       gtk_widget_show_all(tile);
+               if(!gdm_supports_logout_action (GDM_LOGOUT_ACTION_REBOOT))
+               {
+                       gtk_widget_set_sensitive(tile, FALSE);
                }
+
+               gtk_box_pack_start (GTK_BOX (vbox), tile, TRUE, TRUE, 0);
+               gtk_widget_show_all(tile);
        }
 
 
 
        if(dlg_option & SSUI_OPTION_SLEEP)
        {
-               if(panel_power_manager_can_suspend(powerManager))
+               image = NULL;
+               if(gtk_icon_theme_has_icon(iconTheme, "sleep"))
                {
-                       haveOption = TRUE;
-                       image = NULL;
-                       if(gtk_icon_theme_has_icon(iconTheme, "sleep"))
-                       {
-                               themePixbuf = gtk_icon_theme_load_icon(iconTheme,
-                                               "sleep", 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 = ssui_get_tile(image, _("Slee_p"),
-                                       _("Suspends your session quickly, using minimal power while the computer stands by."));
-                       g_signal_connect (G_OBJECT (tile), "clicked",
-                                       G_CALLBACK (sleep_button_clicked), logoutDlg);
+                       themePixbuf = gtk_icon_theme_load_icon(iconTheme,
+                                       "sleep", 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 = ssui_get_tile(image, _("Slee_p"),
+                               _("Suspends your session quickly, using minimal power while the computer stands by."));
+               g_signal_connect (G_OBJECT (tile), "clicked",
+                               G_CALLBACK (sleep_button_clicked), logoutDlg);
 
-                       gtk_box_pack_start (GTK_BOX (vbox), tile, TRUE, TRUE, 0);
-                       gtk_widget_show_all(tile);
+               if(!panel_power_manager_can_suspend(powerManager))
+               {
+                       gtk_widget_set_sensitive(tile, FALSE);
                }
+
+               gtk_box_pack_start (GTK_BOX (vbox), tile, TRUE, TRUE, 0);
+               gtk_widget_show_all(tile);
        }
 
 
        if(dlg_option & SSUI_OPTION_HIBERNATE)
        {
-               if(panel_power_manager_can_hibernate(powerManager))
+               image = NULL;
+               if(gtk_icon_theme_has_icon(iconTheme, "drive-harddisk"))
                {
-                       haveOption = TRUE;
-                       image = NULL;
-                       if(gtk_icon_theme_has_icon(iconTheme, "drive-harddisk"))
-                       {
-                               themePixbuf = gtk_icon_theme_load_icon(iconTheme,
-                                               "drive-harddisk", 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 = ssui_get_tile(image, _("Hi_bernate"),
-                                       _("Suspends your session, using no power until the computer is restarted."));
-                       g_signal_connect (G_OBJECT (tile), "clicked",
-                                       G_CALLBACK (hibernate_button_clicked), logoutDlg);
+                       themePixbuf = gtk_icon_theme_load_icon(iconTheme,
+                                       "drive-harddisk", 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 = ssui_get_tile(image, _("Hi_bernate"),
+                               _("Suspends your session, using no power until the computer is restarted."));
+               g_signal_connect (G_OBJECT (tile), "clicked",
+                               G_CALLBACK (hibernate_button_clicked), logoutDlg);
 
-                       gtk_box_pack_start (GTK_BOX (vbox), tile, TRUE, TRUE, 0);
-                       gtk_widget_show_all(tile);
+               if(!panel_power_manager_can_hibernate(powerManager))
+               {
+                       gtk_widget_set_sensitive(tile, FALSE);
                }
+
+               gtk_box_pack_start (GTK_BOX (vbox), tile, TRUE, TRUE, 0);
+               gtk_widget_show_all(tile);
        }
 
 
        if(dlg_option & SSUI_OPTION_SWITCH)
        {
-               haveOption = TRUE;
                image = NULL;
                if(gtk_icon_theme_has_icon(iconTheme, "config-users"))
                {
@@ -551,12 +552,7 @@
        do
        {
 
-       // if there are any options available to display above, show the 
-       // dialog, otherwise don't show it at all
-       if(haveOption) 
-               response = gtk_dialog_run (GTK_DIALOG (logoutDlg));
-       else
-               response = GTK_RESPONSE_CANCEL;
+       response = gtk_dialog_run (GTK_DIALOG (logoutDlg));
 
        showDialog = FALSE;
 

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Remember to have fun...

---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread