anjuta r3442 - in trunk: . plugins/gtodo



Author: jhs
Date: Wed Jan  9 23:10:42 2008
New Revision: 3442
URL: http://svn.gnome.org/viewvc/anjuta?rev=3442&view=rev

Log:
2008-01-10 Johannes Schmid <jhs gnome org>

	Patch from BolesÅaw KulbabiÅski <bolekk gmail com> (GHOP):

	* plugins/gtodo/gtodo.c: (category_manager_add_item):
	Fix #460390 â Changing categories while edinting someth

Modified:
   trunk/ChangeLog
   trunk/plugins/gtodo/todo_db.c

Modified: trunk/plugins/gtodo/todo_db.c
==============================================================================
--- trunk/plugins/gtodo/todo_db.c	(original)
+++ trunk/plugins/gtodo/todo_db.c	Wed Jan  9 23:10:42 2008
@@ -8,7 +8,10 @@
 
 void read_categorys (void)
 {
+	int last_category;
 	GTodoList *list;
+
+	last_category = gtk_option_menu_get_history (GTK_OPTION_MENU (mw.option));
 	if (mw.mitems != NULL)
 	{
 		int i;
@@ -75,7 +78,12 @@
 
 	gtk_widget_show_all (mw.menu);
 	if (categorys > 0)
-		gtk_option_menu_set_history (GTK_OPTION_MENU (mw.option), 0);
+	{
+		if (last_category != -1 && last_category <= categorys + 1)
+			gtk_option_menu_set_history (GTK_OPTION_MENU (mw.option), last_category);
+		else
+			gtk_option_menu_set_history (GTK_OPTION_MENU (mw.option), 0);
+	}
 }
 
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]