From d46836a8b0a4e59113e71fffbf94b8588bdf82c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Mon, 19 Nov 2007 15:30:32 +0000 Subject: [PATCH] Now opens the types window on B_SILENT_RELAUNCH if it's not already open. This fixes bug #1628. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22957 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/preferences/filetypes/FileTypes.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/preferences/filetypes/FileTypes.cpp b/src/preferences/filetypes/FileTypes.cpp index edcdefe4d3..5cb63b6cf3 100644 --- a/src/preferences/filetypes/FileTypes.cpp +++ b/src/preferences/filetypes/FileTypes.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2006, Axel Dörfler, axeld@pinc-software.de. All rights reserved. + * Copyright 2006-2007, Axel Dörfler, axeld@pinc-software.de. All rights reserved. * Distributed under the terms of the MIT License. */ @@ -372,6 +372,13 @@ FileTypes::MessageReceived(BMessage *message) break; } + case B_SILENT_RELAUNCH: + // In case we were launched via the add-on, there is no types + // window yet. + if (fTypesWindow == NULL) + PostMessage(kMsgOpenTypesWindow); + break; + case B_CANCEL: if (fWindowCount == 0) PostMessage(B_QUIT_REQUESTED); @@ -393,7 +400,7 @@ FileTypes::AboutRequested() { BAlert *alert = new BAlert("about", "FileTypes\n" "\twritten by Axel Dörfler\n" - "\tCopyright 2006, Haiku.\n", "Ok"); + "\tCopyright 2006-2007, Haiku.\n", "Ok"); BTextView *view = alert->TextView(); BFont font;