Bladeren bron

Removing functions to create Quick Launch icons (Windows Vista and older)

Source commit: 00ae607265cf60f3ce06448792041208ee3a4ea0
Martin Prikryl 6 jaren geleden
bovenliggende
commit
637fda02c5
5 gewijzigde bestanden met toevoegingen van 19 en 45 verwijderingen
  1. 0 1
      deployment/winscp.isl
  2. 0 8
      deployment/winscpsetup.iss
  3. 9 15
      source/forms/Preferences.cpp
  4. 10 20
      source/forms/Preferences.dfm
  5. 0 1
      source/forms/Preferences.h

+ 0 - 1
deployment/winscp.isl

@@ -11,7 +11,6 @@ TranslationsComponent=Translations
 DesktopIconTask=Create a &desktop icon
 DesktopIconUserTask=For the current user only
 DesktopIconCommonTask=For all users
-QuickLaunchIconTask=Create a &Quick Launch icon
 SendToHookTask=Add &upload shortcut to Explorer's 'Send to' context menu
 RegisterAsUrlHandlers=Register to handle URL &addresses
 AddSearchPath=Add installation directory to &search path (%PATH%)

+ 0 - 8
deployment/winscpsetup.iss

@@ -207,9 +207,6 @@ Name: desktopicon\user; Description: {cm:DesktopIconUserTask}; \
   Flags: exclusive unchecked
 Name: desktopicon\common; Description: {cm:DesktopIconCommonTask}; \
   Flags: exclusive
-; No Quick Launch on Win7
-Name: quicklaunchicon; Description: {cm:QuickLaunchIconTask}; \
-  Flags: unchecked; OnlyBelowVersion: 6.1.7600
 Name: sendtohook; Description: {cm:SendToHookTask}
 Name: urlhandler; Description: {cm:RegisterAsUrlHandlers}
 Name: searchpath; Description: {cm:AddSearchPath}; \
@@ -223,9 +220,6 @@ Name: "{userdesktop}\WinSCP"; Filename: "{app}\WinSCP.exe"; \
   Tasks: desktopicon\user; Comment: "{cm:ProgramComment2}"
 Name: "{commondesktop}\WinSCP"; Filename: "{app}\WinSCP.exe"; \
   Tasks: desktopicon\common; Comment: "{cm:ProgramComment2}"
-; This is created when quicklaunchicon task is selected
-Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\WinSCP"; \
-  Filename: "{app}\WinSCP.exe"; Tasks: quicklaunchicon
 ; This is created when sendtohook task is selected
 Name: "{usersendto}\{cm:SendToHookNew}"; Filename: "{app}\WinSCP.exe"; \
   Parameters: "/upload"; Tasks: sendtohook
@@ -945,8 +939,6 @@ begin
 
   WizardForm.KeyPreview := True;
   WizardForm.OnKeyDown := @FormKeyDown;
-  // to accomodate one more task
-  WizardForm.TasksList.Height := WizardForm.TasksList.Height + ScaleY(8);
 
   // allow installation without requiring user to accept license
   WizardForm.LicenseAcceptedRadio.Checked := True;

+ 9 - 15
source/forms/Preferences.cpp

@@ -1365,8 +1365,6 @@ void __fastcall TPreferencesDialog::UpdateControls()
 
     // integration
     EnableControl(ShellIconsGroup, !IsUWP());
-    // There's no quick launch in Windows 7
-    EnableControl(QuickLaunchIconButton, ShellIconsGroup->Enabled && !IsWin7());
     MakeDefaultHandlerItem->Visible = IsWinVista();
 
     // languages
@@ -1486,29 +1484,25 @@ void __fastcall TPreferencesDialog::IconButtonClick(TObject *Sender)
         break;
     }
   }
