- [added] initial work on grouping...
3fd8b3ed
Dimitar Tsenev
committed
16 changed files
MainWindow_Tabs.cs
/BExplorer/BetterExplorer/_MainWindow/MainWindow_Tabs.cs-44
/BExplorer/BetterExplorer/_MainWindow/MainWindow_Tabs.cs
Add comment 134 //'if it never crashes the program? Closing the last tab simply closes the program, so I
Add comment 135 //'thought, what the heck... let's just keep it enabled. :) -JaykeBird
Add comment 136 }
Add comment 137 Minus  
Add comment 138 Minus   NavigateAfterTabChange();
Add comment 139 137 }
Add comment 140 138
Add comment 141 139 private void CloseAllTabs(bool CloseFirstTab) {
Add comment 157 155
Add comment 158 156
Add comment 159 157 #region Tab Changers
Add comment 160 Minus  
Add comment 161 Minus   public void NavigateAfterTabChange() {
Add comment 162 Minus   ClosableTabItem itb = tabControl1.SelectedItem as ClosableTabItem;
Add comment 163 Minus  
Add comment 164 Minus   isGoingBackOrForward = itb.log.HistoryItemsList.Count != 0;
Add comment 165 Minus   if (itb != null) {
Add comment 166 Minus   try {
Add comment 167 Minus   BeforeLastTabIndex = LastTabIndex;
Add comment 168 Minus  
Add comment 169 Minus   //tabControl1.SelectedIndex = itb.Index;
Add comment 170 Minus   //LastTabIndex = itb.Index;
Add comment 171 Minus   //CurrentTabIndex = LastTabIndex;
Add comment 172 Minus   if (ShellListView.CurrentFolder == null || itb.ShellObject.ParsingName != ShellListView.CurrentFolder.ParsingName) {
Add comment 173 Minus   if (!Keyboard.IsKeyDown(Key.Tab)) {
Add comment 174 Minus   ShellListView.Navigate(itb.ShellObject);
Add comment 175 Minus   }
Add comment 176 Minus   else {
Add comment 177 Minus   t.Interval = 500;
Add comment 178 Minus   t.Tag = itb.ShellObject;
Add comment 179 Minus   t.Tick += new EventHandler(t_Tick);
Add comment 180 Minus   t.Start();
Add comment 181 Minus   }
Add comment 182 Minus   }
Add comment 183 Minus  
Add comment 184 Minus   itb.BringIntoView();
Add comment 185 Minus   }
Add comment 186 Minus   catch (StackOverflowException) {
Add comment 187 Minus   }
Add comment 188 Minus   //'btnTabCloseC.IsEnabled = tabControl1.Items.Count > 1;
Add comment 189 Minus   //'there's a bug that has this enabled when there's only one tab open, but why disable it
Add comment 190 Minus   //'if it never crashes the program? Closing the last tab simply closes the program, so I
Add comment 191 Minus   //'thought, what the heck... let's just keep it enabled. :) -JaykeBird
Add comment 192 Minus   }
Add comment 193 Minus   }
Add comment 194 Minus  
Add comment 195 158 private void ChangeTab(object sender, ExecutedRoutedEventArgs e) {
Add comment 196 159 t.Stop();
Add comment 197 Minus   //SelectTab(tabControl1.SelectedIndex + 1);
Add comment 198 160 int selIndex = tabControl1.SelectedIndex == tabControl1.Items.Count - 1 ? 0 : tabControl1.SelectedIndex + 1;
Add comment 199 161 tabControl1.SelectedItem = tabControl1.Items[selIndex];
Add comment 200 Minus   NavigateAfterTabChange();
Add comment 201 162 }
Add comment 202 163
Add comment 203 164 #endregion
Add comment 227 188 newt.PreviewMouseMove += new MouseEventHandler(newt_PreviewMouseMove);
Add comment 228 189 newt.Drop += new DragEventHandler(newt_Drop);
Add comment 229 190
Add comment 230 Minus   newt.TabSelected += newt_TabSelected;
Add comment 231 Minus  
Add comment 232 191 tabControl1.Items.Add(newt);
Add comment 233 192 LastTabIndex = tabControl1.SelectedIndex;
Add comment 234 193 newt.log.CurrentLocation = DefPath;
Add comment 236 195 if (IsNavigate) {
Add comment 237 196 tabControl1.SelectedIndex = tabControl1.Items.Count - 1;
Add comment 238 197 tabControl1.SelectedItem = tabControl1.Items[tabControl1.Items.Count - 1];
Add comment 239 Minus   NavigateAfterTabChange();
Add comment 240 198 }
Add comment 241 199
Add comment 242 200 ConstructMoveToCopyToMenu();
Add comment 322 280 newt.DragOver += new DragEventHandler(newt_DragOver);
Add comment 323 281 newt.PreviewMouseMove += new MouseEventHandler(newt_PreviewMouseMove);
Add comment 324 282 newt.Drop += new DragEventHandler(newt_Drop);
Add comment 325 Minus   newt.TabSelected += newt_TabSelected;
Add comment 326 283 newt.AllowDrop = true;
Add comment 327 284 newt.log.CurrentLocation = CurTab.ShellObject;
Add comment 328 285 newt.SelectedItems = CurTab.SelectedItems;
Add comment 331 288 tabControl1.SelectedItem = newt;
Add comment 332 289 LastTabIndex = tabControl1.SelectedIndex;
Add comment 333 290 ConstructMoveToCopyToMenu();
Add comment 334 Minus   NavigateAfterTabChange();
Add comment 335 291 }
Add comment 336 292
Add comment 337 293 #endregion
IconView.cs
/BExplorer/BetterExplorer/IconClasses/IconView.cs-2+2
/BExplorer/BetterExplorer/IconClasses/IconView.cs
Add comment 148 ShellLibrary lib = null;
Add comment 149 try
Add comment 150 {
Add comment 151 Minus   lib = ShellLibrary.Load(ShellView.SelectedItems[0].DisplayName,
Add comment 151 Plus   lib = ShellLibrary.Load(ShellView.GetFirstSelectedItem().DisplayName,
Add comment 152 false);
Add comment 153 }
Add comment 154 catch
Add comment 162 }
Add comment 163 else
Add comment 164 {
Add comment 165 Minus   ShellView.SetFolderIcon(ShellView.SelectedItems[0].ParsingName, tbLibrary.Text, (int)lvIcons.SelectedItems[0].Tag);
Add comment 165 Plus   ShellView.SetFolderIcon(ShellView.GetFirstSelectedItem().ParsingName, tbLibrary.Text, (int)lvIcons.SelectedItems[0].Tag);
Add comment 166 }
Add comment 167
Add comment 168 }
App.xaml.cs
/BExplorer/BetterExplorer/App.xaml.cs-2+1
/BExplorer/BetterExplorer/App.xaml.cs
Add comment 293 }
Add comment 294 else {
Add comment 295 String cmd = args.CommandLineArgs[1];
Add comment 296 Minus   sho = new ShellItem(cmd.StartsWith("::") ? "shell:" + cmd : args.CommandLineArgs[1].Replace("\"", ""));
Add comment 296 Plus   sho = new ShellItem(cmd.ToShellParsingName());
Add comment 297 }
Add comment 298 }
Add comment 299
Add comment 311 newt.TabIcon = sho.Thumbnail.BitmapSource;
Add comment 312 newt.PreviewMouseMove += newt_PreviewMouseMove;
Add comment 313 newt.ToolTip = sho.ParsingName;
Add comment 314 Minus   newt.TabSelected += win.newt_TabSelected;
Add comment 315 314 newt.ShellObject = sho;
Add comment 316 315 win.CloneTab(newt);
Add comment 317 316 });
MainWindow.xaml
/BExplorer/BetterExplorer/MainWindow.xaml
/BExplorer/BetterExplorer/MainWindow.xaml
MainWindow.xaml.cs
/BExplorer/BetterExplorer/MainWindow.xaml.cs
/BExplorer/BetterExplorer/MainWindow.xaml.cs
ListViewGroupEx.cs
/Shell/Groups/ListViewGroupEx.cs
/Shell/Groups/ListViewGroupEx.cs
LVGROUP.cs
/Shell/Groups/LVGROUP.cs
/Shell/Groups/LVGROUP.cs
Constants.cs
/Shell/Interop/Constants.cs
/Shell/Interop/Constants.cs
Enums.cs
/Shell/Interop/Enums.cs
/Shell/Interop/Enums.cs
User32.cs
/Shell/Interop/User32.cs
/Shell/Interop/User32.cs
IOwnerDataCallback.cs
/Shell/VirtualGroups/IOwnerDataCallback.cs
/Shell/VirtualGroups/IOwnerDataCallback.cs
VirtualGrouping.cs
/Shell/VirtualGroups/VirtualGrouping.cs
/Shell/VirtualGroups/VirtualGrouping.cs
Extensions.cs
/Shell/Extensions.cs
/Shell/Extensions.cs
Shell.csproj
/Shell/Shell.csproj
/Shell/Shell.csproj
ShellItem.cs
/Shell/ShellItem.cs
/Shell/ShellItem.cs
ShellViewEx.cs
/Shell/ShellViewEx.cs
/Shell/ShellViewEx.cs