Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
fc50502a
Kaydet (Commit)
fc50502a
authored
Haz 19, 2017
tarafından
jan Iversen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
iOS, update menus for menu picker
Change-Id: Idb4ee77ed83c17f8040cf1a5852ae1ac8fa855d6
üst
d36dc7b3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
69 additions
and
16 deletions
+69
-16
DocumentController.swift
...ibreOfficeLight/LibreOfficeLight/DocumentController.swift
+69
-16
Main.storyboard
...ibreOfficeLight/LibreOfficeLight/en.lproj/Main.storyboard
+0
-0
No files found.
ios/experimental/LibreOfficeLight/LibreOfficeLight/DocumentController.swift
Dosyayı görüntüle @
fc50502a
...
...
@@ -11,15 +11,24 @@ import UIKit
class
DocumentController
:
UIViewController
,
MenuDelegate
,
UIDocumentPickerDelegate
{
var
currentDocumentName
:
String
?
var
currentCloudUrl
:
URL
?
public
func
documentPicker
(
_
controller
:
UIDocumentPickerViewController
,
didPickDocumentAt
url
:
URL
)
{
currentCloudUrl
=
url
currentDocumentName
=
url
.
lastPathComponent
}
func
documentPickerWasCancelled
(
_
controller
:
UIDocumentPickerViewController
)
{
currentCloudUrl
=
nil
currentDocumentName
=
nil
}
@IBOutlet
weak
var
janTest
:
UILabel
!
// Show sidemenu (part of documentcontroller)
...
...
@@ -76,6 +85,13 @@ class DocumentController: UIViewController, MenuDelegate, UIDocumentPickerDelega
func
actionName
(
_
name
:
String
)
{
currentDocumentName
=
name
}
func
actionMenuSelected
(
_
tag
:
Int
)
{
switch
tag
...
...
@@ -93,30 +109,29 @@ class DocumentController: UIViewController, MenuDelegate, UIDocumentPickerDelega
print
(
"menu Save to be done"
)
case
4
:
// Save as...
print
(
"menu Save as... to be done"
)
let
vc
=
storyboard
?
.
instantiateViewController
(
withIdentifier
:
"setNameAction"
)
as!
setNameAction
vc
.
modalPresentationStyle
=
.
popover
vc
.
delegate
=
self
let
popover
=
vc
.
popoverPresentationController
!
popover
.
delegate
=
self
as?
UIPopoverPresentationControllerDelegate
popover
.
permittedArrowDirections
=
.
up
popover
.
sourceView
=
janTest
popover
.
sourceRect
=
janTest
.
bounds
present
(
vc
,
animated
:
true
,
completion
:
nil
)
print
(
"menu Save as... to be done"
)
case
5
:
// Save as PDF...
print
(
"menu Save as PDF... to be done"
)
case
6
:
// Print...
print
(
"menu Print... to be done"
)
case
7
:
// Copy TO iPad
print
(
"menu Copy TO iPad to be done"
)
case
8
:
// Delete FROM iPad
print
(
"menu Delete FROM iPad to be done"
)
case
9
:
// Move FROM iPad
print
(
"menu Move FROM iPad to be done"
)
default
:
// should not happen
print
(
"unknown menu"
+
String
(
tag
))
}
}
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
...
...
@@ -142,6 +157,7 @@ class DocumentController: UIViewController, MenuDelegate, UIDocumentPickerDelega
protocol
MenuDelegate
{
func
actionMenuSelected
(
_
tag
:
Int
)
func
actionName
(
_
name
:
String
)
}
...
...
@@ -159,13 +175,9 @@ class DocumentActions: UITableViewController
@IBOutlet
weak
var
buttonSaveAs
:
UIButton
!
@IBOutlet
weak
var
buttonSaveAsPDF
:
UIButton
!
@IBOutlet
weak
var
buttonPrint
:
UIButton
!
@IBOutlet
weak
var
buttonCopyTOiPad
:
UIButton
!
@IBOutlet
weak
var
buttonDeleteFROMiPad
:
UIButton
!
@IBOutlet
weak
var
buttonMoveFROMiPad
:
UIButton
!
// Actions
@IBAction
func
actionMenuSelect
(
_
sender
:
UIButton
)
{
dismiss
(
animated
:
false
)
...
...
@@ -176,7 +188,6 @@ class DocumentActions: UITableViewController
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
buttonDeleteFROMiPad
.
isEnabled
=
isDocActive
buttonSave
.
isEnabled
=
isDocActive
buttonSaveAs
.
isEnabled
=
isDocActive
buttonSaveAsPDF
.
isEnabled
=
isDocActive
...
...
@@ -184,3 +195,45 @@ class DocumentActions: UITableViewController
}
}
class
setNameAction
:
UIViewController
{
// Pointer to callback class
var
delegate
:
MenuDelegate
?
var
didEdit
:
Bool
=
false
// reference to new name
@IBOutlet
weak
var
editText
:
UITextField
!
// continue "save as..." with new name
@IBAction
func
actionOK
(
_
sender
:
UIButton
)
{
dismiss
(
animated
:
false
)
if
didEdit
&&
editText
.
text
!=
""
{
delegate
?
.
actionName
(
editText
.
text
!
)
}
}
@IBAction
func
actionStartEdit
(
_
sender
:
UITextField
)
{
if
!
didEdit
{
sender
.
text
=
""
didEdit
=
true
}
}
@IBAction
func
actionCancel
(
_
sender
:
UIButton
)
{
dismiss
(
animated
:
false
)
}
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
}
}
ios/experimental/LibreOfficeLight/LibreOfficeLight/en.lproj/Main.storyboard
Dosyayı görüntüle @
fc50502a
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment