[seahorse] Port SeahorseViewable to vala
- From: Stefan Walter <stefw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [seahorse] Port SeahorseViewable to vala
- Date: Sun, 21 Apr 2013 13:30:59 +0000 (UTC)
commit 4263c33990f0aeef21ed9be4e4c1d3e68e32787e
Author: Stef Walter <stefw gnome org>
Date: Tue Oct 23 22:08:08 2012 +0200
Port SeahorseViewable to vala
common/Makefile.am | 6 +++-
common/seahorse-viewable.vala | 36 +++++++++++++++++++++
gkr/seahorse-gkr-item.c | 1 -
gkr/seahorse-gkr-keyring.c | 1 -
libseahorse/Makefile.am | 1 -
libseahorse/seahorse-catalog.c | 1 -
libseahorse/seahorse-search-provider.c | 2 +-
libseahorse/seahorse-viewable.c | 59 ----------------------------------
libseahorse/seahorse-viewable.h | 55 -------------------------------
pgp/seahorse-pgp-key.c | 2 +-
pkcs11/seahorse-certificate.c | 1 -
pkcs11/seahorse-private-key.c | 1 -
po/POTFILES.in | 2 +-
src/seahorse-sidebar.c | 1 -
ssh/seahorse-ssh-key.c | 1 -
15 files changed, 44 insertions(+), 126 deletions(-)
---
diff --git a/common/Makefile.am b/common/Makefile.am
index e983333..e3eabf8 100644
--- a/common/Makefile.am
+++ b/common/Makefile.am
@@ -11,6 +11,7 @@ libcommon_la_SOURCES = \
seahorse-deleter.vala \
seahorse-exportable.vala \
seahorse-exporter.vala \
+ seahorse-viewable.vala \
$(NULL)
AM_VALAFLAGS = \
@@ -24,4 +25,7 @@ CFLAGS = \
-include config.h \
-Wno-unused-but-set-variable \
-Wno-pointer-sign \
- $(NULL)
\ No newline at end of file
+ $(NULL)
+
+EXTRA_DIST = \
+ seahorse-common.h
\ No newline at end of file
diff --git a/common/seahorse-viewable.vala b/common/seahorse-viewable.vala
new file mode 100644
index 0000000..29c345b
--- /dev/null
+++ b/common/seahorse-viewable.vala
@@ -0,0 +1,36 @@
+/*
+ * Seahorse
+ *
+ * Copyright (C) 2011 Collabora Ltd.
+ * Copyright (C) 2012 Stefan Walter
+ *
+ * This program 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.
+ *
+ * This program 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 this program; if not, write to the
+ * Free Software Foundation, Inc.,
+ * 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ * Author: Stef Walter <stefw collabora co uk>
+ */
+
+namespace Seahorse
+{
+
+public interface Viewable : GLib.Object {
+ public abstract void show_viewer(Gtk.Window? parent);
+
+ public static bool can_view(GLib.Object object) {
+ return object is Viewable;
+ }
+}
+
+}
diff --git a/gkr/seahorse-gkr-item.c b/gkr/seahorse-gkr-item.c
index 927d49c..757b4d2 100644
--- a/gkr/seahorse-gkr-item.c
+++ b/gkr/seahorse-gkr-item.c
@@ -38,7 +38,6 @@
#include "seahorse-icons.h"
#include "seahorse-place.h"
#include "seahorse-util.h"
-#include "seahorse-viewable.h"
#define GENERIC_SECRET "org.freedesktop.Secret.Generic"
#define NETWORK_PASSWORD "org.gnome.keyring.NetworkPassword"
diff --git a/gkr/seahorse-gkr-keyring.c b/gkr/seahorse-gkr-keyring.c
index 1e89c17..b05cd0b 100644
--- a/gkr/seahorse-gkr-keyring.c
+++ b/gkr/seahorse-gkr-keyring.c
@@ -34,7 +34,6 @@
#include "seahorse-lockable.h"
#include "seahorse-progress.h"
#include "seahorse-util.h"
-#include "seahorse-viewable.h"
#include <gcr/gcr.h>
diff --git a/libseahorse/Makefile.am b/libseahorse/Makefile.am
index 03df519..79fa7c3 100644
--- a/libseahorse/Makefile.am
+++ b/libseahorse/Makefile.am
@@ -72,7 +72,6 @@ libseahorse_la_SOURCES = \
seahorse-types.c seahorse-types.h \
seahorse-util.c seahorse-util.h \
seahorse-validity.c seahorse-validity.h \
- seahorse-viewable.c seahorse-viewable.h \
seahorse-widget.c seahorse-widget.h \
$(dbus_shell_search_provider_built_sources) \
$(MARSHAL_SRCS) \
diff --git a/libseahorse/seahorse-catalog.c b/libseahorse/seahorse-catalog.c
index 62bd618..f358dba 100644
--- a/libseahorse/seahorse-catalog.c
+++ b/libseahorse/seahorse-catalog.c
@@ -32,7 +32,6 @@
#include "seahorse-progress.h"
#include "seahorse-registry.h"
#include "seahorse-util.h"
-#include "seahorse-viewable.h"
#include <gcr/gcr.h>
diff --git a/libseahorse/seahorse-search-provider.c b/libseahorse/seahorse-search-provider.c
index 4729e3e..85f2727 100644
--- a/libseahorse/seahorse-search-provider.c
+++ b/libseahorse/seahorse-search-provider.c
@@ -29,7 +29,7 @@
#include "seahorse-backend.h"
#include "seahorse-predicate.h"
-#include "seahorse-viewable.h"
+#include "seahorse-common.h"
#include "seahorse-widget.h"
#include "seahorse-collection.h"
diff --git a/pgp/seahorse-pgp-key.c b/pgp/seahorse-pgp-key.c
index d5b6af4..550f0bf 100644
--- a/pgp/seahorse-pgp-key.c
+++ b/pgp/seahorse-pgp-key.c
@@ -26,10 +26,10 @@
#include "seahorse-pgp-uid.h"
#include "seahorse-pgp-subkey.h"
+#include "seahorse-common.h"
#include "seahorse-icons.h"
#include "seahorse-object-list.h"
#include "seahorse-util.h"
-#include "seahorse-viewable.h"
#include <gcr/gcr.h>
diff --git a/pkcs11/seahorse-certificate.c b/pkcs11/seahorse-certificate.c
index c73fc79..5898823 100644
--- a/pkcs11/seahorse-certificate.c
+++ b/pkcs11/seahorse-certificate.c
@@ -35,7 +35,6 @@
#include "seahorse-common.h"
#include "seahorse-util.h"
#include "seahorse-validity.h"
-#include "seahorse-viewable.h"
#include <gcr/gcr.h>
diff --git a/pkcs11/seahorse-private-key.c b/pkcs11/seahorse-private-key.c
index 31fe931..5d63c5d 100644
--- a/pkcs11/seahorse-private-key.c
+++ b/pkcs11/seahorse-private-key.c
@@ -32,7 +32,6 @@
#include "seahorse-common.h"
#include "seahorse-util.h"
-#include "seahorse-viewable.h"
#include <gcr/gcr.h>
diff --git a/po/POTFILES.in b/po/POTFILES.in
index b71c430..42baff2 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,5 +1,6 @@
# List of source files containing translatable strings.
# Please keep this file sorted alphabetically.
+common/seahorse-exportable.c
[type: gettext/glade]gkr/seahorse-add-keyring.xml
gkr/seahorse-gkr-actions.c
gkr/seahorse-gkr-add-item.c
@@ -18,7 +19,6 @@ libegg/egg-datetime.c
[type: gettext/glade]libseahorse/seahorse-add-keyserver.xml
libseahorse/seahorse-application.c
libseahorse/seahorse-catalog.c
-libseahorse/seahorse-exportable.c
libseahorse/seahorse-interaction.c
libseahorse/seahorse-key-manager-store.c
libseahorse/seahorse-object.c
diff --git a/src/seahorse-sidebar.c b/src/seahorse-sidebar.c
index e332db7..abc4e04 100644
--- a/src/seahorse-sidebar.c
+++ b/src/seahorse-sidebar.c
@@ -31,7 +31,6 @@
#include "seahorse-lockable.h"
#include "seahorse-place.h"
#include "seahorse-util.h"
-#include "seahorse-viewable.h"
#include "gkr/seahorse-gkr.h"
#include "pgp/seahorse-pgp.h"
diff --git a/ssh/seahorse-ssh-key.c b/ssh/seahorse-ssh-key.c
index c2533bf..f38c576 100644
--- a/ssh/seahorse-ssh-key.c
+++ b/ssh/seahorse-ssh-key.c
@@ -34,7 +34,6 @@
#include "seahorse-icons.h"
#include "seahorse-place.h"
#include "seahorse-validity.h"
-#include "seahorse-viewable.h"
#include <gcr/gcr.h>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]