[gitg] Add Searchable interface



commit d544fff86e31cd6e8ab077cb0d48d972d509e8cc
Author: Jesse van den Kieboom <jessevdk gnome org>
Date:   Sun Jul 13 19:09:42 2014 +0200

    Add Searchable interface

 gitg/commit/gitg-commit.vala         |    5 ----
 gitg/history/gitg-history.vala       |    5 ----
 libgitg-ext/Makefile.am              |    1 +
 libgitg-ext/gitg-ext-activity.vala   |    2 -
 libgitg-ext/gitg-ext-searchable.vala |   35 ++++++++++++++++++++++++++++++++++
 5 files changed, 36 insertions(+), 12 deletions(-)
---
diff --git a/gitg/commit/gitg-commit.vala b/gitg/commit/gitg-commit.vala
index a613079..263845f 100644
--- a/gitg/commit/gitg-commit.vala
+++ b/gitg/commit/gitg-commit.vala
@@ -39,11 +39,6 @@ namespace GitgCommit
                        owned get { return "/org/gnome/gitg/Activities/Commit"; }
                }
 
-               public bool supports_search
-               {
-                       get { return false; }
-               }
-
                [Notify]
                public Gitg.Repository repository
                {
diff --git a/gitg/history/gitg-history.vala b/gitg/history/gitg-history.vala
index 04d1c13..a9609f8 100644
--- a/gitg/history/gitg-history.vala
+++ b/gitg/history/gitg-history.vala
@@ -52,11 +52,6 @@ namespace GitgHistory
                        owned get { return "/org/gnome/gitg/Activities/History"; }
                }
 
-               public bool supports_search
-               {
-                       get { return false; }
-               }
-
                private Gitg.Repository d_repository;
 
                [Notify]
diff --git a/libgitg-ext/Makefile.am b/libgitg-ext/Makefile.am
index 068a342..f02e5ea 100644
--- a/libgitg-ext/Makefile.am
+++ b/libgitg-ext/Makefile.am
@@ -57,6 +57,7 @@ libgitg_ext_libgitg_ext_1_0_la_VALASOURCES =          \
        libgitg-ext/gitg-ext-history-panel.vala         \
        libgitg-ext/gitg-ext-command-line.vala          \
        libgitg-ext/gitg-ext-preferences.vala           \
+       libgitg-ext/gitg-ext-searchable.vala            \
        libgitg-ext/gitg-ext-ui.vala                    \
        libgitg-ext/gitg-ext-user-query.vala            \
        libgitg/libgitg-1.0.vapi
diff --git a/libgitg-ext/gitg-ext-activity.vala b/libgitg-ext/gitg-ext-activity.vala
index 07ccc59..ffe68c2 100644
--- a/libgitg-ext/gitg-ext-activity.vala
+++ b/libgitg-ext/gitg-ext-activity.vala
@@ -42,8 +42,6 @@ public interface Activity : Object, UIElement
        {
                return false;
        }
-
-       public abstract bool supports_search { get; }
 }
 
 }
diff --git a/libgitg-ext/gitg-ext-searchable.vala b/libgitg-ext/gitg-ext-searchable.vala
new file mode 100644
index 0000000..23a8852
--- /dev/null
+++ b/libgitg-ext/gitg-ext-searchable.vala
@@ -0,0 +1,35 @@
+/*
+ * This file is part of gitg
+ *
+ * Copyright (C) 2014 - Jesse van den Kieboom
+ *
+ * gitg is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * gitg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with gitg. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+namespace GitgExt
+{
+
+/**
+ * gitg Searchable interface.
+ *
+ * The Searchable interface can be implemented when an activity supports a
+ * searching.
+ */
+public interface Searchable : Object, Activity
+{
+}
+
+}
+
+// ex: ts=4 noet


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]