Re: [SailfishDevel] /var/log is not writable. Where do I create my logs then?

2014-03-13 Thread Erik Ridderby
Hi,

How is this $XDG_CACHE_HOME created? Is that something you setup in the
yaml-file? Because even though /var/log is read only /var/log/my-app can be read
and write without problem.
I think that if the installer can create $XDG_CACHE_HOME and put the right
permissions it would work.

BR
Erik



> Den den 13 mars 2014 klockan 23:58 skrev Artem Marchenko
> :
> 
>  P.S.
>  Actually harbour FAQ tells to put at least my cache files to  $XDG_CACHE_HOME
> subdir that is /var/log/harbour-myapp . So I guess having /var/log unwritable
> is a bug then
> 
> 
> 
> 
>  On Fri, Mar 14, 2014 at 12:55 AM, Artem Marchenko   > wrote:
>> >Hi All
> > 
> >/var/log is not writable by user nemo, so what is a good location for my
> > log files then?
> > 
> >I log certain events to journalctl, but I also would want app specific
> > log file(s) for longer term analysis. /var/log looked like a good place,
> > because it is standard and cleaned once in a while, so I don't need to care
> > about deleting own old logs.
> > 
> >So is /var/log not writable by mistake?
> >Or where shall I create my log files instead?
> >And do I have to clean them myself or can I somehow register them for
> > deletion once a month or so?
> > 
> >Cheers,
> >Artem.
> > 
> >--
> >Artem Marchenko
> >http://agilesoftwaredevelopment.com
> >http://twitter.com/AgileArtem
> >  > 
> 
> 
>  --
>  Artem Marchenko
>  http://agilesoftwaredevelopment.com
>  http://twitter.com/AgileArtem
> 

___
SailfishOS.org Devel mailing list

Re: [SailfishDevel] requiring libpulse.so.0

2014-03-13 Thread Victor Mataré
Ugh sorry, didn't read far enough:
https://github.com/sailfish-sdk/sdk-harbour-rpmvalidator/blob/master/allowed_libraries.conf

Question answered. Have nice day ;-)

On Friday, 14.03.2014 01:03:13 Victor Mataré wrote:
> Hi all,
> 
> I'm writing an app that provides a GUI for the PulseAudio network
> transparency features (i.e. module-tunnel-sink, possibly add RTP support
> later), but in
> https://github.com/sailfish-sdk/sdk-harbour-rpmvalidator/blob/master/allowe
> d_requires.conf I see that I can't require libpulse.so.0. Does that mean I
> just can't put it in the RPM deps, or am I actually prohibited from even
> linking against libpulse altogether?
> 
> If so, why is that? Does it mean that no app that uses the full PulseAudio
> API can ever get into the Harbour?
> 
> Greetings and thanks for any clarification,
> Victor
> ___
> SailfishOS.org Devel mailing list

___
SailfishOS.org Devel mailing list


[SailfishDevel] requiring libpulse.so.0

2014-03-13 Thread Victor Mataré
Hi all,

I'm writing an app that provides a GUI for the PulseAudio network transparency 
features (i.e. module-tunnel-sink, possibly add RTP support later), but in 
https://github.com/sailfish-sdk/sdk-harbour-rpmvalidator/blob/master/allowed_requires.conf
 I see that I can't require 
libpulse.so.0. Does that mean I just can't put it in the RPM deps, or am I 
actually prohibited from even linking against libpulse altogether?

If so, why is that? Does it mean that no app that uses the full PulseAudio API 
can ever get into the Harbour?

Greetings and thanks for any clarification,
Victor
___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] /var/log is not writable. Where do I create my logs then?

2014-03-13 Thread Artem Marchenko
P.S.
Actually harbour FAQ tells to put at least my cache files to
$XDG_CACHE_HOME subdir that is /var/log/harbour-myapp . So I guess having
/var/log unwritable is a bug then




On Fri, Mar 14, 2014 at 12:55 AM, Artem Marchenko  wrote:

