From: <nor...@us...> - 2007-07-12 18:58:39
|
Revision: 689 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=689&view=rev Author: northern_sky Date: 2007-07-12 11:58:38 -0700 (Thu, 12 Jul 2007) Log Message: ----------- small changes Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItem.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemList.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItem.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIPrograms.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAltFileInfo.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/skin/BlueTwo/myProgramsAltFileInfo.xml trunk/plugins/myGUIProgramsAlt/README.txt Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItem.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItem.cs 2007-07-12 05:54:07 UTC (rev 688) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItem.cs 2007-07-12 18:58:38 UTC (rev 689) @@ -733,77 +733,7 @@ } } - public virtual void OnInfo(GUIListItem item, ref bool isOverviewVisible, ref ProgramInfoAction modalResult, ref int selectedFileID) - { - // GUIFileInfo fileInfoDialog = (GUIFileInfo)GUIWindowManager.GetWindow(ProgramUtils.ProgramInfoID); - // if (fileInfoDialog == null) return; - // if (item.MusicTag == null) return; - //FileItem curFile = (FileItem)item.MusicTag; - //if (curFile == null) return; - /* fileInfoDialog.App = this; - fileInfoDialog.File = curFile; - fileInfoDialog.IsOverviewVisible = isOverviewVisible; - fileInfoDialog.DoModal(GetID); - isOverviewVisible = fileInfoDialog.IsOverviewVisible; - modalResult = fileInfoDialog.ModalResult; - selectedFileID = fileInfoDialog.SelectedFileID; - return;*/ - } - - - #region old sorting stuff, some(all) might be obsolete, but maybe usefull for improving new sorting method - - public virtual void OnSort(GUIFacadeControl view, bool doSwitchState) - { - /* - * if (!filesAreLoaded) - { - LoadFiles(); - } - - if (doSwitchState) - { - dbPc.UpdateState(); - } - view.Sort(dbPc); - */ - } - - /* public virtual void OnSortToggle(GUIFacadeControl view) - { - // dbPc.SortAscending = (!dbPc.SortAscending); - //view.Sort(dbPc); - } - - public virtual int GetCurrentSortIndex() - { - return dbPc.CurrentSortMethodIndex; - } - - public virtual void SetCurrentSortIndex(int newValue) - { - dbPc.CurrentSortMethodIndex = newValue; - } - - public virtual string CurrentSortTitle() - { - return dbPc.CurrentSortMethodAsText; - } - - public virtual bool GetCurrentSortIsAscending() - { - return dbPc.SortAscending; - } - - public virtual void SetCurrentSortIsAscending(bool newValue) - { - dbPc.SortAscending = newValue; - } - */ - #endregion - - public virtual bool RefreshButtonVisible() { return false; // otherwise, override this in child class Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemList.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemList.cs 2007-07-12 05:54:07 UTC (rev 688) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemList.cs 2007-07-12 18:58:38 UTC (rev 689) @@ -65,8 +65,8 @@ newApp.Arguments = ProgramUtils.Get(results, recordIndex, "arguments"); newApp.WindowStyle = ProgramUtils.GetProcessWindowStyle(results, recordIndex, "windowstyle"); newApp.StartupDir = ProgramUtils.Get(results, recordIndex, "startupdir"); - newApp.UseShellExecute = ProgramUtils.GetBool(results, recordIndex, "useshellexecute"); - newApp.UseQuotes = ProgramUtils.GetBool(results, recordIndex, "usequotes"); + newApp.UseShellExecute = ProgramUtils.GetBool(results, recordIndex, "useShellExecute"); + newApp.UseQuotes = ProgramUtils.GetBool(results, recordIndex, "useQuotes"); newApp.SourceType = ProgramUtils.GetSourceType(results, recordIndex, "applicationItemType"); newApp.Source = ProgramUtils.Get(results, recordIndex, "source"); newApp.Imagefile = ProgramUtils.Get(results, recordIndex, "imagefile"); Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItem.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItem.cs 2007-07-12 05:54:07 UTC (rev 688) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItem.cs 2007-07-12 18:58:38 UTC (rev 689) @@ -1030,103 +1030,5 @@ } } } - - public string GetValueOfTag(string TagName) - { - string strLowerTag = TagName.ToLower() + "="; - string strLowerItem = ""; - string result = ""; - foreach (string strItem in this.tagData.Split('\r')) - { - strLowerItem = strItem.ToLower(); - if (strLowerItem.StartsWith(strLowerTag)) - { - result = strItem.Remove(0, strLowerTag.Length); - } - else if (strLowerItem.StartsWith("\n" + strLowerTag)) - { - result = strItem.Remove(0, strLowerTag.Length + 1); - } - } - result = result.Replace("\n", ""); - result = result.Replace("\r", ""); - result = result.TrimStart('\"'); - result = result.TrimEnd('\"'); - return result; - } - - public string GetValueOfCategory(int CatIndex) - { - string result = ""; - List<string> Categories = new List<string>(categoryData.Split('\r')); - if ((CatIndex >= 0) && (CatIndex <= Categories.Count - 1)) - { - string strLine = (string)Categories[CatIndex]; - strLine = strLine.TrimStart('\r'); - bool bValueLine = false; - bool bFirst = true; - string strSep = ""; - foreach (string strToken in strLine.Split('=')) - { - //Log.Info("getvalueofcategory dw token {0}", strToken); - if (!bFirst) - { - bValueLine = true; - // bValueLine = strToken.EndsWith("\""); - } - if (bValueLine) - { - result = result + strSep + strToken; - strSep = "="; - } - bFirst = false; - } - } - result = result.Replace("\n", ""); - result = result.Replace("\r", ""); - result = result.TrimStart('\"'); - result = result.TrimEnd('\"'); - return result; - } - - public string GetNameOfCategory(int CatIndex) - { - string result = ""; - List<string> Categories = new List<string>(categoryData.Split('\r')); - if ((CatIndex >= 0) && (CatIndex <= Categories.Count - 1)) - { - string strLine = (string)Categories[CatIndex]; - strLine = strLine.TrimStart('\r'); - bool bValueLine = false; - bool bFirst = true; - string strSep = ""; - foreach (string strToken in strLine.Split('=')) - { - strToken.Replace("\n", ""); - strToken.Replace("\r", ""); - //Log.Info("getnameofcategory dw token {0}", strToken); - if (!bFirst) - { - //doesn't work bValueLine = strToken.EndsWith("\""); - bValueLine = true; - } - if (!bValueLine) - { - result = result + strSep + strToken; - strSep = "="; - } - else - { - break; - } - bFirst = false; - } - } - result = result.Replace("\n", ""); - result = result.Replace("\r", ""); - result = result.TrimStart('\"'); - result = result.TrimEnd('\"'); - return result; - } } } \ No newline at end of file Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIPrograms.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIPrograms.cs 2007-07-12 05:54:07 UTC (rev 688) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIPrograms.cs 2007-07-12 18:58:38 UTC (rev 689) @@ -1451,46 +1451,6 @@ - /* void OnInfo() - { - // <F3> keypress - if (null != lastApp) - { - selectedItemIndex = GetSelectedItemNo(); - GUIListItem item = GetSelectedItem(); - - FileItem curFile = null; - - if (!item.Label.Equals(ProgramUtils.cBackLabel) && (!item.IsFolder)) - { - if ((item.MusicTag != null) && (item.MusicTag is FileItem)) - { - curFile = (FileItem)item.MusicTag; - } - // show file info but only if the selected item is not the back button - bool ovVisible = mapSettings.OverviewVisible; - ProgramInfoAction modalResult = ProgramInfoAction.LookupFileInfo; - int selectedFileID = -1; - lastApp.OnInfo(item, ref ovVisible, ref modalResult, ref selectedFileID); - if ((null != curFile) && (modalResult == ProgramInfoAction.LookupFileInfo)) - { - FileItem scrapeFile = lastApp.Files.GetFileItemByID(selectedFileID); - if (null != scrapeFile) - { - int scrapeIndex = lastApp.Files.IndexOf(scrapeFile); - if (-1 != scrapeIndex) - { - GUIControl.SelectItemControl(GetID, facadeView.GetID, scrapeIndex + 1); - } - ScrapeFileInfo(scrapeFile); - } - } - mapSettings.OverviewVisible = ovVisible; - UpdateListControl(); - } - } - } - */ protected void OnInfo() { @@ -1507,7 +1467,8 @@ { curFile = (FileItem)item.MusicTag; GUIProgramsAltFileInfo fileInfo = (GUIProgramsAltFileInfo)GUIWindowManager.GetWindow(9999); - fileInfo.Movie = curFile; + fileInfo.CurrentFileItem = curFile; + fileInfo.CurrentApplicationItem = lastApp; fileInfo.FolderForThumbs = string.Empty; GUIWindowManager.ActivateWindow(9999); } Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAltFileInfo.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAltFileInfo.cs 2007-07-12 05:54:07 UTC (rev 688) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAltFileInfo.cs 2007-07-12 18:58:38 UTC (rev 689) @@ -58,8 +58,7 @@ protected GUIButtonControl launchButton = null; [SkinControlAttribute(3)] protected GUIToggleButtonControl overviewInfoButton = null; - [SkinControlAttribute(4)] - protected GUIToggleButtonControl btnCast = null; + [SkinControlAttribute(5)] protected GUIButtonControl btnRefresh = null; @@ -76,16 +75,14 @@ [SkinControlAttribute(30)] protected GUILabelControl lblImage = null; + FileItem currentFileItem = null; + ApplicationItem currentApplicationItem = null; - - enum ViewMode + public ApplicationItem CurrentApplicationItem { - Image, - Cast, + get { return currentApplicationItem; } + set { currentApplicationItem = value; } } - - ViewMode viewmode = ViewMode.Image; - FileItem currentFileItem = null; string folderForThumbs = string.Empty; string[] coverArtUrls = new string[1]; string imdbCoverArtUrl = String.Empty; @@ -119,8 +116,6 @@ ResetSpinControl(); - viewmode = ViewMode.Image; - Refresh(false); Update(); imageSearchThread = new Thread(new ThreadStart(AmazonLookupThread)); @@ -167,33 +162,19 @@ VideoDatabase.SetThumbURL(idMovie, currentFileItem.Imagefile); return; } - - if (control == btnCast) - { - viewmode = ViewMode.Cast; - Update(); - } if (control == overviewInfoButton) { - - viewmode = ViewMode.Image; Update(); } if (control == launchButton) { - int id = currentFileItem.FileID; - - //fix hack later - // ApplicationItem a = new ApplicationItem(DatabaseHandler.sqlDB); - // a.LaunchFile(leItem, true); - // GUIVideoFiles.PlayMovie(id); - return; + CurrentApplicationItem.LaunchFile(CurrentFileItem, true); } } - public FileItem Movie + public FileItem CurrentFileItem { get { return currentFileItem; } set { currentFileItem = value; } @@ -209,7 +190,7 @@ if (currentFileItem == null) return; //cast->image - if (viewmode == ViewMode.Cast) + /* if (viewmode == ViewMode.Cast) { tblOverviewInfoArea.IsVisible = false; tbTextArea.IsVisible = true; @@ -224,9 +205,7 @@ tbTextArea.IsVisible = false; imgCoverArt.IsVisible = true; overviewInfoButton.Selected = true; - btnCast.Selected = false; - - } + }*/ //btnWatched.Selected = (currentFileItem.Watched != 0); currentFileItem.SetProperties(); if (imgCoverArt != null) Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/skin/BlueTwo/myProgramsAltFileInfo.xml =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/skin/BlueTwo/myProgramsAltFileInfo.xml 2007-07-12 05:54:07 UTC (rev 688) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/skin/BlueTwo/myProgramsAltFileInfo.xml 2007-07-12 18:58:38 UTC (rev 689) @@ -53,48 +53,16 @@ <posX>60</posX> <posY>97</posY> <width>120</width> - <label>208</label> + <label>Launch</label> <font>font13</font> <onleft>22</onleft> <onright>22</onright> - <onup>7</onup> - <ondown>3</ondown> - <animation effect="fade" time="200">WindowOpen</animation> - <animation effect="fade" time="200">WindowClose</animation> - </control> - <control> - <description>Overview</description> - <type>togglebutton</type> - <id>3</id> - <posX>60</posX> - <posY>131</posY> - <width>120</width> - <label>207</label> - <font>font13</font> - <onleft>22</onleft> - <onright>22</onright> - <onup>2</onup> - <ondown>4</ondown> - <animation effect="fade" time="200">WindowOpen</animation> - <animation effect="fade" time="200">WindowClose</animation> - </control> - <!--<control> - <description>Cast</description> - <type>togglebutton</type> - <id>4</id> - <posX>60</posX> - <posY>165</posY> - <width>120</width> - <label>206</label> - <font>font13</font> - <onleft>22</onleft> - <onright>22</onright> - <onup>3</onup> + <onup>10</onup> <ondown>5</ondown> <animation effect="fade" time="200">WindowOpen</animation> <animation effect="fade" time="200">WindowClose</animation> - </control>--> - <control> + </control> + <control> <description>Refresh</description> <type>button</type> <id>5</id> @@ -104,26 +72,11 @@ <label>184</label> <onleft>22</onleft> <onright>22</onright> - <onup>4</onup> - <ondown>6</ondown> - <animation effect="fade" time="200">WindowOpen</animation> - <animation effect="fade" time="200">WindowClose</animation> - </control> -<!-- <control> - <description>Watched</description> - <type>togglebutton</type> - <id>6</id> - <posX>60</posX> - <posY>233</posY> - <width>120</width> - <label>1010</label> - <onleft>22</onleft> - <onright>22</onright> - <onup>5</onup> + <onup>2</onup> <ondown>10</ondown> <animation effect="fade" time="200">WindowOpen</animation> <animation effect="fade" time="200">WindowClose</animation> - </control>--> + </control> <control> <description>image title:</description> <type>label</type> @@ -143,8 +96,8 @@ <id>10</id> <posX>60</posX> <posY>292</posY> - <onup>6</onup> - <ondown>11</ondown> + <onup>5</onup> + <ondown>2</ondown> <animation effect="fade" time="200">WindowOpen</animation> <animation effect="fade" time="200">WindowClose</animation> </control> @@ -191,54 +144,30 @@ <animation effect="fade" time="200">WindowClose</animation> </control> <control> - <description>Main Genre</description> + <description>Genre</description> <type>label</type> <id>1</id> <posX>400</posX> <posY>160</posY> - <label>Maingenre</label> + <label>Genre</label> <font>font13</font> <textcolor>FFB2D4F5</textcolor> <animation effect="fade" time="200">WindowOpen</animation> <animation effect="fade" time="200">WindowClose</animation> </control> <control> - <description>MainGenre value</description> + <description>Genre value</description> <type>label</type> <id>1</id> <posX>400</posX> <posY>175</posY> - <label>#maingenre</label> + <label>#maingenre/#subgenre</label> <font>font13</font> <textcolor>FFFFFFFF</textcolor> <animation effect="fade" time="200">WindowOpen</animation> <animation effect="fade" time="200">WindowClose</animation> </control> <control> - <description>SubGenre</description> - <type>label</type> - <id>1</id> - <posX>400</posX> - <posY>205</posY> - <label>Subgenre</label> - <font>font13</font> - <textcolor>FFB2D4F5</textcolor> - <animation effect="fade" time="200">WindowOpen</animation> - <animation effect="fade" time="200">WindowClose</animation> - </control> - <control> - <description>SubGenre value</description> - <type>label</type> - <id>1</id> - <posX>400</posX> - <posY>220</posY> - <label>#subgenre</label> - <font>font13</font> - <textcolor>FFFFFFFF</textcolor> - <animation effect="fade" time="200">WindowOpen</animation> - <animation effect="fade" time="200">WindowClose</animation> - </control> - <control> <description>Year txt</description> <type>label</type> <id>1</id> Modified: trunk/plugins/myGUIProgramsAlt/README.txt =================================================================== --- trunk/plugins/myGUIProgramsAlt/README.txt 2007-07-12 05:54:07 UTC (rev 688) +++ trunk/plugins/myGUIProgramsAlt/README.txt 2007-07-12 18:58:38 UTC (rev 689) @@ -1,4 +1,4 @@ -Work in progress on an alternative/update to myprograms. +WIP on an alternative/update to myprograms. Still features and bugs to fix. Do NOT USE on your real MP-installation, only for tests.. Bug-reports ,not yet, there are a few=) known to fix first. @@ -7,6 +7,7 @@ :--INSTALLATION Copy contents of metadata-folder to MP root folder , and the GUIPrograms.dll to MP/windowsplugins to run. +Copy skin to relevant folder. There will possibly be db-changes and xml-changes between versions, so always make sure that you have a clean install between updates. So far: @@ -101,32 +102,9 @@ Above: mabey add an advanced option for the user. In short, allowing a merge between "easy setup" (as above) and total control filepaths etc. - - What should be the name for the plugin, when we will release it? - -Imo MyProgramsAlt sounds a bit uggly. I think it should not be too long and complicated. - - MyProgramsV2 - - MyProgramsAlt - - MyProgramsAlternative - - NewMyPrograms - - NewPrograms - ..... - could contain: new, alt -What about using a complete new name? - something with Games or Emu? +MyEmu... --myGemu --nahh --myEmu maybe... there already is myEmulators--- but this would be the most fitting maybe, as i plan to add a lot of preconfigs for this kind of stuff. --myProgramsV2 ...boring --myProgramsRemix -- nope -What do you feel is the best? - - - What about an BackUp feature? - I you wanna do it.... ...Same goes for report features. -Don't worry should not backup all stuff, just save in any fileformat you want: - - filepath and filename: to identify the file - - Launchcount - - LastTimeLaunched - - Add some more specific emulator support.. - using emulator ids??? can be used for - filter in fileinfoscraperForm.. we got system id's now.. so feel free to implement.Will add emulator table at some point. @@ -137,6 +115,8 @@ - saving the path to file for import - saving the path to image dir, or using thumbsDir of MP, are there any pros? + + Iso mounting -> pro/contra??? "Minimize MP before starting a file" as a new option for application items: @@ -160,4 +140,11 @@ - Remotes, in general, maybe we should handle it like DirectInput imo lower priority, if you play with keyboard, use it to close the app, if you play with joystick try first point +----Won't do--------------- + - What about an BackUp feature? - I you wanna do it.... ...Same goes for report features. +Don't worry should not backup all stuff, just save in any fileformat you want: + - filepath and filename: to identify the file + - Launchcount + - LastTimeLaunched + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |