aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2012-01-14 10:51:55 +0100
committerTed Gould <ted@gould.cx>2012-01-14 10:51:55 +0100
commit2dfe3fff249cd22eea6a993dc5ec50b129d961f1 (patch)
tree477d52f48b5159e4add6b75bd452ac162415b3f0 /tests
parentda798a2bfc8d4b1068eb1e9a1ec502cad09c59ac (diff)
downloadlibayatana-indicator-2dfe3fff249cd22eea6a993dc5ec50b129d961f1.tar.gz
libayatana-indicator-2dfe3fff249cd22eea6a993dc5ec50b129d961f1.tar.bz2
libayatana-indicator-2dfe3fff249cd22eea6a993dc5ec50b129d961f1.zip
Add a function to swap out the window entry handler
Diffstat (limited to 'tests')
-rw-r--r--tests/dummy-indicator-entry-func.c14
-rw-r--r--tests/dummy-indicator-entry-func.h2
2 files changed, 16 insertions, 0 deletions
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__ */