Ticket #8381 (closed Bug report: fixed)

Opened 20 months ago

Last modified 5 months ago

Transfer - Speed Limits - Enable Checked State Incorrect on Restart

Reported by: mjjareo Owned by:
Priority: normal Component: FileZilla Client
Keywords: Cc: jorrit@…
Operating system type: Windows Operating system version: 7

Description

To reproduce...

1. Enable speed limits
2. Exit Client
3. Restart Client

The menu item is not checked but speed limits are seemingly enabled.
Selecting the menu item will not set check on.
Selecting the menu item again will set check on.

Attachments

8381-speedlimit-menu.patch Download (0.7 KB) - added by jorrit 5 months ago.

Change History

Changed 5 months ago by jorrit

  • cc jorrit@… added

Also happens on Ubuntu. The code doesn't check the speed limit option on startup.

The code block

bool enable = COptions::Get()->GetOptionVal(OPTION_SPEEDLIMIT_ENABLE) != 0;

int downloadLimit = COptions::Get()->GetOptionVal(OPTION_SPEEDLIMIT_INBOUND);
int uploadLimit = COptions::Get()->GetOptionVal(OPTION_SPEEDLIMIT_OUTBOUND);

if (!downloadLimit && !uploadLimit)
	enable = false;

Check(XRCID("ID_MENU_TRANSFER_SPEEDLIMITS_ENABLE"), enable);

from CMenuBar::OnOptionChanged also needs to be executed in CMenuBar* CMenuBar::Load(CMainFrame* pMainFrame). My C++ knowledge is not sufficient enough to abstract that code to a separate function, but I will attach a patch where I copy the code.

Changed 5 months ago by jorrit

Changed 5 months ago by codesquid

  • status changed from new to closed
  • resolution set to fixed

Thanks. I've put it into a function and committed the fix.

Note: See TracTickets for help on using tickets.