Fix a couple of issues turned up by Codacy
This commit is contained in:
parent
6c7e40c3ba
commit
39dcfcab0b
|
@ -533,7 +533,6 @@ save_dialog_response_cb (XedFileChooserDialog *dialog,
|
||||||
{
|
{
|
||||||
XedTab *tab;
|
XedTab *tab;
|
||||||
XedWindow *window;
|
XedWindow *window;
|
||||||
XedDocument *doc;
|
|
||||||
GtkSourceFile *file;
|
GtkSourceFile *file;
|
||||||
GFile *location;
|
GFile *location;
|
||||||
gchar *parse_name;
|
gchar *parse_name;
|
||||||
|
@ -554,7 +553,6 @@ save_dialog_response_cb (XedFileChooserDialog *dialog,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
doc = xed_tab_get_document (tab);
|
|
||||||
location = gtk_file_chooser_get_file (GTK_FILE_CHOOSER (dialog));
|
location = gtk_file_chooser_get_file (GTK_FILE_CHOOSER (dialog));
|
||||||
g_return_if_fail (location != NULL);
|
g_return_if_fail (location != NULL);
|
||||||
|
|
||||||
|
|
|
@ -948,6 +948,8 @@ xed_document_set_location (XedDocument *doc,
|
||||||
g_return_if_fail (XED_IS_DOCUMENT (doc));
|
g_return_if_fail (XED_IS_DOCUMENT (doc));
|
||||||
g_return_if_fail (G_IS_FILE (location));
|
g_return_if_fail (G_IS_FILE (location));
|
||||||
|
|
||||||
|
priv = xed_document_get_instance_private (doc);
|
||||||
|
|
||||||
gtk_source_file_set_location (priv->file, location);
|
gtk_source_file_set_location (priv->file, location);
|
||||||
xed_document_set_content_type (doc, NULL);
|
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);
|
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);
|
return gtk_source_file_get_encoding (priv->file);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue