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:
		
							
								
								
									
										22
									
								
								debian/control
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										22
									
								
								debian/control
									
									
									
									
										vendored
									
									
								
							@@ -10,24 +10,32 @@ Build-Depends:
 | 
				
			|||||||
 cdbs,
 | 
					 cdbs,
 | 
				
			||||||
 libavformat-dev,
 | 
					 libavformat-dev,
 | 
				
			||||||
 libswscale-dev,
 | 
					 libswscale-dev,
 | 
				
			||||||
 qtbase5-dev,
 | 
					 libqt4-dev,
 | 
				
			||||||
 qttools5-dev-tools,
 | 
					 qt4-dev-tools,
 | 
				
			||||||
 qt5-default,
 | 
					 qt4-default,
 | 
				
			||||||
 | 
					 kdelibs5-dev,
 | 
				
			||||||
 libnotify-dev,
 | 
					 libnotify-dev,
 | 
				
			||||||
 | 
					 libgtk2.0-dev,
 | 
				
			||||||
 | 
					 libappindicator-dev,
 | 
				
			||||||
 pkg-config,
 | 
					 pkg-config,
 | 
				
			||||||
 vitamtp-dev
 | 
					 vitamtp-dev (>= 2.5.4)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Package: qcma
 | 
					Package: qcma
 | 
				
			||||||
Architecture: any
 | 
					Architecture: any
 | 
				
			||||||
Depends: ${shlibs:Depends}, ${misc:Depends}
 | 
					Depends: vitamtp4 (>= 2.5.4), ${shlibs:Depends}, ${misc:Depends}
 | 
				
			||||||
Description: Content Manager Assistant for the PS Vita
 | 
					Description: Content Manager Assistant for the PS Vita
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Package: qcma-cli
 | 
					Package: qcma-cli
 | 
				
			||||||
Architecture: any
 | 
					Architecture: any
 | 
				
			||||||
Depends: ${shlibs:Depends}, ${misc:Depends}
 | 
					Depends: vitamtp4 (>= 2.5.4), ${shlibs:Depends}, ${misc:Depends}
 | 
				
			||||||
Description: Content Manager Assistant for the PS Vita (headless version)
 | 
					Description: Content Manager Assistant for the PS Vita (headless version)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Package: qcma-appindicator
 | 
					Package: qcma-appindicator
 | 
				
			||||||
Architecture: any
 | 
					Architecture: any
 | 
				
			||||||
