[gimp] app: add gimp_display_shell_has_filter()
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: add gimp_display_shell_has_filter()
- Date: Mon, 1 Jun 2015 06:16:56 +0000 (UTC)
commit 1b9a8b71ba5ea16543379a9f12c71121fa431f3b
Author: Michael Natterer <mitch gimp org>
Date: Mon Jun 1 08:16:12 2015 +0200
app: add gimp_display_shell_has_filter()
which checks if there are any filters active on the display.
app/display/gimpdisplayshell-filter.c | 8 ++++++++
app/display/gimpdisplayshell-filter.h | 11 +++++++----
2 files changed, 15 insertions(+), 4 deletions(-)
---
diff --git a/app/display/gimpdisplayshell-filter.c b/app/display/gimpdisplayshell-filter.c
index 47f7015..773ce75 100644
--- a/app/display/gimpdisplayshell-filter.c
+++ b/app/display/gimpdisplayshell-filter.c
@@ -74,6 +74,14 @@ gimp_display_shell_filter_set (GimpDisplayShell *shell,
gimp_display_shell_filter_changed (NULL, shell);
}
+gboolean
+gimp_display_shell_has_filter (GimpDisplayShell *shell)
+{
+ g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
+
+ return shell->filter_stack && shell->filter_stack->filters;
+}
+
GimpColorDisplayStack *
gimp_display_shell_filter_new (GimpDisplayShell *shell,
GimpColorConfig *config)
diff --git a/app/display/gimpdisplayshell-filter.h b/app/display/gimpdisplayshell-filter.h
index 20b8947..af22c3d 100644
--- a/app/display/gimpdisplayshell-filter.h
+++ b/app/display/gimpdisplayshell-filter.h
@@ -19,11 +19,14 @@
#define __GIMP_DISPLAY_SHELL_FILTER_H__
-void gimp_display_shell_filter_set (GimpDisplayShell *shell,
- GimpColorDisplayStack *stack);
+void gimp_display_shell_filter_set (GimpDisplayShell *shell,
+ GimpColorDisplayStack *stack);
-GimpColorDisplayStack * gimp_display_shell_filter_new (GimpDisplayShell *shell,
- GimpColorConfig *config);
+gboolean gimp_display_shell_has_filter (GimpDisplayShell *shell);
+
+GimpColorDisplayStack *
+ gimp_display_shell_filter_new (GimpDisplayShell *shell,
+ GimpColorConfig *config);
#endif /* __GIMP_DISPLAY_SHELL_FILTER_H__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]