[haiku-commits] haiku: hrev49314 - in src: add-ons/tracker/zipomatic kits/tracker add-ons/tracker/opentargetfolder

  • From: jscipione@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 21 Jun 2015 04:48:28 +0200 (CEST)

hrev49314 adds 3 changesets to branch 'master'
old head: 60295ba1f7c2326d376f19415366b86afb98b118
new head: 969a5d2fac18758844b4653622181d4863ea6817
overview:
http://cgit.haiku-os.org/haiku/log/?qt=range&q=969a5d2fac18+%5E60295ba1f7c2

----------------------------------------------------------------------------

ee5588f2abff: Revert "Partially revert "Zip-O-Matic: fix zipping single
folder.""

This reverts commit 1639fe99dbbea9204ba8cf5edb5b67697da70b0e.

134b3a71393b: Revert "Zip-O-Matic: fix zipping single folder."

This reverts commit d1d90b0462faa82489e446a6e25337602939993e.

969a5d2fac18: Fix mess in Tracker add-ons created in hrev48858

Revert the Tracker portions of hrev48858, they were not needed and were not
right either... sorry guys

OpenTargetFolder add-on modified slightly to use the passed in symlink(s)
only,
the parent directory ref is unused, it appears to be unneeded here also.

With this and the reverted commits Zip-O-Matic and other add-ons should
work again.

Fixes #12105

[ John Scipione <jscipione@xxxxxxxxx> ]

----------------------------------------------------------------------------

3 files changed, 16 insertions(+), 18 deletions(-)
.../opentargetfolder/opentargetfolder.cpp | 2 +-
src/add-ons/tracker/zipomatic/ZipperThread.cpp | 25 +++++++++++---------
src/kits/tracker/ContainerWindow.cpp | 7 +-----

############################################################################

Commit: ee5588f2abffbca585252c7b6948f8cd9f6ac3f0
URL: http://cgit.haiku-os.org/haiku/commit/?id=ee5588f2abff
Author: John Scipione <jscipione@xxxxxxxxx>
Date: Sun Jun 21 02:37:53 2015 UTC

Revert "Partially revert "Zip-O-Matic: fix zipping single folder.""

This reverts commit 1639fe99dbbea9204ba8cf5edb5b67697da70b0e.

----------------------------------------------------------------------------

diff --git a/src/add-ons/tracker/zipomatic/ZipperThread.cpp
b/src/add-ons/tracker/zipomatic/ZipperThread.cpp
index b49855e..dfe5d63 100644
--- a/src/add-ons/tracker/zipomatic/ZipperThread.cpp
+++ b/src/add-ons/tracker/zipomatic/ZipperThread.cpp
@@ -95,12 +95,7 @@ ZipperThread::ThreadStartup()

BString archiveName;

