Skip to content

Commit

Permalink
new 4DPop compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
vdelachaux committed May 3, 2023
1 parent 88d0c5d commit 3c9f907
Show file tree
Hide file tree
Showing 30 changed files with 227 additions and 152 deletions.
Binary file modified Build/Components/4DPop Image Buddy.4dbase/4DPop Image Buddy.4DZ
Binary file not shown.
8 changes: 4 additions & 4 deletions Build/Components/4DPop Image Buddy.4dbase/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
<key>CFBundleName</key>
<string>4DPop Image Buddy</string>
<key>CFBundleShortVersionString</key>
<string>19R8</string>
<string>20R2</string>
<key>CFBundleLongVersionString</key>
<string>19R8 (295)</string>
<string>20R2 (296)</string>
<key>NSHumanReadableCopyright</key>
<string>©vdl 2007-2023</string>
<key>CFBundleVersion</key>
<string>296</string>
<string>297</string>
<key>CSResourcesFileMapped</key>
<string></string>
<key>CFBundleGetInfoString</key>
<string>19R8</string>
<string>20R2</string>
<key>CFBundleDisplayName</key>
<string>4DPop Image Buddy</string>
</dict>
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"name": ":xliff:ToolName",
"media": "4DPop.png",
"ondrop": "onDrop",
"handler": "_4DPopImageBuddy",
"tools": {
"method": "browser"
}
}
7 changes: 0 additions & 7 deletions Build/Components/4DPop Image Buddy.4dbase/Resources/4DPop.xml

This file was deleted.

Binary file not shown.
Binary file modified Build/Components/4DPop Image Buddy.dmg
Binary file not shown.
8 changes: 4 additions & 4 deletions Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
<key>CFBundleName</key>
<string>4DPop Image Buddy</string>
<key>CFBundleShortVersionString</key>
<string>19R8</string>
<string>20R2</string>
<key>CFBundleLongVersionString</key>
<string>19R8 (295)</string>
<string>20R2 (296)</string>
<key>NSHumanReadableCopyright</key>
<string>©vdl 2007-2023</string>
<key>CFBundleVersion</key>
<string>296</string>
<string>297</string>
<key>CSResourcesFileMapped</key>
<string></string>
<key>CFBundleGetInfoString</key>
<string>19R8</string>
<string>20R2</string>
<key>CFBundleDisplayName</key>
<string>4DPop Image Buddy</string>
</dict>
Expand Down
1 change: 1 addition & 0 deletions Preferences/4DPop AppMaker.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?><appMaker> <info.plist CFBundleGetInfoString="DEV" CFBundleLongVersionString="0.0" CFBundleShortVersionString="0" NSHumanReadableCopyright="©vdl 2007-{CurrentYear}"/> <options close="true" delete_mac_content="true" increment_version="true" notarize="true"/> <methods/> <copy> <array> <item>4DPop Image Buddy.htm</item> <item>Info.plist</item> <item>SOURCES/</item> <item>Resources/InfoPlist.strings</item> </array> </copy> <reveal path=""/> <delete> <array> <item>./Resources/php.ini</item> </array> </delete></appMaker>
Expand Down
4 changes: 4 additions & 0 deletions Project/Sources/Methods/BROWSER_FILL.4dm
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,9 @@ Case of
For ($Lon_i; 1; $Lon_NewColumnNumbers; 1)

$Ptr_Col:=Get pointer:C304("<>tPic_"+String:C10($Lon_i))
//%W-518.5
ARRAY PICTURE:C279($Ptr_Col->; $Lon_LineNumber)
//%W+518.5

If ($Lon_i>$Lon_ColumnNumber)

Expand Down Expand Up @@ -149,7 +151,9 @@ Case of
Else

$Txt_ColName:="Column_"+String:C10($Lon_i)
//%W-518.5
ARRAY PICTURE:C279($Ptr_Col->; $Lon_LineNumber)
//%W+518.5
LISTBOX SET COLUMN WIDTH:C833(*; $Txt_ColName; $Lon_ColumnWidth)

End if
Expand Down
6 changes: 3 additions & 3 deletions Project/Sources/Methods/BROWSER_HANDLER.4dm
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ Else
//  ` ----------------------------------------------------
//Sinon

<>Lon_Error:=0
ERROR:=0
ON ERR CALL:C155("No_Error")
READ PICTURE FILE:C678($Txt_Path+$tTxt_Files{$Lon_i}; $Pic_Buffer; *)
ON ERR CALL:C155("")
Expand All @@ -341,9 +341,9 @@ Else
: (OK=0)

