Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Archive
vinagre
Commits
3f94cf5b
Commit
3f94cf5b
authored
Jul 26, 2010
by
Jonh Wendell
Browse files
Add GObject introspection support
parent
5546337e
Changes
5
Hide whitespace changes
Inline
Side-by-side
configure.ac
View file @
3f94cf5b
...
...
@@ -286,6 +286,16 @@ AC_SUBST(VINAGRE_PLUGINS_DATA_DIR)
VINAGRE_PLUGINS_LIBS_DIR="$libdir/vinagre-1/plugins"
AC_SUBST(VINAGRE_PLUGINS_LIBS_DIR)
# Introspection
GOBJECT_INTROSPECTION_CHECK([0.9.3])
if test "$found_introspection" = "yes"; then
enable_introspection=yes
AC_DEFINE([ENABLE_INTROSPECTION], [1], [Define to enable GObject Introspection])
else
enable_introspection=no
fi
#*******************************************************************************
AC_CONFIG_FILES([
Makefile
...
...
@@ -316,6 +326,7 @@ Configure summary:
Compiler ...................: ${CC}
Compiler Flags .............: ${CFLAGS}
GObject Introspection.......: $enable_introspection
Avahi enabled ..............: ${enable_avahi}
GNOME Panel applet..........: ${enable_applet}
...
...
vinagre/Makefile.am
View file @
3f94cf5b
...
...
@@ -13,6 +13,7 @@ INCLUDES = \
-DSSH_PROGRAM
=
\"
$(SSH_PROGRAM)
\"
\
$(VINAGRE_CFLAGS)
\
$(AVAHI_CFLAGS)
\
$(INTROSPECTION_CFLAGS)
\
$(NULL)
NOINST_H_FILES
=
\
...
...
@@ -114,6 +115,7 @@ vinagre_LDADD = \
$(VINAGRE_LIBS)
\
$(AVAHI_LIBS)
\
$(GTKVNC_LIBS)
\
$(INTROSPECTION_LIBS)
\
$(NULL)
vinagre_LDFLAGS
=
-export-dynamic
-no-undefined
-export-symbols-regex
"^[[^_]].*"
...
...
@@ -263,6 +265,25 @@ handwritten_sources += \
endif
if
HAVE_INTROSPECTION
-include
$(INTROSPECTION_MAKEFILE)
INTROSPECTION_GIRS
=
Vinagre-3.0.gir
Vinagre-3.0.gir
:
vinagre
INTROSPECTION_SCANNER_ARGS
=
$(VINAGRE_CFLAGS)
-I
$(top_srcdir)
--warn-all
Vinagre_3_0_gir_NAMESPACE
=
Vinagre
Vinagre_3_0_gir_VERSION
=
3.0
Vinagre_3_0_gir_PROGRAM
=
$(builddir)
/vinagre
Vinagre_3_0_gir_FILES
=
$(INST_H_FILES)
$(NOINST_H_FILES)
$(handwritten_sources)
Vinagre_3_0_gir_INCLUDES
=
Gtk-3.0 libxml2-2.0
girdir
=
$(datadir)
/vinagre/gir-1.0
gir_DATA
=
$(INTROSPECTION_GIRS)
typelibdir
=
$(libdir)
/vinagre/girepository-1.0
typelib_DATA
=
$(INTROSPECTION_GIRS:.gir=.typelib)
endif
DISTCLEANFILES
=
\
$(BUILT_SOURCES)
\
$(server_in_files)
\
...
...
vinagre/vinagre-connection.c
View file @
3f94cf5b
...
...
@@ -701,7 +701,7 @@ vinagre_connection_get_string_rep (VinagreConnection *conn,
void
vinagre_connection_fill_writer
(
VinagreConnection
*
conn
,
xmlTextWriter
*
writer
)
xmlTextWriter
Ptr
writer
)
{
VINAGRE_CONNECTION_GET_CLASS
(
conn
)
->
impl_fill_writer
(
conn
,
writer
);
}
...
...
vinagre/vinagre-connection.h
View file @
3f94cf5b
...
...
@@ -44,7 +44,7 @@ struct _VinagreConnectionClass
GObjectClass
parent_class
;
/* Virtual functions */
void
(
*
impl_fill_writer
)
(
VinagreConnection
*
conn
,
xmlTextWriter
*
writer
);
void
(
*
impl_fill_writer
)
(
VinagreConnection
*
conn
,
xmlTextWriter
Ptr
writer
);
void
(
*
impl_parse_item
)
(
VinagreConnection
*
conn
,
xmlNode
*
root
);
gchar
*
(
*
impl_get_best_name
)
(
VinagreConnection
*
conn
);
void
(
*
impl_fill_conn_from_file
)
(
VinagreConnection
*
conn
,
GKeyFile
*
file
);
...
...
@@ -106,7 +106,7 @@ gchar* vinagre_connection_get_string_rep (VinagreConnection *conn,
/* vinagre_connection_fill_writer(): Used to fill a xml writer when saving bookmarks.
subclasses must inherit from it and call super() */
void
vinagre_connection_fill_writer
(
VinagreConnection
*
conn
,
xmlTextWriter
*
writer
);
xmlTextWriter
Ptr
writer
);
/* vinagre_connection_parse_item(): Used to parse a xml item when loading bookmarks.
subclasses must inherit from it and call super() */
...
...
vinagre/vinagre-main.c
View file @
3f94cf5b
...
...
@@ -22,6 +22,10 @@
#include
<config.h>
#endif
#ifdef ENABLE_INTROSPECTION
#include
<girepository.h>
#endif
#include
<glib/gi18n.h>
#include
<gtk/gtk.h>
#include
<locale.h>
...
...
@@ -77,6 +81,10 @@ int main (int argc, char **argv) {
g_option_context_add_main_entries
(
context
,
all_options
,
GETTEXT_PACKAGE
);
g_option_context_add_group
(
context
,
gtk_get_option_group
(
TRUE
));
#ifdef ENABLE_INTROSPECTION
g_option_context_add_group
(
context
,
g_irepository_get_option_group
());
#endif
for
(
l
=
plugins
;
l
;
l
=
l
->
next
)
{
GSList
*
groups
,
*
l2
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment