Re: [SailfishDevel] ApplicationWindow.activate() does nothing

2015-06-12 Thread Thomas Tanghus
It still does nothing. And anyways when being in ApplicationWindow context it 
shouldn't be necessary?

On Friday 12 June 2015 02:20:15 coderusin...@gmail.com wrote:
 you should call app.activate()

 The documentation says:
 
activate()
Brings the application in full-screen mode to the foreground.
 
 But absolutely nothing happens when I call it. Is anybody using it
 successfully?

 https://github.com/tanghus/kitchen-timer-qml/blob/master/qml/harbour-kitchen
 timer.qml#L271

-- 
Med venlig hilsen / Best regards

Thomas Tanghus

signature.asc
Description: This is a digitally signed message part.
___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org

Re: [SailfishDevel] Problem with playing sounds in first application

2015-06-12 Thread Thomas Tanghus
I did ;)

On Friday 12 June 2015 10:45:59 coderusin...@gmail.com wrote:
 You check it first. Implementation may vary in different OSes
 
 On Friday 12 June 2015 02:21:10 coderusin...@gmail.com wrote:
 
  Please use SoundEffect class for that:
 
 
 I did that originally, but on request I have added the option to select a 
 custom sound file, and I don't wanna limit users to wav files.
 
 Also the SoundEffect docs says:
 
 If low latency is not important, consider using the MediaPlayer or Audio 
 types instead, since they support a wider variety of media formats and are 
 less resource intensive.

-- 
Med venlig hilsen / Best regards

Thomas Tanghus

signature.asc
Description: This is a digitally signed message part.
___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org

Re: [SailfishDevel] ApplicationWindow.activate() does nothing

2015-06-12 Thread coderusinbox
Works for me flawlessly. If you’re using Emulator just ignore bugs you founding.






Sent from Windows Mail





From: Thomas Tanghus
Sent: ‎Friday‎, ‎June‎ ‎12‎, ‎2015 ‎3‎:‎00‎ ‎PM
To: devel@lists.sailfishos.org





It still does nothing. And anyways when being in ApplicationWindow context it 
shouldn't be necessary?

On Friday 12 June 2015 02:20:15 coderusin...@gmail.com wrote:
 you should call app.activate()

 The documentation says:
 
activate()
Brings the application in full-screen mode to the foreground.
 
 But absolutely nothing happens when I call it. Is anybody using it
 successfully?

 https://github.com/tanghus/kitchen-timer-qml/blob/master/qml/harbour-kitchen
 timer.qml#L271

-- 
Med venlig hilsen / Best regards

Thomas Tanghus___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org

Re: [SailfishDevel] ApplicationWindow.activate() does nothing

2015-06-12 Thread Thomas Tanghus
On Friday 12 June 2015 10:04:18 coderusin...@gmail.com wrote:
 Works for me flawlessly.

Weird. Do you have a link to an example?

 If you’re using Emulator just ignore bugs you founding.

I always deploy as RPM on the phone.

 Sent from Windows Mail

It's really not good for mailing lists. I spend more time formatting the reply 
than actually replying :P
 
  It still does nothing. And anyways when being in ApplicationWindow context
  it  shouldn't be necessary?
  
  On Friday 12 June 2015 02:20:15 coderusin...@gmail.com wrote:
   you should call app.activate() 

-- 
Med venlig hilsen / Best regards

Thomas Tanghus

signature.asc
Description: This is a digitally signed message part.
___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org

Re: [SailfishDevel] Problem with playing sounds in first application

2015-06-12 Thread coderusinbox
You check it first. Implementation may vary in different OSes






Sent from Windows Mail





From: Thomas Tanghus
Sent: ‎Friday‎, ‎June‎ ‎12‎, ‎2015 ‎3‎:‎10‎ ‎PM
To: devel@lists.sailfishos.org





On Friday 12 June 2015 02:21:10 coderusin...@gmail.com wrote:
 Please use SoundEffect class for that:

I did that originally, but on request I have added the option to select a 
custom sound file, and I don't wanna limit users to wav files.

Also the SoundEffect docs says:

If low latency is not important, consider using the MediaPlayer or Audio 
types instead, since they support a wider variety of media formats and are 
less resource intensive.

  On Tuesday 03 February 2015 23:13:44 Luis Manuel Ramos Da Costa wrote:
   Audio {
   
   id  : whipSound
   loops   : Audio.Infinite
   source:qrc:/sounds/resources/sounds/whipSound.flac
   
   }
  
  That can teach me to read the ml regularly ;)
  
  The loops property isn't documented in the documentation in the SDK, so I
  
  made  an ugly hack to emulate it:
 Audio {
 
  id: alarm;
  source: Qt.resolvedUrl(selectedSound);
  
  property bool forceStopped: false;
  
  function forceStop() {
  
  forceStopped = true;
  stop();
  
  }
  
  onStopped: {
  
  if(loopSound  !forceStopped) {
  
  play();
  
  } else {
  
  forceStopped = false;
  
  }
  
  }
  
  } 