> Hi All
>
> /var/log is not writable by user nemo, so what is a good location for my
> log files then?
>
> I log certain events to journalctl, but I also would want app specific log
> file(s) for longer term analysis. /var/log looked like a good place,
> because it is standard and cleaned once in a while, so I don't need to care
> about deleting own old logs.
>
> So is /var/log not writable by mistake?
> Or where shall I create my log files instead?
> And do I have to clean them myself or can I somehow register them for
> deletion once a month or so?
>
> Cheers,
> Artem.
>
> --
> Artem Marchenko
> http://agilesoftwaredevelopment.com
> http://twitter.com/AgileArtem
>



-- 
Artem Marchenko
http://agilesoftwaredevelopment.com
http://twitter.com/AgileArtem
___
SailfishOS.org Devel mailing list

[SailfishDevel] /var/log is not writable. Where do I create my logs then?

2014-03-13 Thread Artem Marchenko
Hi All

/var/log is not writable by user nemo, so what is a good location for my
log files then?

I log certain events to journalctl, but I also would want app specific log
file(s) for longer term analysis. /var/log looked like a good place,
because it is standard and cleaned once in a while, so I don't need to care
about deleting own old logs.

So is /var/log not writable by mistake?
Or where shall I create my log files instead?
And do I have to clean them myself or can I somehow register them for
deletion once a month or so?

Cheers,
Artem.

-- 
Artem Marchenko
http://agilesoftwaredevelopment.com
http://twitter.com/AgileArtem
___
SailfishOS.org Devel mailing list

Re: [SailfishDevel] Scheduling code for execution at x seconds since epoch

