SF.net SVN: geany: [1316] branches/geany-0.10.1
ntrel at users.sourceforge.net
ntrel at xxxxx
Thu Feb 22 12:41:48 UTC 2007
Revision: 1316
http://svn.sourceforge.net/geany/?rev=1316&view=rev
Author: ntrel
Date: 2007-02-22 04:41:48 -0800 (Thu, 22 Feb 2007)
Log Message:
-----------
Fixed switching to the wrong tab when showing the unsaved dialog.
Modified Paths:
--------------
branches/geany-0.10.1/NEWS
branches/geany-0.10.1/src/dialogs.c
branches/geany-0.10.1/src/document.c
branches/geany-0.10.1/src/document.h
Modified: branches/geany-0.10.1/NEWS
===================================================================
--- branches/geany-0.10.1/NEWS 2007-02-22 11:46:57 UTC (rev 1315)
+++ branches/geany-0.10.1/NEWS 2007-02-22 12:41:48 UTC (rev 1316)
@@ -39,6 +39,7 @@
or Next Message.
* Auto close brackets only when auto completion of constructs is
enabled (closes #1665015).
+ * Fixed switching to the wrong tab when showing the unsaved dialog.
Internationalisation:
* New translations: fi (thanks to Harri Koskinen).
Modified: branches/geany-0.10.1/src/dialogs.c
===================================================================
--- branches/geany-0.10.1/src/dialogs.c 2007-02-22 11:46:57 UTC (rev 1315)
+++ branches/geany-0.10.1/src/dialogs.c 2007-02-22 12:41:48 UTC (rev 1316)
@@ -342,7 +342,7 @@
// display the file tab to remind the user of the document
gtk_notebook_set_current_page(GTK_NOTEBOOK(app->notebook),
- document_find_by_sci(doc_list[idx].sci));
+ document_get_notebook_page(idx));
if (doc_list[idx].file_name != NULL)
{
Modified: branches/geany-0.10.1/src/document.c
===================================================================
--- branches/geany-0.10.1/src/document.c 2007-02-22 11:46:57 UTC (rev 1315)
+++ branches/geany-0.10.1/src/document.c 2007-02-22 12:41:48 UTC (rev 1316)
@@ -75,7 +75,7 @@
-/* returns the index of the notebook page which has the given filename
+/* returns the document index which has the given filename.
* is_tm_filename is needed when passing TagManager filenames because they are
* dereferenced, and would not match the link filename. */
gint document_find_by_filename(const gchar *filename, gboolean is_tm_filename)
@@ -99,7 +99,7 @@
}
-/* returns the index of the notebook page which has sci */
+/* returns the document index which has sci */
gint document_find_by_sci(ScintillaObject *sci)
{
guint i;
@@ -114,6 +114,16 @@
}
+/* returns the index of the notebook page from the document index */
+gint document_get_notebook_page(gint doc_idx)
+{
+ if (! DOC_IDX_VALID(doc_idx)) return -1;
+
+ return gtk_notebook_page_num(GTK_NOTEBOOK(app->notebook),
+ GTK_WIDGET(doc_list[doc_idx].sci));
+}
+
+
/* returns the index of the given notebook page in the document list */
gint document_get_n_idx(guint page_num)
{
Modified: branches/geany-0.10.1/src/document.h
===================================================================
--- branches/geany-0.10.1/src/document.h 2007-02-22 11:46:57 UTC (rev 1315)
+++ branches/geany-0.10.1/src/document.h 2007-02-22 12:41:48 UTC (rev 1316)
@@ -88,14 +88,19 @@
(doc_list[doc_idx].file_name) : GEANY_STRING_UNTITLED)
-/* returns the index of the notebook page which has the given filename */
-gint document_find_by_filename(const gchar*, gboolean is_tm_filename);
+/* returns the document index which has the given filename.
+ * is_tm_filename is needed when passing TagManager filenames because they are
+ * dereferenced, and would not match the link filename. */
+gint document_find_by_filename(const gchar *filename, gboolean is_tm_filename);
-/* returns the index of the notebook page which has sci */
-gint document_find_by_sci(ScintillaObject*);
+/* returns the document index which has sci */
+gint document_find_by_sci(ScintillaObject *sci);
+/* returns the index of the notebook page from the document index */
+gint document_get_notebook_page(gint doc_idx);
+
/* returns the index of the given notebook page in the document list */
gint document_get_n_idx(guint page_num);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Commits
mailing list