From: <ze...@us...> - 2007-05-12 08:37:26
|
Revision: 399 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=399&view=rev Author: zebons Date: 2007-05-12 01:37:06 -0700 (Sat, 12 May 2007) Log Message: ----------- Modified Paths: -------------- trunk/plugins/MyFilms/MesFilms.cs Modified: trunk/plugins/MyFilms/MesFilms.cs =================================================================== --- trunk/plugins/MyFilms/MesFilms.cs 2007-05-11 22:08:49 UTC (rev 398) +++ trunk/plugins/MyFilms/MesFilms.cs 2007-05-12 08:37:06 UTC (rev 399) @@ -121,7 +121,7 @@ string StrTitleSelect = null; string StrFilmSelect = ""; string StrSort = null; - string StrActors = null; + string StrActors = ""; string StrTxtSelect = ""; string StrStorage = null; string StrIdentItem = null; @@ -139,12 +139,12 @@ string StrPathImg = null; string StrSortSens = null; int StrLayOut = 0; - public string WStrSort = null; + public string WStrSort = ""; public string WStrSelect = null; public string WStrSortSens = null; public bool boolreturn = false; public bool boolstorage = false; - string wselectedlabel = null; + string wselectedlabel = ""; string StrDfltSelect = null; string CurrentSortMethod = null; decimal w_rating = 0; @@ -450,6 +450,7 @@ { Change_LayOut(0); WStrSort = "ACTORS"; + wselectedlabel = ""; WStrSortSens = " ASC"; BtnSrtBy.IsAscending = true; StrActors = keyboard.Text; @@ -558,7 +559,8 @@ { wselectedlabel = facadeView.SelectedListItem.Label; Change_LayOut(Layout); - boolreturn = true; + if (!facadeView.SelectedListItem.IsFolder) + boolreturn = true; do { if (StrTitleSelect != "") StrTitleSelect += TitleDelim; @@ -1082,6 +1084,8 @@ Wstar = NewWstar; BtnSrtBy.Label = GUILocalizeStrings.Get(103); boolselect = true; + wselectedlabel = ""; + StrActors = ""; // boolreturn = true; if (ClearIndex) l_index = 0; facadeView.Clear(); @@ -1177,6 +1181,7 @@ xmlwriter.SetValue(CurrentConfig, "IndexItem", (facadeView.SelectedListItemIndex > -1) ? ((boolselect) ? facadeView.SelectedListItemIndex.ToString() : facadeView.SelectedListItem.ItemId.ToString()) : "-1"); //may need to check if there is no item selected and so save -1 xmlwriter.SetValueAsBool(CurrentConfig, "boolselect", boolselect); xmlwriter.SetValueAsBool(CurrentConfig, "boolreturn", boolreturn); + xmlwriter.SetValue(CurrentConfig, "WSelectedLabel", wselectedlabel); xmlwriter.SetValue(CurrentConfig, "WStrSort", WStrSort); xmlwriter.SetValue(CurrentConfig, "Wstar", Wstar); xmlwriter.SetValue(CurrentConfig, "WLayOut", Layout); @@ -1255,12 +1260,18 @@ boolselect = xmlreader.GetValueAsBool(CurrentConfig, "boolselect", false); boolreturn = xmlreader.GetValueAsBool(CurrentConfig, "boolreturn", false); WStrSort = xmlreader.GetValueAsString(CurrentConfig, "WStrSort", ""); + wselectedlabel = xmlreader.GetValueAsString(CurrentConfig, "WSelectedLabel", ""); Wstar = xmlreader.GetValueAsString(CurrentConfig, "Wstar", ""); LastID = xmlreader.GetValueAsInt(CurrentConfig, "LastID", -1); StrViewDfltItem = xmlreader.GetValueAsString(CurrentConfig, "ViewDfltItem", ""); StrViewDfltText = xmlreader.GetValueAsString(CurrentConfig, "ViewDfltText", ""); TitleDelim = xmlreader.GetValueAsString(CurrentConfig, "TitleDelim", "."); } + if ((boolreturn) && (wselectedlabel == "")) + { + boolselect = true; + boolreturn = false; + } } //-------------------------------------------------------------------------------------------- // Choice Configuration @@ -1378,7 +1389,10 @@ // TxtSelect.HorizontalAlignment = MediaPortal.Drawing.HorizontalAlignment.Right; BtnSrtBy.SortChanged += new SortEventHandler(SortChanged); if (boolselect) + { + Change_LayOut(0); getSelectFromDivx(StrSelect, WStrSort, " ASC", Wstar, false, ""); // preserve index from last time + } else if (!(LoadDfltSlct)) GetFilmList(l_index); @@ -1414,6 +1428,7 @@ boolselect = false; boolreturn = true; WStrSort = StrViewDfltItem; + wselectedlabel = ""; if (StrViewDfltItem == "DateAdded") StrSelect = "Date" + " like '" + DateTime.Parse(StrViewDfltText).ToShortDateString() + "'"; else @@ -1471,6 +1486,7 @@ { // Change View All Films StrSelect = StrTitleSelect = StrTxtSelect = ""; //clear all selects + WStrSort = ""; boolselect = false; boolreturn = false; GetFilmList(); @@ -1514,6 +1530,7 @@ TxtSelect.Label = StrTxtSelect; boolselect = false; boolreturn = false; + WStrSort = ""; BtnSrtBy.Label = CurrentSortMethod; if (StrSortSens == " ASC") BtnSrtBy.IsAscending = true; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |