maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   SailfishOS (https://talk.maemo.org/forumdisplay.php?f=52)
-   -   Adding More Shortcuts (Actions) to Lockscreen? (So Not Only Apps) (https://talk.maemo.org/showthread.php?t=93328)

HtheB 2014-06-12 12:38

Adding More Shortcuts (Actions) to Lockscreen? (So Not Only Apps)
 
With the introduction of the 1.0.7.16 update, we're able to add shortcuts to the lockscreen.
But we're only able to add shortcuts to apps on the lockscreen.

I want to add an 'action' to the lockscreen.

The action is Called "Connect to Internet".
This menu already exist: Settings > WLAN > Pulley menu > Connect to Internet
(As you can see, it's a pain the *ss to go to that menu everytime...)

This would bring up a screen like we're used to on Fremantle and Harmattan:

https://together.jolla.com/upfiles/1388695991866559.png

How can we achieve this?

EDIT:
You can download this at Openrepos now.
TMO Thread:
http://talk.maemo.org/showthread.php?p=1429367

Jeffrey04 2014-06-12 15:52

Re: Adding More Shortcuts (Actions) to Lockscreen? (So Not Only Apps)
 
if this screen can be called using a command i suppose this will be easier (:

Did a quick hack out or boredom for this. First as this is a hack, you would need developer access to the device.

Then run devel-su to continue as root. Then use vi/whatever editor you fancy to create a file named settings-wifi-connect.desktop in /usr/share/applications with the following config

Code:

[Desktop Entry]
Type=Application
Name=Settings
X-MeeGo-Logical-Id=settings-ap-name
X-MeeGo-Translation-Catalog=settings
Icon=icon-launcher-settings
Exec=invoker --single-instance --type=silica-qt5 /usr/bin/jolla-settings
Comment=Jolla Settings
X-Desktop-File-Install-Version=0.20

Then you can enable this shortcut in the settings app (:

EDIT: actual hack

EDIT2: cross posted to my blog

pycage 2014-06-12 17:57

Re: Adding More Shortcuts (Actions) to Lockscreen? (So Not Only Apps)
 
The connection dialog is simply appearing when trying to make a network connection (at least with Qt) while there is no network connectivity. You could make a simple window-less Qt program that tries to load from some URL, and the dialog should popup.
Then add a .desktop file for it and you should be able to put it into the shortcuts menu.

HtheB 2014-06-12 19:08

Re: Adding More Shortcuts (Actions) to Lockscreen? (So Not Only Apps)
 
1 Attachment(s)
Quote:

Originally Posted by Jeffrey04 (Post 1429331)
if this screen can be called using a command i suppose this will be easier (:

Did a quick hack out or boredom for this. First as this is a hack, you would need developer access to the device.

Then run devel-su to continue as root. Then use vi/whatever editor you fancy to create a file named settings-wifi-connect.desktop in /usr/share/applications with the following config

Code:

[Desktop Entry]
Type=Application
Name=Settings
X-MeeGo-Logical-Id=settings-ap-name
X-MeeGo-Translation-Catalog=settings
Icon=icon-launcher-settings
Exec=invoker --single-instance --type=silica-qt5 /usr/bin/jolla-settings
Comment=Jolla Settings
X-Desktop-File-Install-Version=0.20

Then you can enable this shortcut in the settings app (:

EDIT: actual hack

EDIT2: cross posted to my blog

I havent tried out your hack yet, but I talked to the guys at the IRC, and we figured it out that this one should work as well:
Code:

    [Desktop Entry]
    Type=Application
    X-Nemo-Application-Type=no-invoker
    Name=Connect to internet
    Icon=internetconnection
    Exec=dbus-send --type=method_call --print-reply --dest=com.jolla.lipstick.ConnectionSelector / com.jolla.lipstick.ConnectionSelectorIf.openConnection string:wlan

I've created an icon for it :p

HtheB 2014-06-12 19:54

Re: Adding More Shortcuts (Actions) to Lockscreen? (So Not Only Apps)
 
I've uploaded it to Openrepos guys.
Have fun!
https://openrepos.net/content/htheb/connect-internet

TMO Thread:
http://talk.maemo.org/showthread.php?p=1429367


All times are GMT. The time now is 08:20.

vBulletin® Version 3.8.8