Skip to content

Commit

Permalink
Fix for the dockbar items getting messed upon receiving a shortcut fr…
Browse files Browse the repository at this point in the history
…om an intent.

Closes #3.
  • Loading branch information
AnderWeb committed Jun 22, 2010
1 parent 8788b9a commit 6511dbe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/org/adw/launcher/InstallShortcutReceiver.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ public void onReceive(Context context, Intent data) {

if (!installShortcut(context, data, screen)) {
// The target screen is full, let's try the other screens
for (int i = 0; i < Launcher.SCREEN_COUNT; i++) {
final int count=Launcher.getScreenCount(context);
for (int i = 0; i < count; i++) {
if (i != screen && installShortcut(context, data, i)) break;
}
}
Expand Down
6 changes: 5 additions & 1 deletion src/org/adw/launcher/Launcher.java
Original file line number Diff line number Diff line change
Expand Up @@ -1707,7 +1707,8 @@ private void bindDesktopItems(ArrayList<ItemInfo> shortcuts,
for (int i = 0; i < count; i++) {
((ViewGroup) workspace.getChildAt(i)).removeAllViewsInLayout();
}

final MiniLauncher miniLauncher=(MiniLauncher) mDragLayer.findViewById(R.id.mini_content);
miniLauncher.removeAllViewsInLayout();
if (DEBUG_USER_INTERFACE) {
android.widget.Button finishButton = new android.widget.Button(this);
finishButton.setText("Finish");
Expand Down Expand Up @@ -3200,5 +3201,8 @@ private void realAddSearch(Widget info,final CellLayout.CellInfo cellInfo,final
mWorkspace.addInCurrentScreen(view, xy[0], xy[1], spanX, spanY);

}
public static int getScreenCount(Context context){
return AlmostNexusSettingsHelper.getDesktopScreens(context);
}

}

0 comments on commit 6511dbe

Please sign in to comment.