Active Topics

 



Notices


Reply
Thread Tools
gidzzz's Avatar
Posts: 282 | Thanked: 2,387 times | Joined on Sep 2011
#1581
Originally Posted by Android_808 View Post
is omp able to play streams piped from stdout?
Nope, and it is impossible to take data from stdin and feed it directly to the renderer. I think the closest you can get is to use a named pipe and try to open it like a regular file. If it works, perhaps it could be automated.


Originally Posted by freemangordon View Post
@gidzzz - there is a long standing "feature" in OMP - trying to change the language while in playlist search mode (songs, etc) brings plyback window. That feature comes from https://gitorious.org/qt-mediaplayer...icator.cpp#L76

Now, my understanding is that no application should override system shortcuts unless really needed. Which is not the case here IMO.
I can't see anything wrong with language switching on my device. I did a few tests in the music window:
  • Search bar hidden -> Ctrl+Space opens Now Playing.
  • Search bar focused -> Ctrl+Space causes a notification saying "Input language switched to XXX" to appear.
  • Search bar visible, but not focused -> Ctrl+Space does nothing.
Am I misunderstanding something? Or where could the difference be coming from? I have not been messing with Qt libs.
__________________
My Thumb mini-repository: http://gidzzz.mooo.com/maemo/.
 

The Following User Says Thank You to gidzzz For This Useful Post:
Posts: 3,074 | Thanked: 12,960 times | Joined on Mar 2010 @ Sofia,Bulgaria
#1582
Originally Posted by gidzzz View Post

I can't see anything wrong with language switching on my device. I did a few tests in the music window:
[*]Search bar hidden -> Ctrl+Space opens Now Playing.
That one

...[*]Search bar visible, but not focused -> Ctrl+Space does nothing.
That one too

Open Contacts for example, input language can be switched *before* you've typed anything. And that is more logical than OMP's behaviour, where you have to type something, switch the language, then clear what you've typed, then type again.

Not to say that a system-wide shortcut should not be overtaken by an application unless really needed. I don't see why OMP needs exactly ctrl-space for opening the "Now Playing" window. That one could be shift-space, shift-enter or ctrl-enter as well(or some other combo), without breaking language switching capability.

Am I misunderstanding something? Or where could the difference be coming from?
The difference comes from the fact that OMP explicitly defines ctrl-space as application shortcut (see the link I posted in my previous post)
__________________
Never fear. I is here.

720p video support on N900,SmartReflex on N900,Keyboard and mouse support on N900
Nothing is impossible - Stable thumb2 on n900

Community SSU developer
kernel-power developer and maintainer

 

The Following 2 Users Say Thank You to freemangordon For This Useful Post:
gidzzz's Avatar
Posts: 282 | Thanked: 2,387 times | Joined on Sep 2011
#1583
Originally Posted by freemangordon View Post
Open Contacts for example, input language can be switched *before* you've typed anything. And that is more logical than OMP's behaviour, where you have to type something, switch the language, then clear what you've typed, then type again.

Not to say that a system-wide shortcut should not be overtaken by an application unless really needed. I don't see why OMP needs exactly ctrl-space for opening the "Now Playing" window. That one could be shift-space, shift-enter or ctrl-enter as well(or some other combo), without breaking language switching capability.
Now I see what you mean, but I wouldn't call it "overtaking" or "breaking something", as Contacts seems to be an exception here. Even Calendar, where pressing a letter key opens "New event" window with that letter typed, does not allow to change the input language unless an input field has the focus, let alone applications such as MicroB, the PDF viewer, or the stock media player.

Originally Posted by freemangordon View Post
The difference comes from the fact that OMP explicitly defines ctrl-space as application shortcut (see the link I posted in my previous post)
I think the difference comes from the fact that an application itself has to implement that behavior. For example, Ctrl+Space does nothing in Hamster Filer or cuteTube. That said, it is not just a matter of changing the shortcut, but also adding a new shortcut (although that should be pretty painless, as most windows share a custom common base class).

