summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2295ac5)
raw | patch | inline | side by side (parent: 2295ac5)
author | mental <mental@users.sourceforge.net> | |
Sat, 29 Jul 2006 21:00:34 +0000 (21:00 +0000) | ||
committer | mental <mental@users.sourceforge.net> | |
Sat, 29 Jul 2006 21:00:34 +0000 (21:00 +0000) |
ChangeLog | patch | blob | history | |
src/desktop.cpp | patch | blob | history | |
src/desktop.h | patch | blob | history |
diff --git a/ChangeLog b/ChangeLog
index ec994c951dc3daf1815c58a73f893e17473685bc..c4869d4feb029c2635833dfd36650ea82e7c8fc0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
2006-06-29 MenTaLguY <mental@rydia.net>
- * src/widgets/desktop-widget.cpp, src/widgets/desktop-widget.h,
- src/widgets/gradient-image.cpp, src/widgets/gradient-image.h,
- src/widgets/gradient-toolbar.cpp, src/widgets/gradient-toolbar.cpp:
+ * src/desktop.cpp, src/desktop.h, src/widgets/desktop-widget.cpp,
+ src/widgets/desktop-widget.h, src/widgets/gradient-image.cpp,
+ src/widgets/gradient-image.h, src/widgets/gradient-toolbar.cpp,
+ src/widgets/gradient-toolbar.cpp:
switch to sigc++ SPObject signals
diff --git a/src/desktop.cpp b/src/desktop.cpp
index b418627045df098f1ad26531f18710da560f5f36..189ab9866c6a4148596ed15637585cea1a5d8340 100644 (file)
--- a/src/desktop.cpp
+++ b/src/desktop.cpp
static void _layer_hierarchy_changed(SPObject *top, SPObject *bottom, SPDesktop *desktop);
static void _reconstruction_start(SPDesktop * desktop);
static void _reconstruction_finish(SPDesktop * desktop);
-static void _namedview_modified (SPNamedView *nv, guint flags, SPDesktop *desktop);
+static void _namedview_modified (SPObject *obj, guint flags, SPDesktop *desktop);
static void _update_snap_distances (SPDesktop *desktop);
/**
_doc2dt[5] = sp_document_height (document);
sp_canvas_item_affine_absolute (SP_CANVAS_ITEM (drawing), _doc2dt);
- g_signal_connect (G_OBJECT (namedview), "modified", G_CALLBACK (_namedview_modified), this);
-
+ _modified_connection = namedview->connectModified(sigc::bind<2>(sigc::ptr_fun(&_namedview_modified), this));
NRArenaItem *ai = sp_item_invoke_show (SP_ITEM (sp_document_root (document)),
SP_CANVAS_ARENA (drawing)->arena,
_deactivate_connection.disconnect();
_sel_modified_connection.disconnect();
_sel_changed_connection.disconnect();
+ _modified_connection.disconnect();
while (event_context) {
SPEventContext *ec = event_context;
delete _guides_message_context;
_guides_message_context = NULL;
- sp_signal_disconnect_by_data (G_OBJECT (namedview), this);
+ _modified_connection.disconnect();
g_list_free (zooms_past);
g_list_free (zooms_future);
NRArenaItem *ai;
namedview = sp_document_namedview (doc, NULL);
- g_signal_connect (G_OBJECT (namedview), "modified", G_CALLBACK (_namedview_modified), this);
+ _modified_connection = namedview->connectModified(sigc::bind<2>(sigc::ptr_fun(&_namedview_modified), this));
number = namedview->getViewCount();
ai = sp_item_invoke_show (SP_ITEM (sp_document_root (doc)),
* Namedview_modified callback.
*/
static void
-_namedview_modified (SPNamedView *nv, guint flags, SPDesktop *desktop)
+_namedview_modified (SPObject *obj, guint flags, SPDesktop *desktop)
{
+ SPNamedView *nv=SP_NAMEDVIEW(obj);
+
if (flags & SP_OBJECT_MODIFIED_FLAG) {
/* Recalculate snap distances */
diff --git a/src/desktop.h b/src/desktop.h
index 8e31e2e7dab590b85a3de3b47b9bf0c8525f0463..e499358c7d4ab23e77297403b8960e30677774a3 100644 (file)
--- a/src/desktop.h
+++ b/src/desktop.h
sigc::connection _reconstruction_start_connection;
sigc::connection _reconstruction_finish_connection;
sigc::connection _commit_connection;
+ sigc::connection _modified_connection;
virtual void onPositionSet (double, double);
virtual void onResized (double, double);