From 39dcfcab0b947968efd803197c5f6eb543d49959 Mon Sep 17 00:00:00 2001 From: JosephMcc Date: Sun, 28 Jan 2018 01:56:46 -0800 Subject: [PATCH] Fix a couple of issues turned up by Codacy --- xed/xed-commands-file.c | 2 -- xed/xed-document.c | 4 +++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/xed/xed-commands-file.c b/xed/xed-commands-file.c index 098dcb4..a6893bc 100644 --- a/xed/xed-commands-file.c +++ b/xed/xed-commands-file.c @@ -533,7 +533,6 @@ save_dialog_response_cb (XedFileChooserDialog *dialog, { XedTab *tab; XedWindow *window; - XedDocument *doc; GtkSourceFile *file; GFile *location; gchar *parse_name; @@ -554,7 +553,6 @@ save_dialog_response_cb (XedFileChooserDialog *dialog, return; } - doc = xed_tab_get_document (tab); location = gtk_file_chooser_get_file (GTK_FILE_CHOOSER (dialog)); g_return_if_fail (location != NULL); diff --git a/xed/xed-document.c b/xed/xed-document.c index 470e831..b8d9bfe 100644 --- a/xed/xed-document.c +++ b/xed/xed-document.c @@ -948,6 +948,8 @@ xed_document_set_location (XedDocument *doc, g_return_if_fail (XED_IS_DOCUMENT (doc)); g_return_if_fail (G_IS_FILE (location)); + priv = xed_document_get_instance_private (doc); + gtk_source_file_set_location (priv->file, location); xed_document_set_content_type (doc, NULL); } @@ -1380,7 +1382,7 @@ xed_document_get_encoding (XedDocument *doc) g_return_val_if_fail (XED_IS_DOCUMENT (doc), NULL); - xed_document_get_instance_private (doc); + priv = xed_document_get_instance_private (doc); return gtk_source_file_get_encoding (priv->file); }