[haiku-commits] r35388 - haiku/trunk/src/kits/tracker

  • From: mmlr@xxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 2 Feb 2010 18:37:53 +0100 (CET)

Author: mmlr
Date: 2010-02-02 18:37:53 +0100 (Tue, 02 Feb 2010)
New Revision: 35388
Changeset: http://dev.haiku-os.org/changeset/35388/haiku

Modified:
   haiku/trunk/src/kits/tracker/PoseView.cpp
Log:
No need to lock out the normal typeahead when filtering doesn't apply (i.e. in
icon mode). And a little automatic whitespace cleanup.


Modified: haiku/trunk/src/kits/tracker/PoseView.cpp
===================================================================
--- haiku/trunk/src/kits/tracker/PoseView.cpp   2010-02-02 08:58:36 UTC (rev 
35387)
+++ haiku/trunk/src/kits/tracker/PoseView.cpp   2010-02-02 17:37:53 UTC (rev 
35388)
@@ -771,8 +771,8 @@
                                if (FSGetDeskDir(&dir) == B_OK) {
                                        const char *poseInfoAttr = isTrash ? 
kAttrTrashPoseInfo
                                                : kAttrDisksPoseInfo;
-                                       const char *poseInfoAttrForeign = 
isTrash 
-                                               ? kAttrTrashPoseInfoForeign 
+                                       const char *poseInfoAttrForeign = 
isTrash
+                                               ? kAttrTrashPoseInfoForeign
                                                : kAttrDisksPoseInfoForeign;
                                                if (dir.WriteAttr(poseInfoAttr, 
B_RAW_TYPE, 0,
                                                &poseInfo, sizeof(poseInfo)) == 
sizeof(poseInfo))
@@ -1600,7 +1600,7 @@
                BDirectory trash;
                BEntry entry;
                node_ref ref;
-               if (FSGetTrashDir(&trash, volume.Device()) == B_OK 
+               if (FSGetTrashDir(&trash, volume.Device()) == B_OK
                        && trash.GetEntry(&entry) == B_OK && 
entry.GetNodeRef(&ref) == B_OK) {
                        WatchNewNode(&ref);
                        Model *model = new Model(&entry);
@@ -1878,7 +1878,7 @@
 {
        if (!PoseVisible(model, poseInfo))
                return false;
-               
+
        // check filter before adding item
        if (!fRefFilter)
                return true;
@@ -2713,7 +2713,7 @@
        BModelOpener opener(model);
        if (!model->Node())
                return;
-       
+
        ReadAttrResult result = kReadAttrFailed;
        BEntry entry;
        model->GetEntry(&entry);
@@ -2724,9 +2724,9 @@
        if (model->IsRoot() || isTrash) {
                BDirectory dir;
                if (FSGetDeskDir(&dir) == B_OK) {
-                       const char *poseInfoAttr = isTrash ? kAttrTrashPoseInfo 
+                       const char *poseInfoAttr = isTrash ? kAttrTrashPoseInfo
                                : kAttrDisksPoseInfo;
-                       const char *poseInfoAttrForeign = isTrash ? 
kAttrTrashPoseInfoForeign 
+                       const char *poseInfoAttrForeign = isTrash ? 
kAttrTrashPoseInfoForeign
                                : kAttrDisksPoseInfoForeign;
                        result = ReadAttr(&dir, poseInfoAttr, 
poseInfoAttrForeign,
                                B_RAW_TYPE, 0, poseInfo, sizeof(*poseInfo), 
&PoseInfo::EndianSwap);
@@ -6107,8 +6107,10 @@
                        if (IsFilePanel())
                                _inherited::KeyDown(bytes, count);
                        else {
-                               if (TrackerSettings().TypeAheadFiltering())
+                               if (ViewMode() == kListMode
+                                       && 
TrackerSettings().TypeAheadFiltering()) {
                                        break;
+                               }
 
                                if (fSelectionList->IsEmpty())
                                        sMatchString.Truncate(0);
@@ -6153,7 +6155,7 @@
 
                case B_BACKSPACE:
                {
-                       if (TrackerSettings().TypeAheadFiltering()) {
+                       if (fFiltering) {
                                BString *lastString = fFilterStrings.LastItem();
                                if (lastString->Length() == 0) {
                                        int32 stringCount = 
fFilterStrings.CountItems();
@@ -6193,7 +6195,8 @@
                {
                        // handle typeahead selection / filtering
 
-                       if (TrackerSettings().TypeAheadFiltering()) {
+                       if (ViewMode() == kListMode
+                               && TrackerSettings().TypeAheadFiltering()) {
                                if (key == ' ' && modifiers() & B_SHIFT_KEY) {
                                        if (fFilterStrings.LastItem()->Length() 
== 0)
                                                break;


Other related posts:

  • » [haiku-commits] r35388 - haiku/trunk/src/kits/tracker - mmlr