mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 719434 - Purge session files when clearing history and update about:home accordingly (r=mfinkle)
This commit is contained in:
parent
cdf67883cc
commit
61a0b171d9
@ -205,6 +205,13 @@ public class AboutHomeContent extends ScrollView {
|
||||
});
|
||||
}
|
||||
|
||||
void setLastTabsVisibility(boolean visible) {
|
||||
int visibility = visible ? View.VISIBLE : View.GONE;
|
||||
findViewById(R.id.last_tabs_title).setVisibility(visibility);
|
||||
findViewById(R.id.last_tabs).setVisibility(visibility);
|
||||
findViewById(R.id.last_tabs_open_all).setVisibility(visibility);
|
||||
}
|
||||
|
||||
private void setAddonsVisibility(boolean visible) {
|
||||
int visibility = visible ? View.VISIBLE : View.GONE;
|
||||
findViewById(R.id.recommended_addons_title).setVisibility(visibility);
|
||||
|
@ -67,6 +67,7 @@ class ConfirmPreference extends DialogPreference {
|
||||
public void run() {
|
||||
BrowserDB.clearHistory(mContext.getContentResolver());
|
||||
GeckoApp.mAppContext.mFavicons.clearFavicons();
|
||||
GeckoAppShell.sendEventToGecko(GeckoEvent.createBroadcastEvent("browser:purge-session-history", null));
|
||||
}
|
||||
});
|
||||
} else if ("clear_private_data".equalsIgnoreCase(mAction)) {
|
||||
|
@ -1101,6 +1101,14 @@ abstract public class GeckoApp
|
||||
}
|
||||
});
|
||||
}
|
||||
} else if (event.equals("Session:StatePurged")) {
|
||||
if (mAboutHomeContent != null) {
|
||||
mMainHandler.post(new Runnable() {
|
||||
public void run() {
|
||||
mAboutHomeContent.setLastTabsVisibility(false);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Log.e(LOGTAG, "Exception handling message \"" + event + "\":", e);
|
||||
@ -1818,6 +1826,7 @@ abstract public class GeckoApp
|
||||
GeckoAppShell.registerGeckoEventListener("CharEncoding:State", GeckoApp.mAppContext);
|
||||
GeckoAppShell.registerGeckoEventListener("Update:Restart", GeckoApp.mAppContext);
|
||||
GeckoAppShell.registerGeckoEventListener("Tab:HasTouchListener", GeckoApp.mAppContext);
|
||||
GeckoAppShell.registerGeckoEventListener("Session:StatePurged", GeckoApp.mAppContext);
|
||||
|
||||
mConnectivityFilter = new IntentFilter();
|
||||
mConnectivityFilter.addAction(ConnectivityManager.CONNECTIVITY_ACTION);
|
||||
@ -2165,6 +2174,7 @@ abstract public class GeckoApp
|
||||
GeckoAppShell.unregisterGeckoEventListener("CharEncoding:Data", GeckoApp.mAppContext);
|
||||
GeckoAppShell.unregisterGeckoEventListener("CharEncoding:State", GeckoApp.mAppContext);
|
||||
GeckoAppShell.unregisterGeckoEventListener("Tab:HasTouchListener", GeckoApp.mAppContext);
|
||||
GeckoAppShell.unregisterGeckoEventListener("Session:StatePurged", GeckoApp.mAppContext);
|
||||
|
||||
mFavicons.close();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user