summaryrefslogtreecommitdiffstats
path: root/src/gui-wizard-gtk
diff options
context:
space:
mode:
authorDenys Vlasenko <dvlasenk@redhat.com>2011-02-16 15:59:46 +0100
committerDenys Vlasenko <dvlasenk@redhat.com>2011-02-16 15:59:46 +0100
commit3d930bb468cb0613098f417e6f011e366414157c (patch)
treee78377781774e1b897bc9c0c07f9719963c16dd6 /src/gui-wizard-gtk
parentc2b13d20cd718c3eedf01d40c8f2dc06de3acb21 (diff)
downloadabrt-3d930bb468cb0613098f417e6f011e366414157c.tar.gz
abrt-3d930bb468cb0613098f417e6f011e366414157c.tar.xz
abrt-3d930bb468cb0613098f417e6f011e366414157c.zip
bug-reporting-wizard: store glade file internally
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Diffstat (limited to 'src/gui-wizard-gtk')
-rw-r--r--src/gui-wizard-gtk/Makefile.am8
-rw-r--r--src/gui-wizard-gtk/main.c4
-rw-r--r--src/gui-wizard-gtk/wizard.c7
3 files changed, 16 insertions, 3 deletions
diff --git a/src/gui-wizard-gtk/Makefile.am b/src/gui-wizard-gtk/Makefile.am
index c199ad01..1c14fa86 100644
--- a/src/gui-wizard-gtk/Makefile.am
+++ b/src/gui-wizard-gtk/Makefile.am
@@ -1,6 +1,7 @@
bin_PROGRAMS = bug-reporting-wizard
bug_reporting_wizard_SOURCES = \
+ wizard_glade.c \
wizard.h wizard.c \
main.c
@@ -30,6 +31,13 @@ bug_reporting_wizard_LDADD = \
-lgmodule-2.0 \
$(GTK_LIBS)
+wizard_glade.c:
+ { \
+ echo '#define WIZARD_GLADE_CONTENTS "\'; \
+ cat $(srcdir)/wizard.glade | sed -e 's/"/\\"/g' -e 's/?/\\?/g' -e 's/$$/\\/g'; \
+ echo '"'; \
+ } >wizard_glade.c
+
DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
@INTLTOOL_DESKTOP_RULE@
diff --git a/src/gui-wizard-gtk/main.c b/src/gui-wizard-gtk/main.c
index 25d05dbd..6be2fee9 100644
--- a/src/gui-wizard-gtk/main.c
+++ b/src/gui-wizard-gtk/main.c
@@ -9,6 +9,8 @@ static crash_data_t *cd;
int main(int argc, char **argv)
{
+ gtk_init(&argc, &argv);
+
/* Can't keep these strings/structs static: _() doesn't support that */
const char *program_usage_string = _(
PROGNAME" [-v] DIR\n\n"
@@ -35,8 +37,6 @@ int main(int argc, char **argv)
cd = create_crash_data_from_dump_dir(dd);
dd_close(dd);
- gtk_init(&argc, &argv);
-
GtkWidget *assistant = create_assistant();
gtk_widget_show_all(assistant);
diff --git a/src/gui-wizard-gtk/wizard.c b/src/gui-wizard-gtk/wizard.c
index be6de7a9..c5c885fc 100644
--- a/src/gui-wizard-gtk/wizard.c
+++ b/src/gui-wizard-gtk/wizard.c
@@ -1,6 +1,8 @@
#include <gtk/gtk.h>
#include "abrtlib.h"
+#include "wizard_glade.c"
+
/* THE PAGE FLOW
* page_1: analyze action selection
* page_2: analyze progress
@@ -67,7 +69,10 @@ void on_b_refresh_clicked(GtkButton *button)
static void add_pages()
{
GError *error = NULL;
- gtk_builder_add_objects_from_file(builder, "wizard.glade", (gchar**)page_names, &error);
+ gtk_builder_add_objects_from_string(builder,
+ WIZARD_GLADE_CONTENTS, sizeof(WIZARD_GLADE_CONTENTS) - 1,
+ (gchar**)page_names,
+ &error);
if (error != NULL)
{
error_msg_and_die("can't load %s: %s", "wizard.glade", error->message);