- if (gotDirRef) {
- BEntry entry(&dirRef);
- BPath path;
- entry.GetPath(&path);
- archiveName = path.Path();
- } else if (sameFolder) {
+ if (gotDirRef || sameFolder) {
BEntry entry(&lastRef);
BPath path;
entry.GetParent(&entry);

############################################################################

Commit: 134b3a71393ba923b566b4a8f5d5d2ae96593918
URL: http://cgit.haiku-os.org/haiku/commit/?id=134b3a71393b
Author: John Scipione <jscipione@xxxxxxxxx>
Date: Sun Jun 21 02:38:10 2015 UTC

Revert "Zip-O-Matic: fix zipping single folder."

This reverts commit d1d90b0462faa82489e446a6e25337602939993e.

----------------------------------------------------------------------------

diff --git a/src/add-ons/tracker/zipomatic/ZipperThread.cpp
b/src/add-ons/tracker/zipomatic/ZipperThread.cpp
index dfe5d63..2a6c690 100644
--- a/src/add-ons/tracker/zipomatic/ZipperThread.cpp
+++ b/src/add-ons/tracker/zipomatic/ZipperThread.cpp
@@ -93,25 +93,29 @@ ZipperThread::ThreadStartup()
gotDirRef = true;
}

- BString archiveName;
-
- if (gotDirRef || sameFolder) {
+ if (gotDirRef) {
+ BEntry entry(&dirRef);
+ BPath path;
+ entry.GetPath(&path);
+ chdir(path.Path());
+ } else if (sameFolder) {
BEntry entry(&lastRef);
BPath path;
entry.GetParent(&entry);
entry.GetPath(&path);
- archiveName = path.Path();
+ chdir(path.Path());
} else {
BPath path;
if (find_directory(B_DESKTOP_DIRECTORY, &path) == B_OK)
- archiveName = path.Path();
+ chdir(path.Path());
}
- archiveName.Append("/");
+
+ BString archiveName;

if (refCount > 1)
- archiveName.Append(B_TRANSLATE("Archive"));
+ archiveName = B_TRANSLATE("Archive");
else
- archiveName.Append(lastRef.name);
+ archiveName = lastRef.name;

int index = 1;
for (;; index++) {
@@ -140,9 +144,13 @@ ZipperThread::ThreadStartup()
for (int index = 0; index < refCount; index++) {
fThreadDataStore->FindRef("refs", index, &ref);

- BPath path(&ref);
- BString file = path.Path();
- argv[3 + index] = strdup(path.Path());
+ if (gotDirRef || sameFolder) {
+ argv[3 + index] = strdup(ref.name);
+ } else {
+ BPath path(&ref);
+ BString file = path.Path();
+ argv[3 + index] = strdup(path.Path());
+ }
}

argv[argc] = NULL;

############################################################################

Revision: hrev49314
Commit: 969a5d2fac18758844b4653622181d4863ea6817
URL: http://cgit.haiku-os.org/haiku/commit/?id=969a5d2fac18
Author: John Scipione <jscipione@xxxxxxxxx>
Date: Sun Jun 21 02:39:54 2015 UTC

Ticket: https://dev.haiku-os.org/ticket/12105

Fix mess in Tracker add-ons created in hrev48858

Revert the Tracker portions of hrev48858, they were not needed and were not
right either... sorry guys

OpenTargetFolder add-on modified slightly to use the passed in symlink(s) only,
the parent directory ref is unused, it appears to be unneeded here also.

With this and the reverted commits Zip-O-Matic and other add-ons should
work again.

Fixes #12105

----------------------------------------------------------------------------

diff --git a/src/add-ons/tracker/opentargetfolder/opentargetfolder.cpp
b/src/add-ons/tracker/opentargetfolder/opentargetfolder.cpp
index 47109f4..6793592 100644
--- a/src/add-ons/tracker/opentargetfolder/opentargetfolder.cpp
+++ b/src/add-ons/tracker/opentargetfolder/opentargetfolder.cpp
@@ -50,7 +50,7 @@ process_refs(entry_ref directoryRef, BMessage* message, void*)
break;
}

- BEntry targetEntry(&directoryRef, true);
+ BEntry targetEntry(&ref, true);
if (targetEntry.InitCheck() != B_OK) {
BAlert* alert = new BAlert("Open Target Folder",
"Cannot open target entry. Maybe this link is
broken?",
diff --git a/src/kits/tracker/ContainerWindow.cpp
b/src/kits/tracker/ContainerWindow.cpp
index 4f5d5a4..e09c09e 100644
--- a/src/kits/tracker/ContainerWindow.cpp
+++ b/src/kits/tracker/ContainerWindow.cpp
@@ -3223,13 +3223,8 @@ BContainerWindow::LoadAddOn(BMessage* message)

refs->AddMessenger("TrackerViewToken", BMessenger(PoseView()));

- const entry_ref* modelRef = TargetModel()->IsContainer()
- && selectionList->ItemAt(0) != NULL
- ? selectionList->ItemAt(0)->TargetModel()->EntryRef()
- : TargetModel()->EntryRef();
-
LaunchInNewThread("Add-on", B_NORMAL_PRIORITY, &AddOnThread, refs,
- addonRef, *modelRef);
+ addonRef, *TargetModel()->EntryRef());
}




Other related posts:

  • » [haiku-commits] haiku: hrev49314 - in src: add-ons/tracker/zipomatic kits/tracker add-ons/tracker/opentargetfolder - jscipione