bigspinky / gwmultilaunch

Automatically exported from code.google.com/p/gwmultilaunch
GNU General Public License v3.0
0 stars 0 forks source link

Launch multiple GW copies with one shortcut #4

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
It would be awesome if GWMultiLaunch could launch multiple copies of GW
from one single shortcut, instead of having to use many shortcuts, one for
each copy.

Instead of that, if it would be possible to double click on a shortcut, and
have the launcher start each of the registered GW copies one after the
other on each new doubleclick, that would make the whole launching sequence
much simpler. At least, for one use case.

I did make a few modifications to the source (I will attach a patch later,
once I cleaned it up), which basically does the following:

If GWMultiLaunch is started with "-sequence" as the first argument, the
rest of the arguments that follow will be treated as path to the copies to
launch. The program then will start to iterate over those paths, and try to
launch them in order, exiting after the first successful launch. This is so
that if one only wants to start one GW instance, he can do so using the
same shortcut. If one wants multiple, one will just continue clicking the
shortcut.

My patch, which I will attach shortly, does exactly what is explained
above. If I have a little bit more time, I will try to make the "Make
Shortcut" button create a "-sequence" shortcut if multiple copies are
selected, instead of making multiple launchers.

Not sure if this would be useful for anyone else, but to me, this behaviour
makes a little more sense. Hopefully, it will be usable for others aswell!

What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?

Please provide any additional information below.

Original issue reported on code.google.com by gergely....@gmail.com on 2 Aug 2009 at 5:42

GoogleCodeExporter commented 8 years ago
A patch adding the functionality explained above is attached to this comment. 
The
only side effect it has, is that you do not get a dialog box popping up when 
trying
to launch an already running GW instance.

Original comment by gergely....@gmail.com on 2 Aug 2009 at 5:55

Attachments:

GoogleCodeExporter commented 8 years ago
Hi Gergely,

Thank you for the great idea, write up, patch.

Possibly a cleaner way to implement this might be to read the ini file for list 
of gw
copies. There wouldn't be a need to pass all the paths in shortcut arguments. 

Something like

bool copylaunched = false;
foreach (copy in gw.ini)
{
  if (copy is not launched)
  {
      launch();
      copylaunched = true;
      break;
  }
}

if copylaunched == false
    msgbox("Was not able to launch gw, all copies already launched")

this could be tweaked to take:

"-sequece" argument and optional set of gw arguments after that "-window -bmp"
to pass to gw executable.

Original comment by keke...@gmail.com on 3 Aug 2009 at 7:05

GoogleCodeExporter commented 8 years ago
That was my first idea too, to get the list of GW copies from either the ini 
file, or
from the profilesListBox. Sadly, my C# knowledge is lacking (this is the first 
time
ever I touched C# code :P), so I wasn't able to do that.

I do agree, that reading the ini/profilesListBox would be a superior solution, 
but I
lacked the knowledge to implement that O:)

Original comment by gergely....@gmail.com on 3 Aug 2009 at 10:46

GoogleCodeExporter commented 8 years ago
Made an update and committed to svn to add this feature. Let me know if it 
works out
for you. I decided to go with "-auto" switch. Will make 0.6 beta executable if 
you
think this works okay.

Code is kinda hacky and dirty but will be cleaned up.

Original comment by keke...@gmail.com on 4 Aug 2009 at 1:36

GoogleCodeExporter commented 8 years ago
Haven't tried it yet (gonna do it today), but looking at the code change, I 
think
I'll be happy with it, thank you!

Original comment by gergely....@gmail.com on 8 Aug 2009 at 9:10

GoogleCodeExporter commented 8 years ago
Cleaned up code a bit more. Will be revamping UI before doing 0.6 beta release.
Way too many buttons at the moment.

Original comment by keke...@gmail.com on 10 Aug 2009 at 4:25