{Ctrl,Shift}+Enter are used for menus. I prefer most shortcuts with Ctrl rather than Shift, so I'd rather have Ctrl+P than Shift+Space. If there are no hard objections or better ideas, I think I can change all instances of Ctrl+Space to Ctrl+P (see http://wiki.maemo.org/Open_Media_Player#Controls for the list of affected contexts) and assign Ctrl+Space to toggle input language in most windows, of course provided I can find out how to do that (it doesn't look like it's as simple as calling something over D-Bus, any hints?). But doesn't that sound like a job for Qt, not individual applications?
__________________
My Thumb mini-repository: http://gidzzz.mooo.com/maemo/.
 

The Following User Says Thank You to gidzzz For This Useful Post:
Posts: 3,074 | Thanked: 12,960 times | Joined on Mar 2010 @ Sofia,Bulgaria
#1584
Originally Posted by gidzzz View Post
Now I see what you mean, but I wouldn't call it "overtaking" or "breaking something", as Contacts seems to be an exception here. Even Calendar, where pressing a letter key opens "New event" window with that letter typed, does not allow to change the input language unless an input field has the focus, let alone applications such as MicroB, the PDF viewer, or the stock media player.
My experience differs with yours - with all of the above applications, actually in every application I try - I can switch the input language no matter whether there is input filed focused or not, and no matter whether there is an input field at all. As long as ctrl-space is pressed, the language is switched. Excluding OMP ofc. I have ukeyboard installed, that might be the reason, though I doubt.

Try it:
1. open google in microb
2. click outside of the search field,
3. type something (so microb address field to appear and you to check your current language).
4. click somewhere on the page (so address field to disappear).
5. Press ctrl-space
6. go to 3

I think the difference comes from the fact that an application itself has to implement that behavior.
I am afraid you don't grok what https://gitorious.org/qt-mediaplayer...icator.cpp#L76 does.

Code:
connect(new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_Space), this), SIGNAL(activated()), this, SLOT(openWindow()));
Let me try to elaborate:

ctrl-space is a system-wide shortcut handled by hildon-input-method framework (if I am not mistaken) which switches the currently active input language for the hardware keyboard. The above code makes that sequence be handled by the application(or rather NowPlayingIndicator) itself *when* an object of class NowPlayingIndicator (or its parent) is active(visible). IIUC. So, HIM does not have any chance to switch the language. From Qt help:

http://qt-project.org/doc/qt-4.7/qshortcut.html

Code:
A shortcut is "listened for" by Qt's event loop when the shortcut's parent widget is receiving events.
For example, Ctrl+Space does nothing in Hamster Filer or cuteTube.
Wrong (at least for cuteTube), ctrl-space switches input language in cuteTube (which is the expected behaviour as Qt interacts with HIM). Don't have Hamster Filer so can't test, but I bet it is the same there. And in every other Qt application.

That said, it is not just a matter of changing the shortcut, but also adding a new shortcut (although that should be pretty painless, as most windows share a custom common base class).
{Ctrl,Shift}+Enter are used for menus. I prefer most shortcuts with Ctrl rather than Shift, so I'd rather have Ctrl+P than Shift+Space. If there are no hard objections or better ideas, I think I can change all instances of Ctrl+Space to Ctrl+P (see http://wiki.maemo.org/Open_Media_Player#Controls for the list of affected contexts)
It is up to you to decide that, I was just trying to give an example of possible replacements

and assign Ctrl+Space to toggle input language in most windows, of course provided I can find out how to do that (it doesn't look like it's as simple as calling something over D-Bus, any hints?).
You should do nothing, Qt already does it for you, unless the application overrides it (see the above code)

But doesn't that sound like a job for Qt, not individual applications?
Exactly. And Qt does its job pretty well given we don't oversmart it.
__________________
Never fear. I is here.

720p video support on N900,SmartReflex on N900,Keyboard and mouse support on N900
Nothing is impossible - Stable thumb2 on n900

Community SSU developer
kernel-power developer and maintainer

 

The Following User Says Thank You to freemangordon For This Useful Post:
gidzzz's Avatar
Posts: 282 | Thanked: 2,387 times | Joined on Sep 2011
#1585
I understand what QShortcut does and what you're saying, but until now (the example with MicroB) I thought that you have based your claims on not enough apps. I'll install ukeyboard and try some other things tomorrow if I can find a free moment. It would be nice if in the meantime also somebody else could share their observations.