//.....................................................
: (<>Lon_Error#0)
: (ERROR#0)

ALERT:C41(".Error Nº "+String:C10(<>Lon_Error)+" reading file \""+$tTxt_Files{$Lon_i}+"\"")
ALERT:C41(".Error Nº "+String:C10(ERROR)+" reading file \""+$tTxt_Files{$Lon_i}+"\"")
SET TEXT TO PASTEBOARD:C523($tTxt_Files{$Lon_i})

//.....................................................
Expand Down
2 changes: 1 addition & 1 deletion Project/Sources/Methods/COMPILER.4dm
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ ARRAY BOOLEAN:C223(<>tLstb_Picture; 0)
//C_ENTIER LONG(<>bUtil;<>bUtil_2;<>bAction;<>bFolderMenu)
C_LONGINT:C283(<>bSplitter_1; <>bSplitter_2)

C_LONGINT:C283(<>Lon_Error)
C_LONGINT:C283(ERROR)

C_LONGINT:C283(<>Lon_Timer_Event_Event)
C_LONGINT:C283(<>Lon_UID; <>Lon_File_Number)
Expand Down
4 changes: 4 additions & 0 deletions Project/Sources/Methods/COMPILER_4DPop.4dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
//%attributes = {"invisible":true}
C_OBJECT:C1216(_4DPopImageBuddy; $0)
C_OBJECT:C1216(browser; $1)
C_OBJECT:C1216(onDrop; $1)
2 changes: 1 addition & 1 deletion Project/Sources/Methods/No_Error.4dm
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
//%attributes = {"invisible":true}
<>Lon_Error:=ERROR
//ERROR:=ERROR
12 changes: 0 additions & 12 deletions Project/Sources/Methods/Pictures_Browser.4dm

This file was deleted.

93 changes: 0 additions & 93 deletions Project/Sources/Methods/Pictures_Tool_Ondrop.4dm

This file was deleted.

3 changes: 3 additions & 0 deletions Project/Sources/Methods/_4DPopImageBuddy.4dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
//%attributes = {"invisible":true,"shared":true}
#DECLARE() : 4D:C1709.Function
return Formula:C1597(Formula from string:C1601($1))
4 changes: 4 additions & 0 deletions Project/Sources/Methods/browser.4dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
//%attributes = {}
#DECLARE($data : Object)

BROWSER_HANDLER
92 changes: 92 additions & 0 deletions Project/Sources/Methods/onDrop.4dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
//%attributes = {}
// ----------------------------------------------------
// Method : Pictures_Tool_Ondrop
// Created 14/02/08 by Vincent de Lachaux
// ----------------------------------------------------
// Description
//
// ----------------------------------------------------
#DECLARE($data : Object)

var $dest; $name; $src : Text
var $dropPosition; $indx : Integer
var $pic : Picture

$dest:=Get 4D folder:C485(Current resources folder:K5:16; *)

// Get a path in the drag container
$src:=Get file from pasteboard:C976(1)

Case of

//______________________________________________________
: (Length:C16($src)=0) // No path : try an image

$dropPosition:=1

ARRAY TEXT:C222($signatures; 0x0000)
ARRAY TEXT:C222($nativeTypes; 0x0000)
GET PASTEBOARD DATA TYPE:C958($signatures; $nativeTypes)

If (Find in array:C230($signatures; "com.4d.private.picture.4dpicture")>0)

If (OK=1)

$name:=Get localized string:C991("NewImage")
$name:=Request:C163(Get localized string:C991("Name"); $name; Get localized string:C991("CommonCreate"))

If (OK=1)

End if
End if

Else

BEEP:C151

End if

//______________________________________________________
Else

$indx:=1

Repeat

If (Test path name:C476($src)=Is a document:K24:1)

ERROR:=0
ON ERR CALL:C155("No_Error")
READ PICTURE FILE:C678($src; $pic)
ON ERR CALL:C155("")

Case of

//.....................................................
: (OK=0)

//.....................................................
: (ERROR#0)

ALERT:C41(".Error Nº "+String:C10(ERROR)+" reading file \""+doc_Txt_Path_Handler("get.name"; $src)+"\"")

//.....................................................
: (Picture size:C356($pic)=0)

//.....................................................
Else

COPY DOCUMENT:C541($src; $dest+doc_Txt_Path_Handler("get.name"; $src); *)

//.....................................................
End case

End if

$indx:=$indx+1
$src:=Get file from pasteboard:C976($indx)

Until ($src="")

//______________________________________________________
End case
2 changes: 1 addition & 1 deletion Project/Sources/Methods/server_CREATE_RESOURCES.4dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//%attributes = {"invisible":true,"executedOnServer":true}
//%attributes = {"invisible":true}
// ----------------------------------------------------
// Method : server_CREATE_RESOURCES
// Created 28/05/08 by vdl
Expand Down
2 changes: 1 addition & 1 deletion Project/Sources/Methods/server_DELETE_FILE.4dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//%attributes = {"invisible":true,"executedOnServer":true}
//%attributes = {"invisible":true}
// ----------------------------------------------------
// Method : server_DELETE_FILE
// Created 20/06/08 by vdl
Expand Down
2 changes: 1 addition & 1 deletion Project/Sources/catalog.4DCatalog
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!DOCTYPE base SYSTEM "http://www.4d.com/dtd/2007/base.dtd" >
<base name="4DPop Image Buddy" uuid="B7CC5BAB85CF4BC5B9C07D4A4DBA3055" collation_locale="fr">
<schema name="DEFAULT_SCHEMA"/>
<base_extra package_name="4DPop Image Buddy" data_file_path=":4DPop Image Buddy.4DD" structure_file_name="4DPop Image Buddy" is_compiled_database="true" __stringCompHash="icu:68.1.0" __keywordBuildingHash="icu:68.1.0">
<base_extra package_name="4DPop Image Buddy" data_file_path=":4DPop Image Buddy.4DD" structure_file_name="4DPop Image Buddy" is_compiled_database="true" __stringCompHash="icu:72.1.0" __keywordBuildingHash="icu:72.1.0">
<temp_folder folder_selector="data"/>
<journal_file journal_file_enabled="false"/>
</base_extra>
Expand Down
Loading

0 comments on commit 3c9f907

Please sign in to comment.