X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=gtk-gui.c;h=39703ff60eaad94102aad648fe41b2da687ac92c;hb=bf1dc48dfe6af65de5cd3f7b474130fcbc26bcc9;hp=d3de7a649a4ead34c59fb75a073c634b6a8be2fa;hpb=7df7518625b5a80aa1ff35c8c6e49e6e257672d9;p=ext%2Fsubsurface.git diff --git a/gtk-gui.c b/gtk-gui.c index d3de7a6..39703ff 100644 --- a/gtk-gui.c +++ b/gtk-gui.c @@ -529,6 +529,7 @@ static GtkNotebook *create_new_notebook_window(GtkNotebook *source, { GtkWidget *win, *notebook, *vbox; notebook_data_t *nbdp; + GtkAllocation allocation; /* pick the right notebook page data and return if both are detached */ if (nbd[0].widget == NULL) @@ -556,7 +557,8 @@ static GtkNotebook *create_new_notebook_window(GtkNotebook *source, /* disallow drop events */ gtk_drag_dest_set(notebook, 0, NULL, 0, 0); gtk_box_pack_start(GTK_BOX(vbox), notebook, TRUE, TRUE, 6); - gtk_widget_set_size_request(notebook, 450, 350); + gtk_widget_get_allocation(page, &allocation); + gtk_window_set_default_size(GTK_WINDOW(win), allocation.width, allocation.height); gtk_widget_show_all(win); return GTK_NOTEBOOK(notebook); @@ -987,7 +989,7 @@ void update_progressbar(progressbar_t *progress, double value) void set_filename(const char *filename) { - if (filename) + if (!existing_filename && filename) existing_filename = strdup(filename); return; }