[dia] Privatize connectionpoint_draw() to connectionpoint_ops.c
- From: Hans Breuer <hans src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dia] Privatize connectionpoint_draw() to connectionpoint_ops.c
- Date: Sat, 18 Sep 2010 15:42:28 +0000 (UTC)
commit 8721086f75ea60a62ca8ad3a7ffd915cd6401028
Author: Hans Breuer <hans breuer org>
Date: Sun Sep 12 21:38:47 2010 +0200
Privatize connectionpoint_draw() to connectionpoint_ops.c
app/connectionpoint_ops.c | 12 +++++++++++-
app/connectionpoint_ops.h | 3 +--
app/display.c | 6 +-----
3 files changed, 13 insertions(+), 8 deletions(-)
---
diff --git a/app/connectionpoint_ops.c b/app/connectionpoint_ops.c
index 9700ab9..d1d3fa2 100644
--- a/app/connectionpoint_ops.c
+++ b/app/connectionpoint_ops.c
@@ -29,7 +29,7 @@ static Color connectionpoint_color = { 0.4, 0.4, 1.0 };
#define CP_SZ (CONNECTIONPOINT_SIZE/2)
-void
+static void
connectionpoint_draw(ConnectionPoint *conpoint,
DDisplay *ddisp)
{
@@ -77,6 +77,16 @@ connectionpoint_draw(ConnectionPoint *conpoint,
&connectionpoint_color);
}
+void
+object_draw_connectionpoints(DiaObject *obj, DDisplay *ddisp)
+{
+ int i;
+
+ for (i=0;i<obj->num_connections;i++) {
+ connectionpoint_draw(obj->connections[i], ddisp);
+ }
+}
+
void
connectionpoint_add_update(ConnectionPoint *conpoint,
Diagram *dia)
diff --git a/app/connectionpoint_ops.h b/app/connectionpoint_ops.h
index 2d4d131..827c7ac 100644
--- a/app/connectionpoint_ops.h
+++ b/app/connectionpoint_ops.h
@@ -22,8 +22,7 @@
#include "diagram.h"
#include "display.h"
-void connectionpoint_draw(ConnectionPoint *conpoint,
- DDisplay *ddisp);
+void object_draw_connectionpoints(DiaObject *obj, DDisplay *ddisp);
void connectionpoint_add_update(ConnectionPoint *conpoint,
Diagram *dia);
void diagram_update_connections_selection(Diagram *dia);
diff --git a/app/display.c b/app/display.c
index 4b7d76a..363ebb3 100644
--- a/app/display.c
+++ b/app/display.c
@@ -617,8 +617,6 @@ ddisplay_obj_render(DiaObject *obj, DiaRenderer *renderer,
gpointer data)
{
DDisplay *ddisp = (DDisplay *)data;
- int i;
-
DiaInteractiveRendererInterface *irenderer =
DIA_GET_INTERACTIVE_RENDERER_INTERFACE (renderer);
DiaHighlightType hltype = data_object_get_highlight(DIA_DIAGRAM_DATA(ddisp->diagram), obj);
@@ -630,9 +628,7 @@ ddisplay_obj_render(DiaObject *obj, DiaRenderer *renderer,
if (ddisp->show_cx_pts &&
obj->parent_layer != NULL && obj->parent_layer->connectable) {
- for (i=0;i<obj->num_connections;i++) {
- connectionpoint_draw(obj->connections[i], ddisp);
- }
+ object_draw_connectionpoints(obj, ddisp);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]