X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/blobdiff_plain/6668f281fb99a40d0649fb253dd58077a740e7c8..02d50cbd5926b4ef1f88c6f9ca28486fa45508c0:/disobedience/progress.c diff --git a/disobedience/progress.c b/disobedience/progress.c index 4eb5b55..33dbfc9 100644 --- a/disobedience/progress.c +++ b/disobedience/progress.c @@ -2,20 +2,18 @@ * This file is part of DisOrder. * Copyright (C) 2006, 2007 Richard Kettlewell * - * This program is free software; you can redistribute it and/or modify + * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or + * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA + * along with this program. If not, see . */ /** @file disobedience/progress.c * @brief Progress bar support @@ -32,12 +30,14 @@ struct progress_window { }; /** @brief Create a progress window */ -struct progress_window *progress_window_new(const char *title) { +struct progress_window *progress_window_new(const char *title, + GtkWidget *parent) { struct progress_window *pw = xmalloc(sizeof *pw); pw->window = gtk_window_new(GTK_WINDOW_TOPLEVEL); - gtk_window_set_transient_for(GTK_WINDOW(pw->window), - GTK_WINDOW(toplevel)); + if(parent) + gtk_window_set_transient_for(GTK_WINDOW(pw->window), + GTK_WINDOW(parent)); g_signal_connect(pw->window, "destroy", G_CALLBACK(gtk_widget_destroyed), &pw->window); gtk_window_set_default_size(GTK_WINDOW(pw->window), 360, -1);