Skip to content

Commit

Permalink
Fixed the status bar to show when it's meant to (#572)
Browse files Browse the repository at this point in the history
  • Loading branch information
yaira2 authored Apr 12, 2020
1 parent 234a852 commit 233ae1f
Show file tree
Hide file tree
Showing 9 changed files with 194 additions and 3 deletions.
2 changes: 2 additions & 0 deletions Files/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public static IShellPage CurrentInstance
public static ObservableCollection<WSLDistroItem> linuxDistroItems = new ObservableCollection<WSLDistroItem>();
public static SettingsViewModel AppSettings { get; set; }
public static InteractionViewModel InteractionViewModel { get; set; }
public static SelectedItemPropertiesViewModel SelectedItemPropertiesViewModel { get; set; }

private static readonly Logger Logger = LogManager.GetCurrentClassLogger();

Expand All @@ -80,6 +81,7 @@ public App()

AppSettings = new SettingsViewModel();
InteractionViewModel = new InteractionViewModel();
SelectedItemPropertiesViewModel = new SelectedItemPropertiesViewModel();
}

private void RegisterUncaughtExceptionLogger()
Expand Down
2 changes: 1 addition & 1 deletion Files/MultilingualResources/Files.de-DE.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -430,4 +430,4 @@
</group>
</body>
</file>
</xliff>
</xliff>
2 changes: 1 addition & 1 deletion Files/MultilingualResources/Files.es-ES.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -429,4 +429,4 @@
</group>
</body>
</file>
</xliff>
</xliff>
2 changes: 1 addition & 1 deletion Files/Strings/de-DE/Resources.resw
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@
<value>Sind Sie sicher, dass sie die ausgewählten Dateien löschen möchten?</value>
</data>
<data name="ConfirmDeleteDialogPermanentlyDeleteCheckBox.Content" xml:space="preserve">
<value>Dauerhaft löschen</value>
<value>Endgültig löschen</value>
</data>
<data name="SettingsPreferencesShowConfirmDeleteDialog.Text" xml:space="preserve">
<value>Einen Bestätigungsdialog anzeigen bevor Dateien und Ordner gelöscht werden</value>
Expand Down
183 changes: 183 additions & 0 deletions Files/Strings/es-ES/Resources.resw
Original file line number Diff line number Diff line change
Expand Up @@ -141,4 +141,187 @@
<data name="SideBarUnpinFromSideBar.Text" xml:space="preserve">
<value>Desanclar de la barra lateral</value>
</data>
<data name="ConfirmDeleteDialog.Title" xml:space="preserve">
<value>Eliminar Archivo(s)</value>
</data>
<data name="ConfirmDeleteDialogCancelButton.Content" xml:space="preserve">
<value>Cancelar</value>
</data>
<data name="ConfirmDeleteDialogDeleteButton.Content" xml:space="preserve">
<value>Eliminar</value>
</data>
<data name="ConfirmDeleteDialogHeader.Text" xml:space="preserve">
<value>¿Está seguro que desea eliminar el archivo seleccionado?</value>
</data>
<data name="ConfirmDeleteDialogPermanentlyDeleteCheckBox.Content" xml:space="preserve">
<value>Eliminar permanentemente</value>
</data>
<data name="SettingsPreferencesShowConfirmDeleteDialog.Text" xml:space="preserve">
<value>Mostrar un diálogo de confirmación al borrar archivos o carpetas</value>
</data>
<data name="SidebarDesktop" xml:space="preserve">
<value>Escritorio</value>
</data>
<data name="SidebarDocuments" xml:space="preserve">
<value>Documentos</value>
</data>
<data name="SidebarDownloads" xml:space="preserve">
<value>Descargas</value>
</data>
<data name="SidebarHome" xml:space="preserve">
<value>Inicio</value>
</data>
<data name="SidebarMusic" xml:space="preserve">
<value>Música</value>
</data>
<data name="SidebarPictures" xml:space="preserve">
<value>Imágenes</value>
</data>
<data name="SidebarVideos" xml:space="preserve">
<value>Videos</value>
</data>
<data name="NavigationToolbarNewTab.Text" xml:space="preserve">
<value>Nueva Pestaña</value>
</data>
<data name="ExtractFilesDialog.Title" xml:space="preserve">
<value>Extraer Archivo Comprimido</value>
</data>
<data name="ExtractFilesDialog.CloseButtonText" xml:space="preserve">
<value>Cancelar</value>
</data>
<data name="ExtractFilesDialog.PrimaryButtonText" xml:space="preserve">
<value>Extraer</value>
</data>
<data name="ExtractFilesDialogDescription.Text" xml:space="preserve">
<value>Elija una ubicación para extraer este archivo comprimido. Deberá permanecer en la carpeta actual hasta que hayamos terminado. Se abrirá una nueva pestaña con los elementos extraídos.</value>
</data>
<data name="ExtractFilesDialogBrowseButton.Content" xml:space="preserve">
<value>Examinar</value>
</data>
<data name="BaseLayoutContextFlyoutSortBy.Text" xml:space="preserve">
<value>Ordenar por</value>
</data>
<data name="BaseLayoutContextFlyoutSortByName.Text" xml:space="preserve">
<value>Nombre</value>
</data>
<data name="BaseLayoutContextFlyoutSortByDate.Text" xml:space="preserve">
<value>Fecha de modificación</value>
</data>
<data name="BaseLayoutContextFlyoutSortByType.Text" xml:space="preserve">
<value>Tipo</value>
</data>
<data name="BaseLayoutContextFlyoutSortBySize.Text" xml:space="preserve">
<value>Tamaño</value>
</data>
<data name="BaseLayoutContextFlyoutSortByAscending.Text" xml:space="preserve">
<value>Ascendente</value>
</data>
<data name="BaseLayoutContextFlyoutSortByDescending.Text" xml:space="preserve">
<value>Descendente</value>
</data>
<data name="BaseLayoutContextFlyoutRefresh.Text" xml:space="preserve">
<value>Actualizar</value>
</data>
<data name="BaseLayoutContextFlyoutPaste.Text" xml:space="preserve">
<value>Pegar</value>
</data>
<data name="BaseLayoutContextFlyoutOpenInTerminal.Text" xml:space="preserve">
<value>Abrir en la Terminal...</value>
</data>
<data name="BaseLayoutContextFlyoutNew.Text" xml:space="preserve">
<value>Nuevo</value>
</data>
<data name="BaseLayoutContextFlyoutNewFolder.Text" xml:space="preserve">
<value>Carpeta</value>
</data>
<data name="BaseLayoutContextFlyoutNewBitmapImage.Text" xml:space="preserve">
<value>Imagen Bitmap</value>
</data>
<data name="BaseLayoutContextFlyoutNewTextDocument.Text" xml:space="preserve">
<value>Documento de Texto</value>
</data>
<data name="BaseLayoutContextFlyoutPropertiesFolder.Text" xml:space="preserve">
<value>Propiedades</value>
</data>
<data name="BaseLayoutItemContextFlyoutExtract.Text" xml:space="preserve">
<value>Extraer</value>
</data>
<data name="BaseLayoutItemContextFlyoutOpenWith.Text" xml:space="preserve">
<value>Abrir con...</value>
</data>
<data name="BaseLayoutItemContextFlyoutOpenInNewTab.Text" xml:space="preserve">
<value>Abrir en nueva pestaña</value>
</data>
<data name="BaseLayoutItemContextFlyoutOpenInNewWindow.Text" xml:space="preserve">
<value>Abrir en nueva ventana</value>
</data>
<data name="BaseLayoutItemContextFlyoutSetAsDesktopBackground.Text" xml:space="preserve">
<value>Establecer como fondo de escritorio</value>
</data>
<data name="BaseLayoutItemContextFlyoutShare.Text" xml:space="preserve">
<value>Compartir</value>
</data>
<data name="BaseLayoutItemContextFlyoutCut.Text" xml:space="preserve">
<value>Cortar</value>
</data>
<data name="BaseLayoutItemContextFlyoutCopy.Text" xml:space="preserve">
<value>Copiar</value>
</data>
<data name="BaseLayoutItemContextFlyoutDelete.Text" xml:space="preserve">
<value>Eliminar</value>
</data>
<data name="BaseLayoutItemContextFlyoutRename.Text" xml:space="preserve">
<value>Renombrar</value>
</data>
<data name="BaseLayoutItemContextFlyoutPinToSidebar.Text" xml:space="preserve">
<value>Anclar a la barra lateral</value>
</data>
<data name="BaseLayoutItemContextFlyoutProperties.Text" xml:space="preserve">
<value>Propiedades</value>
</data>
<data name="BaseLayoutItemContextFlyoutQuickLook.Text" xml:space="preserve">
<value>QuickLook</value>
</data>
<data name="NavigationToolbarNewWindow.Text" xml:space="preserve">
<value>Nueva Ventana</value>
</data>
<data name="NavigationToolbarCopyPath.Text" xml:space="preserve">
<value>Copiar Ubicación</value>
</data>
<data name="NavigationToolbarPaste.Text" xml:space="preserve">
<value>Pegar</value>
</data>
<data name="NavigationToolbarOpenInTerminal.Text" xml:space="preserve">
<value>Abrir en la Terminal...</value>
</data>
<data name="NavigationToolbarVisiblePath.PlaceholderText" xml:space="preserve">
<value>Ingrese una ubicación</value>
</data>
<data name="NavigationToolbarSearchReigon.PlaceholderText" xml:space="preserve">
<value>Buscar</value>
</data>
<data name="StatusBarControlSelectAll.Text" xml:space="preserve">
<value>Seleccionar Todo</value>
</data>
<data name="StatusBarControlClearSelection.Text" xml:space="preserve">
<value>Quitar Selección</value>
</data>
<data name="ModernNavigationToolbaNewFolder.Text" xml:space="preserve">
<value>Carpeta</value>
</data>
<data name="ModernNavigationToolbaNewBitmapImage.Text" xml:space="preserve">
<value>Imagen Bitmap</value>
</data>
<data name="ModernNavigationToolbaNewTextDocument.Text" xml:space="preserve">
<value>Documento de Texto</value>
</data>
<data name="StatusBarControlListView.Text" xml:space="preserve">
<value>Vista en Lista</value>
</data>
<data name="StatusBarControlGridView.Text" xml:space="preserve">
<value>Vista en Cuadrícula</value>
</data>
<data name="SidebarSettings.Text" xml:space="preserve">
<value>Ajustes</value>
</data>
</root>
2 changes: 2 additions & 0 deletions Files/UserControls/ModernSidebar.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ private void Sidebar_ItemInvoked(Microsoft.UI.Xaml.Controls.NavigationView sende
App.CurrentInstance.ContentFrame.Navigate(typeof(PhotoAlbum), NavigationPath, new SuppressNavigationTransitionInfo());
}