2014-03-13 Thread Thomas Tanghus
On Thursday 13 March 2014 20:45 Arvid Fahlström Myrman wrote:
> Hi,
> 
> Does anyone know if it is possible to schedule code for execution at x
> seconds since epoch, with guaranteed execution even when in sleep mode?
> Currently I am using libiphb (through tanghus's Insomniac QML plugin), but
> libiphb only seems to support waiting for a specified number of seconds,
> meaning that if iphb_wait is called when the time is 1394730709733
> milliseconds since epoch and is instructed to wait for 5 seconds, the code
> will be executed sometime around 1394730714733 milliseconds since epoch. I
> want to be able to schedule code to be run at e.g. 1394730715000 (±50 ms or
> some such small margin), i.e. whole seconds since epoch, no matter the
> current time. That way for example WallClock from org.nemomobile.time would
> be in sync with my timer, and I could accurately reflect the remaining time
> in the GUI by updating on onTimeChanged without having to update the GUI
> unnecessarily often, in addition to other simplifications I would be able
> to make.
> 
> Using the standard QtQuick Timer type would work, since it supports
> specifying the interval in milliseconds, so you could do something like
> timer.interval = 1394730715000 - Date.now(), however Timer doesn't work
> when in sleep mode.

As libiphb is not guaranteed to be accurate, I set the Insomniac to wake up a 
few seconds before I need the alarm to trigger, then start a Timer. You could 
do the same: Wake up, check time and start a normal Timer.
Or am I missing something?

-- 
Med venlig hilsen / Best Regards

Thomas Tanghus
___
SailfishOS.org Devel mailing list

[SailfishDevel] Scheduling code for execution at x seconds since epoch

2014-03-13 Thread Arvid Fahlström Myrman
Hi,

Does anyone know if it is possible to schedule code for execution at x seconds 
since epoch, with guaranteed execution even when in sleep mode? Currently I am 
using libiphb (through tanghus's Insomniac QML plugin), but libiphb only seems 
to support waiting for a specified number of seconds, meaning that if iphb_wait 
is called when the time is 1394730709733 milliseconds since epoch and is 
instructed to wait for 5 seconds, the code will be executed sometime around 
1394730714733 milliseconds since epoch. I want to be able to schedule code to 
be run at e.g. 1394730715000 (±50 ms or some such small margin), i.e. whole 
seconds since epoch, no matter the current time. That way for example 
WallClock from org.nemomobile.time would be in sync with my timer, and I could 
accurately reflect the remaining time in the GUI by updating on onTimeChanged 
without having to update the GUI unnecessarily often, in addition to other 
simplifications I would be able to make.

Using the standard QtQuick Timer type would work, since it supports specifying 
the interval in milliseconds, so you could do something like timer.interval = 
1394730715000 - Date.now(), however Timer doesn't work when in sleep mode.

Regards,
Arvid

___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] Folder permissions

2014-03-13 Thread Jonni Rainisto
Did you remember to add %ghost in .spec files for rpm to claim ownership for 
files that you created? Afaik with that remove will also remove the files when 
package is uninstalled.


From: devel-boun...@lists.sailfishos.org [devel-boun...@lists.sailfishos.org] 
on behalf of Iosif Hamlatzis [i.hamlat...@gmail.com]
Sent: Thursday, March 13, 2014 8:22 PM
To: Sailfish OS Developers
Subject: Re: [SailfishDevel] Folder permissions

Thank you very much, I've just tested my game using the XDG basedir and it 
worked so I can continue my port of the game by modifying the rest of the code.

Just one question, will the folders under .config/.cache/.local be removed if I 
uninstall the game? I've noticed that using the XDG basedir to read the 
environment variables I get something like: // but no 
folder is created, so I programmatically created the  folder and 
placed my config (read/write) files.

Since the GUI from the emulator doesn't uninstall the actual game I ssh into 
the emulator and called "zypper remove " and it was uninstalled but 
the folders with all their contents I had created weren't erased. If this 
happens in the actual device then at some point there isn't going to be any 
space available on the device.
___
SailfishOS.org Devel mailing list

Re: [SailfishDevel] Folder permissions

2014-03-13 Thread Iosif Hamlatzis
Thank you very much, I've just tested my game using the XDG basedir and it
worked so I can continue my port of the game by modifying the rest of the
code.

Just one question, will the folders under .config/.cache/.local be removed
if I uninstall the game? I've noticed that using the XDG basedir to read
the environment variables I get something like: // but
no folder is created, so I programmatically created the  folder
and placed my config (read/write) files.

Since the GUI from the emulator doesn't uninstall the actual game I ssh
into the emulator and called "zypper remove " and it was
uninstalled but the folders with all their contents I had created weren't
erased. If this happens in the actual device then at some point there isn't
going to be any space available on the device.
___
SailfishOS.org Devel mailing list

Re: [SailfishDevel] SilicaListView.scrollToBottom() after appending to a listmodel

2014-03-13 Thread chriswilty
Well, the response was underwhelming...

In any case, I sort of solved my issue by using the currentItem/Index way, 
although when adding the first new item, I do get a strange delay before the 
animation kicks in. When adding items after that, it works fine.

Chris

 On Fri, 28 Feb 2014 11:12:02 +0200 chriswilty  
wrote  


Excuse the noobie question, I must be doing something obviously wrong... So 
hopefully the old hands can help.

I have a SilicaListView backed by a ListModel, and a pulley-menu command to add 
an item to the end of the model via ListModel.append(). After adding, I want to 
scroll the SilicaListView to the bottom to make the newly added item visible. 
So I thought using scrollToBottom() would do just that:

function addNewItem() {
  myListModel.append({ "role1": 0, "role2": 0 });
  mySilicaListView.scrollToBottom();
}

However, the view scrolls to the item above the one I just added, as if the 
view has not yet updated. Should I be binding the scrollToBottom() call to 
ListView.onAdd() instead? And if so, should I do that in my function so that it 
is only bound when first needed, for efficiency reasons? Or am I doing this all 
wrong, should I be using currentItem and highlightFollowsCurrentItem instead?

Many thanks,
Chris

___ 
SailfishOS.org Devel mailing list


___
SailfishOS.org Devel mailing list