SF.net SVN: geany: [2282] trunk

ntrel at users.sourceforge.net ntrel at xxxxx
Mon Feb 25 17:02:52 UTC 2008


Revision: 2282
          http://geany.svn.sourceforge.net/geany/?rev=2282&view=rev
Author:   ntrel
Date:     2008-02-25 09:02:23 -0800 (Mon, 25 Feb 2008)

Log Message:
-----------
When closing a tab when using left-to-right tabs, focus the next
document, not the previous.

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/src/notebook.c

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2008-02-25 16:37:46 UTC (rev 2281)
+++ trunk/ChangeLog	2008-02-25 17:02:23 UTC (rev 2282)
@@ -1,3 +1,10 @@
+2008-02-25  Nick Treleaven  <nick(dot)treleaven(at)btinternet(dot)com>
+
+ * src/notebook.c:
+   When closing a tab when using left-to-right tabs, focus the next
+   document, not the previous.
+
+
 2008-02-24  Enrico Tröger  <enrico(dot)troeger(at)uvena(dot)de>
 
  * tagmanager/options.c, src/symbols.c, src/symbols.h:

Modified: trunk/src/notebook.c
===================================================================
--- trunk/src/notebook.c	2008-02-25 16:37:46 UTC (rev 2281)
+++ trunk/src/notebook.c	2008-02-25 17:02:23 UTC (rev 2282)
@@ -406,11 +406,22 @@
 }
 
 
-// Always use this instead of gtk_notebook_remove_page().
+/* Always use this instead of gtk_notebook_remove_page(). */
 void notebook_remove_page(gint page_num)
 {
+	gint oldpage = gtk_notebook_get_current_page(GTK_NOTEBOOK(app->notebook));
+
 	gtk_notebook_remove_page(GTK_NOTEBOOK(app->notebook), page_num);
+
 	tab_count_changed();
+
+	/* Focus the next page, not the previous */
+	if (oldpage == page_num && prefs.tab_order_ltr)
+	{
+		/* Unless the first tab was closed */
+		if (oldpage > 0)
+			gtk_notebook_set_current_page(GTK_NOTEBOOK(app->notebook), oldpage);
+	}
 }
 
 


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