App.InteractionViewModel.IsPageTypeNotHome = true; // show controls that were hidden on the home page

App.CurrentInstance.NavigationToolbar.PathControlDisplayText = App.CurrentInstance.ViewModel.WorkingDirectory;
}

Expand Down
1 change: 1 addition & 0 deletions Files/UserControls/StatusBarControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
Height="40"
HorizontalAlignment="Stretch"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<TextBlock HorizontalAlignment="Left" Text="{x:Bind SelectedItemPropertiesViewModel.ItemSize, Mode=OneWay}" Padding="8"/>
<StackPanel
Grid.Row="1"
Padding="2"
Expand Down
1 change: 1 addition & 0 deletions Files/UserControls/StatusBarControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ namespace Files.UserControls
public sealed partial class StatusBarControl : UserControl
{
public SettingsViewModel AppSettings => App.AppSettings;
public SelectedItemPropertiesViewModel SelectedItemPropertiesViewModel => App.SelectedItemPropertiesViewModel;
public StatusBarControl()
{
this.InitializeComponent();
Expand Down
2 changes: 2 additions & 0 deletions Files/UserControls/YourHome.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ private void Button_Tapped(object sender, Windows.UI.Xaml.Input.TappedRoutedEven
App.CurrentInstance.ContentFrame.Navigate(typeof(PhotoAlbum), NavigationPath); // Grid View
break;
}

App.InteractionViewModel.IsPageTypeNotHome = true; // show controls that were hidden on the home page
}
public static StorageFile RecentsFile;
public static StorageFolder dataFolder;
Expand Down

0 comments on commit 233ae1f

Please sign in to comment.