Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bulk selection features added. #1383

Closed
wants to merge 6 commits into from

Conversation

martinnj
Copy link
Contributor

Adds menu items for "selecting all installed" and "deselect all
selected". Also adds a checkbox to the recommended/suggested mods page
for toggling all mods in the list. Implements #1148.

Adds menu items for "selecting all installed" and "deselect all
selected". Also adds a checkbox to the recommended/suggested mods page
for toggling all mods in the list. Implements KSP-CKAN#1148.
@mheguy
Copy link
Contributor

mheguy commented Aug 15, 2015

Using closes/fixes/resolves will have GitHub automatically close issues when a PR is merged.
Closes #1148

//ApplyToolButton.Enabled = true;
}
}
ApplyToolButton.Enabled = (ChangeSet.Any());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got an exception in this line: (Changeset was null)

An unhandled exception of type 'System.ArgumentNullException' occurred in System.Core.dll

Additional information: Der Wert darf nicht NULL sein.
   bei System.Linq.Enumerable.Any[TSource](IEnumerable`1 source)
   bei CKAN.Main.deselectAllSelectedModsToolStripMenuItem_Click(Object sender, EventArgs e) in C:\Users\Martin\Documents\Visual Studio 2015\Projects\CKAN\GUI\Main.cs:Zeile 1066.
   bei System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   bei System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   bei System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   bei System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   bei System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   bei System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
   bei System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   bei System.Windows.Forms.Control.WndProc(Message& m)
   bei System.Windows.Forms.ToolStrip.WndProc(Message& m)
   bei System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
   bei System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   bei System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   bei System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
   bei System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   bei System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   bei CKAN.Main..ctor(String[] cmdlineArgs, GUIUser User, Boolean showConsole) in C:\Users\Martin\Documents\Visual Studio 2015\Projects\CKAN\GUI\Main.cs:Zeile 223.
   bei CKAN.GUI.Main_(String[] args, Boolean showConsole) in C:\Users\Martin\Documents\Visual Studio 2015\Projects\CKAN\GUI\Program.cs:Zeile 35.
   bei CKAN.GUI.Main(String[] args) in C:\Users\Martin\Documents\Visual Studio 2015\Projects\CKAN\GUI\Program.cs:Zeile 17.
   bei System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
   bei System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
   bei Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
   bei System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   bei System.Threading.ThreadHelper.ThreadStart()

@Postremus
Copy link
Contributor

The Checkbox and the caption are not aligned properly in the recommends / suggested dialog
ss 2015-08-15 at 04 06 51

@martinnj
Copy link
Contributor Author

Both bugs are corrected now. Thanks for bringing it up 👍

@Postremus
Copy link
Contributor

I deselected all mods. Apply changes is Grey.

@martinnj
Copy link
Contributor Author

I'm unable to recreate that on my PC. Logically the status of the botton after "deselect all" is decided by the state of the "ChangeSet", if the set is null or have less than 1 item, it will be disabled, otherwise it will be enabled.

Did you have any mods installed when you did the test or what was the status?

@Postremus
Copy link
Contributor

35 mods installed:
http://puu.sh/jCxYV/bb1a165999.ckan

@Postremus
Copy link
Contributor

As a recommends list: http://puu.sh/jCylF/bc0c9fdde4.ckan

Prevents inconsistency errors due to dependencies being marked for
uninstall before the dependant.
@Postremus
Copy link
Contributor

Maybe you could split this PR into two? One could contain the changes to the recommends page, the other one the changes to the main mod list.
In this way, we are at least able to merge the recommends page changes.
Thank you for your time!

@martinnj
Copy link
Contributor Author

Will do, created a new pr (#1398) for the checkbox. :)

@pjf
Copy link
Member

pjf commented Sep 10, 2015

My apologies I've been a little while jumping in here. This is awesome and seems to be working for me under Linux, but it looks like I've managed to find a tiny bug, where the (de-)select all ticky may start off in the opposite state to everything else:

de-select-all

In this case, I was installing the "CrowdSourcedFlags" mod, which suggests a bunch of other flags. (Steps to reproduce: Open CKAN, select CrowdSourcedFlags, hit apply chages, hit next to get to get to suggesed mods.)

I don't know if it's possible, but having the ticky start ticked for recommends, and unticked for suggested would be great! (And some mods may only have recommends, and others may only have suggests.)

A merge or rebase will also assist in merging, but is not strictly necessary as I can do that if needed. :)

Many, many thanks!

~ Paul

@Postremus
Copy link
Contributor

@pjf the current master already has the changes for the recommends and suggest page merged in.
See #1398 and #1417

@martinnj
Copy link
Contributor Author

I can create a patch for the checkbox state, It's just a question of making sure it's unchecked whenever I also change the label text. Might not have to create it before next week if it has any interest?

@Postremus
Copy link
Contributor

@martinnj #1417 already adressed this concern

@martinnj
Copy link
Contributor Author

Got it, awesome :)

@pjf
Copy link
Member

pjf commented Sep 27, 2015

Oh no, I've reached that point where I'm completely confused about this PR again! To help me out:

  • What remains from this PR that hasn't already been merged into master?
  • If nothing, then can we close this PR?
  • If not nothing, can we edit the top-comment and PR description to reflect that? (Or open a new PR and close this one, both are good for me!)

@martinnj
Copy link
Contributor Author

There is still some GUI changes left. But since I have been unable to recreate the bug Postremus descovered and been busy as fuck I have yet to fix anything. I most likely won't have time to fix it up since my courses have started back up. Sorry.

@martinnj martinnj closed this Sep 27, 2015
@pjf pjf removed the Pull request label Sep 27, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants