aboutsummaryrefslogtreecommitdiffstats
path: root/libgnomecanvas
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-05-21 22:02:58 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-05-22 05:56:06 +0800
commitcb97c2dc8fd97b381af048f206333d5e557892ae (patch)
treec2901380e607a3b439abb1bed165344ba8f4fc83 /libgnomecanvas
parent64fa8ad9c0851e2d5c1e90ac2e75af8d455d9fea (diff)
downloadgsoc2013-evolution-cb97c2dc8fd97b381af048f206333d5e557892ae.tar.gz
gsoc2013-evolution-cb97c2dc8fd97b381af048f206333d5e557892ae.tar.zst
gsoc2013-evolution-cb97c2dc8fd97b381af048f206333d5e557892ae.zip
Coding style and whitespace cleanup.
Diffstat (limited to 'libgnomecanvas')
-rw-r--r--libgnomecanvas/gailcanvaswidget.c8
-rw-r--r--libgnomecanvas/gnome-canvas-text.c40
-rw-r--r--libgnomecanvas/gnome-canvas-widget.c5
-rw-r--r--libgnomecanvas/gnome-canvas.c19
4 files changed, 49 insertions, 23 deletions
diff --git a/libgnomecanvas/gailcanvaswidget.c b/libgnomecanvas/gailcanvaswidget.c
index 7b49563322..3e61924b03 100644
--- a/libgnomecanvas/gailcanvaswidget.c
+++ b/libgnomecanvas/gailcanvaswidget.c
@@ -22,9 +22,11 @@
#include <libgnomecanvas/gnome-canvas-widget.h>
#include "gailcanvaswidget.h"
-static gint gail_canvas_widget_get_n_children (AtkObject *obj);
-static AtkObject* gail_canvas_widget_ref_child (AtkObject *obj,
- gint i);
+static gint gail_canvas_widget_get_n_children
+ (AtkObject *obj);
+static AtkObject *
+ gail_canvas_widget_ref_child (AtkObject *obj,
+ gint i);
G_DEFINE_TYPE (GailCanvasWidget,
gail_canvas_widget,
diff --git a/libgnomecanvas/gnome-canvas-text.c b/libgnomecanvas/gnome-canvas-text.c
index 81176df6e8..35a109b937 100644
--- a/libgnomecanvas/gnome-canvas-text.c
+++ b/libgnomecanvas/gnome-canvas-text.c
@@ -935,9 +935,9 @@ gnome_canvas_text_get_property (GObject *object,
switch (param_id) {
case PROP_FONT:
{
- /* FIXME GValue imposes a totally gratuitous string copy
- * here, we could just hand off string ownership
- */
+ /* FIXME GValue imposes a totally gratuitous string
+ * copy here, we could just hand off string
+ * ownership. */
gchar *str;
str = pango_font_description_to_string (text->font_desc);
@@ -952,34 +952,52 @@ gnome_canvas_text_get_property (GObject *object,
break;
case PROP_FAMILY:
- g_value_set_string (value, pango_font_description_get_family (text->font_desc));
+ g_value_set_string (
+ value,
+ pango_font_description_get_family (
+ text->font_desc));
break;
case PROP_STYLE:
- g_value_set_enum (value, pango_font_description_get_style (text->font_desc));
+ g_value_set_enum (
+ value,
+ pango_font_description_get_style (
+ text->font_desc));
break;
case PROP_VARIANT:
- g_value_set_enum (value, pango_font_description_get_variant (text->font_desc));
+ g_value_set_enum (
+ value,
+ pango_font_description_get_variant (
+ text->font_desc));
break;
case PROP_WEIGHT:
- g_value_set_int (value, pango_font_description_get_weight (text->font_desc));
+ g_value_set_int (
+ value,
+ pango_font_description_get_weight (
+ text->font_desc));
break;
case PROP_STRETCH:
- g_value_set_enum (value, pango_font_description_get_stretch (text->font_desc));
+ g_value_set_enum (
+ value,
+ pango_font_description_get_stretch (
+ text->font_desc));
break;
case PROP_SIZE:
- g_value_set_int (value, pango_font_description_get_size (text->font_desc));
+ g_value_set_int (
+ value,
+ pango_font_description_get_size (
+ text->font_desc));
break;
case PROP_SIZE_POINTS:
g_value_set_double (
value, ((gdouble)
- pango_font_description_get_size (text->font_desc)) /
- (gdouble) PANGO_SCALE);
+ pango_font_description_get_size (
+ text->font_desc)) / (gdouble) PANGO_SCALE);
break;
}
break;
diff --git a/libgnomecanvas/gnome-canvas-widget.c b/libgnomecanvas/gnome-canvas-widget.c
index 5fe04ba12b..8d34911dff 100644
--- a/libgnomecanvas/gnome-canvas-widget.c
+++ b/libgnomecanvas/gnome-canvas-widget.c
@@ -100,8 +100,9 @@ gnome_canvas_widget_get_type (void)
NULL /* value_table */
};
- widget_type = g_type_register_static (GNOME_TYPE_CANVAS_ITEM, "GnomeCanvasWidget",
- &object_info, 0);
+ widget_type = g_type_register_static (
+ GNOME_TYPE_CANVAS_ITEM,
+ "GnomeCanvasWidget", &object_info, 0);
}
return widget_type;
diff --git a/libgnomecanvas/gnome-canvas.c b/libgnomecanvas/gnome-canvas.c
index 38a6757a78..0ea1e30198 100644
--- a/libgnomecanvas/gnome-canvas.c
+++ b/libgnomecanvas/gnome-canvas.c
@@ -2183,12 +2183,16 @@ scroll_to (GnomeCanvas *canvas, gint cx, gint cy)
} else
canvas->zoom_yofs = 0;
- if ((canvas->zoom_xofs != old_zoom_xofs) || (canvas->zoom_yofs != old_zoom_yofs)) {
- /* This can only occur, if either canvas size or widget size changes */
- /* So I think we can request full redraw here */
- /* The reason is, that coverage UTA will be invalidated by offset change */
- /* fixme: Strictly this is not correct - we have to remove our own idle (Lauris) */
- /* More stuff - we have to mark root as needing fresh affine (Lauris) */
+ if ((canvas->zoom_xofs != old_zoom_xofs) ||
+ (canvas->zoom_yofs != old_zoom_yofs)) {
+ /* This can only occur, if either canvas size or widget
+ * size changes. So I think we can request full redraw
+ * here. The reason is, that coverage UTA will be
+ * invalidated by offset change. */
+ /* FIXME Strictly this is not correct - we have to remove
+ * our own idle (Lauris) */
+ /* More stuff - we have to mark root as needing fresh affine
+ * (Lauris) */
if (!(canvas->root->flags & GNOME_CANVAS_ITEM_NEED_AFFINE)) {
canvas->root->flags |= GNOME_CANVAS_ITEM_NEED_AFFINE;
gnome_canvas_request_update (canvas);
@@ -2526,7 +2530,8 @@ pick_current_item (GnomeCanvas *canvas, GdkEvent *event)
} else
canvas->new_current_item = NULL;
- if ((canvas->new_current_item == canvas->current_item) && !canvas->left_grabbed_item)
+ if ((canvas->new_current_item == canvas->current_item)
+ && !canvas->left_grabbed_item)
return retval; /* current item did not change */
/* Synthesize events for old and new current items */