From: Matthew Fernandez Date: Fri, 8 Apr 2022 02:02:15 +0000 (-0700) Subject: smyrna: remove unnecessary separation of declaration and definition X-Git-Tag: 4.0.0~118^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=379d07b887e99141c5d31bcc220e937e26573214;p=graphviz smyrna: remove unnecessary separation of declaration and definition --- diff --git a/cmd/smyrna/viewport.c b/cmd/smyrna/viewport.c index 9ea437765..3726eac2e 100644 --- a/cmd/smyrna/viewport.c +++ b/cmd/smyrna/viewport.c @@ -596,8 +596,7 @@ int save_as_graph(void) { //check if there is an active graph if (view->activeGraph > -1) { - GtkWidget *dialog; - dialog = gtk_file_chooser_dialog_new("Save File", + GtkWidget *dialog = gtk_file_chooser_dialog_new("Save File", NULL, GTK_FILE_CHOOSER_ACTION_SAVE, GTK_STOCK_CANCEL, @@ -607,8 +606,7 @@ int save_as_graph(void) gtk_file_chooser_set_do_overwrite_confirmation(GTK_FILE_CHOOSER (dialog), TRUE); if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_ACCEPT) { - char *filename; - filename = + char *filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog)); save_graph_with_file_name(view->g[view->activeGraph], filename);