Commit 4b2afe8d authored by Moritz Lipp's avatar Moritz Lipp

Make xembed support optional

parent c5428095
......@@ -24,6 +24,10 @@ else
LIBNOTIFY_PC_NAME =
endif
ifneq (${WITH_XEMBED},0)
CPPFLAGS += -DWITH_XEMBED
endif
ifeq (,$(findstring -DGETTEXT_PACKAGE,${CPPFLAGS}))
CPPFLAGS += -DGETTEXT_PACKAGE=\"${GETTEXT_PACKAGE}\"
endif
......@@ -31,7 +35,6 @@ ifeq (,$(findstring -DLOCALEDIR,${CPPFLAGS}))
CPPFLAGS += -DLOCALEDIR=\"${LOCALEDIR}\"
endif
all: ${PROJECT} po ${PROJECT}.pc
# pkg-config based version checks
......
......@@ -69,6 +69,9 @@ SFLAGS ?= -s
# set to something != 0 if you want verbose build output
VERBOSE ?= 0
# xembed
WITH_XEMBED ?= 1
# gettext package name
GETTEXT_PACKAGE ?= lib${PROJECT}-${SOMAJOR}
......
......@@ -327,11 +327,15 @@ girara_session_init(girara_session_t* session, const char* sessionname)
G_CALLBACK(css_template_changed), session);
/* window */
#ifdef WITH_XEMBED
if (session->gtk.embed != 0) {
session->gtk.window = gtk_plug_new(session->gtk.embed);
} else {
#endif
session->gtk.window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
#ifdef WITH_XEMBED
}
#endif
gtk_widget_set_name(GTK_WIDGET(session->gtk.window),
session->private_data->session_name);
......
......@@ -30,7 +30,9 @@ struct girara_session_s
GtkEntry *inputbar_entry; /**< Inputbar entry */
GtkNotebook *tabs; /**< The tabs notebook */
GtkBox *results; /**< Completion results */
#ifdef WITH_XEMBED
Window embed; /**< Embedded window */
#endif
} gtk;
struct
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment