Skip to content

Commit

Permalink
* fixed editing of folders within the drawer
Browse files Browse the repository at this point in the history
* cleanup
  • Loading branch information
boombuler committed Apr 11, 2011
1 parent 33c5d73 commit 65916de
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 16 deletions.
1 change: 0 additions & 1 deletion src/org/adw/launcher2/AllApps2D.java
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,6 @@ public void addApps(ArrayList<? extends IconItemInfo> list) {

for (int i=0; i<N; i++) {
final IconItemInfo item = list.get(i);
Log.d("BOOMBULER", "adding: "+item.getClass().getName());
int index = Collections.binarySearch(mAllAppsList, item, Preferences.getInstance().getCurrentDrawerComparator());
if (index < 0) {
index = -(index+1);
Expand Down
1 change: 0 additions & 1 deletion src/org/adw/launcher2/CustomShirtcutActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ private IconItemInfo getShortcutInfo() {
intent.getAction().equals(Intent.ACTION_EDIT)
&& intent.hasExtra(EXTRA_APPLICATIONINFO)) {
long id = intent.getLongExtra(EXTRA_APPLICATIONINFO, 0);

ItemInfo info = null;
if ( intent.hasExtra(EXTRA_DRAWERINFO) )
{
Expand Down
13 changes: 10 additions & 3 deletions src/org/adw/launcher2/Launcher.java
Original file line number Diff line number Diff line change
Expand Up @@ -694,9 +694,16 @@ private void completeEditShirtcut(Intent data) {
((ShortcutInfo)info).intent = data.getParcelableExtra(Intent.EXTRA_SHORTCUT_INTENT);
LauncherModel.updateItemInDatabase(this, info);
// Need to update the icon here!
View v = mWorkspace.findViewWithTag(info);
if (v instanceof BubbleTextView)
((BubbleTextView)v).updateFromItemInfo(mIconCache, info);
if (ii.container == Favorites.CONTAINER_DRAWER) {
ArrayList<IconItemInfo> lst = new ArrayList<IconItemInfo>();
lst.add(info);
mAllAppsGrid.updateApps(lst);
}
else {
View v = mWorkspace.findViewWithTag(info);
if (v instanceof BubbleTextView)
((BubbleTextView)v).updateFromItemInfo(mIconCache, info);
}
}
}
}
Expand Down
6 changes: 4 additions & 2 deletions src/org/adw/launcher2/LauncherModel.java
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,10 @@ public ItemInfo getItemInfoById(long id) {
if (ii.id == id)
return ii;
}
for(IconItemInfo ii : mAdditionalDrawerItems) {
if (ii.id == id)
return ii;
}
return null;
}

Expand Down Expand Up @@ -963,10 +967,8 @@ private void loadWorkspace() {
}

if (mAdditionalDrawerItems.size() > 0) {
Log.d("BOOMBULER", "found Drawer Items:"+mAdditionalDrawerItems.size());
Callbacks cbs = mCallbacks.get();
if (cbs != null) {
Log.d("BOOMBULER", "callbacks ok!");
cbs.bindAppsAdded(mAdditionalDrawerItems);
}
}
Expand Down
2 changes: 0 additions & 2 deletions src/org/adw/launcher2/appdb/AppDBProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import android.database.sqlite.SQLiteQueryBuilder;
import android.net.Uri;
import android.text.TextUtils;
import android.util.Log;

public class AppDBProvider extends ContentProvider {
static final String AUTHORITY = "org.adw.launcher2.appdb";
Expand Down Expand Up @@ -113,7 +112,6 @@ public Cursor query(Uri uri, String[] projection, String selection,
AppInfos.LAST_LAUNCHED + " = "+ curUnixTime +
" WHERE substr("+AppInfos.COMPONENT_NAME + ",1,"+ cPathName.length() +") = ?",
new String[] { cPathName.toString() });
Log.d("BOOMBULER", "updated LC for: "+cPathName.toString());
} finally {
db.close();
}
Expand Down
7 changes: 0 additions & 7 deletions src/org/adw/launcher2/settings/LauncherActionPreference.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,4 @@ public void onClick(DialogInterface dialog, int which) {
});
builder.create().show();
}

/*@Override
public void setValueIndex(int index) {
Log.d("BOOMBULER", "setValue: "+index);
super.setValueIndex(index);
}*/

}

0 comments on commit 65916de

Please sign in to comment.