gimp r26178 - in trunk: . app/display
- From: martinn svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r26178 - in trunk: . app/display
- Date: Sun, 13 Jul 2008 14:48:44 +0000 (UTC)
Author: martinn
Date: Sun Jul 13 14:48:44 2008
New Revision: 26178
URL: http://svn.gnome.org/viewvc/gimp?rev=26178&view=rev
Log:
2008-07-13 Martin Nordholts <martinn svn gnome org>
* app/display/gimpdisplayshell.c (gimp_display_shell_new): Get rid
of non-intelligent scrollbar stepper sensitivity code.
* app/display/gimpdisplayshell-scroll.c
(gimp_display_shell_scroll_clamp_offsets): Add intelligent
scrollbar stepper sensitivity code.
Modified:
trunk/ChangeLog
trunk/app/display/gimpdisplayshell-scroll.c
trunk/app/display/gimpdisplayshell.c
Modified: trunk/app/display/gimpdisplayshell-scroll.c
==============================================================================
--- trunk/app/display/gimpdisplayshell-scroll.c (original)
+++ trunk/app/display/gimpdisplayshell-scroll.c Sun Jul 13 14:48:44 2008
@@ -166,6 +166,32 @@
max_offset_y = sh + overpan_amount - shell->disp_height;
}
+
+ /* Handle scrollbar stepper sensitiity */
+
+ gtk_range_set_lower_stepper_sensitivity (GTK_RANGE (shell->hsb),
+ min_offset_x < shell->offset_x ?
+ GTK_SENSITIVITY_ON :
+ GTK_SENSITIVITY_OFF);
+
+ gtk_range_set_upper_stepper_sensitivity (GTK_RANGE (shell->hsb),
+ max_offset_x > shell->offset_x ?
+ GTK_SENSITIVITY_ON :
+ GTK_SENSITIVITY_OFF);
+
+ gtk_range_set_lower_stepper_sensitivity (GTK_RANGE (shell->vsb),
+ min_offset_y < shell->offset_y ?
+ GTK_SENSITIVITY_ON :
+ GTK_SENSITIVITY_OFF);
+
+ gtk_range_set_upper_stepper_sensitivity (GTK_RANGE (shell->vsb),
+ max_offset_y > shell->offset_y ?
+ GTK_SENSITIVITY_ON :
+ GTK_SENSITIVITY_OFF);
+
+
+ /* Clamp */
+
shell->offset_x = CLAMP (shell->offset_x, min_offset_x, max_offset_x);
shell->offset_y = CLAMP (shell->offset_y, min_offset_y, max_offset_y);
}
Modified: trunk/app/display/gimpdisplayshell.c
==============================================================================
--- trunk/app/display/gimpdisplayshell.c (original)
+++ trunk/app/display/gimpdisplayshell.c Sun Jul 13 14:48:44 2008
@@ -936,9 +936,6 @@
1, 1, image_width));
shell->hsb = gtk_hscrollbar_new (shell->hsbdata);
- gtk_range_set_lower_stepper_sensitivity (GTK_RANGE (shell->hsb), GTK_SENSITIVITY_ON);
- gtk_range_set_upper_stepper_sensitivity (GTK_RANGE (shell->hsb), GTK_SENSITIVITY_ON);
-
GTK_WIDGET_UNSET_FLAGS (shell->hsb, GTK_CAN_FOCUS);
/* the vertical scrollbar */
@@ -946,9 +943,6 @@
1, 1, image_height));
shell->vsb = gtk_vscrollbar_new (shell->vsbdata);
- gtk_range_set_lower_stepper_sensitivity (GTK_RANGE (shell->vsb), GTK_SENSITIVITY_ON);
- gtk_range_set_upper_stepper_sensitivity (GTK_RANGE (shell->vsb), GTK_SENSITIVITY_ON);
-
GTK_WIDGET_UNSET_FLAGS (shell->vsb, GTK_CAN_FOCUS);
/* create the contents of the inner_table ********************************/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]