maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   [WIP] alternative MenuLauncher/TaskSwitcher (telescope) for Fremantle (https://talk.maemo.org/showthread.php?t=87035)

AapoRantalainen 2012-09-25 19:00

[WIP] alternative MenuLauncher/TaskSwitcher (telescope) for Fremantle
 
Telescope was primarily made for Diablo [http://talk.maemo.org/showthread.php?t=58691] to mimic Fremantle's TaskSwitcher and MenuLauncher (which are part of hildon-desktop).

This is attempt to port it to the Fremantle. Source code for (not yet merged) Fremantle-branch: https://bitbucket.org/aaporantalainen/telescope

Install from extras-devel: telescope (not fully optified, uses 131K of rootfs).
Start manually by typing telescope .Root access not needed.

Video: http://youtu.be/WcmFiwmA3JM

Status: it works. Some crashing when closing xterm (unstable). Cosmetic issues. Needs modifications for hildon-desktop (until it is useful).

Code:

Features (what is working / what is expected behaviour currently):
*If no application running, CTRL+backspace => Launcher
*If Switcher is running, CTRL+backspace => Launcher
*Launcher: starting application
*Launcher: show notification when application starts
*Launcher: scrolling list with finger
*Launcher: scrolling list with keyboard (arrows)
*Launcher: build-in categories (currently only 'main'). Long press title to change icon.
*Launcher: show another catory with keyboard (arrows)
*Launcher: landscape/portrait
*Launcher: cancel (press empty area)
*Launcher: cancel (press unused key from keyboard)

*If one or more application running,  CTRL+backspace => Switcher
*Switcher: switching to selected application
*Switcher: cancel (press empty area)
*Switcher: killing application
*Switcher: landscape/portrait.
*Long press: CTRL+backspace => show desktop


Issues:
*CTRL+backspace also starts TaskSwitcher from hildon-desktop (below Telescope's Switcher)
*Launcher: Categories panel doesn't support portrait
*Switcher: background for portrait missing
*Launcher: localization of shortcut names messed
*Switcher: killing one xterm terminates all xterms (might happens also with another multi instance applications)
*Launcher: can't use Fn+arrow (because Fn causes cancel immediately)
*Launcher: some icons scaled wrongly
*Button on hildon panel starts switcher/launcher from hildon-desktop

Todo:
*autostart during boot

----
Is there any point?
-There were reports that hildon-desktop is hogging CPU. Maybe we can get rid of whole (or partly) hildon-desktop.
-Hildon-desktop is only piece which is using closed source graphics driver.

reinob 2012-09-26 08:34

Re: [WIP] alternative MenuLauncher/TaskSwitcher (telescope) for Fremantle
 
Quote:

Originally Posted by AapoRantalainen (Post 1272163)
Is there any point?
-There were reports that hildon-desktop is hogging CPU. Maybe we can get rid of whole (or partly) hildon-desktop.
-Hildon-desktop is only piece which is using closed source graphics driver.

I personally would be very happy if we had a hildon-desktop alternative (desktop, launcher, task manager) with full keyboard control (please fix that fn-key issue, I also have only 2 arrow keys :)

I just like using the keyboard, and find it (still) cumbersome to have to press with my finger somewhere, where a key would suffice. (I guess I'm old fashioned :)

visN900 2012-09-26 13:27

Re: [WIP] alternative MenuLauncher/TaskSwitcher (telescope) for Fremantle
 
i would like to c android ICS way of closing an app(swiping left/right to close an app)in the same way like moving a window up/down to close it.. that would best suit our N900's instead of those droids.. ;)

reinob 2012-09-27 09:00

Re: [WIP] alternative MenuLauncher/TaskSwitcher (telescope) for Fremantle
 
Quote:

Originally Posted by visN900 (Post 1272463)
i would like to c android ICS way of closing an app(swiping left/right to close an app)in the same way like moving a window up/down to close it.. that would best suit our N900's instead of those droids.. ;)

Again, I may be old fashioned, but I find tapping on an "X" to kill an application infinitely more intuitive than swiping anything in any direction.

riv64 2012-09-29 14:35

Re: [WIP] alternative MenuLauncher/TaskSwitcher (telescope) for Fremantle
 
I got this on debian wheezy
Code:

Makefile:84: depend: Nie ma takiego pliku ani katalogu
g++ -M -MM -MG -MP -Wall -Werror -O2 -DDESKTOP -DDBUS `pkg-config --cflags x11 xcomposite xdamage xrender imlib2 xft dbus-1 glib-2.0` -pthread TeleWindow.cpp Main.cpp XTools.cpp Thumbnail.cpp Settings.cpp Mapping.cpp Mappings.cpp Resources.cpp DBus.cpp XEventLoop.cpp Image.cpp >depend
g++ -c -Wall -Werror -O2 -DDESKTOP -DDBUS `pkg-config --cflags x11 xcomposite xdamage xrender imlib2 xft dbus-1 glib-2.0` -pthread TeleWindow.cpp -o TeleWindow.o
g++ -c -Wall -Werror -O2 -DDESKTOP -DDBUS `pkg-config --cflags x11 xcomposite xdamage xrender imlib2 xft dbus-1 glib-2.0` -pthread Main.cpp -o Main.o
g++ -c -Wall -Werror -O2 -DDESKTOP -DDBUS `pkg-config --cflags x11 xcomposite xdamage xrender imlib2 xft dbus-1 glib-2.0` -pthread XTools.cpp -o XTools.o
g++ -c -Wall -Werror -O2 -DDESKTOP -DDBUS `pkg-config --cflags x11 xcomposite xdamage xrender imlib2 xft dbus-1 glib-2.0` -pthread Thumbnail.cpp -o Thumbnail.o
Thumbnail.cpp: In member function ‘void Thumbnail::redraw()’:
Thumbnail.cpp:500:5: error: narrowing conversion of ‘((((Thumbnail*)this)->Thumbnail::_clientOffsetX - borderWidth) + Settings::instance()->Settings::textLeftMargin())’ from ‘int’ to ‘short int’ inside { } is ill-formed in C++11 [-Werror=narrowing]
Thumbnail.cpp:500:5: error: narrowing conversion of ‘(((Thumbnail*)this)->Thumbnail::_clientOffsetY - headerHeight)’ from ‘int’ to ‘short int’ inside { } is ill-formed in C++11 [-Werror=narrowing]
Thumbnail.cpp:500:5: error: narrowing conversion of ‘(((((Thumbnail*)this)->Thumbnail::_clientScaledWidth + (borderWidth * 2)) - Settings::instance()->Settings::textLeftMargin()) - Settings::instance()->Settings::textRightMargin())’ from ‘int’ to ‘short unsigned int’ inside { } is ill-formed in C++11 [-Werror=narrowing]
Thumbnail.cpp:500:5: error: narrowing conversion of ‘headerHeight’ from ‘int’ to ‘short unsigned int’ inside { } is ill-formed in C++11 [-Werror=narrowing]
cc1plus: all warnings being treated as errors
make: *** [Thumbnail.o] Błąd 1


AapoRantalainen 2012-10-01 09:23

Re: [WIP] alternative MenuLauncher/TaskSwitcher (telescope) for Fremantle
 
Quote:

Originally Posted by riv64 (Post 1273917)
I got this on debian wheezy
Code:

is ill-formed in C++11 [-Werror=narrowing]
Thumbnail.cpp:500:5: error: narrowing conversion of
...
cc1plus: all warnings being treated as errors


Code is not c++11. My compilers do not know -Wnarrowing. I think dropping -Werror is enough. Now I added (and pushed) "-std=gnu++98" to the Makefile_desktop. Is there some side effects for that?

EDIT: Would this be better? -std=c++98

panjgoori 2012-10-01 09:27

Re: [WIP] alternative MenuLauncher/TaskSwitcher (telescope) for Fremantle
 
thanks. can anyone upload this video on metacafe as youtube is blocked in my country ? and some screenshots please.

riv64 2012-10-01 17:45

Re: [WIP] alternative MenuLauncher/TaskSwitcher (telescope) for Fremantle
 
1 Attachment(s)
Quote:

Originally Posted by AapoRantalainen (Post 1274696)
Code is not c++11. My compilers do not know -Wnarrowing. I think dropping -Werror is enough. Now I added (and pushed) "-std=gnu++98" to the Makefile_desktop. Is there some side effects for that?

EDIT: Would this be better? -std=c++98

After adding this:
Code:

CFLAGS += -Wall -std=gnu++98 -ggdb -O0 $(DEFINES) `pkg-config --cflags $(DEPS)` -pthread
to the Makefile it still shows errors but the telescope works:D
With enabled launcher I got this:
Code:

Makefile:85: depend: Nie ma takiego pliku ani katalogu
g++ -M -MM -MG -MP -Wall -std=gnu++98 -ggdb -O0 -DDESKTOP -DDBUS -DLAUNCHER `pkg-config --cflags x11 xcomposite xdamage xrender imlib2 xft dbus-1 glib-2.0` -pthread TeleWindow.cpp Main.cpp XTools.cpp Thumbnail.cpp Settings.cpp Mapping.cpp Mappings.cpp Resources.cpp DBus.cpp XEventLoop.cpp Image.cpp MenuReader.cpp LauncherWindow.cpp SectionList.cpp Section.cpp Application.cpp >depend
g++ -c -Wall -std=gnu++98 -ggdb -O0 -DDESKTOP -DDBUS -DLAUNCHER `pkg-config --cflags x11 xcomposite xdamage xrender imlib2 xft dbus-1 glib-2.0` -pthread TeleWindow.cpp -o TeleWindow.o
g++ -c -Wall -std=gnu++98 -ggdb -O0 -DDESKTOP -DDBUS -DLAUNCHER `pkg-config --cflags x11 xcomposite xdamage xrender imlib2 xft dbus-1 glib-2.0` -pthread Main.cpp -o Main.o
g++ -c -Wall -std=gnu++98 -ggdb -O0 -DDESKTOP -DDBUS -DLAUNCHER `pkg-config --cflags x11 xcomposite xdamage xrender imlib2 xft dbus-1 glib-2.0` -pthread XTools.cpp -o XTools.o
g++ -c -Wall -std=gnu++98 -ggdb -O0 -DDESKTOP -DDBUS -DLAUNCHER `pkg-config --cflags x11 xcomposite xdamage xrender imlib2 xft dbus-1 glib-2.0` -pthread Thumbnail.cpp -o Thumbnail.o
Thumbnail.cpp: In member function ‘void Thumbnail::redraw()’:
Thumbnail.cpp:500:5: warning: narrowing conversion of ‘((((Thumbnail*)this)->Thumbnail::_clientOffsetX - borderWidth) + Settings::instance()->Settings::textLeftMargin())’ from ‘int’ to ‘short int’ inside { } is ill-formed in C++11 [-Wnarrowing]
Thumbnail.cpp:500:5: warning: narrowing conversion of ‘(((Thumbnail*)this)->Thumbnail::_clientOffsetY - headerHeight)’ from ‘int’ to ‘short int’ inside { } is ill-formed in C++11 [-Wnarrowing]
Thumbnail.cpp:500:5: warning: narrowing conversion of ‘(((((Thumbnail*)this)->Thumbnail::_clientScaledWidth + (borderWidth * 2)) - Settings::instance()->Settings::textLeftMargin()) - Settings::instance()->Settings::textRightMargin())’ from ‘int’ to ‘short unsigned int’ inside { } is ill-formed in C++11 [-Wnarrowing]
Thumbnail.cpp:500:5: warning: narrowing conversion of ‘headerHeight’ from ‘int’ to ‘short unsigned int’ inside { } is ill-formed in C++11 [-Wnarrowing]
g++ -c -Wall -std=gnu++98 -ggdb -O0 -DDESKTOP -DDBUS -DLAUNCHER `pkg-config --cflags x11 xcomposite xdamage xrender imlib2 xft dbus-1 glib-2.0` -pthread Settings.cpp -o Settings.o
g++ -c -Wall -std=gnu++98 -ggdb -O0 -DDESKTOP -DDBUS -DLAUNCHER `pkg-config --cflags x11 xcomposite xdamage xrender imlib2 xft dbus-1 glib-2.0` -pthread Mapping.cpp -o Mapping.o
g++ -c -Wall -std=gnu++98 -ggdb -O0 -DDESKTOP -DDBUS -DLAUNCHER `pkg-config --cflags x11 xcomposite xdamage xrender imlib2 xft dbus-1 glib-2.0` -pthread Mappings.cpp -o Mappings.o
g++ -c -Wall -std=gnu++98 -ggdb -O0 -DDESKTOP -DDBUS -DLAUNCHER `pkg-config --cflags x11 xcomposite xdamage xrender imlib2 xft dbus-1 glib-2.0` -pthread Resources.cpp -o Resources.o
g++ -c -Wall -std=gnu++98 -ggdb -O0 -DDESKTOP -DDBUS -DLAUNCHER `pkg-config --cflags x11 xcomposite xdamage xrender imlib2 xft dbus-1 glib-2.0` -pthread DBus.cpp -o DBus.o
g++ -c -Wall -std=gnu++98 -ggdb -O0 -DDESKTOP -DDBUS -DLAUNCHER `pkg-config --cflags x11 xcomposite xdamage xrender imlib2 xft dbus-1 glib-2.0` -pthread XEventLoop.cpp -o XEventLoop.o
g++ -c -Wall -std=gnu++98 -ggdb -O0 -DDESKTOP -DDBUS -DLAUNCHER `pkg-config --cflags x11 xcomposite xdamage xrender imlib2 xft dbus-1 glib-2.0` -pthread Image.cpp -o Image.o
g++ -c -Wall -std=gnu++98 -ggdb -O0 -DDESKTOP -DDBUS -DLAUNCHER `pkg-config --cflags x11 xcomposite xdamage xrender imlib2 xft dbus-1 glib-2.0` -pthread MenuReader.cpp -o MenuReader.o
MenuReader.cpp: In destructor ‘MenuReader::~MenuReader()’:
MenuReader.cpp:158:24: error: ‘close’ was not declared in this scope
MenuReader.cpp: In member function ‘bool MenuReader::hasChange()’:
MenuReader.cpp:396:45: error: ‘read’ was not declared in this scope
make: *** [MenuReader.o] Błąd 1

Thanks man for great job

AapoRantalainen 2012-10-01 18:20

Re: [WIP] alternative MenuLauncher/TaskSwitcher (telescope) for Fremantle
 
Quote:

Originally Posted by riv64 (Post 1274936)
‘MenuReader::~MenuReader()’:
MenuReader.cpp:158:24: error: ‘close’ was not declared in this scope
MenuReader.cpp: In member function ‘bool MenuReader::hasChange()’:
MenuReader.cpp:396:45: error: ‘read’ was not declared in this scope
make: *** [MenuReader.o] Błąd 1[/CODE]

Add
Code:

#include <unistd.h>
to the MenuReader.cpp (and report next issue. I didn't yet check compiling with gcc-4.7)

riv64 2012-10-02 20:49

Re: [WIP] alternative MenuLauncher/TaskSwitcher (telescope) for Fremantle
 
Is such a thing:
Code:

Makefile:85: depend: Nie ma takiego pliku ani katalogu
g++ -M -MM -MG -MP -Wall -std=gnu++98 -ggdb -O0 -DDESKTOP -DDBUS -DLAUNCHER `pkg-config --cflags x11 xcomposite xdamage xrender imlib2 xft dbus-1 glib-2.0` -pthread TeleWindow.cpp Main.cpp XTools.cpp Thumbnail.cpp Settings.cpp Mapping.cpp Mappings.cpp Resources.cpp DBus.cpp XEventLoop.cpp Image.cpp MenuReader.cpp LauncherWindow.cpp SectionList.cpp Section.cpp Application.cpp >depend
g++ -c -Wall -std=gnu++98 -ggdb -O0 -DDESKTOP -DDBUS -DLAUNCHER `pkg-config --cflags x11 xcomposite xdamage xrender imlib2 xft dbus-1 glib-2.0` -pthread TeleWindow.cpp -o TeleWindow.o
g++ -c -Wall -std=gnu++98 -ggdb -O0 -DDESKTOP -DDBUS -DLAUNCHER `pkg-config --cflags x11 xcomposite xdamage xrender imlib2 xft dbus-1 glib-2.0` -pthread Main.cpp -o Main.o
g++ -c -Wall -std=gnu++98 -ggdb -O0 -DDESKTOP -DDBUS -DLAUNCHER `pkg-config --cflags x11 xcomposite xdamage xrender imlib2 xft dbus-1 glib-2.0` -pthread XTools.cpp -o XTools.o
g++ -c -Wall -std=gnu++98 -ggdb -O0 -DDESKTOP -DDBUS -DLAUNCHER `pkg-config --cflags x11 xcomposite xdamage xrender imlib2 xft dbus-1 glib-2.0` -pthread Thumbnail.cpp -o Thumbnail.o
Thumbnail.cpp: In member function ‘void Thumbnail::redraw()’:
Thumbnail.cpp:500:5: warning: narrowing conversion of ‘((((Thumbnail*)this)->Thumbnail::_clientOffsetX - borderWidth) + Settings::instance()->Settings::textLeftMargin())’ from ‘int’ to ‘short int’ inside { } is ill-formed in C++11 [-Wnarrowing]
Thumbnail.cpp:500:5: warning: narrowing conversion of ‘(((Thumbnail*)this)->Thumbnail::_clientOffsetY - headerHeight)’ from ‘int’ to ‘short int’ inside { } is ill-formed in C++11 [-Wnarrowing]
Thumbnail.cpp:500:5: warning: narrowing conversion of ‘(((((Thumbnail*)this)->Thumbnail::_clientScaledWidth + (borderWidth * 2)) - Settings::instance()->Settings::textLeftMargin()) - Settings::instance()->Settings::textRightMargin())’ from ‘int’ to ‘short unsigned int’ inside { } is ill-formed in C++11 [-Wnarrowing]
Thumbnail.cpp:500:5: warning: narrowing conversion of ‘headerHeight’ from ‘int’ to ‘short unsigned int’ inside { } is ill-formed in C++11 [-Wnarrowing]
g++ -c -Wall -std=gnu++98 -ggdb -O0 -DDESKTOP -DDBUS -DLAUNCHER `pkg-config --cflags x11 xcomposite xdamage xrender imlib2 xft dbus-1 glib-2.0` -pthread Settings.cpp -o Settings.o
g++ -c -Wall -std=gnu++98 -ggdb -O0 -DDESKTOP -DDBUS -DLAUNCHER `pkg-config --cflags x11 xcomposite xdamage xrender imlib2 xft dbus-1 glib-2.0` -pthread Mapping.cpp -o Mapping.o
g++ -c -Wall -std=gnu++98 -ggdb -O0 -DDESKTOP -DDBUS -DLAUNCHER `pkg-config --cflags x11 xcomposite xdamage xrender imlib2 xft dbus-1 glib-2.0` -pthread Mappings.cpp -o Mappings.o
g++ -c -Wall -std=gnu++98 -ggdb -O0 -DDESKTOP -DDBUS -DLAUNCHER `pkg-config --cflags x11 xcomposite xdamage xrender imlib2 xft dbus-1 glib-2.0` -pthread Resources.cpp -o Resources.o
g++ -c -Wall -std=gnu++98 -ggdb -O0 -DDESKTOP -DDBUS -DLAUNCHER `pkg-config --cflags x11 xcomposite xdamage xrender imlib2 xft dbus-1 glib-2.0` -pthread DBus.cpp -o DBus.o
g++ -c -Wall -std=gnu++98 -ggdb -O0 -DDESKTOP -DDBUS -DLAUNCHER `pkg-config --cflags x11 xcomposite xdamage xrender imlib2 xft dbus-1 glib-2.0` -pthread XEventLoop.cpp -o XEventLoop.o
g++ -c -Wall -std=gnu++98 -ggdb -O0 -DDESKTOP -DDBUS -DLAUNCHER `pkg-config --cflags x11 xcomposite xdamage xrender imlib2 xft dbus-1 glib-2.0` -pthread Image.cpp -o Image.o
g++ -c -Wall -std=gnu++98 -ggdb -O0 -DDESKTOP -DDBUS -DLAUNCHER `pkg-config --cflags x11 xcomposite xdamage xrender imlib2 xft dbus-1 glib-2.0` -pthread MenuReader.cpp -o MenuReader.o
g++ -c -Wall -std=gnu++98 -ggdb -O0 -DDESKTOP -DDBUS -DLAUNCHER `pkg-config --cflags x11 xcomposite xdamage xrender imlib2 xft dbus-1 glib-2.0` -pthread LauncherWindow.cpp -o LauncherWindow.o
LauncherWindow.cpp: In member function ‘void LauncherWindow::paint()’:
LauncherWindow.cpp:683:17: warning: narrowing conversion of ‘((i * ((unsigned int)sectionWidth)) + 5u)’ from ‘unsigned int’ to ‘short int’ inside { } is ill-formed in C++11 [-Wnarrowing]
LauncherWindow.cpp:683:17: warning: narrowing conversion of ‘(sectionWidth + -10)’ from ‘int’ to ‘short unsigned int’ inside { } is ill-formed in C++11 [-Wnarrowing]
LauncherWindow.cpp:683:17: warning: narrowing conversion of ‘((LauncherWindow*)this)->LauncherWindow::_panelHeight’ from ‘int’ to ‘short unsigned int’ inside { } is ill-formed in C++11 [-Wnarrowing]
g++ -c -Wall -std=gnu++98 -ggdb -O0 -DDESKTOP -DDBUS -DLAUNCHER `pkg-config --cflags x11 xcomposite xdamage xrender imlib2 xft dbus-1 glib-2.0` -pthread SectionList.cpp -o SectionList.o
g++ -c -Wall -std=gnu++98 -ggdb -O0 -DDESKTOP -DDBUS -DLAUNCHER `pkg-config --cflags x11 xcomposite xdamage xrender imlib2 xft dbus-1 glib-2.0` -pthread Section.cpp -o Section.o
g++ -c -Wall -std=gnu++98 -ggdb -O0 -DDESKTOP -DDBUS -DLAUNCHER `pkg-config --cflags x11 xcomposite xdamage xrender imlib2 xft dbus-1 glib-2.0` -pthread Application.cpp -o Application.o
Application.cpp: In member function ‘void Application::createPicture()’:
Application.cpp:436:5: warning: narrowing conversion of ‘((Application::_pixmapHeight - resources->Resources::getTextBackground()->Image::height()) + 2)’ from ‘int’ to ‘short int’ inside { } is ill-formed in C++11 [-Wnarrowing]
Application.cpp:436:5: warning: narrowing conversion of ‘(resources->Resources::getTextBackground()->Image::width() + -4)’ from ‘int’ to ‘short unsigned int’ inside { } is ill-formed in C++11 [-Wnarrowing]
Application.cpp:436:5: warning: narrowing conversion of ‘(resources->Resources::getTextBackground()->Image::height() + -4)’ from ‘int’ to ‘short unsigned int’ inside { } is ill-formed in C++11 [-Wnarrowing]
g++ -pthread TeleWindow.o Main.o XTools.o Thumbnail.o Settings.o Mapping.o Mappings.o Resources.o DBus.o XEventLoop.o Image.o MenuReader.o LauncherWindow.o SectionList.o Section.o Application.o -o telescope `pkg-config --libs x11 xcomposite xdamage xrender imlib2 xft dbus-1 glib-2.0



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

vBulletin® Version 3.8.8