diff --git a/Sources/CMenuItem.cpp b/Sources/CMenuItem.cpp index 3784641..4332c8a 100644 --- a/Sources/CMenuItem.cpp +++ b/Sources/CMenuItem.cpp @@ -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 */ diff --git a/Sources/PDoc.cpp b/Sources/PDoc.cpp index df1dc27..301e417 100644 --- a/Sources/PDoc.cpp +++ b/Sources/PDoc.cpp @@ -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); @@ -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)); @@ -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)) { diff --git a/Sources/Utils.cpp b/Sources/Utils.cpp index 4b444a2..944f0b2 100644 --- a/Sources/Utils.cpp +++ b/Sources/Utils.cpp @@ -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)) { diff --git a/Sources/pe.h b/Sources/pe.h index f0d8044..4699447 100644 --- a/Sources/pe.h +++ b/Sources/pe.h @@ -102,4 +102,13 @@ #include #include +#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