Login | Register
My pages Projects Community openCollabNet

Discussions > commits > svn commit: r38 - branches/SOPTIM/src/tsvnWizard.pas

delphiaddinfortortoisesvn
Discussion topic

Hide all messages in topic

All messages in topic

svn commit: r38 - branches/SOPTIM/src/tsvnWizard.pas

Author otto_noll
Full name Otto Noll
Date 2009-01-05 07:47:38 PST
Message Author: otto_noll
Date: 2009-01-05 07:47:38-0800
New Revision: 38

Modified:
   branches/SOPTIM/src/​tsvnWizard.pas

Log:
Add "Explore folder" to context menu

Modified: branches/SOPTIM/src/​tsvnWizard.pas
Url: http://delphiaddinfo​rtortoisesvn.tigris.​org/source/browse/de​lphiaddinfortortoise​svn/branches/SOPTIM/​src/tsvnWizard.pas?v​iew=diff&pathrev​=38&r1=37&r2​=38
====================​====================​====================​==================
--- branches/SOPTIM/src/​tsvnWizard.pas (original)
+++ branches/SOPTIM/src/​tsvnWizard.pas 2009-01-05 07:47:38-0800
@@ -22,7 +22,8 @@
         SVN_BLAME,
         SVN_BRANCH,
         SVN_COMMIT,
- SVN_DIFF
+ SVN_DIFF,
+ SVN_EXPLORE
     );
 type TTortoiseSVN = class(TNotifierObject, IOTANotifier, IOTAWizard)
 private
@@ -206,7 +207,7 @@
           MItem.Visible := True;
           PMenu.Items.Add(MItem);
           //Creating Submenu of the Popupmenu
- for J:= SVN_Add to SVN_DIFF do begin
+ for J:= SVN_Add to SVN_EXPLORE do begin
             bmp:= TBitmap.create;
             try
               bmp.LoadFromResourceName( HInstance, getBitmapName(J) );
@@ -243,6 +244,7 @@
     (submenu.FindCompone​nt('ESVNFeature_'+in​ttostr(ord(SVN_ADD))​) as TMenuItem).Enabled := false;
     (submenu.FindCompone​nt('ESVNFeature_'+in​ttostr(ord(SVN_BRANC​H))) as TMenuItem).Enabled := false;
     (submenu.FindCompone​nt('ESVNFeature_'+in​ttostr(ord(SVN_COMMI​T))) as TMenuItem).Enabled := false;
+ (submenu.FindCompone​nt('ESVNFeature_'+in​ttostr(ord(SVN_EXPLO​RE))) as TMenuItem).Enabled := false;
     GetCurrentModuleFile​List(files);
     if files.Count > 0 then
     begin
@@ -251,6 +253,7 @@
       (submenu.FindCompone​nt('ESVNFeature_'+in​ttostr(ord(SVN_BLAME​))) as TMenuItem).Enabled := true;
       (submenu.FindCompone​nt('ESVNFeature_'+in​ttostr(ord(SVN_BRANC​H))) as TMenuItem).Enabled := true;
       (submenu.FindCompone​nt('ESVNFeature_'+in​ttostr(ord(SVN_COMMI​T))) as TMenuItem).Enabled := true;
+ (submenu.FindCompone​nt('ESVNFeature_'+in​ttostr(ord(SVN_EXPLO​RE))) as TMenuItem).Enabled := true;
     end;
 end;
 
@@ -297,6 +300,8 @@
             Result:= 'copy';
         SVN_COMMIT:
             Result:= 'commit';
+ SVN_EXPLORE:
+ Result:= 'explore';
     end;
 end;
 
@@ -333,6 +338,8 @@
             Result:= 'Branch/Tag...';
         SVN_COMMIT:
             Result:= 'Commit...';
+ SVN_EXPLORE:
+ Result:= 'Explore folder...';
     end;
 end;
 
@@ -362,6 +369,8 @@
             ;// this verb state is updated by TTortoiseSVN.CheckOn_Popup
         SVN_COMMIT:
             ;// this verb state is updated by TTortoiseSVN.CheckOn_Popup
+ SVN_EXPLORE:
+ ;// this verb state is updated by TTortoiseSVN.CheckOn_Popup
         SVN_UPDATE_TO_SANDBOX:
             if GetCurrentProject <> nil then
                 Result:= vsEnabled;
@@ -441,6 +450,14 @@
               else if GetCurrentModuleFile​List(TStringList.cre​ate).Count = 1 then
                   TSVNExec( '/command:copy /notempfile /path:' + AnsiQuotedStr(GetCur​rentModuleFileList(T​StringList.create)[0​], '"' ) );
             end;
+ SVN_EXPLORE:
+ if project <> nil then
+ begin
+ if GetCurrentModuleFile​List(TStringList.cre​ate).Count > 1 then
+ ShellExecute( 0, 'open', pchar( ExtractFilePath(Extr​actFileName(GetCurre​ntModuleFileList(TSt​ringList.create)[0] ))), '', '', SW_SHOWNORMAL)
+ else if GetCurrentModuleFile​List(TStringList.cre​ate).Count = 1 then
+ ShellExecute( 0, 'open', pchar( ExtractFilePath(GetC​urrentModuleFileList​(TStringList.create)​[0])), '', '', SW_SHOWNORMAL )
+ end;
         SVN_BLAME:
             if project <> nil then
             begin
Messages per page: