[Xfce4-commits] <ristretto:master> - Fix picture viewer refresh when no image is present - Add notebook to preferences dialog - Rename icon in preferences dialog
Stephan Arts
stephan at xfce.org
Wed Aug 12 12:19:37 CEST 2009
Updating branch refs/heads/master
to 94adc418fdc9869d468f34b004ae8038aa49bc35 (commit)
from 64c12a35e6f7465c3b5e4a31c18d8526019c81a7 (commit)
commit 94adc418fdc9869d468f34b004ae8038aa49bc35
Author: Stephan Arts <stephan at xfce.org>
Date: Fri Mar 13 23:18:18 2009 +0100
- Fix picture viewer refresh when no image is present
- Add notebook to preferences dialog
- Rename icon in preferences dialog
src/main_window.c | 1 +
src/picture_viewer.c | 14 +++++++++-----
src/preferences_dialog.c | 7 ++++++-
3 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/src/main_window.c b/src/main_window.c
index 2f8fe74..4b78e7b 100644
--- a/src/main_window.c
+++ b/src/main_window.c
@@ -1243,6 +1243,7 @@ cb_rstto_main_window_close (GtkWidget *widget, RsttoMainWindow *window)
static void
cb_rstto_main_window_close_all (GtkWidget *widget, RsttoMainWindow *window)
{
+ rstto_picture_viewer_set_image (RSTTO_PICTURE_VIEWER (window->priv->picture_viewer), NULL);
rstto_navigator_remove_all (window->priv->props.navigator);
}
diff --git a/src/picture_viewer.c b/src/picture_viewer.c
index 8f51294..3ebfb15 100644
--- a/src/picture_viewer.c
+++ b/src/picture_viewer.c
@@ -979,6 +979,11 @@ cb_rstto_picture_viewer_queued_repaint (RsttoPictureViewer *viewer)
if (viewer->priv->repaint.refresh)
{
+ if(viewer->priv->dst_pixbuf)
+ {
+ g_object_unref(viewer->priv->dst_pixbuf);
+ viewer->priv->dst_pixbuf = NULL;
+ }
if (p_src_pixbuf)
{
/**
@@ -996,11 +1001,6 @@ cb_rstto_picture_viewer_queued_repaint (RsttoPictureViewer *viewer)
(gint)((widget->allocation.height / scale) < height?
(widget->allocation.height / scale)*thumb_scale:height*thumb_scale));
- if(viewer->priv->dst_pixbuf)
- {
- g_object_unref(viewer->priv->dst_pixbuf);
- viewer->priv->dst_pixbuf = NULL;
- }
if(p_tmp_pixbuf)
{
gint dst_width = gdk_pixbuf_get_width (p_tmp_pixbuf)*(scale/thumb_scale);
@@ -1244,6 +1244,10 @@ rstto_picture_viewer_set_image (RsttoPictureViewer *viewer, RsttoImage *image)
}
rstto_image_load (viewer->priv->image, FALSE, NULL);
}
+ else
+ {
+ rstto_picture_viewer_queued_repaint (viewer, TRUE);
+ }
}
/**
diff --git a/src/preferences_dialog.c b/src/preferences_dialog.c
index 10920ed..134d63e 100644
--- a/src/preferences_dialog.c
+++ b/src/preferences_dialog.c
@@ -20,6 +20,7 @@
#include <gtk/gtk.h>
#include <libxfcegui4/libxfcegui4.h>
+#include "settings.h"
#include "preferences_dialog.h"
static void
@@ -58,6 +59,10 @@ rstto_preferences_dialog_get_type ()
static void
rstto_preferences_dialog_init(RsttoPreferencesDialog *dialog)
{
+ RsttoSettings *settings_manager = rstto_settings_new ();
+ GtkWidget *notebook = gtk_notebook_new ();
+
+ gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), notebook);
gtk_dialog_add_button (GTK_DIALOG (dialog), GTK_STOCK_CLOSE, GTK_RESPONSE_OK);
}
@@ -73,7 +78,7 @@ rstto_preferences_dialog_new (GtkWindow *parent)
{
GtkWidget *dialog = g_object_new (RSTTO_TYPE_PREFERENCES_DIALOG,
"title", _("Preferences"),
- "icon-name", "go-left",
+ "icon-name", GTK_STOCK_PREFERENCES,
NULL);
gtk_window_set_transient_for (GTK_WINDOW (dialog), parent);
More information about the Xfce4-commits
mailing list