mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 760267: Making the menu variable a member variable than a static variable. r=blassey
This commit is contained in:
parent
3b596c5f53
commit
acd1901e47
@ -93,7 +93,7 @@ abstract public class GeckoApp
|
||||
public static GeckoApp mAppContext;
|
||||
public static boolean mDOMFullScreen = false;
|
||||
protected MenuPanel mMenuPanel;
|
||||
public static Menu sMenu;
|
||||
public Menu sMenu;
|
||||
private static GeckoThread sGeckoThread = null;
|
||||
public Handler mMainHandler;
|
||||
private GeckoProfile mProfile;
|
||||
@ -1029,10 +1029,11 @@ abstract public class GeckoApp
|
||||
handleDoorHangerRemove(message);
|
||||
} else if (event.equals("Gecko:Ready")) {
|
||||
sIsGeckoReady = true;
|
||||
final Menu menu = sMenu;
|
||||
mMainHandler.post(new Runnable() {
|
||||
public void run() {
|
||||
if (sMenu != null)
|
||||
sMenu.findItem(R.id.settings).setEnabled(true);
|
||||
if (menu != null)
|
||||
menu.findItem(R.id.settings).setEnabled(true);
|
||||
}
|
||||
});
|
||||
setLaunchState(GeckoApp.LaunchState.GeckoRunning);
|
||||
@ -1088,10 +1089,11 @@ abstract public class GeckoApp
|
||||
} else if (event.equals("CharEncoding:State")) {
|
||||
final boolean visible = message.getString("visible").equals("true");
|
||||
GeckoPreferences.setCharEncodingState(visible);
|
||||
final Menu menu = sMenu;
|
||||
mMainHandler.post(new Runnable() {
|
||||
public void run() {
|
||||
if (sMenu != null)
|
||||
sMenu.findItem(R.id.char_encoding).setVisible(visible);
|
||||
if (menu != null)
|
||||
menu.findItem(R.id.char_encoding).setVisible(visible);
|
||||
}
|
||||
});
|
||||
} else if (event.equals("Update:Restart")) {
|
||||
|
Loading…
Reference in New Issue
Block a user