-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added QLauncher proto, which parser desktop files and creates items to the menu from them. - Deleted old icons - Added example desktop files - Added icons for example desktop files
- Loading branch information
Showing
305 changed files
with
683 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
[Desktop Entry] | ||
Encoding=UTF-8 | ||
Version=0.1 | ||
Type=Application | ||
Name=rss news reader | ||
Comment=rss_ap_news_reader_thumb | ||
Exec=/usr/bin/osso_rss_feed_reader.sh | ||
Icon=qgn_list_rss | ||
Categories=osso-news-reader | ||
MimeType=application/news_reader | ||
X-Icon-path=/usr/local/share/pixmaps/ | ||
X-Window-Icon=tn-bookmarks-link | ||
X-Window-Icon-Dimmed=tn-bookmarks-link-dimmed | ||
X-HildonDesk-ShowInToolbar=true | ||
X-Osso-Service=osso_rss_feed_reader | ||
X-Osso-Type=application/x-executable | ||
StartupWMClass=osso_rss_feed_reader |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[Desktop Entry] | ||
Encoding=UTF-8 | ||
Version=1.0 | ||
Name=X Terminal | ||
Comment=Terminal Emulator | ||
Exec=/usr/bin/osso-xterm | ||
Icon=terminal | ||
Terminal=false | ||
Type=Application | ||
Categories=System;TerminalEmulator; | ||
X-HildonDesk-ShowInToolbar=true | ||
X-Osso-Service=xterm | ||
X-Osso-Type=application/x-executable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[Desktop Entry] | ||
Encoding=UTF-8 | ||
Version=1.2.26 | ||
Type=Application | ||
Name=pdf viewer | ||
Comment=pdvi_ap_application_title_thumb | ||
Exec=/usr/bin/osso_pdfviewer | ||
Icon=qgn_list_pdf_viewer | ||
Categories=Office;Viewer | ||
MimeType=application/pdf; | ||
X-HildonDesk-ShowInToolbar=true | ||
X-Osso-Service=osso_pdfviewer | ||
X-Osso-Type=application/x-executable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
[Desktop Entry] | ||
Encoding=UTF-8 | ||
Version=1.0 | ||
Type=Application | ||
Name=address book | ||
Comment=addr_ap_address_book_thumb | ||
Exec=/usr/bin/osso-addressbook | ||
X-Osso-Service=osso_addressbook | ||
Icon=qgn_list_addressbook | ||
StartupWMClass=osso-addressbook | ||
X-Osso-URI-Actions=mailto;xmpp;sipto;sip; | ||
MimeType=text/x-vcard | ||
|
||
[X-Osso-URI-Action Handler mailto] | ||
Method=add_account | ||
Name=addr_me_cs_addtocontacts | ||
TranslationDomain=osso-addressbook | ||
|
||
[X-Osso-URI-Action Handler xmpp] | ||
Method=add_account | ||
Name=addr_me_cs_addtocontacts | ||
TranslationDomain=osso-addressbook | ||
|
||
[X-Osso-URI-Action Handler sipto] | ||
Method=add_account | ||
Name=addr_me_cs_addtocontacts | ||
TranslationDomain=osso-addressbook | ||
|
||
[X-Osso-URI-Action Handler sip] | ||
Method=add_account | ||
Name=addr_me_cs_addtocontacts | ||
TranslationDomain=osso-addressbook |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[Desktop Entry] | ||
Encoding=UTF-8 | ||
Version=1.0 | ||
Type=Application | ||
Name=file manager | ||
Comment=sfil_ap_file_manager_thumb | ||
Exec=/usr/bin/ossofilemanager | ||
Icon=qgn_list_filemanager | ||
X-Window-Icon=qgn_list_filemanager | ||
X-Window-Icon-Dimmed=qgn_list_filemanager | ||
X-Osso-Service=osso_filemanager | ||
X-HildonDesk-ShowInToolbar=true | ||
X-Osso-Type=application/x-executable | ||
StartupWMClass=ossofilemanager |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[Desktop Entry] | ||
Encoding=UTF-8 | ||
Version=1.0 | ||
Type=Application | ||
StartupNotify=false | ||
StartupWMClass=osso-global-search | ||
Name=global search | ||
Comment=srch_ap_search_thumb | ||
Exec=/usr/bin/osso-global-search | ||
Icon=qgn_list_find | ||
X-Window-Icon=qgn_list_find | ||
X-Window-Icon-Dimmed=qgn_list_find | ||
X-HildonDesk-ShowInToolbar=true | ||
X-Osso-Type=application/x-executable | ||
X-Osso-Service=osso_global_search |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[Desktop Entry] | ||
Encoding=UTF-8 | ||
Version=1.0 | ||
Type=Application | ||
Name=help application | ||
Comment=help_ap_help_application_thumb | ||
Exec=/usr/bin/osso_help | ||
Icon=qgn_list_help | ||
X-HildonDesk-ShowInToolbar=true | ||
X-Osso-Service=osso_help | ||
X-Osso-Type=application/x-executable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[Device] | ||
resolution=800x480 | ||
|
||
[paths] | ||
desktopfiles=../config/example-menu | ||
icons=../images/example-menu | ||
images=../images:../images/backgrounds |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
#include "settings.hh" | ||
|
||
#include <QSettings> | ||
#include <QDir> | ||
#include <QtDebug> | ||
|
||
#ifdef Q_WS_QWS | ||
// Nothing here yet. Add if needed | ||
#endif | ||
|
||
#ifdef Q_WS_X11 | ||
#include <QDesktopWidget> | ||
#include <QDesktopServices> | ||
#endif | ||
|
||
namespace qtablet{ | ||
|
||
class SettingsPrivate{ | ||
public: | ||
SettingsPrivate(){ | ||
|
||
QSettings settings( "config:qtablet.conf", QSettings::IniFormat ); | ||
|
||
if ( settings.status() != QSettings::NoError ){ | ||
qWarning() << "Settings: Failed to parse configuration file!"; | ||
return; | ||
} | ||
|
||
// Parse group contents | ||
parseGroup( "device", settings ); | ||
parseGroup( "paths", settings ); | ||
|
||
} | ||
|
||
void parseGroup( QString const & group, QSettings & settings ){ | ||
settings.beginGroup( group ); | ||
QStringList keys = settings.childKeys(); | ||
|
||
|
||
foreach ( QString key, keys ){ | ||
m_values.insert( key, settings.value( key, "" ).toString() ); | ||
} | ||
|
||
settings.endGroup(); | ||
} | ||
|
||
|
||
|
||
QHash <QString, QString> m_values; | ||
}; | ||
|
||
|
||
////// BEGIN Settings CLASS /////// | ||
Settings * Settings::instance(){ | ||
static Settings instance; | ||
return &instance; | ||
} | ||
|
||
Settings::~Settings(){ | ||
delete d_ptr; | ||
} | ||
|
||
QSize Settings::screenResolution() const{ | ||
// If using X11 just get the resolution from the desktop widget. | ||
#ifdef Q_WS_X11 | ||
QDesktopWidget widget; | ||
return widget.screenGeometry().size(); | ||
#endif | ||
|
||
// Read resolition from the configuration file. | ||
QString resolution = d_ptr->m_values.value( resolution ); | ||
QStringList values = resolution.split("x"); | ||
QSize size; | ||
|
||
if ( values.size() != 2 ){ | ||
qWarning() << "Check configuration file. Resolution wrong!"; | ||
return size; | ||
} | ||
|
||
size.setWidth ( values.at(0).toInt() ); | ||
size.setHeight( values.at(1).toInt() ); | ||
return size; | ||
} | ||
|
||
|
||
QStringList Settings::desktopFilePaths() const{ | ||
return d_ptr->m_values.value( "desktopfiles" ).split(":"); | ||
} | ||
|
||
QStringList Settings::desktopFiles() const{ | ||
// Get the paths to desktop files | ||
QStringList paths = desktopFilePaths(); | ||
|
||
// Get the actual files from the paths | ||
QStringList files; | ||
foreach( QString path, paths ){ | ||
QDir dir( path ); | ||
files << dir.entryList( QStringList("*.desktop"), QDir::Files ); | ||
} | ||
|
||
return files; | ||
} | ||
|
||
|
||
QStringList Settings::iconPaths() const{ | ||
return d_ptr->m_values.value( "icons" ).split(":"); | ||
} | ||
|
||
QStringList Settings::imagePaths() const{ | ||
return d_ptr->m_values.value( "images" ).split(":"); | ||
} | ||
|
||
|
||
Settings::Settings(): | ||
d_ptr( new SettingsPrivate ) | ||
{ | ||
// Set global search paths for the framework level. | ||
QDir::setSearchPaths( "desktop", desktopFilePaths() ); | ||
QDir::setSearchPaths( "icon", iconPaths() ); | ||
QDir::setSearchPaths( "image", imagePaths() ); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#ifndef SETTINGS_H | ||
#define SETTINGS_H | ||
|
||
#include <QSize> | ||
#include <QString> | ||
#include <QtGlobal> | ||
|
||
namespace qtablet{ | ||
|
||
class SettingsPrivate; | ||
|
||
class Settings | ||
{ | ||
public: | ||
static Settings * instance(); | ||
|
||
~Settings(); | ||
|
||
QSize screenResolution() const; | ||
|
||
QStringList desktopFilePaths() const; | ||
|
||
QStringList desktopFiles() const; | ||
|
||
QStringList iconPaths() const; | ||
|
||
QStringList imagePaths() const; | ||
|
||
private: | ||
Settings(); | ||
SettingsPrivate * d_ptr; | ||
Q_DISABLE_COPY( Settings ); | ||
}; | ||
|
||
} | ||
#endif // SETTINGS_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.