[gnumeric] GnmSheetSel: add preconditions
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] GnmSheetSel: add preconditions
- Date: Tue, 10 Apr 2018 19:26:31 +0000 (UTC)
commit 42f454400b0a8978a32063e93d388e4f6f08494c
Author: Morten Welinder <terra gnome org>
Date: Tue Apr 10 15:25:53 2018 -0400
GnmSheetSel: add preconditions
src/widgets/gnm-sheet-sel.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/widgets/gnm-sheet-sel.c b/src/widgets/gnm-sheet-sel.c
index b04db78..5b5778d 100644
--- a/src/widgets/gnm-sheet-sel.c
+++ b/src/widgets/gnm-sheet-sel.c
@@ -100,7 +100,7 @@ gnm_sheet_sel_init (GnmSheetSel *ss)
static void
gnm_sheet_sel_set_property (GObject *object, guint property_id,
- const GValue *value, GParamSpec *pspec)
+ const GValue *value, GParamSpec *pspec)
{
GnmSheetSel *ss = (GnmSheetSel *)object;
@@ -116,7 +116,7 @@ gnm_sheet_sel_set_property (GObject *object, guint property_id,
static void
gnm_sheet_sel_get_property (GObject *object, guint property_id,
- GValue *value, GParamSpec *pspec)
+ GValue *value, GParamSpec *pspec)
{
GnmSheetSel *ss = (GnmSheetSel *)object;
@@ -164,6 +164,8 @@ gnm_sheet_sel_set_sheets (GnmSheetSel *ss, GSList *sheets)
GtkMenu *menu;
GSList *l;
+ g_return_if_fail (GNM_IS_SHEET_SEL (ss));
+
menu = GTK_MENU (gtk_menu_new ());
for (l = sheets; l; l = l->next) {
@@ -201,6 +203,9 @@ cb_wb_changed (GnmWorkbookSel *wbs,
void
gnm_sheet_sel_link (GnmSheetSel *ss, GnmWorkbookSel *wbs)
{
+ g_return_if_fail (GNM_IS_SHEET_SEL (ss));
+ g_return_if_fail (GNM_IS_WORKBOOK_SEL (wbs));
+
g_signal_connect_object
(wbs,
"notify::workbook", G_CALLBACK (cb_wb_changed),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]