зеркало из https://github.com/mozilla/gecko-dev.git
Don't rebuild the entire history data source (and leak it) every time the sidebar is opened, which makes sidebar opening animate more smoothly. Also put in some #ifdefs to it's easier to play with the browser window positioning code on sidebar open.
This commit is contained in:
Родитель
9382c77c37
Коммит
62a037a4ce
|
@ -3,15 +3,15 @@
|
|||
<plist version="0.9">
|
||||
<dict>
|
||||
<key>IBDocumentLocation</key>
|
||||
<string>174 64 632 495 0 0 1152 848 </string>
|
||||
<string>60 71 632 495 0 0 1280 1002 </string>
|
||||
<key>IBEditorPositions</key>
|
||||
<dict>
|
||||
<key>124</key>
|
||||
<string>305 659 170 144 0 0 1152 848 </string>
|
||||
<key>160</key>
|
||||
<string>605 155 195 666 0 0 1152 848 </string>
|
||||
<string>524 326 195 666 0 0 1280 1002 </string>
|
||||
<key>28</key>
|
||||
<string>523 439 195 457 0 0 1280 1002 </string>
|
||||
<string>524 439 195 457 0 0 1280 1002 </string>
|
||||
<key>297</key>
|
||||
<string>233 646 176 162 0 0 1152 848 </string>
|
||||
<key>314</key>
|
||||
|
@ -23,7 +23,7 @@
|
|||
<key>463</key>
|
||||
<string>22 619 200 180 0 0 1152 848 </string>
|
||||
<key>56</key>
|
||||
<string>404 546 343 68 0 0 1152 848 </string>
|
||||
<string>450 634 343 68 0 0 1280 1002 </string>
|
||||
</dict>
|
||||
<key>IBFramework Version</key>
|
||||
<string>248.0</string>
|
||||
|
@ -41,12 +41,7 @@
|
|||
<array>
|
||||
<integer>497</integer>
|
||||
</array>
|
||||
<key>IBOpenObjects</key>
|
||||
<array>
|
||||
<integer>56</integer>
|
||||
<integer>160</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>5S60</string>
|
||||
<string>5S66</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
Двоичный файл не отображается.
|
@ -337,12 +337,15 @@ static NSArray* sToolbarDefaults = nil;
|
|||
return proposedFrameSize;
|
||||
}
|
||||
|
||||
|
||||
#define RESIZE_WINDOW_FOR_DRAWER
|
||||
|
||||
- (void)drawerWillOpen: (NSNotification*)aNotification
|
||||
{
|
||||
[mSidebarBookmarksDataSource ensureBookmarks];
|
||||
|
||||
[mHistoryDataSource ensureDataSourceLoaded];
|
||||
|
||||
#ifdef RESIZE_WINDOW_FOR_DRAWER
|
||||
// Force the window to shrink and move if necessary in order to accommodate the sidebar.
|
||||
NSRect screenFrame = [[[self window] screen] visibleFrame];
|
||||
NSRect windowFrame = [[self window] frame];
|
||||
|
@ -361,9 +364,11 @@ static NSArray* sToolbarDefaults = nil;
|
|||
windowFrame.origin.x = newPosition;
|
||||
windowFrame.size.width = newWidth;
|
||||
mCachedFrameAfterDrawerOpen = windowFrame;
|
||||
[[self window] setFrame: windowFrame display: YES];
|
||||
[[self window] setFrame: windowFrame display: YES animate:NO]; // animation would be nice, but is too slow
|
||||
mDrawerCachedFrame = YES;
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
- (void)drawerDidOpen:(NSNotification *)aNotification
|
||||
|
@ -385,6 +390,7 @@ static NSArray* sToolbarDefaults = nil;
|
|||
// XXXdwh ignore for now.
|
||||
// [[mSidebarBrowserView getBrowserView] loadURI: @"about:blank" referrer:nil flags:NSLoadFlagsNone];
|
||||
|
||||
#ifdef RESIZE_WINDOW_FOR_DRAWER
|
||||
if (mDrawerCachedFrame) {
|
||||
mDrawerCachedFrame = NO;
|
||||
NSRect frame = [[self window] frame];
|
||||
|
@ -398,9 +404,11 @@ static NSArray* sToolbarDefaults = nil;
|
|||
printf("Widths are %f %f\n", frame.size.width, mCachedFrameAfterDrawerOpen.size.width);
|
||||
#endif
|
||||
// Restore the original frame.
|
||||
[[self window] setFrame: mCachedFrameBeforeDrawerOpen display: YES];
|
||||
[[self window] setFrame: mCachedFrameBeforeDrawerOpen display: YES animate:NO]; // animation would be nice
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
- (void)setupToolbar
|
||||
|
|
|
@ -27,15 +27,18 @@
|
|||
{
|
||||
[super ensureDataSourceLoaded];
|
||||
|
||||
// Get the Global History DataSource
|
||||
mRDFService->GetDataSource("rdf:history", &mDataSource);
|
||||
// Get the Date Folder Root
|
||||
mRDFService->GetResource("NC:HistoryByDate", &mRootResource);
|
||||
|
||||
[mOutlineView setTarget: self];
|
||||
[mOutlineView setDoubleAction: @selector(openHistoryItem:)];
|
||||
|
||||
[mOutlineView reloadData];
|
||||
if (!mDataSource)
|
||||
{
|
||||
// Get the Global History DataSource
|
||||
mRDFService->GetDataSource("rdf:history", &mDataSource);
|
||||
// Get the Date Folder Root
|
||||
mRDFService->GetResource("NC:HistoryByDate", &mRootResource);
|
||||
|
||||
[mOutlineView setTarget: self];
|
||||
[mOutlineView setDoubleAction: @selector(openHistoryItem:)];
|
||||
|
||||
[mOutlineView reloadData];
|
||||
}
|
||||
}
|
||||
|
||||
- (id) outlineView: (NSOutlineView*) aOutlineView objectValueForTableColumn: (NSTableColumn*) aTableColumn
|
||||
|
|
|
@ -60,19 +60,22 @@
|
|||
|
||||
- (void) ensureDataSourceLoaded
|
||||
{
|
||||
nsCOMPtr<nsIRDFContainer> ctr = do_CreateInstance("@mozilla.org/rdf/container;1");
|
||||
NS_ADDREF(mContainer = ctr);
|
||||
|
||||
nsCOMPtr<nsIRDFContainerUtils> ctrUtils = do_GetService("@mozilla.org/rdf/container-utils;1");
|
||||
NS_ADDREF(mContainerUtils = ctrUtils);
|
||||
|
||||
nsCOMPtr<nsIRDFService> rdfService = do_GetService("@mozilla.org/rdf/rdf-service;1");
|
||||
NS_ADDREF(mRDFService = rdfService);
|
||||
|
||||
mDataSource = nsnull;
|
||||
mRootResource = nsnull;
|
||||
if (!mContainer)
|
||||
{
|
||||
nsCOMPtr<nsIRDFContainer> ctr = do_CreateInstance("@mozilla.org/rdf/container;1");
|
||||
NS_ADDREF(mContainer = ctr);
|
||||
|
||||
nsCOMPtr<nsIRDFContainerUtils> ctrUtils = do_GetService("@mozilla.org/rdf/container-utils;1");
|
||||
NS_ADDREF(mContainerUtils = ctrUtils);
|
||||
|
||||
nsCOMPtr<nsIRDFService> rdfService = do_GetService("@mozilla.org/rdf/rdf-service;1");
|
||||
NS_ADDREF(mRDFService = rdfService);
|
||||
|
||||
mDictionary = [[NSMutableDictionary alloc] initWithCapacity: 30];
|
||||
|
||||
mDictionary = [[NSMutableDictionary alloc] initWithCapacity: 30];
|
||||
mDataSource = nsnull;
|
||||
mRootResource = nsnull;
|
||||
}
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
|
|
|
@ -3,15 +3,15 @@
|
|||
<plist version="0.9">
|
||||
<dict>
|
||||
<key>IBDocumentLocation</key>
|
||||
<string>174 64 632 495 0 0 1152 848 </string>
|
||||
<string>60 71 632 495 0 0 1280 1002 </string>
|
||||
<key>IBEditorPositions</key>
|
||||
<dict>
|
||||
<key>124</key>
|
||||
<string>305 659 170 144 0 0 1152 848 </string>
|
||||
<key>160</key>
|
||||
<string>605 155 195 666 0 0 1152 848 </string>
|
||||
<string>524 326 195 666 0 0 1280 1002 </string>
|
||||
<key>28</key>
|
||||
<string>523 439 195 457 0 0 1280 1002 </string>
|
||||
<string>524 439 195 457 0 0 1280 1002 </string>
|
||||
<key>297</key>
|
||||
<string>233 646 176 162 0 0 1152 848 </string>
|
||||
<key>314</key>
|
||||
|
@ -23,7 +23,7 @@
|
|||
<key>463</key>
|
||||
<string>22 619 200 180 0 0 1152 848 </string>
|
||||
<key>56</key>
|
||||
<string>404 546 343 68 0 0 1152 848 </string>
|
||||
<string>450 634 343 68 0 0 1280 1002 </string>
|
||||
</dict>
|
||||
<key>IBFramework Version</key>
|
||||
<string>248.0</string>
|
||||
|
@ -41,12 +41,7 @@
|
|||
<array>
|
||||
<integer>497</integer>
|
||||
</array>
|
||||
<key>IBOpenObjects</key>
|
||||
<array>
|
||||
<integer>56</integer>
|
||||
<integer>160</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>5S60</string>
|
||||
<string>5S66</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
Двоичный файл не отображается.
|
@ -3,15 +3,15 @@
|
|||
<plist version="0.9">
|
||||
<dict>
|
||||
<key>IBDocumentLocation</key>
|
||||
<string>174 64 632 495 0 0 1152 848 </string>
|
||||
<string>60 71 632 495 0 0 1280 1002 </string>
|
||||
<key>IBEditorPositions</key>
|
||||
<dict>
|
||||
<key>124</key>
|
||||
<string>305 659 170 144 0 0 1152 848 </string>
|
||||
<key>160</key>
|
||||
<string>605 155 195 666 0 0 1152 848 </string>
|
||||
<string>524 326 195 666 0 0 1280 1002 </string>
|
||||
<key>28</key>
|
||||
<string>523 439 195 457 0 0 1280 1002 </string>
|
||||
<string>524 439 195 457 0 0 1280 1002 </string>
|
||||
<key>297</key>
|
||||
<string>233 646 176 162 0 0 1152 848 </string>
|
||||
<key>314</key>
|
||||
|
@ -23,7 +23,7 @@
|
|||
<key>463</key>
|
||||
<string>22 619 200 180 0 0 1152 848 </string>
|
||||
<key>56</key>
|
||||
<string>404 546 343 68 0 0 1152 848 </string>
|
||||
<string>450 634 343 68 0 0 1280 1002 </string>
|
||||
</dict>
|
||||
<key>IBFramework Version</key>
|
||||
<string>248.0</string>
|
||||
|
@ -41,12 +41,7 @@
|
|||
<array>
|
||||
<integer>497</integer>
|
||||
</array>
|
||||
<key>IBOpenObjects</key>
|
||||
<array>
|
||||
<integer>56</integer>
|
||||
<integer>160</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>5S60</string>
|
||||
<string>5S66</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
Двоичные данные
camino/resources/localized/English.lproj/BrowserWindow.nib/objects.nib
сгенерированный
Двоичные данные
camino/resources/localized/English.lproj/BrowserWindow.nib/objects.nib
сгенерированный
Двоичный файл не отображается.
|
@ -337,12 +337,15 @@ static NSArray* sToolbarDefaults = nil;
|
|||
return proposedFrameSize;
|
||||
}
|
||||
|
||||
|
||||
#define RESIZE_WINDOW_FOR_DRAWER
|
||||
|
||||
- (void)drawerWillOpen: (NSNotification*)aNotification
|
||||
{
|
||||
[mSidebarBookmarksDataSource ensureBookmarks];
|
||||
|
||||
[mHistoryDataSource ensureDataSourceLoaded];
|
||||
|
||||
#ifdef RESIZE_WINDOW_FOR_DRAWER
|
||||
// Force the window to shrink and move if necessary in order to accommodate the sidebar.
|
||||
NSRect screenFrame = [[[self window] screen] visibleFrame];
|
||||
NSRect windowFrame = [[self window] frame];
|
||||
|
@ -361,9 +364,11 @@ static NSArray* sToolbarDefaults = nil;
|
|||
windowFrame.origin.x = newPosition;
|
||||
windowFrame.size.width = newWidth;
|
||||
mCachedFrameAfterDrawerOpen = windowFrame;
|
||||
[[self window] setFrame: windowFrame display: YES];
|
||||
[[self window] setFrame: windowFrame display: YES animate:NO]; // animation would be nice, but is too slow
|
||||
mDrawerCachedFrame = YES;
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
- (void)drawerDidOpen:(NSNotification *)aNotification
|
||||
|
@ -385,6 +390,7 @@ static NSArray* sToolbarDefaults = nil;
|
|||
// XXXdwh ignore for now.
|
||||
// [[mSidebarBrowserView getBrowserView] loadURI: @"about:blank" referrer:nil flags:NSLoadFlagsNone];
|
||||
|
||||
#ifdef RESIZE_WINDOW_FOR_DRAWER
|
||||
if (mDrawerCachedFrame) {
|
||||
mDrawerCachedFrame = NO;
|
||||
NSRect frame = [[self window] frame];
|
||||
|
@ -398,9 +404,11 @@ static NSArray* sToolbarDefaults = nil;
|
|||
printf("Widths are %f %f\n", frame.size.width, mCachedFrameAfterDrawerOpen.size.width);
|
||||
#endif
|
||||
// Restore the original frame.
|
||||
[[self window] setFrame: mCachedFrameBeforeDrawerOpen display: YES];
|
||||
[[self window] setFrame: mCachedFrameBeforeDrawerOpen display: YES animate:NO]; // animation would be nice
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
- (void)setupToolbar
|
||||
|
|
|
@ -60,19 +60,22 @@
|
|||
|
||||
- (void) ensureDataSourceLoaded
|
||||
{
|
||||
nsCOMPtr<nsIRDFContainer> ctr = do_CreateInstance("@mozilla.org/rdf/container;1");
|
||||
NS_ADDREF(mContainer = ctr);
|
||||
|
||||
nsCOMPtr<nsIRDFContainerUtils> ctrUtils = do_GetService("@mozilla.org/rdf/container-utils;1");
|
||||
NS_ADDREF(mContainerUtils = ctrUtils);
|
||||
|
||||
nsCOMPtr<nsIRDFService> rdfService = do_GetService("@mozilla.org/rdf/rdf-service;1");
|
||||
NS_ADDREF(mRDFService = rdfService);
|
||||
|
||||
mDataSource = nsnull;
|
||||
mRootResource = nsnull;
|
||||
if (!mContainer)
|
||||
{
|
||||
nsCOMPtr<nsIRDFContainer> ctr = do_CreateInstance("@mozilla.org/rdf/container;1");
|
||||
NS_ADDREF(mContainer = ctr);
|
||||
|
||||
nsCOMPtr<nsIRDFContainerUtils> ctrUtils = do_GetService("@mozilla.org/rdf/container-utils;1");
|
||||
NS_ADDREF(mContainerUtils = ctrUtils);
|
||||
|
||||
nsCOMPtr<nsIRDFService> rdfService = do_GetService("@mozilla.org/rdf/rdf-service;1");
|
||||
NS_ADDREF(mRDFService = rdfService);
|
||||
|
||||
mDictionary = [[NSMutableDictionary alloc] initWithCapacity: 30];
|
||||
|
||||
mDictionary = [[NSMutableDictionary alloc] initWithCapacity: 30];
|
||||
mDataSource = nsnull;
|
||||
mRootResource = nsnull;
|
||||
}
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
|
|
|
@ -27,15 +27,18 @@
|
|||
{
|
||||
[super ensureDataSourceLoaded];
|
||||
|
||||
// Get the Global History DataSource
|
||||
mRDFService->GetDataSource("rdf:history", &mDataSource);
|
||||
// Get the Date Folder Root
|
||||
mRDFService->GetResource("NC:HistoryByDate", &mRootResource);
|
||||
|
||||
[mOutlineView setTarget: self];
|
||||
[mOutlineView setDoubleAction: @selector(openHistoryItem:)];
|
||||
|
||||
[mOutlineView reloadData];
|
||||
if (!mDataSource)
|
||||
{
|
||||
// Get the Global History DataSource
|
||||
mRDFService->GetDataSource("rdf:history", &mDataSource);
|
||||
// Get the Date Folder Root
|
||||
mRDFService->GetResource("NC:HistoryByDate", &mRootResource);
|
||||
|
||||
[mOutlineView setTarget: self];
|
||||
[mOutlineView setDoubleAction: @selector(openHistoryItem:)];
|
||||
|
||||
[mOutlineView reloadData];
|
||||
}
|
||||
}
|
||||
|
||||
- (id) outlineView: (NSOutlineView*) aOutlineView objectValueForTableColumn: (NSTableColumn*) aTableColumn
|
||||
|
|
|
@ -3,15 +3,15 @@
|
|||
<plist version="0.9">
|
||||
<dict>
|
||||
<key>IBDocumentLocation</key>
|
||||
<string>174 64 632 495 0 0 1152 848 </string>
|
||||
<string>60 71 632 495 0 0 1280 1002 </string>
|
||||
<key>IBEditorPositions</key>
|
||||
<dict>
|
||||
<key>124</key>
|
||||
<string>305 659 170 144 0 0 1152 848 </string>
|
||||
<key>160</key>
|
||||
<string>605 155 195 666 0 0 1152 848 </string>
|
||||
<string>524 326 195 666 0 0 1280 1002 </string>
|
||||
<key>28</key>
|
||||
<string>523 439 195 457 0 0 1280 1002 </string>
|
||||
<string>524 439 195 457 0 0 1280 1002 </string>
|
||||
<key>297</key>
|
||||
<string>233 646 176 162 0 0 1152 848 </string>
|
||||
<key>314</key>
|
||||
|
@ -23,7 +23,7 @@
|
|||
<key>463</key>
|
||||
<string>22 619 200 180 0 0 1152 848 </string>
|
||||
<key>56</key>
|
||||
<string>404 546 343 68 0 0 1152 848 </string>
|
||||
<string>450 634 343 68 0 0 1280 1002 </string>
|
||||
</dict>
|
||||
<key>IBFramework Version</key>
|
||||
<string>248.0</string>
|
||||
|
@ -41,12 +41,7 @@
|
|||
<array>
|
||||
<integer>497</integer>
|
||||
</array>
|
||||
<key>IBOpenObjects</key>
|
||||
<array>
|
||||
<integer>56</integer>
|
||||
<integer>160</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>5S60</string>
|
||||
<string>5S66</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
Двоичный файл не отображается.
|
@ -337,12 +337,15 @@ static NSArray* sToolbarDefaults = nil;
|
|||
return proposedFrameSize;
|
||||
}
|
||||
|
||||
|
||||
#define RESIZE_WINDOW_FOR_DRAWER
|
||||
|
||||
- (void)drawerWillOpen: (NSNotification*)aNotification
|
||||
{
|
||||
[mSidebarBookmarksDataSource ensureBookmarks];
|
||||
|
||||
[mHistoryDataSource ensureDataSourceLoaded];
|
||||
|
||||
#ifdef RESIZE_WINDOW_FOR_DRAWER
|
||||
// Force the window to shrink and move if necessary in order to accommodate the sidebar.
|
||||
NSRect screenFrame = [[[self window] screen] visibleFrame];
|
||||
NSRect windowFrame = [[self window] frame];
|
||||
|
@ -361,9 +364,11 @@ static NSArray* sToolbarDefaults = nil;
|
|||
windowFrame.origin.x = newPosition;
|
||||
windowFrame.size.width = newWidth;
|
||||
mCachedFrameAfterDrawerOpen = windowFrame;
|
||||
[[self window] setFrame: windowFrame display: YES];
|
||||
[[self window] setFrame: windowFrame display: YES animate:NO]; // animation would be nice, but is too slow
|
||||
mDrawerCachedFrame = YES;
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
- (void)drawerDidOpen:(NSNotification *)aNotification
|
||||
|
@ -385,6 +390,7 @@ static NSArray* sToolbarDefaults = nil;
|
|||
// XXXdwh ignore for now.
|
||||
// [[mSidebarBrowserView getBrowserView] loadURI: @"about:blank" referrer:nil flags:NSLoadFlagsNone];
|
||||
|
||||
#ifdef RESIZE_WINDOW_FOR_DRAWER
|
||||
if (mDrawerCachedFrame) {
|
||||
mDrawerCachedFrame = NO;
|
||||
NSRect frame = [[self window] frame];
|
||||
|
@ -398,9 +404,11 @@ static NSArray* sToolbarDefaults = nil;
|
|||
printf("Widths are %f %f\n", frame.size.width, mCachedFrameAfterDrawerOpen.size.width);
|
||||
#endif
|
||||
// Restore the original frame.
|
||||
[[self window] setFrame: mCachedFrameBeforeDrawerOpen display: YES];
|
||||
[[self window] setFrame: mCachedFrameBeforeDrawerOpen display: YES animate:NO]; // animation would be nice
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
- (void)setupToolbar
|
||||
|
|
|
@ -27,15 +27,18 @@
|
|||
{
|
||||
[super ensureDataSourceLoaded];
|
||||
|
||||
// Get the Global History DataSource
|
||||
mRDFService->GetDataSource("rdf:history", &mDataSource);
|
||||
// Get the Date Folder Root
|
||||
mRDFService->GetResource("NC:HistoryByDate", &mRootResource);
|
||||
|
||||
[mOutlineView setTarget: self];
|
||||
[mOutlineView setDoubleAction: @selector(openHistoryItem:)];
|
||||
|
||||
[mOutlineView reloadData];
|
||||
if (!mDataSource)
|
||||
{
|
||||
// Get the Global History DataSource
|
||||
mRDFService->GetDataSource("rdf:history", &mDataSource);
|
||||
// Get the Date Folder Root
|
||||
mRDFService->GetResource("NC:HistoryByDate", &mRootResource);
|
||||
|
||||
[mOutlineView setTarget: self];
|
||||
[mOutlineView setDoubleAction: @selector(openHistoryItem:)];
|
||||
|
||||
[mOutlineView reloadData];
|
||||
}
|
||||
}
|
||||
|
||||
- (id) outlineView: (NSOutlineView*) aOutlineView objectValueForTableColumn: (NSTableColumn*) aTableColumn
|
||||
|
|
|
@ -60,19 +60,22 @@
|
|||
|
||||
- (void) ensureDataSourceLoaded
|
||||
{
|
||||
nsCOMPtr<nsIRDFContainer> ctr = do_CreateInstance("@mozilla.org/rdf/container;1");
|
||||
NS_ADDREF(mContainer = ctr);
|
||||
|
||||
nsCOMPtr<nsIRDFContainerUtils> ctrUtils = do_GetService("@mozilla.org/rdf/container-utils;1");
|
||||
NS_ADDREF(mContainerUtils = ctrUtils);
|
||||
|
||||
nsCOMPtr<nsIRDFService> rdfService = do_GetService("@mozilla.org/rdf/rdf-service;1");
|
||||
NS_ADDREF(mRDFService = rdfService);
|
||||
|
||||
mDataSource = nsnull;
|
||||
mRootResource = nsnull;
|
||||
if (!mContainer)
|
||||
{
|
||||
nsCOMPtr<nsIRDFContainer> ctr = do_CreateInstance("@mozilla.org/rdf/container;1");
|
||||
NS_ADDREF(mContainer = ctr);
|
||||
|
||||
nsCOMPtr<nsIRDFContainerUtils> ctrUtils = do_GetService("@mozilla.org/rdf/container-utils;1");
|
||||
NS_ADDREF(mContainerUtils = ctrUtils);
|
||||
|
||||
nsCOMPtr<nsIRDFService> rdfService = do_GetService("@mozilla.org/rdf/rdf-service;1");
|
||||
NS_ADDREF(mRDFService = rdfService);
|
||||
|
||||
mDictionary = [[NSMutableDictionary alloc] initWithCapacity: 30];
|
||||
|
||||
mDictionary = [[NSMutableDictionary alloc] initWithCapacity: 30];
|
||||
mDataSource = nsnull;
|
||||
mRootResource = nsnull;
|
||||
}
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
|
|
|
@ -3,15 +3,15 @@
|
|||
<plist version="0.9">
|
||||
<dict>
|
||||
<key>IBDocumentLocation</key>
|
||||
<string>174 64 632 495 0 0 1152 848 </string>
|
||||
<string>60 71 632 495 0 0 1280 1002 </string>
|
||||
<key>IBEditorPositions</key>
|
||||
<dict>
|
||||
<key>124</key>
|
||||
<string>305 659 170 144 0 0 1152 848 </string>
|
||||
<key>160</key>
|
||||
<string>605 155 195 666 0 0 1152 848 </string>
|
||||
<string>524 326 195 666 0 0 1280 1002 </string>
|
||||
<key>28</key>
|
||||
<string>523 439 195 457 0 0 1280 1002 </string>
|
||||
<string>524 439 195 457 0 0 1280 1002 </string>
|
||||
<key>297</key>
|
||||
<string>233 646 176 162 0 0 1152 848 </string>
|
||||
<key>314</key>
|
||||
|
@ -23,7 +23,7 @@
|
|||
<key>463</key>
|
||||
<string>22 619 200 180 0 0 1152 848 </string>
|
||||
<key>56</key>
|
||||
<string>404 546 343 68 0 0 1152 848 </string>
|
||||
<string>450 634 343 68 0 0 1280 1002 </string>
|
||||
</dict>
|
||||
<key>IBFramework Version</key>
|
||||
<string>248.0</string>
|
||||
|
@ -41,12 +41,7 @@
|
|||
<array>
|
||||
<integer>497</integer>
|
||||
</array>
|
||||
<key>IBOpenObjects</key>
|
||||
<array>
|
||||
<integer>56</integer>
|
||||
<integer>160</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>5S60</string>
|
||||
<string>5S66</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
Двоичный файл не отображается.
|
@ -3,15 +3,15 @@
|
|||
<plist version="0.9">
|
||||
<dict>
|
||||
<key>IBDocumentLocation</key>
|
||||
<string>174 64 632 495 0 0 1152 848 </string>
|
||||
<string>60 71 632 495 0 0 1280 1002 </string>
|
||||
<key>IBEditorPositions</key>
|
||||
<dict>
|
||||
<key>124</key>
|
||||
<string>305 659 170 144 0 0 1152 848 </string>
|
||||
<key>160</key>
|
||||
<string>605 155 195 666 0 0 1152 848 </string>
|
||||
<string>524 326 195 666 0 0 1280 1002 </string>
|
||||
<key>28</key>
|
||||
<string>523 439 195 457 0 0 1280 1002 </string>
|
||||
<string>524 439 195 457 0 0 1280 1002 </string>
|
||||
<key>297</key>
|
||||
<string>233 646 176 162 0 0 1152 848 </string>
|
||||
<key>314</key>
|
||||
|
@ -23,7 +23,7 @@
|
|||
<key>463</key>
|
||||
<string>22 619 200 180 0 0 1152 848 </string>
|
||||
<key>56</key>
|
||||
<string>404 546 343 68 0 0 1152 848 </string>
|
||||
<string>450 634 343 68 0 0 1280 1002 </string>
|
||||
</dict>
|
||||
<key>IBFramework Version</key>
|
||||
<string>248.0</string>
|
||||
|
@ -41,12 +41,7 @@
|
|||
<array>
|
||||
<integer>497</integer>
|
||||
</array>
|
||||
<key>IBOpenObjects</key>
|
||||
<array>
|
||||
<integer>56</integer>
|
||||
<integer>160</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>5S60</string>
|
||||
<string>5S66</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
Двоичные данные
chimera/resources/localized/English.lproj/BrowserWindow.nib/objects.nib
сгенерированный
Двоичные данные
chimera/resources/localized/English.lproj/BrowserWindow.nib/objects.nib
сгенерированный
Двоичный файл не отображается.
|
@ -337,12 +337,15 @@ static NSArray* sToolbarDefaults = nil;
|
|||
return proposedFrameSize;
|
||||
}
|
||||
|
||||
|
||||
#define RESIZE_WINDOW_FOR_DRAWER
|
||||
|
||||
- (void)drawerWillOpen: (NSNotification*)aNotification
|
||||
{
|
||||
[mSidebarBookmarksDataSource ensureBookmarks];
|
||||
|
||||
[mHistoryDataSource ensureDataSourceLoaded];
|
||||
|
||||
#ifdef RESIZE_WINDOW_FOR_DRAWER
|
||||
// Force the window to shrink and move if necessary in order to accommodate the sidebar.
|
||||
NSRect screenFrame = [[[self window] screen] visibleFrame];
|
||||
NSRect windowFrame = [[self window] frame];
|
||||
|
@ -361,9 +364,11 @@ static NSArray* sToolbarDefaults = nil;
|
|||
windowFrame.origin.x = newPosition;
|
||||
windowFrame.size.width = newWidth;
|
||||
mCachedFrameAfterDrawerOpen = windowFrame;
|
||||
[[self window] setFrame: windowFrame display: YES];
|
||||
[[self window] setFrame: windowFrame display: YES animate:NO]; // animation would be nice, but is too slow
|
||||
mDrawerCachedFrame = YES;
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
- (void)drawerDidOpen:(NSNotification *)aNotification
|
||||
|
@ -385,6 +390,7 @@ static NSArray* sToolbarDefaults = nil;
|
|||
// XXXdwh ignore for now.
|
||||
// [[mSidebarBrowserView getBrowserView] loadURI: @"about:blank" referrer:nil flags:NSLoadFlagsNone];
|
||||
|
||||
#ifdef RESIZE_WINDOW_FOR_DRAWER
|
||||
if (mDrawerCachedFrame) {
|
||||
mDrawerCachedFrame = NO;
|
||||
NSRect frame = [[self window] frame];
|
||||
|
@ -398,9 +404,11 @@ static NSArray* sToolbarDefaults = nil;
|
|||
printf("Widths are %f %f\n", frame.size.width, mCachedFrameAfterDrawerOpen.size.width);
|
||||
#endif
|
||||
// Restore the original frame.
|
||||
[[self window] setFrame: mCachedFrameBeforeDrawerOpen display: YES];
|
||||
[[self window] setFrame: mCachedFrameBeforeDrawerOpen display: YES animate:NO]; // animation would be nice
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
- (void)setupToolbar
|
||||
|
|
|
@ -60,19 +60,22 @@
|
|||
|
||||
- (void) ensureDataSourceLoaded
|
||||
{
|
||||
nsCOMPtr<nsIRDFContainer> ctr = do_CreateInstance("@mozilla.org/rdf/container;1");
|
||||
NS_ADDREF(mContainer = ctr);
|
||||
|
||||
nsCOMPtr<nsIRDFContainerUtils> ctrUtils = do_GetService("@mozilla.org/rdf/container-utils;1");
|
||||
NS_ADDREF(mContainerUtils = ctrUtils);
|
||||
|
||||
nsCOMPtr<nsIRDFService> rdfService = do_GetService("@mozilla.org/rdf/rdf-service;1");
|
||||
NS_ADDREF(mRDFService = rdfService);
|
||||
|
||||
mDataSource = nsnull;
|
||||
mRootResource = nsnull;
|
||||
if (!mContainer)
|
||||
{
|
||||
nsCOMPtr<nsIRDFContainer> ctr = do_CreateInstance("@mozilla.org/rdf/container;1");
|
||||
NS_ADDREF(mContainer = ctr);
|
||||
|
||||
nsCOMPtr<nsIRDFContainerUtils> ctrUtils = do_GetService("@mozilla.org/rdf/container-utils;1");
|
||||
NS_ADDREF(mContainerUtils = ctrUtils);
|
||||
|
||||
nsCOMPtr<nsIRDFService> rdfService = do_GetService("@mozilla.org/rdf/rdf-service;1");
|
||||
NS_ADDREF(mRDFService = rdfService);
|
||||
|
||||
mDictionary = [[NSMutableDictionary alloc] initWithCapacity: 30];
|
||||
|
||||
mDictionary = [[NSMutableDictionary alloc] initWithCapacity: 30];
|
||||
mDataSource = nsnull;
|
||||
mRootResource = nsnull;
|
||||
}
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
|
|
|
@ -27,15 +27,18 @@
|
|||
{
|
||||
[super ensureDataSourceLoaded];
|
||||
|
||||
// Get the Global History DataSource
|
||||
mRDFService->GetDataSource("rdf:history", &mDataSource);
|
||||
// Get the Date Folder Root
|
||||
mRDFService->GetResource("NC:HistoryByDate", &mRootResource);
|
||||
|
||||
[mOutlineView setTarget: self];
|
||||
[mOutlineView setDoubleAction: @selector(openHistoryItem:)];
|
||||
|
||||
[mOutlineView reloadData];
|
||||
if (!mDataSource)
|
||||
{
|
||||
// Get the Global History DataSource
|
||||
mRDFService->GetDataSource("rdf:history", &mDataSource);
|
||||
// Get the Date Folder Root
|
||||
mRDFService->GetResource("NC:HistoryByDate", &mRootResource);
|
||||
|
||||
[mOutlineView setTarget: self];
|
||||
[mOutlineView setDoubleAction: @selector(openHistoryItem:)];
|
||||
|
||||
[mOutlineView reloadData];
|
||||
}
|
||||
}
|
||||
|
||||
- (id) outlineView: (NSOutlineView*) aOutlineView objectValueForTableColumn: (NSTableColumn*) aTableColumn
|
||||
|
|
Загрузка…
Ссылка в новой задаче