-  else
+  else if (Sender == SendToHookButton)
   {
     if (MessageDialog(MainInstructions(LoadStr(CONFIRM_CREATE_ICON)),
           qtConfirmation, qaYes | qaNo, HELP_CREATE_ICON) == qaYes)
     {
-      if (Sender == SendToHookButton)
-      {
-        IconName = FMTLOAD(SENDTO_HOOK_NAME2, (AppName));
-        SpecialFolder = CSIDL_SENDTO;
-        Params = TProgramParams::FormatSwitch(UPLOAD_SWITCH);
-      }
-      else if (Sender == QuickLaunchIconButton)
-      {
-        IconName = L"Microsoft\\Internet Explorer\\Quick Launch\\" +
-          AppName;
-        SpecialFolder = CSIDL_APPDATA;
-      }
+      IconName = FMTLOAD(SENDTO_HOOK_NAME2, (AppName));
+      SpecialFolder = CSIDL_SENDTO;
+      Params = TProgramParams::FormatSwitch(UPLOAD_SWITCH);
     }
     else
     {
       Abort();
     }
   }
+  else
+  {
+    DebugFail();
+    Abort();
+  }
 
   TInstantOperationVisualizer Visualizer;
 

+ 10 - 20
source/forms/Preferences.dfm

@@ -1162,13 +1162,13 @@ object PreferencesDialog: TPreferencesDialog
           Left = 8
           Top = 8
           Width = 389
-          Height = 206
+          Height = 174
           Anchors = [akLeft, akTop, akRight]
           Caption = 'Windows Shell'
           TabOrder = 0
           DesignSize = (
             389
-            206)
+            174)
           object DesktopIconButton: TButton
             Left = 16
             Top = 24
@@ -1179,49 +1179,39 @@ object PreferencesDialog: TPreferencesDialog
             TabOrder = 0
             OnClick = IconButtonClick
           end
-          object QuickLaunchIconButton: TButton
-            Left = 16
-            Top = 56
-            Width = 357
-            Height = 25
-            Anchors = [akLeft, akTop, akRight]
-            Caption = 'Create a &Quick Launch icon'
-            TabOrder = 1
-            OnClick = IconButtonClick
-          end
           object SendToHookButton: TButton
             Left = 16
-            Top = 88
+            Top = 56
             Width = 357
             Height = 25
             Anchors = [akLeft, akTop, akRight]
             Caption = 'Add upload shortcut to Explorer'#39's '#39'&Send to'#39' context menu'
-            TabOrder = 2
+            TabOrder = 1
             OnClick = IconButtonClick
           end
           object RegisterAsUrlHandlersButton: TButton
             Left = 16
-            Top = 135
+            Top = 103
             Width = 357
             Height = 25
             Anchors = [akLeft, akTop, akRight]
             Caption = 'Register to handle &URL addresses'
-            TabOrder = 4
+            TabOrder = 3
             OnClick = RegisterAsUrlHandlersButtonClick
           end
           object AddSearchPathButton: TButton
             Left = 16
-            Top = 167
+            Top = 135
             Width = 357
             Height = 25
             Anchors = [akLeft, akTop, akRight]
             Caption = 'Add WinSCP to &search path'
-            TabOrder = 5
+            TabOrder = 4
             OnClick = AddSearchPathButtonClick
           end
           object ShellIconsText2: TStaticText
             Left = 43
-            Top = 116
+            Top = 84
             Width = 330
             Height = 17
             Hint = 
@@ -1231,7 +1221,7 @@ object PreferencesDialog: TPreferencesDialog
             Anchors = [akTop, akRight]
             AutoSize = False
             Caption = 'Associate the icons with site'
-            TabOrder = 3
+            TabOrder = 2
             TabStop = True
           end
         end

+ 0 - 1
source/forms/Preferences.h

@@ -68,7 +68,6 @@ __published:
   TTabSheet *IntegrationSheet;
   TGroupBox *ShellIconsGroup;
   TButton *DesktopIconButton;
-  TButton *QuickLaunchIconButton;
   TButton *SendToHookButton;
   TTabSheet *CustomCommandsSheet;
   TGroupBox *CustomCommandsGroup;