tvplanit: Fix missing popup translation of task list and contact grid. Fix demo changing view when language is changed.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4832 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2016-06-24 22:34:38 +00:00
parent 2b22eefdca
commit 852270b0c2
7 changed files with 24 additions and 9 deletions

View File

@ -335,7 +335,7 @@ object MainForm: TMainForm
end end
end end
object TabResources: TTabSheet object TabResources: TTabSheet
Caption = 'Maintenance' Caption = 'Resources'
ClientHeight = 504 ClientHeight = 504
ClientWidth = 772 ClientWidth = 772
TabVisible = False TabVisible = False

View File

@ -7,7 +7,7 @@ TMAINFORM.TABTASKS.CAPTION=Tasks
TMAINFORM.RBALLTASKS.CAPTION=All tasks TMAINFORM.RBALLTASKS.CAPTION=All tasks
TMAINFORM.RBHIDECOMPLETEDTASKS.CAPTION=Hide completed tasks TMAINFORM.RBHIDECOMPLETEDTASKS.CAPTION=Hide completed tasks
TMAINFORM.TABCONTACTS.CAPTION=Contacts TMAINFORM.TABCONTACTS.CAPTION=Contacts
TMAINFORM.TABRESOURCES.CAPTION=Maintenance TMAINFORM.TABRESOURCES.CAPTION=Resources
TMAINFORM.BTNNEWRES.CAPTION=New TMAINFORM.BTNNEWRES.CAPTION=New
TMAINFORM.BTNEDITRES.CAPTION=Edit TMAINFORM.BTNEDITRES.CAPTION=Edit
TMAINFORM.BTNDELETERES.CAPTION=Delete TMAINFORM.BTNDELETERES.CAPTION=Delete

View File

@ -558,6 +558,8 @@ begin
VpDayView1.LoadLanguage; VpDayView1.LoadLanguage;
VpWeekView1.LoadLanguage; VpWeekView1.LoadLanguage;
VpMonthView1.LoadLanguage; VpMonthView1.LoadLanguage;
VpTaskList1.LoadLanguage;
VpContactGrid1.LoadLanguage;
// Select language in language combobox. // Select language in language combobox.
if ALang = '' then ALang := 'en'; if ALang = '' then ALang := 'en';
@ -639,7 +641,7 @@ begin
VpWeekView1.WeekStartsOn := firstWeekDay; VpWeekView1.WeekStartsOn := firstWeekDay;
{$ENDIF} {$ENDIF}
SetActiveView(FActiveView); SetActiveView(1001);
Invalidate; Invalidate;
end; end;
@ -672,7 +674,6 @@ begin
VpMonthView1.Align := alClient; VpMonthView1.Align := alClient;
VpMonthView1.Show; VpMonthView1.Show;
DaySelectorPanel.Hide; DaySelectorPanel.Hide;
TitleLbl.Caption := RSEventsPerMonth; TitleLbl.Caption := RSEventsPerMonth;
ImageList1.GetBitmap(5, Img.Picture.Bitmap); ImageList1.GetBitmap(5, Img.Picture.Bitmap);
end; end;
@ -686,7 +687,6 @@ begin
VpDayView1.Hide; VpDayView1.Hide;
VpWeekView1.Show; VpWeekView1.Show;
DaySelectorPanel.Hide; DaySelectorPanel.Hide;
TitleLbl.Caption := RSEventsPerWeek; TitleLbl.Caption := RSEventsPerWeek;
ImageList1.GetBitmap(4, Img.Picture.Bitmap); ImageList1.GetBitmap(4, Img.Picture.Bitmap);
end; end;
@ -704,7 +704,6 @@ begin
DaySelectorPanel.Show; DaySelectorPanel.Show;
DaysTrackbar.Position := FVisibleDays; DaysTrackbar.Position := FVisibleDays;
VpDayView1.NumDays := DaysTrackBar.Position; VpDayView1.NumDays := DaysTrackBar.Position;
TitleLbl.Caption := RSEventsPerDay; TitleLbl.Caption := RSEventsPerDay;
ImageList1.GetBitmap(3, Img.Picture.Bitmap); ImageList1.GetBitmap(3, Img.Picture.Bitmap);
end; end;

View File

@ -227,8 +227,10 @@ msgid "Events"
msgstr "Termine" msgstr "Termine"
#: tmainform.tabresources.caption #: tmainform.tabresources.caption
#, fuzzy
#| msgid "Maintenance"
msgctxt "tmainform.tabresources.caption" msgctxt "tmainform.tabresources.caption"
msgid "Maintenance" msgid "Resources"
msgstr "Wartung" msgstr "Wartung"
#: tmainform.tabsettings.caption #: tmainform.tabsettings.caption

View File

@ -217,7 +217,7 @@ msgstr ""
#: tmainform.tabresources.caption #: tmainform.tabresources.caption
msgctxt "TMAINFORM.TABRESOURCES.CAPTION" msgctxt "TMAINFORM.TABRESOURCES.CAPTION"
msgid "Maintenance" msgid "Resources"
msgstr "" msgstr ""
#: tmainform.tabsettings.caption #: tmainform.tabsettings.caption

View File

@ -213,6 +213,7 @@ type
public public
constructor Create(AOwner: TComponent); override; constructor Create(AOwner: TComponent); override;
destructor Destroy; override; destructor Destroy; override;
procedure LoadLanguage;
procedure LinkHandler(Sender: TComponent; procedure LinkHandler(Sender: TComponent;
NotificationType: TVpNotificationType; const Value: Variant); override; NotificationType: TVpNotificationType; const Value: Variant); override;
function GetControlType : TVpItemType; override; function GetControlType : TVpItemType; override;
@ -478,6 +479,12 @@ begin
end; end;
{=====} {=====}
procedure TVpContactGrid.LoadLanguage;
begin
FDefaultPopup.Items.Clear;
InitializeDefaultPopup;
end;
procedure TVpContactGrid.LinkHandler(Sender: TComponent; procedure TVpContactGrid.LinkHandler(Sender: TComponent;
NotificationType: TVpNotificationType; const Value: Variant); NotificationType: TVpNotificationType; const Value: Variant);
begin begin

View File

@ -224,6 +224,7 @@ type
constructor Create(AOwner: TComponent); override; constructor Create(AOwner: TComponent); override;
destructor Destroy; override; destructor Destroy; override;
procedure DeleteActiveTask(Verify: Boolean); procedure DeleteActiveTask(Verify: Boolean);
procedure LoadLanguage;
procedure LinkHandler(Sender: TComponent; procedure LinkHandler(Sender: TComponent;
NotificationType: TVpNotificationType; NotificationType: TVpNotificationType;
const Value: Variant); override; const Value: Variant); override;
@ -593,6 +594,12 @@ begin
end; end;
{=====} {=====}
procedure TVpTaskList.LoadLanguage;
begin
FDefaultPopup.Items.Clear;
InitializeDefaultPopup;
end;
procedure TVpTaskList.LinkHandler(Sender: TComponent; procedure TVpTaskList.LinkHandler(Sender: TComponent;
NotificationType: TVpNotificationType; const Value: Variant); NotificationType: TVpNotificationType; const Value: Variant);
begin begin