Skip to content

Commit

Permalink
Merge branch 'master' into libraries_update
Browse files Browse the repository at this point in the history
  • Loading branch information
gsantner authored Jan 2, 2025
2 parents 4ec813b + 665925d commit a6fa12e
Show file tree
Hide file tree
Showing 218 changed files with 411 additions and 390 deletions.
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2017-2024 Gregor Santner <gsantner AT mailbox DOT org>
Copyright 2017-2025 Gregor Santner <gsantner AT mailbox DOT org>

-------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*#######################################################
*
* Maintained 2017-2024 by Gregor Santner <gsantner AT mailbox DOT org>
* Maintained 2017-2025 by Gregor Santner <gsantner AT mailbox DOT org>
*
* License of this file: Apache 2.0
* https://www.apache.org/licenses/LICENSE-2.0
Expand Down
2 changes: 1 addition & 1 deletion app/src/flavorAtest/res/values/string-not_translatable.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?><!--
Maintained 2017-2024 by Gregor Santner <gsantner AT mailbox DOT org>
Maintained 2017-2025 by Gregor Santner <gsantner AT mailbox DOT org>
To the extent possible under law, the person who associated CC0 with
this file has waived all copyright and related or neighboring rights
Expand Down
2 changes: 1 addition & 1 deletion app/src/flavorGplay/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?><!--
/*#######################################################
*
* Maintained 2017-2024 by Gregor Santner <gsantner AT mailbox DOT org>
* Maintained 2017-2025 by Gregor Santner <gsantner AT mailbox DOT org>
* License of this file: Apache 2.0
* https://www.apache.org/licenses/LICENSE-2.0
*
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?><!--
/*#######################################################
*
* Maintained 2017-2024 by Gregor Santner <gsantner AT mailbox DOT org>
* Maintained 2017-2025 by Gregor Santner <gsantner AT mailbox DOT org>
*
* License of this file: Apache 2.0
* https://www.apache.org/licenses/LICENSE-2.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*#######################################################
*
* Maintained 2017-2024 by Gregor Santner <gsantner AT mailbox DOT org>
* Maintained 2017-2025 by Gregor Santner <gsantner AT mailbox DOT org>
* License of this file: Apache 2.0
* https://www.apache.org/licenses/LICENSE-2.0
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*#######################################################
*
* Maintained 2018-2024 by Gregor Santner <gsantner AT mailbox DOT org>
* Maintained 2018-2025 by Gregor Santner <gsantner AT mailbox DOT org>
* License of this file: Apache 2.0
* https://www.apache.org/licenses/LICENSE-2.0
*
Expand Down Expand Up @@ -32,10 +32,10 @@
import net.gsantner.markor.format.ActionButtonBase.ActionItem.DisplayMode;
import net.gsantner.markor.format.asciidoc.AsciidocActionButtons;
import net.gsantner.markor.format.markdown.MarkdownActionButtons;
import net.gsantner.markor.format.orgmode.OrgmodeActionButtons;
import net.gsantner.markor.format.plaintext.PlaintextActionButtons;
import net.gsantner.markor.format.todotxt.TodoTxtActionButtons;
import net.gsantner.markor.format.wikitext.WikitextActionButtons;
import net.gsantner.markor.format.orgmode.OrgmodeActionButtons;
import net.gsantner.opoc.util.GsCollectionUtils;

import java.util.ArrayList;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*#######################################################
*
* Maintained 2017-2024 by Gregor Santner <gsantner AT mailbox DOT org>
* Maintained 2017-2025 by Gregor Santner <gsantner AT mailbox DOT org>
* License of this file: Apache 2.0
* https://www.apache.org/licenses/LICENSE-2.0
*
Expand Down Expand Up @@ -38,7 +38,6 @@
import net.gsantner.opoc.util.GsFileUtils;

import java.io.File;
import java.util.Stack;

import other.so.AndroidBug5497Workaround;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*#######################################################
*
* Maintained 2017-2024 by Gregor Santner <gsantner AT mailbox DOT org>
* Maintained 2017-2025 by Gregor Santner <gsantner AT mailbox DOT org>
* License of this file: Apache 2.0
* https://www.apache.org/licenses/LICENSE-2.0
*
Expand Down Expand Up @@ -365,6 +365,10 @@ public boolean onQueryTextChange(String text) {

@Override
public boolean onReceiveKeyPress(int keyCode, KeyEvent event) {
if (_format != null && _format.getActions().onReceiveKeyPress(keyCode, event)) {
return true;
}

if (event.isCtrlPressed()) {
if (event.isShiftPressed() && keyCode == KeyEvent.KEYCODE_Z) {
if (_editTextUndoRedoHelper != null && _editTextUndoRedoHelper.getCanRedo()) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*#######################################################
*
* Maintained 2018-2024 by Gregor Santner <gsantner AT mailbox DOT org>
* Maintained 2018-2025 by Gregor Santner <gsantner AT mailbox DOT org>
* License of this file: Apache 2.0
* https://www.apache.org/licenses/LICENSE-2.0
*
Expand Down
11 changes: 4 additions & 7 deletions app/src/main/java/net/gsantner/markor/activity/MainActivity.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*#######################################################
*
*
* Maintained 2017-2024 by Gregor Santner <gsantner AT mailbox DOT org>
* Maintained 2017-2025 by Gregor Santner <gsantner AT mailbox DOT org>
* License of this file: Apache 2.0
* https://www.apache.org/licenses/LICENSE-2.0
*
Expand Down Expand Up @@ -193,10 +193,11 @@ protected void onNewIntent(final Intent intent) {
if (_notebook != null && file != null) {
_viewPager.setCurrentItem(tabIdToPos(R.id.nav_notebook), false);
if (file.isDirectory() || GsFileBrowserListAdapter.isVirtualFolder(file)) {
_notebook.setCurrentFolder(file);
_notebook.getAdapter().setCurrentFolder(file);
} else {
_notebook.getAdapter().showFile(file);
}
_notebook.setReloadRequiredOnResume(false);
}
}

Expand Down Expand Up @@ -296,7 +297,7 @@ public void onClickFab(final View view) {
return;
}

if (_notebook.getAdapter().isCurrentFolderVirtual()) {
if (!_notebook.getAdapter().isCurrentFolderWriteable()) {
_notebook.getAdapter().setCurrentFolder(_appSettings.getNotebookDirectory());
return;
}
Expand All @@ -307,10 +308,6 @@ public void onClickFab(final View view) {
return;
}

if (!_notebook.getAdapter().isCurrentFolderWriteable()) {
return;
}

NewFileDialog.newInstance(_notebook.getCurrentFolder(), true, this::newItemCallback)
.show(getSupportFragmentManager(), NewFileDialog.FRAGMENT_TAG);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*#######################################################
*
* Maintained 2018-2024 by Gregor Santner <gsantner AT mailbox DOT org>
* Maintained 2018-2025 by Gregor Santner <gsantner AT mailbox DOT org>
* License of this file: Apache 2.0
* https://www.apache.org/licenses/LICENSE-2.0
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*#######################################################
*
* Maintained 2017-2024 by Gregor Santner <gsantner AT mailbox DOT org>
* Maintained 2017-2025 by Gregor Santner <gsantner AT mailbox DOT org>
*
* License of this file: Apache 2.0
* https://www.apache.org/licenses/LICENSE-2.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*#######################################################
*
* Maintained 2017-2024 by Gregor Santner <gsantner AT mailbox DOT org>
* Maintained 2017-2025 by Gregor Santner <gsantner AT mailbox DOT org>
* License of this file: Apache 2.0
* https://www.apache.org/licenses/LICENSE-2.0
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*#######################################################
*
* Maintained 2017-2024 by Gregor Santner <gsantner AT mailbox DOT org>
* Maintained 2017-2025 by Gregor Santner <gsantner AT mailbox DOT org>
* License of this file: Apache 2.0
* https://www.apache.org/licenses/LICENSE-2.0
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*#######################################################
*
* Maintained 2017-2024 by Gregor Santner <gsantner AT mailbox DOT org>
* Maintained 2017-2025 by Gregor Santner <gsantner AT mailbox DOT org>
* License of this file: Apache 2.0
* https://www.apache.org/licenses/LICENSE-2.0
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*#######################################################
*
* Maintained 2017-2024 by Gregor Santner <gsantner AT mailbox DOT org>
* Maintained 2017-2025 by Gregor Santner <gsantner AT mailbox DOT org>
* License of this file: Apache 2.0
* https://www.apache.org/licenses/LICENSE-2.0
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*#######################################################
*
* Maintained 2017-2024 by Gregor Santner <gsantner AT mailbox DOT org>
* Maintained 2017-2025 by Gregor Santner <gsantner AT mailbox DOT org>
* License of this file: Apache 2.0
* https://www.apache.org/licenses/LICENSE-2.0
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*#######################################################
*
* Maintained 2017-2024 by Gregor Santner <gsantner AT mailbox DOT org>
* Maintained 2017-2025 by Gregor Santner <gsantner AT mailbox DOT org>
* License of this file: Apache 2.0
* https://www.apache.org/licenses/LICENSE-2.0
*
Expand Down Expand Up @@ -1014,4 +1014,12 @@ public void runJumpBottomTopAction(ActionItem.DisplayMode displayMode) {
}
}

public boolean onReceiveKeyPress(final int keyCode, final KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_TAB && _appSettings.isIndentWithTabKey()) {
runIndentLines(event.isShiftPressed());
runRenumberOrderedListIfRequired();
return true;
}
return false;
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*#######################################################
*
* Maintained 2018-2024 by Gregor Santner <gsantner AT mailbox DOT org>
* Maintained 2018-2025 by Gregor Santner <gsantner AT mailbox DOT org>
* License of this file: Apache 2.0
* https://www.apache.org/licenses/LICENSE-2.0
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*#######################################################
*
* Maintained 2018-2024 by Gregor Santner <gsantner AT mailbox DOT org>
* Maintained 2018-2025 by Gregor Santner <gsantner AT mailbox DOT org>
* License of this file: Apache 2.0
* https://www.apache.org/licenses/LICENSE-2.0
*
Expand Down Expand Up @@ -200,9 +200,9 @@ protected String getContentType() {
}

public boolean isFileOutOfThisFormat(final @NonNull File file) {
final String name = file.getName().toLowerCase().replace(JavaPasswordbasedCryption.DEFAULT_ENCRYPTION_EXTENSION, "");
final String ext = name.replaceAll(".*\\.", ".");
return isFileOutOfThisFormat(file, name, ext);
final String name = file.getName().toLowerCase().replace(JavaPasswordbasedCryption.DEFAULT_ENCRYPTION_EXTENSION, "").trim();
final String extWithDot = GsFileUtils.getFilenameExtension(name);
return isFileOutOfThisFormat(file, name, extWithDot);
}

protected abstract boolean isFileOutOfThisFormat(final File file, final String name, final String ext);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*#######################################################
*
* Maintained 2018-2024 by Gregor Santner <gsantner AT mailbox DOT org>
* Maintained 2018-2025 by Gregor Santner <gsantner AT mailbox DOT org>
* License of this file: Apache 2.0
* https://www.apache.org/licenses/LICENSE-2.0
*
Expand All @@ -15,7 +15,6 @@
import net.gsantner.markor.R;
import net.gsantner.markor.format.ActionButtonBase;
import net.gsantner.markor.frontend.MarkorDialogFactory;
import net.gsantner.markor.frontend.textview.TextViewUtils;
import net.gsantner.markor.model.Document;

import java.util.Arrays;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*#######################################################
*
* Maintained 2018-2024 by Gregor Santner <gsantner AT mailbox DOT org>
* Maintained 2018-2025 by Gregor Santner <gsantner AT mailbox DOT org>
* License of this file: Apache 2.0
* https://www.apache.org/licenses/LICENSE-2.0
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package net.gsantner.markor.format.asciidoc;
/*#######################################################
*
* Maintained 2018-2024 by Gregor Santner <gsantner AT mailbox DOT org>
* Maintained 2018-2025 by Gregor Santner <gsantner AT mailbox DOT org>
* License of this file: Apache 2.0
* https://www.apache.org/licenses/LICENSE-2.0
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*#######################################################
*
* Maintained 2018-2024 by Gregor Santner <gsantner AT mailbox DOT org>
* Maintained 2018-2025 by Gregor Santner <gsantner AT mailbox DOT org>
* License of this file: Apache 2.0
* https://www.apache.org/licenses/LICENSE-2.0
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*#######################################################
*
* SPDX-FileCopyrightText: 2022-2024 Gregor Santner <gsantner AT mailbox DOT org>
* SPDX-FileCopyrightText: 2022-2025 Gregor Santner <gsantner AT mailbox DOT org>
* SPDX-License-Identifier: Unlicense OR CC0-1.0
*
#########################################################*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*#######################################################
*
* Maintained 2018-2024 by Gregor Santner <gsantner AT mailbox DOT org>
* Maintained 2018-2025 by Gregor Santner <gsantner AT mailbox DOT org>
* License of this file: Apache 2.0
* https://www.apache.org/licenses/LICENSE-2.0
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*#######################################################
*
* Maintained 2018-2024 by Gregor Santner <gsantner AT mailbox DOT org>
* Maintained 2018-2025 by Gregor Santner <gsantner AT mailbox DOT org>
* License of this file: Apache 2.0
* https://www.apache.org/licenses/LICENSE-2.0
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*#######################################################
*
* Maintained 2018-2024 by Gregor Santner <gsantner AT mailbox DOT org>
* Maintained 2018-2025 by Gregor Santner <gsantner AT mailbox DOT org>
* License of this file: Apache 2.0
* https://www.apache.org/licenses/LICENSE-2.0
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*#######################################################
*
* Maintained 2017-2024 by Gregor Santner <gsantner AT mailbox DOT org>
* Maintained 2017-2025 by Gregor Santner <gsantner AT mailbox DOT org>
* License of this file: Apache 2.0
* https://www.apache.org/licenses/LICENSE-2.0
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*#######################################################
*
* Maintained 2018-2024 by Gregor Santner <gsantner AT mailbox DOT org>
* Maintained 2018-2025 by Gregor Santner <gsantner AT mailbox DOT org>
* License of this file: Apache 2.0
* https://www.apache.org/licenses/LICENSE-2.0
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*#######################################################
*
* Maintained 2018-2024 by Gregor Santner <gsantner AT mailbox DOT org>
* Maintained 2018-2025 by Gregor Santner <gsantner AT mailbox DOT org>
* License of this file: Apache 2.0
* https://www.apache.org/licenses/LICENSE-2.0
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*#######################################################
*
* Maintained 2018-2024 by Gregor Santner <gsantner AT mailbox DOT org>
* Maintained 2018-2025 by Gregor Santner <gsantner AT mailbox DOT org>
* License of this file: Apache 2.0
* https://www.apache.org/licenses/LICENSE-2.0
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*#######################################################
*
* Maintained 2018-2024 by Gregor Santner <gsantner AT mailbox DOT org>
* Maintained 2018-2025 by Gregor Santner <gsantner AT mailbox DOT org>
* License of this file: Apache 2.0
* https://www.apache.org/licenses/LICENSE-2.0
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package net.gsantner.markor.format.plaintext;
/*#######################################################
*
* Maintained 2018-2024 by Gregor Santner <gsantner AT mailbox DOT org>
* Maintained 2018-2025 by Gregor Santner <gsantner AT mailbox DOT org>
* License of this file: Apache 2.0
* https://www.apache.org/licenses/LICENSE-2.0
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*#######################################################
*
* Maintained 2018-2024 by Gregor Santner <gsantner AT mailbox DOT org>
* Maintained 2018-2025 by Gregor Santner <gsantner AT mailbox DOT org>
* License of this file: Apache 2.0
* https://www.apache.org/licenses/LICENSE-2.0
*
Expand Down
Loading

0 comments on commit a6fa12e

Please sign in to comment.