Review Request 109224: Patch for bug 315932 in Amarok. Resolving the window not coming up on launching the second time in Amarok.

Mark Kretschmann kretschmann at kde.org
Wed Mar 6 16:11:29 UTC 2013



> On March 6, 2013, 7:36 a.m., Mark Kretschmann wrote:
> > Please don't apply this patch. Here's why:
> > 
> > Amarok is really not supposed to be running more than one instance at the same time (it's a "KUniqueApplication"). If you try to start another instance, you should be getting this message:
> > 
> > mark at serenity:~$ amarok
> > Amarok is already running!
> > 
> > Any command line flags will be processed by the already running instance. This is how the "%U" works.
> > 
> > 
> > Exception: If you run Amarok with the -m or --multipleinstances flag, it will happily start another instance.
> > 
> >
> 
> Fabian Kosmale wrote:
>     First: I'm not sure if I'm misunderstanding you, but the linked bug  is not about starting a new instance of Amarok, but giving focus to the already existing one when it's running in the background.
>     Also, are you sure about the command line flags (Mat?j, that also answers your question about %u versus %U )? fdo says: "%U: A list of URLs. Each URL is passed as a separate argument to the executable program. Local files may either be passed as file: URLs or as file path." and for "%u": "A single URL. Local files may either be passed as file: URLs or as file path." So as far as I understand the standard, command line flags (like -a) will never be passed to amarok, as they are not URLs (that does of course only apply iff Amarok is started via the desktop file). Furthermore, the only difference between "%u" and "%U" should be the number of URLs passed at the same time.
> 
> Matěj Laitl wrote:
>     Well my biggest concern is whether this breaks "Click on mp3 file in Dolphin to have it open in Amarok" and it is still unanswered.
>     
>     Also, when %u means a single url, %U means multiple ones, omitting there altogether means no urls? That's certainly not what we want.

@Fabian: I see. I did indeed misunderstand you.

So maybe this could be helpful to get focus for our window:

http://www.purinchu.net/kdelibs-apidocs/kdeui/html/classKWindowSystem.html#a7a04fd62d97ed3104e02bfa3ffa19ad5


- Mark


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/109224/#review28647
-----------------------------------------------------------


On March 5, 2013, 5:02 p.m., Harikrishnan S. wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/109224/
> -----------------------------------------------------------
> 
> (Updated March 5, 2013, 5:02 p.m.)
> 
> 
> Review request for Amarok.
> 
> 
> Description
> -------
> 
> Resolved 315932, removed %U from amarok.desktop
> 
> 
> Diffs
> -----
> 
>   src/amarok.desktop 4fe72c0d96111f2bd8bdea3e12622e09320ad31c 
> 
> Diff: http://git.reviewboard.kde.org/r/109224/diff/
> 
> 
> Testing
> -------
> 
> Seems to be working. On launching the second time, the window does come up now. Also build perfectly.
> 
> 
> Thanks,
> 
> Harikrishnan S.
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/amarok-devel/attachments/20130306/269d20e2/attachment.html>


More information about the Amarok-devel mailing list