mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 698042: Spinner style progress bar for browser toolbar (part 2) [r=mfinkle]
This commit is contained in:
parent
7a94572adb
commit
52f53b259e
@ -106,11 +106,6 @@ public class BrowserToolbar extends LinearLayout {
|
||||
mTabs.setImageResource(R.drawable.tabs_menu);
|
||||
}
|
||||
|
||||
public void updateProgress(int progress, int total) {
|
||||
mProgressBar.setVisibility(View.VISIBLE);
|
||||
mFavicon.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
public void setProgressVisibility(boolean visible) {
|
||||
mProgressBar.setVisibility(visible ? View.VISIBLE : View.GONE);
|
||||
mFavicon.setVisibility(visible ? View.GONE : View.VISIBLE);
|
||||
|
@ -735,13 +735,6 @@ abstract public class GeckoApp
|
||||
handleDocumentStop(tabId);
|
||||
}
|
||||
}
|
||||
} else if (event.equals("onProgressChange")) {
|
||||
final int tabId = message.getInt("tabID");
|
||||
final int current = message.getInt("current");
|
||||
final int total = message.getInt("total");
|
||||
|
||||
handleProgressChange(tabId, current, total);
|
||||
Log.i(LOG_NAME, "progress - " + current + "/" + total);
|
||||
} else if (event.equals("onCameraCapture")) {
|
||||
//GeckoApp.mAppContext.doCameraCapture(message.getString("path"));
|
||||
doCameraCapture();
|
||||
@ -871,7 +864,6 @@ abstract public class GeckoApp
|
||||
mMainHandler.post(new Runnable() {
|
||||
public void run() {
|
||||
mBrowserToolbar.setProgressVisibility(true);
|
||||
mBrowserToolbar.updateProgress(-1, -1);
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -901,21 +893,6 @@ abstract public class GeckoApp
|
||||
});
|
||||
}
|
||||
|
||||
void handleProgressChange(final int tabId, final int current, final int total) {
|
||||
Tab tab = Tabs.getInstance().getTab(tabId);
|
||||
if (tab == null)
|
||||
return;
|
||||
|
||||
if (!Tabs.getInstance().isSelectedTab(tab))
|
||||
return;
|
||||
|
||||
mMainHandler.post(new Runnable() {
|
||||
public void run() {
|
||||
mBrowserToolbar.updateProgress(current, total);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void handleShowToast(final String message, final String duration) {
|
||||
mMainHandler.post(new Runnable() {
|
||||
public void run() {
|
||||
@ -1168,7 +1145,6 @@ abstract public class GeckoApp
|
||||
GeckoAppShell.registerGeckoEventListener("log", GeckoApp.mAppContext);
|
||||
GeckoAppShell.registerGeckoEventListener("onLocationChange", GeckoApp.mAppContext);
|
||||
GeckoAppShell.registerGeckoEventListener("onStateChange", GeckoApp.mAppContext);
|
||||
GeckoAppShell.registerGeckoEventListener("onProgressChange", GeckoApp.mAppContext);
|
||||
GeckoAppShell.registerGeckoEventListener("onCameraCapture", GeckoApp.mAppContext);
|
||||
GeckoAppShell.registerGeckoEventListener("Tab:Added", GeckoApp.mAppContext);
|
||||
GeckoAppShell.registerGeckoEventListener("Tab:Closed", GeckoApp.mAppContext);
|
||||
@ -1367,7 +1343,6 @@ abstract public class GeckoApp
|
||||
GeckoAppShell.unregisterGeckoEventListener("log", GeckoApp.mAppContext);
|
||||
GeckoAppShell.unregisterGeckoEventListener("onLocationChange", GeckoApp.mAppContext);
|
||||
GeckoAppShell.unregisterGeckoEventListener("onStateChange", GeckoApp.mAppContext);
|
||||
GeckoAppShell.unregisterGeckoEventListener("onProgressChange", GeckoApp.mAppContext);
|
||||
GeckoAppShell.unregisterGeckoEventListener("onCameraCapture", GeckoApp.mAppContext);
|
||||
GeckoAppShell.unregisterGeckoEventListener("Tab:Added", GeckoApp.mAppContext);
|
||||
GeckoAppShell.unregisterGeckoEventListener("Tab:Closed", GeckoApp.mAppContext);
|
||||
@ -1642,7 +1617,6 @@ abstract public class GeckoApp
|
||||
AwesomeBar.Type type = AwesomeBar.Type.valueOf(data.getStringExtra(AwesomeBar.TYPE_KEY));
|
||||
if (url != null && url.length() > 0) {
|
||||
mBrowserToolbar.setProgressVisibility(true);
|
||||
mBrowserToolbar.updateProgress(-1, -1);
|
||||
loadUrl(url, type);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user