From: <nor...@us...> - 2007-08-27 23:30:35
|
Revision: 872 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=872&view=rev Author: northern_sky Date: 2007-08-27 16:30:33 -0700 (Mon, 27 Aug 2007) Log Message: ----------- cleanups Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesImportProgress.Designer.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesImportProgress.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.Designer.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.Designer.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGamebase.Designer.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGamebase.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGrouper.Designer.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGrouper.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsMame.Designer.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/skin/BlueTwo/myProgramsAltFileInfo.xml Removed Paths: ------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/skin/BlueTwo/myProgramsAlt.xml Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesImportProgress.Designer.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesImportProgress.Designer.cs 2007-08-27 12:46:19 UTC (rev 871) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesImportProgress.Designer.cs 2007-08-27 23:30:33 UTC (rev 872) @@ -76,9 +76,9 @@ this.toolTip.SetToolTip(this.quoteCheckBox, "Quotes are usually needed to handle filenames with spaces correctly. \r\nAvoid doub" + "le quotes though!"); // - // allowRefreshCheckBox + // allowGUIImportCheckBox // - this.toolTip.SetToolTip(this.allowRefreshCheckBox, "Check this if users can run the import through the REFRESH button in MediaPortal." + + this.toolTip.SetToolTip(this.allowGUIImportCheckBox, "Check this if users can run the import through the REFRESH button in MediaPortal." + ""); // // progressBar @@ -125,7 +125,7 @@ this.Controls.SetChildIndex(this.quoteCheckBox, 0); this.Controls.SetChildIndex(this.applicationImageButton, 0); this.Controls.SetChildIndex(this.startupDirButton, 0); - this.Controls.SetChildIndex(this.allowRefreshCheckBox, 0); + this.Controls.SetChildIndex(this.allowGUIImportCheckBox, 0); this.Controls.SetChildIndex(this.informationLabel, 0); this.Controls.SetChildIndex(this.applicationExeTextBox, 0); this.Controls.SetChildIndex(this.progressBar, 0); Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesImportProgress.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesImportProgress.cs 2007-08-27 12:46:19 UTC (rev 871) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesImportProgress.cs 2007-08-27 23:30:33 UTC (rev 872) @@ -71,7 +71,7 @@ quoteCheckBox.Visible = false; - allowRefreshCheckBox.Visible = false; + allowGUIImportCheckBox.Visible = false; waitExitCheckBox.Visible = false; shellexecuteCheckBox.Visible = false; informationLabel.Visible = false; Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.Designer.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.Designer.cs 2007-08-27 12:46:19 UTC (rev 871) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.Designer.cs 2007-08-27 23:30:33 UTC (rev 872) @@ -46,7 +46,7 @@ this.quoteCheckBox = new System.Windows.Forms.CheckBox(); this.applicationImageButton = new System.Windows.Forms.Button(); this.startupDirButton = new System.Windows.Forms.Button(); - this.allowRefreshCheckBox = new System.Windows.Forms.CheckBox(); + this.allowGUIImportCheckBox = new System.Windows.Forms.CheckBox(); this.informationLabel = new System.Windows.Forms.Label(); this.toolTip = new System.Windows.Forms.ToolTip(this.components); this.openFileDialog = new System.Windows.Forms.OpenFileDialog(); @@ -227,15 +227,15 @@ this.startupDirButton.UseVisualStyleBackColor = true; this.startupDirButton.Click += new System.EventHandler(this.startupDirButton_Click); // - // allowRefreshCheckBox + // allowGUIImportCheckBox // - this.allowRefreshCheckBox.AutoSize = true; - this.allowRefreshCheckBox.Location = new System.Drawing.Point(5, 368); - this.allowRefreshCheckBox.Name = "allowRefreshCheckBox"; - this.allowRefreshCheckBox.Size = new System.Drawing.Size(154, 17); - this.allowRefreshCheckBox.TabIndex = 30; - this.allowRefreshCheckBox.Text = "Allow refresh in mediaportal"; - this.allowRefreshCheckBox.UseVisualStyleBackColor = true; + this.allowGUIImportCheckBox.AutoSize = true; + this.allowGUIImportCheckBox.Location = new System.Drawing.Point(5, 368); + this.allowGUIImportCheckBox.Name = "allowGUIImportCheckBox"; + this.allowGUIImportCheckBox.Size = new System.Drawing.Size(201, 17); + this.allowGUIImportCheckBox.TabIndex = 30; + this.allowGUIImportCheckBox.Text = "Allow reimport from within mediaportal"; + this.allowGUIImportCheckBox.UseVisualStyleBackColor = true; // // informationLabel // @@ -323,7 +323,7 @@ this.Controls.Add(this.startupDirComboBox); this.Controls.Add(this.applicationExeTextBox); this.Controls.Add(this.informationLabel); - this.Controls.Add(this.allowRefreshCheckBox); + this.Controls.Add(this.allowGUIImportCheckBox); this.Controls.Add(this.startupDirButton); this.Controls.Add(this.applicationImageButton); this.Controls.Add(this.quoteCheckBox); @@ -367,7 +367,7 @@ protected System.Windows.Forms.CheckBox quoteCheckBox; protected System.Windows.Forms.Button applicationImageButton; protected System.Windows.Forms.Button startupDirButton; - protected System.Windows.Forms.CheckBox allowRefreshCheckBox; + protected System.Windows.Forms.CheckBox allowGUIImportCheckBox; protected System.Windows.Forms.Label informationLabel; protected System.Windows.Forms.ToolTip toolTip; protected System.Windows.Forms.FolderBrowserDialog folderBrowserDialog; Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.cs 2007-08-27 12:46:19 UTC (rev 871) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.cs 2007-08-27 23:30:33 UTC (rev 872) @@ -123,7 +123,7 @@ toolTip.SetToolTip(applicationImageTextBox, "Optional filename for an image to display in MediaPortal"); toolTip.SetToolTip(enabledCheckbox, "Only enabled items will appear in MediaPortal"); toolTip.SetToolTip(applicationExeTextBox, "Program you wish to execute, include the full path (mandatory if ShellExecute is " + "OFF)"); - toolTip.SetToolTip(allowRefreshCheckBox, "If you want to be able to run the import through the REFRESH button in MediaPortal."); + toolTip.SetToolTip(allowGUIImportCheckBox, "If you want to be able to run the import through the Reimport button in MediaPortal."); toolTip.SetToolTip(preCommandTextBox, "Configure an command to run as pre of the main filelaunching ie explorer; joy2key; etc .Separate with ;."); toolTip.SetToolTip(postCommandTextBox, "Configure an command to run as post of the main filelaunching ie explorer; joy2key; etc .Separate with ;."); toolTip.SetToolTip(waitExitCheckBox, "If you want mediaportal to wait for exit while running application."); Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.Designer.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.Designer.cs 2007-08-27 12:46:19 UTC (rev 871) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.Designer.cs 2007-08-27 23:30:33 UTC (rev 872) @@ -71,9 +71,9 @@ this.toolTip.SetToolTip(this.quoteCheckBox, "Quotes are usually needed to handle filenames with spaces correctly. \r\nAvoid doub" + "le quotes though!"); // - // allowRefreshCheckBox + // allowGUIImportCheckBox // - this.toolTip.SetToolTip(this.allowRefreshCheckBox, "Check this if users can run the import through the REFRESH button in MediaPortal." + + this.toolTip.SetToolTip(this.allowGUIImportCheckBox, "Check this if users can run the import through the REFRESH button in MediaPortal." + ""); // // platformComboBox @@ -124,7 +124,7 @@ this.Controls.SetChildIndex(this.quoteCheckBox, 0); this.Controls.SetChildIndex(this.applicationImageButton, 0); this.Controls.SetChildIndex(this.startupDirButton, 0); - this.Controls.SetChildIndex(this.allowRefreshCheckBox, 0); + this.Controls.SetChildIndex(this.allowGUIImportCheckBox, 0); this.Controls.SetChildIndex(this.informationLabel, 0); this.Controls.SetChildIndex(this.applicationExeTextBox, 0); this.Controls.SetChildIndex(this.startupDirComboBox, 0); Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.cs 2007-08-27 12:46:19 UTC (rev 871) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.cs 2007-08-27 23:30:33 UTC (rev 872) @@ -54,7 +54,7 @@ shellexecuteCheckBox.Checked = applicationItem.UseShellExecute; quoteCheckBox.Checked = applicationItem.UseQuotes; waitExitCheckBox.Checked = (applicationItem.WaitForExit); - allowRefreshCheckBox.Checked = applicationItem.RefreshGUIAllowed; + allowGUIImportCheckBox.Checked = applicationItem.RefreshGUIAllowed; if (applicationItem.PlatformId != 0) { platformComboBox.SelectedValue = applicationItem.PlatformId; @@ -76,7 +76,7 @@ curApp.UseQuotes = quoteCheckBox.Checked; curApp.WaitForExit = waitExitCheckBox.Checked; curApp.Item_Type = ItemType.DIRCACHE; - curApp.RefreshGUIAllowed = allowRefreshCheckBox.Checked; + curApp.RefreshGUIAllowed = allowGUIImportCheckBox.Checked; curApp.PlatformId = (int)platformComboBox.SelectedValue; } @@ -120,7 +120,7 @@ informationLabel.Text = "Directory Cache"; //untiil we really do something with this option in appdircache.. - allowRefreshCheckBox.Checked = false; + allowGUIImportCheckBox.Checked = false; } } Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGamebase.Designer.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGamebase.Designer.cs 2007-08-27 12:46:19 UTC (rev 871) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGamebase.Designer.cs 2007-08-27 23:30:33 UTC (rev 872) @@ -76,10 +76,10 @@ this.toolTip.SetToolTip(this.quoteCheckBox, "Quotes are usually needed to handle filenames with spaces correctly. \r\nAvoid doub" + "le quotes though!"); // - // allowRefreshCheckBox + // allowGUIImportCheckBox // - this.allowRefreshCheckBox.Location = new System.Drawing.Point(7, 366); - this.toolTip.SetToolTip(this.allowRefreshCheckBox, "Check this if users can run the import through the REFRESH button in MediaPortal." + + this.allowGUIImportCheckBox.Location = new System.Drawing.Point(7, 366); + this.toolTip.SetToolTip(this.allowGUIImportCheckBox, "Check this if users can run the import through the REFRESH button in MediaPortal." + ""); // // informationLabel Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGamebase.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGamebase.cs 2007-08-27 12:46:19 UTC (rev 871) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGamebase.cs 2007-08-27 23:30:33 UTC (rev 872) @@ -53,7 +53,7 @@ this.startupDirComboBox.Text = curApp.StartupDir; this.quoteCheckBox.Checked = true; //(applicationItem.UseQuotes); this.waitExitCheckBox.Checked = (curApp.WaitForExit); - this.allowRefreshCheckBox.Checked = curApp.RefreshGUIAllowed; + this.allowGUIImportCheckBox.Checked = curApp.RefreshGUIAllowed; } public override void SaveSettings(ApplicationItem curApp) @@ -65,7 +65,7 @@ curApp.UseQuotes = this.quoteCheckBox.Checked; curApp.WaitForExit = this.waitExitCheckBox.Checked; curApp.Item_Type = ItemType.GAMEBASE; - curApp.RefreshGUIAllowed = this.allowRefreshCheckBox.Checked; + curApp.RefreshGUIAllowed = this.allowGUIImportCheckBox.Checked; } Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGrouper.Designer.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGrouper.Designer.cs 2007-08-27 12:46:19 UTC (rev 871) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGrouper.Designer.cs 2007-08-27 23:30:33 UTC (rev 872) @@ -68,9 +68,9 @@ this.toolTip.SetToolTip(this.quoteCheckBox, "Quotes are usually needed to handle filenames with spaces correctly. \r\nAvoid doub" + "le quotes though!"); // - // allowRefreshCheckBox + // allowGUIImportCheckBox // - this.toolTip.SetToolTip(this.allowRefreshCheckBox, "Check this if users can run the import through the REFRESH button in MediaPortal." + + this.toolTip.SetToolTip(this.allowGUIImportCheckBox, "Check this if users can run the import through the REFRESH button in MediaPortal." + ""); // // AppSettingsGrouper Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGrouper.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGrouper.cs 2007-08-27 12:46:19 UTC (rev 871) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGrouper.cs 2007-08-27 23:30:33 UTC (rev 872) @@ -76,7 +76,7 @@ startupDirComboBox.Visible = false; quoteCheckBox.Visible = false; - allowRefreshCheckBox.Visible = false; + allowGUIImportCheckBox.Visible = false; waitExitCheckBox.Visible = false; shellexecuteCheckBox.Visible = false; informationLabel.Visible = false; Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsMame.Designer.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsMame.Designer.cs 2007-08-27 12:46:19 UTC (rev 871) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsMame.Designer.cs 2007-08-27 23:30:33 UTC (rev 872) @@ -74,9 +74,9 @@ this.toolTip.SetToolTip(this.quoteCheckBox, "Quotes are usually needed to handle filenames with spaces correctly. \r\nAvoid doub" + "le quotes though!"); // - // allowRefreshCheckBox + // allowGUIImportCheckBox // - this.toolTip.SetToolTip(this.allowRefreshCheckBox, "Check this if users can run the import through the REFRESH button in MediaPortal." + + this.toolTip.SetToolTip(this.allowGUIImportCheckBox, "Check this if users can run the import through the REFRESH button in MediaPortal." + ""); // // informationLabel @@ -155,7 +155,7 @@ this.Controls.SetChildIndex(this.quoteCheckBox, 0); this.Controls.SetChildIndex(this.applicationImageButton, 0); this.Controls.SetChildIndex(this.startupDirButton, 0); - this.Controls.SetChildIndex(this.allowRefreshCheckBox, 0); + this.Controls.SetChildIndex(this.allowGUIImportCheckBox, 0); this.Controls.SetChildIndex(this.groupBox1, 0); this.groupBox1.ResumeLayout(false); this.ResumeLayout(false); Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.cs 2007-08-27 12:46:19 UTC (rev 871) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.cs 2007-08-27 23:30:33 UTC (rev 872) @@ -87,10 +87,10 @@ [SkinControl(4)] protected GUIButtonControl btnViews = null; [SkinControl(5)] - protected GUIButtonControl btnRefresh = null; + protected GUIButtonControl btnReimport = null; //Images [SkinControl(6)] - protected GUIImage screenShotImage = null; + protected GUIImage thumbGUIImage = null; [SkinControl(50)] protected GUIFacadeControl facadeView = null; @@ -148,30 +148,18 @@ set { currentSortMethod = value; } } - GUIListItem GetSelectedItem() + GUIListItem SelectedGUIListItem() { return facadeView.SelectedListItem; } - public int GetSelectedItemNo() + public int SelectedGUIListItemIndex() { return facadeView.SelectedListItemIndex; } - int GetCurrentFatherID() - { - if (currentApplicationItem != null) - { - return currentApplicationItem.ApplicationItemId; - } - else - { - return -1; // root - } - } - - bool ThereAreAppsToDisplay() + bool ApplicationItemSubItemsAllowed() { if (currentApplicationItem == null) { @@ -183,7 +171,7 @@ } } - bool IsCurrentApplicationItemNull() + bool IsCurrentApplicationItemNotNull() { return (currentApplicationItem != null); // all globalApplicationList can have files except the root } @@ -305,11 +293,11 @@ if (currentApplicationItem == null) { - btnRefresh.IsVisible = false; + btnReimport.IsVisible = false; } else { - btnRefresh.IsVisible = currentApplicationItem.RefreshGUIAllowed; + btnReimport.IsVisible = currentApplicationItem.RefreshGUIAllowed; } facadeView.IsVisible = true; @@ -372,31 +360,27 @@ } } - void ShowThumbPanel() + void ShouldShowThumbPanel() { - int itemIndex = facadeView.SelectedListItemIndex; - switch (CurrentLayout) { case Layout.List: facadeView.View = GUIFacadeControl.ViewMode.List; - screenShotImage.Visible = true; + thumbGUIImage.Visible = true; break; case Layout.Icons: facadeView.View = GUIFacadeControl.ViewMode.SmallIcons; - screenShotImage.Visible = false; + thumbGUIImage.Visible = false; break; case Layout.LargeIcons: facadeView.View = GUIFacadeControl.ViewMode.LargeIcons; - screenShotImage.Visible = false; + thumbGUIImage.Visible = false; break; case Layout.FilmStrip: facadeView.View = GUIFacadeControl.ViewMode.Filmstrip; - screenShotImage.Visible = false; + thumbGUIImage.Visible = false; break; } - facadeView.SelectedListItemIndex = itemIndex; - UpdateButtonStates(); } void RenderThumbnail(float timePassed) @@ -413,41 +397,35 @@ void RefreshThumbnail() { - ApplicationItem appWithImg = currentApplicationItem; - GUIListItem item = GetSelectedItem(); + GUIListItem selectedGUIListItem = SelectedGUIListItem(); // some preconditions... - if (item == null) return; - if (appWithImg == null) - { - if (item.MusicTag == null) return; - appWithImg = item.MusicTag as ApplicationItem; - if (appWithImg == null) return; - } - + if (selectedGUIListItem == null) return; + if (currentApplicationItem == null) return; + ThumbnailPath = ""; - if (item.ThumbnailImage != "" - && item.ThumbnailImage != GUIGraphicsContext.Skin + @"\media\DefaultFolderBig.png" - && item.ThumbnailImage != GUIGraphicsContext.Skin + @"\media\DefaultAlbum.png" + if (selectedGUIListItem.ThumbnailImage != "" + && selectedGUIListItem.ThumbnailImage != GUIGraphicsContext.Skin + @"\media\DefaultFolderBig.png" + && selectedGUIListItem.ThumbnailImage != GUIGraphicsContext.Skin + @"\media\DefaultAlbum.png" ) { // only show big thumb if there is really one.... - ThumbnailPath = appWithImg.GetCurThumb(item); // some modes look for thumbs differently + ThumbnailPath = currentApplicationItem.GetCurThumb(selectedGUIListItem); // some modes look for thumbs differently } - appWithImg.NextThumb(); // try to find a next thumbnail + currentApplicationItem.NextThumb(); // try to find a next thumbnail slideTime = (DateTime.Now.Ticks / 10000); // reset timer! } void UpdateListControl() { GUIControl.ClearControl(GetID, facadeView.GetID); - if (IsCurrentApplicationItemNull()) + if (IsCurrentApplicationItemNotNull()) ProgramUtils.AddBackButton(facadeView); int TotalItems = 0; - if (ThereAreAppsToDisplay()) + if (ApplicationItemSubItemsAllowed()) TotalItems += DisplayApps(); - if (IsCurrentApplicationItemNull()) + if (IsCurrentApplicationItemNotNull()) TotalItems += DisplayFiles(); if (currentApplicationItem != null) @@ -482,7 +460,7 @@ { int totalApps = 0; - foreach (ApplicationItem applicationItem in AppsOfFatherID(GetCurrentFatherID())) + foreach (ApplicationItem applicationItem in AppsOfFatherID(currentApplicationItem == null ? -1 : currentApplicationItem.ApplicationItemId)) { if (!applicationItem.Enabled) continue; @@ -491,6 +469,7 @@ // check whether to use thumbsdir or not string imgFile = String.Empty; + if (ProgramUtils.UseThumbsDir()) imgFile = ProgramUtils.GetApplicationImage(applicationItem); else @@ -511,7 +490,6 @@ } item.MusicTag = applicationItem; - //item.IsFolder = true; // pseudo-folder.... item.OnItemSelected += new GUIListItem.ItemSelectedHandler(SetItemThumb); facadeView.Add(item); } @@ -599,33 +577,8 @@ return applicationItemList; } - List<ApplicationItem> AppsOfFather(ApplicationItem father) - { - if (father == null) - { - return AppsOfFatherID(-1); // return children of root node! - } - else - { - return AppsOfFatherID(father.ApplicationItemId); - } - } - int GetMaxPosition(int fatherID) - { - int res = 0; - foreach (ApplicationItem curApp in globalApplicationList) - { - if ((curApp.FatherID == fatherID) && (curApp.Position > res)) - { - res = curApp.Position; - } - } - return res; - } - - /* public ApplicationItem CloneAppItem(ApplicationItem sourceApp) { ApplicationItem newApp = (ApplicationItem)ItemFactory.itemFactoryInstance.GetItem(sqlDB, sourceApp.Item_Type, null, 0); @@ -740,7 +693,7 @@ void ItemClicked() { - GUIListItem selectedGUIListItem = GetSelectedItem(); + GUIListItem selectedGUIListItem = SelectedGUIListItem(); if (selectedGUIListItem.MusicTag != null) { @@ -750,20 +703,18 @@ { currentApplicationItem = (ApplicationItem)item; - //SaveItemIndex(GetSelectedItemNo().ToString(), currentApplicationItem, currentApplicationItem.lastFilepath); + //SaveItemIndex(SelectedGUIListItemIndex().ToString(), currentApplicationItem, currentApplicationItem.lastFilepath); prevFilepath = currentApplicationItem.DefaultFilepath(); ViewHandler.CurrentLevel = 0; - //currentApplicationItem.ViewHandler = ViewHandler; } else if (item is FileItem) { FileItem fileItem = (FileItem)item; - selectedItemIndex = GetSelectedItemNo(); + selectedItemIndex = SelectedGUIListItemIndex(); if (currentApplicationItem != null) { - prevFilepath = currentApplicationItem.DefaultFilepath(); currentApplicationItem.LaunchFile(fileItem); } @@ -772,7 +723,6 @@ { FilterItem filterItem = (FilterItem)item; - // SaveItemIndex(GetSelectedItemNo().ToString(), currentApplicationItem, prevFilepath); ViewHandler.AddFilterItem(filterItem); if (currentApplicationItem != null) { @@ -781,7 +731,6 @@ } } - UpdateButtonStates(); UpdateListControl(); } @@ -796,6 +745,9 @@ int DisplayItemList(List<object> dbItems, GUIFacadeControl facadeView) { int totalItems = 0; + FileItem fileItem = null; + FilterItem filterItem = null; + GUIListItem guiListItem = null; foreach (object baseItem in dbItems) { @@ -803,23 +755,22 @@ if (baseItem is FileItem) { - FileItem curFile = baseItem as FileItem; - GUIListItem gli = new GUIListItem(curFile.Title); + fileItem = baseItem as FileItem; + guiListItem = new GUIListItem(fileItem.Title); - gli.MusicTag = curFile; - // gli.IsFolder = curFile.IsFolder; - gli.OnRetrieveArt += new MediaPortal.GUI.Library.GUIListItem.RetrieveCoverArtHandler(SetImageFile); - gli.OnItemSelected += new MediaPortal.GUI.Library.GUIListItem.ItemSelectedHandler(SetItemThumb); - facadeView.Add(gli); + guiListItem.MusicTag = fileItem; + // guiListItem.IsFolder = curFile.IsFolder; + guiListItem.OnRetrieveArt += new MediaPortal.GUI.Library.GUIListItem.RetrieveCoverArtHandler(SetImageFile); + guiListItem.OnItemSelected += new MediaPortal.GUI.Library.GUIListItem.ItemSelectedHandler(SetItemThumb); + facadeView.Add(guiListItem); } - if (baseItem is FilterItem) + else if (baseItem is FilterItem) { - FilterItem curFile = baseItem as FilterItem; - GUIListItem gli = new GUIListItem(curFile.Title); - gli.MusicTag = curFile; - //gli.IsFolder = false; - gli.OnItemSelected += new MediaPortal.GUI.Library.GUIListItem.ItemSelectedHandler(SetItemThumb); - facadeView.Add(gli); + filterItem = baseItem as FilterItem; + guiListItem = new GUIListItem(filterItem.Title); + guiListItem.MusicTag = filterItem; + guiListItem.OnItemSelected += new MediaPortal.GUI.Library.GUIListItem.ItemSelectedHandler(SetItemThumb); + facadeView.Add(guiListItem); } } return totalItems; @@ -855,12 +806,12 @@ void SelectSortMethod() { GUIDialogMenu dlg = (GUIDialogMenu)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_MENU); + if (dlg == null) return; dlg.Reset(); dlg.SetHeading(495); - dlg.AddLocalizedString(268); // title dlg.AddLocalizedString(363); // filename dlg.AddLocalizedString(367); // rating @@ -921,8 +872,9 @@ if (currentApplicationItem == null) return; - selectedItemIndex = GetSelectedItemNo(); - GUIListItem item = GetSelectedItem(); + selectedItemIndex = SelectedGUIListItemIndex(); + + GUIListItem item = SelectedGUIListItem(); FileItem curFile = null; if (item.Label.Equals(ProgramUtils.cBackLabel)) return; @@ -942,19 +894,20 @@ void SetLabels() { + GUIListItem item = null; if (facadeView != null) { try { for (int i = 0; i < facadeView.Count; ++i) { - GUIListItem item = facadeView[i]; + item = facadeView[i]; ViewHandler.SetLabel(item.MusicTag as FileItem, ref item); } } catch (Exception ex) { - Log.Error("GUIMusicPlaylist: exception occured - item without Albumtag? - {0} / {1}", ex.Message, ex.StackTrace); + Log.Error("Exeption occured - item without Albumtag? - {0} / {1}", ex.Message, ex.StackTrace); } } } @@ -1024,7 +977,8 @@ } UpdateListControl(); - ShowThumbPanel(); + ShouldShowThumbPanel(); + UpdateButtonStates(); } @@ -1035,10 +989,10 @@ // make sure the selected index wasn't reseted already // and save the index only if it's non-zero // otherwise: DXDevice.Reset clears selection - int itemIndex = GetSelectedItemNo(); + int itemIndex = SelectedGUIListItemIndex(); if (itemIndex > 0) { - selectedItemIndex = GetSelectedItemNo(); + selectedItemIndex = SelectedGUIListItemIndex(); } if (dbHandlerInstance.SqlLiteConn.State == ConnectionState.Open) @@ -1098,12 +1052,11 @@ if (control == btnViewAs) { SwitchToNextViewLayout(); + ShouldShowThumbPanel(); + UpdateButtonStates(); - - ShowThumbPanel(); - } - else if (control == btnRefresh) + else if (control == btnReimport) { if (currentApplicationItem != null) { @@ -1167,7 +1120,7 @@ if (ThumbnailPath != _lastThumbnailPath) { - screenShotImage.FileName = ThumbnailPath; + thumbGUIImage.FileName = ThumbnailPath; facadeView.FilmstripView.InfoImageFileName = ThumbnailPath; facadeView.FilmstripView.NeedRefresh(); Deleted: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/skin/BlueTwo/myProgramsAlt.xml =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/skin/BlueTwo/myProgramsAlt.xml 2007-08-27 12:46:19 UTC (rev 871) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/skin/BlueTwo/myProgramsAlt.xml 2007-08-27 23:30:33 UTC (rev 872) @@ -1,72 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<window> - <id>3</id> - <defaultcontrol>2</defaultcontrol> - <allowoverlay>yes</allowoverlay> - <define>#header.label:#curheader</define> - <define>#header.image:programs_logo.png</define> - <define>#header.hover:hover_my programs.png</define> - <controls> - <import>common.window.xml</import> - <import>common.time.xml</import> - <control> - <description>group element</description> - <type>group</type> - <animation effect="fade" time="250">WindowOpen</animation> - <animation effect="fade" time="500">WindowClose</animation> - <animation effect="slide" time="250" start="-300,0">WindowOpen</animation> - <animation effect="slide" time="500" end="0,-300">WindowClose</animation> - <posX>60</posX> - <posY>97</posY> - <layout>StackLayout</layout> - <control> - <description>View-As</description> - <type>button</type> - <id>2</id> - <label>100</label> - <onright>50</onright> - <onup>17</onup> - </control> - <control> - <description>Sort</description> - <type>sortbutton</type> - <id>3</id> - <label>103</label> - <onright>50</onright> - </control> - <control> - <description>Switch View</description> - <type>button</type> - <id>4</id> - <label>457</label> - <onright>50</onright> - <ondown>3</ondown> - </control> - <control> - <description>Refresh</description> - <type>button</type> - <id>5</id> - <label>184</label> - <onright>50</onright> - <ondown>99</ondown> - </control> - </control> - <control> - <description>Screenshot</description> - <type>image</type> - <animation effect="fade" time="250">WindowOpen</animation> - <animation effect="fade" time="500">WindowClose</animation> - <animation effect="slide" time="250" start="-300,0">WindowOpen</animation> - <animation effect="slide" time="500" end="0,-300">WindowClose</animation> - <id>6</id> - <posX>60</posX> - <posY>230</posY> - <width>190</width> - <height>190</height> - <texture /> - <align>center</align> - <keepaspectratio>yes</keepaspectratio> - </control> - <import>common.facade.xml</import> - </controls> -</window> \ No newline at end of file Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/skin/BlueTwo/myProgramsAltFileInfo.xml =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/skin/BlueTwo/myProgramsAltFileInfo.xml 2007-08-27 12:46:19 UTC (rev 871) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/skin/BlueTwo/myProgramsAltFileInfo.xml 2007-08-27 23:30:33 UTC (rev 872) @@ -63,13 +63,13 @@ <animation effect="fade" time="200">WindowClose</animation> </control> <control> - <description>Refresh</description> + <description>Refresh from AMG</description> <type>button</type> <id>5</id> <posX>60</posX> <posY>199</posY> <width>120</width> - <label>184</label> + <label>Allgame import</label> <onleft>22</onleft> <onright>22</onright> <onup>2</onup> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |