[haiku-commits] BRANCH jessicah-github.synergy [542fbda] src/add-ons/input_server/devices/synergy

  • From: jessicah-github.synergy <community@xxxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 30 Sep 2014 10:01:32 +0200 (CEST)

added 1 changeset to branch 'refs/remotes/jessicah-github/synergy'
old head: da8df3e20a3ffa7cb299848184a840fdfe1908db
new head: 542fbdab8ea73fe62596c3d3e6393c2e20ccacb1
overview: https://github.com/jessicah/haiku/compare/da8df3e...542fbda

----------------------------------------------------------------------------

542fbda: synergy: fix use of server settings; add icon for notifications

                         [ Jessica Hamilton <jessica.l.hamilton@xxxxxxxxx> ]

----------------------------------------------------------------------------

Commit:      542fbdab8ea73fe62596c3d3e6393c2e20ccacb1
Author:      Jessica Hamilton <jessica.l.hamilton@xxxxxxxxx>
Date:        Tue Sep 30 07:48:10 2014 UTC

----------------------------------------------------------------------------

2 files changed, 13 insertions(+), 6 deletions(-)
src/add-ons/input_server/devices/synergy/Jamfile      |  4 ++--
.../input_server/devices/synergy/haiku-usynergy.cpp   | 15 +++++++++++----

----------------------------------------------------------------------------

diff --git a/src/add-ons/input_server/devices/synergy/Jamfile 
b/src/add-ons/input_server/devices/synergy/Jamfile
index 3241790..d4e24de 100644
--- a/src/add-ons/input_server/devices/synergy/Jamfile
+++ b/src/add-ons/input_server/devices/synergy/Jamfile
@@ -4,7 +4,7 @@ SetSubDirSupportedPlatformsBeOSCompatible ;
 
 SubDirHdrs $(HAIKU_TOP) src add-ons kernel bus_managers ps2 ;
 
-UsePrivateHeaders input interface network shared storage ;
+UsePrivateHeaders input interface network shared storage translation ;
 UsePrivateSystemHeaders ;
 
 Addon <input>synergy :
@@ -12,4 +12,4 @@ Addon <input>synergy :
        haiku-usynergy.cpp
        Keymap.cpp
 
-       : input_server be libshared.a network [ TargetLibsupc++ ] ;
+       : input_server be libshared.a network translation [ TargetLibsupc++ ] ;
diff --git a/src/add-ons/input_server/devices/synergy/haiku-usynergy.cpp 
b/src/add-ons/input_server/devices/synergy/haiku-usynergy.cpp
index 050ddb1..4f7ad18 100644
--- a/src/add-ons/input_server/devices/synergy/haiku-usynergy.cpp
+++ b/src/add-ons/input_server/devices/synergy/haiku-usynergy.cpp
@@ -3,13 +3,15 @@
 #include <Autolock.h>
 #include <Clipboard.h>
 #include <FindDirectory.h>
+#include <Mime.h>
 #include <NodeMonitor.h>
 #include <Notification.h>
-#include <Screen.h>
 #include <OS.h>
 #include <Path.h>
 #include <PathFinder.h>
 #include <PathMonitor.h>
+#include <Screen.h>
+#include <TranslationUtils.h>
 
 #include <cstdlib>
 #include <strings.h>
@@ -320,7 +322,7 @@ uSynergyConnectHaiku(uSynergyCookie cookie)
 
        server.sin_family = AF_INET;
        server.sin_port = htons(24800);
-       inet_aton("10.20.30.18", &server.sin_addr);
+       inet_aton(inputDevice->fServerAddress, &server.sin_addr);
 
        inputDevice->synergyServerSocket = socket(PF_INET, SOCK_STREAM, 0);
 
@@ -380,12 +382,17 @@ void
 uSynergyTraceHaiku(uSynergyCookie cookie, const char *text)
 {
        BNotification *notify = new BNotification(B_INFORMATION_NOTIFICATION);
-       BString group("uSynergy");
+       BString group("Synergy");
        BString content(text);
 
        notify->SetGroup(group);
        notify->SetContent(content);
-       notify->Send(2000000);
+       BBitmap* bitmap = 
BTranslationUtils::GetBitmap("/boot/home/config/non-packaged/data/synergy-32.png");
+       if (bitmap != NULL)
+               notify->SetIcon(bitmap);
+       else
+               TRACE("synergy: couldn't load bitmap\n");
+       notify->Send();
 }
 
 void


Other related posts: