Adding icons for tree views.

svn path=/trunk/netsurf/; revision=11842
This commit is contained in:
Sven Weidauer 2011-02-27 13:21:46 +00:00
parent ff0aa37393
commit d84f818887
6 changed files with 12 additions and 4 deletions

View File

@ -48,7 +48,7 @@ static const char *cocoa_hotlist_path( void )
if ((self = [super initWithWindowNibName: @"BookmarksWindow"]) == nil) return nil;
tree = [[Tree alloc] initWithFlags: hotlist_get_tree_flags()];
hotlist_initialise( [tree tree], cocoa_hotlist_path(), "" );
hotlist_initialise( [tree tree], cocoa_hotlist_path(), "directory.png" );
nodeForMenu = NSCreateMapTable( NSNonOwnedPointerMapKeyCallBacks, NSNonOwnedPointerMapValueCallBacks, 0 );
[[NSNotificationCenter defaultCenter] addObserver:self

View File

@ -31,7 +31,7 @@
if ((self = [super initWithWindowNibName: @"HistoryWindow"]) == nil) return nil;
tree = [[Tree alloc] initWithFlags: history_global_get_tree_flags()];
history_global_initialise( [tree tree], "" );
history_global_initialise( [tree tree], "directory.png" );
return self;
}

View File

@ -125,7 +125,7 @@ EXETARGET := NetSurf
S_XIBS := MainMenu.xib Browser.xib BrowserWindow.xib DownloadWindow.xib SearchWindow.xib PreferencesWindow.xib \
HistoryWindow.xib BookmarksWindow.xib LocalHistoryPanel.xib
R_RESOURCES := default.css adblock.css quirks.css NetSurf.icns HomeTemplate.pdf
R_RESOURCES := default.css adblock.css quirks.css NetSurf.icns HomeTemplate.pdf Icons
R_RESOURCES := $(addprefix cocoa/res/,$(R_RESOURCES))
LANGUAGES := de en fr it nl

View File

@ -33,6 +33,7 @@
#import "desktop/save_complete.h"
#import "desktop/selection.h"
#import "desktop/textinput.h"
#import "desktop/tree.h"
#import "render/html.h"
#import "utils/url.h"
#import "utils/log.h"
@ -74,6 +75,8 @@
urldb_load( [[defaults objectForKey: kURLsFileOption] UTF8String] );
urldb_load_cookies( option_cookie_file );
tree_set_icon_dir( strdup( [[[NSBundle mainBundle] pathForResource: @"Icons" ofType: @""] UTF8String] ) );
cocoa_update_scale_factor();
}

1
cocoa/res/Icons Symbolic link
View File

@ -0,0 +1 @@
../../!NetSurf/Resources/Icons/

View File

@ -58,5 +58,9 @@ bool path_add_part(char *path, int length, const char *newpart)
void tree_icon_name_from_content_type(char *buffer, content_type type)
{
UNIMPL();
switch (type) {
default:
strcpy( buffer, "content.png" );
break;
}
}