Skip to content

Commit 5db4ed8

Browse files
committed
change "Save as file" to "Export as file" to make it clear its not synced
1 parent 70550d0 commit 5db4ed8

File tree

14 files changed

+31
-31
lines changed

14 files changed

+31
-31
lines changed

app/src/main/kotlin/com/simplemobiletools/notes/activities/MainActivity.kt

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import java.nio.charset.Charset
3333

3434
class MainActivity : SimpleActivity(), ViewPager.OnPageChangeListener {
3535
val STORAGE_OPEN_FILE = 1
36-
val STORAGE_SAVE_AS_FILE = 2
36+
val STORAGE_EXPORT_AS_FILE = 2
3737

3838
lateinit var mCurrentNote: Note
3939
lateinit var mAdapter: NotesPagerAdapter
@@ -113,7 +113,7 @@ class MainActivity : SimpleActivity(), ViewPager.OnPageChangeListener {
113113
R.id.rename_note -> displayRenameDialog()
114114
R.id.share -> shareText()
115115
R.id.open_file -> tryOpenFile()
116-
R.id.save_as_file -> trySaveAsFile()
116+
R.id.export_as_file -> tryExportAsFile()
117117
R.id.delete_note -> displayDeleteNotePrompt()
118118
R.id.settings -> startActivity(Intent(applicationContext, SettingsActivity::class.java))
119119
R.id.about -> launchAbout()
@@ -181,21 +181,21 @@ class MainActivity : SimpleActivity(), ViewPager.OnPageChangeListener {
181181
}
182182
}
183183

184-
private fun trySaveAsFile() {
184+
private fun tryExportAsFile() {
185185
if (hasWriteStoragePermission()) {
186-
saveAsFile()
186+
exportAsFile()
187187
} else {
188-
ActivityCompat.requestPermissions(this, arrayOf(Manifest.permission.WRITE_EXTERNAL_STORAGE), STORAGE_SAVE_AS_FILE)
188+
ActivityCompat.requestPermissions(this, arrayOf(Manifest.permission.WRITE_EXTERNAL_STORAGE), STORAGE_EXPORT_AS_FILE)
189189
}
190190
}
191191

192-
private fun saveAsFile() {
193-
SaveAsDialog(this, mCurrentNote) {
194-
saveNoteValueToFile(it, getCurrentNoteText())
192+
private fun exportAsFile() {
193+
ExportAsDialog(this, mCurrentNote) {
194+
exportNoteValueToFile(it, getCurrentNoteText())
195195
}
196196
}
197197

198-
fun saveNoteValueToFile(path: String, content: String) {
198+
fun exportNoteValueToFile(path: String, content: String) {
199199
try {
200200
val file = File(path)
201201
if (file.isDirectory) {
@@ -306,8 +306,8 @@ class MainActivity : SimpleActivity(), ViewPager.OnPageChangeListener {
306306
if (grantResults.isNotEmpty() && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
307307
if (requestCode == STORAGE_OPEN_FILE) {
308308
openFile()
309-
} else if (requestCode == STORAGE_SAVE_AS_FILE) {
310-
saveAsFile()
309+
} else if (requestCode == STORAGE_EXPORT_AS_FILE) {
310+
exportAsFile()
311311
}
312312
}
313313
}

app/src/main/kotlin/com/simplemobiletools/notes/dialogs/SaveAsDialog.kt renamed to app/src/main/kotlin/com/simplemobiletools/notes/dialogs/ExportAsDialog.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ import com.simplemobiletools.commons.extensions.*
99
import com.simplemobiletools.notes.R
1010
import com.simplemobiletools.notes.activities.SimpleActivity
1111
import com.simplemobiletools.notes.models.Note
12-
import kotlinx.android.synthetic.main.dialog_save_as.view.*
12+
import kotlinx.android.synthetic.main.dialog_export_as.view.*
1313
import java.io.File
1414

15-
class SaveAsDialog(val activity: SimpleActivity, val note: Note, val callback: (savePath: String) -> Unit) {
15+
class ExportAsDialog(val activity: SimpleActivity, val note: Note, val callback: (exportPath: String) -> Unit) {
1616

1717
init {
1818
var realPath = File(note.path).parent ?: Environment.getExternalStorageDirectory().toString()
19-
val view = LayoutInflater.from(activity).inflate(R.layout.dialog_save_as, null).apply {
19+
val view = LayoutInflater.from(activity).inflate(R.layout.dialog_export_as, null).apply {
2020
file_path.text = activity.humanizePath(realPath)
2121

2222
file_name.setText(note.title)
@@ -33,7 +33,7 @@ class SaveAsDialog(val activity: SimpleActivity, val note: Note, val callback: (
3333
.setNegativeButton(R.string.cancel, null)
3434
.create().apply {
3535
window!!.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE)
36-
activity.setupDialogStuff(view, this, R.string.save_as)
36+
activity.setupDialogStuff(view, this, R.string.export_as_file)
3737
getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener({
3838
val filename = view.file_name.value
3939

app/src/main/kotlin/com/simplemobiletools/notes/fragments/NoteFragment.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ class NoteFragment : Fragment() {
9494
mDb.updateNoteValue(note)
9595
(activity as MainActivity).noteSavedSuccessfully(note.title)
9696
} else {
97-
(activity as MainActivity).saveNoteValueToFile(note.path, getCurrentNoteViewText())
97+
(activity as MainActivity).exportNoteValueToFile(note.path, getCurrentNoteViewText())
9898
}
9999
}
100100

app/src/main/res/layout/dialog_save_as.xml renamed to app/src/main/res/layout/dialog_export_as.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<LinearLayout
33
xmlns:android="http://schemas.android.com/apk/res/android"
4-
android:id="@+id/save_as_holder"
4+
android:id="@+id/export_as_holder"
55
android:layout_width="match_parent"
66
android:layout_height="match_parent"
77
android:orientation="vertical"

app/src/main/res/menu/menu.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,16 @@
2424
<item
2525
android:id="@+id/open_file"
2626
android:title="@string/open_file"
27-
app:showAsAction="ifRoom"/>
27+
app:showAsAction="never"/>
2828
<item
29-
android:id="@+id/save_as_file"
30-
android:title="@string/save_as_file"
31-
app:showAsAction="ifRoom"/>
29+
android:id="@+id/export_as_file"
30+
android:title="@string/export_as_file"
31+
app:showAsAction="never"/>
3232
<item
3333
android:id="@+id/delete_note"
3434
android:icon="@drawable/ic_delete"
3535
android:title="@string/delete_note"
36-
app:showAsAction="never"/>
36+
app:showAsAction="ifRoom"/>
3737
<item
3838
android:id="@+id/settings"
3939
android:title="@string/settings"

app/src/main/res/values-de/strings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
<!-- File notes -->
1919
<string name="open_file">Open file</string>
20-
<string name="save_as_file">Save as file</string>
20+
<string name="export_as_file">Export as file</string>
2121
<string name="file_too_large">File too large, the limit is 10MB</string>
2222
<string name="only_import_file_content">Only import the file content</string>
2323
<string name="update_file_at_note">Update the file itself at updating the note</string>

app/src/main/res/values-es/strings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
<!-- File notes -->
1919
<string name="open_file">Open file</string>
20-
<string name="save_as_file">Save as file</string>
20+
<string name="export_as_file">Export as file</string>
2121
<string name="file_too_large">File too large, the limit is 10MB</string>
2222
<string name="only_import_file_content">Only import the file content</string>
2323
<string name="update_file_at_note">Update the file itself at updating the note</string>

app/src/main/res/values-fr/strings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
<!-- File notes -->
1919
<string name="open_file">Open file</string>
20-
<string name="save_as_file">Save as file</string>
20+
<string name="export_as_file">Export as file</string>
2121
<string name="file_too_large">File too large, the limit is 10MB</string>
2222
<string name="only_import_file_content">Only import the file content</string>
2323
<string name="update_file_at_note">Update the file itself at updating the note</string>

app/src/main/res/values-hu/strings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
<!-- File notes -->
1919
<string name="open_file">Open file</string>
20-
<string name="save_as_file">Save as file</string>
20+
<string name="export_as_file">Export as file</string>
2121
<string name="file_too_large">File too large, the limit is 10MB</string>
2222
<string name="only_import_file_content">Only import the file content</string>
2323
<string name="update_file_at_note">Update the file itself at updating the note</string>

app/src/main/res/values-it/strings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
<!-- File notes -->
1919
<string name="open_file">Open file</string>
20-
<string name="save_as_file">Save as file</string>
20+
<string name="export_as_file">Export as file</string>
2121
<string name="file_too_large">File too large, the limit is 10MB</string>
2222
<string name="only_import_file_content">Only import the file content</string>
2323
<string name="update_file_at_note">Update the file itself at updating the note</string>

0 commit comments

Comments
 (0)