[gtk+/wip/baedert/gtkimageview: 275/279] Remove useless casts from gdk_event_triggers_context_menu calls
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/baedert/gtkimageview: 275/279] Remove useless casts from gdk_event_triggers_context_menu calls
- Date: Fri, 1 Apr 2016 09:37:27 +0000 (UTC)
commit d214bb5bbd6946a7d2055eb203c75ef6b81db4ef
Author: Timm Bäder <mail baedert org>
Date: Mon Mar 21 21:52:18 2016 +0100
Remove useless casts from gdk_event_triggers_context_menu calls
gtk/gtkentry.c | 2 +-
gtk/gtklabel.c | 2 +-
gtk/gtkrange.c | 68 ++++++++++++++++++++++++++++----------------------------
3 files changed, 36 insertions(+), 36 deletions(-)
---
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index 000322b..5d17af2 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -4374,7 +4374,7 @@ gtk_entry_multipress_gesture_pressed (GtkGestureMultiPress *gesture,
tmp_pos = gtk_entry_find_position (entry, x);
- if (gdk_event_triggers_context_menu ((GdkEvent *) event))
+ if (gdk_event_triggers_context_menu (event))
{
gtk_entry_do_popup (entry, event);
}
diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c
index a51d71f..0dc8874 100644
--- a/gtk/gtklabel.c
+++ b/gtk/gtklabel.c
@@ -4992,7 +4992,7 @@ gtk_label_multipress_gesture_pressed (GtkGestureMultiPress *gesture,
info->in_drag = FALSE;
info->select_words = FALSE;
- if (gdk_event_triggers_context_menu ((GdkEvent *) event))
+ if (gdk_event_triggers_context_menu (event))
gtk_label_do_popup (label, (GdkEventButton*) event);
else if (button == GDK_BUTTON_PRIMARY)
{
diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c
index 9f6b4b1..826a6a2 100644
--- a/gtk/gtkrange.c
+++ b/gtk/gtkrange.c
@@ -20,7 +20,7 @@
* Modified by the GTK+ Team and others 1997-2004. See the AUTHORS
* file for a list of people on the GTK+ Team. See the ChangeLog
* files for a list of changes. These files are distributed with
- * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
+ * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
*/
#include "config.h"
@@ -864,12 +864,12 @@ gtk_range_init (GtkRange *range)
/**
* gtk_range_get_adjustment:
* @range: a #GtkRange
- *
+ *
* Get the #GtkAdjustment which is the “model” object for #GtkRange.
* See gtk_range_set_adjustment() for details.
* The return value does not have a reference added, so should not
* be unreferenced.
- *
+ *
* Returns: (transfer none): a #GtkAdjustment
**/
GtkAdjustment*
@@ -930,14 +930,14 @@ gtk_range_set_adjustment (GtkRange *range,
priv->adjustment = adjustment;
g_object_ref_sink (adjustment);
-
+
g_signal_connect (adjustment, "changed",
G_CALLBACK (gtk_range_adjustment_changed),
range);
g_signal_connect (adjustment, "value-changed",
G_CALLBACK (gtk_range_adjustment_value_changed),
range);
-
+
gtk_range_adjustment_changed (adjustment, range);
g_object_notify_by_pspec (G_OBJECT (range), properties[PROP_ADJUSTMENT]);
}
@@ -1086,9 +1086,9 @@ gtk_range_set_inverted (GtkRange *range,
/**
* gtk_range_get_inverted:
* @range: a #GtkRange
- *
+ *
* Gets the value set by gtk_range_set_inverted().
- *
+ *
* Returns: %TRUE if the range is inverted
**/
gboolean
@@ -1491,7 +1491,7 @@ gtk_range_set_increments (GtkRange *range,
* @range: a #GtkRange
* @min: minimum range value
* @max: maximum range value
- *
+ *
* Sets the allowable values in the #GtkRange, and clamps the range
* value to be between @min and @max. (If the range has a non-zero
* page size, it is clamped between @min and @max - page-size.)
@@ -1504,7 +1504,7 @@ gtk_range_set_range (GtkRange *range,
GtkRangePrivate *priv;
GtkAdjustment *adjustment;
gdouble value;
-
+
g_return_if_fail (GTK_IS_RANGE (range));
g_return_if_fail (min <= max);
@@ -1532,7 +1532,7 @@ gtk_range_set_range (GtkRange *range,
*
* Sets the current value of the range; if the value is outside the
* minimum or maximum range values, it will be clamped to fit inside
- * them. The range emits the #GtkRange::value-changed signal if the
+ * them. The range emits the #GtkRange::value-changed signal if the
* value changes.
**/
void
@@ -1555,9 +1555,9 @@ gtk_range_set_value (GtkRange *range,
/**
* gtk_range_get_value:
* @range: a #GtkRange
- *
+ *
* Gets the current value of the range.
- *
+ *
* Returns: current value of the range.
**/
gdouble
@@ -2047,7 +2047,7 @@ clamp_dimensions (const GtkAllocation *allocation,
*width += extra;
}
}
-
+
/* See if we can fit rect, if not kill the border */
shortage = *width - allocation->width;
if (shortage > 0)
@@ -2084,7 +2084,7 @@ clamp_dimensions (const GtkAllocation *allocation,
border->bottom += extra / 2 + extra % 2;
}
}
-
+
/* See if we can fit rect, if not kill the border */
shortage = *height - allocation->height;
if (shortage > 0)
@@ -2675,7 +2675,7 @@ gtk_range_multipress_gesture_pressed (GtkGestureMultiPress *gesture,
NULL);
if (priv->mouse_location == priv->slider_gadget &&
- gdk_event_triggers_context_menu ((GdkEvent *)event))
+ gdk_event_triggers_context_menu (event))
{
gboolean handled;
@@ -3190,7 +3190,7 @@ gtk_range_adjustment_value_changed (GtkAdjustment *adjustment,
gtk_range_calc_slider (range);
gtk_range_calc_stepper_sensitivity (range);
-
+
/* now check whether the layout changed */
if (GTK_IS_SCALE (range) && gtk_scale_get_draw_value (GTK_SCALE (range)))
{
@@ -3209,7 +3209,7 @@ gtk_range_adjustment_value_changed (GtkAdjustment *adjustment,
}
static void
-apply_marks (GtkRange *range,
+apply_marks (GtkRange *range,
gdouble oldval,
gdouble *newval)
{
@@ -3320,7 +3320,7 @@ gtk_range_scroll (GtkRange *range,
else
step_back (range);
break;
-
+
case GTK_SCROLL_STEP_UP:
if (should_invert (range))
step_forward (range);
@@ -3334,18 +3334,18 @@ gtk_range_scroll (GtkRange *range,
else
step_forward (range);
break;
-
+
case GTK_SCROLL_STEP_DOWN:
if (should_invert (range))
step_back (range);
else
step_forward (range);
break;
-
+
case GTK_SCROLL_STEP_BACKWARD:
step_back (range);
break;
-
+
case GTK_SCROLL_STEP_FORWARD:
step_forward (range);
break;
@@ -3356,7 +3356,7 @@ gtk_range_scroll (GtkRange *range,
else
page_back (range);
break;
-
+
case GTK_SCROLL_PAGE_UP:
if (should_invert (range))
page_forward (range);
@@ -3370,18 +3370,18 @@ gtk_range_scroll (GtkRange *range,
else
page_forward (range);
break;
-
+
case GTK_SCROLL_PAGE_DOWN:
if (should_invert (range))
page_back (range);
else
page_forward (range);
break;
-
+
case GTK_SCROLL_PAGE_BACKWARD:
page_back (range);
break;
-
+
case GTK_SCROLL_PAGE_FORWARD:
page_forward (range);
break;
@@ -3502,7 +3502,7 @@ gtk_range_compute_slider_position (GtkRange *range,
if (priv->orientation == GTK_ORIENTATION_VERTICAL)
{
gint y, bottom, top, height;
-
+
/* Slider fits into the trough, with stepper_spacing on either side,
* and the size/position based on the adjustment or fixed, depending.
*/
@@ -3538,7 +3538,7 @@ gtk_range_compute_slider_position (GtkRange *range,
height = min_slider_size;
height = MIN (height, trough_content_alloc.height);
-
+
y = top;
if (gtk_adjustment_get_upper (priv->adjustment) - gtk_adjustment_get_lower (priv->adjustment) -
gtk_adjustment_get_page_size (priv->adjustment) != 0)
@@ -3546,17 +3546,17 @@ gtk_range_compute_slider_position (GtkRange *range,
(gtk_adjustment_get_upper (priv->adjustment) -
gtk_adjustment_get_lower (priv->adjustment) - gtk_adjustment_get_page_size (priv->adjustment)));
y = CLAMP (y, top, bottom);
-
+
if (should_invert (range))
y = bottom - (y - top + height);
-
+
slider_rect->y = y;
slider_rect->height = height;
}
else
{
gint x, left, right, width;
-
+
/* Slider fits into the trough, with stepper_spacing on either side,
* and the size/position based on the adjustment or fixed, depending.
*/
@@ -3598,12 +3598,12 @@ gtk_range_compute_slider_position (GtkRange *range,
if (gtk_adjustment_get_upper (priv->adjustment) - gtk_adjustment_get_lower (priv->adjustment) -
gtk_adjustment_get_page_size (priv->adjustment) != 0)
x += (right - left - width) * ((adjustment_value - gtk_adjustment_get_lower (priv->adjustment)) /
(gtk_adjustment_get_upper (priv->adjustment) -
gtk_adjustment_get_lower (priv->adjustment) - gtk_adjustment_get_page_size (priv->adjustment)));
-
+
x = CLAMP (x, left, right);
-
+
if (should_invert (range))
x = right - (x - left + width);
-
+
slider_rect->x = x;
slider_rect->width = width;
}
@@ -3862,7 +3862,7 @@ _gtk_range_set_stop_values (GtkRange *range,
priv->n_marks = n_values;
- for (i = 0; i < n_values; i++)
+ for (i = 0; i < n_values; i++)
priv->marks[i] = values[i];
gtk_range_calc_marks (range);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]