diff options
author | Andreas Proschofsky <suka@gentoo.org> | 2008-01-31 14:44:19 +0000 |
---|---|---|
committer | Andreas Proschofsky <suka@gentoo.org> | 2008-01-31 14:44:19 +0000 |
commit | fce8deedc2b6b4a2ca3e0db635ad084fee55af7c (patch) | |
tree | a208a57ff3d7fa9bb09e275357dbe6d0eef7f1f0 /gnome-extra | |
parent | Update gnome-main-menu to work with recent gnome development versions (diff) | |
download | suka-fce8deedc2b6b4a2ca3e0db635ad084fee55af7c.tar.gz suka-fce8deedc2b6b4a2ca3e0db635ad084fee55af7c.tar.bz2 suka-fce8deedc2b6b4a2ca3e0db635ad084fee55af7c.zip |
some more fixes for libssui
svn path=/; revision=42
Diffstat (limited to 'gnome-extra')
-rw-r--r-- | gnome-extra/libssui/files/libssui-missing-options.patch | 305 | ||||
-rw-r--r-- | gnome-extra/libssui/files/libssui-pm-dbus.patch (renamed from gnome-extra/libssui/files/libssui-gpm-update.patch) | 11 | ||||
-rw-r--r-- | gnome-extra/libssui/files/libssui-wrong-icon.patch | 26 | ||||
-rw-r--r-- | gnome-extra/libssui/libssui-0.5.7.ebuild | 5 |
4 files changed, 339 insertions, 8 deletions
diff --git a/gnome-extra/libssui/files/libssui-missing-options.patch b/gnome-extra/libssui/files/libssui-missing-options.patch new file mode 100644 index 0000000..7f415bf --- /dev/null +++ b/gnome-extra/libssui/files/libssui-missing-options.patch @@ -0,0 +1,305 @@ +--- 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; + diff --git a/gnome-extra/libssui/files/libssui-gpm-update.patch b/gnome-extra/libssui/files/libssui-pm-dbus.patch index eb4b3aa..1caee60 100644 --- a/gnome-extra/libssui/files/libssui-gpm-update.patch +++ b/gnome-extra/libssui/files/libssui-pm-dbus.patch @@ -1,5 +1,5 @@ ---- src/gnome-session-code/panel-power-manager.c -+++ src/gnome-session-code/panel-power-manager.c +--- src/gnome-session-code/panel-power-manager.c ++++ src/gnome-session-code/panel-power-manager.c @@ -129,7 +129,7 @@ const char *new_owner, PanelPowerManager *manager) @@ -22,26 +22,23 @@ &connection_error); if (manager->priv->gpm_proxy == NULL) { -@@ -324,8 +324,8 @@ +@@ -324,8 +324,7 @@ } can_suspend = FALSE; -// if (!dbus_g_proxy_call (manager->priv->gpm_proxy, "CanSuspend", - if (!dbus_g_proxy_call (manager->priv->gpm_proxy, "AllowedSuspend", -+// if (!dbus_g_proxy_call (manager->priv->gpm_proxy, "AllowedSuspend", + if (!dbus_g_proxy_call (manager->priv->gpm_proxy, "CanSuspend", &error, G_TYPE_INVALID, G_TYPE_BOOLEAN, &can_suspend, G_TYPE_INVALID)) { -@@ -356,8 +356,8 @@ +@@ -356,8 +355,7 @@ } can_hibernate = FALSE; -// if (!dbus_g_proxy_call (manager->priv->gpm_proxy, "CanHibernate", - if (!dbus_g_proxy_call (manager->priv->gpm_proxy, "AllowedHibernate", -+// if (!dbus_g_proxy_call (manager->priv->gpm_proxy, "AllowedHibernate", + if (!dbus_g_proxy_call (manager->priv->gpm_proxy, "CanHibernate", &error, G_TYPE_INVALID, G_TYPE_BOOLEAN, &can_hibernate, G_TYPE_INVALID)) { - diff --git a/gnome-extra/libssui/files/libssui-wrong-icon.patch b/gnome-extra/libssui/files/libssui-wrong-icon.patch new file mode 100644 index 0000000..1bcc87b --- /dev/null +++ b/gnome-extra/libssui/files/libssui-wrong-icon.patch @@ -0,0 +1,26 @@ +--- src/logout-dialog.c ++++ src/logout-dialog.c +@@ -331,19 +331,19 @@ + if(dlg_option & SSUI_OPTION_SHUTDOWN) + { + image = NULL; +- if(gtk_icon_theme_has_icon(iconTheme, "system-shutdown")) ++ if(gtk_icon_theme_has_icon(iconTheme, "gnome-shutdown")) + { + themePixbuf = gtk_icon_theme_load_icon(iconTheme, +- "system-shutdown", 48, 0, &error); ++ "gnome-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")) ++ else if(gtk_icon_theme_has_icon(iconTheme, "system-shutdown")) + { + themePixbuf = gtk_icon_theme_load_icon(iconTheme, +- "gnome-shutdown", 48, 0, &error); ++ "system-shutdown", 48, 0, &error); + if(themePixbuf != NULL) + image = gtk_image_new_from_pixbuf(themePixbuf); + else diff --git a/gnome-extra/libssui/libssui-0.5.7.ebuild b/gnome-extra/libssui/libssui-0.5.7.ebuild index 2cc2f9f..5b06b86 100644 --- a/gnome-extra/libssui/libssui-0.5.7.ebuild +++ b/gnome-extra/libssui/libssui-0.5.7.ebuild @@ -25,6 +25,9 @@ src_unpack() { gnome2_src_unpack # Update to newer dbus calls from GNOME Power Manager - epatch ${FILESDIR}/${PN}-gpm-update.patch + epatch ${FILESDIR}/${PN}-pm-dbus.patch + epatch ${FILESDIR}/${PN}-missing-options.patch + epatch ${FILESDIR}/${PN}-wrong-icon.patch + } |