-- 
Med venlig hilsen / Best regards

Thomas Tanghus___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org

Re: [SailfishDevel] ApplicationWindow.activate() does nothing

2015-06-12 Thread Thomas Tanghus
Firstly:

*Sorry for the noise*

On Friday 12 June 2015 10:46:56 coderusin...@gmail.com wrote:
 What example you want? For me just appWindow.activate() works.

Forget it. I haven't touched the code for over a year, so I had forgotten that 
there are two places where the alarm could be triggered depending on the 
precision of libiphb.

Sadly it only works when the display is on, not when waking up from deep 
sleep. I wonder if there's a way to activate the display?

Again, sorry for bothering you with my own bad memory :P

 And I have no idea what wrong with my mail. Using builtin Win8.1 mail
 client.
 
The HTML mails doesn't support proper quoting as seen in this reply. I can 
probably get around that by setting my MUA up to only show HTML for certain 
addresses. I recently had to do a fresh install on a new PC, as my cheap ALDI 
PC decided to die an untimely death; just haven't gotten around to do the final 
setup.

 
 
 
 
 
 Sent from Windows Mail
 
 
 
 
 
 From: Thomas Tanghus
 Sent: ‎Friday‎, ‎June‎ ‎12‎, ‎2015 ‎3‎:‎17‎ ‎PM
 To: devel@lists.sailfishos.org
 
 
 
 
 
 On Friday 12 June 2015 10:04:18 coderusin...@gmail.com wrote:
 
  Works for me flawlessly.
 
 
 Weird. Do you have a link to an example?
 
 
  If you’re using Emulator just ignore bugs you founding.
 
 
 I always deploy as RPM on the phone.
 
 
  Sent from Windows Mail
 
 
 It's really not good for mailing lists. I spend more time formatting the
 reply 
 than actually replying :P
  
 
   It still does nothing. And anyways when being in ApplicationWindow
   context
   it  shouldn't be necessary?
   
   On Friday 12 June 2015 02:20:15 coderusin...@gmail.com wrote:
   
you should call app.activate() 
 
 
 -- 
 Med venlig hilsen / Best regards
 
 Thomas Tanghus

-- 
Med venlig hilsen / Best regards

Thomas Tanghus

signature.asc
Description: This is a digitally signed message part.
___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org

Re: [SailfishDevel] ApplicationWindow.activate() does nothing

2015-06-12 Thread coderusinbox
check mce dbus. There is should be a method bot unblanking screen.






Sent from Windows Mail





From: Thomas Tanghus
Sent: ‎Friday‎, ‎June‎ ‎12‎, ‎2015 ‎5‎:‎32‎ ‎PM
To: devel@lists.sailfishos.org





Firstly:

*Sorry for the noise*

On Friday 12 June 2015 10:46:56 coderusin...@gmail.com wrote:
 What example you want? For me just appWindow.activate() works.

Forget it. I haven't touched the code for over a year, so I had forgotten that 
there are two places where the alarm could be triggered depending on the 
precision of libiphb.

Sadly it only works when the display is on, not when waking up from deep 
sleep. I wonder if there's a way to activate the display?

Again, sorry for bothering you with my own bad memory :P

 And I have no idea what wrong with my mail. Using builtin Win8.1 mail
 client.
 
The HTML mails doesn't support proper quoting as seen in this reply. I can 
probably get around that by setting my MUA up to only show HTML for certain 
addresses. I recently had to do a fresh install on a new PC, as my cheap ALDI 
PC decided to die an untimely death; just haven't gotten around to do the final 
setup.

 
 
 
 
 
 Sent from Windows Mail
 
 
 
 
 
 From: Thomas Tanghus
 Sent: ‎Friday‎, ‎June‎ ‎12‎, ‎2015 ‎3‎:‎17‎ ‎PM
 To: devel@lists.sailfishos.org
 
 
 
 
 
 On Friday 12 June 2015 10:04:18 coderusin...@gmail.com wrote:
 
  Works for me flawlessly.
 
 
 Weird. Do you have a link to an example?
 
 
  If you’re using Emulator just ignore bugs you founding.
 
 
 I always deploy as RPM on the phone.
 
 
  Sent from Windows Mail
 
 
 It's really not good for mailing lists. I spend more time formatting the
 reply 
 than actually replying :P
  
 
   It still does nothing. And anyways when being in ApplicationWindow
   context
   it  shouldn't be necessary?
   
   On Friday 12 June 2015 02:20:15 coderusin...@gmail.com wrote:
   
