Author: axeld Date: 2010-01-04 17:09:15 +0100 (Mon, 04 Jan 2010) New Revision: 34890 Changeset: http://dev.haiku-os.org/changeset/34890/haiku Ticket: http://dev.haiku-os.org/ticket/5173 Removed: haiku/trunk/src/kits/tracker/DeviceMap.h haiku/trunk/src/kits/tracker/DeviceMapGlue.h Modified: haiku/trunk/src/kits/tracker/DeskWindow.cpp Log: * The Desktop window is no longer zoomable. This fixes ticket #5173. * Removed no longer used headers (private BeOS device API). Modified: haiku/trunk/src/kits/tracker/DeskWindow.cpp =================================================================== --- haiku/trunk/src/kits/tracker/DeskWindow.cpp 2010-01-04 15:45:20 UTC (rev 34889) +++ haiku/trunk/src/kits/tracker/DeskWindow.cpp 2010-01-04 16:09:15 UTC (rev 34890) @@ -57,25 +57,62 @@ #include "Tracker.h" #include "TemplatesMenu.h" -#if OPEN_TRACKER -#include "DeviceMap.h" -#else -#include <private/storage/DeviceMap.h> -#endif const char *kShelfPath = "tracker_shelf"; // replicant support +static void +WatchAddOnDir(directory_which dirName, BDeskWindow *window) +{ + BPath path; + if (find_directory(dirName, &path) == B_OK) { + path.Append("Tracker"); + BNode node(path.Path()); + node_ref nodeRef; + node.GetNodeRef(&nodeRef); + TTracker::WatchNode(&nodeRef, B_WATCH_DIRECTORY, window); + } +} + + +struct AddOneShortcutParams { + BDeskWindow *window; + std::set<uint32> *currentAddonShortcuts; +}; + +static bool +AddOneShortcut(const Model *model, const char *, uint32 shortcut, bool /*primary*/, void *context) +{ + if (!shortcut) + // no shortcut, bail + return false; + + AddOneShortcutParams *params = (AddOneShortcutParams *)context; + BMessage *runAddon = new BMessage(kLoadAddOn); + runAddon->AddRef("refs", model->EntryRef()); + + params->window->AddShortcut(shortcut, B_OPTION_KEY | B_COMMAND_KEY, + runAddon); + params->currentAddonShortcuts->insert(shortcut); + PRINT(("adding new shortcut %c\n", (char)shortcut)); + + return false; +} + + +// #pragma mark - + + BDeskWindow::BDeskWindow(LockingList<BWindow> *windowList) - : BContainerWindow(windowList, 0, - kPrivateDesktopWindowLook, kPrivateDesktopWindowFeel, - B_NOT_MOVABLE | B_WILL_ACCEPT_FIRST_CLICK | - B_NOT_CLOSABLE | B_NOT_MINIMIZABLE | B_ASYNCHRONOUS_CONTROLS, - B_ALL_WORKSPACES), - fDeskShelf(0), - fTrashContextMenu(0), - fShouldUpdateAddonShortcuts(true) + : + BContainerWindow(windowList, 0, kPrivateDesktopWindowLook, + kPrivateDesktopWindowFeel, B_NOT_MOVABLE | B_WILL_ACCEPT_FIRST_CLICK + | B_NOT_ZOOMABLE | B_NOT_CLOSABLE | B_NOT_MINIMIZABLE + | B_ASYNCHRONOUS_CONTROLS, B_ALL_WORKSPACES), + fDeskShelf(0), + fTrashContextMenu(0), + fShouldUpdateAddonShortcuts(true) { // Add icon view switching shortcuts. These are displayed in the context // menu, although they obviously don't work from those menu items. @@ -107,20 +144,6 @@ } -static void -WatchAddOnDir(directory_which dirName, BDeskWindow *window) -{ - BPath path; - if (find_directory(dirName, &path) == B_OK) { - path.Append("Tracker"); - BNode node(path.Path()); - node_ref nodeRef; - node.GetNodeRef(&nodeRef); - TTracker::WatchNode(&nodeRef, B_WATCH_DIRECTORY, window); - } -} - - void BDeskWindow::Init(const BMessage *) { @@ -157,31 +180,6 @@ } -struct AddOneShortcutParams { - BDeskWindow *window; - std::set<uint32> *currentAddonShortcuts; -}; - -static bool -AddOneShortcut(const Model *model, const char *, uint32 shortcut, bool /*primary*/, void *context) -{ - if (!shortcut) - // no shortcut, bail - return false; - - AddOneShortcutParams *params = (AddOneShortcutParams *)context; - BMessage *runAddon = new BMessage(kLoadAddOn); - runAddon->AddRef("refs", model->EntryRef()); - - params->window->AddShortcut(shortcut, B_OPTION_KEY | B_COMMAND_KEY, - runAddon); - params->currentAddonShortcuts->insert(shortcut); - PRINT(("adding new shortcut %c\n", (char)shortcut)); - - return false; -} - - void BDeskWindow::MenusBeginning() {