mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-03 13:38:52 +02:00
* Show qutIM icon in notifications * Directory structure adjusted * Add resource file * Add libqca to requires TODO: fix icon loading and empty settings window...
100 lines
2.9 KiB
Plaintext
100 lines
2.9 KiB
Plaintext
From bb855e1ee635a190b919da43993901f8d6108309 Mon Sep 17 00:00:00 2001
|
|
From: Sergei Reznikov <diver@gelios.net>
|
|
Date: Mon, 31 Aug 2015 14:18:34 +0300
|
|
Subject: Haiku: disable adding an icon to a binary
|
|
|
|
Build fails with this rule if QUTIM_BINARY_DIR is defined with this error:
|
|
Error: Failed to open input file
|
|
"/packages/qutim_x86-0.3.3-1/.self/apps/qutIM/qutim.rsrc": No such file or directory
|
|
|
|
diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt
|
|
index 237d407..dde5eb5 100644
|
|
--- a/core/CMakeLists.txt
|
|
+++ b/core/CMakeLists.txt
|
|
@@ -334,28 +334,6 @@ IF(APPLE AND QUTIM_BUNDLE_LOCATION)
|
|
|
|
ENDIF(APPLE AND QUTIM_BUNDLE_LOCATION)
|
|
|
|
-if(HAIKU)
|
|
- find_program( HAIKU_RC_COMPILER xres )
|
|
- if( NOT HAIKU_RC_COMPILER )
|
|
- message("No RC compiler (Haiku's xres) found.")
|
|
- return()
|
|
- endif()
|
|
-
|
|
- find_program( HAIKU_MIMESET mimeset )
|
|
- if( NOT HAIKU_MIMESET )
|
|
- message("Haiku's mimeset is not found.")
|
|
- return()
|
|
- endif()
|
|
-
|
|
- add_custom_command(TARGET qutim POST_BUILD
|
|
- COMMAND ${HAIKU_RC_COMPILER} ARGS
|
|
- "-o" ${QUTIM_BINARY_DIR}/qutim
|
|
- ${QUTIM_BINARY_DIR}/qutim.rsrc
|
|
- COMMAND ${HAIKU_MIMESET} ARGS
|
|
- "-f" ${QUTIM_BINARY_DIR}/qutim
|
|
- )
|
|
-endif(HAIKU)
|
|
-
|
|
if(LANGUAGE)
|
|
LANGUAGE_UPDATE( core ${LANGUAGE} "${CMAKE_CURRENT_SOURCE_DIR}" )
|
|
endif( LANGUAGE )
|
|
--
|
|
2.2.2
|
|
|
|
|
|
From 01a16aeb9e8e69b5640d7e3695483c6f6a59a34d Mon Sep 17 00:00:00 2001
|
|
From: Sergei Reznikov <diver@gelios.net>
|
|
Date: Wed, 2 Sep 2015 19:17:52 +0300
|
|
Subject: haikunotifications: show icon from the binary
|
|
|
|
|
|
diff --git a/plugins/haikunotifications/src/haikunotificationsbackend.cpp b/plugins/haikunotifications/src/haikunotificationsbackend.cpp
|
|
index f6a570d..4d28b77 100644
|
|
--- a/plugins/haikunotifications/src/haikunotificationsbackend.cpp
|
|
+++ b/plugins/haikunotifications/src/haikunotificationsbackend.cpp
|
|
@@ -31,10 +31,12 @@
|
|
#include <QTextDocument>
|
|
|
|
#ifdef Q_OS_HAIKU
|
|
+#include <Application.h>
|
|
#include <Roster.h>
|
|
#include <Notification.h>
|
|
#include <String.h>
|
|
#include <Bitmap.h>
|
|
+#include <IconUtils.h>
|
|
#endif
|
|
|
|
using namespace qutim_sdk_0_3;
|
|
@@ -48,7 +50,7 @@ HaikuNotificationsBackend::HaikuNotificationsBackend() :
|
|
|
|
|
|
void HaikuNotificationsBackend::handleNotification(qutim_sdk_0_3::Notification *notification)
|
|
-{
|
|
+{
|
|
//ref(notification);
|
|
NotificationRequest request = notification->request();
|
|
QString text = request.text();
|
|
@@ -56,10 +58,13 @@ void HaikuNotificationsBackend::handleNotification(qutim_sdk_0_3::Notification *
|
|
BNotification notify(B_INFORMATION_NOTIFICATION);
|
|
notify.SetTitle(static_cast<BString>(request.title().toLocal8Bit()));
|
|
notify.SetContent(static_cast<BString>(text.toLocal8Bit()));
|
|
- if(!request.image().isNull()) {
|
|
- BBitmap *bitmap = request.image().toHaikuBitmap();
|
|
- notify.SetIcon(bitmap);
|
|
- }
|
|
+
|
|
+ app_info info;
|
|
+ be_app->GetAppInfo(&info);
|
|
+ BBitmap icon(BRect(0, 0, 32, 32), B_RGBA32);
|
|
+ BNode node(&info.ref);
|
|
+ BIconUtils::GetVectorIcon(&node, "BEOS:ICON", &icon);
|
|
+ notify.SetIcon(&icon);
|
|
|
|
notify.Send();
|
|
}
|
|
--
|
|
2.2.2
|
|
|