maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   SailfishOS (https://talk.maemo.org/forumdisplay.php?f=52)
-   -   [Announce][WIP] Lockscreen widget manager (https://talk.maemo.org/showthread.php?t=96259)

anig 2015-12-16 00:27

[Announce][WIP] Lockscreen widget manager
 
This is a patch and application that allows the lockscreen to be configured using widget components. The patch modifies the lockscreen files to use the widget items and also removes the clock.

The application is used to manage the lockscreen portrait and landscape layouts. Different widgets can be used in each layout. The jolla-clock and other time and dates widgets are included as in the installation.

Usage instructions:
1) Apply the widget manager patch through patch manager, this will:
a) Remove the clock from the lockscreen and enable the widget manager code;
b) Activate homescreen rotation;
c) Activate statusbar on sneakpeak screen.

2) Launch the widget manager application, select the widgets to be displayed and swipe left.

3) Arrange the widgets, the arrangement is based on anchors and margins. Widgets with no fixed height/width will be labeled as variable height/width. So, if you place a widget below one that is variable height it will be anchored to the bottom and will move as the variable height widget grows. Click the save button when done.

4) Turn the phone to landscape orientation and arrange the landscape widgets, swipe right if you want to choose different widgets.

5) Once the layouts have been saved swipe back to the widget selection page and use the pull down menu to apply the layout. As this point an error check is performed and if the qml of all selected widgets is valid the homescreen will restart; otherwise an error page will be shown and the layout reverts back to the last good configuration.

For developers:
Instructions for creating a new widget for widget manager.

1) Write the qml for the widget. You can place the qml anywhere. So if it uses components from your application you can keep it with the application code.

2) Create a json file with the following attributes defined:
name: name of the widget
description: short description of the widget
path: full path to the widget qml directory, do not include the last backslash
main: The main qml object for the widget, do not include the .qml
height: The height of the widget as a fraction of the screen height. If the widget has a variable height then set this attribute as "variable"
width: The width of the widget as a fraction of the screen width. If the widget has a variable width then set this attribute as "variable"

infos;maintainer: Within the attribute infos, the maintainer attribute specifies the name of the maintainer.

3) The json file needs to be placed in the directory /usr/share/widgetManager/widgets

Downloads:
Application on open repos
https://openrepos.net/content/anig/l...widget-manager
Analog clock widget on open repos
https://openrepos.net/content/anig/analog-clock-widget
Calendar widget on open repos
https://openrepos.net/content/anig/calendar-widget

Source:
Created using qml and python.
https://github.com/anigaj/widget-manager

Credits (for all of my patches):
Thanks to Ancelad for letting me use his analog clock qml for the widget.
I've used coderus patches as examples to learn how to create them. I looked at EmaNymton's sailgoal application to understand python. So thanks to both of them.
Thanks to Schturman for creating the how to package rpms on the phone.

Known issues:
Likely to conflict with any patch that modifies the lockscreen or the clock.
The jolla clock animations don't work as expected. Still trying to figure out how to make it work.
If there is an error you need to restart the application as qml seems to cache the page.
All help appreciated.

coderus 2015-12-16 00:34

Re: [Announce][WIP] Lockscreen widget manager
 
God, please, why...

anig 2015-12-16 00:47

Re: [Announce][WIP] Lockscreen widget manager
 
Quote:

Originally Posted by coderus (Post 1491622)
God, please, why...

Mainly because I wanted to use analog clock with my calendar events patch. No one is obliged to use this.

tortoisedoc 2015-12-16 07:14

Re: [Announce][WIP] Lockscreen widget manager
 
Quote:

Originally Posted by coderus (Post 1491622)
God, please, why...

Do not ask why, ask Why not ;)

coderus 2015-12-16 10:30

Re: [Announce][WIP] Lockscreen widget manager
 
I'm just worried about implementation.
Quote:

Originally Posted by anig
I've used coderus patches as examples to learn how to create them. I looked at EmaNymton's sailgoal application to understand python.


anig 2015-12-16 12:48

Re: [Announce][WIP] Lockscreen widget manager
 
Quote:

Originally Posted by coderus (Post 1491662)
I'm just worried about implementation.

I looked at your patches to understand how to create settings for my other patches but never thanked you for it. Nothing from them has been used here. So no need to worry:)

coderus 2015-12-16 12:52

Re: [Announce][WIP] Lockscreen widget manager
 
You understand me wrong. I'm worried about your skills.

velox 2015-12-16 13:17

Re: [Announce][WIP] Lockscreen widget manager
 
Quote:

Originally Posted by anig (Post 1491684)
I looked at your patches to understand how to create settings for my other patches but never thanked you for it. Nothing from them has been used here. So no need to worry:)

I think he means it seems a bit awkward to do a detour via python at all to change some qml.
Correct me if I'm wrong, didn't have a look at that code at all.

TylerTemp 2015-12-18 16:24

Re: [Announce][WIP] Lockscreen widget manager
 
Hi, a little problem I meet here: I can't open the widget manager application...

The patch is applied (No date/time on lockscreen), but the widget manager can not open. (Circling for a while and exit)

So I tried the following:
1. unapply all other patches -> not work
2. uninstall all other patches -> not work
3. reboot -> not work
4. unapply, re-apply -> not work

Sailfish: 2.0.0.10

Is there any place I can find a logging record? Did I miss anything?

anig 2016-01-04 22:18

Re: [Announce][WIP] Lockscreen widget manager
 
Quote:

Originally Posted by TylerTemp (Post 1492019)
Hi, a little problem I meet here: I can't open the widget manager application...

The patch is applied (No date/time on lockscreen), but the widget manager can not open. (Circling for a while and exit)

So I tried the following:
1. unapply all other patches -> not work
2. uninstall all other patches -> not work
3. reboot -> not work
4. unapply, re-apply -> not work

Sailfish: 2.0.0.10

Is there any place I can find a logging record? Did I miss anything?

Sorry for the late reply, I was away for a while. Can you try launching from terminal using the command:
sailfish-qml widgetManager


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

vBulletin® Version 3.8.8