[gimp] app: name display scrollbar callbacks like the signal they are handling
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: name display scrollbar callbacks like the signal they are handling
- Date: Thu, 24 Feb 2011 01:30:01 +0000 (UTC)
commit de8a07703a996ab29eb4f59819d7e2c9e0ae0c7d
Author: Michael Natterer <mitch gimp org>
Date: Wed Feb 23 07:13:45 2011 +0100
app: name display scrollbar callbacks like the signal they are handling
instead of calling them all foo_update() which means absolutely nothing.
Also rename nav_button_press() to navigation_button_press().
app/display/gimpdisplayshell-callbacks.c | 42 +++++++++++++++---------------
app/display/gimpdisplayshell-callbacks.h | 2 +-
app/display/gimpdisplayshell.c | 2 +-
3 files changed, 23 insertions(+), 23 deletions(-)
---
diff --git a/app/display/gimpdisplayshell-callbacks.c b/app/display/gimpdisplayshell-callbacks.c
index d321eec..1c76f61 100644
--- a/app/display/gimpdisplayshell-callbacks.c
+++ b/app/display/gimpdisplayshell-callbacks.c
@@ -48,16 +48,16 @@
/* local function prototypes */
-static void gimp_display_shell_vscrollbar_update (GtkAdjustment *adjustment,
+static void gimp_display_shell_vadjustment_changed (GtkAdjustment *adjustment,
GimpDisplayShell *shell);
-static void gimp_display_shell_hscrollbar_update (GtkAdjustment *adjustment,
+static void gimp_display_shell_hadjustment_changed (GtkAdjustment *adjustment,
GimpDisplayShell *shell);
-static gboolean gimp_display_shell_vscrollbar_update_range (GtkRange *range,
+static gboolean gimp_display_shell_vscrollbar_change_value (GtkRange *range,
GtkScrollType scroll,
gdouble value,
GimpDisplayShell *shell);
-static gboolean gimp_display_shell_hscrollbar_update_range (GtkRange *range,
+static gboolean gimp_display_shell_hscrollbar_change_value (GtkRange *range,
GtkScrollType scroll,
gdouble value,
GimpDisplayShell *shell);
@@ -94,18 +94,18 @@ gimp_display_shell_canvas_realize (GtkWidget *canvas,
/* set up the scrollbar observers */
g_signal_connect (shell->hsbdata, "value-changed",
- G_CALLBACK (gimp_display_shell_hscrollbar_update),
+ G_CALLBACK (gimp_display_shell_hadjustment_changed),
shell);
g_signal_connect (shell->vsbdata, "value-changed",
- G_CALLBACK (gimp_display_shell_vscrollbar_update),
+ G_CALLBACK (gimp_display_shell_vadjustment_changed),
shell);
g_signal_connect (shell->hsb, "change-value",
- G_CALLBACK (gimp_display_shell_hscrollbar_update_range),
+ G_CALLBACK (gimp_display_shell_hscrollbar_change_value),
shell);
g_signal_connect (shell->vsb, "change-value",
- G_CALLBACK (gimp_display_shell_vscrollbar_update_range),
+ G_CALLBACK (gimp_display_shell_vscrollbar_change_value),
shell);
/* allow shrinking */
@@ -361,9 +361,9 @@ gimp_display_shell_quick_mask_toggled (GtkWidget *widget,
}
gboolean
-gimp_display_shell_nav_button_press (GtkWidget *widget,
- GdkEventButton *bevent,
- GimpDisplayShell *shell)
+gimp_display_shell_navigation_button_press (GtkWidget *widget,
+ GdkEventButton *bevent,
+ GimpDisplayShell *shell)
{
if (! gimp_display_get_image (shell->display))
return TRUE;
@@ -380,11 +380,11 @@ gimp_display_shell_nav_button_press (GtkWidget *widget,
/* private functions */
static void
-gimp_display_shell_vscrollbar_update (GtkAdjustment *adjustment,
- GimpDisplayShell *shell)
+gimp_display_shell_vadjustment_changed (GtkAdjustment *adjustment,
+ GimpDisplayShell *shell)
{
- /* If we are panning with mouse, scrollbars are to be ignored
- * or they will cause jitter in motion
+ /* If we are panning with mouse, scrollbars are to be ignored or
+ * they will cause jitter in motion
*/
if (! shell->scrolling)
gimp_display_shell_scroll (shell,
@@ -394,11 +394,11 @@ gimp_display_shell_vscrollbar_update (GtkAdjustment *adjustment,
}
static void
-gimp_display_shell_hscrollbar_update (GtkAdjustment *adjustment,
- GimpDisplayShell *shell)
+gimp_display_shell_hadjustment_changed (GtkAdjustment *adjustment,
+ GimpDisplayShell *shell)
{
- /* If we are panning with mouse, scrollbars are to be ignored
- * or they will cause jitter in motion
+ /* If we are panning with mouse, scrollbars are to be ignored or
+ * they will cause jitter in motion
*/
if (! shell->scrolling)
gimp_display_shell_scroll (shell,
@@ -408,7 +408,7 @@ gimp_display_shell_hscrollbar_update (GtkAdjustment *adjustment,
}
static gboolean
-gimp_display_shell_hscrollbar_update_range (GtkRange *range,
+gimp_display_shell_hscrollbar_change_value (GtkRange *range,
GtkScrollType scroll,
gdouble value,
GimpDisplayShell *shell)
@@ -431,7 +431,7 @@ gimp_display_shell_hscrollbar_update_range (GtkRange *range,
}
static gboolean
-gimp_display_shell_vscrollbar_update_range (GtkRange *range,
+gimp_display_shell_vscrollbar_change_value (GtkRange *range,
GtkScrollType scroll,
gdouble value,
GimpDisplayShell *shell)
diff --git a/app/display/gimpdisplayshell-callbacks.h b/app/display/gimpdisplayshell-callbacks.h
index 6babb38..c81630c 100644
--- a/app/display/gimpdisplayshell-callbacks.h
+++ b/app/display/gimpdisplayshell-callbacks.h
@@ -41,7 +41,7 @@ gboolean gimp_display_shell_quick_mask_button_press (GtkWidget *widget,
void gimp_display_shell_quick_mask_toggled (GtkWidget *widget,
GimpDisplayShell *shell);
-gboolean gimp_display_shell_nav_button_press (GtkWidget *widget,
+gboolean gimp_display_shell_navigation_button_press (GtkWidget *widget,
GdkEventButton *bevent,
GimpDisplayShell *shell);
diff --git a/app/display/gimpdisplayshell.c b/app/display/gimpdisplayshell.c
index 6482d54..e2c970d 100644
--- a/app/display/gimpdisplayshell.c
+++ b/app/display/gimpdisplayshell.c
@@ -653,7 +653,7 @@ gimp_display_shell_constructed (GObject *object)
gtk_widget_show (gtk_image);
g_signal_connect (shell->nav_ebox, "button-press-event",
- G_CALLBACK (gimp_display_shell_nav_button_press),
+ G_CALLBACK (gimp_display_shell_navigation_button_press),
shell);
gimp_help_set_help_data (shell->nav_ebox,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]