diff -Nru albert-0.10.0/debian/changelog albert-0.10.1/debian/changelog --- albert-0.10.0/debian/changelog 2017-03-20 09:40:29.000000000 +0000 +++ albert-0.10.1/debian/changelog 2017-03-21 09:02:14.000000000 +0000 @@ -1,6 +1,12 @@ -albert (0.10.0-1~webupd8~vivid0) vivid; urgency=medium +albert (0.10.1-1~webupd8~vivid0) vivid; urgency=medium - * New upstream bugfix release + * New upstream release + + -- Alin Andrei Wed, 21 Mar 2017 11:02:14 +0200 + +albert (0.10.0-1~webupd8~trusty0) trusty; urgency=medium + + * New upstream release -- Alin Andrei Mon, 20 Mar 2017 11:40:29 +0200 diff -Nru albert-0.10.0/debian/control albert-0.10.1/debian/control --- albert-0.10.0/debian/control 2017-01-31 10:40:24.000000000 +0000 +++ albert-0.10.1/debian/control 2017-03-20 10:08:12.000000000 +0000 @@ -8,6 +8,6 @@ Package: albert Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, libqt5sql5-sqlite +Depends: ${shlibs:Depends}, ${misc:Depends}, libqt5sql5-sqlite, libqt5concurrent5 Description: Albert Launcher An amazing, desktop environment agnostic omnilauncher. diff -Nru albert-0.10.0/src/application/src/main.cpp albert-0.10.1/src/application/src/main.cpp --- albert-0.10.0/src/application/src/main.cpp 2017-03-19 22:45:57.000000000 +0000 +++ albert-0.10.1/src/application/src/main.cpp 2017-03-20 15:24:06.000000000 +0000 @@ -66,7 +66,7 @@ app = new QApplication(argc, argv); app->setApplicationName("albert"); app->setApplicationDisplayName("Albert"); - app->setApplicationVersion("v0.10.0"); + app->setApplicationVersion("v0.10.1"); app->setQuitOnLastWindowClosed(false); QString icon = XdgIconLookup::iconPath("albert"); if ( icon.isEmpty() ) icon = ":app_icon"; @@ -240,9 +240,14 @@ * START IPC SERVER */ - // Start server so second instances will close - QLocalServer::removeServer(app->applicationName()); - localServer->listen(app->applicationName()); + // Remove pipes potentially leftover after crash + QLocalServer::removeServer(app->applicationName()); + + // Create server and handle messages + if ( !localServer->listen(app->applicationName()) ) + qWarning() << "Local server could not be created. IPC will not work! Reason:" << localServer->errorString(); + + // Handle incomin messages QObject::connect(localServer, &QLocalServer::newConnection, dispatchMessage); @@ -276,8 +281,8 @@ QMessageBox(QMessageBox::Information, "Note", "This is free and open source software. We are " "not affiliated with Alfred or Running with " - "Crayons Ltd. Please to not bother them with " - "support querstions. They cannot help you.").exec(); + "Crayons Ltd. Please do not bother them with " + "support questions. They cannot help you.").exec(); settings.setValue("alfred_note_shown", true); } @@ -405,6 +410,8 @@ delete mainWindow; delete ExtensionManager::instance; + localServer->close(); + // Delete the running indicator file QFile::remove(QStandardPaths::writableLocation(QStandardPaths::CacheLocation)+"/running"); diff -Nru albert-0.10.0/src/application/src/settingswidget/settingswidget.cpp albert-0.10.1/src/application/src/settingswidget/settingswidget.cpp --- albert-0.10.0/src/application/src/settingswidget/settingswidget.cpp 2017-03-19 22:45:57.000000000 +0000 +++ albert-0.10.1/src/application/src/settingswidget/settingswidget.cpp 2017-03-20 15:24:06.000000000 +0000 @@ -253,7 +253,8 @@ ui.label_pluginTitle->show(); } else{ - QLabel *lbl = new QLabel("Plugin not loaded."); + QString msg("Plugin not loaded.\n%1"); + QLabel *lbl = new QLabel(msg.arg(extensionManager_->extensionSpecs()[current.row()]->lastError())); lbl->setEnabled(false); lbl->setAlignment(Qt::AlignCenter); ui.widget_pluginInfos->layout()->addWidget(lbl); diff -Nru albert-0.10.0/src/lib/albert/include/standarditem.h albert-0.10.1/src/lib/albert/include/standarditem.h --- albert-0.10.0/src/lib/albert/include/standarditem.h 2017-03-19 22:45:57.000000000 +0000 +++ albert-0.10.1/src/lib/albert/include/standarditem.h 2017-03-20 15:24:06.000000000 +0000 @@ -38,23 +38,27 @@ QString id() const override final; - QString text() const override final; + QString text() const override; void setText(const QString &text); - QString subtext() const override final; + QString subtext() const override; void setSubtext(const QString &subtext); - QString iconPath() const override final; + QString completionString() const override; + void setCompletionString(const QString &completion); + + QString iconPath() const override; void setIconPath( const QString &iconPath); - std::vector> actions() override final; + std::vector> actions() override; void setActions(std::vector> &&actions); -private: +protected: QString id_; QString text_; QString subtext_; + QString completion_; QString iconPath_; std::vector> actions_; diff -Nru albert-0.10.0/src/lib/albert/src/standardobjects/standarditem.cpp albert-0.10.1/src/lib/albert/src/standardobjects/standarditem.cpp --- albert-0.10.0/src/lib/albert/src/standardobjects/standarditem.cpp 2017-03-19 22:45:57.000000000 +0000 +++ albert-0.10.1/src/lib/albert/src/standardobjects/standarditem.cpp 2017-03-20 15:24:06.000000000 +0000 @@ -41,6 +41,14 @@ subtext_ = subtext; } +QString Core::StandardItem::completionString() const { + return (completion_.isNull()) ? text_ : completion_; +} + +void Core::StandardItem::setCompletionString(const QString &completion) { + completion_ = completion; +} + QString Core::StandardItem::iconPath() const { return iconPath_; } diff -Nru albert-0.10.0/src/plugins/chromebookmarks/metadata.json albert-0.10.1/src/plugins/chromebookmarks/metadata.json --- albert-0.10.0/src/plugins/chromebookmarks/metadata.json 2017-03-19 22:45:57.000000000 +0000 +++ albert-0.10.1/src/plugins/chromebookmarks/metadata.json 2017-03-20 15:24:06.000000000 +0000 @@ -1,6 +1,6 @@ { "id" : "org.albert.extension.chromebookmarks", - "name" : "ChromeBookmarks", + "name" : "Chrome bookmarks", "version" : "1.0", "platform" : "Linux", "group" : "Extensions", diff -Nru albert-0.10.0/src/plugins/debug/CMakeLists.txt albert-0.10.1/src/plugins/debug/CMakeLists.txt --- albert-0.10.0/src/plugins/debug/CMakeLists.txt 2017-03-19 22:45:57.000000000 +0000 +++ albert-0.10.1/src/plugins/debug/CMakeLists.txt 2017-03-20 15:24:06.000000000 +0000 @@ -4,7 +4,9 @@ FILE(GLOB_RECURSE SRC src/* metadata.json) -find_package(Qt5Widgets 5.2 REQUIRED) +find_package(Qt5 5.2.0 REQUIRED COMPONENTS + Widgets +) set(LIB ${Qt5Widgets_LIBRARIES} diff -Nru albert-0.10.0/src/plugins/files/src/file.cpp albert-0.10.1/src/plugins/files/src/file.cpp --- albert-0.10.0/src/plugins/files/src/file.cpp 2017-03-19 22:45:57.000000000 +0000 +++ albert-0.10.1/src/plugins/files/src/file.cpp 2017-03-20 15:24:06.000000000 +0000 @@ -59,8 +59,9 @@ const QString xdgIconName = mimetype_.iconName(); // First check if icon exists - if (iconCache_.count(xdgIconName)) - return iconCache_[xdgIconName]; + auto search = iconCache_.find(xdgIconName); + if(search != iconCache_.end()) + return search->second; QString iconPath; if ( !(iconPath = XdgIconLookup::iconPath(xdgIconName)).isNull() // Lookup iconName diff -Nru albert-0.10.0/src/plugins/firefoxbookmarks/metadata.json albert-0.10.1/src/plugins/firefoxbookmarks/metadata.json --- albert-0.10.0/src/plugins/firefoxbookmarks/metadata.json 2017-03-19 22:45:57.000000000 +0000 +++ albert-0.10.1/src/plugins/firefoxbookmarks/metadata.json 2017-03-20 15:24:06.000000000 +0000 @@ -1,6 +1,6 @@ { "id" : "org.albert.extension.firefoxbookmarks", - "name" : "Firefox Bookmarks", + "name" : "Firefox bookmarks", "version" : "1.0", "platform" : "All", "group" : "Extensions", diff -Nru albert-0.10.0/src/plugins/mpris/CMakeLists.txt albert-0.10.1/src/plugins/mpris/CMakeLists.txt --- albert-0.10.0/src/plugins/mpris/CMakeLists.txt 2017-03-19 22:45:57.000000000 +0000 +++ albert-0.10.1/src/plugins/mpris/CMakeLists.txt 2017-03-20 15:24:06.000000000 +0000 @@ -2,31 +2,30 @@ PROJECT(mpris) -find_package(Qt5Widgets 5.2 REQUIRED) -find_package(Qt5DBus 5.2 REQUIRED) +FILE(GLOB_RECURSE SRC src/* metadata.json) -include_directories( - ../../application - ../../application/pluginsystem -) - -FILE(GLOB_RECURSE SRC src/* mpris.qrc metadata.json) - -set(LIB - ${Qt5Widgets_LIBRARIES} - ${Qt5DBus_LIBRARIES} - albertcore - xdg +find_package(Qt5 5.2.0 REQUIRED COMPONENTS + Widgets + DBus ) qt5_wrap_ui(UI forms/configwidget.ui ) +# Define the target add_library(${PROJECT_NAME} SHARED ${SRC} ${UI}) -target_link_libraries(${PROJECT_NAME} ${LIB}) +# Set INCLUDE_DIRS and INTERFACE_INCLUDE_DIRS +target_include_directories(${PROJECT_NAME} PRIVATE src/) + +# Link target to libraries +target_link_libraries(${PROJECT_NAME} + ${Qt5Widgets_LIBRARIES} + ${Qt5DBus_LIBRARIES} + albertcore + xdg +) -if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") - install(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION share/albert/plugins) -endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux") +# Install target +install(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION lib/albert/plugins) diff -Nru albert-0.10.0/src/plugins/mpris/metadata.json albert-0.10.1/src/plugins/mpris/metadata.json --- albert-0.10.0/src/plugins/mpris/metadata.json 2017-03-19 22:45:57.000000000 +0000 +++ albert-0.10.1/src/plugins/mpris/metadata.json 2017-03-20 15:24:06.000000000 +0000 @@ -1,6 +1,6 @@ { "id" : "org.albert.extension.mpris", - "name" : "MPRIS Control Center", + "name" : "MPRIS Control", "version" : "1.0", "platform" : "Linux", "group" : "Extensions", diff -Nru albert-0.10.0/src/plugins/mpris/src/command.cpp albert-0.10.1/src/plugins/mpris/src/command.cpp --- albert-0.10.0/src/plugins/mpris/src/command.cpp 2017-03-19 22:45:57.000000000 +0000 +++ albert-0.10.1/src/plugins/mpris/src/command.cpp 2017-03-20 15:24:06.000000000 +0000 @@ -23,8 +23,7 @@ /** ***************************************************************************/ MPRIS::Command::Command(const QString &label, const QString &title, const QString &subtext, const QString &method, QString iconpath) - : label_(label), title_(title), subtext_(subtext), method_(method), iconpath_(iconpath), closeOnEnter_(false) { -// fireCallback([](){}); + : label_(label), title_(title), subtext_(subtext), method_(method), iconpath_(iconpath) { } @@ -49,49 +48,10 @@ /** ***************************************************************************/ -MPRIS::Command &MPRIS::Command::closeWhenHit() { - closeOnEnter_ = true; - return *this; -} - - - -/** ***************************************************************************/ -/*Command &MPRIS::Command::fireCallback(function clbk) { - fireCallback_ = std::move(clbk); - return *this; -}*/ - - - -/** ***************************************************************************/ -bool MPRIS::Command::closesWhenHit() { - return closeOnEnter_; -} - - - -/** ***************************************************************************/ SharedItem MPRIS::Command::produceAlbertItem(Player &player) const { QDBusMessage msg = QDBusMessage::createMethodCall(player.getBusId(), "/org/mpris/MediaPlayer2", "org.mpris.MediaPlayer2.Player", method_); - //std::shared_ptr ptr = std::make_shared(player, title_, iconpath_, msg, closeOnEnter_); - SharedItem ptr(new MPRIS::Item(player, title_, subtext_, iconpath_, msg, closeOnEnter_)); + SharedItem ptr(new MPRIS::Item(player, title_, subtext_, iconpath_, msg)); return ptr; - -/* - // Create a StandardItem instance for this command on the given player - std::shared_ptr ptr = std::make_shared(); - ptr->setIcon(iconpath_); - ptr->setSubtext(player.getName()); - ptr->setText(title_); - QDBusMessage msg = QDBusMessage::createMethodCall(player.getBusId(), "/org/mpris/MediaPlayer2", "org.mpris.MediaPlayer2.Player", method_); - ptr->setAction([msg, this](){ - QDBusConnection::sessionBus().send(msg); - if (closeOnEnter_) - qApp->hideWidget(); - //fireCallback_(); - }); - return ptr;*/ } diff -Nru albert-0.10.0/src/plugins/mpris/src/command.h albert-0.10.1/src/plugins/mpris/src/command.h --- albert-0.10.0/src/plugins/mpris/src/command.h 2017-03-19 22:45:57.000000000 +0000 +++ albert-0.10.1/src/plugins/mpris/src/command.h 2017-03-20 15:24:06.000000000 +0000 @@ -55,20 +55,6 @@ Command& applicableWhen(const char *path, const char* property, const QVariant expectedValue, bool positivity); /** - * @brief closeWhenHit Configure this command to close the albert widget when activated. - * @return Returns itseft, but now configured to close albert. - */ - Command& closeWhenHit(); - - //Command& fireCallback(function); - - /** - * @brief closesWhenHit Queries if the application should hide if the item was activated. - * @return True if so, false otherwise. - */ - bool closesWhenHit(); - - /** * @brief produceStandardItem Produces an instance of AlbertItem for this command to invoke on a given Player. * @return Returns a shared_ptr on this AlbertItem. */ @@ -87,8 +73,6 @@ QString property_; QVariant expectedValue_; bool positivity_; - bool closeOnEnter_; - //function fireCallback_; }; } // namespace MPRIS diff -Nru albert-0.10.0/src/plugins/mpris/src/item.cpp albert-0.10.1/src/plugins/mpris/src/item.cpp --- albert-0.10.0/src/plugins/mpris/src/item.cpp 2017-03-19 22:45:57.000000000 +0000 +++ albert-0.10.1/src/plugins/mpris/src/item.cpp 2017-03-20 15:24:06.000000000 +0000 @@ -21,8 +21,8 @@ /** ***************************************************************************/ -MPRIS::Item::Item(Player &p, const QString &title, const QString &subtext, const QString &iconPath, const QDBusMessage &msg, bool hideAfter) - : player_(p), iconPath_(iconPath), message_(msg), hideAfter_(hideAfter) { +MPRIS::Item::Item(Player &p, const QString &title, const QString &subtext, const QString &iconPath, const QDBusMessage &msg) + : iconPath_(iconPath), message_(msg) { if (title.contains("%1")) text_ = title.arg(p.getName()); else diff -Nru albert-0.10.0/src/plugins/mpris/src/item.h albert-0.10.1/src/plugins/mpris/src/item.h --- albert-0.10.0/src/plugins/mpris/src/item.h 2017-03-19 22:45:57.000000000 +0000 +++ albert-0.10.1/src/plugins/mpris/src/item.h 2017-03-20 15:24:06.000000000 +0000 @@ -28,7 +28,7 @@ class Item final : public Core::Item { public: - Item(Player& p, const QString& title, const QString& subtext, const QString& iconPath, const QDBusMessage& msg, bool hideAfter); + Item(Player &p, const QString& title, const QString& subtext, const QString& iconPath, const QDBusMessage& msg); ~Item(); QString id() const override { return id_; } @@ -38,13 +38,11 @@ vector> actions() override; private: - Player& player_; QString id_; QString text_; QString subtext_; QString iconPath_; QDBusMessage message_; vector> actions_; - bool hideAfter_; }; } diff -Nru albert-0.10.0/src/plugins/mpris/src/main.cpp albert-0.10.1/src/plugins/mpris/src/main.cpp --- albert-0.10.0/src/plugins/mpris/src/main.cpp 2017-03-19 22:45:57.000000000 +0000 +++ albert-0.10.1/src/plugins/mpris/src/main.cpp 2017-03-20 15:24:06.000000000 +0000 @@ -37,7 +37,7 @@ } - const char* name = "MPRIS Control Center"; + const char* name = "MPRIS Control"; static QDBusMessage findPlayerMsg; QPointer widget; QList mediaPlayers; @@ -63,7 +63,7 @@ QString icon; // Setup the DBus commands - icon = themeOr("media-playback-start", ":play"); //iconlookup->themeIconPath("media-playback-start", iconThemeName); + icon = themeOr("media-playback-start", ":play"); Command* nextToAdd = new Command( "play", // Label "Start playing", // Title @@ -72,11 +72,10 @@ icon ); nextToAdd->applicableWhen("/org/mpris/MediaPlayer2", "org.mpris.MediaPlayer2.Player.PlaybackStatus", "Playing", false); - nextToAdd->closesWhenHit(); d->commands.append("play"); d->commandObjects.insert("play", *nextToAdd); - icon = themeOr("media-playback-pause", ":pause"); //iconlookup->themeIconPath("media-playback-pause", iconThemeName) + icon = themeOr("media-playback-pause", ":pause"); nextToAdd = new Command( "pause", "Pause", @@ -85,11 +84,10 @@ icon ); nextToAdd->applicableWhen("/org/mpris/MediaPlayer2", "org.mpris.MediaPlayer2.Player.PlaybackStatus", "Playing", true); - nextToAdd->closeWhenHit(); d->commands.append("pause"); d->commandObjects.insert("pause", *nextToAdd); - icon = themeOr("media-playback-stop", ":stop"); // iconlookup->themeIconPath("media-playback-stop", iconThemeName)); + icon = themeOr("media-playback-stop", ":stop"); nextToAdd = new Command( "stop", "Stop playing", @@ -98,11 +96,10 @@ icon ); nextToAdd->applicableWhen("/org/mpris/MediaPlayer2", "org.mpris.MediaPlayer2.Player.PlaybackStatus", "Playing", true); - nextToAdd->closeWhenHit(); d->commands.append("stop"); d->commandObjects.insert("stop", *nextToAdd); - icon = themeOr("media-skip-forward", ":next"); // iconlookup->themeIconPath("media-skip-forward", iconThemeName) + icon = themeOr("media-skip-forward", ":next"); nextToAdd = new Command( "next", "Next track", @@ -115,7 +112,7 @@ d->commands.append("next"); d->commandObjects.insert("next", *nextToAdd); - icon = themeOr("media-skip-backward", ":prev"); // iconlookup->themeIconPath("media-skip-backward", iconThemeName) + icon = themeOr("media-skip-backward", ":prev"); nextToAdd = new Command( "previous", "Previous track", @@ -209,7 +206,7 @@ if (d->mediaPlayers.isEmpty()) return; - const QString& q = query->searchTerm(); + const QString& q = query->searchTerm().toLower(); // Filter applicable commands QStringList cmds; diff -Nru albert-0.10.0/src/plugins/ssh/CMakeLists.txt albert-0.10.1/src/plugins/ssh/CMakeLists.txt --- albert-0.10.0/src/plugins/ssh/CMakeLists.txt 2017-03-19 22:45:57.000000000 +0000 +++ albert-0.10.1/src/plugins/ssh/CMakeLists.txt 2017-03-20 15:24:06.000000000 +0000 @@ -4,8 +4,6 @@ FILE(GLOB_RECURSE SRC src/* metadata.json) -find_package(Qt5Widgets 5.2 REQUIRED) - find_package(Qt5 5.2.0 REQUIRED COMPONENTS Widgets ) diff -Nru albert-0.10.0/src/plugins/ssh/src/main.cpp albert-0.10.1/src/plugins/ssh/src/main.cpp --- albert-0.10.0/src/plugins/ssh/src/main.cpp 2017-03-19 22:45:57.000000000 +0000 +++ albert-0.10.1/src/plugins/ssh/src/main.cpp 2017-03-20 15:24:06.000000000 +0000 @@ -177,6 +177,7 @@ std::shared_ptr item = std::make_shared(""); item->setText(queryTerms[1]); item->setSubtext(QString("Connect to '%1' using ssh").arg(queryTerms[1])); + item->setCompletionString(QString("ssh %1").arg(queryTerms[1])); item->setIconPath(d->icon); shared_ptr action = std::make_shared(); @@ -219,6 +220,7 @@ std::shared_ptr si = std::make_shared(host); si->setText(host); si->setSubtext(QString("Connect to '%1' using ssh").arg(host)); + si->setCompletionString(QString("ssh %1").arg(host)); si->setIconPath(d->icon); shared_ptr sa = std::make_shared(); diff -Nru albert-0.10.0/src/plugins/templateExtension/CMakeLists.txt albert-0.10.1/src/plugins/templateExtension/CMakeLists.txt --- albert-0.10.0/src/plugins/templateExtension/CMakeLists.txt 2017-03-19 22:45:57.000000000 +0000 +++ albert-0.10.1/src/plugins/templateExtension/CMakeLists.txt 2017-03-20 15:24:06.000000000 +0000 @@ -4,7 +4,9 @@ FILE(GLOB_RECURSE SRC src/* metadata.json) -find_package(Qt5Widgets 5.2 REQUIRED) +find_package(Qt5 5.2.0 REQUIRED COMPONENTS + Widgets +) set(LIB ${Qt5Widgets_LIBRARIES} diff -Nru albert-0.10.0/src/plugins/terminal/src/main.cpp albert-0.10.1/src/plugins/terminal/src/main.cpp --- albert-0.10.0/src/plugins/terminal/src/main.cpp 2017-03-19 22:45:57.000000000 +0000 +++ albert-0.10.1/src/plugins/terminal/src/main.cpp 2017-03-20 15:24:06.000000000 +0000 @@ -150,6 +150,7 @@ std::shared_ptr item = std::make_shared(program); item->setText(commandlineString); item->setSubtext(QString("Run '%1'").arg(commandlineString)); + item->setCompletionString(QString(">%1").arg(commandlineString)); item->setIconPath(d->iconPath); item->setActions(std::move(actions)); diff -Nru albert-0.10.0/src/plugins/virtualbox/CMakeLists.txt albert-0.10.1/src/plugins/virtualbox/CMakeLists.txt --- albert-0.10.0/src/plugins/virtualbox/CMakeLists.txt 2017-03-19 22:45:57.000000000 +0000 +++ albert-0.10.1/src/plugins/virtualbox/CMakeLists.txt 2017-03-20 15:24:06.000000000 +0000 @@ -2,13 +2,11 @@ PROJECT(virtualbox) -find_package(Qt5Widgets 5.2 REQUIRED) -find_package(Qt5Xml 5.2 REQUIRED) - FILE(GLOB_RECURSE SRC src/* metadata.json) find_package(Qt5 5.2.0 REQUIRED COMPONENTS Widgets + Xml ) qt5_add_resources(QRC