diff options
Diffstat (limited to 'src/com/android/browser')
-rw-r--r-- | src/com/android/browser/BrowserBookmarksPage.java | 9 | ||||
-rw-r--r-- | src/com/android/browser/BrowserHistoryPage.java | 6 |
2 files changed, 14 insertions, 1 deletions
diff --git a/src/com/android/browser/BrowserBookmarksPage.java b/src/com/android/browser/BrowserBookmarksPage.java index dd34c14..45fca87 100644 --- a/src/com/android/browser/BrowserBookmarksPage.java +++ b/src/com/android/browser/BrowserBookmarksPage.java @@ -44,6 +44,7 @@ import android.view.ViewGroup; import android.view.ContextMenu.ContextMenuInfo; import android.widget.AdapterView; import android.widget.ListView; +import android.widget.Toast; /** * View showing the user's bookmarks in the browser. @@ -107,7 +108,13 @@ public class BrowserBookmarksPage extends Activity implements break; case R.id.copy_url_context_menu_id: copy(getUrl(i.position)); - + break; + case R.id.homepage_context_menu_id: + BrowserSettings.getInstance().setHomePage(this, + getUrl(i.position)); + Toast.makeText(this, R.string.homepage_set, + Toast.LENGTH_LONG).show(); + break; default: return super.onContextItemSelected(item); } diff --git a/src/com/android/browser/BrowserHistoryPage.java b/src/com/android/browser/BrowserHistoryPage.java index 2b781a1..e333416 100644 --- a/src/com/android/browser/BrowserHistoryPage.java +++ b/src/com/android/browser/BrowserHistoryPage.java @@ -49,6 +49,7 @@ import android.widget.ExpandableListAdapter; import android.widget.ExpandableListView; import android.widget.ExpandableListView.ExpandableListContextMenuInfo; import android.widget.TextView; +import android.widget.Toast; import java.util.List; import java.util.Vector; @@ -222,6 +223,11 @@ public class BrowserHistoryPage extends ExpandableListActivity { Browser.deleteFromHistory(getContentResolver(), url); mAdapter.refreshData(); return true; + case R.id.homepage_context_menu_id: + BrowserSettings.getInstance().setHomePage(this, url); + Toast.makeText(this, R.string.homepage_set, + Toast.LENGTH_LONG).show(); + return true; default: break; } |