Added libappindicator3-dev and kdelibs-dev as build dependency.
Downgrade to Qt4 since Qt5 5.2.0 on Ubuntu 14.04 has a bug with harbuzz and japanese characters.
This commit is contained in:
@@ -96,7 +96,8 @@ bool QTrayIcon::isVisible()
|
||||
|
||||
void QTrayIcon::setIcon(const QString &icon)
|
||||
{
|
||||
m_tray_icon->setIcon(QIcon(":/main/resources/images/tray/" + icon));
|
||||
QIcon qicon(":/main/resources/images/" + icon + ".png");
|
||||
m_tray_icon->setIcon(qicon);
|
||||
}
|
||||
|
||||
void QTrayIcon::show()
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#define writableLocation storageLocation
|
||||
#endif
|
||||
|
||||
#include <QDebug>
|
||||
#include <QDir>
|
||||
#include <QVector>
|
||||
|
||||
@@ -143,13 +144,13 @@ void UnityIndicator::init()
|
||||
gtk_widget_show(quit);
|
||||
|
||||
m_indicator = app_indicator_new(
|
||||
"unique-application-name",
|
||||
"indicator-messages",
|
||||
"qcma-appindicator",
|
||||
"qcma-messages",
|
||||
APP_INDICATOR_CATEGORY_APPLICATION_STATUS
|
||||
);
|
||||
|
||||
QString icon_path;
|
||||
QString icon_name = "share/icons/hicolor/64x64/tray/qcma_on.png";
|
||||
QString icon_name = "share/icons/hicolor/64x64/actions/qcma_on.png";
|
||||
|
||||
if(QFile("/usr/" + icon_name).exists())
|
||||
icon_path = QFileInfo("/usr/" + icon_name).absolutePath();
|
||||
@@ -157,7 +158,12 @@ void UnityIndicator::init()
|
||||
icon_path = QFileInfo("/usr/" + icon_name).absolutePath();
|
||||
|
||||
if(!icon_path.isEmpty())
|
||||
{
|
||||
qDebug() << "Using " << icon_path << " as icon theme path";
|
||||
app_indicator_set_icon_theme_path(m_indicator, qPrintable(icon_path));
|
||||
}
|
||||
else
|
||||
qDebug() << "Cannot find qcma icons.";
|
||||
|
||||
app_indicator_set_status(m_indicator, APP_INDICATOR_STATUS_ACTIVE);
|
||||
app_indicator_set_menu(m_indicator, GTK_MENU(menu));
|
||||
|
||||
@@ -29,13 +29,6 @@
|
||||
extern "C" {
|
||||
#include <libappindicator/app-indicator.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
void optionsIndicator(GtkMenu *menu, gpointer data);
|
||||
void reloadIndicator(GtkMenu *menu, gpointer data);
|
||||
void backupIndicator(GtkMenu *menu, gpointer data);
|
||||
void aboutIndicator(GtkMenu *menu, gpointer data);
|
||||
void aboutQtIndicator(GtkMenu *menu, gpointer data);
|
||||
void quitIndicator(GtkMenu *menu, gpointer data);
|
||||
}
|
||||
|
||||
#define signals public
|
||||
|
||||
Reference in New Issue
Block a user