[gtk+/wip/baedert/gtkimageview] Document properties
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/baedert/gtkimageview] Document properties
- Date: Mon, 8 Feb 2016 19:12:14 +0000 (UTC)
commit c70cfc78bd6521049c660a92b6bb0d347764b449
Author: Timm Bäder <mail baedert org>
Date: Mon Feb 8 17:57:58 2016 +0100
Document properties
gtk/gtkimageview.c | 64 +++++++++++++++++++++++++--------------------------
1 files changed, 31 insertions(+), 33 deletions(-)
---
diff --git a/gtk/gtkimageview.c b/gtk/gtkimageview.c
index 02fb5cb..33f8621 100644
--- a/gtk/gtkimageview.c
+++ b/gtk/gtkimageview.c
@@ -49,17 +49,17 @@ struct _GtkImageViewPrivate
double angle;
int scale_factor;
- gboolean fit_allocation : 1;
- gboolean scale_set : 1;
- gboolean snap_angle : 1;
- gboolean rotatable : 1;
- gboolean zoomable : 1;
- gboolean in_rotate : 1;
- gboolean in_zoom : 1;
- gboolean size_valid : 1;
- gboolean transitions_enabled : 1;
- gboolean in_angle_transition : 1;
- gboolean in_scale_transition : 1;
+ gboolean fit_allocation : 1;
+ gboolean scale_set : 1;
+ gboolean snap_angle : 1;
+ gboolean rotatable : 1;
+ gboolean zoomable : 1;
+ gboolean in_rotate : 1;
+ gboolean in_zoom : 1;
+ gboolean size_valid : 1;
+ gboolean transitions_enabled : 1;
+ gboolean in_angle_transition : 1;
+ gboolean in_scale_transition : 1;
GtkGesture *rotate_gesture;
double gesture_start_angle;
@@ -909,8 +909,6 @@ gtk_image_view_ensure_gestures (GtkImageView *image_view)
if (priv->rotatable && priv->rotate_gesture == NULL)
{
priv->rotate_gesture = gtk_gesture_rotate_new (GTK_WIDGET (image_view));
- /*gtk_event_controller_set_propagation_phase (GTK_EVENT_CONTROLLER (priv->rotate_gesture),*/
- /*GTK_PHASE_CAPTURE);*/
g_signal_connect (priv->rotate_gesture, "angle-changed", (GCallback)gesture_rotate_changed_cb,
image_view);
g_signal_connect (priv->rotate_gesture, "begin", (GCallback)gesture_rotate_begin_cb, image_view);
g_signal_connect (priv->rotate_gesture, "end", (GCallback)gesture_rotate_end_cb, image_view);
@@ -1905,21 +1903,20 @@ gtk_image_view_class_init (GtkImageViewClass *view_class)
* Since: 3.20
*/
widget_props[PROP_SCALE_SET] = g_param_spec_boolean ("scale-set",
- P_(""),
- P_("fooar"),
+ P_("Scale Set"),
+ P_("Wheter the scale property has been set by the
user or by GtkImageView itself"),
FALSE,
GTK_PARAM_READABLE|G_PARAM_EXPLICIT_NOTIFY);
/**
* GtkImageView:angle:
* The angle the surface gets rotated about.
- * This is in degrees and we rotate in the mathematically negative direction,
- * i.e. clock wise.
+ * This is in degrees and we rotate clock-wise.
*
* Since: 3.20
*/
widget_props[PROP_ANGLE] = g_param_spec_double ("angle",
- P_("angle"),
- P_("angle"),
+ P_("Angle"),
+ P_("The angle the internal surface gets rotated about"),
0.0,
360.0,
0.0,
@@ -1931,33 +1928,32 @@ gtk_image_view_class_init (GtkImageViewClass *view_class)
* Since: 3.20
*/
widget_props[PROP_ROTATABLE] = g_param_spec_boolean ("rotatable",
- P_("Foo"),
- P_("fooar"),
+ P_("Rotatable"),
+ P_("Controls user-rotatability"),
TRUE,
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
/**
* GtkImageView:zoomable:
- * Whether or not image can be scaled using a two-finger zoom gesture or not.
+ * Whether or not image can be scaled using a two-finger zoom gesture.
*
* Since: 3.20
*/
widget_props[PROP_ZOOMABLE] = g_param_spec_boolean ("zoomable",
- P_("Foo"),
- P_("fooar"),
+ P_("Zoomable"),
+ P_("Controls user-zoomability"),
TRUE,
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
/**
* GtkImageView:snap-angle:
* Whether or not the angle property snaps to 90° steps. If this is enabled
* and the angle property gets set to a non-90° step, the new value will be
- * set to the closest 90° step that is lower than the given angle.
- * Changing the angle from one 90° step to another will be transitioned
+ * set to the closest 90° step
*
* Since: 3.20
*/
widget_props[PROP_SNAP_ANGLE] = g_param_spec_boolean ("snap-angle",
- P_("Foo"),
- P_("fooar"),
+ P_("Snap Angle"),
+ P_("Snap angle to 90° steps"),
FALSE,
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
@@ -1970,21 +1966,23 @@ gtk_image_view_class_init (GtkImageViewClass *view_class)
* Since: 3.20
*/
widget_props[PROP_FIT_ALLOCATION] = g_param_spec_boolean ("fit-allocation",
- P_("Foo"),
- P_("fooar"),
+ P_("Fit Allocation"),
+ P_("Scale the image down to fit into the widget
allocation"),
FALSE,
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
/**
* GtkImageView:transitions-enabled
*
- * Whether or not certain property changes will be interpolated.
+ * Whether or not certain property changes will be interpolated. This affects a variety
+ * of function calls on a #GtkImageView instance, e.g. setting the angle property, the
+ * scale property, but also the angle snapping in case snap-angle is set.
*
* Since: 3.20
*/
widget_props[PROP_TRANSITIONS_ENABLED] = g_param_spec_boolean ("transitions-enabled",
- P_("Foo"),
- P_("fooar"),
+ P_("Transitions Enabled"),
+ P_("Wheter scale and angle changes get
interpolated"),
TRUE,
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]