summaryrefslogtreecommitdiff
path: root/frontends
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2018-08-26 11:22:20 +0100
committerVincent Sanders <vince@kyllikki.org>2018-08-26 11:22:20 +0100
commit487309a1e673c406f97cdd3cfd64b77f7d2e5582 (patch)
tree09dfd683863f1b8ea1837540a7b2a94a80d18f9c /frontends
parent4765c68a15545a2c5465781f2957d771e5c7eb77 (diff)
downloadnetsurf-487309a1e673c406f97cdd3cfd64b77f7d2e5582.tar.gz
netsurf-487309a1e673c406f97cdd3cfd64b77f7d2e5582.tar.bz2
fixup usage of gvalue init macro
Diffstat (limited to 'frontends')
-rw-r--r--frontends/gtk/compat.h6
-rw-r--r--frontends/gtk/completion.c5
2 files changed, 8 insertions, 3 deletions
diff --git a/frontends/gtk/compat.h b/frontends/gtk/compat.h
index d822e2dee..2276229c1 100644
--- a/frontends/gtk/compat.h
+++ b/frontends/gtk/compat.h
@@ -80,6 +80,12 @@ typedef enum {
} GtkAlign;
#endif
+/* value init since gtk 2.30 */
+#ifndef G_VALUE_INIT
+#define G_VALUE_INIT { 0, { { 0 } } }
+#endif
+
+
/**
* Set the alignment of a widget.
*
diff --git a/frontends/gtk/completion.c b/frontends/gtk/completion.c
index eea0a789f..3da3410ad 100644
--- a/frontends/gtk/completion.c
+++ b/frontends/gtk/completion.c
@@ -21,8 +21,6 @@
* Implementation of url entry completion.
*/
-#include <gtk/gtk.h>
-
#include "utils/log.h"
#include "utils/messages.h"
#include "utils/nsoption.h"
@@ -31,6 +29,7 @@
#include "netsurf/browser_window.h"
#include "desktop/searchweb.h"
+#include "gtk/compat.h"
#include "gtk/warn.h"
#include "gtk/scaffolding.h"
#include "gtk/window.h"
@@ -80,7 +79,7 @@ nsgtk_completion_match_select(GtkEntryCompletion *widget,
GtkTreeIter *iter,
gpointer user_data)
{
- GValue value = {0, };
+ GValue value = G_VALUE_INIT;
struct nsgtk_scaffolding *g = user_data;
struct browser_window *bw = nsgtk_get_browser_window(nsgtk_scaffolding_top_level(g));
nserror ret;