[gedit] Use document_get_location
- From: Paolo Borelli <pborelli src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] Use document_get_location
- Date: Sun, 18 Apr 2010 10:31:15 +0000 (UTC)
commit 831a021ab00e81559fe2edf0ceb40b12d832dfcb
Author: Paolo Borelli <pborelli gnome org>
Date: Sun Apr 18 12:23:13 2010 +0200
Use document_get_location
gedit/gedit-commands-file.c | 17 ++++++-----------
1 files changed, 6 insertions(+), 11 deletions(-)
---
diff --git a/gedit/gedit-commands-file.c b/gedit/gedit-commands-file.c
index f055d8a..d0420c4 100644
--- a/gedit/gedit-commands-file.c
+++ b/gedit/gedit-commands-file.c
@@ -79,27 +79,22 @@ get_tab_from_file (GList *docs, GFile *file)
while (docs != NULL)
{
- gchar *u;
GeditDocument *d;
+ GFile *l;
d = GEDIT_DOCUMENT (docs->data);
- u = gedit_document_get_uri (d);
- if (u != NULL)
+ l = gedit_document_get_location (d);
+ if (l != NULL)
{
- GFile *f;
-
- f = g_file_new_for_uri (u);
- g_free (u);
-
- if (g_file_equal (f, file))
+ if (g_file_equal (l, file))
{
tab = gedit_tab_get_from_document (d);
- g_object_unref (f);
+ g_object_unref (l);
break;
}
- g_object_unref (f);
+ g_object_unref (l);
}
docs = g_list_next (docs);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]