Depends: ${shlibs:Depends}, ${misc:Depends}
 | 
					Depends: qcma (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
 | 
				
			||||||
Description: Content Manager Assistant for the PS Vita (appindicator support)
 | 
					Description: Content Manager Assistant for the PS Vita (appindicator support)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Package: qcma-kdenotifier
 | 
				
			||||||
 | 
					Architecture: any
 | 
				
			||||||
 | 
					Depends: qcma (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
 | 
				
			||||||
 | 
					Description: Content Manager Assistant for the PS Vita (kdenotifier support)
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										2
									
								
								debian/qcma-appindicator.install
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								debian/qcma-appindicator.install
									
									
									
									
										vendored
									
									
								
							@@ -1,3 +1,3 @@
 | 
				
			|||||||
usr/share/qcma/libqcma_appindicator.so
 | 
					usr/lib/qcma/libqcma_appindicator.so
 | 
				
			||||||
resources/images/qcma_on.png usr/share/icons/hicolor/64x64/actions
 | 
					resources/images/qcma_on.png usr/share/icons/hicolor/64x64/actions
 | 
				
			||||||
resources/images/qcma_off.png usr/share/icons/hicolor/64x64/actions
 | 
					resources/images/qcma_off.png usr/share/icons/hicolor/64x64/actions
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										1
									
								
								debian/qcma-kdenotifier.install
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								debian/qcma-kdenotifier.install
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
				
			|||||||
 | 
					usr/lib/qcma/libqcma_kdenotifier.so
 | 
				
			||||||
							
								
								
									
										2
									
								
								debian/rules
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								debian/rules
									
									
									
									
										vendored
									
									
								
							@@ -3,7 +3,7 @@
 | 
				
			|||||||
include /usr/share/cdbs/1/rules/debhelper.mk
 | 
					include /usr/share/cdbs/1/rules/debhelper.mk
 | 
				
			||||||
include /usr/share/cdbs/1/class/qmake.mk
 | 
					include /usr/share/cdbs/1/class/qmake.mk
 | 
				
			||||||
 | 
					
 | 
				
			||||||
DEB_QMAKE_ARGS += qcma.pro PREFIX=/usr CONFIG+=ENABLE_APPINDICATOR
 | 
					DEB_QMAKE_ARGS += qcma.pro PREFIX=/usr CONFIG+="ENABLE_APPINDICATOR"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
pre-build::
 | 
					pre-build::
 | 
				
			||||||
	lrelease resources/translations/*.ts
 | 
						lrelease resources/translations/*.ts
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										2
									
								
								qcma.pro
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								qcma.pro
									
									
									
									
									
								
							@@ -21,7 +21,7 @@ unix:!macx:!android {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
    ENABLE_KDENOTIFIER {
 | 
					    ENABLE_KDENOTIFIER {
 | 
				
			||||||
        greaterThan(QT_MAJOR_VERSION, 4) {
 | 
					        greaterThan(QT_MAJOR_VERSION, 4) {
 | 
				
			||||||
            #error("ENABLE_KDE can only be used with Qt4")
 | 
					            error("ENABLE_KDE can only be used with Qt4")
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        SUBDIRS += qcma_kdenotifier.pro
 | 
					        SUBDIRS += qcma_kdenotifier.pro
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -7,7 +7,7 @@ DEFINES += QCMA_TRAYINDICATOR_LIBRARY
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
QT_CONFIG -= no-pkg-config
 | 
					QT_CONFIG -= no-pkg-config
 | 
				
			||||||
 | 
					
 | 
				
			||||||
PKGCONFIG += appindicator-0.1 libnotify
 | 
					PKGCONFIG += appindicator-0.1 gtk+-2.0 libnotify
 | 
				
			||||||
INCLUDEPATH += src/
 | 
					INCLUDEPATH += src/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
SOURCES += \
 | 
					SOURCES += \
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -17,3 +17,5 @@ HEADERS += \
 | 
				
			|||||||
    src/indicator/kdenotifiertray.h
 | 
					    src/indicator/kdenotifiertray.h
 | 
				
			||||||
 | 
					
 | 
				
			||||||
target.path = /usr/lib/qcma
 | 
					target.path = /usr/lib/qcma
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					INSTALLS += target
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -7,5 +7,7 @@
 | 
				
			|||||||
        <file>resources/images/edit-clear-locationbar-rtl.png</file>
 | 
					        <file>resources/images/edit-clear-locationbar-rtl.png</file>
 | 
				
			||||||
        <file>resources/images/tray/qcma_off.png</file>
 | 
					        <file>resources/images/tray/qcma_off.png</file>
 | 
				
			||||||
        <file>resources/images/tray/qcma_off_16.png</file>
 | 
					        <file>resources/images/tray/qcma_off_16.png</file>
 | 
				
			||||||
 | 
					        <file>resources/images/qcma_on.png</file>
 | 
				
			||||||
 | 
					        <file>resources/images/qcma_off.png</file>
 | 
				
			||||||
    </qresource>
 | 
					    </qresource>
 | 
				
			||||||
</RCC>
 | 
					</RCC>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -6,8 +6,8 @@
 | 
				
			|||||||
   <rect>
 | 
					   <rect>
 | 
				
			||||||
    <x>0</x>
 | 
					    <x>0</x>
 | 
				
			||||||
    <y>0</y>
 | 
					    <y>0</y>
 | 
				
			||||||
    <width>520</width>
 | 
					    <width>532</width>
 | 
				
			||||||
    <height>439</height>
 | 
					    <height>457</height>
 | 
				
			||||||
   </rect>
 | 
					   </rect>
 | 
				
			||||||
  </property>
 | 
					  </property>
 | 
				
			||||||
  <property name="windowTitle">
 | 
					  <property name="windowTitle">
 | 
				
			||||||
@@ -30,6 +30,11 @@
 | 
				
			|||||||
          <layout class="QVBoxLayout" name="verticalLayout_2">
 | 
					          <layout class="QVBoxLayout" name="verticalLayout_2">
 | 
				
			||||||
           <item>
 | 
					           <item>
 | 
				
			||||||
            <widget class="QLabel" name="label">
 | 
					            <widget class="QLabel" name="label">
 | 
				
			||||||
 | 
					             <property name="font">
 | 
				
			||||||
 | 
					              <font>
 | 
				
			||||||
 | 
					               <pointsize>10</pointsize>
 | 
				
			||||||
 | 
					              </font>
 | 
				
			||||||
 | 
					             </property>
 | 
				
			||||||
             <property name="text">
 | 
					             <property name="text">
 | 
				
			||||||
              <string>Specify the folders that the PS Vita will access for each content type.</string>
 | 
					              <string>Specify the folders that the PS Vita will access for each content type.</string>
 | 
				
			||||||
             </property>
 | 
					             </property>
 | 
				
			||||||
@@ -236,6 +241,19 @@
 | 
				
			|||||||
               </item>
 | 
					               </item>
 | 
				
			||||||
              </layout>
 | 
					              </layout>
 | 
				
			||||||
             </item>
 | 
					             </item>
 | 
				
			||||||
 | 
					             <item>
 | 
				
			||||||
 | 
					              <spacer name="verticalSpacer_2">
 | 
				
			||||||
 | 
					               <property name="orientation">
 | 
				
			||||||
 | 
					                <enum>Qt::Vertical</enum>
 | 
				
			||||||
 | 
					               </property>
 | 
				
			||||||
 | 
					               <property name="sizeHint" stdset="0">
 | 
				
			||||||
 | 
					                <size>
 | 
				
			||||||
 | 
					                 <width>20</width>
 | 
				
			||||||
 | 
					                 <height>40</height>
 | 
				
			||||||
 | 
					                </size>
 | 
				
			||||||
 | 
					               </property>
 | 
				
			||||||
 | 
					              </spacer>
 | 
				
			||||||
 | 
					             </item>
 | 
				
			||||||
            </layout>
 | 
					            </layout>
 | 
				
			||||||
           </item>
 | 
					           </item>
 | 
				
			||||||
          </layout>
 | 
					          </layout>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -102,9 +102,9 @@ void MainWidget::stopServer()
 | 
				
			|||||||
void MainWidget::deviceDisconnect()
 | 
					void MainWidget::deviceDisconnect()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
#ifndef Q_OS_WIN32
 | 
					#ifndef Q_OS_WIN32
 | 
				
			||||||
    trayIcon->setIcon("qcma_off.png");
 | 
					    trayIcon->setIcon("qcma_off");
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
    trayIcon->setIcon("qcma_off_16.png");
 | 
					    trayIcon->setIcon("qcma_off_16");
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
    qDebug("Icon changed - disconnected");
 | 
					    qDebug("Icon changed - disconnected");
 | 
				
			||||||
    setTrayTooltip(tr("Disconnected"));
 | 
					    setTrayTooltip(tr("Disconnected"));
 | 
				
			||||||
@@ -114,9 +114,9 @@ void MainWidget::deviceDisconnect()
 | 
				
			|||||||
void MainWidget::deviceConnect(QString message)
 | 
					void MainWidget::deviceConnect(QString message)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
#ifndef Q_OS_WIN32
 | 
					#ifndef Q_OS_WIN32
 | 
				
			||||||
    trayIcon->setIcon("qcma_on.png");
 | 
					    trayIcon->setIcon("qcma_on");
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
    trayIcon->setIcon("qcma_off_16.png");
 | 
					    trayIcon->setIcon("qcma_off_16");
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
    qDebug("Icon changed - connected");
 | 
					    qDebug("Icon changed - connected");
 | 
				
			||||||
    setTrayTooltip(message);
 | 
					    setTrayTooltip(message);
 | 
				
			||||||
@@ -217,27 +217,29 @@ TrayIndicator *MainWidget::createTrayObject(QWidget *parent)
 | 
				
			|||||||
    TrayFunctionPointer create_tray = NULL;
 | 
					    TrayFunctionPointer create_tray = NULL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    QString desktop = getenv("XDG_CURRENT_DESKTOP");
 | 
					    QString desktop = getenv("XDG_CURRENT_DESKTOP");
 | 
				
			||||||
 | 
					    qDebug() << "Current desktop: " << desktop;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
 | 
					#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
 | 
				
			||||||
    if(desktop.toLower() == "kde")
 | 
					    if(desktop.toLower() == "kde")
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        // KDENotifier
 | 
					        // KDENotifier
 | 
				
			||||||
        QLibrary library("/usr/lib/qcma/qcma_kdenotifier.so");
 | 
					        QLibrary library("/usr/lib/qcma/libqcma_kdenotifier.so");
 | 
				
			||||||
        if(library.load())
 | 
					        if(library.load())
 | 
				
			||||||
            create_tray = reinterpret_cast<TrayFunctionPointer>(library.resolve("createTrayIndicator"));
 | 
					            create_tray = reinterpret_cast<TrayFunctionPointer>(library.resolve("createTrayIndicator"));
 | 
				
			||||||
        else
 | 
					        else
 | 
				
			||||||
            qDebug() << "Cannot load qcma_kdenotifier plugin";
 | 
					            qDebug() << "Cannot load libqcma_kdenotifier plugin";
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					    // try to use the appindicator if is available
 | 
				
			||||||
    // if(desktop.toLower() == "unity")
 | 
					    // if(desktop.toLower() == "unity")
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        // AppIndicator
 | 
					        // AppIndicator
 | 
				
			||||||
        QLibrary library("/usr/lib/qcma/qcma_appindicator.so");
 | 
					        QLibrary library("/usr/lib/qcma/libqcma_appindicator.so");
 | 
				
			||||||
        if(library.load())
 | 
					        if(library.load())
 | 
				
			||||||
            create_tray = reinterpret_cast<TrayFunctionPointer>(library.resolve("createTrayIndicator"));
 | 
					            create_tray = reinterpret_cast<TrayFunctionPointer>(library.resolve("createTrayIndicator"));
 | 
				
			||||||
        else
 | 
					        else
 | 
				
			||||||
            qDebug() << "Cannot load qcma_appindicator plugin";
 | 
					            qDebug() << "Cannot load libqcma_appindicator plugin";
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // else QSystemTrayIcon
 | 
					    // else QSystemTrayIcon
 | 
				
			||||||
@@ -250,9 +252,9 @@ void MainWidget::createTrayIcon()
 | 
				
			|||||||
    trayIcon->init();
 | 
					    trayIcon->init();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifndef Q_OS_WIN32
 | 
					#ifndef Q_OS_WIN32
 | 
				
			||||||
    trayIcon->setIcon("qcma_off.png");
 | 
					    trayIcon->setIcon("qcma_off");
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
    trayIcon->setIcon("qcma_off_16.png");
 | 
					    trayIcon->setIcon("qcma_off_16");
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
    trayIcon->show();
 | 
					    trayIcon->show();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -96,7 +96,8 @@ bool QTrayIcon::isVisible()
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
void QTrayIcon::setIcon(const QString &icon)
 | 
					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()
 | 
					void QTrayIcon::show()
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -27,6 +27,7 @@
 | 
				
			|||||||
#define writableLocation storageLocation
 | 
					#define writableLocation storageLocation
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include <QDebug>
 | 
				
			||||||
#include <QDir>
 | 
					#include <QDir>
 | 
				
			||||||
#include <QVector>
 | 
					#include <QVector>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -143,13 +144,13 @@ void UnityIndicator::init()
 | 
				
			|||||||
    gtk_widget_show(quit);
 | 
					    gtk_widget_show(quit);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    m_indicator = app_indicator_new(
 | 
					    m_indicator = app_indicator_new(
 | 
				
			||||||
        "unique-application-name",
 | 
					        "qcma-appindicator",
 | 
				
			||||||
        "indicator-messages",
 | 
					        "qcma-messages",
 | 
				
			||||||
        APP_INDICATOR_CATEGORY_APPLICATION_STATUS
 | 
					        APP_INDICATOR_CATEGORY_APPLICATION_STATUS
 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    QString icon_path;
 | 
					    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())
 | 
					    if(QFile("/usr/" + icon_name).exists())
 | 
				
			||||||
        icon_path = QFileInfo("/usr/" + icon_name).absolutePath();
 | 
					        icon_path = QFileInfo("/usr/" + icon_name).absolutePath();
 | 
				
			||||||
@@ -157,7 +158,12 @@ void UnityIndicator::init()
 | 
				
			|||||||
        icon_path = QFileInfo("/usr/" + icon_name).absolutePath();
 | 
					        icon_path = QFileInfo("/usr/" + icon_name).absolutePath();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if(!icon_path.isEmpty())
 | 
					    if(!icon_path.isEmpty())
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        qDebug() << "Using " << icon_path << " as icon theme path";
 | 
				
			||||||
        app_indicator_set_icon_theme_path(m_indicator, qPrintable(icon_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_status(m_indicator, APP_INDICATOR_STATUS_ACTIVE);
 | 
				
			||||||
    app_indicator_set_menu(m_indicator, GTK_MENU(menu));
 | 
					    app_indicator_set_menu(m_indicator, GTK_MENU(menu));
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -29,13 +29,6 @@
 | 
				
			|||||||
extern "C" {
 | 
					extern "C" {
 | 
				
			||||||
#include <libappindicator/app-indicator.h>
 | 
					#include <libappindicator/app-indicator.h>
 | 
				
			||||||
#include <gtk/gtk.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
 | 
					#define signals public
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user