void BookmarksWindow::MessageReceived(BMessage* i_pMessage) { switch (i_pMessage->what) { case MSG_MENU_NEW: ShowNewBookmarkItemWindow(); break; case MSG_MENU_EDIT: ShowEditBookmarkItemWindow(m_pSelectedItem); break; case MSG_MENU_REMOVE: // RemoveBookmarkItem(i_pMessage); RemoveBookmarkItem(); break; case MSG_MENU_SAVE: Bookmarks::Instance()->Save(m_pColumnListView); //Delivering message to ConnectView //OliverESP: hmmmm less lines and dont need to use brackets // BMessenger* v_pMessenger = new BMessenger(m_pConnectView); OliverESP: no lo se porque // v_pMessenger->SendMessage(new BMessage(MSG_MENU_SAVE)); BMessenger(m_pConnectView).SendMessage(new BMessage(MSG_MENU_SAVE)); break; case MSG_SELECTION_CHANGED: // BookmarkSelectionChanged(i_pMessage); // parameter not used BookmarkSelectionChanged(); // parameter not used break; case MSG_EDIT_REQUESTED: // EditBookmarkItem(i_pMessage); EditBookmarkItem(); break; case MSG_ADD_REQUESTED: // AddBookmarkItem(i_pMessage); AddBookmarkItem(); break; default: BWindow::MessageReceived(i_pMessage); break; } }
void CBookmarksToolbar::OnBookmarkFolderRemoved(const GUID &guid) { RemoveBookmarkItem(guid); }