platform/bb/rhodes/src/rhomobile/RhodesApplication.java in rhodes-2.0.0.beta2 vs platform/bb/rhodes/src/rhomobile/RhodesApplication.java in rhodes-2.0.0.beta3
- old
+ new
@@ -60,10 +60,11 @@
public static final String LABEL_SYNC = "Sync";
public static final String LABEL_OPTIONS = "Options";
public static final String LABEL_LOG = "Log";
public static final String LABEL_SEPARATOR = "separator";
public static final String LABEL_CLOSE = "Close";
+ public static final String LABEL_EXIT = "Exit";
public static final String LABEL_NONE = "none";
private static final RhoLogger LOG = RhoLogger.RHO_STRIP_LOG ? new RhoEmptyLogger() :
new RhoLogger("RhodesApplication");
@@ -778,11 +779,12 @@
} else if (value.equalsIgnoreCase(RhodesApplication.LABEL_LOG)) {
setDefaultItemToMenuItems(label, logItem);
} else if (label.equalsIgnoreCase(RhodesApplication.LABEL_SEPARATOR) ||
(value != null && value.equalsIgnoreCase(RhodesApplication.LABEL_SEPARATOR))) {
menuItems.addElement(separatorItem);
- } else if (value.equalsIgnoreCase(RhodesApplication.LABEL_CLOSE)) {
+ } else if (value.equalsIgnoreCase(RhodesApplication.LABEL_CLOSE) ||
+ value.equalsIgnoreCase(RhodesApplication.LABEL_EXIT)) {
setDefaultItemToMenuItems(label, closeItem);
} else if (label.equalsIgnoreCase(RhodesApplication.LABEL_NONE)) {
menuItems = null;
} else {
if ( label.equalsIgnoreCase("back") )
@@ -988,10 +990,23 @@
m_oBrowserAdapter.executeJavascript(url);
}
} );
}
+ private Hashtable cookies = new Hashtable();
+
+ public String getCookie(String url) {
+ Object c = cookies.get(url);
+ if (c instanceof String)
+ return (String)c;
+ return null;
+ }
+
+ public void setCookie(String url, String cookie) {
+ cookies.put(url, cookie);
+ }
+
private void createBrowserControl()
{
//touch;5
String strFullBrowser = RhoConf.getInstance().getString("use_bb_full_browser");
boolean bTouch = strFullBrowser.indexOf("touch") >= 0;
@@ -1084,14 +1099,10 @@
invokeStartupWork();
}
}
public void refreshCurrentPage(){
- navigateUrl(getCurrentPageUrl());
- }
-
- public String getCurrentPageUrl(){
- return (String)_history.lastElement();
+ navigateUrl((String)_history.lastElement());
}
void navigateHome(){
String strHomePage = RhoRuby.getStartPage();
String strStartPage = _httpRoot;