1 /* 2 * Copyright 2006, Axel Dörfler, axeld@pinc-software.de. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef EXTENSION_WINDOW_H 6 #define EXTENSION_WINDOW_H 7 8 9 #include <Messenger.h> 10 #include <Mime.h> 11 #include <String.h> 12 #include <Window.h> 13 14 class BButton; 15 class BTextControl; 16 17 class FileTypesWindow; 18 19 20 class ExtensionWindow : public BWindow { 21 public: 22 ExtensionWindow(FileTypesWindow* target, BMimeType& type, 23 const char* extension); 24 virtual ~ExtensionWindow(); 25 26 virtual void MessageReceived(BMessage* message); 27 28 private: 29 BMessenger fTarget; 30 BMimeType fMimeType; 31 BString fExtension; 32 BTextControl* fExtensionControl; 33 BButton* fAcceptButton; 34 }; 35 36 extern status_t merge_extensions(BMimeType& type, const BList& newExtensions, 37 const char* removeExtension = NULL); 38 extern status_t replace_extension(BMimeType& type, const char* newExtension, 39 const char* oldExtension); 40 41 #endif // EXTENSION_WINDOW_H 42