you should call app.activate() 
 
 
 -- 
 Med venlig hilsen / Best regards
 
 Thomas Tanghus

-- 
Med venlig hilsen / Best regards

Thomas Tanghus___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org

[SailfishDevel] Bluetooth headset button

2015-06-12 Thread Taixzo
I would like to trigger an action when someone presses the call button on a 
Bluetooth headset. So far the only way I’ve found to do this is to edit 
/etc/bluetooth/audio.conf and replace 

HFP=true

with

HFP=false

which switches the headset into HSP mode, at which point it will emit dbus 
signals. Is there any way of reading this button without mucking about in 
system files?

— Taixzo
___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org


Re: [SailfishDevel] Problem with playing sounds in first application

2015-06-12 Thread Thomas Tanghus
On Friday 12 June 2015 02:21:10 coderusin...@gmail.com wrote:
 Please use SoundEffect class for that:

I did that originally, but on request I have added the option to select a 
custom sound file, and I don't wanna limit users to wav files.

Also the SoundEffect docs says:

If low latency is not important, consider using the MediaPlayer or Audio 
types instead, since they support a wider variety of media formats and are 
less resource intensive.

  On Tuesday 03 February 2015 23:13:44 Luis Manuel Ramos Da Costa wrote:
   Audio {
   
   id  : whipSound
   loops   : Audio.Infinite
   source:qrc:/sounds/resources/sounds/whipSound.flac
   
   }
  
  That can teach me to read the ml regularly ;)
  
  The loops property isn't documented in the documentation in the SDK, so I
  
  made  an ugly hack to emulate it:
 Audio {
 
  id: alarm;
  source: Qt.resolvedUrl(selectedSound);
  
  property bool forceStopped: false;
  
  function forceStop() {
  
  forceStopped = true;
  stop();
  
  }
  
  onStopped: {
  
  if(loopSound  !forceStopped) {
  
  play();
  
  } else {
  
  forceStopped = false;
  
  }
  
  }
  
  } 

-- 
Med venlig hilsen / Best regards

Thomas Tanghus

signature.asc
Description: This is a digitally signed message part.
___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org

Re: [SailfishDevel] ApplicationWindow.activate() does nothing

2015-06-12 Thread Thomas Tanghus
Thanks, that will keep me occupied for a while :D I've never tried programming 
anything using dbus.

On Friday 12 June 2015 12:47:42 coderusin...@gmail.com wrote:
 check mce dbus. There is should be a method bot unblanking screen.

 Sadly it only works when the display is on, not when waking up from deep 
 sleep. I wonder if there's a way to activate the display?

-- 
Med venlig hilsen / Best regards

Thomas Tanghus

signature.asc
Description: This is a digitally signed message part.
___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org

Re: [SailfishDevel] Deploy by copying binaries issue

2015-06-12 Thread Timur Kristóf
Thank you Jussi for your answer! :)

On Fri, 2015-06-12 at 11:17 +0300, Jussi Pakkanen wrote:
 On 11.06.2015 18:12, Timur Kristóf wrote:
 
  I'm trying to deploy a Qt application to my Jolla. In the Sailfish 
  OS
  IDE, I set up the device and set the project to deploy by copying
  binaries. Then I hit the play button. After that, I'm getting this 
  error:
 
 Deploying with rsync writes its files to /opt/sdk/projname on the 
 device. Can you check that /opt/sdk has the proper write permissions?

Permissions on the /opt/sdk folder:
drwxr-xr-x 1 nemo nemo 0 2015-06-09 16:36 sdk
(obtained using 'ls -l /opt/')

I think it looks right.


If this does not work then please provide some more information:


 - which OS are you developing on and which version of SailfishOS is 
running on your device

I work on Fedora 22. SDK version is the latest (installed a few days
ago), and the OS version on the Jolla is 1.1.6.27

- if you create the sample project, does it compile and deploy correctly 
with binary copying



The sample project has a spec file, and it doesn't fail. If I delete
the spec and yaml files from the sample project, I get the same error
as I get with my own application.

Note: I believe that deploy by copying binaries should work without a
spec or yaml file.

Best regards,
Timur




___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org