From 2dfe3fff249cd22eea6a993dc5ec50b129d961f1 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Sat, 14 Jan 2012 10:51:55 +0100 Subject: Add a function to swap out the window entry handler --- tests/dummy-indicator-entry-func.c | 14 ++++++++++++++ tests/dummy-indicator-entry-func.h | 2 ++ 2 files changed, 16 insertions(+) (limited to 'tests') diff --git a/tests/dummy-indicator-entry-func.c b/tests/dummy-indicator-entry-func.c index 96e5ad0..ac330aa 100644 --- a/tests/dummy-indicator-entry-func.c +++ b/tests/dummy-indicator-entry-func.c @@ -128,3 +128,17 @@ dummy_indicator_entry_func_finalize (GObject *object) G_OBJECT_CLASS (dummy_indicator_entry_func_parent_class)->finalize (object); return; } + +void +dummy_indicator_entry_func_support_window(DummyIndicatorEntryFunc * ind, gboolean different) +{ + DummyIndicatorEntryFuncClass * entry_class = DUMMY_INDICATOR_ENTRY_FUNC_GET_CLASS(ind); + + if (different) { + entry_class->parent_class.entry_activate_window = entry_activate_window; + } else { + entry_class->parent_class.entry_activate_window = NULL; + } + + return; +} diff --git a/tests/dummy-indicator-entry-func.h b/tests/dummy-indicator-entry-func.h index f5c8264..d22abed 100644 --- a/tests/dummy-indicator-entry-func.h +++ b/tests/dummy-indicator-entry-func.h @@ -53,4 +53,6 @@ struct _DummyIndicatorEntryFunc { gboolean entry_close_called; }; +void dummy_indicator_entry_func_support_window(DummyIndicatorEntryFunc * ind, gboolean different); + #endif /* __DUMMY_INDICATOR_ENTRY_FUNC__ */ -- cgit v1.2.3