X-Git-Url: https://git.saurik.com/apple/mdnsresponder.git/blobdiff_plain/7cb34e5c3616917483a8e75510de0387e51833cc..51e746cfedf68920647bd7ab197adb37f67b5209:/Clients/ExplorerPlugin/ExplorerBarWindow.cpp diff --git a/Clients/ExplorerPlugin/ExplorerBarWindow.cpp b/Clients/ExplorerPlugin/ExplorerBarWindow.cpp index a68880b..88f4858 100644 --- a/Clients/ExplorerPlugin/ExplorerBarWindow.cpp +++ b/Clients/ExplorerPlugin/ExplorerBarWindow.cpp @@ -1,28 +1,34 @@ -/* +/* -*- Mode: C; tab-width: 4 -*- + * * Copyright (c) 2003-2004 Apple Computer, Inc. All rights reserved. * - * @APPLE_LICENSE_HEADER_START@ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. + * http://www.apache.org/licenses/LICENSE-2.0 * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ Change History (most recent first): $Log: ExplorerBarWindow.cpp,v $ +Revision 1.22 2006/08/14 23:24:00 cheshire +Re-licensed mDNSResponder daemon source code under Apache License, Version 2.0 + +Revision 1.21 2005/04/06 01:13:07 shersche + Use the product icon instead of globe icon for 'About' link. + +Revision 1.20 2005/03/18 02:43:02 shersche + Use standard IE website icon for 'About Bonjour', only using globe icon if standard icon cannot be loaded + +Revision 1.19 2005/03/16 03:46:27 shersche + Use Bonjour icon for all discovered sites + Revision 1.18 2005/02/26 01:24:05 shersche Remove display lines in tree control @@ -143,6 +149,10 @@ static char THIS_FILE[] = __FILE__; #define kTXTRecordKeyPath "path" +// IE Icon resource + +#define kIEIconResource 32529 + #if 0 #pragma mark == Prototypes == @@ -205,6 +215,7 @@ int ExplorerBarWindow::OnCreate( LPCREATESTRUCT inCreateStruct ) { AFX_MANAGE_STATE( AfxGetStaticModuleState() ); + HINSTANCE module = NULL; OSStatus err; CRect rect; CBitmap bitmap; @@ -231,7 +242,7 @@ int ExplorerBarWindow::OnCreate( LPCREATESTRUCT inCreateStruct ) mServiceHandlers.Add( e ); s.LoadString( IDS_ABOUT ); - m_about = mTree.InsertItem( s, 1, 1 ); + m_about = mTree.InsertItem( s, 0, 0 ); err = DNSServiceBrowse( &e->ref, 0, 0, e->type, NULL, BrowseCallBack, e ); require_noerr( err, exit ); @@ -241,17 +252,22 @@ int ExplorerBarWindow::OnCreate( LPCREATESTRUCT inCreateStruct ) m_serviceRefs.push_back(e->ref); - m_imageList.Create( 16, 16, ILC_COLORDDB, 2, 0); - bitmap.Attach( ::LoadBitmap( GetNonLocalizedResources(), MAKEINTRESOURCE( IDB_GLOBE ) ) ); - m_imageList.Add( &bitmap, (CBitmap*) NULL ); - bitmap.Detach(); + m_imageList.Create( 16, 16, ILC_MASK | ILC_COLOR16, 2, 0); + bitmap.Attach( ::LoadBitmap( GetNonLocalizedResources(), MAKEINTRESOURCE( IDB_LOGO ) ) ); m_imageList.Add( &bitmap, (CBitmap*) NULL ); + bitmap.Detach(); mTree.SetImageList(&m_imageList, TVSIL_NORMAL); exit: + if ( module ) + { + FreeLibrary( module ); + module = NULL; + } + // Cannot talk to the mDNSResponder service. Show the error message and exit (with kNoErr so they can see it). if ( err ) {