mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-06 18:24:26 +08:00
Fix Unicode issue on main tabs: databases and tables with international characters were broken on tab captions. This just converts the main TPageControl to a TTntPageControl, plus its TTabSheets to TTntTabSheets.
This commit is contained in:
@ -464,7 +464,7 @@ object MainForm: TMainForm
|
|||||||
OnChange = editFilterVTChange
|
OnChange = editFilterVTChange
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object PageControlMain: TPageControl
|
object PageControlMain: TTntPageControl
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 583
|
Width = 583
|
||||||
@ -480,7 +480,7 @@ object MainForm: TMainForm
|
|||||||
OnChange = PageControlMainChange
|
OnChange = PageControlMainChange
|
||||||
OnContextPopup = PageControlMainContextPopup
|
OnContextPopup = PageControlMainContextPopup
|
||||||
OnMouseUp = PageControlMainMouseUp
|
OnMouseUp = PageControlMainMouseUp
|
||||||
object tabHost: TTabSheet
|
object tabHost: TTntTabSheet
|
||||||
Caption = 'Host'
|
Caption = 'Host'
|
||||||
ImageIndex = 1
|
ImageIndex = 1
|
||||||
object PageControlHost: TPageControl
|
object PageControlHost: TPageControl
|
||||||
@ -813,7 +813,7 @@ object MainForm: TMainForm
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object tabDatabase: TTabSheet
|
object tabDatabase: TTntTabSheet
|
||||||
Caption = 'Database'
|
Caption = 'Database'
|
||||||
ImageIndex = 5
|
ImageIndex = 5
|
||||||
object ListTables: TVirtualStringTree
|
object ListTables: TVirtualStringTree
|
||||||
@ -969,11 +969,11 @@ object MainForm: TMainForm
|
|||||||
end>
|
end>
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object tabEditor: TTabSheet
|
object tabEditor: TTntTabSheet
|
||||||
Caption = 'Table'
|
Caption = 'Table'
|
||||||
ImageIndex = 14
|
ImageIndex = 14
|
||||||
end
|
end
|
||||||
object tabData: TTabSheet
|
object tabData: TTntTabSheet
|
||||||
Caption = 'Data'
|
Caption = 'Data'
|
||||||
ImageIndex = 41
|
ImageIndex = 41
|
||||||
object lblSorryNoData: TLabel
|
object lblSorryNoData: TLabel
|
||||||
@ -1213,7 +1213,7 @@ object MainForm: TMainForm
|
|||||||
Columns = <>
|
Columns = <>
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object tabQuery: TTabSheet
|
object tabQuery: TTntTabSheet
|
||||||
Caption = 'Query'
|
Caption = 'Query'
|
||||||
ImageIndex = 57
|
ImageIndex = 57
|
||||||
object spltQuery: TSplitter
|
object spltQuery: TSplitter
|
||||||
|
@ -22,7 +22,7 @@ uses
|
|||||||
createdatabase, table_editor, SynRegExpr,
|
createdatabase, table_editor, SynRegExpr,
|
||||||
WideStrUtils, ExtActns, CommCtrl, routine_editor, options,
|
WideStrUtils, ExtActns, CommCtrl, routine_editor, options,
|
||||||
Contnrs, PngSpeedButton, connections, SynEditKeyCmds,
|
Contnrs, PngSpeedButton, connections, SynEditKeyCmds,
|
||||||
mysql_connection, mysql_api, insertfiles;
|
mysql_connection, mysql_api, insertfiles, TntComCtrls;
|
||||||
|
|
||||||
|
|
||||||
type
|
type
|
||||||
@ -41,7 +41,7 @@ type
|
|||||||
spltQuery: TSplitter;
|
spltQuery: TSplitter;
|
||||||
LabelResultInfo: TLabel;
|
LabelResultInfo: TLabel;
|
||||||
Grid: TVirtualStringTree;
|
Grid: TVirtualStringTree;
|
||||||
TabSheet: TTabSheet;
|
TabSheet: TTntTabSheet;
|
||||||
GridResult: TGridResult;
|
GridResult: TGridResult;
|
||||||
FilterText: WideString;
|
FilterText: WideString;
|
||||||
end;
|
end;
|
||||||
@ -209,14 +209,14 @@ type
|
|||||||
DBtree: TVirtualStringTree;
|
DBtree: TVirtualStringTree;
|
||||||
comboOnlyDBs: TTntComboBox;
|
comboOnlyDBs: TTntComboBox;
|
||||||
Splitter1: TSplitter;
|
Splitter1: TSplitter;
|
||||||
PageControlMain: TPageControl;
|
PageControlMain: TTntPageControl;
|
||||||
tabData: TTabSheet;
|
tabData: TTntTabSheet;
|
||||||
tabDatabase: TTabSheet;
|
tabDatabase: TTntTabSheet;
|
||||||
splitterTopBottom: TSplitter;
|
splitterTopBottom: TSplitter;
|
||||||
tabQuery: TTabSheet;
|
tabQuery: TTntTabSheet;
|
||||||
popupDB: TPopupMenu;
|
popupDB: TPopupMenu;
|
||||||
menuRefreshDB: TMenuItem;
|
menuRefreshDB: TMenuItem;
|
||||||
tabHost: TTabSheet;
|
tabHost: TTntTabSheet;
|
||||||
PageControlHost: TPageControl;
|
PageControlHost: TPageControl;
|
||||||
tabVariables: TTabSheet;
|
tabVariables: TTabSheet;
|
||||||
tabProcessList: TTabSheet;
|
tabProcessList: TTabSheet;
|
||||||
@ -420,7 +420,7 @@ type
|
|||||||
menuCreateTableCopy: TMenuItem;
|
menuCreateTableCopy: TMenuItem;
|
||||||
menuCreateView: TMenuItem;
|
menuCreateView: TMenuItem;
|
||||||
menuCreateRoutine: TMenuItem;
|
menuCreateRoutine: TMenuItem;
|
||||||
tabEditor: TTabSheet;
|
tabEditor: TTntTabSheet;
|
||||||
popupRefresh: TPopupMenu;
|
popupRefresh: TPopupMenu;
|
||||||
menuAutoRefreshSetInterval: TMenuItem;
|
menuAutoRefreshSetInterval: TMenuItem;
|
||||||
menuAutoRefresh: TMenuItem;
|
menuAutoRefresh: TMenuItem;
|
||||||
@ -736,7 +736,7 @@ type
|
|||||||
procedure ToggleFilterPanel(ForceVisible: Boolean = False);
|
procedure ToggleFilterPanel(ForceVisible: Boolean = False);
|
||||||
procedure AutoCalcColWidths(Tree: TVirtualStringTree; PrevLayout: TWideStringlist = nil);
|
procedure AutoCalcColWidths(Tree: TVirtualStringTree; PrevLayout: TWideStringlist = nil);
|
||||||
procedure PlaceObjectEditor(Which: TListNodeType);
|
procedure PlaceObjectEditor(Which: TListNodeType);
|
||||||
procedure SetTabCaption(PageIndex: Integer; Text: String);
|
procedure SetTabCaption(PageIndex: Integer; Text: WideString);
|
||||||
function ConfirmTabClose(PageIndex: Integer): Boolean;
|
function ConfirmTabClose(PageIndex: Integer): Boolean;
|
||||||
procedure SaveQueryMemo(Tab: TQueryTab; Filename: String; OnlySelection: Boolean);
|
procedure SaveQueryMemo(Tab: TQueryTab; Filename: String; OnlySelection: Boolean);
|
||||||
procedure UpdateFilterPanel(Sender: TObject);
|
procedure UpdateFilterPanel(Sender: TObject);
|
||||||
@ -8237,7 +8237,7 @@ begin
|
|||||||
QueryTab.Number := i;
|
QueryTab.Number := i;
|
||||||
QueryTab.GridResult := TGridResult.Create;
|
QueryTab.GridResult := TGridResult.Create;
|
||||||
|
|
||||||
QueryTab.TabSheet := TTabSheet.Create(PageControlMain);
|
QueryTab.TabSheet := TTntTabSheet.Create(PageControlMain);
|
||||||
QueryTab.TabSheet.PageControl := PageControlMain;
|
QueryTab.TabSheet.PageControl := PageControlMain;
|
||||||
QueryTab.TabSheet.ImageIndex := tabQuery.ImageIndex;
|
QueryTab.TabSheet.ImageIndex := tabQuery.ImageIndex;
|
||||||
|
|
||||||
@ -8618,9 +8618,9 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TMainForm.SetTabCaption(PageIndex: Integer; Text: String);
|
procedure TMainForm.SetTabCaption(PageIndex: Integer; Text: WideString);
|
||||||
begin
|
begin
|
||||||
// Special case if passed text is empty: Reset query tab caption to "Query #123"
|
// Special case if passed text is empty: Reset query tab caption to "Query #123"
|
||||||
if (PageIndex = tabQuery.PageIndex) and (Text = '') then
|
if (PageIndex = tabQuery.PageIndex) and (Text = '') then
|
||||||
Text := 'Query';
|
Text := 'Query';
|
||||||
if IsQueryTab(PageIndex, False) then begin
|
if IsQueryTab(PageIndex, False) then begin
|
||||||
@ -8629,7 +8629,7 @@ begin
|
|||||||
// Leave space for close button on closable query tabs
|
// Leave space for close button on closable query tabs
|
||||||
Text := Text + ' ';
|
Text := Text + ' ';
|
||||||
end;
|
end;
|
||||||
PageControlMain.Pages[PageIndex].Caption := Text;
|
TTntTabSheet(PageControlMain.Pages[PageIndex]).Caption := Text;
|
||||||
FixQueryTabCloseButtons;
|
FixQueryTabCloseButtons;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user