From 511b8720c8964de9c6d8d3d2780e271d18bd9c7c Mon Sep 17 00:00:00 2001 From: Bibiko Date: Wed, 2 Sep 2009 13:57:22 +0000 Subject: =?UTF-8?q?=E2=80=A2=20simplified=20and=20unified=20the=20issue=20?= =?UTF-8?q?to=20set=20=20the=20title=20of=20a=20tableWindow=20-=20everythi?= =?UTF-8?q?ng=20will=20be=20configured=20in=20[TableDocument=20displayName?= =?UTF-8?q?]=20-=20to=20update=20the=20title=20call=20[TableDocument=20set?= =?UTF-8?q?Title:[TableDocument=20displayName]]=20-=20this=20removes=20doz?= =?UTF-8?q?ens=20of=20lines=20=E2=80=A2=20first=20steps=20to=20support=20m?= =?UTF-8?q?ore=20the=20document-based=20approach=20(=20a=20document=20is?= =?UTF-8?q?=20nothing=20else=20than=20a=20connection=20with=20view=20prope?= =?UTF-8?q?rties=20and=20preferences=20)=20-=20renamed/added/changed=20in?= =?UTF-8?q?=20Main=20Menu=20items=20into=20"New",=20"Open",=20"Save",=20an?= =?UTF-8?q?d=20"Save=20As"=20-=20if=20user=20opened=20a=20spf=20file=20->?= =?UTF-8?q?=20fileURL=20will=20be=20set=20-=20"Save"=20will=20save=20the?= =?UTF-8?q?=20current=20connection/view=20data=20according=20to=20the=20"S?= =?UTF-8?q?ave=20As"=20setting=20-=20ie=20if=20one=20saved=20a=20doc=20wit?= =?UTF-8?q?h=20do=20not=20"Remember=20window=20state"=20-=20"Save"=20won't?= =?UTF-8?q?=20save=20the=20window=20state;=20to=20enable=20this=20hit=20"S?= =?UTF-8?q?ave=20As"=20[this=20works=20for=20encrypted=20file=20data=20as?= =?UTF-8?q?=20well]=20-=20if=20the=20current=20doc=20was=20opened=20from?= =?UTF-8?q?=20file=20and=20the=20user=20closes=20it=20or=20quits=20the=20e?= =?UTF-8?q?ntire=20app=20all=20connection/document-based=20preferences=20(?= =?UTF-8?q?up=20to=20now=20query=20favs=20and=20history)=20will=20be=20upd?= =?UTF-8?q?ated=20silently=20[not=20yet=20implemented=20fully=20in=20Custo?= =?UTF-8?q?mQuery]=20[works=20for=20encrypted=20file=20as=20well]=20?= =?UTF-8?q?=E2=80=A2=20delete=20saveSPFAccessory=20view=20from=20DBView=20?= =?UTF-8?q?since=20it=20was=20outsourced=20=E2=80=A2=C2=A0fixed=20some=20i?= =?UTF-8?q?ssues=20for=20the=20NSSecureTextField=20in=20the=20Save=20acces?= =?UTF-8?q?sory=20panel=20(but=20still=20a=20warning=20appears)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/TablesList.m | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) (limited to 'Source/TablesList.m') diff --git a/Source/TablesList.m b/Source/TablesList.m index 6e34c295..ef308ae7 100644 --- a/Source/TablesList.m +++ b/Source/TablesList.m @@ -783,9 +783,9 @@ [removeTableContextMenuItem setTitle:NSLocalizedString(@"Remove Function", @"remove func menu title")]; } + // set window title - [tableWindow setTitle:[NSString stringWithFormat:@"(MySQL %@) %@/%@/%@", [tableDocumentInstance mySQLVersion], - [tableDocumentInstance name], [tableDocumentInstance database], selectedTableName]]; + [tableWindow setTitle:[tableDocumentInstance displayName]]; // Update the "Show Create Syntax" window if it's already opened // according to the selected table/view/proc/func @@ -874,8 +874,8 @@ [separatorTableContextMenuItem setHidden:YES]; // set window title - [tableWindow setTitle:[NSString stringWithFormat:@"(MySQL %@) %@/%@", [tableDocumentInstance mySQLVersion], - [tableDocumentInstance name], [tableDocumentInstance database]]]; + [tableWindow setTitle:[tableDocumentInstance displayName]]; + } [spHistoryControllerInstance updateHistoryEntries]; @@ -1207,8 +1207,8 @@ } // Set window title - [tableWindow setTitle:[NSString stringWithFormat:@"(MySQL %@) %@/%@/%@", [tableDocumentInstance mySQLVersion], - [tableDocumentInstance name], [tableDocumentInstance database], anObject]]; + [tableWindow setTitle:[tableDocumentInstance displayName]]; + } else { // Error while renaming @@ -1665,8 +1665,7 @@ [tablesListView reloadData]; // set window title - [tableWindow setTitle:[NSString stringWithFormat:@"(MySQL %@) %@/%@", [tableDocumentInstance mySQLVersion], - [tableDocumentInstance name], [tableDocumentInstance database]]]; + [tableWindow setTitle:[tableDocumentInstance displayName]]; if ( error ) { NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil, @@ -1774,7 +1773,7 @@ else if (selectedIndex == 3) { [extendedTableInfoInstance loadTable:tableName]; structureLoaded = NO; - contentLoaded = NO; + contentLoaded = NO; statusLoaded = YES; } else { @@ -1784,8 +1783,7 @@ } // Set window title - [tableWindow setTitle:[NSString stringWithFormat:@"(MySQL %@) %@/%@/%@", [tableDocumentInstance mySQLVersion], - [tableDocumentInstance name], [tableDocumentInstance database], tableName]]; + [tableWindow setTitle:[tableDocumentInstance displayName]]; } else { // Error while creating new table @@ -2059,8 +2057,7 @@ } // Set window title - [tableWindow setTitle:[NSString stringWithFormat:@"(MySQL %@) %@/%@/%@", [tableDocumentInstance mySQLVersion], - [tableDocumentInstance name], [tableDocumentInstance database], [tableRenameField stringValue]]]; + [tableWindow setTitle:[tableDocumentInstance displayName]]; } @end -- cgit v1.2.3