diff options
| author | Maximilian Albert <maximilian.albert@gmail.com> | 2008-08-18 00:34:50 +0000 |
|---|---|---|
| committer | cilix42 <cilix42@users.sourceforge.net> | 2008-08-18 00:34:50 +0000 |
| commit | 5894666c2b7d5c580dba41acca27bd012b07db19 (patch) | |
| tree | 1ad9f5ae18143158968e4461b92ca39f94b8bcbb /src/lpe-tool-context.cpp | |
| parent | Groundwork for new LPETool tool (which consists of subtools that are construc... (diff) | |
| download | inkscape-5894666c2b7d5c580dba41acca27bd012b07db19.tar.gz inkscape-5894666c2b7d5c580dba41acca27bd012b07db19.zip | |
Let LPEToolContext derive from PenContext so that we can use its LPE framework
(bzr r6646)
Diffstat (limited to 'src/lpe-tool-context.cpp')
| -rw-r--r-- | src/lpe-tool-context.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/lpe-tool-context.cpp b/src/lpe-tool-context.cpp index a93176067..3df57027f 100644 --- a/src/lpe-tool-context.cpp +++ b/src/lpe-tool-context.cpp @@ -71,7 +71,7 @@ static void sp_lpetool_context_set(SPEventContext *ec, gchar const *key, gchar c static gint sp_lpetool_context_root_handler(SPEventContext *ec, GdkEvent *event); -static SPEventContextClass *lpetool_parent_class = 0; +static SPPenContextClass *lpetool_parent_class = 0; GType sp_lpetool_context_get_type(void) { @@ -89,7 +89,7 @@ GType sp_lpetool_context_get_type(void) (GInstanceInitFunc)sp_lpetool_context_init, 0 // value_table }; - type = g_type_register_static(SP_TYPE_EVENT_CONTEXT, "SPLPEToolContext", &info, static_cast<GTypeFlags>(0)); + type = g_type_register_static(SP_TYPE_PEN_CONTEXT, "SPLPEToolContext", &info, static_cast<GTypeFlags>(0)); } return type; } @@ -100,13 +100,13 @@ sp_lpetool_context_class_init(SPLPEToolContextClass *klass) GObjectClass *object_class = (GObjectClass *) klass; SPEventContextClass *event_context_class = (SPEventContextClass *) klass; - lpetool_parent_class = (SPEventContextClass*)g_type_class_peek_parent(klass); + lpetool_parent_class = (SPPenContextClass*)g_type_class_peek_parent(klass); object_class->dispose = sp_lpetool_context_dispose; event_context_class->setup = sp_lpetool_context_setup; event_context_class->set = sp_lpetool_context_set; - event_context_class->root_handler = sp_lpetool_context_root_handler; + //event_context_class->root_handler = sp_lpetool_context_root_handler; } static void @@ -145,10 +145,16 @@ sp_lpetool_context_setup(SPEventContext *ec) static void sp_lpetool_context_set(SPEventContext *ec, gchar const *key, gchar const *val) { + // FIXME: how to set this correcly? the value from preferences-skeleton.h doesn't seem to get + // read (it wants to set drag = 1) + lpetool_parent_class->set(ec, key, "drag"); + + /** //pass on up to parent class to handle common attributes. if ( lpetool_parent_class->set ) { lpetool_parent_class->set(ec, key, val); } + **/ } /** |
