Updating branch refs/heads/ristretto-0.0 to cbce31e3ee0179b8f1dd033d4876e17c65730a1e (commit) from f11cf02f6589eb413490a32d4230fb5de62c2c24 (commit)
commit cbce31e3ee0179b8f1dd033d4876e17c65730a1e Author: Stephan Arts <step...@xfce.org> Date: Sat Jun 6 11:18:53 2009 +0200 Show 'image-missing' icon in the thumbnail when there is no thumbnail. Fix warning in the main_window src/main_window.c | 2 +- src/thumbnail.c | 8 ++++++++ src/thumbnail_bar.c | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/main_window.c b/src/main_window.c index 2d5dfbd..8bf6f12 100644 --- a/src/main_window.c +++ b/src/main_window.c @@ -535,7 +535,7 @@ rstto_main_window_init (RsttoMainWindow *window) g_signal_connect(G_OBJECT(window), "configure-event", G_CALLBACK(cb_rstto_main_window_configure_event), NULL); g_signal_connect(G_OBJECT(window), "window-state-event", G_CALLBACK(cb_rstto_main_window_state_event), NULL); - g_signal_connect(G_OBJECT(window->priv->settings_manager), "notify", G_CALLBACK(cb_rstto_main_window_settings_notify), NULL); + g_signal_connect(G_OBJECT(window->priv->settings_manager), "notify", G_CALLBACK(cb_rstto_main_window_settings_notify), window); } static void diff --git a/src/thumbnail.c b/src/thumbnail.c index 18e38e3..1a5de6b 100644 --- a/src/thumbnail.c +++ b/src/thumbnail.c @@ -172,6 +172,14 @@ rstto_thumbnail_paint(RsttoThumbnail *thumb) pixbuf = rstto_image_get_thumbnail ( thumb->priv->image); + if (pixbuf == NULL) + { + pixbuf = gtk_icon_theme_load_icon (gtk_icon_theme_get_default(), + "image-missing", + 128, + 0, + NULL); + } gtk_paint_box(widget->style, widget->window, diff --git a/src/thumbnail_bar.c b/src/thumbnail_bar.c index a0d80a9..6d6578c 100644 --- a/src/thumbnail_bar.c +++ b/src/thumbnail_bar.c @@ -316,7 +316,7 @@ rstto_thumbnail_bar_size_allocate(GtkWidget *widget, GtkAllocation *allocation) gtk_widget_get_child_requisition(GTK_WIDGET(iter->data), &child_requisition); child_allocation.width = allocation->width - (border_width * 2); - child_allocation.height = child_requisition.height; + child_allocation.height = child_allocation.width; if (child_allocation.y < (allocation->y + allocation->height)) gtk_widget_set_child_visible(GTK_WIDGET(iter->data), TRUE); _______________________________________________ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits