diff --git a/android/src/com/mapswithme/maps/bookmarks/BookmarkActivity.java b/android/src/com/mapswithme/maps/bookmarks/BookmarkActivity.java index 108ccf5272..7ccc6bc8ab 100644 --- a/android/src/com/mapswithme/maps/bookmarks/BookmarkActivity.java +++ b/android/src/com/mapswithme/maps/bookmarks/BookmarkActivity.java @@ -42,7 +42,7 @@ public class BookmarkActivity extends AbstractBookmarkActivity private List mIcons; private ImageView mChooserImage; private EditText mDescr; - private Icon m_icon = null; + private Icon mIcon = null; @Override public void onCreate(Bundle savedInstanceState) @@ -51,10 +51,11 @@ public class BookmarkActivity extends AbstractBookmarkActivity setContentView(R.layout.add_or_edit_bookmark); + // Note that Point result from the intent is actually a pair of (category index, bookmark index in category). assert(getIntent().getExtras().containsKey(PIN)); - final Point p = ((ParcelablePoint)getIntent().getParcelableExtra(PIN)).getPoint(); + final Point cab = ((ParcelablePoint)getIntent().getParcelableExtra(PIN)).getPoint(); - mPin = mManager.getBookmark(p.x, p.y); + mPin = mManager.getBookmark(cab.x, cab.y); mCurrentCategoryId = mPin.getCategoryId(); setTitle(mPin.getName()); @@ -63,8 +64,8 @@ public class BookmarkActivity extends AbstractBookmarkActivity private void updateColorChooser(Icon icon) { - m_icon = icon; - mChooserImage.setImageBitmap(m_icon.getIcon()); + mIcon = icon; + mChooserImage.setImageBitmap(mIcon.getIcon()); } private void refreshValuesInViews() @@ -136,7 +137,7 @@ public class BookmarkActivity extends AbstractBookmarkActivity private void assignPinParams() { if (mPin != null) - mPin.setParams(mName.getText().toString(), m_icon, mDescr.getText().toString()); + mPin.setParams(mName.getText().toString(), mIcon, mDescr.getText().toString()); } @Override diff --git a/android/src/com/mapswithme/maps/bookmarks/ChooseBookmarkCategoryActivity.java b/android/src/com/mapswithme/maps/bookmarks/ChooseBookmarkCategoryActivity.java index 884579c1e4..16ffb807fc 100644 --- a/android/src/com/mapswithme/maps/bookmarks/ChooseBookmarkCategoryActivity.java +++ b/android/src/com/mapswithme/maps/bookmarks/ChooseBookmarkCategoryActivity.java @@ -43,7 +43,8 @@ public class ChooseBookmarkCategoryActivity extends AbstractBookmarkCategoryActi m_handler.switchToAddButton(); mAdapter.chooseItem(position); - Point cab = ((ParcelablePoint)getIntent().getParcelableExtra(BookmarkActivity.PIN)).getPoint(); + // Note that Point result from the intent is actually a pair of (category index, bookmark index in category). + final Point cab = ((ParcelablePoint)getIntent().getParcelableExtra(BookmarkActivity.PIN)).getPoint(); Bookmark bmk = mManager.getBookmark(cab.x, cab.y); bmk.setCategoryId(position); getIntent().putExtra(BookmarkActivity.PIN, new ParcelablePoint(position, bmk.getBookmarkId())); @@ -160,6 +161,7 @@ public class ChooseBookmarkCategoryActivity extends AbstractBookmarkCategoryActi private void createNewCategory(String name) { + // Note that Point result from the intent is actually a pair of (category index, bookmark index in category). final Point cab = ((ParcelablePoint)getIntent().getParcelableExtra(BookmarkActivity.PIN)).getPoint(); final int index = mManager.createCategory(mManager.getBookmark(cab.x, cab.y), name); diff --git a/qt/search_panel.cpp b/qt/search_panel.cpp index 8469ed08e4..185e134826 100644 --- a/qt/search_panel.cpp +++ b/qt/search_panel.cpp @@ -108,8 +108,6 @@ namespace return pm; } */ - - char const * SEARCH_CATEGORY = "Search"; } void SearchPanel::OnSearchResult(ResultsT * res)