From b9b6137a6b7553f3bd1a394a8406ca501b343c97 Mon Sep 17 00:00:00 2001
From: Paradoxon <two4god@gmail.com>
Date: Sat, 9 Jul 2016 16:07:26 +0200
Subject: [PATCH] WebPositive - dont load history if a ref is recived
---
src/apps/webpositive/BrowserApp.cpp | 46 ++++++++++++++++++-------------------
1 file changed, 22 insertions(+), 24 deletions(-)
diff --git a/src/apps/webpositive/BrowserApp.cpp b/src/apps/webpositive/BrowserApp.cpp
index ef865af..329556f 100644
a
|
b
|
BrowserApp::ReadyToRun()
|
230 | 230 | delete fLaunchRefsMessage; |
231 | 231 | fLaunchRefsMessage = NULL; |
232 | 232 | } |
233 | | |
234 | | BMessage archivedWindow; |
235 | | for (int i = 0; fSession->FindMessage("window", i, &archivedWindow) == B_OK; |
236 | | i++) { |
237 | | |
238 | | BRect frame = archivedWindow.FindRect("window frame"); |
239 | | BString url; |
240 | | archivedWindow.FindString("tab", 0, &url); |
241 | | BrowserWindow* window = new(std::nothrow) BrowserWindow(frame, |
242 | | fSettings, url, fContext); |
243 | | |
244 | | if (window != NULL) { |
245 | | window->Show(); |
246 | | pagesCreated++; |
247 | | |
248 | | for (int j = 1; archivedWindow.FindString("tab", j, &url) == B_OK; |
249 | | j++) { |
250 | | printf("Create %d:%d\n", i, j); |
251 | | _CreateNewTab(window, url, false); |
| 233 | if (pagesCreated == 0){ |
| 234 | BMessage archivedWindow; |
| 235 | for (int i = 0; fSession->FindMessage("window", i, &archivedWindow) == B_OK; |
| 236 | i++) { |
| 237 | BRect frame = archivedWindow.FindRect("window frame"); |
| 238 | BString url; |
| 239 | archivedWindow.FindString("tab", 0, &url); |
| 240 | BrowserWindow* window = new(std::nothrow) BrowserWindow(frame, |
| 241 | fSettings, url, fContext); |
| 242 | |
| 243 | if (window != NULL) { |
| 244 | window->Show(); |
252 | 245 | pagesCreated++; |
| 246 | |
| 247 | for (int j = 1; archivedWindow.FindString("tab", j, &url) == B_OK; |
| 248 | j++) { |
| 249 | printf("Create %d:%d\n", i, j); |
| 250 | _CreateNewTab(window, url, false); |
| 251 | pagesCreated++; |
| 252 | } |
253 | 253 | } |
254 | 254 | } |
| 255 | if (pagesCreated == 0) |
| 256 | _CreateNewWindow("", fullscreen); |
| 257 | PostMessage(PRELOAD_BROWSING_HISTORY); |
255 | 258 | } |
256 | | |
257 | | if (pagesCreated == 0) |
258 | | _CreateNewWindow("", fullscreen); |
259 | | |
260 | | PostMessage(PRELOAD_BROWSING_HISTORY); |
261 | 259 | } |
262 | 260 | |
263 | 261 | |