Skip to content

Commit

Permalink
Merge branch 'main' into far3-dev-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
michaellukashov committed Feb 21, 2024
2 parents bcdbfe1 + 451f629 commit eda6e26
Show file tree
Hide file tree
Showing 34 changed files with 619 additions and 648 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ jobs:
- name: Create release
shell: bash
run: |
gh release create v${{ env.version }} --draft --title "NetBox ${{ env.version_short }}" FarNetBox/*
gh release create v${{ env.version_short }} --draft --title "NetBox ${{ env.version_short }}" FarNetBox/*
env:
# GITHUB_TOKEN: ${{ secrets.NETBOX_GITHUB_TOKEN }}
GH_TOKEN: ${{ github.token }}
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2799,7 +2799,7 @@ ucm_add_flags(CXX C /DDEBUG CONFIG RelWithDebInfo)
ucm_add_linker_flags(MODULE STATIC SHARED EXE /LTCG CONFIG Release)
ucm_add_linker_flags(MODULE SHARED ${NETBOX_DLL_LINK_FLAGS} /OPT:REF /OPT:ICF=6 /NXCOMPAT /DYNAMICBASE /MANIFEST:NO CONFIG Release)
ucm_add_linker_flags(MODULE SHARED ${NETBOX_DLL_LINK_FLAGS} CONFIG Debug)
ucm_add_linker_flags(MODULE SHARED EXE /DEBUG CONFIG Debug)
ucm_add_linker_flags(MODULE SHARED EXE /DEBUG /MAP CONFIG Debug)
ucm_add_linker_flags(MODULE SHARED EXE /DEBUG /INCREMENTAL:NO CONFIG RelWithDebInfo)
#ucm_print_flags()
#-------------------------------------------------------------------------------
16 changes: 3 additions & 13 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,15 @@
## [Unreleased] - ReleaseDate


## [24.2.1.589] - 2024-02-19
## [24.2.2.590] - 2024-02-20

### Changes

- Upgrade WinSCP sources: WinSCP 6.3.0
- Upgrade dependencies: expat 2.6.0

### Fixes

- gh-377 No Such File or Directory

Thanks to ssvine https://github.com/ssvine
- gh-375 Fix: Many exceptions are not shown
- gh-373 Fix russian translation
Expand All @@ -33,16 +32,7 @@ Thanks to ssvine https://github.com/ssvine
- gh-347 Fix the width of dialogs
- gh-346 Fix russian translation


## [24.2.1.583] - 2024-02-07


### Changes

- Upgrade dependencies: expat 2.6.0

### Fixes

- gh-377 No Such File or Directory
- gh-333 Build script fails to collate the finished files
- Create Directory: fix position cursor on newly created dir
https://forum.farmanager.com/viewtopic.php?p=177192#p177192
Expand Down
8 changes: 4 additions & 4 deletions src/NetBox/FarDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ void TFarDialog::InitDialog()
FSynchronizeObjects[0] = INVALID_HANDLE_VALUE;
FSynchronizeObjects[1] = INVALID_HANDLE_VALUE;

FBorderBox = new TFarBox(this);
FBorderBox = MakeOwnedObject<TFarBox>(this);
FBorderBox->SetBounds(TRect(3, 1, -4, -2));
FBorderBox->SetDouble(true);
FTIdleThread = std::make_unique<TFarDialogIdleThread>(this, 400);
Expand Down Expand Up @@ -278,7 +278,7 @@ int32_t TFarDialog::GetItemCount() const
return FItems->GetCount();
}

int32_t TFarDialog::GetItemIdx(TFarDialogItem * Item) const
int32_t TFarDialog::GetItemIdx(const TFarDialogItem * Item) const
{
if (!Item)
return -1;
Expand Down Expand Up @@ -814,7 +814,7 @@ void TFarDialog::Synchronize(TThreadMethod Method)
reinterpret_cast<HANDLE *>(&FSynchronizeObjects), false, INFINITE);
}

void TFarDialog::Close(TFarButton * Button)
void TFarDialog::Close(const TFarButton * Button)
{
DebugAssert(Button != nullptr);
SendDlgMessage(DM_CLOSE, Button->GetItemIdx(), nullptr);
Expand Down Expand Up @@ -2540,7 +2540,7 @@ void TFarListBox::SetItems(const TStrings * Value, bool OwnItems)
FList->SetOwnsObjects(OwnItems);
}

void TFarListBox::SetList(TFarList * Value, bool OwnItems)
void TFarListBox::SetList(const TFarList * Value, bool OwnItems)
{
SetItems(Value, OwnItems);
}
Expand Down
17 changes: 12 additions & 5 deletions src/NetBox/FarDialog.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#pragma once

#include <memory>
#pragma warning(push, 1)
#include <farcolor.hpp>
#pragma warning(pop)
Expand Down Expand Up @@ -73,7 +74,7 @@ class TFarDialog : public TObject
TFarButton * GetDefaultButton() const { return FDefaultButton; }
TFarBox * GetBorderBox() const { return FBorderBox; }
// int32_t GetType(TFarDialogItem * Item) const;
int32_t GetItemIdx(TFarDialogItem * Item) const;
int32_t GetItemIdx(const TFarDialogItem * Item) const;
TFarDialogItem * GetItem(int32_t Index) const;
TFarDialogItem * GetControl(int32_t Index) const { return GetItem(Index); }
int32_t GetItemCount() const;
Expand Down Expand Up @@ -121,7 +122,7 @@ class TFarDialog : public TObject
virtual void Idle();
void BreakSynchronize();
void Synchronize(TThreadMethod Method);
void Close(TFarButton * Button);
void Close(const TFarButton * Button);
void ProcessGroup(int32_t Group, TFarProcessGroupEvent && Callback, void * Arg);
void ShowItem(TFarDialogItem * Item, void * Arg);
void EnableItem(TFarDialogItem * Item, void * Arg);
Expand Down Expand Up @@ -520,8 +521,8 @@ class TFarText final : public TFarDialogItem
public:
explicit TFarText(TFarDialog * ADialog) noexcept;

virtual UnicodeString GetCaption() const { return GetData(); }
virtual void SetCaption(const UnicodeString & Value) { SetData(Value); }
UnicodeString GetCaption() const { return GetData(); }
void SetCaption(const UnicodeString & Value) { SetData(Value); }
virtual bool GetCenterGroup() const override { return TFarDialogItem::GetCenterGroup(); }
virtual void SetCenterGroup(bool Value) override { TFarDialogItem::SetCenterGroup(Value); }

Expand Down Expand Up @@ -616,7 +617,7 @@ class TFarListBox : public TFarDialogItem
void SetWrapMode(bool Value) { SetFlag(DIF_LISTWRAPMODE, Value); }
TFarList * GetItems() const { return FList.get(); }
TFarList * GetItems() { return FList.get(); }
void SetList(TFarList * Value, bool OwnItems = true);
void SetList(const TFarList * Value, bool OwnItems = true);
TFarListBoxAutoSelect GetAutoSelect() const { return FAutoSelect; }
void SetAutoSelect(TFarListBoxAutoSelect Value);

Expand Down Expand Up @@ -697,3 +698,9 @@ class TFarLister : public TFarDialogItem

inline TRect Rect(int32_t Left, int32_t Top, int32_t Right, int32_t Bottom);

template<typename ObjectType, typename OwnerType>
ObjectType * MakeOwnedObject(OwnerType * Owner)
{
std::unique_ptr<ObjectType> Object(std::make_unique<ObjectType>(Owner));
return Object.release();
}
2 changes: 1 addition & 1 deletion src/NetBox/FarPlugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1893,7 +1893,7 @@ int32_t TCustomFarPlugin::GetFarVersion() const
return FFarVersion;
}

UnicodeString TCustomFarPlugin::FormatFarVersion(VersionInfo & Info) const
UnicodeString TCustomFarPlugin::FormatFarVersion(const VersionInfo & Info) const
{
return FORMAT("%d.%d.%d", Info.Major, Info.Minor, Info.Build);
}
Expand Down
2 changes: 1 addition & 1 deletion src/NetBox/FarPlugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ class TCustomFarPlugin : public TObject
void FarCopyToClipboard(const UnicodeString & Str);
void FarCopyToClipboard(const TStrings * Strings);
int32_t GetFarVersion() const;
UnicodeString FormatFarVersion(VersionInfo & Info) const;
UnicodeString FormatFarVersion(const VersionInfo & Info) const;
UnicodeString GetTemporaryDir() const;
intptr_t InputRecordToKey(const INPUT_RECORD * Rec);
TFarEditorInfo * EditorInfo();
Expand Down
4 changes: 2 additions & 2 deletions src/NetBox/NetBox.rc
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ FILETYPE 0x2
{
VALUE "CompanyName", "Mikhail Lukashov\0"
VALUE "FileDescription", "NetBox: SFTP/FTP/FTPS/SCP/WebDAV/S3 client for Far Manager 3.0\0"
VALUE "FileVersion", "24.2.1.589\0"
VALUE "FileVersion", "24.2.2.590\0"
VALUE "InternalName", "FarNetBox\0"
VALUE "LegalCopyright", "(c) 2011, 2024 Mikhail Lukashov\0"
VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", "NetBox.dll\0"
VALUE "ProductName", "NetBox\0"
VALUE "ProductVersion", "24.2.1.589\0"
VALUE "ProductVersion", "24.2.2.590\0"
VALUE "ReleaseType", "beta\0"
VALUE "WWW", "https://github.com/michaellukashov/Far-NetBox\0"
}
Expand Down
Loading

0 comments on commit eda6e26

Please sign in to comment.