This is an automated email from the git hooks/post-receive script. eric pushed a commit to branch master in repository xfce/xfdesktop.
commit 7975bd4457f8f0422712100b02ac9717836d1f17 Author: Eric Koegel <[email protected]> Date: Mon Mar 24 12:07:46 2014 +0300 Disconnect the directory signal handler When changing folders ensure we disconnect the old directory monitor signal handler and always release the directory monitor. Additionally, this patch removes a clip call in the icon view as it's not required at all. --- src/xfce-backdrop.c | 26 +++++++++++++++++++++++++- src/xfdesktop-icon-view.c | 3 --- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/src/xfce-backdrop.c b/src/xfce-backdrop.c index 6ee798b..36f0a60 100644 --- a/src/xfce-backdrop.c +++ b/src/xfce-backdrop.c @@ -363,8 +363,13 @@ xfce_backdrop_load_image_files(XfceBackdrop *backdrop) backdrop->priv->image_files = list_image_files_in_dir(backdrop->priv->image_path); - if(backdrop->priv->monitor) + if(backdrop->priv->monitor) { + g_signal_handlers_disconnect_by_func(G_OBJECT(backdrop->priv->monitor), + G_CALLBACK(cb_xfce_backdrop__image_files_changed), + backdrop); + g_object_unref(backdrop->priv->monitor); + } /* monitor the new directory for changes */ backdrop->priv->monitor = g_file_monitor(gfile, G_FILE_MONITOR_NONE, NULL, NULL); @@ -637,6 +642,15 @@ xfce_backdrop_finalize(GObject *object) xfce_backdrop_clear_cached_image(backdrop); + if(backdrop->priv->monitor) { + g_signal_handlers_disconnect_by_func(G_OBJECT(backdrop->priv->monitor), + G_CALLBACK(cb_xfce_backdrop__image_files_changed), + backdrop); + + g_object_unref(backdrop->priv->monitor); + backdrop->priv->monitor = NULL; + } + /* Free the image files list */ if(backdrop->priv->image_files) { g_list_free_full(backdrop->priv->image_files, g_free); @@ -999,6 +1013,16 @@ xfce_backdrop_set_image_filename(XfceBackdrop *backdrop, const gchar *filename) if(g_strcmp0(old_dir, new_dir) != 0) { g_list_free_full(backdrop->priv->image_files, g_free); backdrop->priv->image_files = NULL; + + /* release the directory monitor */ + if(backdrop->priv->monitor) { + g_signal_handlers_disconnect_by_func(G_OBJECT(backdrop->priv->monitor), + G_CALLBACK(cb_xfce_backdrop__image_files_changed), + backdrop); + + g_object_unref(backdrop->priv->monitor); + backdrop->priv->monitor = NULL; + } } g_free(old_dir); diff --git a/src/xfdesktop-icon-view.c b/src/xfdesktop-icon-view.c index 750aa0d..d3c4ebc 100644 --- a/src/xfdesktop-icon-view.c +++ b/src/xfdesktop-icon-view.c @@ -3040,9 +3040,6 @@ xfdesktop_icon_view_draw_image(cairo_t *cr, GdkPixbuf *pix, GdkRectangle *rect) { cairo_save(cr); - gdk_cairo_rectangle(cr, rect); - cairo_clip(cr); - gdk_cairo_set_source_pixbuf(cr, pix, rect->x, rect->y); cairo_paint(cr); -- To stop receiving notification emails like this one, please contact the administrator of this repository. _______________________________________________ Xfce4-commits mailing list [email protected] https://mail.xfce.org/mailman/listinfo/xfce4-commits
