From 5544769e7d9dd8b59f114b2d5f84946cf08f0886 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Fri, 3 Apr 2009 17:52:49 +0000 Subject: [PATCH] * Forgot to update the Canna directory. * This fixes bug #3660. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29881 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../methods/canna/CannaLooper.cpp | 43 ++++++++++++------- 1 file changed, 27 insertions(+), 16 deletions(-) diff --git a/src/add-ons/input_server/methods/canna/CannaLooper.cpp b/src/add-ons/input_server/methods/canna/CannaLooper.cpp index 8bf1b3d780..66fc573901 100644 --- a/src/add-ons/input_server/methods/canna/CannaLooper.cpp +++ b/src/add-ons/input_server/methods/canna/CannaLooper.cpp @@ -10,15 +10,17 @@ #include +#include +#include #include -#include #include #include -#include #include +#include +#include #ifdef DEBUG -#include +# include #endif #include "CannaCommon.h" @@ -27,8 +29,9 @@ #include "KouhoWindow.h" #include "PaletteWindow.h" -CannaLooper::CannaLooper( CannaMethod *method ) - :BLooper( "Canna Looper" ) + +CannaLooper::CannaLooper(CannaMethod* method) + : BLooper("Canna Looper") { owner = method; canna = 0; @@ -109,23 +112,31 @@ CannaLooper::Quit() BLooper::Quit(); } + status_t -CannaLooper::ReadSettings( char *basepath ) +CannaLooper::ReadSettings(char* basePath) { -#ifndef __HAIKU__ - strcpy( basepath, "/boot/home/config/KanBe/" ); -#else - strcpy( basepath, "/etc/KanBe/" ); -#endif + BPath path; + status_t status = find_directory(B_SYSTEM_DATA_DIRECTORY, &path); + if (status != B_OK) + return status; + + path.Append("KanBe"); + + strcpy(basePath, path.Path()); + font_family family; font_style style; - strcpy( family, "Haru" ); - strcpy( style, "Regular" ); - kouhoFont.SetFamilyAndStyle( family, style ); - kouhoFont.SetSize( 12 ); - return B_NO_ERROR; + strcpy(family, "Haru"); + strcpy(style, "Regular"); + + kouhoFont.SetFamilyAndStyle(family, style); + kouhoFont.SetSize(12); + + return B_OK; } + void CannaLooper::EnqueueMessage( BMessage *msg ) {