Skip to content

Commit

Permalink
Gnome fallback mode
Browse files Browse the repository at this point in the history
  • Loading branch information
realbardia committed Jun 29, 2014
1 parent 6f3dd46 commit 10d3951
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion SialanTelegram.pro
@@ -1,4 +1,4 @@
TEMPLATE = subdirs
CONFIG += ordered
SUBDIRS += Sigram
#SUBDIRS += libs
SUBDIRS += libs
1 change: 1 addition & 0 deletions Sigram/telegram/strcuts.h
Expand Up @@ -44,6 +44,7 @@ class Enums : public QObject
enum DesktopSession {
Unknown,
Gnome,
GnomeFallBack,
Unity,
Kde,
Windows,
Expand Down
6 changes: 5 additions & 1 deletion Sigram/telegramgui.cpp
Expand Up @@ -124,6 +124,7 @@ TelegramGui::TelegramGui(QObject *parent) :
p->doc = new QTextDocument(this);
p->translator = new QTranslator(this);
p->sysTray = 0;
p->unityTray = 0;

QDir().mkpath(HOME_PATH);
QDir().mkpath(HOME_PATH + "/downloads");
Expand Down Expand Up @@ -370,6 +371,9 @@ int TelegramGui::desktopSession()
else
if( desktop_session->contains("ubuntu",Qt::CaseInsensitive) )
result = Enums::Unity;
else
if( desktop_session->contains("gnome-fallback",Qt::CaseInsensitive) )
result = Enums::GnomeFallBack;
else
result = Enums::Gnome;
#endif
Expand Down Expand Up @@ -525,7 +529,7 @@ void TelegramGui::start()

p->root = static_cast<QQuickWindow*>(p->engine->rootObjects().first());

if( desktopSession() == Enums::Unity )
if( desktopSession() == Enums::Unity || desktopSession() == Enums::GnomeFallBack )
{
QFile::copy(":/files/sys_tray.png",UNITY_ICON_PATH(0));

Expand Down

0 comments on commit 10d3951

Please sign in to comment.