Ticket #8165: workspaces.about.patch

File workspaces.about.patch, 2.6 KB (added by rq, 12 years ago)

Patch to remove the About menu item and the About dialog box from Workspaces

  • src/apps/workspaces/Workspaces.cpp

    diff --git a/src/apps/workspaces/Workspaces.cpp b/src/apps/workspaces/Workspaces.cpp
    index b65cfb1..bca4b95 100644
    a b class WorkspacesView : public BView {  
    111111        virtual void MouseDown(BPoint where);
    112112
    113113    private:
    114         void _AboutRequested();
    115 
    116114        void _UpdateParentClipping();
    117115        void _ExcludeFromParentClipping();
    118116        void _CleanupParentClipping();
    class WorkspacesApp : public BApplication {  
    147145        WorkspacesApp();
    148146        virtual ~WorkspacesApp();
    149147
    150         virtual void AboutRequested();
    151148        virtual void ArgvReceived(int32 argc, char **argv);
    152149        virtual void ReadyToRun();
    153150
    WorkspacesView::Archive(BMessage* archive, bool deep) const  
    398395
    399396
    400397void
    401 WorkspacesView::_AboutRequested()
    402 {
    403     BString text = B_TRANSLATE("Workspaces\n"
    404         "written by %1, and %2.\n\n"
    405         "Copyright %3, Haiku.\n\n"
    406         "Send windows behind using the Option key. "
    407         "Move windows to front using the Control key.\n");
    408     text.ReplaceFirst("%1", "François Revol, Axel Dörfler");
    409     text.ReplaceFirst("%2", "Matt Madia");
    410     text.ReplaceFirst("%3", "2002-2008");
    411        
    412     BAlert *alert = new BAlert("about", text.String(), B_TRANSLATE("OK"));
    413     BTextView *view = alert->TextView();
    414     BFont font;
    415 
    416     view->SetStylable(true);
    417 
    418     view->GetFont(&font);
    419     font.SetSize(18);
    420     font.SetFace(B_BOLD_FACE);
    421     view->SetFontAndColor(0, 10, &font);
    422 
    423     alert->Go();
    424 }
    425 
    426 
    427 void
    428398WorkspacesView::AttachedToWindow()
    429399{
    430400    BView* parent = Parent();
    void  
    497467WorkspacesView::MessageReceived(BMessage* message)
    498468{
    499469    switch (message->what) {
    500         case B_ABOUT_REQUESTED:
    501             _AboutRequested();
    502             break;
    503 
    504470        case kMsgChangeCount:
    505471            be_roster->Launch(kScreenPrefletSignature);
    506472            break;
    WorkspacesView::MouseDown(BPoint where)  
    602568        }
    603569
    604570        menu->AddSeparatorItem();
    605         menu->AddItem(new BMenuItem(B_TRANSLATE("About Workspaces"
    606             B_UTF8_ELLIPSIS), new BMessage(B_ABOUT_REQUESTED)));
    607571        menu->AddItem(new BMenuItem(B_TRANSLATE("Quit"),
    608572            new BMessage(B_QUIT_REQUESTED)));
    609573        menu->SetTargetForItems(window);
    WorkspacesWindow::MessageReceived(BMessage *message)  
    755719            break;
    756720        }
    757721
    758         case B_ABOUT_REQUESTED:
    759             PostMessage(message, ChildAt(0));
    760             break;
    761 
    762722        case kMsgToggleBorder:
    763723        {
    764724            bool enable = false;
    WorkspacesApp::~WorkspacesApp()  
    876836
    877837
    878838void
    879 WorkspacesApp::AboutRequested()
    880 {
    881     fWindow->PostMessage(B_ABOUT_REQUESTED);
    882 }
    883 
    884 
    885 void
    886839WorkspacesApp::Usage(const char *programName)
    887840{
    888841    printf(B_TRANSLATE("Usage: %s [options] [workspace]\n"