From 3d735db85a1a117906059174838b8861f87ec85a Mon Sep 17 00:00:00 2001 From: John Darrington Date: Thu, 30 Mar 2017 12:09:08 +0200 Subject: [PATCH] remove case-inserted signal --- src/ui/gui/psppire-data-store.c | 22 ++++++---------------- src/ui/gui/psppire-data-window.c | 6 ++---- 2 files changed, 8 insertions(+), 20 deletions(-) diff --git a/src/ui/gui/psppire-data-store.c b/src/ui/gui/psppire-data-store.c index f5e0d9060a..a2a7204724 100644 --- a/src/ui/gui/psppire-data-store.c +++ b/src/ui/gui/psppire-data-store.c @@ -1,5 +1,6 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2006, 2008, 2009, 2010, 2011, 2012, 2013, 2016 Free Software Foundation + Copyright (C) 2006, 2008, 2009, 2010, 2011, 2012, + 2013, 2016, 2017 Free Software Foundation This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -69,7 +70,6 @@ enum { ITEMS_CHANGED, CASES_DELETED, - CASE_INSERTED, CASE_CHANGED, n_SIGNALS }; @@ -274,7 +274,7 @@ psppire_data_store_class_init (PsppireDataStoreClass *class) object_class->finalize = psppire_data_store_finalize; object_class->dispose = psppire_data_store_dispose; - signals [ITEMS_CHANGED] = + signals [ITEMS_CHANGED] = g_signal_new ("changed", G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_FIRST, @@ -287,18 +287,6 @@ psppire_data_store_class_init (PsppireDataStoreClass *class) G_TYPE_UINT, G_TYPE_UINT); - signals [CASE_INSERTED] = - g_signal_new ("case-inserted", - G_TYPE_FROM_CLASS (class), - G_SIGNAL_RUN_FIRST, - 0, - NULL, NULL, - g_cclosure_marshal_VOID__INT, - G_TYPE_NONE, - 1, - G_TYPE_INT); - - signals [CASE_CHANGED] = g_signal_new ("case-changed", G_TYPE_FROM_CLASS (class), @@ -768,7 +756,9 @@ psppire_data_store_insert_case (PsppireDataStore *ds, result = datasheet_insert_rows (ds->datasheet, posn, &cc, 1); if ( result ) - g_signal_emit (ds, signals [CASE_INSERTED], 0, posn); + { + g_signal_emit (ds, signals[ITEMS_CHANGED], 0, posn, 0, 1); + } else g_warning ("Cannot insert case at position %ld\n", posn); diff --git a/src/ui/gui/psppire-data-window.c b/src/ui/gui/psppire-data-window.c index 1cc5efe8fb..391cd4e3d3 100644 --- a/src/ui/gui/psppire-data-window.c +++ b/src/ui/gui/psppire-data-window.c @@ -1,5 +1,6 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2016 Free Software Foundation + Copyright (C) 2008, 2009, 2010, 2011, 2012, 2013, 2014, + 2016, 2017 Free Software Foundation This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -1490,9 +1491,6 @@ psppire_data_window_finish_init (PsppireDataWindow *de, g_signal_connect_swapped (de->data_store, "case-changed", G_CALLBACK (set_unsaved), de); - g_signal_connect_swapped (de->data_store, "case-inserted", - G_CALLBACK (set_unsaved), de); - g_signal_connect_swapped (de->data_store, "cases-deleted", G_CALLBACK (set_unsaved), de); -- 2.30.2