Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace BeIDE with Paladin if compiling on Haiku. #90

Merged
merged 1 commit into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Resources/Dialog-Preferences.r
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,14 @@ resource 'DLOG' (132, "Preferences") {
TabSheetEnd { },

TabSheet { "Connections", "Options that control the connections to other programs" },
#ifdef __BEOS__
CheckBox {{ 0, 0, 200, 16 }, pnm_Con_X_ShowBeIdeMenu, "Show Metrowerks BeIDE menu" },
CheckBox {{ 0, 20, 200, 36 }, pnm_Con_X_LoadBeIdeExt, "Load Metrowerks BeIDE extensions" },
CheckBox {{ 0, 50, 200, 66 }, pnm_Con_X_PassiveFtp, "Use passive FTP by default" },
#else
CheckBox {{ 0, 0, 200, 16 }, pnm_Con_X_ShowBeIdeMenu, "Show Paladin IDE menu" },
CheckBox {{ 0, 30, 200, 46 }, pnm_Con_X_PassiveFtp, "Use passive FTP by default" },
#endif
TabSheetEnd { },

TabSheet { "Differences", "Options that control the 'Find differences' command" },
Expand Down
2 changes: 1 addition & 1 deletion Sources/CMenuItem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ CMenuItem::CMenuItem(BMenu *subMenu)
{
sfBitmap = new BBitmap(BRect(0, 0, 15, 15), B_COLOR_8_BIT);

BMimeType mime("application/x-mw-BeIDE");
BMimeType mime(PE_DEFAULT_IDE_APPSIG);
mime.GetIcon(sfBitmap, B_MINI_ICON);
}
} /* CMenuItem::CMenuItem */
Expand Down
11 changes: 6 additions & 5 deletions Sources/PDoc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ void PDoc::InitWindow(const char *name)
// add the BeIDE menu, if desired
if (showIde)
{
BMimeType mime("application/x-mw-BeIDE");
BMimeType mime(PE_DEFAULT_IDE_APPSIG);
if (mime.IsInstalled())
{
BMenu *menu = HResources::GetMenu(rid_Menu_DwBeide);
Expand Down Expand Up @@ -1886,8 +1886,9 @@ void PDoc::ShowRecentMenu(BPoint where, bool showalways)
void PDoc::IDEBringToFront()
{
entry_ref ide;
if (be_roster->FindApp("application/x-mw-BeIDE", &ide))
THROW(("BeIDE was not found"));

if (be_roster->FindApp(PE_DEFAULT_IDE_APPSIG, &ide))
THROW((PE_DEFAULT_IDE_NAME " was not found"));

if (be_roster->IsRunning(&ide))
be_roster->ActivateApp(be_roster->TeamFor(&ide));
Expand Down Expand Up @@ -1944,8 +1945,8 @@ void PDoc::IDEMake()
msg.AddData("target", PROPERTY_TYPE, &item, sizeof(item));

entry_ref ide;
if (be_roster->FindApp("application/x-mw-BeIDE", &ide))
THROW(("BeIDE was not found"));
if (be_roster->FindApp(PE_DEFAULT_IDE_APPSIG, &ide))
THROW((PE_DEFAULT_IDE_NAME " was not found"));

if (be_roster->IsRunning(&ide))
{
Expand Down
5 changes: 3 additions & 2 deletions Sources/Utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,9 @@ void OpenInTracker(const entry_ref& ref)
void SendToIDE(const BMessage& msg, BMessage *reply)
{
entry_ref ide;
if (be_roster->FindApp("application/x-mw-BeIDE", &ide))
THROW(("BeIDE was not found"));

if (be_roster->FindApp(PE_DEFAULT_IDE_APPSIG, &ide))
THROW((PE_DEFAULT_IDE_NAME " was not found"));

if (be_roster->IsRunning(&ide))
{
Expand Down
9 changes: 9 additions & 0 deletions Sources/pe.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,13 @@
#include <map>
#include <string>

#ifdef __HAIKU__
#define PE_DEFAULT_IDE_APPSIG "application/x-vnd.dw-Paladin"
#define PE_DEFAULT_IDE_NAME "Paladin"
#else
#define PE_DEFAULT_IDE_APPSIG "application/x-mw-BeIDE"
#define PE_DEFAULT_IDE_NAME "BeIDE"
#endif


#endif // PE_H
Loading