[Xfce4-commits] <ristretto:master> Check if a supported desktop-manager (xfdesktop) is running, and set the set-wallpaper button sensitivity based on that. Update ChangeLog
Stephan Arts
noreply at xfce.org
Sat Oct 3 11:28:02 CEST 2009
Updating branch refs/heads/master
to c2e33860a30b9c1d58fc69fc1827455cda3d2eb3 (commit)
from b581b8307ba0df8fd69a1518c5a4c4a76d8046cb (commit)
commit c2e33860a30b9c1d58fc69fc1827455cda3d2eb3
Author: Stephan Arts <stephan at xfce.org>
Date: Sat Oct 3 11:24:58 2009 +0200
Check if a supported desktop-manager (xfdesktop) is running, and set the set-wallpaper button sensitivity based on that.
Update ChangeLog
ChangeLog | 7 +++++++
src/main_window.c | 11 +++++++++--
2 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index d6543b8..c624518 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-10-03 Stephan Arts <stephan at xfce.org>
+
+ * src/main_window.c: Check if a desktop-manager is running before making
+ the set-wallpaper button sensitive
+ * src/Makefile.am: Replace spaces with tabs, fixes compilation-issues
+ with certain versions of automake
+
2009-09-27 Stephan Arts <stephan at xfce.org>
* src/preferences_dialog.c: Add option to load all images in a
diff --git a/src/main_window.c b/src/main_window.c
index 983c716..15aea93 100644
--- a/src/main_window.c
+++ b/src/main_window.c
@@ -903,7 +903,10 @@ rstto_main_window_update_buttons (RsttoMainWindow *window)
/* View Menu */
- gtk_widget_set_sensitive (gtk_ui_manager_get_widget (window->priv->ui_manager, "/main-menu/view-menu/set-as-wallpaper"), TRUE);
+ if (rstto_wallpaper_manager_check_running (window->priv->wallpaper_manager))
+ {
+ gtk_widget_set_sensitive (gtk_ui_manager_get_widget (window->priv->ui_manager, "/main-menu/view-menu/set-as-wallpaper"), TRUE);
+ }
gtk_widget_set_sensitive (gtk_ui_manager_get_widget (window->priv->ui_manager, "/main-menu/view-menu/zoom-menu"), TRUE);
gtk_widget_set_sensitive (gtk_ui_manager_get_widget (window->priv->ui_manager, "/main-menu/view-menu/rotation-menu"), TRUE);
@@ -946,7 +949,10 @@ rstto_main_window_update_buttons (RsttoMainWindow *window)
/* View Menu */
- gtk_widget_set_sensitive (gtk_ui_manager_get_widget (window->priv->ui_manager, "/main-menu/view-menu/set-as-wallpaper"), TRUE);
+ if (rstto_wallpaper_manager_check_running (window->priv->wallpaper_manager))
+ {
+ gtk_widget_set_sensitive (gtk_ui_manager_get_widget (window->priv->ui_manager, "/main-menu/view-menu/set-as-wallpaper"), TRUE);
+ }
gtk_widget_set_sensitive (gtk_ui_manager_get_widget (window->priv->ui_manager, "/main-menu/view-menu/zoom-menu"), TRUE);
gtk_widget_set_sensitive (gtk_ui_manager_get_widget (window->priv->ui_manager, "/main-menu/view-menu/rotation-menu"), TRUE);
@@ -2196,6 +2202,7 @@ cb_rstto_main_window_close_all (GtkWidget *widget, RsttoMainWindow *window)
static void
cb_rstto_main_window_delete (GtkWidget *widget, RsttoMainWindow *window)
{
+ g_return_if_fail (rstto_image_list_get_n_images (window->priv->props.image_list) > 0);
RsttoImage *image = rstto_image_list_iter_get_image (window->priv->iter);
GFile *file = rstto_image_get_file (image);
gchar *path = g_file_get_path (file);
More information about the Xfce4-commits
mailing list