summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2015-04-09 11:43:53 +0100
committerVincent Sanders <vince@kyllikki.org>2015-04-09 11:43:53 +0100
commitb9b952cddf161535548644c3df31e2856859a895 (patch)
tree78f662faf7eec5795466695c5c5022d728842399
parentae98fbe8c81712746073d10e328b02bfb454fda8 (diff)
downloadnetsurf-b9b952cddf161535548644c3df31e2856859a895.tar.gz
netsurf-b9b952cddf161535548644c3df31e2856859a895.tar.bz2
Ensure the about dialog construction does not cause warnings
The about dialog construction calls were missing a NULL sentinal which was causing warnings on GTK 3 builds.
-rw-r--r--gtk/about.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/gtk/about.c b/gtk/about.c
index 6d1038622..9ab600f9a 100644
--- a/gtk/about.c
+++ b/gtk/about.c
@@ -68,9 +68,9 @@ nsgtk_about_dialog_info(GtkWidget *button, gpointer data)
void nsgtk_about_dialog_init(GtkWindow *parent)
{
- GtkWidget *dialog, *vbox, *button, *image, *label;
+ GtkWidget *dialog, *vbox, *button, *label;
gchar *name_string;
- GList *pixbufs = gtk_window_get_default_icon_list();
+ GList *pixbufs;
name_string = g_markup_printf_escaped ("<span size=\"xx-large\" weight=\"bold\">NetSurf %s</span>", netsurf_version);
@@ -79,24 +79,29 @@ void nsgtk_about_dialog_init(GtkWindow *parent)
dialog = gtk_dialog_new_with_buttons("About NetSurf",
parent,
GTK_DIALOG_DESTROY_WITH_PARENT,
- NULL);
+ NULL, NULL);
vbox = nsgtk_vbox_new(FALSE, 8);
gtk_box_pack_start(GTK_BOX(nsgtk_dialog_get_content_area(GTK_DIALOG(dialog))), vbox, TRUE, TRUE, 0);
+ pixbufs = gtk_window_get_default_icon_list();
if (pixbufs != NULL) {
- GtkIconSet *icon_set = gtk_icon_set_new_from_pixbuf(GDK_PIXBUF(g_list_nth_data(pixbufs, 0)));
+ GtkIconSet *icon_set;
+ GtkWidget *image;
+
+ icon_set = gtk_icon_set_new_from_pixbuf(GDK_PIXBUF(g_list_nth_data(pixbufs, 0)));
image = gtk_image_new();
- gtk_image_set_from_icon_set (GTK_IMAGE (image),
- icon_set, GTK_ICON_SIZE_DIALOG);
+ gtk_image_set_from_icon_set(GTK_IMAGE(image),
+ icon_set,
+ GTK_ICON_SIZE_DIALOG);
- gtk_icon_set_unref (icon_set);
- g_list_free (pixbufs);
+ gtk_icon_set_unref(icon_set);
+ g_list_free(pixbufs);
- gtk_box_pack_start(GTK_BOX (vbox), image, FALSE, FALSE, 0);
+ gtk_box_pack_start(GTK_BOX(vbox), image, FALSE, FALSE, 0);
}