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.
This commit is contained in:
Vincent Sanders 2015-04-09 11:43:53 +01:00
parent ae98fbe8c8
commit b9b952cddf

View File

@ -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,19 +79,24 @@ 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);
icon_set,
GTK_ICON_SIZE_DIALOG);
gtk_icon_set_unref(icon_set);
g_list_free(pixbufs);