From de09ff9ad699fba34a755eda358fc1007633cd9b Mon Sep 17 00:00:00 2001 From: Jaidyn Ann Date: Tue, 22 Jun 2021 01:06:00 -0500 Subject: [PATCH] Rename Caya to Cardie --- Makefile | 4 ++-- README.md | 8 ++++---- application/{Caya.h => Cardie.h} | 3 ++- application/{Caya.rdef => Cardie.rdef} | 6 +++--- application/Makefile | 6 +++--- application/Server.cpp | 7 ++++--- application/TheApp.cpp | 10 ++++++---- application/Utils.cpp | 5 +++-- application/preferences/AppPreferences.cpp | 3 ++- application/views/ConversationView.cpp | 3 ++- application/views/ReplicantStatusView.cpp | 2 +- application/views/RosterView.cpp | 3 ++- application/windows/MainWindow.cpp | 7 ++++--- 13 files changed, 38 insertions(+), 29 deletions(-) rename application/{Caya.h => Cardie.h} (69%) rename application/{Caya.rdef => Cardie.rdef} (60%) diff --git a/Makefile b/Makefile index 252c3b3..52efdff 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ .DEFAULT_GOAL := default -caya: +app: $(MAKE) -f application/Makefile protocols: @@ -11,7 +11,7 @@ libs: clean: $(MAKE) -f application/Makefile clean -all: libs protocols caya +all: libs protocols app .PHONY: libs protocols diff --git a/README.md b/README.md index 39ab4bb..f43bc93 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# ![Icon](data/icons/Caya.png) Caya +# Cardie ![GSoC 2021](https://img.shields.io/badge/GSoC-2021-green.svg) A multi-protocol chat program. @@ -6,13 +6,13 @@ A multi-protocol chat program. ![Screenshot](data/screenshots/update-1.png) ## Building -You can make Caya and its protocols with: +You can make Cardie and its protocols with: `$ make` -Caya itself requires the `expat_devel` package, the XMPP protocol requires +Cardie itself requires the `expat_devel` package, the XMPP protocol requires `gloox_devel`, and the (provisional) IRC protocol requires `libircclient_devel`. You can also build either independent of the other: -`$ make caya; make libs; make protocols; make -f protocols/xmpp/Makefile` +`$ make caya; make libs; make protocols` diff --git a/application/Caya.h b/application/Cardie.h similarity index 69% rename from application/Caya.h rename to application/Cardie.h index 2554b4f..5d7750f 100644 --- a/application/Caya.h +++ b/application/Cardie.h @@ -5,6 +5,7 @@ #ifndef _APP_H #define _APP_H -#define APP_SIGNATURE "application/x-vnd.caya.Caya" +#define APP_SIGNATURE "application/x-vnd.cardie" +#define APP_NAME "Cardie" #endif // _APP_H diff --git a/application/Caya.rdef b/application/Cardie.rdef similarity index 60% rename from application/Caya.rdef rename to application/Cardie.rdef index 4e866cd..dedde94 100644 --- a/application/Caya.rdef +++ b/application/Cardie.rdef @@ -1,4 +1,4 @@ -#include "Caya.h" +#include "Cardie.h" resource app_signature APP_SIGNATURE; @@ -10,8 +10,8 @@ resource app_version { variety = B_APPV_ALPHA, internal = 0, - short_info = "Caya", - long_info = "©2009-2015 Andrea Anzani, Pier Luigi Fiorini, Dario Casalinuovo" + short_info = APP_NAME, + long_info = "©2009-2021 Andrea Anzani, Pier Luigi Fiorini, Dario Casalinuovo, Jaidyn Levesque" }; resource app_flags B_SINGLE_LAUNCH; diff --git a/application/Makefile b/application/Makefile index 9e219ed..2c14952 100644 --- a/application/Makefile +++ b/application/Makefile @@ -8,7 +8,7 @@ ## file:///system/develop/documentation/makefile-engine.html # The name of the binary. -NAME = Caya +NAME = Cardie # The type of binary, must be one of: # APP: Application @@ -18,7 +18,7 @@ NAME = Caya TYPE = APP # If you plan to use localization, specify the application's MIME signature. -APP_MIME_SIG = application/x-vnd.caya.Caya +APP_MIME_SIG = application/x-vnd.cardie # The following lines tell Pe and Eddie where the SRCS, RDEFS, and RSRCS are # so that Pe and Eddie can fill them in for you. @@ -87,7 +87,7 @@ SRCS = \ # Specify the resource definition files to use. Full or relative paths can be # used. -RDEFS = Caya.rdef \ +RDEFS = Cardie.rdef \ data/icons/status/Away.rdef \ data/icons/status/Busy.rdef \ data/icons/status/Offline.rdef \ diff --git a/application/Server.cpp b/application/Server.cpp index 5e7b07e..b329038 100644 --- a/application/Server.cpp +++ b/application/Server.cpp @@ -26,6 +26,7 @@ #include "Account.h" #include "AccountManager.h" #include "AppMessages.h" +#include "Cardie.h" #include "ChatProtocol.h" #include "AppPreferences.h" #include "ChatProtocolMessages.h" @@ -505,7 +506,7 @@ Server::ImMessage(BMessage* msg) = ProtocolManager::Get()->ProtocolAddOn(protocol); BNotification notification(B_PROGRESS_NOTIFICATION); - notification.SetGroup(BString("Caya")); + notification.SetGroup(BString(APP_NAME)); notification.SetTitle(title); notification.SetIcon(addOn->ProtoIcon()); notification.SetContent(message); @@ -537,7 +538,7 @@ Server::ImMessage(BMessage* msg) = ProtocolManager::Get()->ProtocolAddOn(protocol); BNotification notification((notification_type)type); - notification.SetGroup(BString("Caya")); + notification.SetGroup(BString(APP_NAME)); notification.SetTitle(title); notification.SetIcon(addOn->ProtoIcon()); notification.SetContent(message); @@ -557,7 +558,7 @@ Server::ImMessage(BMessage* msg) content.ReplaceAll("%user%", looper->Protocol()->GetName()); BNotification notification(B_INFORMATION_NOTIFICATION); - notification.SetGroup(BString("Caya")); + notification.SetGroup(BString(APP_NAME)); notification.SetTitle("Connected"); notification.SetContent(content); notification.SetIcon(proto->Icon()); diff --git a/application/TheApp.cpp b/application/TheApp.cpp index 746a490..7c2bc63 100644 --- a/application/TheApp.cpp +++ b/application/TheApp.cpp @@ -19,7 +19,7 @@ #include #include "AboutWindow.h" -#include "Caya.h" +#include "Cardie.h" #include "AppMessages.h" #include "FilePanel.h" #include "MainWindow.h" @@ -93,6 +93,7 @@ TheApp::AboutRequested() "2009-2010 Andrea Anzani", "2010-2015 Dario Casalinuovo", "2009-2010 Pier Luigi Fiorini", + "2021 Jaidyn Levesque", NULL }; @@ -105,11 +106,12 @@ TheApp::AboutRequested() }; BString extraInfo; - extraInfo << "Caya is released under the GNU GPL License." << "\n"; - extraInfo << "Some parts of Caya are available under MIT license." << "\n"; + extraInfo << "%app% is released under the GNU GPL License." << "\n"; + extraInfo << "Some parts of %app% are available under MIT license." << "\n"; extraInfo << "Built: " << BUILD_DATE; + extraInfo.ReplaceAll("%app%", APP_NAME); - AboutWindow* about = new AboutWindow("Caya", holders, + AboutWindow* about = new AboutWindow(APP_NAME, holders, authors, extraInfo.String()); about->Show(); delete about; diff --git a/application/Utils.cpp b/application/Utils.cpp index 9e410d8..f523ee9 100644 --- a/application/Utils.cpp +++ b/application/Utils.cpp @@ -18,6 +18,7 @@ #include +#include "Cardie.h" #include "Utils.h" @@ -117,7 +118,7 @@ AccountsPath() if (find_directory(B_USER_SETTINGS_DIRECTORY, &path) != B_OK) return NULL; - path.Append("Caya/Protocols"); + path.Append(APP_NAME "/Protocols"); if (create_directory(path.Path(), 0755) != B_OK) return NULL; @@ -166,7 +167,7 @@ CachePath() BPath path; if (find_directory(B_USER_SETTINGS_DIRECTORY, &path) != B_OK) return NULL; - path.Append("Caya/Cache"); + path.Append(APP_NAME "/Cache"); if (create_directory(path.Path(), 0755) != B_OK) return NULL; return path.Path(); diff --git a/application/preferences/AppPreferences.cpp b/application/preferences/AppPreferences.cpp index 0352bae..2069245 100644 --- a/application/preferences/AppPreferences.cpp +++ b/application/preferences/AppPreferences.cpp @@ -3,11 +3,12 @@ * Distributed under the terms of the MIT License. */ #include "AppPreferences.h" +#include "Cardie.h" #include #include -template<> const char* AppPreferences::fFolder = "Caya"; +template<> const char* AppPreferences::fFolder = APP_NAME; template<> const char* AppPreferences::fFilename = "preferences"; /* TODO update _Add* methods to diff --git a/application/views/ConversationView.cpp b/application/views/ConversationView.cpp index cb6b363..57258e7 100644 --- a/application/views/ConversationView.cpp +++ b/application/views/ConversationView.cpp @@ -21,6 +21,7 @@ #include "AppMessages.h" #include "AppPreferences.h" +#include "Cardie.h" #include "ChatProtocolMessages.h" #include "RenderView.h" #include "Conversation.h" @@ -138,7 +139,7 @@ ConversationView::ImMessage(BMessage* msg) notify_message << sender->GetName(); BNotification notification(B_INFORMATION_NOTIFICATION); - notification.SetGroup(BString("Caya")); + notification.SetGroup(BString(APP_NAME)); notification.SetTitle(BString("New message")); notification.SetIcon(sender->AvatarBitmap()); notification.SetContent(notify_message); diff --git a/application/views/ReplicantStatusView.cpp b/application/views/ReplicantStatusView.cpp index cb2158d..f5a402a 100644 --- a/application/views/ReplicantStatusView.cpp +++ b/application/views/ReplicantStatusView.cpp @@ -27,7 +27,7 @@ #include #include "AccountManager.h" -#include "Caya.h" +#include "Cardie.h" #include "AppMessages.h" #include "AppPreferences.h" #include "ChatProtocolMessages.h" diff --git a/application/views/RosterView.cpp b/application/views/RosterView.cpp index fb9957b..fee50c5 100644 --- a/application/views/RosterView.cpp +++ b/application/views/RosterView.cpp @@ -18,6 +18,7 @@ #include "AppMessages.h" #include "AppPreferences.h" +#include "Cardie.h" #include "ChatProtocolMessages.h" #include "RosterItem.h" #include "RosterListView.h" @@ -149,7 +150,7 @@ RosterView::ImMessage(BMessage* msg) message << " is offline!"; BNotification notification(B_INFORMATION_NOTIFICATION); - notification.SetGroup(BString("Caya")); + notification.SetGroup(BString(APP_NAME)); notification.SetTitle(BString("Presence")); notification.SetIcon(rosterItem->Bitmap()); notification.SetContent(message); diff --git a/application/windows/MainWindow.cpp b/application/windows/MainWindow.cpp index 3c78a8a..fe6f3a5 100644 --- a/application/windows/MainWindow.cpp +++ b/application/windows/MainWindow.cpp @@ -20,6 +20,7 @@ #include "AccountManager.h" #include "AppMessages.h" #include "AppPreferences.h" +#include "Cardie.h" #include "ChatProtocolMessages.h" #include "ConversationItem.h" #include "ConversationListView.h" @@ -42,7 +43,7 @@ const uint32 kLogin = 'LOGI'; MainWindow::MainWindow() : - BWindow(BRect(0, 0, 600, 400), "Caya", B_TITLED_WINDOW, 0), + BWindow(BRect(0, 0, 600, 400), APP_NAME, B_TITLED_WINDOW, 0), fWorkspaceChanged(false), fConversation(NULL), fRosterWindow(NULL), @@ -353,11 +354,11 @@ MainWindow::SetConversation(Conversation* chat) fConversation = chat; BString title(chat->GetName()); - title << " ― Caya"; + title << " ― " << APP_NAME; SetTitle(title.String()); } else - SetTitle("Caya"); + SetTitle(APP_NAME); fRightView->AddChild(fChatView, 9); fRightView->AddChild(fSendScroll, 1);