[gimp] Use GtkAdjustment's accessors
- From: Michael Natterer <mitch src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gimp] Use GtkAdjustment's accessors
- Date: Fri, 9 Oct 2009 19:20:20 +0000 (UTC)
commit efcc28a018b0a50ee7489fe346296af0c7fbc1e5
Author: Michael Natterer <mitch gimp org>
Date: Fri Oct 9 11:19:14 2009 +0200
Use GtkAdjustment's accessors
app/actions/view-commands.c | 30 ++++++++++++++++--------------
1 files changed, 16 insertions(+), 14 deletions(-)
---
diff --git a/app/actions/view-commands.c b/app/actions/view-commands.c
index 1a9b0dc..cacdd16 100644
--- a/app/actions/view-commands.c
+++ b/app/actions/view-commands.c
@@ -287,16 +287,17 @@ view_scroll_horizontal_cmd_callback (GtkAction *action,
shell = gimp_display_get_shell (display);
offset = action_select_value ((GimpActionSelectType) value,
- shell->hsbdata->value,
- shell->hsbdata->lower,
- shell->hsbdata->upper -
- shell->hsbdata->page_size,
- shell->hsbdata->lower,
+ gtk_adjustment_get_value (shell->hsbdata),
+ gtk_adjustment_get_lower (shell->hsbdata),
+ gtk_adjustment_get_upper (shell->hsbdata) -
+ gtk_adjustment_get_page_size (shell->hsbdata),
+ gtk_adjustment_get_lower (shell->hsbdata),
1,
- shell->hsbdata->step_increment,
- shell->hsbdata->page_increment,
+ gtk_adjustment_get_step_increment (shell->hsbdata),
+ gtk_adjustment_get_page_increment (shell->hsbdata),
0,
FALSE);
+
gtk_adjustment_set_value (shell->hsbdata, offset);
}
@@ -313,16 +314,17 @@ view_scroll_vertical_cmd_callback (GtkAction *action,
shell = gimp_display_get_shell (display);
offset = action_select_value ((GimpActionSelectType) value,
- shell->vsbdata->value,
- shell->vsbdata->lower,
- shell->vsbdata->upper -
- shell->vsbdata->page_size,
- shell->vsbdata->lower,
+ gtk_adjustment_get_value (shell->vsbdata),
+ gtk_adjustment_get_lower (shell->vsbdata),
+ gtk_adjustment_get_upper (shell->vsbdata) -
+ gtk_adjustment_get_page_size (shell->vsbdata),
+ gtk_adjustment_get_lower (shell->vsbdata),
1,
- shell->vsbdata->step_increment,
- shell->vsbdata->page_increment,
+ gtk_adjustment_get_step_increment (shell->vsbdata),
+ gtk_adjustment_get_page_increment (shell->vsbdata),
0,
FALSE);
+
gtk_adjustment_set_value (shell->vsbdata, offset);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]