aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-main.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@src.gnome.org>2009-02-07 23:01:40 +0800
committerChristian Persch <chpe@src.gnome.org>2009-02-07 23:01:40 +0800
commit642eb45983933bf096844c0acb6b841fd5fa9ad3 (patch)
tree0dab374171c9ae190c2b82142d4fb208483f4360 /src/ephy-main.c
parent2e94ce01ab4c2e802e3123cdf325be4c10af6a59 (diff)
downloadgsoc2013-epiphany-642eb45983933bf096844c0acb6b841fd5fa9ad3.tar
gsoc2013-epiphany-642eb45983933bf096844c0acb6b841fd5fa9ad3.tar.gz
gsoc2013-epiphany-642eb45983933bf096844c0acb6b841fd5fa9ad3.tar.bz2
gsoc2013-epiphany-642eb45983933bf096844c0acb6b841fd5fa9ad3.tar.lz
gsoc2013-epiphany-642eb45983933bf096844c0acb6b841fd5fa9ad3.tar.xz
gsoc2013-epiphany-642eb45983933bf096844c0acb6b841fd5fa9ad3.tar.zst
gsoc2013-epiphany-642eb45983933bf096844c0acb6b841fd5fa9ad3.zip
Add gobject introspection support; use --enable-introspection.
svn path=/trunk/; revision=8755
Diffstat (limited to 'src/ephy-main.c')
-rw-r--r--src/ephy-main.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/ephy-main.c b/src/ephy-main.c
index 5f361b665..aa4519be6 100644
--- a/src/ephy-main.c
+++ b/src/ephy-main.c
@@ -45,6 +45,10 @@
#include <errno.h>
#include <string.h>
+#ifdef ENABLE_INTROSPECTION
+#include <girepository.h>
+#endif
+
#ifdef HAVE_LIBNOTIFY
#include <libnotify/notify.h>
#endif
@@ -79,6 +83,19 @@ option_version_cb (const gchar *option_name,
return FALSE;
}
+#ifdef ENABLE_INTROSPECTION
+static gboolean
+option_introspection_dump_cb (const gchar *option_name,
+ const gchar *value,
+ gpointer data,
+ GError **error)
+{
+ g_irepository_dump (value, NULL);
+ exit (0);
+ return TRUE;
+}
+#endif /* ENABLE_INTROSPECTION */
+
static const GOptionEntry option_entries[] =
{
{ "new-tab", 'n', 0, G_OPTION_ARG_NONE, &open_in_new_tab,
@@ -101,6 +118,10 @@ static const GOptionEntry option_entries[] =
"", N_("URL …")},
{ "version", 0, G_OPTION_FLAG_NO_ARG | G_OPTION_FLAG_HIDDEN,
G_OPTION_ARG_CALLBACK, option_version_cb, NULL, NULL },
+#ifdef ENABLE_INTROSPECTION
+ { "introspect-dump", 0, G_OPTION_FLAG_HIDDEN,
+ G_OPTION_ARG_CALLBACK, option_introspection_dump_cb, NULL, NULL },
+#endif
{ NULL }
};