anjuta r4687 - in trunk: . plugins/document-manager
- From: sgranjoux svn gnome org
- To: svn-commits-list gnome org
- Subject: anjuta r4687 - in trunk: . plugins/document-manager
- Date: Mon, 2 Feb 2009 20:14:24 +0000 (UTC)
Author: sgranjoux
Date: Mon Feb 2 20:14:24 2009
New Revision: 4687
URL: http://svn.gnome.org/viewvc/anjuta?rev=4687&view=rev
Log:
* plugins/document-manager/anjuta-bookmarks.c:
Remove some critical warnings when having document without a file
Modified:
trunk/ChangeLog
trunk/plugins/document-manager/anjuta-bookmarks.c
Modified: trunk/plugins/document-manager/anjuta-bookmarks.c
==============================================================================
--- trunk/plugins/document-manager/anjuta-bookmarks.c (original)
+++ trunk/plugins/document-manager/anjuta-bookmarks.c Mon Feb 2 20:14:24 2009
@@ -118,6 +118,7 @@
{
IAnjutaMarkable* markable;
GtkTreeIter iter;
+ GFile* editor_file;
AnjutaBookmarksPrivate* priv = BOOKMARKS_GET_PRIVATE(bookmarks);
if (!IANJUTA_IS_MARKABLE(doc))
@@ -126,11 +127,16 @@
markable = IANJUTA_MARKABLE(doc);
if (!gtk_tree_model_get_iter_first (priv->model, &iter))
return;
+
+ editor_file = ianjuta_file_get_file (IANJUTA_FILE(doc), NULL);
+ if (editor_file == NULL)
+ return;
+
do
{
GFile* file;
- GFile* editor_file = ianjuta_file_get_file (IANJUTA_FILE(doc), NULL);
gint line;
+
gtk_tree_model_get (priv->model, &iter,
COLUMN_FILE, &file,
COLUMN_LINE, &line,
@@ -151,12 +157,10 @@
handle, -1);
}
}
- g_object_unref (editor_file);
g_object_unref (file);
}
while (gtk_tree_model_iter_next (priv->model, &iter));
-
-
+ g_object_unref (editor_file);
}
static void
@@ -377,6 +381,9 @@
else
text = g_strdup(title);
file = ianjuta_file_get_file(IANJUTA_FILE(editor), NULL);
+ /* The buffer is not saved yet -> do nothing */
+ if (file == NULL)
+ return;
gtk_list_store_set (GTK_LIST_STORE(priv->model), &iter,
COLUMN_TEXT, text,
COLUMN_FILE, file,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]