Below are some applications that I've checked, I can't see any interesting pattern here:
  • the desktop -
  • MicroB -
  • Media player -
  • Calendar -
  • Photos -
  • Contacts +
  • Phone +
  • Maps -
  • Camera -
  • E-mail +
  • Conversations +
  • Calculator -
  • Settings -
  • Backup -
  • PDF readerer -
  • RSS -
  • File manager +
  • FApMan -
  • App manager -
  • cuteTube -
  • Hamster Filer -
  • Qalendar -
  • gpSP -
  • gpSP GUI -
  • Marble -
__________________
My Thumb mini-repository: http://gidzzz.mooo.com/maemo/.
 

The Following User Says Thank You to gidzzz For This Useful Post:
Posts: 1,163 | Thanked: 1,873 times | Joined on Feb 2011 @ The Netherlands
#1586
You should try with default mediaplayer, it only starts and stops playing: The ctrl button is fully ignored as normal space does the same!
__________________
N900 loaded with:
CSSU-T (Thumb)
720p recording,
Pierogi, Lanterne, Cooktimer, Frogatto
N9 16GB loaded with:
Kernel-Plus
--
[TCPdump & libpcap | ngrep]
--
donate
 

The Following 2 Users Say Thank You to mr_pingu For This Useful Post:
Posts: 3,074 | Thanked: 12,960 times | Joined on Mar 2010 @ Sofia,Bulgaria
#1587
Originally Posted by mr_pingu View Post
You should try with default mediaplayer, it only starts and stops playing: The ctrl button is fully ignored as normal space does the same!
Could you be more specific to whom is that post pointed to?
__________________
Never fear. I is here.

720p video support on N900,SmartReflex on N900,Keyboard and mouse support on N900
Nothing is impossible - Stable thumb2 on n900

Community SSU developer
kernel-power developer and maintainer

 
Posts: 1,163 | Thanked: 1,873 times | Joined on Feb 2011 @ The Netherlands
#1588
Actually it is not pointed to anyone specific but you said that ctrl-space shouldn't be overriden by an application. Well, a good point, seems quite a good guideline and common sense. But, it's a non-existing real requirement as even the default player has not that behaviour and if you look at Gidzzz list, there are even more default application that dont follow that rule.

You, FMG, presented it as an Already existint rule but that's not the case, that rule doesn't exist. Though I agree it should be a rule, even if not all application allow that. It just is more logical; what if a application on desktop overrides all system shortcuts Like alt-tab, how should one switch an application?

So in short: That isnt an existing rule/guideline, but I agree it should be one
__________________
N900 loaded with:
CSSU-T (Thumb)
720p recording,
Pierogi, Lanterne, Cooktimer, Frogatto
N9 16GB loaded with:
Kernel-Plus
--
[TCPdump & libpcap | ngrep]
--
donate
 

The Following User Says Thank You to mr_pingu For This Useful Post:
Posts: 3,074 | Thanked: 12,960 times | Joined on Mar 2010 @ Sofia,Bulgaria
#1589
Originally Posted by mr_pingu View Post
...But, it's a non-existing real requirement as even the default player has not that behaviour and if you look at Gidzzz list, there are even more default application that dont follow that rule.
Well, ctrl-space switches language here in default media player.

I wonder why is that difference (ukeyboard?).

Even if it is because of ukeyboard, I think we should treat it(the shortcut) as a stock system rule, because ukeyboard is the only way I know for non-stock languages to be supported.
__________________
Never fear. I is here.

720p video support on N900,SmartReflex on N900,Keyboard and mouse support on N900
Nothing is impossible - Stable thumb2 on n900

Community SSU developer
kernel-power developer and maintainer

 
Posts: 1,163 | Thanked: 1,873 times | Joined on Feb 2011 @ The Netherlands
#1590
Also on my second N900 that shortcut doesn't work. None of these have Ukeyboard installed. So I suppose UKeyboard somehow fixes that
__________________
N900 loaded with:
CSSU-T (Thumb)
720p recording,
Pierogi, Lanterne, Cooktimer, Frogatto
N9 16GB loaded with:
Kernel-Plus
--
[TCPdump & libpcap | ngrep]
--
donate
 
Reply

Tags
libplayback, mag 4 prez, media, open source, player, portrait mode, re-write, remake, reverse


 
Forum Jump


All times are GMT. The time now is 15:49.