[Xfce4-commits] ristretto:ristretto-0.0 Merge branch 'breakup_refresh'
Updating branch refs/heads/ristretto-0.0 to f6b085b3e0b356796a592414249485c7a8e8ae20 (commit) from 7c3c0b8d56ed639352d7e11d1bdf3058052a2d5c (commit) commit f6b085b3e0b356796a592414249485c7a8e8ae20 Merge: 7c3c0b8 0c1e906 Author: Stephan Arts step...@xfce.org Date: Mon Mar 9 22:01:38 2009 +0100 Merge branch 'breakup_refresh' Conflicts: src/picture_viewer.c commit 0c1e906c2931655b6f075bb7105895748b50946a Author: Stephan Arts step...@xfce.org Date: Mon Mar 9 21:51:09 2009 +0100 Emit 'updated' signal when 'rstto_image_load' is called and the image is already there. commit 68f99e86e52a3bbd80337b2e8516133eab1aaa23 Author: Stephan Arts step...@xfce.org Date: Mon Mar 9 21:44:47 2009 +0100 Fix zoom-in and zoom-out (accidently passed a boolean instead of a double) commit 2b5990b32b22c130f54395eb0f61f9c7ad107e27 Author: Stephan Arts step...@xfce.org Date: Mon Mar 9 00:28:49 2009 +0100 Move DnD code to the bottom of the file commit edf1b2a317f77e5b162a50c0ac5e8d11e0703a9b Author: Stephan Arts step...@xfce.org Date: Mon Mar 9 00:23:48 2009 +0100 Fix segfault commit 1da739e89571c1775602a511ad86b5c0ed97a8e1 Author: Stephan Arts step...@xfce.org Date: Mon Mar 9 00:03:41 2009 +0100 Made all the scale related functions internal commit 7da92c8d582e14d50adfee29144751e7b89b93cb Author: Stephan Arts step...@xfce.org Date: Sun Mar 8 14:22:37 2009 +0100 Split 'view' state from 'motion' state commit 691a6a7c89eb2902984ac6ccfe02e219168b82f4 Author: Stephan Arts step...@xfce.org Date: Fri Mar 6 15:28:33 2009 +0100 commit changes commit ad1c2baadb12b28c47cbeb97b622af39d614ba5a Author: Stephan Arts step...@xfce.org Date: Sun Feb 22 10:40:29 2009 +0100 Add refresh mask, needs some tweaking, but it solves the drag performance-loss. Eventually, this should reduce the times ristretto scales the image. src/image.c |2 +- src/main_window.c| 10 +- src/picture_viewer.c | 1010 +- src/picture_viewer.h | 15 +- 4 files changed, 522 insertions(+), 515 deletions(-) diff --git a/src/image.c b/src/image.c index a717cca..82d23fe 100644 --- a/src/image.c +++ b/src/image.c @@ -407,7 +407,7 @@ rstto_image_load (RsttoImage *image, gboolean empty_cache, GError **error) } else { -//g_signal_emit(G_OBJECT(image), rstto_image_signals[RSTTO_IMAGE_SIGNAL_UPDATED], 0, image, NULL); +g_signal_emit(G_OBJECT(image), rstto_image_signals[RSTTO_IMAGE_SIGNAL_UPDATED], 0, image, NULL); } rstto_image_cache_push_image (cache, image); return TRUE; diff --git a/src/main_window.c b/src/main_window.c index b7acbdb..2f8fe74 100644 --- a/src/main_window.c +++ b/src/main_window.c @@ -673,7 +673,7 @@ rstto_main_window_get_property (GObject*object, static void cb_rstto_main_window_zoom_fit (GtkWidget *widget, RsttoMainWindow *window) { -rstto_picture_viewer_set_zoom_mode (RSTTO_PICTURE_VIEWER (window-priv-picture_viewer), RSTTO_ZOOM_MODE_FIT); +rstto_picture_viewer_zoom_fit (RSTTO_PICTURE_VIEWER (window-priv-picture_viewer)); } /** @@ -686,7 +686,7 @@ cb_rstto_main_window_zoom_fit (GtkWidget *widget, RsttoMainWindow *window) static void cb_rstto_main_window_zoom_100 (GtkWidget *widget, RsttoMainWindow *window) { -rstto_picture_viewer_set_zoom_mode (RSTTO_PICTURE_VIEWER (window-priv-picture_viewer), RSTTO_ZOOM_MODE_100); +rstto_picture_viewer_zoom_100 (RSTTO_PICTURE_VIEWER (window-priv-picture_viewer)); } /** @@ -699,8 +699,7 @@ cb_rstto_main_window_zoom_100 (GtkWidget *widget, RsttoMainWindow *window) static void cb_rstto_main_window_zoom_in (GtkWidget *widget, RsttoMainWindow *window) { -gdouble scale = rstto_picture_viewer_get_scale (RSTTO_PICTURE_VIEWER (window-priv-picture_viewer)); -rstto_picture_viewer_set_scale (RSTTO_PICTURE_VIEWER (window-priv-picture_viewer), scale * ZOOM_FACTOR); +rstto_picture_viewer_zoom_in (RSTTO_PICTURE_VIEWER (window-priv-picture_viewer), ZOOM_FACTOR); } /** @@ -713,8 +712,7 @@ cb_rstto_main_window_zoom_in (GtkWidget *widget, RsttoMainWindow *window) static void cb_rstto_main_window_zoom_out (GtkWidget *widget, RsttoMainWindow *window) { -gdouble scale = rstto_picture_viewer_get_scale (RSTTO_PICTURE_VIEWER (window-priv-picture_viewer)); -rstto_picture_viewer_set_scale (RSTTO_PICTURE_VIEWER (window-priv-picture_viewer), scale / ZOOM_FACTOR); +rstto_picture_viewer_zoom_out (RSTTO_PICTURE_VIEWER (window-priv-picture_viewer), ZOOM_FACTOR); } /**/ diff --git a/src/picture_viewer.c b/src/picture_viewer.c index 6710a6a..acc1c5a 100644 --- a/src/picture_viewer.c +++ b/src/picture_viewer.c @@ -30,12 +30,24 @@ typedef enum { -RSTTO_PICTURE_VIEWER_STATE_NONE, -RSTTO_PICTURE_VIEWER_STATE_MOVE, -RSTTO_PICTURE_VIEWER_STATE_PREVIEW, -RSTTO_PICTURE_VIEWER_STATE_BOX_ZOOM +
[Xfce4-commits] ristretto:ristretto-0.0 Merge branch 'breakup_refresh'
Updating branch refs/heads/ristretto-0.0 to f6b085b3e0b356796a592414249485c7a8e8ae20 (commit) from 7c3c0b8d56ed639352d7e11d1bdf3058052a2d5c (commit) commit f6b085b3e0b356796a592414249485c7a8e8ae20 Merge: 7c3c0b8 0c1e906 Author: Stephan Arts step...@xfce.org Date: Mon Mar 9 22:01:38 2009 +0100 Merge branch 'breakup_refresh' Conflicts: src/picture_viewer.c commit 0c1e906c2931655b6f075bb7105895748b50946a Author: Stephan Arts step...@xfce.org Date: Mon Mar 9 21:51:09 2009 +0100 Emit 'updated' signal when 'rstto_image_load' is called and the image is already there. commit 68f99e86e52a3bbd80337b2e8516133eab1aaa23 Author: Stephan Arts step...@xfce.org Date: Mon Mar 9 21:44:47 2009 +0100 Fix zoom-in and zoom-out (accidently passed a boolean instead of a double) commit 2b5990b32b22c130f54395eb0f61f9c7ad107e27 Author: Stephan Arts step...@xfce.org Date: Mon Mar 9 00:28:49 2009 +0100 Move DnD code to the bottom of the file commit edf1b2a317f77e5b162a50c0ac5e8d11e0703a9b Author: Stephan Arts step...@xfce.org Date: Mon Mar 9 00:23:48 2009 +0100 Fix segfault commit 1da739e89571c1775602a511ad86b5c0ed97a8e1 Author: Stephan Arts step...@xfce.org Date: Mon Mar 9 00:03:41 2009 +0100 Made all the scale related functions internal commit 7da92c8d582e14d50adfee29144751e7b89b93cb Author: Stephan Arts step...@xfce.org Date: Sun Mar 8 14:22:37 2009 +0100 Split 'view' state from 'motion' state commit 691a6a7c89eb2902984ac6ccfe02e219168b82f4 Author: Stephan Arts step...@xfce.org Date: Fri Mar 6 15:28:33 2009 +0100 commit changes commit ad1c2baadb12b28c47cbeb97b622af39d614ba5a Author: Stephan Arts step...@xfce.org Date: Sun Feb 22 10:40:29 2009 +0100 Add refresh mask, needs some tweaking, but it solves the drag performance-loss. Eventually, this should reduce the times ristretto scales the image. src/image.c |2 +- src/main_window.c| 10 +- src/picture_viewer.c | 1010 +- src/picture_viewer.h | 15 +- 4 files changed, 522 insertions(+), 515 deletions(-) diff --git a/src/image.c b/src/image.c index a717cca..82d23fe 100644 --- a/src/image.c +++ b/src/image.c @@ -407,7 +407,7 @@ rstto_image_load (RsttoImage *image, gboolean empty_cache, GError **error) } else { -//g_signal_emit(G_OBJECT(image), rstto_image_signals[RSTTO_IMAGE_SIGNAL_UPDATED], 0, image, NULL); +g_signal_emit(G_OBJECT(image), rstto_image_signals[RSTTO_IMAGE_SIGNAL_UPDATED], 0, image, NULL); } rstto_image_cache_push_image (cache, image); return TRUE; diff --git a/src/main_window.c b/src/main_window.c index b7acbdb..2f8fe74 100644 --- a/src/main_window.c +++ b/src/main_window.c @@ -673,7 +673,7 @@ rstto_main_window_get_property (GObject*object, static void cb_rstto_main_window_zoom_fit (GtkWidget *widget, RsttoMainWindow *window) { -rstto_picture_viewer_set_zoom_mode (RSTTO_PICTURE_VIEWER (window-priv-picture_viewer), RSTTO_ZOOM_MODE_FIT); +rstto_picture_viewer_zoom_fit (RSTTO_PICTURE_VIEWER (window-priv-picture_viewer)); } /** @@ -686,7 +686,7 @@ cb_rstto_main_window_zoom_fit (GtkWidget *widget, RsttoMainWindow *window) static void cb_rstto_main_window_zoom_100 (GtkWidget *widget, RsttoMainWindow *window) { -rstto_picture_viewer_set_zoom_mode (RSTTO_PICTURE_VIEWER (window-priv-picture_viewer), RSTTO_ZOOM_MODE_100); +rstto_picture_viewer_zoom_100 (RSTTO_PICTURE_VIEWER (window-priv-picture_viewer)); } /** @@ -699,8 +699,7 @@ cb_rstto_main_window_zoom_100 (GtkWidget *widget, RsttoMainWindow *window) static void cb_rstto_main_window_zoom_in (GtkWidget *widget, RsttoMainWindow *window) { -gdouble scale = rstto_picture_viewer_get_scale (RSTTO_PICTURE_VIEWER (window-priv-picture_viewer)); -rstto_picture_viewer_set_scale (RSTTO_PICTURE_VIEWER (window-priv-picture_viewer), scale * ZOOM_FACTOR); +rstto_picture_viewer_zoom_in (RSTTO_PICTURE_VIEWER (window-priv-picture_viewer), ZOOM_FACTOR); } /** @@ -713,8 +712,7 @@ cb_rstto_main_window_zoom_in (GtkWidget *widget, RsttoMainWindow *window) static void cb_rstto_main_window_zoom_out (GtkWidget *widget, RsttoMainWindow *window) { -gdouble scale = rstto_picture_viewer_get_scale (RSTTO_PICTURE_VIEWER (window-priv-picture_viewer)); -rstto_picture_viewer_set_scale (RSTTO_PICTURE_VIEWER (window-priv-picture_viewer), scale / ZOOM_FACTOR); +rstto_picture_viewer_zoom_out (RSTTO_PICTURE_VIEWER (window-priv-picture_viewer), ZOOM_FACTOR); } /**/ diff --git a/src/picture_viewer.c b/src/picture_viewer.c index 6710a6a..acc1c5a 100644 --- a/src/picture_viewer.c +++ b/src/picture_viewer.c @@ -30,12 +30,24 @@ typedef enum { -RSTTO_PICTURE_VIEWER_STATE_NONE, -RSTTO_PICTURE_VIEWER_STATE_MOVE, -RSTTO_PICTURE_VIEWER_STATE_PREVIEW, -RSTTO_PICTURE_VIEWER_STATE_BOX_ZOOM +