ciborium-0.2.12+15.10.20150612/0000755000015300001610000000000012536577044015750 5ustar pbuserpbgroup00000000000000ciborium-0.2.12+15.10.20150612/cmd/0000755000015300001610000000000012536577044016513 5ustar pbuserpbgroup00000000000000ciborium-0.2.12+15.10.20150612/cmd/ciborium-ui/0000755000015300001610000000000012536577044020737 5ustar pbuserpbgroup00000000000000ciborium-0.2.12+15.10.20150612/cmd/ciborium-ui/main.go0000644000015300001610000001205012536576717022216 0ustar pbuserpbgroup00000000000000/* * Copyright 2014 Canonical Ltd. * * Authors: * Sergio Schvezov: sergio.schvezov@cannical.com * * ciborium is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 3. * * nuntium is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ package main import ( "fmt" "math/rand" "os" "path/filepath" "time" "log" "launchpad.net/ciborium/qml.v1" "launchpad.net/ciborium/udisks2" "launchpad.net/go-dbus/v1" "launchpad.net/go-xdg/v0" ) type driveControl struct { udisks *udisks2.UDisks2 ExternalDrives []udisks2.Drive Len int Formatting bool FormatError bool Unmounting bool UnmountError bool } type DriveList struct { Len int ExternalDrives []udisks2.Drive } var mainQmlPath = filepath.Join("ciborium", "qml", "main.qml") var supportedFS []string = []string{"vfat"} func init() { os.Setenv("APP_ID", "ciborium") if goPath := os.Getenv("GOPATH"); goPath != "" { p := filepath.Join(goPath, "src", goSource(), "share", mainQmlPath) fmt.Println(p) if _, err := os.Stat(p); err == nil { mainQmlPath = p } } else { p, err := xdg.Data.Find(mainQmlPath) if err != nil { log.Fatal("Unable to find main qml:", err) } mainQmlPath = p } } func goSource() string { return filepath.Join("launchpad.net", "ciborium") } func main() { // set default logger flags to get more useful info log.SetFlags(log.LstdFlags | log.Lshortfile) // not in qml.v1 //qml.Init(nil) engine := qml.NewEngine() component, err := engine.LoadFile(mainQmlPath) if err != nil { log.Fatal(err) } context := engine.Context() driveCtrl, err := newDriveControl() if err != nil { log.Fatal(err) } context.SetVar("driveCtrl", driveCtrl) window := component.CreateWindow(nil) rand.Seed(time.Now().Unix()) window.Show() window.Wait() } func newDriveControl() (*driveControl, error) { systemBus, err := dbus.Connect(dbus.SystemBus) if err != nil { return nil, err } udisks := udisks2.NewStorageWatcher(systemBus, supportedFS...) return &driveControl{udisks: udisks}, nil } func (ctrl *driveControl) Watch() { c := ctrl.udisks.SubscribeBlockDeviceEvents() go func() { log.Println("Calling Drives from Watch first gorroutine") ctrl.Drives() for block := range c { if block { log.Println("Block device added") } else { log.Println("Block device removed") } log.Println("Calling Drives from after a block was added or removed") ctrl.Drives() } }() // deal with the format jobs so that we do show the dialog correctly go func() { formatDone, formatErrors := ctrl.udisks.SubscribeFormatEvents() for { select { case d := <-formatDone: log.Println("Formatting job done", d) ctrl.Formatting = false qml.Changed(ctrl, &ctrl.Formatting) ctrl.FormatError = false qml.Changed(ctrl, &ctrl.FormatError) case e := <-formatErrors: log.Println("Formatting job error", e) ctrl.FormatError = true qml.Changed(ctrl, &ctrl.FormatError) } } }() // deal with mount and unmount events so that the ui is updated accordingly go func() { mountCompleted, mountErrors := ctrl.udisks.SubscribeMountEvents() unmountCompleted, unmountErrors := ctrl.udisks.SubscribeUnmountEvents() for { select { case d := <-mountCompleted: log.Println("Mount job done", d) ctrl.Drives() case e := <-mountErrors: log.Println("Mount job error", e) case d := <-unmountCompleted: log.Println("Unmount job done", d) ctrl.Unmounting = false qml.Changed(ctrl, &ctrl.Unmounting) case e := <-unmountErrors: log.Println("Unmount job error", e) ctrl.UnmountError = true qml.Changed(ctrl, &ctrl.UnmountError) } } }() ctrl.udisks.Init() } func (ctrl *driveControl) Drives() { log.Println("Get present drives.") go func() { ctrl.ExternalDrives = ctrl.udisks.ExternalDrives() ctrl.Len = len(ctrl.ExternalDrives) qml.Changed(ctrl, &ctrl.ExternalDrives) qml.Changed(ctrl, &ctrl.Len) }() } func (ctrl *driveControl) DriveModel(index int) string { return ctrl.ExternalDrives[index].Model() } func (ctrl *driveControl) DriveFormat(index int) { ctrl.Formatting = true ctrl.FormatError = false ctrl.UnmountError = false qml.Changed(ctrl, &ctrl.Formatting) drive := ctrl.ExternalDrives[index] log.Println("Format drive on index", index, "model", drive.Model(), "path", drive.Path) ctrl.udisks.Format(&drive) } func (ctrl *driveControl) DriveUnmount(index int) { log.Println("Unmounting device.") drive := ctrl.ExternalDrives[index] ctrl.Unmounting = true qml.Changed(ctrl, &ctrl.Unmounting) ctrl.udisks.Unmount(&drive) } func (ctrl *driveControl) DriveAt(index int) *udisks2.Drive { return &ctrl.ExternalDrives[index] } ciborium-0.2.12+15.10.20150612/cmd/ciborium/0000755000015300001610000000000012536577044020324 5ustar pbuserpbgroup00000000000000ciborium-0.2.12+15.10.20150612/cmd/ciborium/main.go0000644000015300001610000002460412536576712021606 0ustar pbuserpbgroup00000000000000/* * Copyright 2014 Canonical Ltd. * * Authors: * Sergio Schvezov: sergio.schvezov@cannical.com * * ciborium is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 3. * * nuntium is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ package main import ( "errors" "fmt" "log" "os" "path/filepath" "strings" "sync" "syscall" "time" "launchpad.net/ciborium/gettext" "launchpad.net/ciborium/notifications" "launchpad.net/ciborium/udisks2" "launchpad.net/go-dbus/v1" ) type message struct{ Summary, Body string } type notifyFreeFunc func(mountpoint) error type mountpoint string func (m mountpoint) external() bool { return strings.HasPrefix(string(m), "/media") } type mountwatch struct { lock sync.Mutex mountpoints map[mountpoint]bool } func (m *mountwatch) set(path mountpoint, state bool) { m.lock.Lock() defer m.lock.Unlock() m.mountpoints[path] = state } func (m *mountwatch) getMountpoints() []mountpoint { m.lock.Lock() defer m.lock.Unlock() mapLen := len(m.mountpoints) mountpoints := make([]mountpoint, 0, mapLen) for p := range m.mountpoints { mountpoints = append(mountpoints, p) } return mountpoints } func (m *mountwatch) warn(path mountpoint) bool { m.lock.Lock() defer m.lock.Unlock() return m.mountpoints[path] } func (m *mountwatch) remove(path mountpoint) { m.lock.Lock() defer m.lock.Unlock() delete(m.mountpoints, path) } func newMountwatch() *mountwatch { return &mountwatch{ mountpoints: make(map[mountpoint]bool), } } const ( sdCardIcon = "media-memory-sd" errorIcon = "error" homeMountpoint mountpoint = "/home" freeThreshold = 5 ) var ( mw *mountwatch supportedFS []string ) func init() { mw = newMountwatch() mw.set(homeMountpoint, true) supportedFS = []string{"vfat"} } func main() { // set default logger flags to get more useful info log.SetFlags(log.LstdFlags | log.Lshortfile) // Initialize i18n gettext.SetLocale(gettext.LC_ALL, "") gettext.Textdomain("ciborium") gettext.BindTextdomain("ciborium", "/usr/share/locale") var ( msgStorageSuccess message = message{ // TRANSLATORS: This is the summary of a notification bubble with a short message of // success when addding a storage device. Summary: gettext.Gettext("Storage device detected"), // TRANSLATORS: This is the body of a notification bubble with a short message about content // being scanned when addding a storage device. Body: gettext.Gettext("This device will be scanned for new content"), } msgStorageFail message = message{ // TRANSLATORS: This is the summary of a notification bubble with a short message of // failure when adding a storage device. Summary: gettext.Gettext("Failed to add storage device"), // TRANSLATORS: This is the body of a notification bubble with a short message with hints // with regards to the failure when adding a storage device. Body: gettext.Gettext("Make sure the storage device is correctly formated"), } msgStorageRemoved message = message{ // TRANSLATORS: This is the summary of a notification bubble with a short message of // a storage device being removed Summary: gettext.Gettext("Storage device has been removed"), // TRANSLATORS: This is the body of a notification bubble with a short message about content // from the removed device no longer being available Body: gettext.Gettext("Content previously available on this device will no longer be accessible"), } ) var ( systemBus, sessionBus *dbus.Connection err error ) if systemBus, err = dbus.Connect(dbus.SystemBus); err != nil { log.Fatal("Connection error: ", err) } log.Print("Using system bus on ", systemBus.UniqueName) if sessionBus, err = dbus.Connect(dbus.SessionBus); err != nil { log.Fatal("Connection error: ", err) } log.Print("Using session bus on ", sessionBus.UniqueName) udisks2 := udisks2.NewStorageWatcher(systemBus, supportedFS...) notificationHandler := notifications.NewLegacyHandler(sessionBus, "ciborium") notifyFree := buildFreeNotify(notificationHandler) blockAdded, blockError := udisks2.SubscribeAddEvents() formatCompleted, formatErrors := udisks2.SubscribeFormatEvents() unmountCompleted, unmountErrors := udisks2.SubscribeUnmountEvents() mountCompleted, mountErrors := udisks2.SubscribeMountEvents() mountRemoved := udisks2.SubscribeRemoveEvents() // create a routine per couple of channels, the select algorithm will make use // ignore some events if more than one channels is being written to the algorithm // will pick one at random but we want to make sure that we always react, the pairs // are safe since the deal with complementary events // block additions go func() { log.Println("Listening for addition and removal events.") for { var n *notifications.PushMessage select { case a := <-blockAdded: udisks2.Mount(a) case e := <-blockError: log.Println("Issues in block for added drive:", e) n = notificationHandler.NewStandardPushMessage( msgStorageFail.Summary, msgStorageFail.Body, errorIcon, ) case m := <-mountRemoved: log.Println("Path removed", m) n = notificationHandler.NewStandardPushMessage( msgStorageRemoved.Summary, msgStorageRemoved.Body, sdCardIcon, ) mw.remove(mountpoint(m)) case <-time.After(time.Minute): for _, m := range mw.getMountpoints() { err = notifyFree(m) if err != nil { log.Print("Error while querying free space for ", m, ": ", err) } } } if n != nil { if err := notificationHandler.Send(n); err != nil { log.Println(err) } } } }() // mount operations go func() { log.Println("Listening for mount and unmount events.") for { var n *notifications.PushMessage select { case m := <-mountCompleted: log.Println("Mounted", m) n = notificationHandler.NewStandardPushMessage( msgStorageSuccess.Summary, msgStorageSuccess.Body, sdCardIcon, ) if err := createStandardHomeDirs(m.Mountpoint); err != nil { log.Println("Failed to create standard dir layout:", err) } mw.set(mountpoint(m.Mountpoint), true) case e := <-mountErrors: log.Println("Error while mounting device", e) n = notificationHandler.NewStandardPushMessage( msgStorageFail.Summary, msgStorageFail.Body, errorIcon, ) case m := <-unmountCompleted: log.Println("Path removed", m) n = notificationHandler.NewStandardPushMessage( msgStorageRemoved.Summary, msgStorageRemoved.Body, sdCardIcon, ) mw.remove(mountpoint(m)) case e := <-unmountErrors: log.Println("Error while unmounting device", e) n = notificationHandler.NewStandardPushMessage( msgStorageFail.Summary, msgStorageFail.Body, errorIcon, ) } if n != nil { if err := notificationHandler.Send(n); err != nil { log.Println(err) } } } }() // format operations go func() { log.Println("Listening for format events.") for { var n *notifications.PushMessage select { case f := <-formatCompleted: log.Println("Format done. Trying to mount.") udisks2.Mount(f) case e := <-formatErrors: log.Println("There was an error while formatting", e) n = notificationHandler.NewStandardPushMessage( msgStorageFail.Summary, msgStorageFail.Body, errorIcon, ) } if n != nil { if err := notificationHandler.Send(n); err != nil { log.Println(err) } } } }() if err := udisks2.Init(); err != nil { log.Fatal("Cannot monitor storage devices:", err) } done := make(chan bool) <-done } // createStandardHomeDirs creates directories reflecting a standard home, these // directories are Documents, Downloads, Music, Pictures and Videos func createStandardHomeDirs(mountpoint string) error { log.Println("createStandardHomeDirs(", mountpoint, ")") for _, node := range []string{"Documents", "Downloads", "Music", "Pictures", "Videos"} { dir := filepath.Join(mountpoint, node) if _, err := os.Stat(dir); err != nil && os.IsNotExist(err) { if err := os.MkdirAll(dir, 755); err != nil { return err } } else if err != nil { return err } } return nil } // notify only notifies if a notification is actually needed // depending on freeThreshold and on warningSent's status func buildFreeNotify(nh *notifications.NotificationHandler) notifyFreeFunc { // TRANSLATORS: This is the summary of a notification bubble with a short message warning on // low space summary := gettext.Gettext("Low on disk space") // TRANSLATORS: This is the body of a notification bubble with a short message about content // reamining available space, %d is the remaining percentage of space available on internal // storage bodyInternal := gettext.Gettext("Only %d%% is available on the internal storage device") // TRANSLATORS: This is the body of a notification bubble with a short message about content // reamining available space, %d is the remaining percentage of space available on a given // external storage device bodyExternal := gettext.Gettext("Only %d%% is available on the external storage device") var body string return func(path mountpoint) error { if path.external() { body = bodyExternal } else { body = bodyInternal } availPercentage, err := queryFreePercentage(path) if err != nil { return err } if mw.warn(path) && availPercentage <= freeThreshold { n := nh.NewStandardPushMessage( summary, fmt.Sprintf(body, availPercentage), errorIcon, ) log.Println("Warning for", path, "available percentage", availPercentage) if err := nh.Send(n); err != nil { return err } mw.set(path, false) } if availPercentage > freeThreshold { mw.set(path, true) } return nil } } func queryFreePercentage(path mountpoint) (uint64, error) { s := syscall.Statfs_t{} if err := syscall.Statfs(string(path), &s); err != nil { return 0, err } if s.Blocks == 0 { return 0, errors.New("statfs call returned 0 blocks available") } return uint64(s.Bavail) * 100 / uint64(s.Blocks), nil } ciborium-0.2.12+15.10.20150612/cmd/ciborium/dir_test.go0000644000015300001610000000604212536576712022473 0ustar pbuserpbgroup00000000000000/* * Copyright 2014 Canonical Ltd. * * Authors: * Sergio Schvezov: sergio.schvezov@canonical.com * * This file is part of ubuntu-emulator. * * ciborium is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 3. * * ubuntu-emulator is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ package main import ( "os" "path/filepath" "testing" . "launchpad.net/gocheck" ) var _ = Suite(&StandardDirsTestSuite{}) type StandardDirsTestSuite struct { tmpDir string } func (s *StandardDirsTestSuite) SetUpTest(c *C) { s.tmpDir = c.MkDir() } func Test(t *testing.T) { TestingT(t) } func (s *StandardDirsTestSuite) TestCreateFromScratch(c *C) { createStandardHomeDirs(s.tmpDir) for _, d := range []string{"Documents", "Downloads", "Music", "Pictures", "Videos"} { fi, err := os.Stat(filepath.Join(s.tmpDir, d)) c.Assert(err, IsNil) c.Assert(fi.IsDir(), Equals, true) } } func (s *StandardDirsTestSuite) TestCreateWithPreExistingHead(c *C) { c.Assert(os.Mkdir(filepath.Join(s.tmpDir, "Documents"), 0755), IsNil) c.Assert(os.Mkdir(filepath.Join(s.tmpDir, "Downloads"), 0755), IsNil) c.Assert(createStandardHomeDirs(s.tmpDir), IsNil) for _, d := range []string{"Documents", "Downloads", "Music", "Pictures", "Videos"} { fi, err := os.Stat(filepath.Join(s.tmpDir, d)) c.Assert(err, IsNil) c.Assert(fi.IsDir(), Equals, true) } } func (s *StandardDirsTestSuite) TestCreateWithPreExistingTail(c *C) { c.Assert(os.Mkdir(filepath.Join(s.tmpDir, "Videos"), 0755), IsNil) c.Assert(createStandardHomeDirs(s.tmpDir), IsNil) for _, d := range []string{"Documents", "Downloads", "Music", "Pictures", "Videos"} { fi, err := os.Stat(filepath.Join(s.tmpDir, d)) c.Assert(err, IsNil) c.Assert(fi.IsDir(), Equals, true) } } func (s *StandardDirsTestSuite) TestCreateWithPreExistingMiddle(c *C) { c.Assert(os.Mkdir(filepath.Join(s.tmpDir, "Music"), 0755), IsNil) c.Assert(createStandardHomeDirs(s.tmpDir), IsNil) for _, d := range []string{"Documents", "Downloads", "Music", "Pictures", "Videos"} { fi, err := os.Stat(filepath.Join(s.tmpDir, d)) c.Assert(err, IsNil) c.Assert(fi.IsDir(), Equals, true) } } func (s *StandardDirsTestSuite) TestCreateWithPreExistingNonDir(c *C) { musicFile := filepath.Join(s.tmpDir, "Music") f, err := os.Create(musicFile) c.Assert(err, IsNil) f.Close() c.Assert(createStandardHomeDirs(s.tmpDir), IsNil) fi, err := os.Stat(musicFile) c.Assert(err, IsNil) c.Assert(fi.IsDir(), Equals, false) for _, d := range []string{"Documents", "Downloads", "Pictures", "Videos"} { fi, err := os.Stat(filepath.Join(s.tmpDir, d)) c.Assert(err, IsNil) c.Assert(fi.IsDir(), Equals, true) } } ciborium-0.2.12+15.10.20150612/update_translations.sh0000755000015300001610000000142412536576712022374 0ustar pbuserpbgroup00000000000000#!/bin/sh sources=$(find . -name '*.go' | xargs) qml=$(find . -name '*.qml' | xargs) domain='ciborium' pot_file=po/$domain.pot desktop=share/applications/$domain.desktop sed -e 's/^Name=/_Name=/' $desktop > $desktop.tr /usr/bin/intltool-extract --update --type=gettext/ini $desktop.tr $domain xgettext -o $pot_file \ --add-comments \ --from-code=UTF-8 \ --c++ --qt --add-comments=TRANSLATORS \ --keyword=Gettext --keyword=tr --keyword=tr:1,2 --keyword=N_ \ --package-name=$domain \ --copyright-holder='Canonical Ltd.' \ $sources $qml $desktop.tr.h echo Removing $desktop.tr.h $desktop.tr rm $desktop.tr.h $desktop.tr if [ "$1" = "--commit" ] && [ -n "$(bzr status $pot_file)" ]; then echo Commiting $pot_file bzr commit -m "Updated translation template" $pot_file fi ciborium-0.2.12+15.10.20150612/notifications/0000755000015300001610000000000012536577044020621 5ustar pbuserpbgroup00000000000000ciborium-0.2.12+15.10.20150612/notifications/notifications.go0000644000015300001610000000641312536576712024026 0ustar pbuserpbgroup00000000000000/* * Copyright 2014 Canonical Ltd. * * Authors: * Sergio Schvezov: sergio.schvezov@cannical.com * * ciborium is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 3. * * nuntium is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ // Notifications lives on a well-knwon bus.Address package notifications import ( "encoding/json" "path" "launchpad.net/go-dbus/v1" ) const ( dbusName = "com.ubuntu.Postal" dbusInterface = "com.ubuntu.Postal" dbusPathPart = "/com/ubuntu/Postal/" dbusPostMethod = "Post" ) type VariantMap map[string]dbus.Variant type NotificationHandler struct { dbusObject *dbus.ObjectProxy application string } func NewLegacyHandler(conn *dbus.Connection, application string) *NotificationHandler { return &NotificationHandler{ dbusObject: conn.Object(dbusName, dbus.ObjectPath(path.Join(dbusPathPart, "_"))), application: application, } } func (n *NotificationHandler) Send(m *PushMessage) error { var pushMessage string if out, err := json.Marshal(m); err == nil { pushMessage = string(out) } else { return err } _, err := n.dbusObject.Call(dbusInterface, dbusPostMethod, "_"+n.application, pushMessage) return err } // NewStandardPushMessage creates a base Notification with common // components (members) setup. func (n *NotificationHandler) NewStandardPushMessage(summary, body, icon string) *PushMessage { pm := &PushMessage{ Notification: Notification{ Card: &Card{ Summary: summary, Body: body, Actions: []string{"application:///" + n.application + ".desktop"}, Icon: icon, Popup: true, Persist: true, }, }, } return pm } // PushMessage represents a data structure to be sent over to the // Post Office. It consists of a Notification and a Message. type PushMessage struct { // Notification (optional) describes the user-facing notifications // triggered by this push message. Notification Notification `json:"notification,omitempty"` } // Notification (optional) describes the user-facing notifications // triggered by this push message. type Notification struct { Card *Card `json:"card,omitempty"` } // Card is part of a notification and represents the user visible hints for // a specific notification. type Card struct { // Summary is a required title. The card will not be presented if this is missing. Summary string `json:"summary"` // Body is the longer text. Body string `json:"body,omitempty"` // Whether to show a bubble. Users can disable this, and can easily miss // them, so don’t rely on it exclusively. Popup bool `json:"popup,omitempty"` // Actions provides actions for the bubble's snap decissions. Actions []string `json:"actions,omitempty"` // Icon is a path to an icon to display with the notification bubble. Icon string `json:"icon,omitempty"` // Whether to show in notification centre. Persist bool `json:"persist,omitempty"` } ciborium-0.2.12+15.10.20150612/share/0000755000015300001610000000000012536577044017052 5ustar pbuserpbgroup00000000000000ciborium-0.2.12+15.10.20150612/share/applications/0000755000015300001610000000000012536577044021540 5ustar pbuserpbgroup00000000000000ciborium-0.2.12+15.10.20150612/share/applications/ciborium.desktop0000644000015300001610000000065112536576712024747 0ustar pbuserpbgroup00000000000000[Desktop Entry] Type=Application Name=External Drives GenericName=SD Card Management Comment=Manages external drives Keywords=SDCard;Drive;Format Exec=ciborium-ui Terminal=false Icon=media-memory-sd X-Ubuntu-Touch=true X-Ubuntu-StageHint=SideStage X-Ubuntu-Single-Instance=true X-Ubuntu-Default-Department-ID=accessories X-Ubuntu-Gettext-Domain=ciborium X-Ubuntu-Splash-Show-Header=true X-Ubuntu-Splash-Title=External Drives ciborium-0.2.12+15.10.20150612/share/ciborium/0000755000015300001610000000000012536577044020663 5ustar pbuserpbgroup00000000000000ciborium-0.2.12+15.10.20150612/share/ciborium/qml/0000755000015300001610000000000012536577044021454 5ustar pbuserpbgroup00000000000000ciborium-0.2.12+15.10.20150612/share/ciborium/qml/components/0000755000015300001610000000000012536577044023641 5ustar pbuserpbgroup00000000000000ciborium-0.2.12+15.10.20150612/share/ciborium/qml/components/FormatConfirmation.qml0000644000015300001610000000170012536576712030154 0ustar pbuserpbgroup00000000000000import QtQuick 2.0 import Ubuntu.Components 1.1 import Ubuntu.Components.Popups 1.0 Dialog { property bool isError: driveCtrl.formatError property bool formatting: driveCtrl.formatting property var onButtonClicked property var formatButton title: i18n.tr("Formatting") ActivityIndicator { id: formatActivity visible: formatting && !isError running: formatting && !isError } Button { id: okFormatErrorButton visible: false text: i18n.tr("Ok") color: UbuntuColors.orange onClicked: onButtonClicked(formatButton) } onIsErrorChanged: { if (isError) { okFormatErrorButton.visible = true; formatActivity.visible = false; text= i18n.tr("There was an error when formatting the device"); } else { okFormatErrorButton.visible= false; formatActivity.visible= true; } } } ciborium-0.2.12+15.10.20150612/share/ciborium/qml/components/SafeRemoval.qml0000644000015300001610000000121312536576712026556 0ustar pbuserpbgroup00000000000000import QtQuick 2.0 import Ubuntu.Components 1.1 import Ubuntu.Components.Popups 1.0 Dialog { property int driveIndex property var formatButton property var removeButton property var onCancelClicked property var onContinueClicked title: i18n.tr("Confirm remove") text: i18n.tr("Files on the device can't be accessed after removing") Button { text: i18n.tr("Cancel") onClicked: onCancelClicked(formatButton, removeButton) } // Button Cancel Button { text: i18n.tr("Continue") color: UbuntuColors.orange onClicked: onContinueClicked(formatButton, removeButton) } } ciborium-0.2.12+15.10.20150612/share/ciborium/qml/components/SafeRemovalConfirmation.qml0000644000015300001610000000344512536576712031140 0ustar pbuserpbgroup00000000000000import QtQuick 2.0 import Ubuntu.Components 1.1 import Ubuntu.Components.Popups 1.0 Dialog { property bool isError: driveCtrl.unmountError property int driveCount: driveCtrl.len property var onButtonClicked property var removeButton property var formatButton title: i18n.tr("Unmounting") Button { id: unmountOkButton visible: false text: i18n.tr("Ok") color: UbuntuColors.orange onClicked: onButtonClicked() } // Button unmountOkButton ActivityIndicator { id: unmountActivity visible: driveCtrl.unmounting && !isError running: driveCtrl.unmounting && !isError onRunningChanged: { if (!running && !isError) { unmountOkButton.visible = true; unmountActivity.visible = false; text = i18n.tr("You can now safely remove the device"); } } // onRunningChanged } // ActivityIndictor unmountActivity onIsErrorChanged: { if (isError) { title = i18n.tr("Unmount Error"); text = i18n.tr("The device could not be unmounted because is busy"); if (removeButton) removeButton.enabled = true if (formatButton) formatButton.enabled = false } else { title = i18n.tr("Safe to remove"); text = i18n.tr("You can now safely remove the device"); if (removeButton) removeButton.enabled = false if (formatButton) formatButton.enabled = true } unmountOkButton.visible = true; } // onIsErrorChanged onDriveCountChanged: { if (driveCount == 0) { // TODO: really needed? PopupUtils.close(confirmationDialog) } } // onDriveCountChanged } ciborium-0.2.12+15.10.20150612/share/ciborium/qml/components/DriveDelegate.qml0000644000015300001610000000264112536576712027064 0ustar pbuserpbgroup00000000000000import QtQuick 2.0 import Ubuntu.Components 1.1 import Ubuntu.Components.Popups 1.0 UbuntuShape { property var onFormatClicked property var onSafeRemovalClicked property int driveIndex height: childrenRect.height + (3 *units.gu(1)) color: driveIndex % 2 === 0 ? "white" : "#DECAE3" Icon { id: driveIcon width: 24 height: 24 name: "media-memory-sd" //source: "file:///usr/share/icons/Humanity/devices/48/media-memory-sd.svg" anchors { top: parent.top topMargin: units.gu(2) left: parent.left leftMargin: units.gu(2) } } Label { id: driveLabel text: driveCtrl.driveModel(index) anchors { top: parent.top topMargin: units.gu(2) left: driveIcon.right leftMargin: units.gu(2) right: parent.right rightMargin: units.gu(2) bottom: driveIcon.bottom } } Button { id: formatButton text: i18n.tr("Format") onClicked: onFormatClicked(formatButton) anchors { top: driveIcon.bottom topMargin: units.gu(1) left: parent.left leftMargin: units.gu(1) } } Button { id: removalButton text: i18n.tr("Safely Remove") onClicked: onSafeRemovalClicked(formatButton, removalButton) anchors { top: driveIcon.bottom topMargin: units.gu(1) left: formatButton.right leftMargin: units.gu(1) } } } ciborium-0.2.12+15.10.20150612/share/ciborium/qml/components/FormatDialog.qml0000644000015300001610000000107712536576712026732 0ustar pbuserpbgroup00000000000000import QtQuick 2.0 import Ubuntu.Components 1.1 import Ubuntu.Components.Popups 1.0 Dialog { property int driveIndex property var formatButton property var onCancelClicked property var onContinueClicked title: i18n.tr("Format") text: i18n.tr("This action will wipe the content from the device") Button { text: i18n.tr("Cancel") onClicked: onCancelClicked(formatButton) } Button { text: i18n.tr("Continue with format") color: UbuntuColors.orange onClicked: onContinueClicked(formatButton) } } ciborium-0.2.12+15.10.20150612/share/ciborium/qml/main.qml0000644000015300001610000001215512536576712023120 0ustar pbuserpbgroup00000000000000import QtQuick 2.0 import Ubuntu.Components 1.1 import Ubuntu.Components.ListItems 0.1 as ListItem import Ubuntu.Components.Popups 1.0 import "components" /*! \brief MainView with a Label and Button elements. */ MainView { // objectName for functional testing purposes (autopilot-qt5) objectName: "mainView" // Note! applicationName needs to match the "name" field of the click manifest applicationName: "ciborium" /* This property enables the application to change orientation when the device is rotated. The default is false. */ //automaticOrientation: true width: units.gu(100) height: units.gu(75) PageStack { id: stack Component.onCompleted: push(mainPage) Page{ id: mainPage title: i18n.tr("SD Card Management") Component.onCompleted: driveCtrl.watch() Component { id: safeRemovalConfirmation SafeRemovalConfirmation { id: safeRemovalConfirmationDialog onButtonClicked: function() { console.log("SafeRemovalDialog button clicked"); PopupUtils.close(safeRemovalConfirmationDialog) } } } Component { id: safeRemoval SafeRemoval { id: safeRemovalDialog onCancelClicked: function(formatButton, removeButton) { console.log("SafeRemoval cancelation button clicked"); if (formatButton) formatButton.enabled = true; if (removeButton) removeButton.enabled = true; PopupUtils.close(safeRemovalDialog); } onContinueClicked: function(formatButton, removeButton) { if (formatButton && removeButton) { console.log("SafeRemoval continue button clicked.") driveCtrl.driveUnmount(safeRemovalDialog.driveIndex) PopupUtils.close(safeRemovalDialog) PopupUtils.open(safeRemovalConfirmation, mainPage, {"removeButton": removeButton, "formatButton": formatButton}) } else { PopupUtils.close(safeRemovalDialog) } } } } Component { id: formatConfirmation FormatConfirmation { id: formatConfirmationDialog onButtonClicked: function(button) { if (button) button.enabled = true console.log("FormatConfirmation button clicked"); PopupUtils.close(formatConfirmationDialog) } onFormattingChanged: { if (!formatConfirmationDialog.formatting && !formatConfirmationDialog.isError) { PopupUtils.close(formatConfirmationDialog); if(formatConfirmationDialog.formatButton) { formatConfirmationDialog.formatButton.enabled = true; } } } } } Component { id: format FormatDialog { id: formatDialog onCancelClicked: function(button) { console.log("Format cancelation button clicked"); button.enabled = true PopupUtils.close(formatDialog); } onContinueClicked: function(button) { if (button) { console.log("Format continue button clicked.") driveCtrl.driveFormat(formatDialog.driveIndex) PopupUtils.close(formatDialog) PopupUtils.open(formatConfirmation, mainPage, {"formatButton": button}) } else { PopupUtils.close(formatDialog) } } } } ListView { model: driveCtrl.len spacing: units.gu(1) anchors { top: parent.top bottom: parent.bottom left: parent.left right: parent.right topMargin: units.gu(1) } // anchors delegate: DriveDelegate { driveIndex: index onFormatClicked: function(button) { button.enabled = false; PopupUtils.open(format, mainPage, {"driveIndex": index, "formatButton": button}) } onSafeRemovalClicked: function(formatButton, removeButton) { formatButton.enabled = false; removeButton.enabled = false; PopupUtils.open(safeRemoval, mainPage, {"driveIndex": index, "removeButton": removeButton, "formatButton": formatButton}) } anchors { left: parent.left leftMargin: units.gu(1) right: parent.right rightMargin: units.gu(1) topMargin: units.gu(1) bottomMargin: units.gu(1) } } // delegate } // ListView } // Page } } ciborium-0.2.12+15.10.20150612/po/0000755000015300001610000000000012536577044016366 5ustar pbuserpbgroup00000000000000ciborium-0.2.12+15.10.20150612/po/pl.po0000644000015300001610000001274612536576712017354 0ustar pbuserpbgroup00000000000000# Polish translation for ciborium # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the ciborium package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: ciborium\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-03-24 16:11-0300\n" "PO-Revision-Date: 2015-04-03 13:21+0000\n" "Last-Translator: GTriderXC \n" "Language-Team: Polish \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2015-04-04 05:49+0000\n" "X-Generator: Launchpad (build 17413)\n" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. success when addding a storage device. #: cmd/ciborium/main.go:119 msgid "Storage device detected" msgstr "Wykryto urządzenie z pamięcią masową" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. being scanned when addding a storage device. #: cmd/ciborium/main.go:122 msgid "This device will be scanned for new content" msgstr "Urządzenie zostanie zeskanowaine w poszukiwaniu nowej zawartości" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. failure when adding a storage device. #: cmd/ciborium/main.go:128 msgid "Failed to add storage device" msgstr "Dodawanie urządzenia z pamięcią masową nie powiodło się" #. TRANSLATORS: This is the body of a notification bubble with a short message with hints #. with regards to the failure when adding a storage device. #: cmd/ciborium/main.go:131 msgid "Make sure the storage device is correctly formated" msgstr "Proszę się upewnić, że pamięć jest poprawnie sformatowana" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. a storage device being removed #: cmd/ciborium/main.go:137 msgid "Storage device has been removed" msgstr "Urządzenie z pamięcią masową zostało usunięte" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. from the removed device no longer being available #: cmd/ciborium/main.go:140 msgid "" "Content previously available on this device will no longer be accessible" msgstr "" "Poprzednio dostępna zawartość na tym urządzeniu nie będzie już dostępna" #. TRANSLATORS: This is the summary of a notification bubble with a short message warning on #. low space #: cmd/ciborium/main.go:229 msgid "Low on disk space" msgstr "Niskie zasoby wolnej pamięci" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on internal #. storage #: cmd/ciborium/main.go:233 #, c-format msgid "Only %d%% is available on the internal storage device" msgstr "W pamięci urządzenia pozostało dostepnych jedynie %d%%" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on a given #. external storage device #: cmd/ciborium/main.go:237 #, c-format msgid "Only %d%% is available on the external storage device" msgstr "W pamięci zewnętrznej pozostało dostepnych jedynie %d%%" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:12 msgid "Unmounting" msgstr "Odmontowanie" #: share/ciborium/qml/components/SafeRemoval.qml:21 msgid "Ok" msgstr "OK" #: share/ciborium/qml/components/SafeRemoval.qml:18 msgid "You can now safely remove the device" msgstr "Można bez obaw odłączyć urządzenie" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:38 msgid "Unmount Error" msgstr "Błąd odmontowania" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:39 msgid "The device could not be unmounted because is busy" msgstr "Urządzenie jest zajęte i nie może zostać odmontowane" #: share/ciborium/qml/components/SafeRemoval.qml:17 msgid "Safe to remove" msgstr "Odłączony" #: share/ciborium/qml/components/FormatDialog.qml:17 #: share/ciborium/qml/components/FormatDialog.qml:59 msgid "Format" msgstr "Formatuj" #: share/ciborium/qml/components/SafeRemoval.qml:59 msgid "Safely Remove" msgstr "Bezpiecznie usuń" #: share/ciborium/qml/components/FormatDialog.qml:42 msgid "Formatting" msgstr "Formatowanie" #: share/ciborium/qml/components/FormatConfirmation.qml:31 msgid "There was an error when formatting the device" msgstr "Błąd podczas formatowania urządzenia" #: share/ciborium/qml/components/FormatDialog.qml:18 msgid "This action will wipe the content from the device" msgstr "Ta operacja bezpowrotnie usunie wszystkie dane z urządzenia" #: share/ciborium/qml/components/SafeRemoval.qml:40 #: share/ciborium/qml/components/FormatDialog.qml:21 msgid "Cancel" msgstr "Anuluj" #: share/ciborium/qml/components/FormatDialog.qml:25 msgid "Continue with format" msgstr "Kontynuuj i formatuj" #: share/ciborium/qml/components/SafeRemoval.qml:36 msgid "Confirm remove" msgstr "Potwierdź operację usunięcia" #: share/ciborium/qml/components/SafeRemoval.qml:37 msgid "Files on the device can't be accessed after removing" msgstr "Po odłączeniu urządzenia zapisane na nim dane będą niedostępne" #: share/ciborium/qml/components/SafeRemoval.qml:44 msgid "Continue" msgstr "Kontynuuj" #: share/ciborium/qml/main.qml:33 msgid "SD Card Management" msgstr "Zarządzanie kartą SD" #: share/applications/ciborium.desktop.tr.h:1 msgid "External Drives" msgstr "Pamięci zewnętrzne" ciborium-0.2.12+15.10.20150612/po/ar.po0000644000015300001610000001166712536576712017344 0ustar pbuserpbgroup00000000000000# Arabic translation for ciborium # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the ciborium package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: ciborium\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-03-24 16:11-0300\n" "PO-Revision-Date: 2014-08-12 03:12+0000\n" "Last-Translator: Ibrahim Saed \n" "Language-Team: Arabic \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2015-03-25 06:07+0000\n" "X-Generator: Launchpad (build 17413)\n" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. success when addding a storage device. #: cmd/ciborium/main.go:123 msgid "Storage device detected" msgstr "تم الكشف عن جهاز تخزين" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. being scanned when addding a storage device. #: cmd/ciborium/main.go:126 msgid "This device will be scanned for new content" msgstr "سيتم فحص هذا الجهاز بحثًا عن محتوى جديد" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. failure when adding a storage device. #: cmd/ciborium/main.go:132 msgid "Failed to add storage device" msgstr "فشل في إضافة جهاز تخزين" #. TRANSLATORS: This is the body of a notification bubble with a short message with hints #. with regards to the failure when adding a storage device. #: cmd/ciborium/main.go:135 msgid "Make sure the storage device is correctly formated" msgstr "تأكد من أن جهاز التخزين مُهيأ بشكل صحيح" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. a storage device being removed #: cmd/ciborium/main.go:141 msgid "Storage device has been removed" msgstr "" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. from the removed device no longer being available #: cmd/ciborium/main.go:144 msgid "" "Content previously available on this device will no longer be accessible" msgstr "" #. TRANSLATORS: This is the summary of a notification bubble with a short message warning on #. low space #: cmd/ciborium/main.go:329 msgid "Low on disk space" msgstr "" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on internal #. storage #: cmd/ciborium/main.go:333 #, c-format msgid "Only %d%% is available on the internal storage device" msgstr "" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on a given #. external storage device #: cmd/ciborium/main.go:337 #, c-format msgid "Only %d%% is available on the external storage device" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:12 msgid "Unmounting" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:17 #: share/ciborium/qml/components/FormatConfirmation.qml:22 msgid "Ok" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:30 #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:46 msgid "You can now safely remove the device" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:38 msgid "Unmount Error" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:39 msgid "The device could not be unmounted because is busy" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:45 msgid "Safe to remove" msgstr "" #: share/ciborium/qml/components/DriveDelegate.qml:45 #: share/ciborium/qml/components/FormatDialog.qml:11 msgid "Format" msgstr "" #: share/ciborium/qml/components/DriveDelegate.qml:59 msgid "Safely Remove" msgstr "" #: share/ciborium/qml/components/FormatConfirmation.qml:11 msgid "Formatting" msgstr "" #: share/ciborium/qml/components/FormatConfirmation.qml:31 msgid "There was an error when formatting the device" msgstr "" #: share/ciborium/qml/components/FormatDialog.qml:12 msgid "This action will wipe the content from the device" msgstr "" #: share/ciborium/qml/components/FormatDialog.qml:15 #: share/ciborium/qml/components/SafeRemoval.qml:17 msgid "Cancel" msgstr "" #: share/ciborium/qml/components/FormatDialog.qml:19 msgid "Continue with format" msgstr "" #: share/ciborium/qml/components/SafeRemoval.qml:13 msgid "Confirm remove" msgstr "" #: share/ciborium/qml/components/SafeRemoval.qml:14 msgid "Files on the device can't be accessed after removing" msgstr "" #: share/ciborium/qml/components/SafeRemoval.qml:22 msgid "Continue" msgstr "" #: share/ciborium/qml/main.qml:34 msgid "SD Card Management" msgstr "" #: share/applications/ciborium.desktop.tr.h:1 msgid "External Drives" msgstr "" ciborium-0.2.12+15.10.20150612/po/sl.po0000644000015300001610000001254412536576712017353 0ustar pbuserpbgroup00000000000000# Slovenian translation for ciborium # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the ciborium package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: ciborium\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-03-24 16:11-0300\n" "PO-Revision-Date: 2015-03-29 12:15+0000\n" "Last-Translator: Sasa Batistic \n" "Language-Team: Slovenian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2015-03-30 05:47+0000\n" "X-Generator: Launchpad (build 17413)\n" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. success when addding a storage device. #: cmd/ciborium/main.go:119 msgid "Storage device detected" msgstr "Zaznana je pomnilniška naprava" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. being scanned when addding a storage device. #: cmd/ciborium/main.go:122 msgid "This device will be scanned for new content" msgstr "Ta naprava bo preiskana za novo vsebino" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. failure when adding a storage device. #: cmd/ciborium/main.go:128 msgid "Failed to add storage device" msgstr "Dodajanje pomnilniške naprave ni uspelo" #. TRANSLATORS: This is the body of a notification bubble with a short message with hints #. with regards to the failure when adding a storage device. #: cmd/ciborium/main.go:131 msgid "Make sure the storage device is correctly formated" msgstr "Prepričajte se, da je pomnilniška naprava pravilno formatirana" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. a storage device being removed #: cmd/ciborium/main.go:137 msgid "Storage device has been removed" msgstr "Pomnilniška naprava je bila odstranjena" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. from the removed device no longer being available #: cmd/ciborium/main.go:140 msgid "" "Content previously available on this device will no longer be accessible" msgstr "Vsebina, predhodno razpoložljiva na tej napravi, ne bo več na voljo" #. TRANSLATORS: This is the summary of a notification bubble with a short message warning on #. low space #: cmd/ciborium/main.go:229 msgid "Low on disk space" msgstr "Primanjkuje prostora" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on internal #. storage #: cmd/ciborium/main.go:233 #, c-format msgid "Only %d%% is available on the internal storage device" msgstr "V notranjem pomnilniku naprave je prosto samo še %d%%" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on a given #. external storage device #: cmd/ciborium/main.go:237 #, c-format msgid "Only %d%% is available on the external storage device" msgstr "V zunanjem pomnilniku naprave je prosto samo še %d%%" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:12 msgid "Unmounting" msgstr "Odklapljanje" #: share/ciborium/qml/components/SafeRemoval.qml:21 msgid "Ok" msgstr "V redu" #: share/ciborium/qml/components/SafeRemoval.qml:18 msgid "You can now safely remove the device" msgstr "Zdaj lahko varno odstranite napravo" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:38 msgid "Unmount Error" msgstr "Napaka med odklapljanjem" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:39 msgid "The device could not be unmounted because is busy" msgstr "Naprava ne more biti odklopjena, ker je zaposlena" #: share/ciborium/qml/components/SafeRemoval.qml:17 msgid "Safe to remove" msgstr "Varno za odstranitev" #: share/ciborium/qml/components/FormatDialog.qml:17 #: share/ciborium/qml/components/FormatDialog.qml:59 msgid "Format" msgstr "Vrsta" #: share/ciborium/qml/components/SafeRemoval.qml:59 msgid "Safely Remove" msgstr "Varno odstrani" #: share/ciborium/qml/components/FormatDialog.qml:42 msgid "Formatting" msgstr "Formatiranje" #: share/ciborium/qml/components/FormatConfirmation.qml:31 msgid "There was an error when formatting the device" msgstr "Prišlo je do napake ob formatiranju napake" #: share/ciborium/qml/components/FormatDialog.qml:18 msgid "This action will wipe the content from the device" msgstr "To dejanje bo izbrisalo vso vsebino z naprave" #: share/ciborium/qml/components/SafeRemoval.qml:40 #: share/ciborium/qml/components/FormatDialog.qml:21 msgid "Cancel" msgstr "Prekliči" #: share/ciborium/qml/components/FormatDialog.qml:25 msgid "Continue with format" msgstr "Nadaljuj z vrsto" #: share/ciborium/qml/components/SafeRemoval.qml:36 msgid "Confirm remove" msgstr "Potrdite odstranitev" #: share/ciborium/qml/components/SafeRemoval.qml:37 msgid "Files on the device can't be accessed after removing" msgstr "Po odstranitvi naprave ni več mogoče dostopati do datotek" #: share/ciborium/qml/components/SafeRemoval.qml:44 msgid "Continue" msgstr "Nadaljuj" #: share/ciborium/qml/main.qml:33 msgid "SD Card Management" msgstr "Upravljanje s karticami SD" #: share/applications/ciborium.desktop.tr.h:1 msgid "External Drives" msgstr "Zunanje naprave" ciborium-0.2.12+15.10.20150612/po/el.po0000644000015300001610000001437612536576712017342 0ustar pbuserpbgroup00000000000000# Greek translation for ciborium # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the ciborium package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: ciborium\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-03-24 16:11-0300\n" "PO-Revision-Date: 2015-03-30 08:05+0000\n" "Last-Translator: Simos Xenitellis \n" "Language-Team: Greek \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2015-03-31 06:02+0000\n" "X-Generator: Launchpad (build 17413)\n" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. success when addding a storage device. #: cmd/ciborium/main.go:119 msgid "Storage device detected" msgstr "Ανιχνεύτηκε συσκευή αποθήκευσης" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. being scanned when addding a storage device. #: cmd/ciborium/main.go:122 msgid "This device will be scanned for new content" msgstr "Η συσκευή θα ελεχθεί για νέο περιεχόμενο" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. failure when adding a storage device. #: cmd/ciborium/main.go:128 msgid "Failed to add storage device" msgstr "Αποτυχία προσθήκης συσκευής αποθήκευσης" #. TRANSLATORS: This is the body of a notification bubble with a short message with hints #. with regards to the failure when adding a storage device. #: cmd/ciborium/main.go:131 msgid "Make sure the storage device is correctly formated" msgstr "Επιβεβαιώστε ότι η συσκευή αποθήκευσης είναι σωστά διαμορφωμένη" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. a storage device being removed #: cmd/ciborium/main.go:137 msgid "Storage device has been removed" msgstr "Η συσκευή αποθήκευσης έχει αποσυνδεθεί" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. from the removed device no longer being available #: cmd/ciborium/main.go:140 msgid "" "Content previously available on this device will no longer be accessible" msgstr "" "Περιεχόμενο που προηγούμενα ήταν διαθέσιμο σε αυτή τη συσκευή δε θα είναι " "πλέον προσβάσιμο" #. TRANSLATORS: This is the summary of a notification bubble with a short message warning on #. low space #: cmd/ciborium/main.go:229 msgid "Low on disk space" msgstr "Λίγος διαθέσιμος χώρος στον δίσκο" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on internal #. storage #: cmd/ciborium/main.go:233 #, c-format msgid "Only %d%% is available on the internal storage device" msgstr "Μόνο το %d%% είναι διαθέσιμο στη συσκευή εσωτερικής αποθήκευσης" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on a given #. external storage device #: cmd/ciborium/main.go:237 #, c-format msgid "Only %d%% is available on the external storage device" msgstr "Μόνο το %d%% είναι διαθέσιμο στη συσκευή εξωτερικής αποθήκευσης" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:12 msgid "Unmounting" msgstr "Αποπροσάρτηση" #: share/ciborium/qml/components/SafeRemoval.qml:21 msgid "Ok" msgstr "Εντάξει" #: share/ciborium/qml/components/SafeRemoval.qml:18 msgid "You can now safely remove the device" msgstr "Τώρα μπορείτε να αφαιρέσετε την συσκευή με ασφάλεια" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:38 msgid "Unmount Error" msgstr "Σφάλμα αποπροσάρτησης" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:39 msgid "The device could not be unmounted because is busy" msgstr "Η συσκευή δεν αποπροσαρτήστηκε διότι είναι σε χρήση" #: share/ciborium/qml/components/SafeRemoval.qml:17 msgid "Safe to remove" msgstr "Ασφαλές να αφαιρεθεί" #: share/ciborium/qml/components/FormatDialog.qml:17 #: share/ciborium/qml/components/FormatDialog.qml:59 msgid "Format" msgstr "Διαμόρφωση" #: share/ciborium/qml/components/SafeRemoval.qml:59 msgid "Safely Remove" msgstr "Ασφαλής αφαίρεση" #: share/ciborium/qml/components/FormatDialog.qml:42 msgid "Formatting" msgstr "Διαμόρφωση" #: share/ciborium/qml/components/FormatConfirmation.qml:31 msgid "There was an error when formatting the device" msgstr "Συνέβη σφάλμα κατά τη μορφοποίηση της συσκευής" #: share/ciborium/qml/components/FormatDialog.qml:18 msgid "This action will wipe the content from the device" msgstr "Αυτη η πράξη θα διαγράψει το περιεχόμενο της συσκευής" #: share/ciborium/qml/components/SafeRemoval.qml:40 #: share/ciborium/qml/components/FormatDialog.qml:21 msgid "Cancel" msgstr "Ακύρωση" #: share/ciborium/qml/components/FormatDialog.qml:25 msgid "Continue with format" msgstr "Συνεχίστε με διαμόρφωση" #: share/ciborium/qml/components/SafeRemoval.qml:36 msgid "Confirm remove" msgstr "Επιβεβαιώστε την αφαίρεση" #: share/ciborium/qml/components/SafeRemoval.qml:37 msgid "Files on the device can't be accessed after removing" msgstr "" "Τα αρχεία της συσκευής δεν μπορούν να είναι προσβάσιμα μετά την αφαίρεση" #: share/ciborium/qml/components/SafeRemoval.qml:44 msgid "Continue" msgstr "Συνέχεια" #: share/ciborium/qml/main.qml:33 msgid "SD Card Management" msgstr "Διαχείριση SD κάρτας" #: share/applications/ciborium.desktop.tr.h:1 msgid "External Drives" msgstr "Εξωτερικοί δίσκοι" ciborium-0.2.12+15.10.20150612/po/sr.po0000644000015300001610000001226212536576712017356 0ustar pbuserpbgroup00000000000000# Serbian translation for ciborium # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the ciborium package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: ciborium\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-03-24 16:11-0300\n" "PO-Revision-Date: 2014-09-05 13:32+0000\n" "Last-Translator: Данило Шеган \n" "Language-Team: Serbian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2015-03-25 06:07+0000\n" "X-Generator: Launchpad (build 17413)\n" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. success when addding a storage device. #: cmd/ciborium/main.go:123 msgid "Storage device detected" msgstr "Примећен је уређај са подацима" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. being scanned when addding a storage device. #: cmd/ciborium/main.go:126 msgid "This device will be scanned for new content" msgstr "Потражићемо нови садржај на овом уређају" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. failure when adding a storage device. #: cmd/ciborium/main.go:132 msgid "Failed to add storage device" msgstr "Неуспешно додавање уређаја са подацима" #. TRANSLATORS: This is the body of a notification bubble with a short message with hints #. with regards to the failure when adding a storage device. #: cmd/ciborium/main.go:135 msgid "Make sure the storage device is correctly formated" msgstr "Проверите да ли је уређај са подацима исправно форматиран" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. a storage device being removed #: cmd/ciborium/main.go:141 msgid "Storage device has been removed" msgstr "Уклоњен је уређај са подацима" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. from the removed device no longer being available #: cmd/ciborium/main.go:144 msgid "" "Content previously available on this device will no longer be accessible" msgstr "Садржај са овог уређаја више неће бити доступан" #. TRANSLATORS: This is the summary of a notification bubble with a short message warning on #. low space #: cmd/ciborium/main.go:329 msgid "Low on disk space" msgstr "" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on internal #. storage #: cmd/ciborium/main.go:333 #, c-format msgid "Only %d%% is available on the internal storage device" msgstr "" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on a given #. external storage device #: cmd/ciborium/main.go:337 #, c-format msgid "Only %d%% is available on the external storage device" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:12 msgid "Unmounting" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:17 #: share/ciborium/qml/components/FormatConfirmation.qml:22 msgid "Ok" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:30 #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:46 msgid "You can now safely remove the device" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:38 msgid "Unmount Error" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:39 msgid "The device could not be unmounted because is busy" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:45 msgid "Safe to remove" msgstr "" #: share/ciborium/qml/components/DriveDelegate.qml:45 #: share/ciborium/qml/components/FormatDialog.qml:11 msgid "Format" msgstr "" #: share/ciborium/qml/components/DriveDelegate.qml:59 msgid "Safely Remove" msgstr "" #: share/ciborium/qml/components/FormatConfirmation.qml:11 msgid "Formatting" msgstr "" #: share/ciborium/qml/components/FormatConfirmation.qml:31 msgid "There was an error when formatting the device" msgstr "" #: share/ciborium/qml/components/FormatDialog.qml:12 msgid "This action will wipe the content from the device" msgstr "" #: share/ciborium/qml/components/FormatDialog.qml:15 #: share/ciborium/qml/components/SafeRemoval.qml:17 msgid "Cancel" msgstr "" #: share/ciborium/qml/components/FormatDialog.qml:19 msgid "Continue with format" msgstr "" #: share/ciborium/qml/components/SafeRemoval.qml:13 msgid "Confirm remove" msgstr "" #: share/ciborium/qml/components/SafeRemoval.qml:14 msgid "Files on the device can't be accessed after removing" msgstr "" #: share/ciborium/qml/components/SafeRemoval.qml:22 msgid "Continue" msgstr "" #: share/ciborium/qml/main.qml:34 msgid "SD Card Management" msgstr "" #: share/applications/ciborium.desktop.tr.h:1 msgid "External Drives" msgstr "Спољни дискови" ciborium-0.2.12+15.10.20150612/po/pt_BR.po0000644000015300001610000001303712536576712017741 0ustar pbuserpbgroup00000000000000# Brazilian Portuguese translation for ciborium # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the ciborium package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: ciborium\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-03-24 16:11-0300\n" "PO-Revision-Date: 2015-03-25 15:56+0000\n" "Last-Translator: Tiago Hillebrandt \n" "Language-Team: Brazilian Portuguese \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2015-03-26 05:30+0000\n" "X-Generator: Launchpad (build 17413)\n" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. success when addding a storage device. #: cmd/ciborium/main.go:119 msgid "Storage device detected" msgstr "Dispositivo de armazenamento detectado" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. being scanned when addding a storage device. #: cmd/ciborium/main.go:122 msgid "This device will be scanned for new content" msgstr "Este dispositivo será verificado para novo conteúdo" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. failure when adding a storage device. #: cmd/ciborium/main.go:128 msgid "Failed to add storage device" msgstr "Falha ao adicionar dispositivo de armazenamento" #. TRANSLATORS: This is the body of a notification bubble with a short message with hints #. with regards to the failure when adding a storage device. #: cmd/ciborium/main.go:131 msgid "Make sure the storage device is correctly formated" msgstr "" "Verifique se o dispositivo de armazenamento está corretamente formatado" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. a storage device being removed #: cmd/ciborium/main.go:137 msgid "Storage device has been removed" msgstr "O dispositivo de armazenamento foi removido" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. from the removed device no longer being available #: cmd/ciborium/main.go:140 msgid "" "Content previously available on this device will no longer be accessible" msgstr "" "O conteúdo disponível anteriormente neste dispositivo não será mais acessível" #. TRANSLATORS: This is the summary of a notification bubble with a short message warning on #. low space #: cmd/ciborium/main.go:229 msgid "Low on disk space" msgstr "Pouco espaço em disco" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on internal #. storage #: cmd/ciborium/main.go:233 #, c-format msgid "Only %d%% is available on the internal storage device" msgstr "Somente %d%% está disponível no dispositivo de armazenamento interno" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on a given #. external storage device #: cmd/ciborium/main.go:237 #, c-format msgid "Only %d%% is available on the external storage device" msgstr "Somente %d%% está disponível no dispositivo de armazenamento externo" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:12 msgid "Unmounting" msgstr "Desmontando" #: share/ciborium/qml/components/SafeRemoval.qml:21 msgid "Ok" msgstr "Ok" #: share/ciborium/qml/components/SafeRemoval.qml:18 msgid "You can now safely remove the device" msgstr "Agora você pode remover o dispositivo com segurança" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:38 msgid "Unmount Error" msgstr "Erro ao desmontar" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:39 msgid "The device could not be unmounted because is busy" msgstr "O dispositivo não pôde ser desmontado porque está em uso" #: share/ciborium/qml/components/SafeRemoval.qml:17 msgid "Safe to remove" msgstr "Seguro para remoção" #: share/ciborium/qml/components/FormatDialog.qml:17 #: share/ciborium/qml/components/FormatDialog.qml:59 msgid "Format" msgstr "Formatar" #: share/ciborium/qml/components/SafeRemoval.qml:59 msgid "Safely Remove" msgstr "Remover com segurança" #: share/ciborium/qml/components/FormatDialog.qml:42 msgid "Formatting" msgstr "Formatando" #: share/ciborium/qml/components/FormatConfirmation.qml:31 msgid "There was an error when formatting the device" msgstr "Houve um erro ao formatar o dispositivo" #: share/ciborium/qml/components/FormatDialog.qml:18 msgid "This action will wipe the content from the device" msgstr "Esta ação irá limpar o conteúdo do dispositivo" #: share/ciborium/qml/components/SafeRemoval.qml:40 #: share/ciborium/qml/components/FormatDialog.qml:21 msgid "Cancel" msgstr "Cancelar" #: share/ciborium/qml/components/FormatDialog.qml:25 msgid "Continue with format" msgstr "Continuar com a formatação" #: share/ciborium/qml/components/SafeRemoval.qml:36 msgid "Confirm remove" msgstr "Confirmar remoção" #: share/ciborium/qml/components/SafeRemoval.qml:37 msgid "Files on the device can't be accessed after removing" msgstr "Arquivos no dispositivo não podem ser acessados após a remoção" #: share/ciborium/qml/components/SafeRemoval.qml:44 msgid "Continue" msgstr "Continuar" #: share/ciborium/qml/main.qml:33 msgid "SD Card Management" msgstr "Gereciamento do cartão SD" #: share/applications/ciborium.desktop.tr.h:1 msgid "External Drives" msgstr "Unidades externas" ciborium-0.2.12+15.10.20150612/po/uk.po0000644000015300001610000001421512536576712017351 0ustar pbuserpbgroup00000000000000# Ukrainian translation for ciborium # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the ciborium package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: ciborium\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-03-24 16:11-0300\n" "PO-Revision-Date: 2015-03-26 16:24+0000\n" "Last-Translator: Yuri Chornoivan \n" "Language-Team: Ukrainian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2015-03-27 05:38+0000\n" "X-Generator: Launchpad (build 17413)\n" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. success when addding a storage device. #: cmd/ciborium/main.go:119 msgid "Storage device detected" msgstr "Виявлено пристрій зберігання" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. being scanned when addding a storage device. #: cmd/ciborium/main.go:122 msgid "This device will be scanned for new content" msgstr "На цьому пристрої слід шукати дані" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. failure when adding a storage device. #: cmd/ciborium/main.go:128 msgid "Failed to add storage device" msgstr "Не вдалося додати пристрій зберігання" #. TRANSLATORS: This is the body of a notification bubble with a short message with hints #. with regards to the failure when adding a storage device. #: cmd/ciborium/main.go:131 msgid "Make sure the storage device is correctly formated" msgstr "Переконайтеся, що пристрій форматовано належним чином" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. a storage device being removed #: cmd/ciborium/main.go:137 msgid "Storage device has been removed" msgstr "Пристрій зберігання даних вилучено" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. from the removed device no longer being available #: cmd/ciborium/main.go:140 msgid "" "Content previously available on this device will no longer be accessible" msgstr "" "Дані на йьому пристрої, доступ до яких раніше можна було отримати, недоступні" #. TRANSLATORS: This is the summary of a notification bubble with a short message warning on #. low space #: cmd/ciborium/main.go:229 msgid "Low on disk space" msgstr "Мало місця на диску" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on internal #. storage #: cmd/ciborium/main.go:233 #, c-format msgid "Only %d%% is available on the internal storage device" msgstr "" "На внутрішньому пристрої для зберігання даних залишилося вільними лише %d%%" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on a given #. external storage device #: cmd/ciborium/main.go:237 #, c-format msgid "Only %d%% is available on the external storage device" msgstr "На зовнішньому носії даних залишилося вільними лише %d%%" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:12 msgid "Unmounting" msgstr "Демонтування" #: share/ciborium/qml/components/SafeRemoval.qml:21 msgid "Ok" msgstr "Гаразд" #: share/ciborium/qml/components/SafeRemoval.qml:18 msgid "You can now safely remove the device" msgstr "Тепер пристрій можна безпечно вилучити" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:38 msgid "Unmount Error" msgstr "Помилка демонтування" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:39 msgid "The device could not be unmounted because is busy" msgstr "Пристрій неможливо демонтувати, оскільки його зайнято" #: share/ciborium/qml/components/SafeRemoval.qml:17 msgid "Safe to remove" msgstr "Вилучати безпечно" #: share/ciborium/qml/components/FormatDialog.qml:17 #: share/ciborium/qml/components/FormatDialog.qml:59 msgid "Format" msgstr "Форматувати" #: share/ciborium/qml/components/SafeRemoval.qml:59 msgid "Safely Remove" msgstr "Безпечно вилучити" #: share/ciborium/qml/components/FormatDialog.qml:42 msgid "Formatting" msgstr "Форматування" #: share/ciborium/qml/components/FormatConfirmation.qml:31 msgid "There was an error when formatting the device" msgstr "Під час спроби форматування пристрою сталася помилка" #: share/ciborium/qml/components/FormatDialog.qml:18 msgid "This action will wipe the content from the device" msgstr "У результаті цієї дії дані на пристрої буде витерто" #: share/ciborium/qml/components/SafeRemoval.qml:40 #: share/ciborium/qml/components/FormatDialog.qml:21 msgid "Cancel" msgstr "Скасувати" #: share/ciborium/qml/components/FormatDialog.qml:25 msgid "Continue with format" msgstr "Продовжити форматування" #: share/ciborium/qml/components/SafeRemoval.qml:36 msgid "Confirm remove" msgstr "Підтвердження вилучення" #: share/ciborium/qml/components/SafeRemoval.qml:37 msgid "Files on the device can't be accessed after removing" msgstr "Після вилучення доступ до файлів на пристрої буде неможливим" #: share/ciborium/qml/components/SafeRemoval.qml:44 msgid "Continue" msgstr "Продовжити" #: share/ciborium/qml/main.qml:33 msgid "SD Card Management" msgstr "Керування карткою SD" #: share/applications/ciborium.desktop.tr.h:1 msgid "External Drives" msgstr "Зовнішні диски" ciborium-0.2.12+15.10.20150612/po/it.po0000644000015300001610000001272612536576712017353 0ustar pbuserpbgroup00000000000000# Italian translation for ciborium # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the ciborium package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: ciborium\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-03-24 16:11-0300\n" "PO-Revision-Date: 2015-04-01 15:13+0000\n" "Last-Translator: Claudio Arseni \n" "Language-Team: Italian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2015-04-02 06:18+0000\n" "X-Generator: Launchpad (build 17413)\n" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. success when addding a storage device. #: cmd/ciborium/main.go:119 msgid "Storage device detected" msgstr "Dispositivo di archiviazione rilevato" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. being scanned when addding a storage device. #: cmd/ciborium/main.go:122 msgid "This device will be scanned for new content" msgstr "Il dispositivo verrà analizzato per rilevare nuovi contenuti" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. failure when adding a storage device. #: cmd/ciborium/main.go:128 msgid "Failed to add storage device" msgstr "Impossibile aggiungere dispositivo di archiviazione" #. TRANSLATORS: This is the body of a notification bubble with a short message with hints #. with regards to the failure when adding a storage device. #: cmd/ciborium/main.go:131 msgid "Make sure the storage device is correctly formated" msgstr "" "Assicurarsi che il dispositivo di archiviazione sia correttamente formattato" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. a storage device being removed #: cmd/ciborium/main.go:137 msgid "Storage device has been removed" msgstr "Dispositivo di archiviazione rimosso" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. from the removed device no longer being available #: cmd/ciborium/main.go:140 msgid "" "Content previously available on this device will no longer be accessible" msgstr "" "I contenuti disponibili in precedenza sul dispositivo non saranno più " "accessibili" #. TRANSLATORS: This is the summary of a notification bubble with a short message warning on #. low space #: cmd/ciborium/main.go:229 msgid "Low on disk space" msgstr "Spazio su disco scarso" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on internal #. storage #: cmd/ciborium/main.go:233 #, c-format msgid "Only %d%% is available on the internal storage device" msgstr "Spazio disponibile sulla memoria interna: %d%%" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on a given #. external storage device #: cmd/ciborium/main.go:237 #, c-format msgid "Only %d%% is available on the external storage device" msgstr "Spazio disponibile sulla memoria esterna: %d%%" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:12 msgid "Unmounting" msgstr "Smontaggio" #: share/ciborium/qml/components/SafeRemoval.qml:21 msgid "Ok" msgstr "OK" #: share/ciborium/qml/components/SafeRemoval.qml:18 msgid "You can now safely remove the device" msgstr "È ora possibile rimuovere il dispositivo" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:38 msgid "Unmount Error" msgstr "Errore nello smontare" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:39 msgid "The device could not be unmounted because is busy" msgstr "Il dispositivo non può essere smontato perché è occupato" #: share/ciborium/qml/components/SafeRemoval.qml:17 msgid "Safe to remove" msgstr "Rimozione sicura" #: share/ciborium/qml/components/FormatDialog.qml:17 #: share/ciborium/qml/components/FormatDialog.qml:59 msgid "Format" msgstr "Formatta" #: share/ciborium/qml/components/SafeRemoval.qml:59 msgid "Safely Remove" msgstr "Rimuovi in sicurezza" #: share/ciborium/qml/components/FormatDialog.qml:42 msgid "Formatting" msgstr "Formattazione" #: share/ciborium/qml/components/FormatConfirmation.qml:31 msgid "There was an error when formatting the device" msgstr "Si è verificato un errore durante la formattazione del dispositivo" #: share/ciborium/qml/components/FormatDialog.qml:18 msgid "This action will wipe the content from the device" msgstr "Questa azione cancellerà il contenuto del dispositivo" #: share/ciborium/qml/components/SafeRemoval.qml:40 #: share/ciborium/qml/components/FormatDialog.qml:21 msgid "Cancel" msgstr "Annulla" #: share/ciborium/qml/components/FormatDialog.qml:25 msgid "Continue with format" msgstr "Continua formattazione" #: share/ciborium/qml/components/SafeRemoval.qml:36 msgid "Confirm remove" msgstr "Conferma rimozione" #: share/ciborium/qml/components/SafeRemoval.qml:37 msgid "Files on the device can't be accessed after removing" msgstr "I file sul dispositivo non saranno accessibili dopo la rimozione" #: share/ciborium/qml/components/SafeRemoval.qml:44 msgid "Continue" msgstr "Continua" #: share/ciborium/qml/main.qml:33 msgid "SD Card Management" msgstr "Gestione scheda SD" #: share/applications/ciborium.desktop.tr.h:1 msgid "External Drives" msgstr "Dischi esterni" ciborium-0.2.12+15.10.20150612/po/ciborium.pot0000644000015300001610000001111412536576712020722 0ustar pbuserpbgroup00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Canonical Ltd. # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: ciborium\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2015-03-24 16:11-0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. success when addding a storage device. #: cmd/ciborium/main.go:123 msgid "Storage device detected" msgstr "" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. being scanned when addding a storage device. #: cmd/ciborium/main.go:126 msgid "This device will be scanned for new content" msgstr "" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. failure when adding a storage device. #: cmd/ciborium/main.go:132 msgid "Failed to add storage device" msgstr "" #. TRANSLATORS: This is the body of a notification bubble with a short message with hints #. with regards to the failure when adding a storage device. #: cmd/ciborium/main.go:135 msgid "Make sure the storage device is correctly formated" msgstr "" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. a storage device being removed #: cmd/ciborium/main.go:141 msgid "Storage device has been removed" msgstr "" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. from the removed device no longer being available #: cmd/ciborium/main.go:144 msgid "" "Content previously available on this device will no longer be accessible" msgstr "" #. TRANSLATORS: This is the summary of a notification bubble with a short message warning on #. low space #: cmd/ciborium/main.go:329 msgid "Low on disk space" msgstr "" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on internal #. storage #: cmd/ciborium/main.go:333 #, c-format msgid "Only %d%% is available on the internal storage device" msgstr "" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on a given #. external storage device #: cmd/ciborium/main.go:337 #, c-format msgid "Only %d%% is available on the external storage device" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:12 msgid "Unmounting" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:17 #: share/ciborium/qml/components/FormatConfirmation.qml:22 msgid "Ok" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:30 #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:46 msgid "You can now safely remove the device" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:38 msgid "Unmount Error" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:39 msgid "The device could not be unmounted because is busy" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:45 msgid "Safe to remove" msgstr "" #: share/ciborium/qml/components/DriveDelegate.qml:45 #: share/ciborium/qml/components/FormatDialog.qml:11 msgid "Format" msgstr "" #: share/ciborium/qml/components/DriveDelegate.qml:59 msgid "Safely Remove" msgstr "" #: share/ciborium/qml/components/FormatConfirmation.qml:11 msgid "Formatting" msgstr "" #: share/ciborium/qml/components/FormatConfirmation.qml:31 msgid "There was an error when formatting the device" msgstr "" #: share/ciborium/qml/components/FormatDialog.qml:12 msgid "This action will wipe the content from the device" msgstr "" #: share/ciborium/qml/components/FormatDialog.qml:15 #: share/ciborium/qml/components/SafeRemoval.qml:17 msgid "Cancel" msgstr "" #: share/ciborium/qml/components/FormatDialog.qml:19 msgid "Continue with format" msgstr "" #: share/ciborium/qml/components/SafeRemoval.qml:13 msgid "Confirm remove" msgstr "" #: share/ciborium/qml/components/SafeRemoval.qml:14 msgid "Files on the device can't be accessed after removing" msgstr "" #: share/ciborium/qml/components/SafeRemoval.qml:22 msgid "Continue" msgstr "" #: share/ciborium/qml/main.qml:34 msgid "SD Card Management" msgstr "" #: share/applications/ciborium.desktop.tr.h:1 msgid "External Drives" msgstr "" ciborium-0.2.12+15.10.20150612/po/ast.po0000644000015300001610000001263612536576712017526 0ustar pbuserpbgroup00000000000000# Asturian translation for ciborium # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the ciborium package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: ciborium\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-03-24 16:11-0300\n" "PO-Revision-Date: 2015-06-09 15:39+0000\n" "Last-Translator: enolp \n" "Language-Team: Asturian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2015-06-10 05:11+0000\n" "X-Generator: Launchpad (build 17549)\n" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. success when addding a storage device. #: cmd/ciborium/main.go:119 msgid "Storage device detected" msgstr "Preséu d'almacenamientu deteutáu" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. being scanned when addding a storage device. #: cmd/ciborium/main.go:122 msgid "This device will be scanned for new content" msgstr "Va escaniase'l conteníu d'esti preséu" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. failure when adding a storage device. #: cmd/ciborium/main.go:128 msgid "Failed to add storage device" msgstr "Falló al amestar el preséu d'almacenamientu" #. TRANSLATORS: This is the body of a notification bubble with a short message with hints #. with regards to the failure when adding a storage device. #: cmd/ciborium/main.go:131 msgid "Make sure the storage device is correctly formated" msgstr "Asegúrate de que'l preséu d'almacenamientu tea bien formatiáu" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. a storage device being removed #: cmd/ciborium/main.go:137 msgid "Storage device has been removed" msgstr "Desconeutóse'l preséu d'almacenamientu" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. from the removed device no longer being available #: cmd/ciborium/main.go:140 msgid "" "Content previously available on this device will no longer be accessible" msgstr "Los conteníos almacenaos nesti preséu yá nun van tar disponibles" #. TRANSLATORS: This is the summary of a notification bubble with a short message warning on #. low space #: cmd/ciborium/main.go:229 msgid "Low on disk space" msgstr "Pocu espaciu en discu" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on internal #. storage #: cmd/ciborium/main.go:233 #, c-format msgid "Only %d%% is available on the internal storage device" msgstr "Namái hai %d%% disponible nel discu internu" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on a given #. external storage device #: cmd/ciborium/main.go:237 #, c-format msgid "Only %d%% is available on the external storage device" msgstr "Namái hai %d%% disponible nel discu esternu" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:12 msgid "Unmounting" msgstr "Desmontando" #: share/ciborium/qml/components/SafeRemoval.qml:21 msgid "Ok" msgstr "Aceutar" #: share/ciborium/qml/components/SafeRemoval.qml:18 msgid "You can now safely remove the device" msgstr "Agora yá pues estrayer el preséu con seguridá" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:38 msgid "Unmount Error" msgstr "Fallu de desmontaxe" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:39 msgid "The device could not be unmounted because is busy" msgstr "Nun pudo desmontase'l preséu porque ta ocupáu" #: share/ciborium/qml/components/SafeRemoval.qml:17 msgid "Safe to remove" msgstr "Pue estrayese con seguridá" #: share/ciborium/qml/components/FormatDialog.qml:17 #: share/ciborium/qml/components/FormatDialog.qml:59 msgid "Format" msgstr "Formatéu" #: share/ciborium/qml/components/SafeRemoval.qml:59 msgid "Safely Remove" msgstr "Estrayer de mou seguru" #: share/ciborium/qml/components/FormatDialog.qml:42 msgid "Formatting" msgstr "Formatiando" #: share/ciborium/qml/components/FormatConfirmation.qml:31 msgid "There was an error when formatting the device" msgstr "Hebo un fallu entrín se formatiaba'l preséu" #: share/ciborium/qml/components/FormatDialog.qml:18 msgid "This action will wipe the content from the device" msgstr "Esta aición va desaniciar los conteníos actuales del preséu" #: share/ciborium/qml/components/SafeRemoval.qml:40 #: share/ciborium/qml/components/FormatDialog.qml:21 msgid "Cancel" msgstr "Encaboxar" #: share/ciborium/qml/components/FormatDialog.qml:25 msgid "Continue with format" msgstr "Siguir col formatéu" #: share/ciborium/qml/components/SafeRemoval.qml:36 msgid "Confirm remove" msgstr "Confirmar estraición" #: share/ciborium/qml/components/SafeRemoval.qml:37 msgid "Files on the device can't be accessed after removing" msgstr "" "Nun va poder accedese a los ficheros d'esti preséu dempués d'estrayelu" #: share/ciborium/qml/components/SafeRemoval.qml:44 msgid "Continue" msgstr "Siguir" #: share/ciborium/qml/main.qml:33 msgid "SD Card Management" msgstr "Xestión de tarxetes SD" #: share/applications/ciborium.desktop.tr.h:1 msgid "External Drives" msgstr "Almacenamientos esternos" ciborium-0.2.12+15.10.20150612/po/sv.po0000644000015300001610000001263412536576712017365 0ustar pbuserpbgroup00000000000000# Swedish translation for ciborium # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the ciborium package. # FIRST AUTHOR , 2014. # clone , 2015. msgid "" msgstr "" "Project-Id-Version: ciborium\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-03-24 16:11-0300\n" "PO-Revision-Date: 2015-04-03 05:35+0000\n" "Last-Translator: Josef Andersson \n" "Language-Team: Swedish\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2015-04-04 05:49+0000\n" "X-Generator: Launchpad (build 17413)\n" "Language: sv\n" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. success when addding a storage device. #: cmd/ciborium/main.go:119 msgid "Storage device detected" msgstr "Lagringsenhet hittad" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. being scanned when addding a storage device. #: cmd/ciborium/main.go:122 msgid "This device will be scanned for new content" msgstr "Enheten kommer att genomsökas efter nytt innehåll" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. failure when adding a storage device. #: cmd/ciborium/main.go:128 msgid "Failed to add storage device" msgstr "Kunde inte ansluta lagringsenhet" #. TRANSLATORS: This is the body of a notification bubble with a short message with hints #. with regards to the failure when adding a storage device. #: cmd/ciborium/main.go:131 msgid "Make sure the storage device is correctly formated" msgstr "Kontrollera att lagringsenheten är korrekt formaterad" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. a storage device being removed #: cmd/ciborium/main.go:137 msgid "Storage device has been removed" msgstr "Lagringsenheten har blivit borttagen" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. from the removed device no longer being available #: cmd/ciborium/main.go:140 msgid "" "Content previously available on this device will no longer be accessible" msgstr "" "Tidigare tillgängligt innehåll på den här enheten är inte åtkomstbart" #. TRANSLATORS: This is the summary of a notification bubble with a short message warning on #. low space #: cmd/ciborium/main.go:229 msgid "Low on disk space" msgstr "Dåligt med diskutrymme" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on internal #. storage #: cmd/ciborium/main.go:233 #, c-format msgid "Only %d%% is available on the internal storage device" msgstr "Endast %d%% är tillgängligt på den interna lagringsenheten" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on a given #. external storage device #: cmd/ciborium/main.go:237 #, c-format msgid "Only %d%% is available on the external storage device" msgstr "Endast %d%% är tillgängligt på den externa lagringsenheten" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:12 msgid "Unmounting" msgstr "Avmonterar" #: share/ciborium/qml/components/SafeRemoval.qml:21 msgid "Ok" msgstr "OK" #: share/ciborium/qml/components/SafeRemoval.qml:18 msgid "You can now safely remove the device" msgstr "Du kan nu ta säkert ta bort enheten" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:38 msgid "Unmount Error" msgstr "Avmonteringsfel" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:39 msgid "The device could not be unmounted because is busy" msgstr "Enheten kunde inte avmonteras eftersom den är upptagen" #: share/ciborium/qml/components/SafeRemoval.qml:17 msgid "Safe to remove" msgstr "Säkert att ta bort" #: share/ciborium/qml/components/FormatDialog.qml:17 #: share/ciborium/qml/components/FormatDialog.qml:59 msgid "Format" msgstr "Formatera" #: share/ciborium/qml/components/SafeRemoval.qml:59 msgid "Safely Remove" msgstr "Säker borttagning" #: share/ciborium/qml/components/FormatDialog.qml:42 msgid "Formatting" msgstr "Formaterar" #: share/ciborium/qml/components/FormatConfirmation.qml:31 msgid "There was an error when formatting the device" msgstr "Det uppstod ett fel vid formatering av enheten" #: share/ciborium/qml/components/FormatDialog.qml:18 msgid "This action will wipe the content from the device" msgstr "Denna åtgärd kommer att radera innehållet på enheten" #: share/ciborium/qml/components/SafeRemoval.qml:40 #: share/ciborium/qml/components/FormatDialog.qml:21 msgid "Cancel" msgstr "Avbryt" #: share/ciborium/qml/components/FormatDialog.qml:25 msgid "Continue with format" msgstr "Fortsätt med formatering" #: share/ciborium/qml/components/SafeRemoval.qml:36 msgid "Confirm remove" msgstr "Bekräfta borttagning" #: share/ciborium/qml/components/SafeRemoval.qml:37 msgid "Files on the device can't be accessed after removing" msgstr "Filer på enheten kan inte kommas åt efter borttagning" #: share/ciborium/qml/components/SafeRemoval.qml:44 msgid "Continue" msgstr "Fortsätt" #: share/ciborium/qml/main.qml:33 msgid "SD Card Management" msgstr "SD-kort hantering" #: share/applications/ciborium.desktop.tr.h:1 msgid "External Drives" msgstr "Externa diskar" ciborium-0.2.12+15.10.20150612/po/id.po0000644000015300001610000001200412536576712017320 0ustar pbuserpbgroup00000000000000# Indonesian translation for ciborium # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the ciborium package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: ciborium\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-03-24 16:11-0300\n" "PO-Revision-Date: 2014-11-24 04:19+0000\n" "Last-Translator: FULL NAME \n" "Language-Team: Indonesian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2015-03-25 06:07+0000\n" "X-Generator: Launchpad (build 17413)\n" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. success when addding a storage device. #: cmd/ciborium/main.go:123 msgid "Storage device detected" msgstr "Perangkat penyimpanan terdeteksi" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. being scanned when addding a storage device. #: cmd/ciborium/main.go:126 msgid "This device will be scanned for new content" msgstr "Perangkat ini akan dipindai untuk memeriksa isi barunya" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. failure when adding a storage device. #: cmd/ciborium/main.go:132 msgid "Failed to add storage device" msgstr "Gagal menambah perangkat penyimpanan" #. TRANSLATORS: This is the body of a notification bubble with a short message with hints #. with regards to the failure when adding a storage device. #: cmd/ciborium/main.go:135 msgid "Make sure the storage device is correctly formated" msgstr "Pastikan bahwa perangkat penyimpanan terformat dengan benar" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. a storage device being removed #: cmd/ciborium/main.go:141 msgid "Storage device has been removed" msgstr "Perangkat penyimpanan telah dicopot" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. from the removed device no longer being available #: cmd/ciborium/main.go:144 msgid "" "Content previously available on this device will no longer be accessible" msgstr "" "Isi yang sebelumnya ada pada perangkat ini tak akan dapat diakses lagi" #. TRANSLATORS: This is the summary of a notification bubble with a short message warning on #. low space #: cmd/ciborium/main.go:329 msgid "Low on disk space" msgstr "" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on internal #. storage #: cmd/ciborium/main.go:333 #, c-format msgid "Only %d%% is available on the internal storage device" msgstr "" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on a given #. external storage device #: cmd/ciborium/main.go:337 #, c-format msgid "Only %d%% is available on the external storage device" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:12 msgid "Unmounting" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:17 #: share/ciborium/qml/components/FormatConfirmation.qml:22 msgid "Ok" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:30 #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:46 msgid "You can now safely remove the device" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:38 msgid "Unmount Error" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:39 msgid "The device could not be unmounted because is busy" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:45 msgid "Safe to remove" msgstr "" #: share/ciborium/qml/components/DriveDelegate.qml:45 #: share/ciborium/qml/components/FormatDialog.qml:11 msgid "Format" msgstr "" #: share/ciborium/qml/components/DriveDelegate.qml:59 msgid "Safely Remove" msgstr "" #: share/ciborium/qml/components/FormatConfirmation.qml:11 msgid "Formatting" msgstr "" #: share/ciborium/qml/components/FormatConfirmation.qml:31 msgid "There was an error when formatting the device" msgstr "" #: share/ciborium/qml/components/FormatDialog.qml:12 msgid "This action will wipe the content from the device" msgstr "" #: share/ciborium/qml/components/FormatDialog.qml:15 #: share/ciborium/qml/components/SafeRemoval.qml:17 msgid "Cancel" msgstr "" #: share/ciborium/qml/components/FormatDialog.qml:19 msgid "Continue with format" msgstr "" #: share/ciborium/qml/components/SafeRemoval.qml:13 msgid "Confirm remove" msgstr "" #: share/ciborium/qml/components/SafeRemoval.qml:14 msgid "Files on the device can't be accessed after removing" msgstr "" #: share/ciborium/qml/components/SafeRemoval.qml:22 msgid "Continue" msgstr "" #: share/ciborium/qml/main.qml:34 msgid "SD Card Management" msgstr "" #: share/applications/ciborium.desktop.tr.h:1 msgid "External Drives" msgstr "Drive Eksternal" ciborium-0.2.12+15.10.20150612/po/ja.po0000644000015300001610000001215712536576712017327 0ustar pbuserpbgroup00000000000000# Japanese translation for ciborium # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the ciborium package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: ciborium\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-03-24 16:11-0300\n" "PO-Revision-Date: 2014-09-18 06:29+0000\n" "Last-Translator: Mitsuya Shibata \n" "Language-Team: Japanese \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2015-03-25 06:07+0000\n" "X-Generator: Launchpad (build 17413)\n" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. success when addding a storage device. #: cmd/ciborium/main.go:123 msgid "Storage device detected" msgstr "ストレージデバイスを検出しました" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. being scanned when addding a storage device. #: cmd/ciborium/main.go:126 msgid "This device will be scanned for new content" msgstr "このデバイスのコンテンツをスキャンします" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. failure when adding a storage device. #: cmd/ciborium/main.go:132 msgid "Failed to add storage device" msgstr "ストレージデバイスの追加に失敗しました" #. TRANSLATORS: This is the body of a notification bubble with a short message with hints #. with regards to the failure when adding a storage device. #: cmd/ciborium/main.go:135 msgid "Make sure the storage device is correctly formated" msgstr "ストレージデバイスが正しくフォーマットされているか確認してください" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. a storage device being removed #: cmd/ciborium/main.go:141 msgid "Storage device has been removed" msgstr "ストレージデバイスが取り外されました" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. from the removed device no longer being available #: cmd/ciborium/main.go:144 msgid "" "Content previously available on this device will no longer be accessible" msgstr "このデバイス上のコンテンツにはアクセスできなくなります。" #. TRANSLATORS: This is the summary of a notification bubble with a short message warning on #. low space #: cmd/ciborium/main.go:329 msgid "Low on disk space" msgstr "" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on internal #. storage #: cmd/ciborium/main.go:333 #, c-format msgid "Only %d%% is available on the internal storage device" msgstr "" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on a given #. external storage device #: cmd/ciborium/main.go:337 #, c-format msgid "Only %d%% is available on the external storage device" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:12 msgid "Unmounting" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:17 #: share/ciborium/qml/components/FormatConfirmation.qml:22 msgid "Ok" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:30 #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:46 msgid "You can now safely remove the device" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:38 msgid "Unmount Error" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:39 msgid "The device could not be unmounted because is busy" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:45 msgid "Safe to remove" msgstr "" #: share/ciborium/qml/components/DriveDelegate.qml:45 #: share/ciborium/qml/components/FormatDialog.qml:11 msgid "Format" msgstr "" #: share/ciborium/qml/components/DriveDelegate.qml:59 msgid "Safely Remove" msgstr "" #: share/ciborium/qml/components/FormatConfirmation.qml:11 msgid "Formatting" msgstr "" #: share/ciborium/qml/components/FormatConfirmation.qml:31 msgid "There was an error when formatting the device" msgstr "" #: share/ciborium/qml/components/FormatDialog.qml:12 msgid "This action will wipe the content from the device" msgstr "" #: share/ciborium/qml/components/FormatDialog.qml:15 #: share/ciborium/qml/components/SafeRemoval.qml:17 msgid "Cancel" msgstr "" #: share/ciborium/qml/components/FormatDialog.qml:19 msgid "Continue with format" msgstr "" #: share/ciborium/qml/components/SafeRemoval.qml:13 msgid "Confirm remove" msgstr "" #: share/ciborium/qml/components/SafeRemoval.qml:14 msgid "Files on the device can't be accessed after removing" msgstr "" #: share/ciborium/qml/components/SafeRemoval.qml:22 msgid "Continue" msgstr "" #: share/ciborium/qml/main.qml:34 msgid "SD Card Management" msgstr "" #: share/applications/ciborium.desktop.tr.h:1 msgid "External Drives" msgstr "" ciborium-0.2.12+15.10.20150612/po/de.po0000644000015300001610000001266412536576712017330 0ustar pbuserpbgroup00000000000000# German translation for ciborium # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the ciborium package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: ciborium\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-03-24 16:11-0300\n" "PO-Revision-Date: 2015-05-05 16:21+0000\n" "Last-Translator: Tobias Bannert \n" "Language-Team: German \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2015-05-06 05:47+0000\n" "X-Generator: Launchpad (build 17474)\n" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. success when addding a storage device. #: cmd/ciborium/main.go:119 msgid "Storage device detected" msgstr "Speichermedium gefunden" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. being scanned when addding a storage device. #: cmd/ciborium/main.go:122 msgid "This device will be scanned for new content" msgstr "Dieses Medium wird auf neue Inhalte eingelesen" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. failure when adding a storage device. #: cmd/ciborium/main.go:128 msgid "Failed to add storage device" msgstr "Medium konnte nicht hinzugefügt werden" #. TRANSLATORS: This is the body of a notification bubble with a short message with hints #. with regards to the failure when adding a storage device. #: cmd/ciborium/main.go:131 msgid "Make sure the storage device is correctly formated" msgstr "Bitte sicher stellen, dass das Medium richtig formatiert ist" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. a storage device being removed #: cmd/ciborium/main.go:137 msgid "Storage device has been removed" msgstr "Speichermedium wurde entfernt" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. from the removed device no longer being available #: cmd/ciborium/main.go:140 msgid "" "Content previously available on this device will no longer be accessible" msgstr "" "Auf den vormaligen Inhalt dieses Mediums kann nicht mehr zugegriffen werden." #. TRANSLATORS: This is the summary of a notification bubble with a short message warning on #. low space #: cmd/ciborium/main.go:229 msgid "Low on disk space" msgstr "Geringer Speicherplatz" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on internal #. storage #: cmd/ciborium/main.go:233 #, c-format msgid "Only %d%% is available on the internal storage device" msgstr "Nur noch %d% % sind auf dem internen Speicher verfügbar" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on a given #. external storage device #: cmd/ciborium/main.go:237 #, c-format msgid "Only %d%% is available on the external storage device" msgstr "Nur noch %d% % sind auf dem externen Speicher verfügbar" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:12 msgid "Unmounting" msgstr "Wird ausgehängt" #: share/ciborium/qml/components/SafeRemoval.qml:21 msgid "Ok" msgstr "OK" #: share/ciborium/qml/components/SafeRemoval.qml:18 msgid "You can now safely remove the device" msgstr "Sie können jetzt gefahrlos Ihr Gerät entfernen" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:38 msgid "Unmount Error" msgstr "Fehler beim Aushängen" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:39 msgid "The device could not be unmounted because is busy" msgstr "Das Gerät kann nicht ausgehängt werden, da es beschäftigt ist" #: share/ciborium/qml/components/SafeRemoval.qml:17 msgid "Safe to remove" msgstr "Sicher zu entfernen" #: share/ciborium/qml/components/FormatDialog.qml:17 #: share/ciborium/qml/components/FormatDialog.qml:59 msgid "Format" msgstr "Formatieren" #: share/ciborium/qml/components/SafeRemoval.qml:59 msgid "Safely Remove" msgstr "Sicher entfernen" #: share/ciborium/qml/components/FormatDialog.qml:42 msgid "Formatting" msgstr "Formatieren läuft" #: share/ciborium/qml/components/FormatConfirmation.qml:31 msgid "There was an error when formatting the device" msgstr "Beim Formatieren des Gerätes trat ein Fehler auf" #: share/ciborium/qml/components/FormatDialog.qml:18 msgid "This action will wipe the content from the device" msgstr "Diese Aktion wird alle Daten vom Gerät löschen" #: share/ciborium/qml/components/SafeRemoval.qml:40 #: share/ciborium/qml/components/FormatDialog.qml:21 msgid "Cancel" msgstr "Abbrechen" #: share/ciborium/qml/components/FormatDialog.qml:25 msgid "Continue with format" msgstr "Mit Formatieren fortfahren" #: share/ciborium/qml/components/SafeRemoval.qml:36 msgid "Confirm remove" msgstr "Entfernen bestätigen" #: share/ciborium/qml/components/SafeRemoval.qml:37 msgid "Files on the device can't be accessed after removing" msgstr "" "Auf Dateien, auf dem Gerät, kann nach dem Entfernen nicht mehr zugegriffen " "werden" #: share/ciborium/qml/components/SafeRemoval.qml:44 msgid "Continue" msgstr "Weiter" #: share/ciborium/qml/main.qml:33 msgid "SD Card Management" msgstr "SD-Kartenverwaltung" #: share/applications/ciborium.desktop.tr.h:1 msgid "External Drives" msgstr "Externe Speichermedien" ciborium-0.2.12+15.10.20150612/po/gl.po0000644000015300001610000001266712536576712017345 0ustar pbuserpbgroup00000000000000# Galician translation for ciborium # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the ciborium package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: ciborium\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-03-24 16:11-0300\n" "PO-Revision-Date: 2015-05-15 14:52+0000\n" "Last-Translator: Marcos Lans \n" "Language-Team: Galician \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2015-05-16 05:44+0000\n" "X-Generator: Launchpad (build 17493)\n" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. success when addding a storage device. #: cmd/ciborium/main.go:119 msgid "Storage device detected" msgstr "Detectouse un dispositivo de almacenamento" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. being scanned when addding a storage device. #: cmd/ciborium/main.go:122 msgid "This device will be scanned for new content" msgstr "Buscaranse novos contidos no dispositivo" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. failure when adding a storage device. #: cmd/ciborium/main.go:128 msgid "Failed to add storage device" msgstr "Produciuse un fallo ao engadir o novo dispositivo" #. TRANSLATORS: This is the body of a notification bubble with a short message with hints #. with regards to the failure when adding a storage device. #: cmd/ciborium/main.go:131 msgid "Make sure the storage device is correctly formated" msgstr "Asegúrese que o dispositivo está formatado correctamente" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. a storage device being removed #: cmd/ciborium/main.go:137 msgid "Storage device has been removed" msgstr "Retirouse o dispositivo de almacenamento" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. from the removed device no longer being available #: cmd/ciborium/main.go:140 msgid "" "Content previously available on this device will no longer be accessible" msgstr "Xa non poderá acceder ao contido dispoñíbel no dispositivo" #. TRANSLATORS: This is the summary of a notification bubble with a short message warning on #. low space #: cmd/ciborium/main.go:229 msgid "Low on disk space" msgstr "Fica pouco espazo no disco" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on internal #. storage #: cmd/ciborium/main.go:233 #, c-format msgid "Only %d%% is available on the internal storage device" msgstr "Só quedan dispoñíbeis %d%% no dispositivo de almacenamento interno" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on a given #. external storage device #: cmd/ciborium/main.go:237 #, c-format msgid "Only %d%% is available on the external storage device" msgstr "Só quedan dispoñíbeis %d%% no dispositivo de almacenamento externo" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:12 msgid "Unmounting" msgstr "Desmontando" #: share/ciborium/qml/components/SafeRemoval.qml:21 msgid "Ok" msgstr "Aceptar" #: share/ciborium/qml/components/SafeRemoval.qml:18 msgid "You can now safely remove the device" msgstr "Pode extraer con seguranza o dispositivo" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:38 msgid "Unmount Error" msgstr "Erro ao desmontar" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:39 msgid "The device could not be unmounted because is busy" msgstr "Non foi posíbel desmontar o dispositivo porque está ocupado" #: share/ciborium/qml/components/SafeRemoval.qml:17 msgid "Safe to remove" msgstr "A extracción é segura" #: share/ciborium/qml/components/FormatDialog.qml:17 #: share/ciborium/qml/components/FormatDialog.qml:59 msgid "Format" msgstr "Formatar" #: share/ciborium/qml/components/SafeRemoval.qml:59 msgid "Safely Remove" msgstr "Extraer de xeito seguro" #: share/ciborium/qml/components/FormatDialog.qml:42 msgid "Formatting" msgstr "Formatado" #: share/ciborium/qml/components/FormatConfirmation.qml:31 msgid "There was an error when formatting the device" msgstr "Produciuse un erro formatando o dispositivo" #: share/ciborium/qml/components/FormatDialog.qml:18 msgid "This action will wipe the content from the device" msgstr "Esta acción borrará o contido do dispositivo" #: share/ciborium/qml/components/SafeRemoval.qml:40 #: share/ciborium/qml/components/FormatDialog.qml:21 msgid "Cancel" msgstr "Cancelar" #: share/ciborium/qml/components/FormatDialog.qml:25 msgid "Continue with format" msgstr "Continuar co formatado" #: share/ciborium/qml/components/SafeRemoval.qml:36 msgid "Confirm remove" msgstr "Confirmar a extracción" #: share/ciborium/qml/components/SafeRemoval.qml:37 msgid "Files on the device can't be accessed after removing" msgstr "Non poderá acceder aos ficheiros do dispositivo despois de retiralo" #: share/ciborium/qml/components/SafeRemoval.qml:44 msgid "Continue" msgstr "Continuar" #: share/ciborium/qml/main.qml:33 msgid "SD Card Management" msgstr "Xestión de tarxetas SD" #: share/applications/ciborium.desktop.tr.h:1 msgid "External Drives" msgstr "Dispositivos externos" ciborium-0.2.12+15.10.20150612/po/fr.po0000644000015300001610000001306512536576712017343 0ustar pbuserpbgroup00000000000000# French translation for ciborium # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the ciborium package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: ciborium\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-03-24 16:11-0300\n" "PO-Revision-Date: 2015-03-25 19:14+0000\n" "Last-Translator: Jean Marc \n" "Language-Team: French \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2015-03-26 05:30+0000\n" "X-Generator: Launchpad (build 17413)\n" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. success when addding a storage device. #: cmd/ciborium/main.go:119 msgid "Storage device detected" msgstr "Périphérique de stockage détecté" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. being scanned when addding a storage device. #: cmd/ciborium/main.go:122 msgid "This device will be scanned for new content" msgstr "Ce périphéque sera analysé pour détecter du nouveau contenu" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. failure when adding a storage device. #: cmd/ciborium/main.go:128 msgid "Failed to add storage device" msgstr "Échec d'ajout du périphérique de stockage" #. TRANSLATORS: This is the body of a notification bubble with a short message with hints #. with regards to the failure when adding a storage device. #: cmd/ciborium/main.go:131 msgid "Make sure the storage device is correctly formated" msgstr "Assurez-vous que le périphérique de stockage est bien formaté" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. a storage device being removed #: cmd/ciborium/main.go:137 msgid "Storage device has been removed" msgstr "Le périphérique de stockage a été retiré" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. from the removed device no longer being available #: cmd/ciborium/main.go:140 msgid "" "Content previously available on this device will no longer be accessible" msgstr "" "Le contenu précédemment disponible sur ce périphérique ne sera plus " "accessible" #. TRANSLATORS: This is the summary of a notification bubble with a short message warning on #. low space #: cmd/ciborium/main.go:229 msgid "Low on disk space" msgstr "Espace disque faible" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on internal #. storage #: cmd/ciborium/main.go:233 #, c-format msgid "Only %d%% is available on the internal storage device" msgstr "" "Seul %d%% de l'espace est disponible sur le support de stockage interne" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on a given #. external storage device #: cmd/ciborium/main.go:237 #, c-format msgid "Only %d%% is available on the external storage device" msgstr "" "Seul %d%% de l'espace est disponible sur le périphérique de stockage externe" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:12 msgid "Unmounting" msgstr "Démontage" #: share/ciborium/qml/components/SafeRemoval.qml:21 msgid "Ok" msgstr "OK" #: share/ciborium/qml/components/SafeRemoval.qml:18 msgid "You can now safely remove the device" msgstr "Vous pouvez désormais retirer votre périphérique en toute sécurité" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:38 msgid "Unmount Error" msgstr "Erreur au démontage" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:39 msgid "The device could not be unmounted because is busy" msgstr "Le périphérique pourrait ne pas être démonté car il est occupé" #: share/ciborium/qml/components/SafeRemoval.qml:17 msgid "Safe to remove" msgstr "Retirable en toute sécurité" #: share/ciborium/qml/components/FormatDialog.qml:17 #: share/ciborium/qml/components/FormatDialog.qml:59 msgid "Format" msgstr "Formater" #: share/ciborium/qml/components/SafeRemoval.qml:59 msgid "Safely Remove" msgstr "Retirer en toute sécurité" #: share/ciborium/qml/components/FormatDialog.qml:42 msgid "Formatting" msgstr "Formatage en cours" #: share/ciborium/qml/components/FormatConfirmation.qml:31 msgid "There was an error when formatting the device" msgstr "Il y a eu une erreur lors du formatage du périphérique" #: share/ciborium/qml/components/FormatDialog.qml:18 msgid "This action will wipe the content from the device" msgstr "Cette action supprimera le contenu du périphérique" #: share/ciborium/qml/components/SafeRemoval.qml:40 #: share/ciborium/qml/components/FormatDialog.qml:21 msgid "Cancel" msgstr "Annuler" #: share/ciborium/qml/components/FormatDialog.qml:25 msgid "Continue with format" msgstr "Continuer le formatage" #: share/ciborium/qml/components/SafeRemoval.qml:36 msgid "Confirm remove" msgstr "Confirmer le retrait" #: share/ciborium/qml/components/SafeRemoval.qml:37 msgid "Files on the device can't be accessed after removing" msgstr "Impossible d'accéder aux fichiers sur ce périphérique après retrait" #: share/ciborium/qml/components/SafeRemoval.qml:44 msgid "Continue" msgstr "Continuer" #: share/ciborium/qml/main.qml:33 msgid "SD Card Management" msgstr "Gestion de la carte SD" #: share/applications/ciborium.desktop.tr.h:1 msgid "External Drives" msgstr "Disques durs externes" ciborium-0.2.12+15.10.20150612/po/nb.po0000644000015300001610000001245412536576712017334 0ustar pbuserpbgroup00000000000000# Norwegian Bokmal translation for ciborium # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the ciborium package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: ciborium\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-03-24 16:11-0300\n" "PO-Revision-Date: 2015-03-25 08:41+0000\n" "Last-Translator: Åka Sikrom \n" "Language-Team: Norwegian Bokmal \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2015-03-26 05:30+0000\n" "X-Generator: Launchpad (build 17413)\n" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. success when addding a storage device. #: cmd/ciborium/main.go:119 msgid "Storage device detected" msgstr "Oppdaget lagringsenhet" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. being scanned when addding a storage device. #: cmd/ciborium/main.go:122 msgid "This device will be scanned for new content" msgstr "Denne enheten blir gjennomsøkt etter nytt innhold" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. failure when adding a storage device. #: cmd/ciborium/main.go:128 msgid "Failed to add storage device" msgstr "Klarte ikke å legge til lagringsenhet" #. TRANSLATORS: This is the body of a notification bubble with a short message with hints #. with regards to the failure when adding a storage device. #: cmd/ciborium/main.go:131 msgid "Make sure the storage device is correctly formated" msgstr "Kontroller at lagringsenheten er formatert korrekt" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. a storage device being removed #: cmd/ciborium/main.go:137 msgid "Storage device has been removed" msgstr "Lagringsenhet fjernet" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. from the removed device no longer being available #: cmd/ciborium/main.go:140 msgid "" "Content previously available on this device will no longer be accessible" msgstr "Du har ikke lenger tilgang til innholdet på denne enheten" #. TRANSLATORS: This is the summary of a notification bubble with a short message warning on #. low space #: cmd/ciborium/main.go:229 msgid "Low on disk space" msgstr "Disken er nesten full" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on internal #. storage #: cmd/ciborium/main.go:233 #, c-format msgid "Only %d%% is available on the internal storage device" msgstr "Det er bare %d%% ledig plass på intern lagringsenhet" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on a given #. external storage device #: cmd/ciborium/main.go:237 #, c-format msgid "Only %d%% is available on the external storage device" msgstr "Det er bare %d%% ledig plass på ekstern lagringsenhet" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:12 msgid "Unmounting" msgstr "Avmonterer" #: share/ciborium/qml/components/SafeRemoval.qml:21 msgid "Ok" msgstr "OK" #: share/ciborium/qml/components/SafeRemoval.qml:18 msgid "You can now safely remove the device" msgstr "Du kan nå fjerne enheten" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:38 msgid "Unmount Error" msgstr "Avmonteringsfeil" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:39 msgid "The device could not be unmounted because is busy" msgstr "Enheten er opptatt, og kan ikke avmonteres nå" #: share/ciborium/qml/components/SafeRemoval.qml:17 msgid "Safe to remove" msgstr "Klart for fjerning" #: share/ciborium/qml/components/FormatDialog.qml:17 #: share/ciborium/qml/components/FormatDialog.qml:59 msgid "Format" msgstr "Formater" #: share/ciborium/qml/components/SafeRemoval.qml:59 msgid "Safely Remove" msgstr "Trygg fjerning" #: share/ciborium/qml/components/FormatDialog.qml:42 msgid "Formatting" msgstr "Formatering" #: share/ciborium/qml/components/FormatConfirmation.qml:31 msgid "There was an error when formatting the device" msgstr "Det oppstod en feil under formatering av enheten" #: share/ciborium/qml/components/FormatDialog.qml:18 msgid "This action will wipe the content from the device" msgstr "Dette sletter innholdet fra enheten" #: share/ciborium/qml/components/SafeRemoval.qml:40 #: share/ciborium/qml/components/FormatDialog.qml:21 msgid "Cancel" msgstr "Avbryt" #: share/ciborium/qml/components/FormatDialog.qml:25 msgid "Continue with format" msgstr "Fortsett med formatering" #: share/ciborium/qml/components/SafeRemoval.qml:36 msgid "Confirm remove" msgstr "Bekreft fjerning" #: share/ciborium/qml/components/SafeRemoval.qml:37 msgid "Files on the device can't be accessed after removing" msgstr "Du har ikke tilgang til filer på enheten når du fjerner den" #: share/ciborium/qml/components/SafeRemoval.qml:44 msgid "Continue" msgstr "Fortsett" #: share/ciborium/qml/main.qml:33 msgid "SD Card Management" msgstr "Håndtering av SD-kort" #: share/applications/ciborium.desktop.tr.h:1 msgid "External Drives" msgstr "Eksterne lagringsenheter" ciborium-0.2.12+15.10.20150612/po/ug.po0000644000015300001610000001371712536576712017353 0ustar pbuserpbgroup00000000000000# Uyghur translation for ciborium # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the ciborium package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: ciborium\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-03-24 16:11-0300\n" "PO-Revision-Date: 2014-09-27 00:30+0000\n" "Last-Translator: Gheyret T.Kenji \n" "Language-Team: Uyghur \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2015-03-25 06:07+0000\n" "X-Generator: Launchpad (build 17413)\n" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. success when addding a storage device. #: cmd/ciborium/main.go:123 msgid "Storage device detected" msgstr "ساقلاش ئۈسكۈنىسى بايقالدى" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. being scanned when addding a storage device. #: cmd/ciborium/main.go:126 msgid "This device will be scanned for new content" msgstr "بۇ ئۈسكۈنە يېڭى مەزمۇن بايقايدۇ" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. failure when adding a storage device. #: cmd/ciborium/main.go:132 msgid "Failed to add storage device" msgstr "ساقلاش ئۈسكۈنىسى قوشۇش مەغلۇپ بولدى" #. TRANSLATORS: This is the body of a notification bubble with a short message with hints #. with regards to the failure when adding a storage device. #: cmd/ciborium/main.go:135 msgid "Make sure the storage device is correctly formated" msgstr "ساقلاش ئۈسكۈنىسىنىڭ توغرا ڧورماتلانغانلىقىنى جەزىملەڭ" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. a storage device being removed #: cmd/ciborium/main.go:141 msgid "Storage device has been removed" msgstr "ساقلاش ئۈسكۈنىسى چىقىرىۋېتىلگەن" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. from the removed device no longer being available #: cmd/ciborium/main.go:144 msgid "" "Content previously available on this device will no longer be accessible" msgstr "" "مەزكۇر ئۈسكۈنىدىكى بۇرۇن بار بولغان مەزمۇنلارنى بۇنىڭدىن كېيىن زىيارەت " "قىلغىلى بولمايدۇ." #. TRANSLATORS: This is the summary of a notification bubble with a short message warning on #. low space #: cmd/ciborium/main.go:329 msgid "Low on disk space" msgstr "دىسكا بوشلۇقى ئاز قالدى" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on internal #. storage #: cmd/ciborium/main.go:333 #, c-format msgid "Only %d%% is available on the internal storage device" msgstr "ئىچكى ئۈسكۈنىدە پەقەت %d% % بوشلۇق قالدى" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on a given #. external storage device #: cmd/ciborium/main.go:337 #, c-format msgid "Only %d%% is available on the external storage device" msgstr "سىرتقى ئۈسكۈنىدە پەقەت %d% % بوشلۇق قالدى" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:12 msgid "Unmounting" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:17 #: share/ciborium/qml/components/FormatConfirmation.qml:22 msgid "Ok" msgstr "تامام" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:30 #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:46 msgid "You can now safely remove the device" msgstr "ھازىر ئۈسكۈنىنى بىخەتەر چىقىرالايسىز" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:38 msgid "Unmount Error" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:39 msgid "The device could not be unmounted because is busy" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:45 msgid "Safe to remove" msgstr "چىقىرىش بىخەتەر" #: share/ciborium/qml/components/DriveDelegate.qml:45 #: share/ciborium/qml/components/FormatDialog.qml:11 msgid "Format" msgstr "پىچىم" #: share/ciborium/qml/components/DriveDelegate.qml:59 msgid "Safely Remove" msgstr "بىخەتەر چىقىرىش" #: share/ciborium/qml/components/FormatConfirmation.qml:11 msgid "Formatting" msgstr "پىچىىش" #: share/ciborium/qml/components/FormatConfirmation.qml:31 msgid "There was an error when formatting the device" msgstr "" #: share/ciborium/qml/components/FormatDialog.qml:12 msgid "This action will wipe the content from the device" msgstr "بۇ مەشغۇلات ئۈسكۈنىدىكى بارلىق مەزمۇنلارنى يۇيىۋېتىدۇ" #: share/ciborium/qml/components/FormatDialog.qml:15 #: share/ciborium/qml/components/SafeRemoval.qml:17 msgid "Cancel" msgstr "ئەمەلدىن قالدۇر" #: share/ciborium/qml/components/FormatDialog.qml:19 msgid "Continue with format" msgstr "پىچىشنى داۋاملاشتۇر" #: share/ciborium/qml/components/SafeRemoval.qml:13 msgid "Confirm remove" msgstr "چىقىرىۋېتىشنى جەزملەش" #: share/ciborium/qml/components/SafeRemoval.qml:14 msgid "Files on the device can't be accessed after removing" msgstr "" "چىقىرىۋەتكەندىن كېيىن ئۈسكۈنە ئۈستىدىكى ھۆججەتلەرنى زىيارەت قىلغىلى بولمايدۇ" #: share/ciborium/qml/components/SafeRemoval.qml:22 msgid "Continue" msgstr "داۋاملاشتۇر" #: share/ciborium/qml/main.qml:34 msgid "SD Card Management" msgstr "SD كارت باشقۇرۇش" #: share/applications/ciborium.desktop.tr.h:1 msgid "External Drives" msgstr "سىرتقى دىسكىلار" ciborium-0.2.12+15.10.20150612/po/ro.po0000644000015300001610000001276312536576712017360 0ustar pbuserpbgroup00000000000000# Romanian translation for ciborium # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the ciborium package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: ciborium\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-03-24 16:11-0300\n" "PO-Revision-Date: 2015-04-18 18:51+0000\n" "Last-Translator: Meriuță Cornel \n" "Language-Team: Romanian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2015-04-19 05:58+0000\n" "X-Generator: Launchpad (build 17430)\n" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. success when addding a storage device. #: cmd/ciborium/main.go:119 msgid "Storage device detected" msgstr "A fost detectat un mediu de stocare" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. being scanned when addding a storage device. #: cmd/ciborium/main.go:122 msgid "This device will be scanned for new content" msgstr "Dispozitivul va fi scanat pentru conținut nou" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. failure when adding a storage device. #: cmd/ciborium/main.go:128 msgid "Failed to add storage device" msgstr "Eșec la adăugarea mediului de stocare" #. TRANSLATORS: This is the body of a notification bubble with a short message with hints #. with regards to the failure when adding a storage device. #: cmd/ciborium/main.go:131 msgid "Make sure the storage device is correctly formated" msgstr "Asigurați-vă că mediul de stocare este formatat corect" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. a storage device being removed #: cmd/ciborium/main.go:137 msgid "Storage device has been removed" msgstr "Mediul de stocare a fost eliminat" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. from the removed device no longer being available #: cmd/ciborium/main.go:140 msgid "" "Content previously available on this device will no longer be accessible" msgstr "" "Conținutul disponibil anterior pe acest dispozitiv nu va mai putea fi accesat" #. TRANSLATORS: This is the summary of a notification bubble with a short message warning on #. low space #: cmd/ciborium/main.go:229 msgid "Low on disk space" msgstr "Spațiu redus pe disc" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on internal #. storage #: cmd/ciborium/main.go:233 #, c-format msgid "Only %d%% is available on the internal storage device" msgstr "Doar %d%% este disponibil pe mediul de stocare intern" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on a given #. external storage device #: cmd/ciborium/main.go:237 #, c-format msgid "Only %d%% is available on the external storage device" msgstr "Doar %d%% este disponibil pe mediul de stocare extern" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:12 msgid "Unmounting" msgstr "Demontare" #: share/ciborium/qml/components/SafeRemoval.qml:21 msgid "Ok" msgstr "În regulă" #: share/ciborium/qml/components/SafeRemoval.qml:18 msgid "You can now safely remove the device" msgstr "Puteți scoate dispozitivul în siguranță" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:38 msgid "Unmount Error" msgstr "Eroare la demontare" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:39 msgid "The device could not be unmounted because is busy" msgstr "Dispozitivul nu a putut fi demontat din cauză că este ocupat" #: share/ciborium/qml/components/SafeRemoval.qml:17 msgid "Safe to remove" msgstr "Se poate scoate în siguranță" #: share/ciborium/qml/components/FormatDialog.qml:17 #: share/ciborium/qml/components/FormatDialog.qml:59 msgid "Format" msgstr "Formatare" #: share/ciborium/qml/components/SafeRemoval.qml:59 msgid "Safely Remove" msgstr "Elimină în siguranță" #: share/ciborium/qml/components/FormatDialog.qml:42 msgid "Formatting" msgstr "Se formatează" #: share/ciborium/qml/components/FormatConfirmation.qml:31 msgid "There was an error when formatting the device" msgstr "A fost o eroare în timpul formatării dispozitivului" #: share/ciborium/qml/components/FormatDialog.qml:18 msgid "This action will wipe the content from the device" msgstr "Această acțiune va șterge tot conținutul de pe dispozitiv" #: share/ciborium/qml/components/SafeRemoval.qml:40 #: share/ciborium/qml/components/FormatDialog.qml:21 msgid "Cancel" msgstr "Anulează" #: share/ciborium/qml/components/FormatDialog.qml:25 msgid "Continue with format" msgstr "Continuă cu formatarea" #: share/ciborium/qml/components/SafeRemoval.qml:36 msgid "Confirm remove" msgstr "Confirmați scoaterea dispozitivului" #: share/ciborium/qml/components/SafeRemoval.qml:37 msgid "Files on the device can't be accessed after removing" msgstr "" "Fișierele de pe dispozitiv nu mai pot fi accesate după ce îl scoateți" #: share/ciborium/qml/components/SafeRemoval.qml:44 msgid "Continue" msgstr "Continuare" #: share/ciborium/qml/main.qml:33 msgid "SD Card Management" msgstr "Administrare card SD" #: share/applications/ciborium.desktop.tr.h:1 msgid "External Drives" msgstr "Medii de stocare externe" ciborium-0.2.12+15.10.20150612/po/he.po0000644000015300001610000001177712536576712017340 0ustar pbuserpbgroup00000000000000# Hebrew translation for ciborium # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the ciborium package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: ciborium\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-03-24 16:11-0300\n" "PO-Revision-Date: 2014-08-21 13:12+0000\n" "Last-Translator: Yaron \n" "Language-Team: Hebrew \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2015-03-25 06:07+0000\n" "X-Generator: Launchpad (build 17413)\n" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. success when addding a storage device. #: cmd/ciborium/main.go:123 msgid "Storage device detected" msgstr "התגלה התקן אחסון" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. being scanned when addding a storage device. #: cmd/ciborium/main.go:126 msgid "This device will be scanned for new content" msgstr "התקן זה ייסרק למציאת תוכן חדש" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. failure when adding a storage device. #: cmd/ciborium/main.go:132 msgid "Failed to add storage device" msgstr "הוספת התקן האחסון נכשלה" #. TRANSLATORS: This is the body of a notification bubble with a short message with hints #. with regards to the failure when adding a storage device. #: cmd/ciborium/main.go:135 msgid "Make sure the storage device is correctly formated" msgstr "נא לוודא שהתקן האחסון עבר פרמוט כראוי" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. a storage device being removed #: cmd/ciborium/main.go:141 msgid "Storage device has been removed" msgstr "התקן האחסון הוסר" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. from the removed device no longer being available #: cmd/ciborium/main.go:144 msgid "" "Content previously available on this device will no longer be accessible" msgstr "התוכן שהיה זמין בעבר בהתקן זה לא יהיה נגיש עוד" #. TRANSLATORS: This is the summary of a notification bubble with a short message warning on #. low space #: cmd/ciborium/main.go:329 msgid "Low on disk space" msgstr "" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on internal #. storage #: cmd/ciborium/main.go:333 #, c-format msgid "Only %d%% is available on the internal storage device" msgstr "" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on a given #. external storage device #: cmd/ciborium/main.go:337 #, c-format msgid "Only %d%% is available on the external storage device" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:12 msgid "Unmounting" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:17 #: share/ciborium/qml/components/FormatConfirmation.qml:22 msgid "Ok" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:30 #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:46 msgid "You can now safely remove the device" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:38 msgid "Unmount Error" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:39 msgid "The device could not be unmounted because is busy" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:45 msgid "Safe to remove" msgstr "" #: share/ciborium/qml/components/DriveDelegate.qml:45 #: share/ciborium/qml/components/FormatDialog.qml:11 msgid "Format" msgstr "" #: share/ciborium/qml/components/DriveDelegate.qml:59 msgid "Safely Remove" msgstr "" #: share/ciborium/qml/components/FormatConfirmation.qml:11 msgid "Formatting" msgstr "" #: share/ciborium/qml/components/FormatConfirmation.qml:31 msgid "There was an error when formatting the device" msgstr "" #: share/ciborium/qml/components/FormatDialog.qml:12 msgid "This action will wipe the content from the device" msgstr "" #: share/ciborium/qml/components/FormatDialog.qml:15 #: share/ciborium/qml/components/SafeRemoval.qml:17 msgid "Cancel" msgstr "" #: share/ciborium/qml/components/FormatDialog.qml:19 msgid "Continue with format" msgstr "" #: share/ciborium/qml/components/SafeRemoval.qml:13 msgid "Confirm remove" msgstr "" #: share/ciborium/qml/components/SafeRemoval.qml:14 msgid "Files on the device can't be accessed after removing" msgstr "" #: share/ciborium/qml/components/SafeRemoval.qml:22 msgid "Continue" msgstr "" #: share/ciborium/qml/main.qml:34 msgid "SD Card Management" msgstr "" #: share/applications/ciborium.desktop.tr.h:1 msgid "External Drives" msgstr "" ciborium-0.2.12+15.10.20150612/po/cs.po0000644000015300001610000001267512536576712017347 0ustar pbuserpbgroup00000000000000# Czech translation for ciborium # Copyright (c) 2015 Rosetta Contributors and Canonical Ltd 2015 # This file is distributed under the same license as the ciborium package. # FIRST AUTHOR , 2015. # msgid "" msgstr "" "Project-Id-Version: ciborium\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-03-24 16:11-0300\n" "PO-Revision-Date: 2015-05-06 19:41+0000\n" "Last-Translator: Ondřej Sojka \n" "Language-Team: Czech \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2015-05-07 05:36+0000\n" "X-Generator: Launchpad (build 17474)\n" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. success when addding a storage device. #: cmd/ciborium/main.go:119 msgid "Storage device detected" msgstr "Úložné zařízení nalezeno" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. being scanned when addding a storage device. #: cmd/ciborium/main.go:122 msgid "This device will be scanned for new content" msgstr "Zařízení bude prohledáno, zda neobsahuje nový obsah." #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. failure when adding a storage device. #: cmd/ciborium/main.go:128 msgid "Failed to add storage device" msgstr "Nepodařilo se přidat úložné zařízení" #. TRANSLATORS: This is the body of a notification bubble with a short message with hints #. with regards to the failure when adding a storage device. #: cmd/ciborium/main.go:131 msgid "Make sure the storage device is correctly formated" msgstr "Zkontrolujte, zda je zařízení správně naformátováno" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. a storage device being removed #: cmd/ciborium/main.go:137 msgid "Storage device has been removed" msgstr "Úložné zařízení bylo odebráno" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. from the removed device no longer being available #: cmd/ciborium/main.go:140 msgid "" "Content previously available on this device will no longer be accessible" msgstr "Dříve dostupný obsah tohoto zařízení již nebude k dispozici" #. TRANSLATORS: This is the summary of a notification bubble with a short message warning on #. low space #: cmd/ciborium/main.go:229 msgid "Low on disk space" msgstr "Nedostatek místa na disku" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on internal #. storage #: cmd/ciborium/main.go:233 #, c-format msgid "Only %d%% is available on the internal storage device" msgstr "Interní úložné zařízení má k dispozici pouze %% %d místa" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on a given #. external storage device #: cmd/ciborium/main.go:237 #, c-format msgid "Only %d%% is available on the external storage device" msgstr "Externí úložné zařízení má k dispozici pouze %% %d místa" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:12 msgid "Unmounting" msgstr "Odpojování" #: share/ciborium/qml/components/SafeRemoval.qml:21 msgid "Ok" msgstr "Ok" #: share/ciborium/qml/components/SafeRemoval.qml:18 msgid "You can now safely remove the device" msgstr "Nyní můžete zařízení bezpečně odebrat." #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:38 msgid "Unmount Error" msgstr "Při odpojování došlo k chybě." #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:39 msgid "The device could not be unmounted because is busy" msgstr "Zařízení nelze odpojit, protože se používá." #: share/ciborium/qml/components/SafeRemoval.qml:17 msgid "Safe to remove" msgstr "Zařízení lze bezpečně odebrat." #: share/ciborium/qml/components/FormatDialog.qml:17 #: share/ciborium/qml/components/FormatDialog.qml:59 msgid "Format" msgstr "Formátovat" #: share/ciborium/qml/components/SafeRemoval.qml:59 msgid "Safely Remove" msgstr "Bezpečně odebrat" #: share/ciborium/qml/components/FormatDialog.qml:42 msgid "Formatting" msgstr "Formátuje se" #: share/ciborium/qml/components/FormatConfirmation.qml:31 msgid "There was an error when formatting the device" msgstr "Při formátování zařízení došlo k chybě." #: share/ciborium/qml/components/FormatDialog.qml:18 msgid "This action will wipe the content from the device" msgstr "Tento krok vymaže obsah ze zařízení." #: share/ciborium/qml/components/SafeRemoval.qml:40 #: share/ciborium/qml/components/FormatDialog.qml:21 msgid "Cancel" msgstr "Zrušit" #: share/ciborium/qml/components/FormatDialog.qml:25 msgid "Continue with format" msgstr "Pokračovat ve formátování" #: share/ciborium/qml/components/SafeRemoval.qml:36 msgid "Confirm remove" msgstr "Potvrdit odebrání" #: share/ciborium/qml/components/SafeRemoval.qml:37 msgid "Files on the device can't be accessed after removing" msgstr "Soubory v zařízení nebudou po jeho odebrání dostupné." #: share/ciborium/qml/components/SafeRemoval.qml:44 msgid "Continue" msgstr "Pokračovat" #: share/ciborium/qml/main.qml:33 msgid "SD Card Management" msgstr "Správa SD karty" #: share/applications/ciborium.desktop.tr.h:1 msgid "External Drives" msgstr "Externí disky" ciborium-0.2.12+15.10.20150612/po/gd.po0000644000015300001610000001331212536576712017321 0ustar pbuserpbgroup00000000000000# Gaelic; Scottish translation for ciborium # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the ciborium package. # FIRST AUTHOR , 2014. # GunChleoc , 2014. msgid "" msgstr "" "Project-Id-Version: ciborium\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-03-24 16:11-0300\n" "PO-Revision-Date: 2015-03-27 09:35+0000\n" "Last-Translator: GunChleoc \n" "Language-Team: Fòram na Gàidhlig\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2015-03-28 05:34+0000\n" "X-Generator: Launchpad (build 17413)\n" "Language: gd\n" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. success when addding a storage device. #: cmd/ciborium/main.go:119 msgid "Storage device detected" msgstr "Mhothaich sinn do dh'uidheam stòrais" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. being scanned when addding a storage device. #: cmd/ciborium/main.go:122 msgid "This device will be scanned for new content" msgstr "Nì sinn sganadh air an uidheam seo airson susbaint ùr" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. failure when adding a storage device. #: cmd/ciborium/main.go:128 msgid "Failed to add storage device" msgstr "Cha b' urrainn dhuinn an t-uidheam stòrais ùr a chur ris" #. TRANSLATORS: This is the body of a notification bubble with a short message with hints #. with regards to the failure when adding a storage device. #: cmd/ciborium/main.go:131 msgid "Make sure the storage device is correctly formated" msgstr "" "Dèan cinnteach gun deach an t-uidheam stòrais seo fhòrmatadh mar bu chòir" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. a storage device being removed #: cmd/ciborium/main.go:137 msgid "Storage device has been removed" msgstr "Chaidh an t-uidheam-stòrais a thoirt air falbh" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. from the removed device no longer being available #: cmd/ciborium/main.go:140 msgid "" "Content previously available on this device will no longer be accessible" msgstr "" "Chan fhaigh thu inntrigeadh dhan t-susbaint air an uidheam seo tuilleadh" #. TRANSLATORS: This is the summary of a notification bubble with a short message warning on #. low space #: cmd/ciborium/main.go:229 msgid "Low on disk space" msgstr "Dh'fhàs an rum air an diosg gann" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on internal #. storage #: cmd/ciborium/main.go:233 #, c-format msgid "Only %d%% is available on the internal storage device" msgstr "Chan eil ach %d%% a rum saor air an stòras taobh a-staigh" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on a given #. external storage device #: cmd/ciborium/main.go:237 #, c-format msgid "Only %d%% is available on the external storage device" msgstr "Chan eil ach %d%% a rum saor air an uidheam-stòrais taobh a-muigh" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:12 msgid "Unmounting" msgstr "Dì-mhunntachadh" #: share/ciborium/qml/components/SafeRemoval.qml:21 msgid "Ok" msgstr "Ceart ma-thà" #: share/ciborium/qml/components/SafeRemoval.qml:18 msgid "You can now safely remove the device" msgstr "'S urrainn dhut an t-uidheam a thoirt air falbh gu sàbhailte a-nis" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:38 msgid "Unmount Error" msgstr "Mearachd leis a' dhì-mhunntachadh" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:39 msgid "The device could not be unmounted because is busy" msgstr "Cha b' urrainn dhuinn an t-uidheam dì-mhunntachadh on a tha e trang" #: share/ciborium/qml/components/SafeRemoval.qml:17 msgid "Safe to remove" msgstr "Sàbhailte a thoirt air falbh" #: share/ciborium/qml/components/FormatDialog.qml:17 #: share/ciborium/qml/components/FormatDialog.qml:59 msgid "Format" msgstr "Fòrmataich" #: share/ciborium/qml/components/SafeRemoval.qml:59 msgid "Safely Remove" msgstr "Thoir air falbh gu sàbhailte" #: share/ciborium/qml/components/FormatDialog.qml:42 msgid "Formatting" msgstr "Fòrmatadh" #: share/ciborium/qml/components/FormatConfirmation.qml:31 msgid "There was an error when formatting the device" msgstr "Thachair mearachd le fòrmatadh an uidheim" #: share/ciborium/qml/components/FormatDialog.qml:18 msgid "This action will wipe the content from the device" msgstr "Glanaidh an gnìomh seo gach susbaint a tha air an uidheam air falbh" #: share/ciborium/qml/components/SafeRemoval.qml:40 #: share/ciborium/qml/components/FormatDialog.qml:21 msgid "Cancel" msgstr "Sguir dheth" #: share/ciborium/qml/components/FormatDialog.qml:25 msgid "Continue with format" msgstr "Lean air adhart leis an fhòrmatadh" #: share/ciborium/qml/components/SafeRemoval.qml:36 msgid "Confirm remove" msgstr "Dearbhaich an toirt air falbh" #: share/ciborium/qml/components/SafeRemoval.qml:37 msgid "Files on the device can't be accessed after removing" msgstr "" "Cha ghabh faidhlichean inntrigeadh air an uidheam seo nuair a bhios e air a " "thoirt air falbh" #: share/ciborium/qml/components/SafeRemoval.qml:44 msgid "Continue" msgstr "Lean air adhart" #: share/ciborium/qml/main.qml:33 msgid "SD Card Management" msgstr "Stiùireadh a' chairt SD" #: share/applications/ciborium.desktop.tr.h:1 msgid "External Drives" msgstr "Draibhean a-muigh" ciborium-0.2.12+15.10.20150612/po/en_AU.po0000644000015300001610000001247512536576712017727 0ustar pbuserpbgroup00000000000000# English (Australia) translation for ciborium # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the ciborium package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: ciborium\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-03-24 16:11-0300\n" "PO-Revision-Date: 2015-04-11 02:14+0000\n" "Last-Translator: Jared Norris \n" "Language-Team: English (Australia) \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2015-04-12 06:03+0000\n" "X-Generator: Launchpad (build 17423)\n" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. success when addding a storage device. #: cmd/ciborium/main.go:119 msgid "Storage device detected" msgstr "Storage device detected" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. being scanned when addding a storage device. #: cmd/ciborium/main.go:122 msgid "This device will be scanned for new content" msgstr "This device will be scanned for new content" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. failure when adding a storage device. #: cmd/ciborium/main.go:128 msgid "Failed to add storage device" msgstr "Failed to add storage device" #. TRANSLATORS: This is the body of a notification bubble with a short message with hints #. with regards to the failure when adding a storage device. #: cmd/ciborium/main.go:131 msgid "Make sure the storage device is correctly formated" msgstr "Make sure the storage device is correctly formated" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. a storage device being removed #: cmd/ciborium/main.go:137 msgid "Storage device has been removed" msgstr "Storage device has been removed" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. from the removed device no longer being available #: cmd/ciborium/main.go:140 msgid "" "Content previously available on this device will no longer be accessible" msgstr "" "Content previously available on this device will no longer be accessible" #. TRANSLATORS: This is the summary of a notification bubble with a short message warning on #. low space #: cmd/ciborium/main.go:229 msgid "Low on disk space" msgstr "Low on disk space" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on internal #. storage #: cmd/ciborium/main.go:233 #, c-format msgid "Only %d%% is available on the internal storage device" msgstr "Only %d%% is available on the internal storage device" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on a given #. external storage device #: cmd/ciborium/main.go:237 #, c-format msgid "Only %d%% is available on the external storage device" msgstr "Only %d%% is available on the external storage device" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:12 msgid "Unmounting" msgstr "Unmounting" #: share/ciborium/qml/components/SafeRemoval.qml:21 msgid "Ok" msgstr "Ok" #: share/ciborium/qml/components/SafeRemoval.qml:18 msgid "You can now safely remove the device" msgstr "You can now safely remove the device" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:38 msgid "Unmount Error" msgstr "Unmount Error" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:39 msgid "The device could not be unmounted because is busy" msgstr "The device could not be unmounted because is busy" #: share/ciborium/qml/components/SafeRemoval.qml:17 msgid "Safe to remove" msgstr "Safe to remove" #: share/ciborium/qml/components/FormatDialog.qml:17 #: share/ciborium/qml/components/FormatDialog.qml:59 msgid "Format" msgstr "Format" #: share/ciborium/qml/components/SafeRemoval.qml:59 msgid "Safely Remove" msgstr "Safely Remove" #: share/ciborium/qml/components/FormatDialog.qml:42 msgid "Formatting" msgstr "Formatting" #: share/ciborium/qml/components/FormatConfirmation.qml:31 msgid "There was an error when formatting the device" msgstr "There was an error when formatting the device" #: share/ciborium/qml/components/FormatDialog.qml:18 msgid "This action will wipe the content from the device" msgstr "This action will wipe the content from the device" #: share/ciborium/qml/components/SafeRemoval.qml:40 #: share/ciborium/qml/components/FormatDialog.qml:21 msgid "Cancel" msgstr "Cancel" #: share/ciborium/qml/components/FormatDialog.qml:25 msgid "Continue with format" msgstr "Continue with format" #: share/ciborium/qml/components/SafeRemoval.qml:36 msgid "Confirm remove" msgstr "Confirm remove" #: share/ciborium/qml/components/SafeRemoval.qml:37 msgid "Files on the device can't be accessed after removing" msgstr "Files on the device can't be accessed after removing" #: share/ciborium/qml/components/SafeRemoval.qml:44 msgid "Continue" msgstr "Continue" #: share/ciborium/qml/main.qml:33 msgid "SD Card Management" msgstr "SD Card Management" #: share/applications/ciborium.desktop.tr.h:1 msgid "External Drives" msgstr "External Drives" ciborium-0.2.12+15.10.20150612/po/az.po0000644000015300001610000001151412536576712017343 0ustar pbuserpbgroup00000000000000# Azerbaijani translation for ciborium # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the ciborium package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: ciborium\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-03-24 16:11-0300\n" "PO-Revision-Date: 2014-09-03 10:24+0000\n" "Last-Translator: Nicat Məmmədov \n" "Language-Team: Azerbaijani \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2015-03-25 06:07+0000\n" "X-Generator: Launchpad (build 17413)\n" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. success when addding a storage device. #: cmd/ciborium/main.go:123 msgid "Storage device detected" msgstr "Yaddaş avadanlığı təyin olundu" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. being scanned when addding a storage device. #: cmd/ciborium/main.go:126 msgid "This device will be scanned for new content" msgstr "" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. failure when adding a storage device. #: cmd/ciborium/main.go:132 msgid "Failed to add storage device" msgstr "Yaddaş avadanlığı əlavə oluna bilmədi" #. TRANSLATORS: This is the body of a notification bubble with a short message with hints #. with regards to the failure when adding a storage device. #: cmd/ciborium/main.go:135 msgid "Make sure the storage device is correctly formated" msgstr "" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. a storage device being removed #: cmd/ciborium/main.go:141 msgid "Storage device has been removed" msgstr "Yaddaş avadanlığı silindi" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. from the removed device no longer being available #: cmd/ciborium/main.go:144 msgid "" "Content previously available on this device will no longer be accessible" msgstr "" #. TRANSLATORS: This is the summary of a notification bubble with a short message warning on #. low space #: cmd/ciborium/main.go:329 msgid "Low on disk space" msgstr "" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on internal #. storage #: cmd/ciborium/main.go:333 #, c-format msgid "Only %d%% is available on the internal storage device" msgstr "" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on a given #. external storage device #: cmd/ciborium/main.go:337 #, c-format msgid "Only %d%% is available on the external storage device" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:12 msgid "Unmounting" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:17 #: share/ciborium/qml/components/FormatConfirmation.qml:22 msgid "Ok" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:30 #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:46 msgid "You can now safely remove the device" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:38 msgid "Unmount Error" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:39 msgid "The device could not be unmounted because is busy" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:45 msgid "Safe to remove" msgstr "" #: share/ciborium/qml/components/DriveDelegate.qml:45 #: share/ciborium/qml/components/FormatDialog.qml:11 msgid "Format" msgstr "" #: share/ciborium/qml/components/DriveDelegate.qml:59 msgid "Safely Remove" msgstr "" #: share/ciborium/qml/components/FormatConfirmation.qml:11 msgid "Formatting" msgstr "" #: share/ciborium/qml/components/FormatConfirmation.qml:31 msgid "There was an error when formatting the device" msgstr "" #: share/ciborium/qml/components/FormatDialog.qml:12 msgid "This action will wipe the content from the device" msgstr "" #: share/ciborium/qml/components/FormatDialog.qml:15 #: share/ciborium/qml/components/SafeRemoval.qml:17 msgid "Cancel" msgstr "" #: share/ciborium/qml/components/FormatDialog.qml:19 msgid "Continue with format" msgstr "" #: share/ciborium/qml/components/SafeRemoval.qml:13 msgid "Confirm remove" msgstr "" #: share/ciborium/qml/components/SafeRemoval.qml:14 msgid "Files on the device can't be accessed after removing" msgstr "" #: share/ciborium/qml/components/SafeRemoval.qml:22 msgid "Continue" msgstr "" #: share/ciborium/qml/main.qml:34 msgid "SD Card Management" msgstr "" #: share/applications/ciborium.desktop.tr.h:1 msgid "External Drives" msgstr "" ciborium-0.2.12+15.10.20150612/po/br.po0000644000015300001610000001265312536576712017341 0ustar pbuserpbgroup00000000000000# Breton translation for ciborium # Copyright (c) 2015 Rosetta Contributors and Canonical Ltd 2015 # This file is distributed under the same license as the ciborium package. # FIRST AUTHOR , 2015. # msgid "" msgstr "" "Project-Id-Version: ciborium\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-03-24 16:11-0300\n" "PO-Revision-Date: 2015-06-05 07:15+0000\n" "Last-Translator: Fohanno Thierry \n" "Language-Team: Breton \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2015-06-06 05:33+0000\n" "X-Generator: Launchpad (build 17540)\n" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. success when addding a storage device. #: cmd/ciborium/main.go:119 msgid "Storage device detected" msgstr "Benveg stokañ dinoet" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. being scanned when addding a storage device. #: cmd/ciborium/main.go:122 msgid "This device will be scanned for new content" msgstr "Skannaet e vo ar benveg-mañ evit kavout traoù nevez" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. failure when adding a storage device. #: cmd/ciborium/main.go:128 msgid "Failed to add storage device" msgstr "N'eus ket bet gallet ouzhpennañ ar benveg stokañ" #. TRANSLATORS: This is the body of a notification bubble with a short message with hints #. with regards to the failure when adding a storage device. #: cmd/ciborium/main.go:131 msgid "Make sure the storage device is correctly formated" msgstr "Gwiriit hag-eñ eo furmadet ar benveg stokañ evel zo dleet" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. a storage device being removed #: cmd/ciborium/main.go:137 msgid "Storage device has been removed" msgstr "Lamet eo bet ar benveg stokañ" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. from the removed device no longer being available #: cmd/ciborium/main.go:140 msgid "" "Content previously available on this device will no longer be accessible" msgstr "Ne c'hallor ket adkavout an traoù a oa er benveg-mañ a-raok" #. TRANSLATORS: This is the summary of a notification bubble with a short message warning on #. low space #: cmd/ciborium/main.go:229 msgid "Low on disk space" msgstr "Neneut a spas er bladenn" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on internal #. storage #: cmd/ciborium/main.go:233 #, c-format msgid "Only %d%% is available on the internal storage device" msgstr "N'eus nemet %d%% a c'haller implijout er benveg stokañ diabarzh" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on a given #. external storage device #: cmd/ciborium/main.go:237 #, c-format msgid "Only %d%% is available on the external storage device" msgstr "N'eus nemet %d%% a c'haller implijout er benveg stokañ diavaez" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:12 msgid "Unmounting" msgstr "Divontañ" #: share/ciborium/qml/components/SafeRemoval.qml:21 msgid "Ok" msgstr "Mat eo" #: share/ciborium/qml/components/SafeRemoval.qml:18 msgid "You can now safely remove the device" msgstr "Bremañ e c'hallit tennañ ar benveg e surentez" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:38 msgid "Unmount Error" msgstr "Fazi divontañ" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:39 msgid "The device could not be unmounted because is busy" msgstr "N'eus ket bet gallet divontañ ar benveg rak oberiant eo" #: share/ciborium/qml/components/SafeRemoval.qml:17 msgid "Safe to remove" msgstr "Gallout a reer tennañ anezhañ e surentez" #: share/ciborium/qml/components/FormatDialog.qml:17 #: share/ciborium/qml/components/FormatDialog.qml:59 msgid "Format" msgstr "Furmad" #: share/ciborium/qml/components/SafeRemoval.qml:59 msgid "Safely Remove" msgstr "Tennañ e surentez" #: share/ciborium/qml/components/FormatDialog.qml:42 msgid "Formatting" msgstr "O furmadiñ" #: share/ciborium/qml/components/FormatConfirmation.qml:31 msgid "There was an error when formatting the device" msgstr "Ur fazi zo bet pa oad o furmadi#n ar benveg" #: share/ciborium/qml/components/FormatDialog.qml:18 msgid "This action will wipe the content from the device" msgstr "Lamet e vo an traoù a zo er benveg" #: share/ciborium/qml/components/SafeRemoval.qml:40 #: share/ciborium/qml/components/FormatDialog.qml:21 msgid "Cancel" msgstr "Nullañ" #: share/ciborium/qml/components/FormatDialog.qml:25 msgid "Continue with format" msgstr "Derc'hel da furmadiñ" #: share/ciborium/qml/components/SafeRemoval.qml:36 msgid "Confirm remove" msgstr "Kadarnaat an tennañ" #: share/ciborium/qml/components/SafeRemoval.qml:37 msgid "Files on the device can't be accessed after removing" msgstr "Ne c'haller ket mont d'ar restr a zo er benveg goude m'eo bet tennet" #: share/ciborium/qml/components/SafeRemoval.qml:44 msgid "Continue" msgstr "Kenderc'hel" #: share/ciborium/qml/main.qml:33 msgid "SD Card Management" msgstr "Merañ ar gartenn SD" #: share/applications/ciborium.desktop.tr.h:1 msgid "External Drives" msgstr "Pladennoù kalet diavaez" ciborium-0.2.12+15.10.20150612/po/zh_CN.po0000644000015300001610000001165012536576712017733 0ustar pbuserpbgroup00000000000000# Chinese (Simplified) translation for ciborium # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the ciborium package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: ciborium\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-03-24 16:11-0300\n" "PO-Revision-Date: 2014-09-24 11:05+0000\n" "Last-Translator: xiaoxiao \n" "Language-Team: Chinese (Simplified) \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2015-03-25 06:07+0000\n" "X-Generator: Launchpad (build 17413)\n" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. success when addding a storage device. #: cmd/ciborium/main.go:123 msgid "Storage device detected" msgstr "侦测到存储设备" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. being scanned when addding a storage device. #: cmd/ciborium/main.go:126 msgid "This device will be scanned for new content" msgstr "将扫描此新增设备" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. failure when adding a storage device. #: cmd/ciborium/main.go:132 msgid "Failed to add storage device" msgstr "添加存储设备失败" #. TRANSLATORS: This is the body of a notification bubble with a short message with hints #. with regards to the failure when adding a storage device. #: cmd/ciborium/main.go:135 msgid "Make sure the storage device is correctly formated" msgstr "请确定存储设备已被格式化" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. a storage device being removed #: cmd/ciborium/main.go:141 msgid "Storage device has been removed" msgstr "存储设备已移除" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. from the removed device no longer being available #: cmd/ciborium/main.go:144 msgid "" "Content previously available on this device will no longer be accessible" msgstr "此设备上的内容将不可用" #. TRANSLATORS: This is the summary of a notification bubble with a short message warning on #. low space #: cmd/ciborium/main.go:329 msgid "Low on disk space" msgstr "" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on internal #. storage #: cmd/ciborium/main.go:333 #, c-format msgid "Only %d%% is available on the internal storage device" msgstr "" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on a given #. external storage device #: cmd/ciborium/main.go:337 #, c-format msgid "Only %d%% is available on the external storage device" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:12 msgid "Unmounting" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:17 #: share/ciborium/qml/components/FormatConfirmation.qml:22 msgid "Ok" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:30 #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:46 msgid "You can now safely remove the device" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:38 msgid "Unmount Error" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:39 msgid "The device could not be unmounted because is busy" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:45 msgid "Safe to remove" msgstr "" #: share/ciborium/qml/components/DriveDelegate.qml:45 #: share/ciborium/qml/components/FormatDialog.qml:11 msgid "Format" msgstr "" #: share/ciborium/qml/components/DriveDelegate.qml:59 msgid "Safely Remove" msgstr "" #: share/ciborium/qml/components/FormatConfirmation.qml:11 msgid "Formatting" msgstr "" #: share/ciborium/qml/components/FormatConfirmation.qml:31 msgid "There was an error when formatting the device" msgstr "" #: share/ciborium/qml/components/FormatDialog.qml:12 msgid "This action will wipe the content from the device" msgstr "" #: share/ciborium/qml/components/FormatDialog.qml:15 #: share/ciborium/qml/components/SafeRemoval.qml:17 msgid "Cancel" msgstr "" #: share/ciborium/qml/components/FormatDialog.qml:19 msgid "Continue with format" msgstr "" #: share/ciborium/qml/components/SafeRemoval.qml:13 msgid "Confirm remove" msgstr "" #: share/ciborium/qml/components/SafeRemoval.qml:14 msgid "Files on the device can't be accessed after removing" msgstr "" #: share/ciborium/qml/components/SafeRemoval.qml:22 msgid "Continue" msgstr "" #: share/ciborium/qml/main.qml:34 msgid "SD Card Management" msgstr "" #: share/applications/ciborium.desktop.tr.h:1 msgid "External Drives" msgstr "外部驱动器" ciborium-0.2.12+15.10.20150612/po/ru.po0000644000015300001610000001414312536576712017360 0ustar pbuserpbgroup00000000000000# Russian translation for ciborium # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the ciborium package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: ciborium\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-03-24 16:11-0300\n" "PO-Revision-Date: 2015-03-30 10:03+0000\n" "Last-Translator: ☠Jay ZDLin☠ \n" "Language-Team: Russian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2015-03-31 06:02+0000\n" "X-Generator: Launchpad (build 17413)\n" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. success when addding a storage device. #: cmd/ciborium/main.go:119 msgid "Storage device detected" msgstr "Обнаружено запоминающее устройство" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. being scanned when addding a storage device. #: cmd/ciborium/main.go:122 msgid "This device will be scanned for new content" msgstr "Данное устройство будет проверено на наличие нового содержимого" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. failure when adding a storage device. #: cmd/ciborium/main.go:128 msgid "Failed to add storage device" msgstr "Не удалось добавить запоминающее устройство" #. TRANSLATORS: This is the body of a notification bubble with a short message with hints #. with regards to the failure when adding a storage device. #: cmd/ciborium/main.go:131 msgid "Make sure the storage device is correctly formated" msgstr "Убедитесь, что запоминающее устройство отформатированно правильно" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. a storage device being removed #: cmd/ciborium/main.go:137 msgid "Storage device has been removed" msgstr "Запоминающее устройство было извлечено" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. from the removed device no longer being available #: cmd/ciborium/main.go:140 msgid "" "Content previously available on this device will no longer be accessible" msgstr "Содержимое данного устройства более недоступно" #. TRANSLATORS: This is the summary of a notification bubble with a short message warning on #. low space #: cmd/ciborium/main.go:229 msgid "Low on disk space" msgstr "Заканчивается место на диске" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on internal #. storage #: cmd/ciborium/main.go:233 #, c-format msgid "Only %d%% is available on the internal storage device" msgstr "Доступно только %d%% встроенной памяти." #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on a given #. external storage device #: cmd/ciborium/main.go:237 #, c-format msgid "Only %d%% is available on the external storage device" msgstr "Доступно только %d%% внешней памяти." #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:12 msgid "Unmounting" msgstr "Отключение" #: share/ciborium/qml/components/SafeRemoval.qml:21 msgid "Ok" msgstr "ОК" #: share/ciborium/qml/components/SafeRemoval.qml:18 msgid "You can now safely remove the device" msgstr "Теперь устройство можно извлечь" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:38 msgid "Unmount Error" msgstr "Ошибка при отключении" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:39 msgid "The device could not be unmounted because is busy" msgstr "Не удалось отключить устройство, поскольку оно используется" #: share/ciborium/qml/components/SafeRemoval.qml:17 msgid "Safe to remove" msgstr "Безопасное извлечение" #: share/ciborium/qml/components/FormatDialog.qml:17 #: share/ciborium/qml/components/FormatDialog.qml:59 msgid "Format" msgstr "Форматирование" #: share/ciborium/qml/components/SafeRemoval.qml:59 msgid "Safely Remove" msgstr "Безопасное извлечение" #: share/ciborium/qml/components/FormatDialog.qml:42 msgid "Formatting" msgstr "Форматирование" #: share/ciborium/qml/components/FormatConfirmation.qml:31 msgid "There was an error when formatting the device" msgstr "Ошибка при форматировании устройства" #: share/ciborium/qml/components/FormatDialog.qml:18 msgid "This action will wipe the content from the device" msgstr "Данное действие приведёт к удалению всего содержимого устройства" #: share/ciborium/qml/components/SafeRemoval.qml:40 #: share/ciborium/qml/components/FormatDialog.qml:21 msgid "Cancel" msgstr "Отменить" #: share/ciborium/qml/components/FormatDialog.qml:25 msgid "Continue with format" msgstr "Продолжить форматирование" #: share/ciborium/qml/components/SafeRemoval.qml:36 msgid "Confirm remove" msgstr "Подтвердить извлечение" #: share/ciborium/qml/components/SafeRemoval.qml:37 msgid "Files on the device can't be accessed after removing" msgstr "Файлы на устройстве будут недоступны после извлечения" #: share/ciborium/qml/components/SafeRemoval.qml:44 msgid "Continue" msgstr "Продолжить" #: share/ciborium/qml/main.qml:33 msgid "SD Card Management" msgstr "Управление SD-картой" #: share/applications/ciborium.desktop.tr.h:1 msgid "External Drives" msgstr "Внешние накопители" ciborium-0.2.12+15.10.20150612/po/ca.po0000644000015300001610000001311212536576712017310 0ustar pbuserpbgroup00000000000000# Catalan translation for ciborium # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the ciborium package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: ciborium\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-03-24 16:11-0300\n" "PO-Revision-Date: 2014-10-15 08:15+0000\n" "Last-Translator: David Planella \n" "Language-Team: Catalan \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2015-03-25 06:07+0000\n" "X-Generator: Launchpad (build 17413)\n" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. success when addding a storage device. #: cmd/ciborium/main.go:123 msgid "Storage device detected" msgstr "S'ha detectat un dispositiu d'emmagatzematge" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. being scanned when addding a storage device. #: cmd/ciborium/main.go:126 msgid "This device will be scanned for new content" msgstr "S'analitzarà el dispositiu per detectar-ne el contingut" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. failure when adding a storage device. #: cmd/ciborium/main.go:132 msgid "Failed to add storage device" msgstr "No s'ha pogut afegir el dispositiu d'emmagatzematge" #. TRANSLATORS: This is the body of a notification bubble with a short message with hints #. with regards to the failure when adding a storage device. #: cmd/ciborium/main.go:135 msgid "Make sure the storage device is correctly formated" msgstr "" "Assegureu-vos que el dispositiu d'emmagatzematge estigui formatat " "correctament" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. a storage device being removed #: cmd/ciborium/main.go:141 msgid "Storage device has been removed" msgstr "S'ha suprimit el dispositiu d'emmagatzematge" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. from the removed device no longer being available #: cmd/ciborium/main.go:144 msgid "" "Content previously available on this device will no longer be accessible" msgstr "" "Ja no es pot accedir al contingug que estava disponible en aquest dispositiu" #. TRANSLATORS: This is the summary of a notification bubble with a short message warning on #. low space #: cmd/ciborium/main.go:329 msgid "Low on disk space" msgstr "Hi ha poc espai de disc" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on internal #. storage #: cmd/ciborium/main.go:333 #, c-format msgid "Only %d%% is available on the internal storage device" msgstr "Només hi ha un %d%% disponible al dispositiu d'emmagatzematge intern" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on a given #. external storage device #: cmd/ciborium/main.go:337 #, c-format msgid "Only %d%% is available on the external storage device" msgstr "Només hi ha un %d%% disponible al dispositiu d'emmagatzematge extern" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:12 msgid "Unmounting" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:17 #: share/ciborium/qml/components/FormatConfirmation.qml:22 msgid "Ok" msgstr "D'acord" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:30 #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:46 msgid "You can now safely remove the device" msgstr "Podeu extreure el dispositiu de manera segura" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:38 msgid "Unmount Error" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:39 msgid "The device could not be unmounted because is busy" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:45 msgid "Safe to remove" msgstr "Extracció segura" #: share/ciborium/qml/components/DriveDelegate.qml:45 #: share/ciborium/qml/components/FormatDialog.qml:11 msgid "Format" msgstr "Formata" #: share/ciborium/qml/components/DriveDelegate.qml:59 msgid "Safely Remove" msgstr "Extreu-ho de manera segura" #: share/ciborium/qml/components/FormatConfirmation.qml:11 msgid "Formatting" msgstr "S'està formatant" #: share/ciborium/qml/components/FormatConfirmation.qml:31 msgid "There was an error when formatting the device" msgstr "" #: share/ciborium/qml/components/FormatDialog.qml:12 msgid "This action will wipe the content from the device" msgstr "Aquesta acció suprimirà permanentment les dades del dispositiu" #: share/ciborium/qml/components/FormatDialog.qml:15 #: share/ciborium/qml/components/SafeRemoval.qml:17 msgid "Cancel" msgstr "Cancel·la" #: share/ciborium/qml/components/FormatDialog.qml:19 msgid "Continue with format" msgstr "Continua amb el formatatge" #: share/ciborium/qml/components/SafeRemoval.qml:13 msgid "Confirm remove" msgstr "Confirmeu l'extracció" #: share/ciborium/qml/components/SafeRemoval.qml:14 msgid "Files on the device can't be accessed after removing" msgstr "No es podrà accedir als fitxers del dispositiu un cop l'hàgiu extret" #: share/ciborium/qml/components/SafeRemoval.qml:22 msgid "Continue" msgstr "Continua" #: share/ciborium/qml/main.qml:34 msgid "SD Card Management" msgstr "Gestió de targetes SD" #: share/applications/ciborium.desktop.tr.h:1 msgid "External Drives" msgstr "Unitats externes" ciborium-0.2.12+15.10.20150612/po/am.po0000644000015300001610000001362412536576712017332 0ustar pbuserpbgroup00000000000000# Amharic translation for ciborium # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the ciborium package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: ciborium\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-03-24 16:11-0300\n" "PO-Revision-Date: 2015-03-25 23:45+0000\n" "Last-Translator: samson \n" "Language-Team: Amharic \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2015-03-27 05:38+0000\n" "X-Generator: Launchpad (build 17413)\n" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. success when addding a storage device. #: cmd/ciborium/main.go:119 msgid "Storage device detected" msgstr "የማጠራቀሚያ አካል ተገኝቷል" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. being scanned when addding a storage device. #: cmd/ciborium/main.go:122 msgid "This device will be scanned for new content" msgstr "አካሉ ለ አዲስ ይዞታዎች ይታሰሳል" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. failure when adding a storage device. #: cmd/ciborium/main.go:128 msgid "Failed to add storage device" msgstr "የማጠራቀሚያ አካል መጨመር አልተቻለም" #. TRANSLATORS: This is the body of a notification bubble with a short message with hints #. with regards to the failure when adding a storage device. #: cmd/ciborium/main.go:131 msgid "Make sure the storage device is correctly formated" msgstr "የማጠራቀሚያው አካል በትክክል ፎርማት መሆኑን ያረጋግጡ" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. a storage device being removed #: cmd/ciborium/main.go:137 msgid "Storage device has been removed" msgstr "የማጠራቀሚያ አካል ተወግዷል" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. from the removed device no longer being available #: cmd/ciborium/main.go:140 msgid "" "Content previously available on this device will no longer be accessible" msgstr "በዚህ አካል ውስጥ የነበሩ ማናኛውንም ይዞታ ማግኘት አይቻልም" #. TRANSLATORS: This is the summary of a notification bubble with a short message warning on #. low space #: cmd/ciborium/main.go:229 msgid "Low on disk space" msgstr "አነስተኛ የ ዲስክ ቦታ" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on internal #. storage #: cmd/ciborium/main.go:233 #, c-format msgid "Only %d%% is available on the internal storage device" msgstr "ይህ %d%% ብቻ ዝግጁ ነው በ ውስጥ ማጠራቀሚያ አካል ውስጥ" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on a given #. external storage device #: cmd/ciborium/main.go:237 #, c-format msgid "Only %d%% is available on the external storage device" msgstr "ይህ %d%% ብቻ ዝግጁ ነው በ ውጪ ማጠራቀሚያ አካል ውስጥ" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:12 msgid "Unmounting" msgstr "በማውረድ ላይ" #: share/ciborium/qml/components/SafeRemoval.qml:21 msgid "Ok" msgstr "እሺ" #: share/ciborium/qml/components/SafeRemoval.qml:18 msgid "You can now safely remove the device" msgstr "አካሉን አሁን በጥንቃቄ ማስወገድ ይችላሉ" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:38 msgid "Unmount Error" msgstr "በማውረድ ላይ እንዳለ ስህተት ተፈጥሯል" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:39 msgid "The device could not be unmounted because is busy" msgstr "አካሉን ማውረድ አልተቻለም ምክንያቱም በ ስራ ላይ ነው" #: share/ciborium/qml/components/SafeRemoval.qml:17 msgid "Safe to remove" msgstr "በጥንቃቄ ማስወገጃ" #: share/ciborium/qml/components/FormatDialog.qml:17 #: share/ciborium/qml/components/FormatDialog.qml:59 msgid "Format" msgstr "አቀራረብ" #: share/ciborium/qml/components/SafeRemoval.qml:59 msgid "Safely Remove" msgstr "በጥንቃቄ ማስወገጃ" #: share/ciborium/qml/components/FormatDialog.qml:42 msgid "Formatting" msgstr "አቀራረቡን በመፈጸም ላይ" #: share/ciborium/qml/components/FormatConfirmation.qml:31 msgid "There was an error when formatting the device" msgstr "አካሉ በሚሰናዳ ጊዜ ስህተት ተፈጥሯል" #: share/ciborium/qml/components/FormatDialog.qml:18 msgid "This action will wipe the content from the device" msgstr "ይህ ተግባር በ አካሉ ውስጥ ያሉትን ይዞታዎች በሙሉ ያጠፋል" #: share/ciborium/qml/components/SafeRemoval.qml:40 #: share/ciborium/qml/components/FormatDialog.qml:21 msgid "Cancel" msgstr "መሰረዣ" #: share/ciborium/qml/components/FormatDialog.qml:25 msgid "Continue with format" msgstr "አቀራረቡን መቀጠያ" #: share/ciborium/qml/components/SafeRemoval.qml:36 msgid "Confirm remove" msgstr "ማስወገዱን ያረጋግጡ" #: share/ciborium/qml/components/SafeRemoval.qml:37 msgid "Files on the device can't be accessed after removing" msgstr "አካሉን ካስወገዱ በኋላ በውስጡ የነበሩ ፋይሎች ጋር መድረስ አይችሉም" #: share/ciborium/qml/components/SafeRemoval.qml:44 msgid "Continue" msgstr "ይቀጥሉ" #: share/ciborium/qml/main.qml:33 msgid "SD Card Management" msgstr "የ ማጠራቃሚያ አስተዳዳሪ" #: share/applications/ciborium.desktop.tr.h:1 msgid "External Drives" msgstr "የ ውጪ አካሎች" ciborium-0.2.12+15.10.20150612/po/fi.po0000644000015300001610000001245412536576712017333 0ustar pbuserpbgroup00000000000000# Finnish translation for ciborium # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the ciborium package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: ciborium\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-03-24 16:11-0300\n" "PO-Revision-Date: 2015-03-26 07:48+0000\n" "Last-Translator: Jiri Grönroos \n" "Language-Team: Finnish \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2015-03-27 05:38+0000\n" "X-Generator: Launchpad (build 17413)\n" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. success when addding a storage device. #: cmd/ciborium/main.go:119 msgid "Storage device detected" msgstr "Tallennuslaite havaittu" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. being scanned when addding a storage device. #: cmd/ciborium/main.go:122 msgid "This device will be scanned for new content" msgstr "Tämä laite tutkitaan uuden sisällön varalta" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. failure when adding a storage device. #: cmd/ciborium/main.go:128 msgid "Failed to add storage device" msgstr "Tallennuslaitteen lisääminen epäonnistui" #. TRANSLATORS: This is the body of a notification bubble with a short message with hints #. with regards to the failure when adding a storage device. #: cmd/ciborium/main.go:131 msgid "Make sure the storage device is correctly formated" msgstr "Varmista, että tallennuslaite on alustettu oikein" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. a storage device being removed #: cmd/ciborium/main.go:137 msgid "Storage device has been removed" msgstr "Tallennuslaite on irrotettu" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. from the removed device no longer being available #: cmd/ciborium/main.go:140 msgid "" "Content previously available on this device will no longer be accessible" msgstr "" "Tällä laitteella aiemmin käytettävissä ollut sisältö ei ole enää saatavilla" #. TRANSLATORS: This is the summary of a notification bubble with a short message warning on #. low space #: cmd/ciborium/main.go:229 msgid "Low on disk space" msgstr "Levytila on vähissä" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on internal #. storage #: cmd/ciborium/main.go:233 #, c-format msgid "Only %d%% is available on the internal storage device" msgstr "Sisäistä levytilaa on jäljellä vain %d% %" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on a given #. external storage device #: cmd/ciborium/main.go:237 #, c-format msgid "Only %d%% is available on the external storage device" msgstr "Ulkoista levytilaa on jäljellä vain %d% %" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:12 msgid "Unmounting" msgstr "Irrotetaan" #: share/ciborium/qml/components/SafeRemoval.qml:21 msgid "Ok" msgstr "OK" #: share/ciborium/qml/components/SafeRemoval.qml:18 msgid "You can now safely remove the device" msgstr "Voit nyt irrottaa laitteen turvallisesti" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:38 msgid "Unmount Error" msgstr "Irrotusvirhe" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:39 msgid "The device could not be unmounted because is busy" msgstr "Laitetta ei voitu irrottaa, koska se on käytössä" #: share/ciborium/qml/components/SafeRemoval.qml:17 msgid "Safe to remove" msgstr "Irrottaminen on turvallista" #: share/ciborium/qml/components/FormatDialog.qml:17 #: share/ciborium/qml/components/FormatDialog.qml:59 msgid "Format" msgstr "Alusta" #: share/ciborium/qml/components/SafeRemoval.qml:59 msgid "Safely Remove" msgstr "Irrota turvallisesti" #: share/ciborium/qml/components/FormatDialog.qml:42 msgid "Formatting" msgstr "Alustetaan" #: share/ciborium/qml/components/FormatConfirmation.qml:31 msgid "There was an error when formatting the device" msgstr "Virhe laitetta alustaessa" #: share/ciborium/qml/components/FormatDialog.qml:18 msgid "This action will wipe the content from the device" msgstr "Tämä toiminto tyhjentää laitteen sisällön" #: share/ciborium/qml/components/SafeRemoval.qml:40 #: share/ciborium/qml/components/FormatDialog.qml:21 msgid "Cancel" msgstr "Peru" #: share/ciborium/qml/components/FormatDialog.qml:25 msgid "Continue with format" msgstr "Jatka alustamista" #: share/ciborium/qml/components/SafeRemoval.qml:36 msgid "Confirm remove" msgstr "Vahvista irrottaminen" #: share/ciborium/qml/components/SafeRemoval.qml:37 msgid "Files on the device can't be accessed after removing" msgstr "Irrottamisen jälkeen laitteen tiedostoja ei voi käyttää" #: share/ciborium/qml/components/SafeRemoval.qml:44 msgid "Continue" msgstr "Jatka" #: share/ciborium/qml/main.qml:33 msgid "SD Card Management" msgstr "SD-kortin hallinta" #: share/applications/ciborium.desktop.tr.h:1 msgid "External Drives" msgstr "Erilliset asemat" ciborium-0.2.12+15.10.20150612/po/km.po0000644000015300001610000001277712536576712017354 0ustar pbuserpbgroup00000000000000# Khmer translation for ciborium # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the ciborium package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: ciborium\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-03-24 16:11-0300\n" "PO-Revision-Date: 2014-08-20 04:32+0000\n" "Last-Translator: Sophea Sok \n" "Language-Team: Khmer \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2015-03-25 06:07+0000\n" "X-Generator: Launchpad (build 17413)\n" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. success when addding a storage device. #: cmd/ciborium/main.go:123 msgid "Storage device detected" msgstr "បាន​លុប​ឧបករណ៍​ផ្ទុក" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. being scanned when addding a storage device. #: cmd/ciborium/main.go:126 msgid "This device will be scanned for new content" msgstr "ឧបករណ៍​នេះ​នឹង​ត្រូវ​បាន​វិភាគ​រក​សម្រាប់​ខ្លឹមសារ​ថ្មី" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. failure when adding a storage device. #: cmd/ciborium/main.go:132 msgid "Failed to add storage device" msgstr "បាន​បរាជ័យ​ក្នុង​ការ​បន្ថែម​ឧបករណ៍​ផ្ទុក" #. TRANSLATORS: This is the body of a notification bubble with a short message with hints #. with regards to the failure when adding a storage device. #: cmd/ciborium/main.go:135 msgid "Make sure the storage device is correctly formated" msgstr "សូម​ប្រាកដ​ថា​ឧបករណ៍​ផ្ទុក​ត្រូវ​បាន​ធ្វើ​ទ្រង់ទ្រាយ​ត្រឹមត្រូ" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. a storage device being removed #: cmd/ciborium/main.go:141 msgid "Storage device has been removed" msgstr "ឧបករណ៍​ផ្ទុក​ត្រូវ​បាន​យក​ចេញ" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. from the removed device no longer being available #: cmd/ciborium/main.go:144 msgid "" "Content previously available on this device will no longer be accessible" msgstr "មាតិកា​ពីមុន​ដែល​នៅ​លើ​ឧបករណ៍​នេះ​នឹង​លែង​អាច​ចូល​ប្រើ​បាន​ទៀត​ហើយ" #. TRANSLATORS: This is the summary of a notification bubble with a short message warning on #. low space #: cmd/ciborium/main.go:329 msgid "Low on disk space" msgstr "" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on internal #. storage #: cmd/ciborium/main.go:333 #, c-format msgid "Only %d%% is available on the internal storage device" msgstr "" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on a given #. external storage device #: cmd/ciborium/main.go:337 #, c-format msgid "Only %d%% is available on the external storage device" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:12 msgid "Unmounting" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:17 #: share/ciborium/qml/components/FormatConfirmation.qml:22 msgid "Ok" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:30 #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:46 msgid "You can now safely remove the device" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:38 msgid "Unmount Error" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:39 msgid "The device could not be unmounted because is busy" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:45 msgid "Safe to remove" msgstr "" #: share/ciborium/qml/components/DriveDelegate.qml:45 #: share/ciborium/qml/components/FormatDialog.qml:11 msgid "Format" msgstr "" #: share/ciborium/qml/components/DriveDelegate.qml:59 msgid "Safely Remove" msgstr "" #: share/ciborium/qml/components/FormatConfirmation.qml:11 msgid "Formatting" msgstr "" #: share/ciborium/qml/components/FormatConfirmation.qml:31 msgid "There was an error when formatting the device" msgstr "" #: share/ciborium/qml/components/FormatDialog.qml:12 msgid "This action will wipe the content from the device" msgstr "" #: share/ciborium/qml/components/FormatDialog.qml:15 #: share/ciborium/qml/components/SafeRemoval.qml:17 msgid "Cancel" msgstr "" #: share/ciborium/qml/components/FormatDialog.qml:19 msgid "Continue with format" msgstr "" #: share/ciborium/qml/components/SafeRemoval.qml:13 msgid "Confirm remove" msgstr "" #: share/ciborium/qml/components/SafeRemoval.qml:14 msgid "Files on the device can't be accessed after removing" msgstr "" #: share/ciborium/qml/components/SafeRemoval.qml:22 msgid "Continue" msgstr "" #: share/ciborium/qml/main.qml:34 msgid "SD Card Management" msgstr "" #: share/applications/ciborium.desktop.tr.h:1 msgid "External Drives" msgstr "" ciborium-0.2.12+15.10.20150612/po/ia.po0000644000015300001610000001254412536576712017326 0ustar pbuserpbgroup00000000000000# Interlingua translation for ciborium # Copyright (c) 2015 Rosetta Contributors and Canonical Ltd 2015 # This file is distributed under the same license as the ciborium package. # FIRST AUTHOR , 2015. # msgid "" msgstr "" "Project-Id-Version: ciborium\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-03-24 16:11-0300\n" "PO-Revision-Date: 2015-05-17 11:07+0000\n" "Last-Translator: FULL NAME \n" "Language-Team: Interlingua \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2015-05-18 05:27+0000\n" "X-Generator: Launchpad (build 17493)\n" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. success when addding a storage device. #: cmd/ciborium/main.go:119 msgid "Storage device detected" msgstr "Dispositivo de immagazinage disvelate" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. being scanned when addding a storage device. #: cmd/ciborium/main.go:122 msgid "This device will be scanned for new content" msgstr "Iste dispositivo essera scandite pro contentos nove" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. failure when adding a storage device. #: cmd/ciborium/main.go:128 msgid "Failed to add storage device" msgstr "Fallite addition de dispositivo de immagazinage" #. TRANSLATORS: This is the body of a notification bubble with a short message with hints #. with regards to the failure when adding a storage device. #: cmd/ciborium/main.go:131 msgid "Make sure the storage device is correctly formated" msgstr "" "Assecura te que le dispositivo de immagazinage es correctemente formattate" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. a storage device being removed #: cmd/ciborium/main.go:137 msgid "Storage device has been removed" msgstr "Le dispositivo de immagazinage ha essite removite" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. from the removed device no longer being available #: cmd/ciborium/main.go:140 msgid "" "Content previously available on this device will no longer be accessible" msgstr "" "Le contento antea disponibile sur iste dispositivo non essera plus " "accessibile" #. TRANSLATORS: This is the summary of a notification bubble with a short message warning on #. low space #: cmd/ciborium/main.go:229 msgid "Low on disk space" msgstr "Pauc spatio sur le disco" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on internal #. storage #: cmd/ciborium/main.go:233 #, c-format msgid "Only %d%% is available on the internal storage device" msgstr "" "Sol le %d%% es disponibile sur le dispositivo de immagazinage interne" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on a given #. external storage device #: cmd/ciborium/main.go:237 #, c-format msgid "Only %d%% is available on the external storage device" msgstr "" "Sol le %d%% es disponibile sur le dispositivo de immagazinage externe" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:12 msgid "Unmounting" msgstr "" #: share/ciborium/qml/components/SafeRemoval.qml:21 msgid "Ok" msgstr "OK" #: share/ciborium/qml/components/SafeRemoval.qml:18 msgid "You can now safely remove the device" msgstr "Tu pote ora remover securmente le dispositivo" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:38 msgid "Unmount Error" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:39 msgid "The device could not be unmounted because is busy" msgstr "" #: share/ciborium/qml/components/SafeRemoval.qml:17 msgid "Safe to remove" msgstr "Remotion secur" #: share/ciborium/qml/components/FormatDialog.qml:17 #: share/ciborium/qml/components/FormatDialog.qml:59 msgid "Format" msgstr "Formattar" #: share/ciborium/qml/components/SafeRemoval.qml:59 msgid "Safely Remove" msgstr "Remove con securitate" #: share/ciborium/qml/components/FormatDialog.qml:42 msgid "Formatting" msgstr "Formattante" #: share/ciborium/qml/components/FormatConfirmation.qml:31 msgid "There was an error when formatting the device" msgstr "" #: share/ciborium/qml/components/FormatDialog.qml:18 msgid "This action will wipe the content from the device" msgstr "Iste action essugara le contento del dispositivo" #: share/ciborium/qml/components/SafeRemoval.qml:40 #: share/ciborium/qml/components/FormatDialog.qml:21 msgid "Cancel" msgstr "Deler" #: share/ciborium/qml/components/FormatDialog.qml:25 msgid "Continue with format" msgstr "Continuar a formattar" #: share/ciborium/qml/components/SafeRemoval.qml:36 msgid "Confirm remove" msgstr "Confirmar le remotion" #: share/ciborium/qml/components/SafeRemoval.qml:37 msgid "Files on the device can't be accessed after removing" msgstr "Le files del dispositivo non potera ser accedite post le remotion" #: share/ciborium/qml/components/SafeRemoval.qml:44 msgid "Continue" msgstr "Continuar" #: share/ciborium/qml/main.qml:33 msgid "SD Card Management" msgstr "Tractamento del scheda SD" #: share/applications/ciborium.desktop.tr.h:1 msgid "External Drives" msgstr "Drives externe" ciborium-0.2.12+15.10.20150612/po/es.po0000644000015300001610000001275712536576712017352 0ustar pbuserpbgroup00000000000000# Spanish translation for ciborium # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the ciborium package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: ciborium\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-03-24 16:11-0300\n" "PO-Revision-Date: 2015-03-27 21:26+0000\n" "Last-Translator: Adolfo Jayme \n" "Language-Team: Spanish \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2015-03-28 05:34+0000\n" "X-Generator: Launchpad (build 17413)\n" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. success when addding a storage device. #: cmd/ciborium/main.go:119 msgid "Storage device detected" msgstr "Dispositivo de almacenamiento detectado" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. being scanned when addding a storage device. #: cmd/ciborium/main.go:122 msgid "This device will be scanned for new content" msgstr "Se analizará este dispositivo en busca de nuevo contenido" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. failure when adding a storage device. #: cmd/ciborium/main.go:128 msgid "Failed to add storage device" msgstr "Falló al añadir el dispositivo de almacenamiento" #. TRANSLATORS: This is the body of a notification bubble with a short message with hints #. with regards to the failure when adding a storage device. #: cmd/ciborium/main.go:131 msgid "Make sure the storage device is correctly formated" msgstr "" "Asegúrese de que el dispositivo de almacenamiento está correctamente " "formateado" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. a storage device being removed #: cmd/ciborium/main.go:137 msgid "Storage device has been removed" msgstr "El dispositivo de almacenamiento ha sido desconectado." #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. from the removed device no longer being available #: cmd/ciborium/main.go:140 msgid "" "Content previously available on this device will no longer be accessible" msgstr "" "Ya no se podrá acceder a los contenidos almacenados en este dispositivo" #. TRANSLATORS: This is the summary of a notification bubble with a short message warning on #. low space #: cmd/ciborium/main.go:229 msgid "Low on disk space" msgstr "Poco espacio en disco" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on internal #. storage #: cmd/ciborium/main.go:233 #, c-format msgid "Only %d%% is available on the internal storage device" msgstr "Queda solo un %d %% de espacio interno" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on a given #. external storage device #: cmd/ciborium/main.go:237 #, c-format msgid "Only %d%% is available on the external storage device" msgstr "Queda solo un %d %% de espacio externo" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:12 msgid "Unmounting" msgstr "Desmontando" #: share/ciborium/qml/components/SafeRemoval.qml:21 msgid "Ok" msgstr "Aceptar" #: share/ciborium/qml/components/SafeRemoval.qml:18 msgid "You can now safely remove the device" msgstr "Ahora ya puede extraer el dispositivo con seguridad" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:38 msgid "Unmount Error" msgstr "Error al desmontar" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:39 msgid "The device could not be unmounted because is busy" msgstr "No se puede desmontar el dispositivo porque está ocupado" #: share/ciborium/qml/components/SafeRemoval.qml:17 msgid "Safe to remove" msgstr "Se puede extraer con seguridad" #: share/ciborium/qml/components/FormatDialog.qml:17 #: share/ciborium/qml/components/FormatDialog.qml:59 msgid "Format" msgstr "Formatear" #: share/ciborium/qml/components/SafeRemoval.qml:59 msgid "Safely Remove" msgstr "Extraer de forma segura" #: share/ciborium/qml/components/FormatDialog.qml:42 msgid "Formatting" msgstr "Formateando" #: share/ciborium/qml/components/FormatConfirmation.qml:31 msgid "There was an error when formatting the device" msgstr "Error al formatear el dispositivo" #: share/ciborium/qml/components/FormatDialog.qml:18 msgid "This action will wipe the content from the device" msgstr "Esta acción eliminará los contenidos actuales del dispositivo" #: share/ciborium/qml/components/SafeRemoval.qml:40 #: share/ciborium/qml/components/FormatDialog.qml:21 msgid "Cancel" msgstr "Cancelar" #: share/ciborium/qml/components/FormatDialog.qml:25 msgid "Continue with format" msgstr "Continuar con el formateo" #: share/ciborium/qml/components/SafeRemoval.qml:36 msgid "Confirm remove" msgstr "Confirme la extracción" #: share/ciborium/qml/components/SafeRemoval.qml:37 msgid "Files on the device can't be accessed after removing" msgstr "" "No se podrá acceder a los archivos de este dispositivo después de extraerlo" #: share/ciborium/qml/components/SafeRemoval.qml:44 msgid "Continue" msgstr "Continuar" #: share/ciborium/qml/main.qml:33 msgid "SD Card Management" msgstr "Gestión de tarjetas SD" #: share/applications/ciborium.desktop.tr.h:1 msgid "External Drives" msgstr "Unidades externas" ciborium-0.2.12+15.10.20150612/po/fa.po0000644000015300001610000001363412536576712017324 0ustar pbuserpbgroup00000000000000# Persian translation for ciborium # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the ciborium package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: ciborium\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-03-24 16:11-0300\n" "PO-Revision-Date: 2015-04-10 02:51+0000\n" "Last-Translator: Danial Behzadi \n" "Language-Team: Persian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2015-04-11 05:53+0000\n" "X-Generator: Launchpad (build 17423)\n" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. success when addding a storage device. #: cmd/ciborium/main.go:119 msgid "Storage device detected" msgstr "دستگاه ذخیره‌سازی تشخیص داده شد" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. being scanned when addding a storage device. #: cmd/ciborium/main.go:122 msgid "This device will be scanned for new content" msgstr "این دستگاه برای محتوای جدید پویش خواهد شد" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. failure when adding a storage device. #: cmd/ciborium/main.go:128 msgid "Failed to add storage device" msgstr "افزودن دستگاه ذخیره‌سازی شکست خورد" #. TRANSLATORS: This is the body of a notification bubble with a short message with hints #. with regards to the failure when adding a storage device. #: cmd/ciborium/main.go:131 msgid "Make sure the storage device is correctly formated" msgstr "مطمئن شوید دستگاه ذخیره‌سازی به درستی قالب‌بندی شده است" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. a storage device being removed #: cmd/ciborium/main.go:137 msgid "Storage device has been removed" msgstr "دستگاه ذخیره‌سازی برداشته شد" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. from the removed device no longer being available #: cmd/ciborium/main.go:140 msgid "" "Content previously available on this device will no longer be accessible" msgstr "" "محتوایی که پیش‌تر روی این دستگاه موجود بود دیگر قابل دست‌رسی نخواهند بود" #. TRANSLATORS: This is the summary of a notification bubble with a short message warning on #. low space #: cmd/ciborium/main.go:229 msgid "Low on disk space" msgstr "کمبود فضای دیسک" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on internal #. storage #: cmd/ciborium/main.go:233 #, c-format msgid "Only %d%% is available on the internal storage device" msgstr "فقط %d%% روی دستگاه داخلی حافظه موجود است" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on a given #. external storage device #: cmd/ciborium/main.go:237 #, c-format msgid "Only %d%% is available on the external storage device" msgstr "فقط %d%% روی دستگاه خارجی حافظه موجود است" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:12 msgid "Unmounting" msgstr "در حال پیاده کردن" #: share/ciborium/qml/components/SafeRemoval.qml:21 msgid "Ok" msgstr "تائید" #: share/ciborium/qml/components/SafeRemoval.qml:18 msgid "You can now safely remove the device" msgstr "هم‌اکنون می‌توانید دستگاه را به صورت امن بردارید" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:38 msgid "Unmount Error" msgstr "خطا در پیاده کردن" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:39 msgid "The device could not be unmounted because is busy" msgstr "دستگاه نمی‌تواند پیاده شود، چون مشغول است" #: share/ciborium/qml/components/SafeRemoval.qml:17 msgid "Safe to remove" msgstr "امن برای برداشتن" #: share/ciborium/qml/components/FormatDialog.qml:17 #: share/ciborium/qml/components/FormatDialog.qml:59 msgid "Format" msgstr "قالب‌بندی" #: share/ciborium/qml/components/SafeRemoval.qml:59 msgid "Safely Remove" msgstr "برداشتن امن" #: share/ciborium/qml/components/FormatDialog.qml:42 msgid "Formatting" msgstr "قالب‌بندی کردن" #: share/ciborium/qml/components/FormatConfirmation.qml:31 msgid "There was an error when formatting the device" msgstr "هنگام قالب‌بندی دستگاه، مشکلی رخ داد" #: share/ciborium/qml/components/FormatDialog.qml:18 msgid "This action will wipe the content from the device" msgstr "این عمل محتوا را از دستگاه پاک می‌کند" #: share/ciborium/qml/components/SafeRemoval.qml:40 #: share/ciborium/qml/components/FormatDialog.qml:21 msgid "Cancel" msgstr "لغو" #: share/ciborium/qml/components/FormatDialog.qml:25 msgid "Continue with format" msgstr "ادامه‌ی قالب‌بندی" #: share/ciborium/qml/components/SafeRemoval.qml:36 msgid "Confirm remove" msgstr "تأیید برداشتن" #: share/ciborium/qml/components/SafeRemoval.qml:37 msgid "Files on the device can't be accessed after removing" msgstr "پرونده‌های روی دستگاه پس از برداشته شدن قابل دیت‌رسی نیستند" #: share/ciborium/qml/components/SafeRemoval.qml:44 msgid "Continue" msgstr "ادامه" #: share/ciborium/qml/main.qml:33 msgid "SD Card Management" msgstr "مدیریت کارت SD" #: share/applications/ciborium.desktop.tr.h:1 msgid "External Drives" msgstr "گرداننده‌های خارجی" ciborium-0.2.12+15.10.20150612/po/ko.po0000644000015300001610000001301512536576712017340 0ustar pbuserpbgroup00000000000000# Korean translation for ciborium # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the ciborium package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: ciborium\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-03-24 16:11-0300\n" "PO-Revision-Date: 2014-10-22 08:04+0000\n" "Last-Translator: MinSik CHO \n" "Language-Team: Korean \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2015-03-25 06:07+0000\n" "X-Generator: Launchpad (build 17413)\n" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. success when addding a storage device. #: cmd/ciborium/main.go:123 msgid "Storage device detected" msgstr "저장 장치가 연결되었습니다." #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. being scanned when addding a storage device. #: cmd/ciborium/main.go:126 msgid "This device will be scanned for new content" msgstr "장치에서 새로운 컨텐츠를 검색합니다." #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. failure when adding a storage device. #: cmd/ciborium/main.go:132 msgid "Failed to add storage device" msgstr "저장 장치를 추가하지 못했습니다." #. TRANSLATORS: This is the body of a notification bubble with a short message with hints #. with regards to the failure when adding a storage device. #: cmd/ciborium/main.go:135 msgid "Make sure the storage device is correctly formated" msgstr "저장 장치가 올바른 포맷으로 설정되어 있는지 확인하세요." #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. a storage device being removed #: cmd/ciborium/main.go:141 msgid "Storage device has been removed" msgstr "저장 장치가 제거되었습니다." #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. from the removed device no longer being available #: cmd/ciborium/main.go:144 msgid "" "Content previously available on this device will no longer be accessible" msgstr "저장 장치에 저장되어 있었던 컨텐츠는 더 이상 사용할 수 없습니다." #. TRANSLATORS: This is the summary of a notification bubble with a short message warning on #. low space #: cmd/ciborium/main.go:329 msgid "Low on disk space" msgstr "다스크에 빈 공간 부족" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on internal #. storage #: cmd/ciborium/main.go:333 #, c-format msgid "Only %d%% is available on the internal storage device" msgstr "내부 저장소에 %d%% 정도의 공간만 남아있습니다." #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on a given #. external storage device #: cmd/ciborium/main.go:337 #, c-format msgid "Only %d%% is available on the external storage device" msgstr "외부 저장소에 %d%% 정도의 공간만 남아있습니다." #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:12 msgid "Unmounting" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:17 #: share/ciborium/qml/components/FormatConfirmation.qml:22 msgid "Ok" msgstr "확인" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:30 #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:46 msgid "You can now safely remove the device" msgstr "이제 안전하게 장치를 제거할 수 있습니다." #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:38 msgid "Unmount Error" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:39 msgid "The device could not be unmounted because is busy" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:45 msgid "Safe to remove" msgstr "제거해도 안전합니다." #: share/ciborium/qml/components/DriveDelegate.qml:45 #: share/ciborium/qml/components/FormatDialog.qml:11 msgid "Format" msgstr "포맷" #: share/ciborium/qml/components/DriveDelegate.qml:59 msgid "Safely Remove" msgstr "안전하게 제거" #: share/ciborium/qml/components/FormatConfirmation.qml:11 msgid "Formatting" msgstr "포맷 중" #: share/ciborium/qml/components/FormatConfirmation.qml:31 msgid "There was an error when formatting the device" msgstr "" #: share/ciborium/qml/components/FormatDialog.qml:12 msgid "This action will wipe the content from the device" msgstr "이 동작은 장치의 내용을 완전히 지웁니다." #: share/ciborium/qml/components/FormatDialog.qml:15 #: share/ciborium/qml/components/SafeRemoval.qml:17 msgid "Cancel" msgstr "취소" #: share/ciborium/qml/components/FormatDialog.qml:19 msgid "Continue with format" msgstr "포멧 계속 진행" #: share/ciborium/qml/components/SafeRemoval.qml:13 msgid "Confirm remove" msgstr "제거 확인" #: share/ciborium/qml/components/SafeRemoval.qml:14 msgid "Files on the device can't be accessed after removing" msgstr "제거한 후에는 장치에 있는 파일에 접근할 수 없습니다." #: share/ciborium/qml/components/SafeRemoval.qml:22 msgid "Continue" msgstr "계속" #: share/ciborium/qml/main.qml:34 msgid "SD Card Management" msgstr "SD 카드 관리" #: share/applications/ciborium.desktop.tr.h:1 msgid "External Drives" msgstr "외부 저장소" ciborium-0.2.12+15.10.20150612/po/vi.po0000644000015300001610000001105312536576712017345 0ustar pbuserpbgroup00000000000000# Vietnamese translation for ciborium # Copyright (c) 2015 Rosetta Contributors and Canonical Ltd 2015 # This file is distributed under the same license as the ciborium package. # FIRST AUTHOR , 2015. # msgid "" msgstr "" "Project-Id-Version: ciborium\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-03-24 16:11-0300\n" "PO-Revision-Date: 2015-04-02 19:42+0000\n" "Last-Translator: FULL NAME \n" "Language-Team: Vietnamese \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2015-04-03 06:05+0000\n" "X-Generator: Launchpad (build 17413)\n" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. success when addding a storage device. #: cmd/ciborium/main.go:119 msgid "Storage device detected" msgstr "" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. being scanned when addding a storage device. #: cmd/ciborium/main.go:122 msgid "This device will be scanned for new content" msgstr "" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. failure when adding a storage device. #: cmd/ciborium/main.go:128 msgid "Failed to add storage device" msgstr "" #. TRANSLATORS: This is the body of a notification bubble with a short message with hints #. with regards to the failure when adding a storage device. #: cmd/ciborium/main.go:131 msgid "Make sure the storage device is correctly formated" msgstr "" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. a storage device being removed #: cmd/ciborium/main.go:137 msgid "Storage device has been removed" msgstr "" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. from the removed device no longer being available #: cmd/ciborium/main.go:140 msgid "" "Content previously available on this device will no longer be accessible" msgstr "" #. TRANSLATORS: This is the summary of a notification bubble with a short message warning on #. low space #: cmd/ciborium/main.go:229 msgid "Low on disk space" msgstr "" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on internal #. storage #: cmd/ciborium/main.go:233 #, c-format msgid "Only %d%% is available on the internal storage device" msgstr "" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on a given #. external storage device #: cmd/ciborium/main.go:237 #, c-format msgid "Only %d%% is available on the external storage device" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:12 msgid "Unmounting" msgstr "" #: share/ciborium/qml/components/SafeRemoval.qml:21 msgid "Ok" msgstr "" #: share/ciborium/qml/components/SafeRemoval.qml:18 msgid "You can now safely remove the device" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:38 msgid "Unmount Error" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:39 msgid "The device could not be unmounted because is busy" msgstr "" #: share/ciborium/qml/components/SafeRemoval.qml:17 msgid "Safe to remove" msgstr "" #: share/ciborium/qml/components/FormatDialog.qml:17 #: share/ciborium/qml/components/FormatDialog.qml:59 msgid "Format" msgstr "" #: share/ciborium/qml/components/SafeRemoval.qml:59 msgid "Safely Remove" msgstr "" #: share/ciborium/qml/components/FormatDialog.qml:42 msgid "Formatting" msgstr "" #: share/ciborium/qml/components/FormatConfirmation.qml:31 msgid "There was an error when formatting the device" msgstr "" #: share/ciborium/qml/components/FormatDialog.qml:18 msgid "This action will wipe the content from the device" msgstr "" #: share/ciborium/qml/components/SafeRemoval.qml:40 #: share/ciborium/qml/components/FormatDialog.qml:21 msgid "Cancel" msgstr "" #: share/ciborium/qml/components/FormatDialog.qml:25 msgid "Continue with format" msgstr "" #: share/ciborium/qml/components/SafeRemoval.qml:36 msgid "Confirm remove" msgstr "" #: share/ciborium/qml/components/SafeRemoval.qml:37 msgid "Files on the device can't be accessed after removing" msgstr "" #: share/ciborium/qml/components/SafeRemoval.qml:44 msgid "Continue" msgstr "" #: share/ciborium/qml/main.qml:33 msgid "SD Card Management" msgstr "" #: share/applications/ciborium.desktop.tr.h:1 msgid "External Drives" msgstr "" ciborium-0.2.12+15.10.20150612/po/eu.po0000644000015300001610000001252112536576712017341 0ustar pbuserpbgroup00000000000000# Basque translation for ciborium # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the ciborium package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: ciborium\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-03-24 16:11-0300\n" "PO-Revision-Date: 2015-04-20 23:32+0000\n" "Last-Translator: Ibai Oihanguren Sala \n" "Language-Team: Basque \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2015-04-21 05:53+0000\n" "X-Generator: Launchpad (build 17430)\n" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. success when addding a storage device. #: cmd/ciborium/main.go:119 msgid "Storage device detected" msgstr "Biltegiratze-gailua antzeman da" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. being scanned when addding a storage device. #: cmd/ciborium/main.go:122 msgid "This device will be scanned for new content" msgstr "Gailua eskaneatuko da eduki berrien bila" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. failure when adding a storage device. #: cmd/ciborium/main.go:128 msgid "Failed to add storage device" msgstr "Huts egin du biltegiratze-gailua gehitzeak" #. TRANSLATORS: This is the body of a notification bubble with a short message with hints #. with regards to the failure when adding a storage device. #: cmd/ciborium/main.go:131 msgid "Make sure the storage device is correctly formated" msgstr "Ziurtatu biltegiratze-gailuak formatu egokia duela" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. a storage device being removed #: cmd/ciborium/main.go:137 msgid "Storage device has been removed" msgstr "Biltegiratze-gailua kendu da" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. from the removed device no longer being available #: cmd/ciborium/main.go:140 msgid "" "Content previously available on this device will no longer be accessible" msgstr "" "Gailu honetan zegoen eduki erabilgarria dagoeneko ez da eskuragarri izango" #. TRANSLATORS: This is the summary of a notification bubble with a short message warning on #. low space #: cmd/ciborium/main.go:229 msgid "Low on disk space" msgstr "Leku gutxi diskoan" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on internal #. storage #: cmd/ciborium/main.go:233 #, c-format msgid "Only %d%% is available on the internal storage device" msgstr "Barneko biltegiratze-gailuak %%%da soilik du libre" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on a given #. external storage device #: cmd/ciborium/main.go:237 #, c-format msgid "Only %d%% is available on the external storage device" msgstr "Kanpoko biltegiratze-gailuak %%%da soilik du libre" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:12 msgid "Unmounting" msgstr "Desmuntatzen" #: share/ciborium/qml/components/SafeRemoval.qml:21 msgid "Ok" msgstr "Ados" #: share/ciborium/qml/components/SafeRemoval.qml:18 msgid "You can now safely remove the device" msgstr "Orain gailua modu seguruan ken dezakezu" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:38 msgid "Unmount Error" msgstr "Desmuntatze-errorea" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:39 msgid "The device could not be unmounted because is busy" msgstr "Gailua ezin izan da desmuntatu lanean ari delako" #: share/ciborium/qml/components/SafeRemoval.qml:17 msgid "Safe to remove" msgstr "Modu seguruan ken dezakezu" #: share/ciborium/qml/components/FormatDialog.qml:17 #: share/ciborium/qml/components/FormatDialog.qml:59 msgid "Format" msgstr "Formateatu" #: share/ciborium/qml/components/SafeRemoval.qml:59 msgid "Safely Remove" msgstr "Kendu modu seguruan" #: share/ciborium/qml/components/FormatDialog.qml:42 msgid "Formatting" msgstr "Formateatzen" #: share/ciborium/qml/components/FormatConfirmation.qml:31 msgid "There was an error when formatting the device" msgstr "Errore bat gertatu da gailua formateatzean" #: share/ciborium/qml/components/FormatDialog.qml:18 msgid "This action will wipe the content from the device" msgstr "Ekintza honek gailuko eduki guztia ezabatuko du" #: share/ciborium/qml/components/SafeRemoval.qml:40 #: share/ciborium/qml/components/FormatDialog.qml:21 msgid "Cancel" msgstr "Utzi" #: share/ciborium/qml/components/FormatDialog.qml:25 msgid "Continue with format" msgstr "Jarraitu eta formateatu" #: share/ciborium/qml/components/SafeRemoval.qml:36 msgid "Confirm remove" msgstr "Berretsi kentzea" #: share/ciborium/qml/components/SafeRemoval.qml:37 msgid "Files on the device can't be accessed after removing" msgstr "Kendu ondoren, gailuko fitxategiak ezingo dira atzitu" #: share/ciborium/qml/components/SafeRemoval.qml:44 msgid "Continue" msgstr "Jarraitu" #: share/ciborium/qml/main.qml:33 msgid "SD Card Management" msgstr "SD txartelaren kudeaketa" #: share/applications/ciborium.desktop.tr.h:1 msgid "External Drives" msgstr "Kanpoko unitateak" ciborium-0.2.12+15.10.20150612/po/ca@valencia.po0000644000015300001610000001310112536576712021111 0ustar pbuserpbgroup00000000000000# Catalan translation for ciborium # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the ciborium package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: ciborium\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-03-24 16:11-0300\n" "PO-Revision-Date: 2014-10-19 22:27+0000\n" "Last-Translator: David Planella \n" "Language-Team: Catalan \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2015-03-25 06:07+0000\n" "X-Generator: Launchpad (build 17413)\n" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. success when addding a storage device. #: cmd/ciborium/main.go:123 msgid "Storage device detected" msgstr "S'ha detectat un dispositiu d'emmagatzematge" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. being scanned when addding a storage device. #: cmd/ciborium/main.go:126 msgid "This device will be scanned for new content" msgstr "S'analitzarà el dispositiu per detectar-ne el contingut" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. failure when adding a storage device. #: cmd/ciborium/main.go:132 msgid "Failed to add storage device" msgstr "No s'ha pogut afegir el dispositiu d'emmagatzematge" #. TRANSLATORS: This is the body of a notification bubble with a short message with hints #. with regards to the failure when adding a storage device. #: cmd/ciborium/main.go:135 msgid "Make sure the storage device is correctly formated" msgstr "" "Assegureu-vos que el dispositiu d'emmagatzematge estiga formatat correctament" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. a storage device being removed #: cmd/ciborium/main.go:141 msgid "Storage device has been removed" msgstr "S'ha suprimit el dispositiu d'emmagatzematge" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. from the removed device no longer being available #: cmd/ciborium/main.go:144 msgid "" "Content previously available on this device will no longer be accessible" msgstr "" "Ja no es pot accedir al contingug que estava disponible en este dispositiu" #. TRANSLATORS: This is the summary of a notification bubble with a short message warning on #. low space #: cmd/ciborium/main.go:329 msgid "Low on disk space" msgstr "Hi ha poc espai de disc" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on internal #. storage #: cmd/ciborium/main.go:333 #, c-format msgid "Only %d%% is available on the internal storage device" msgstr "Només hi ha un %d%% disponible al dispositiu d'emmagatzematge intern" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on a given #. external storage device #: cmd/ciborium/main.go:337 #, c-format msgid "Only %d%% is available on the external storage device" msgstr "Només hi ha un %d%% disponible al dispositiu d'emmagatzematge extern" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:12 msgid "Unmounting" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:17 #: share/ciborium/qml/components/FormatConfirmation.qml:22 msgid "Ok" msgstr "D'acord" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:30 #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:46 msgid "You can now safely remove the device" msgstr "Podeu extraure el dispositiu de manera segura" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:38 msgid "Unmount Error" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:39 msgid "The device could not be unmounted because is busy" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:45 msgid "Safe to remove" msgstr "Extracció segura" #: share/ciborium/qml/components/DriveDelegate.qml:45 #: share/ciborium/qml/components/FormatDialog.qml:11 msgid "Format" msgstr "Formata" #: share/ciborium/qml/components/DriveDelegate.qml:59 msgid "Safely Remove" msgstr "Extrau-ho de manera segura" #: share/ciborium/qml/components/FormatConfirmation.qml:11 msgid "Formatting" msgstr "S'està formatant" #: share/ciborium/qml/components/FormatConfirmation.qml:31 msgid "There was an error when formatting the device" msgstr "" #: share/ciborium/qml/components/FormatDialog.qml:12 msgid "This action will wipe the content from the device" msgstr "Esta acció suprimirà permanentment les dades del dispositiu" #: share/ciborium/qml/components/FormatDialog.qml:15 #: share/ciborium/qml/components/SafeRemoval.qml:17 msgid "Cancel" msgstr "Cancel·la" #: share/ciborium/qml/components/FormatDialog.qml:19 msgid "Continue with format" msgstr "Continua amb el formatatge" #: share/ciborium/qml/components/SafeRemoval.qml:13 msgid "Confirm remove" msgstr "Confirmeu l'extracció" #: share/ciborium/qml/components/SafeRemoval.qml:14 msgid "Files on the device can't be accessed after removing" msgstr "No es podrà accedir als fitxers del dispositiu un cop l'hàgeu extret" #: share/ciborium/qml/components/SafeRemoval.qml:22 msgid "Continue" msgstr "Continua" #: share/ciborium/qml/main.qml:34 msgid "SD Card Management" msgstr "Gestió de targetes SD" #: share/applications/ciborium.desktop.tr.h:1 msgid "External Drives" msgstr "Unitats externes" ciborium-0.2.12+15.10.20150612/po/nl.po0000644000015300001610000001277112536576712017350 0ustar pbuserpbgroup00000000000000# Dutch translation for ciborium # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the ciborium package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: ciborium\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-03-24 16:11-0300\n" "PO-Revision-Date: 2015-03-25 09:32+0000\n" "Last-Translator: rob \n" "Language-Team: Dutch \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2015-03-26 05:30+0000\n" "X-Generator: Launchpad (build 17413)\n" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. success when addding a storage device. #: cmd/ciborium/main.go:119 msgid "Storage device detected" msgstr "Opslagapparaat gedetecteerd" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. being scanned when addding a storage device. #: cmd/ciborium/main.go:122 msgid "This device will be scanned for new content" msgstr "Het opslagapparaat zal gescand worden op nieuwe inhoud" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. failure when adding a storage device. #: cmd/ciborium/main.go:128 msgid "Failed to add storage device" msgstr "Kon opslagapparaat niet toevoegen" #. TRANSLATORS: This is the body of a notification bubble with a short message with hints #. with regards to the failure when adding a storage device. #: cmd/ciborium/main.go:131 msgid "Make sure the storage device is correctly formated" msgstr "Zorg ervoor dat het opslagapparaat correct geformatteerd is" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. a storage device being removed #: cmd/ciborium/main.go:137 msgid "Storage device has been removed" msgstr "Het opslagapparaat is verwijderd" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. from the removed device no longer being available #: cmd/ciborium/main.go:140 msgid "" "Content previously available on this device will no longer be accessible" msgstr "" "De voorheen beschikbare inhoud op dit opslagapparaat zal hierna niet langer " "toegankelijk zijn" #. TRANSLATORS: This is the summary of a notification bubble with a short message warning on #. low space #: cmd/ciborium/main.go:229 msgid "Low on disk space" msgstr "Nog maar weinig schijfruimte beschikbaar" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on internal #. storage #: cmd/ciborium/main.go:233 #, c-format msgid "Only %d%% is available on the internal storage device" msgstr "Er is nog maar %d%% beschikbaar op het interne opslagapparaat" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on a given #. external storage device #: cmd/ciborium/main.go:237 #, c-format msgid "Only %d%% is available on the external storage device" msgstr "Er is nog maar %d%% beschikbaar op het externe opslagapparaat" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:12 msgid "Unmounting" msgstr "Ontkoppelen" #: share/ciborium/qml/components/SafeRemoval.qml:21 msgid "Ok" msgstr "Ok" #: share/ciborium/qml/components/SafeRemoval.qml:18 msgid "You can now safely remove the device" msgstr "U kunt het opslagapparaat nu veilig verwijderen" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:38 msgid "Unmount Error" msgstr "Ontkoppelfout" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:39 msgid "The device could not be unmounted because is busy" msgstr "" "Het opslagapparaat kon niet ontkoppeld worden omdat het in gebruik is" #: share/ciborium/qml/components/SafeRemoval.qml:17 msgid "Safe to remove" msgstr "Veilig om te verwijderen" #: share/ciborium/qml/components/FormatDialog.qml:17 #: share/ciborium/qml/components/FormatDialog.qml:59 msgid "Format" msgstr "Formatteren" #: share/ciborium/qml/components/SafeRemoval.qml:59 msgid "Safely Remove" msgstr "Veilig verwijderen" #: share/ciborium/qml/components/FormatDialog.qml:42 msgid "Formatting" msgstr "Formatteren" #: share/ciborium/qml/components/FormatConfirmation.qml:31 msgid "There was an error when formatting the device" msgstr "" "Er is een fout opgetreden tijdens het formatteren van het opslagapparaat" #: share/ciborium/qml/components/FormatDialog.qml:18 msgid "This action will wipe the content from the device" msgstr "Deze actie zal de inhoud van het opslagapparaat wissen" #: share/ciborium/qml/components/SafeRemoval.qml:40 #: share/ciborium/qml/components/FormatDialog.qml:21 msgid "Cancel" msgstr "Annuleren" #: share/ciborium/qml/components/FormatDialog.qml:25 msgid "Continue with format" msgstr "Doorgaan met formatteren" #: share/ciborium/qml/components/SafeRemoval.qml:36 msgid "Confirm remove" msgstr "Bevestig verwijderen" #: share/ciborium/qml/components/SafeRemoval.qml:37 msgid "Files on the device can't be accessed after removing" msgstr "" "Bestanden op het verwijderde opslagapparaat zullen hierna niet langer " "toegankelijk zijn" #: share/ciborium/qml/components/SafeRemoval.qml:44 msgid "Continue" msgstr "Doorgaan" #: share/ciborium/qml/main.qml:33 msgid "SD Card Management" msgstr "SD-kaartbeheer" #: share/applications/ciborium.desktop.tr.h:1 msgid "External Drives" msgstr "Externe media" ciborium-0.2.12+15.10.20150612/po/is.po0000644000015300001610000001273112536576712017346 0ustar pbuserpbgroup00000000000000# Icelandic translation for ciborium # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the ciborium package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: ciborium\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-03-24 16:11-0300\n" "PO-Revision-Date: 2014-10-04 22:44+0000\n" "Last-Translator: Sveinn í Felli \n" "Language-Team: Icelandic \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2015-03-25 06:07+0000\n" "X-Generator: Launchpad (build 17413)\n" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. success when addding a storage device. #: cmd/ciborium/main.go:123 msgid "Storage device detected" msgstr "Geymslutæki fannst" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. being scanned when addding a storage device. #: cmd/ciborium/main.go:126 msgid "This device will be scanned for new content" msgstr "Leitað verður að nýju efni á geymslutækinu" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. failure when adding a storage device. #: cmd/ciborium/main.go:132 msgid "Failed to add storage device" msgstr "Mistókst að bæta við geymslutæki" #. TRANSLATORS: This is the body of a notification bubble with a short message with hints #. with regards to the failure when adding a storage device. #: cmd/ciborium/main.go:135 msgid "Make sure the storage device is correctly formated" msgstr "Gakktu úr skugga um að geymslutækið sé rétt forsniðið" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. a storage device being removed #: cmd/ciborium/main.go:141 msgid "Storage device has been removed" msgstr "Geymslutækið hefur verið fjarlægt" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. from the removed device no longer being available #: cmd/ciborium/main.go:144 msgid "" "Content previously available on this device will no longer be accessible" msgstr "" "Efni sem áður var tiltækt á þessu drifi verður ekki lengur aðgengilegt" #. TRANSLATORS: This is the summary of a notification bubble with a short message warning on #. low space #: cmd/ciborium/main.go:329 msgid "Low on disk space" msgstr "Lítið diskpláss eftir" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on internal #. storage #: cmd/ciborium/main.go:333 #, c-format msgid "Only %d%% is available on the internal storage device" msgstr "Einungis %d%% eru tiltæk á innra geymslutæki" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on a given #. external storage device #: cmd/ciborium/main.go:337 #, c-format msgid "Only %d%% is available on the external storage device" msgstr "Einungis %d%% eru tiltæk á ytra geymslutæki" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:12 msgid "Unmounting" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:17 #: share/ciborium/qml/components/FormatConfirmation.qml:22 msgid "Ok" msgstr "Í lagi" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:30 #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:46 msgid "You can now safely remove the device" msgstr "Þú getur núna fjarlægt tækið örugglega" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:38 msgid "Unmount Error" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:39 msgid "The device could not be unmounted because is busy" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:45 msgid "Safe to remove" msgstr "Öruggt að fjarlægja" #: share/ciborium/qml/components/DriveDelegate.qml:45 #: share/ciborium/qml/components/FormatDialog.qml:11 msgid "Format" msgstr "Forsníða" #: share/ciborium/qml/components/DriveDelegate.qml:59 msgid "Safely Remove" msgstr "Fjarlægja á öruggan hátt" #: share/ciborium/qml/components/FormatConfirmation.qml:11 msgid "Formatting" msgstr "Forsníðing" #: share/ciborium/qml/components/FormatConfirmation.qml:31 msgid "There was an error when formatting the device" msgstr "" #: share/ciborium/qml/components/FormatDialog.qml:12 msgid "This action will wipe the content from the device" msgstr "Þessi aðgerð mun hreinsa öll gögn af tækinu" #: share/ciborium/qml/components/FormatDialog.qml:15 #: share/ciborium/qml/components/SafeRemoval.qml:17 msgid "Cancel" msgstr "Hætta við" #: share/ciborium/qml/components/FormatDialog.qml:19 msgid "Continue with format" msgstr "Halda áfram með forsníðingu" #: share/ciborium/qml/components/SafeRemoval.qml:13 msgid "Confirm remove" msgstr "Staðfesta fjarlægingu" #: share/ciborium/qml/components/SafeRemoval.qml:14 msgid "Files on the device can't be accessed after removing" msgstr "Skrár á tækinu verða ekki aðgengilegar eftir að það er fjarlægt" #: share/ciborium/qml/components/SafeRemoval.qml:22 msgid "Continue" msgstr "Halda áfram" #: share/ciborium/qml/main.qml:34 msgid "SD Card Management" msgstr "Meðhöndlun SD-minniskorta" #: share/applications/ciborium.desktop.tr.h:1 msgid "External Drives" msgstr "Utanáliggjandi drif" ciborium-0.2.12+15.10.20150612/po/en_GB.po0000644000015300001610000001247112536576712017706 0ustar pbuserpbgroup00000000000000# English (United Kingdom) translation for ciborium # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the ciborium package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: ciborium\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-03-24 16:11-0300\n" "PO-Revision-Date: 2015-04-08 16:45+0000\n" "Last-Translator: Andi Chandler \n" "Language-Team: English (United Kingdom) \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2015-04-09 05:45+0000\n" "X-Generator: Launchpad (build 17413)\n" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. success when addding a storage device. #: cmd/ciborium/main.go:119 msgid "Storage device detected" msgstr "Storage device detected" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. being scanned when addding a storage device. #: cmd/ciborium/main.go:122 msgid "This device will be scanned for new content" msgstr "This device will be scanned for new content" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. failure when adding a storage device. #: cmd/ciborium/main.go:128 msgid "Failed to add storage device" msgstr "Failed to add storage device" #. TRANSLATORS: This is the body of a notification bubble with a short message with hints #. with regards to the failure when adding a storage device. #: cmd/ciborium/main.go:131 msgid "Make sure the storage device is correctly formated" msgstr "Make sure the storage device is correctly formated" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. a storage device being removed #: cmd/ciborium/main.go:137 msgid "Storage device has been removed" msgstr "Storage device has been removed" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. from the removed device no longer being available #: cmd/ciborium/main.go:140 msgid "" "Content previously available on this device will no longer be accessible" msgstr "" "Content previously available on this device will no longer be accessible" #. TRANSLATORS: This is the summary of a notification bubble with a short message warning on #. low space #: cmd/ciborium/main.go:229 msgid "Low on disk space" msgstr "Low on disk space" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on internal #. storage #: cmd/ciborium/main.go:233 #, c-format msgid "Only %d%% is available on the internal storage device" msgstr "Only %d%% is available on the internal storage device" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on a given #. external storage device #: cmd/ciborium/main.go:237 #, c-format msgid "Only %d%% is available on the external storage device" msgstr "Only %d%% is available on the external storage device" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:12 msgid "Unmounting" msgstr "Unmounting" #: share/ciborium/qml/components/SafeRemoval.qml:21 msgid "Ok" msgstr "Ok" #: share/ciborium/qml/components/SafeRemoval.qml:18 msgid "You can now safely remove the device" msgstr "You can now safely remove the device" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:38 msgid "Unmount Error" msgstr "Unmount Error" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:39 msgid "The device could not be unmounted because is busy" msgstr "The device could not be unmounted because is busy" #: share/ciborium/qml/components/SafeRemoval.qml:17 msgid "Safe to remove" msgstr "Safe to remove" #: share/ciborium/qml/components/FormatDialog.qml:17 #: share/ciborium/qml/components/FormatDialog.qml:59 msgid "Format" msgstr "Format" #: share/ciborium/qml/components/SafeRemoval.qml:59 msgid "Safely Remove" msgstr "Safely Remove" #: share/ciborium/qml/components/FormatDialog.qml:42 msgid "Formatting" msgstr "Formatting" #: share/ciborium/qml/components/FormatConfirmation.qml:31 msgid "There was an error when formatting the device" msgstr "There was an error when formatting the device" #: share/ciborium/qml/components/FormatDialog.qml:18 msgid "This action will wipe the content from the device" msgstr "This action will wipe the content from the device" #: share/ciborium/qml/components/SafeRemoval.qml:40 #: share/ciborium/qml/components/FormatDialog.qml:21 msgid "Cancel" msgstr "Cancel" #: share/ciborium/qml/components/FormatDialog.qml:25 msgid "Continue with format" msgstr "Continue with format" #: share/ciborium/qml/components/SafeRemoval.qml:36 msgid "Confirm remove" msgstr "Confirm remove" #: share/ciborium/qml/components/SafeRemoval.qml:37 msgid "Files on the device can't be accessed after removing" msgstr "Files on the device can't be accessed after removing" #: share/ciborium/qml/components/SafeRemoval.qml:44 msgid "Continue" msgstr "Continue" #: share/ciborium/qml/main.qml:33 msgid "SD Card Management" msgstr "SD Card Management" #: share/applications/ciborium.desktop.tr.h:1 msgid "External Drives" msgstr "External Drives" ciborium-0.2.12+15.10.20150612/po/zh_TW.po0000644000015300001610000001243012536576712017762 0ustar pbuserpbgroup00000000000000# Chinese (Traditional) translation for ciborium # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the ciborium package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: ciborium\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-03-24 16:11-0300\n" "PO-Revision-Date: 2015-03-01 09:35+0000\n" "Last-Translator: Cheng-Chia Tseng \n" "Language-Team: Chinese (Traditional) \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2015-03-25 06:07+0000\n" "X-Generator: Launchpad (build 17413)\n" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. success when addding a storage device. #: cmd/ciborium/main.go:123 msgid "Storage device detected" msgstr "偵測到儲存裝置" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. being scanned when addding a storage device. #: cmd/ciborium/main.go:126 msgid "This device will be scanned for new content" msgstr "將掃描此裝置是否有新內容" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. failure when adding a storage device. #: cmd/ciborium/main.go:132 msgid "Failed to add storage device" msgstr "儲存裝置加入失敗" #. TRANSLATORS: This is the body of a notification bubble with a short message with hints #. with regards to the failure when adding a storage device. #: cmd/ciborium/main.go:135 msgid "Make sure the storage device is correctly formated" msgstr "請確定此儲存裝置已正確格式化" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. a storage device being removed #: cmd/ciborium/main.go:141 msgid "Storage device has been removed" msgstr "儲存裝置已移除" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. from the removed device no longer being available #: cmd/ciborium/main.go:144 msgid "" "Content previously available on this device will no longer be accessible" msgstr "原先存在此裝置上的內容將再也無法使用" #. TRANSLATORS: This is the summary of a notification bubble with a short message warning on #. low space #: cmd/ciborium/main.go:329 msgid "Low on disk space" msgstr "儲存空間即將用盡" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on internal #. storage #: cmd/ciborium/main.go:333 #, c-format msgid "Only %d%% is available on the internal storage device" msgstr "內部儲存空間只剩下 %d%% 可用" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on a given #. external storage device #: cmd/ciborium/main.go:337 #, c-format msgid "Only %d%% is available on the external storage device" msgstr "外部儲存空間只剩下 %d%% 可用" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:12 msgid "Unmounting" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:17 #: share/ciborium/qml/components/FormatConfirmation.qml:22 msgid "Ok" msgstr "確定" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:30 #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:46 msgid "You can now safely remove the device" msgstr "您現在可以安全移除該裝置" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:38 msgid "Unmount Error" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:39 msgid "The device could not be unmounted because is busy" msgstr "" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:45 msgid "Safe to remove" msgstr "安全移除" #: share/ciborium/qml/components/DriveDelegate.qml:45 #: share/ciborium/qml/components/FormatDialog.qml:11 msgid "Format" msgstr "格式化" #: share/ciborium/qml/components/DriveDelegate.qml:59 msgid "Safely Remove" msgstr "安全移除" #: share/ciborium/qml/components/FormatConfirmation.qml:11 msgid "Formatting" msgstr "格式化中" #: share/ciborium/qml/components/FormatConfirmation.qml:31 msgid "There was an error when formatting the device" msgstr "" #: share/ciborium/qml/components/FormatDialog.qml:12 msgid "This action will wipe the content from the device" msgstr "此動作將會抹除裝置上的內容" #: share/ciborium/qml/components/FormatDialog.qml:15 #: share/ciborium/qml/components/SafeRemoval.qml:17 msgid "Cancel" msgstr "取消" #: share/ciborium/qml/components/FormatDialog.qml:19 msgid "Continue with format" msgstr "繼續格式化" #: share/ciborium/qml/components/SafeRemoval.qml:13 msgid "Confirm remove" msgstr "確認移除" #: share/ciborium/qml/components/SafeRemoval.qml:14 msgid "Files on the device can't be accessed after removing" msgstr "移除裝置後便無法存取裝置上的檔案" #: share/ciborium/qml/components/SafeRemoval.qml:22 msgid "Continue" msgstr "繼續" #: share/ciborium/qml/main.qml:34 msgid "SD Card Management" msgstr "SD 卡管理" #: share/applications/ciborium.desktop.tr.h:1 msgid "External Drives" msgstr "外部儲存裝置" ciborium-0.2.12+15.10.20150612/po/hu.po0000644000015300001610000001273612536576712017354 0ustar pbuserpbgroup00000000000000# Hungarian translation for ciborium # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the ciborium package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: ciborium\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-03-24 16:11-0300\n" "PO-Revision-Date: 2015-06-08 18:04+0000\n" "Last-Translator: Richard Somlói \n" "Language-Team: Hungarian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2015-06-09 05:44+0000\n" "X-Generator: Launchpad (build 17549)\n" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. success when addding a storage device. #: cmd/ciborium/main.go:119 msgid "Storage device detected" msgstr "Tárolóeszköz észlelve" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. being scanned when addding a storage device. #: cmd/ciborium/main.go:122 msgid "This device will be scanned for new content" msgstr "Az eszköz átvizsgálása új tartalmak után" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. failure when adding a storage device. #: cmd/ciborium/main.go:128 msgid "Failed to add storage device" msgstr "A tárolóeszköz hozzáadása sikertelen" #. TRANSLATORS: This is the body of a notification bubble with a short message with hints #. with regards to the failure when adding a storage device. #: cmd/ciborium/main.go:131 msgid "Make sure the storage device is correctly formated" msgstr "Győződjön meg róla, hogy az eszköz megfelelően van formázva" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. a storage device being removed #: cmd/ciborium/main.go:137 msgid "Storage device has been removed" msgstr "A tárolóeszköz eltávolítva" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. from the removed device no longer being available #: cmd/ciborium/main.go:140 msgid "" "Content previously available on this device will no longer be accessible" msgstr "" "Az eszközön előzőleg elérhető tartalom a továbbiakban nem lesz hozzáférhető" #. TRANSLATORS: This is the summary of a notification bubble with a short message warning on #. low space #: cmd/ciborium/main.go:229 msgid "Low on disk space" msgstr "Kevés a lemezterület" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on internal #. storage #: cmd/ciborium/main.go:233 #, c-format msgid "Only %d%% is available on the internal storage device" msgstr "Csak a belső tárolóeszköz %d%%-a áll rendelkezésre" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on a given #. external storage device #: cmd/ciborium/main.go:237 #, c-format msgid "Only %d%% is available on the external storage device" msgstr "Csak a külső tárolóeszköz %d%%-a áll rendelkezésre" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:12 msgid "Unmounting" msgstr "Leválasztás" #: share/ciborium/qml/components/SafeRemoval.qml:21 msgid "Ok" msgstr "Ok" #: share/ciborium/qml/components/SafeRemoval.qml:18 msgid "You can now safely remove the device" msgstr "Most már biztonságosan eltávolíthatja az eszközt" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:38 msgid "Unmount Error" msgstr "Leválasztási hiba" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:39 msgid "The device could not be unmounted because is busy" msgstr "Az eszközt nem lehet leválasztani, mert használatban van" #: share/ciborium/qml/components/SafeRemoval.qml:17 msgid "Safe to remove" msgstr "Biztonságos eltávolítása" #: share/ciborium/qml/components/FormatDialog.qml:17 #: share/ciborium/qml/components/FormatDialog.qml:59 msgid "Format" msgstr "Formázás" #: share/ciborium/qml/components/SafeRemoval.qml:59 msgid "Safely Remove" msgstr "Biztonságos eltávolítás" #: share/ciborium/qml/components/FormatDialog.qml:42 msgid "Formatting" msgstr "Formázás" #: share/ciborium/qml/components/FormatConfirmation.qml:31 msgid "There was an error when formatting the device" msgstr "Hiba lépett fel az eszköz formázása közben" #: share/ciborium/qml/components/FormatDialog.qml:18 msgid "This action will wipe the content from the device" msgstr "Ez a művelet töröl minden tartalmat az eszközről" #: share/ciborium/qml/components/SafeRemoval.qml:40 #: share/ciborium/qml/components/FormatDialog.qml:21 msgid "Cancel" msgstr "Mégse" #: share/ciborium/qml/components/FormatDialog.qml:25 msgid "Continue with format" msgstr "Formázás folytatása" #: share/ciborium/qml/components/SafeRemoval.qml:36 msgid "Confirm remove" msgstr "Eltávolítás megerősítése" #: share/ciborium/qml/components/SafeRemoval.qml:37 msgid "Files on the device can't be accessed after removing" msgstr "Eltávolítás után nem lehet hozzáférni az eszközön tárolt fájlokhoz" #: share/ciborium/qml/components/SafeRemoval.qml:44 msgid "Continue" msgstr "Folytatás" #: share/ciborium/qml/main.qml:33 msgid "SD Card Management" msgstr "SD kártya kezelése" #: share/applications/ciborium.desktop.tr.h:1 msgid "External Drives" msgstr "Külső meghajtók" ciborium-0.2.12+15.10.20150612/po/pt.po0000644000015300001610000001262012536576712017353 0ustar pbuserpbgroup00000000000000# Portuguese translation for ciborium # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the ciborium package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: ciborium\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-03-24 16:11-0300\n" "PO-Revision-Date: 2015-04-18 02:37+0000\n" "Last-Translator: António Miranda \n" "Language-Team: Portuguese \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2015-04-19 05:58+0000\n" "X-Generator: Launchpad (build 17430)\n" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. success when addding a storage device. #: cmd/ciborium/main.go:119 msgid "Storage device detected" msgstr "Cartão SD detetado" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. being scanned when addding a storage device. #: cmd/ciborium/main.go:122 msgid "This device will be scanned for new content" msgstr "Novo conteúdo será procurado neste equipamento" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. failure when adding a storage device. #: cmd/ciborium/main.go:128 msgid "Failed to add storage device" msgstr "Falha ao adicionar cartão SD" #. TRANSLATORS: This is the body of a notification bubble with a short message with hints #. with regards to the failure when adding a storage device. #: cmd/ciborium/main.go:131 msgid "Make sure the storage device is correctly formated" msgstr "Verifique se o cartão SD está corretamente formatado" #. TRANSLATORS: This is the summary of a notification bubble with a short message of #. a storage device being removed #: cmd/ciborium/main.go:137 msgid "Storage device has been removed" msgstr "Cartão SD foi removido" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. from the removed device no longer being available #: cmd/ciborium/main.go:140 msgid "" "Content previously available on this device will no longer be accessible" msgstr "" "O conteúdo anteriormente disponível neste dispositivo não será novamente " "acessível" #. TRANSLATORS: This is the summary of a notification bubble with a short message warning on #. low space #: cmd/ciborium/main.go:229 msgid "Low on disk space" msgstr "Pouco espaço em disco" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on internal #. storage #: cmd/ciborium/main.go:233 #, c-format msgid "Only %d%% is available on the internal storage device" msgstr "Apenas %d%% está disponível no armazenamento interno do dispositivo" #. TRANSLATORS: This is the body of a notification bubble with a short message about content #. reamining available space, %d is the remaining percentage of space available on a given #. external storage device #: cmd/ciborium/main.go:237 #, c-format msgid "Only %d%% is available on the external storage device" msgstr "Apenas %d%% está disponível no armazenamento externo do dispositivo" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:12 msgid "Unmounting" msgstr "A desmontar" #: share/ciborium/qml/components/SafeRemoval.qml:21 msgid "Ok" msgstr "Ok" #: share/ciborium/qml/components/SafeRemoval.qml:18 msgid "You can now safely remove the device" msgstr "Pode remover o dispositivo em segurança" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:38 msgid "Unmount Error" msgstr "Erro ao desmontar" #: share/ciborium/qml/components/SafeRemovalConfirmation.qml:39 msgid "The device could not be unmounted because is busy" msgstr "O dispositivo não pode ser desmontado por estar ocupado" #: share/ciborium/qml/components/SafeRemoval.qml:17 msgid "Safe to remove" msgstr "Seguro para remover" #: share/ciborium/qml/components/FormatDialog.qml:17 #: share/ciborium/qml/components/FormatDialog.qml:59 msgid "Format" msgstr "Formato" #: share/ciborium/qml/components/SafeRemoval.qml:59 msgid "Safely Remove" msgstr "Remover em segurança" #: share/ciborium/qml/components/FormatDialog.qml:42 msgid "Formatting" msgstr "A formatar" #: share/ciborium/qml/components/FormatConfirmation.qml:31 msgid "There was an error when formatting the device" msgstr "Ocorreu um erro durante a formatação do dispositivo" #: share/ciborium/qml/components/FormatDialog.qml:18 msgid "This action will wipe the content from the device" msgstr "Esta ação vai apagar o conteúdo do dispositivo" #: share/ciborium/qml/components/SafeRemoval.qml:40 #: share/ciborium/qml/components/FormatDialog.qml:21 msgid "Cancel" msgstr "Cancelar" #: share/ciborium/qml/components/FormatDialog.qml:25 msgid "Continue with format" msgstr "Continuar com o formato" #: share/ciborium/qml/components/SafeRemoval.qml:36 msgid "Confirm remove" msgstr "Confirmar remover" #: share/ciborium/qml/components/SafeRemoval.qml:37 msgid "Files on the device can't be accessed after removing" msgstr "Os ficheiros do dispositivo não podem ser acedidos após a remoção" #: share/ciborium/qml/components/SafeRemoval.qml:44 msgid "Continue" msgstr "Continuar" #: share/ciborium/qml/main.qml:33 msgid "SD Card Management" msgstr "Gestão do cartão SD" #: share/applications/ciborium.desktop.tr.h:1 msgid "External Drives" msgstr "Cartão SD" ciborium-0.2.12+15.10.20150612/qml.v1/0000755000015300001610000000000012536577044017066 5ustar pbuserpbgroup00000000000000ciborium-0.2.12+15.10.20150612/qml.v1/cpp/0000755000015300001610000000000012536577044017650 5ustar pbuserpbgroup00000000000000ciborium-0.2.12+15.10.20150612/qml.v1/cpp/connector.cpp0000644000015300001610000000250012536576717022351 0ustar pbuserpbgroup00000000000000#include #include "connector.h" #include "capi.h" Connector::~Connector() { hookSignalDisconnect(func); } void Connector::invoke() { panicf("should never get called"); } int Connector::qt_metacall(QMetaObject::Call c, int idx, void **a) { if (c == QMetaObject::InvokeMetaMethod && idx == metaObject()->methodOffset()) { DataValue args[MaxParams]; QObject *plain = NULL; for (int i = 0; i < argsLen; i++) { int paramType = method.parameterType(i); if (paramType == 0 && a[1 + i] != NULL) { const char *typeName = method.parameterTypes()[i].constData(); void *addr = a[1 + i]; if (typeName[strlen(typeName)-1] == '*') { addr = *(void **)addr; } plain = new PlainObject(typeName, addr, plain); QVariant var = QVariant::fromValue((QObject *)plain); packDataValue(&var, &args[i]); } else { QVariant var(method.parameterType(i), a[1 + i]); packDataValue(&var, &args[i]); } } hookSignalCall(engine, func, args); if (plain != NULL) { delete plain; } return -1; } return standard_qt_metacall(c, idx, a); } // vim:ts=4:sw=4:et ciborium-0.2.12+15.10.20150612/qml.v1/cpp/moc_govalue.cpp0000644000015300001610000001041112536576717022657 0ustar pbuserpbgroup00000000000000/**************************************************************************** ** Meta object code from reading C++ file 'govalue.h' ** ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.2.1) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ #include "govalue.h" #include #include #if !defined(Q_MOC_OUTPUT_REVISION) #error "The header file 'govalue.h' doesn't include ." #elif Q_MOC_OUTPUT_REVISION != 67 #error "This file was generated using the moc from 5.2.1. It" #error "cannot be used with the include files from this version of Qt." #error "(The moc has changed too much.)" #endif QT_BEGIN_MOC_NAMESPACE struct qt_meta_stringdata_GoValue_t { QByteArrayData data[1]; char stringdata[9]; }; #define QT_MOC_LITERAL(idx, ofs, len) \ Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \ offsetof(qt_meta_stringdata_GoValue_t, stringdata) + ofs \ - idx * sizeof(QByteArrayData) \ ) static const qt_meta_stringdata_GoValue_t qt_meta_stringdata_GoValue = { { QT_MOC_LITERAL(0, 0, 7) }, "GoValue\0" }; #undef QT_MOC_LITERAL static const uint qt_meta_data_GoValue[] = { // content: 7, // revision 0, // classname 0, 0, // classinfo 0, 0, // methods 0, 0, // properties 0, 0, // enums/sets 0, 0, // constructors 0, // flags 0, // signalCount 0 // eod }; void GoValue::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) { Q_UNUSED(_o); Q_UNUSED(_id); Q_UNUSED(_c); Q_UNUSED(_a); } const QMetaObject GoValue::staticMetaObject = { { &QObject::staticMetaObject, qt_meta_stringdata_GoValue.data, qt_meta_data_GoValue, qt_static_metacall, 0, 0} }; const QMetaObject *GoValue::metaObject() const { return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject; } void *GoValue::qt_metacast(const char *_clname) { if (!_clname) return 0; if (!strcmp(_clname, qt_meta_stringdata_GoValue.stringdata)) return static_cast(const_cast< GoValue*>(this)); return QObject::qt_metacast(_clname); } int GoValue::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QObject::qt_metacall(_c, _id, _a); if (_id < 0) return _id; return _id; } struct qt_meta_stringdata_GoPaintedValue_t { QByteArrayData data[1]; char stringdata[16]; }; #define QT_MOC_LITERAL(idx, ofs, len) \ Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \ offsetof(qt_meta_stringdata_GoPaintedValue_t, stringdata) + ofs \ - idx * sizeof(QByteArrayData) \ ) static const qt_meta_stringdata_GoPaintedValue_t qt_meta_stringdata_GoPaintedValue = { { QT_MOC_LITERAL(0, 0, 14) }, "GoPaintedValue\0" }; #undef QT_MOC_LITERAL static const uint qt_meta_data_GoPaintedValue[] = { // content: 7, // revision 0, // classname 0, 0, // classinfo 0, 0, // methods 0, 0, // properties 0, 0, // enums/sets 0, 0, // constructors 0, // flags 0, // signalCount 0 // eod }; void GoPaintedValue::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) { Q_UNUSED(_o); Q_UNUSED(_id); Q_UNUSED(_c); Q_UNUSED(_a); } const QMetaObject GoPaintedValue::staticMetaObject = { { &QQuickPaintedItem::staticMetaObject, qt_meta_stringdata_GoPaintedValue.data, qt_meta_data_GoPaintedValue, qt_static_metacall, 0, 0} }; const QMetaObject *GoPaintedValue::metaObject() const { return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject; } void *GoPaintedValue::qt_metacast(const char *_clname) { if (!_clname) return 0; if (!strcmp(_clname, qt_meta_stringdata_GoPaintedValue.stringdata)) return static_cast(const_cast< GoPaintedValue*>(this)); return QQuickPaintedItem::qt_metacast(_clname); } int GoPaintedValue::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QQuickPaintedItem::qt_metacall(_c, _id, _a); if (_id < 0) return _id; return _id; } QT_END_MOC_NAMESPACE ciborium-0.2.12+15.10.20150612/qml.v1/cpp/connector.h0000644000015300001610000000230512536576717022021 0ustar pbuserpbgroup00000000000000#ifndef CONNECTOR_H #define CONNECTOR_H #include #include class Connector : public QObject { Q_OBJECT public: Connector(QObject *sender, QMetaMethod method, QQmlEngine *engine, void *func, int argsLen) : QObject(sender), engine(engine), method(method), func(func), argsLen(argsLen) {}; virtual ~Connector(); // MOC HACK: s/Connector::qt_metacall/Connector::standard_qt_metacall/ int standard_qt_metacall(QMetaObject::Call c, int idx, void **a); public slots: void invoke(); private: QQmlEngine *engine; QMetaMethod method; void *func; int argsLen; }; class PlainObject : public QObject { Q_OBJECT Q_PROPERTY(QString plainType READ getPlainType) Q_PROPERTY(void *plainAddr READ getPlainAddr) QString plainType; void *plainAddr; public: PlainObject(QObject *parent = 0) : QObject(parent) {}; PlainObject(const char *plainType, void *plainAddr, QObject *parent = 0) : QObject(parent), plainType(plainType), plainAddr(plainAddr) {}; QString getPlainType() { return plainType; }; void *getPlainAddr() { return plainAddr; }; }; #endif // CONNECTOR_H // vim:ts=4:sw=4:et ciborium-0.2.12+15.10.20150612/qml.v1/cpp/govaluetype.cpp0000644000015300001610000002130312536576717022725 0ustar pbuserpbgroup00000000000000#include "govaluetype.h" #define DEFINE_GOVALUETYPE(N) \ template<> QMetaObject GoValueType::staticMetaObject = QMetaObject(); \ template<> GoTypeInfo *GoValueType::typeInfo = 0; \ template<> GoTypeSpec_ *GoValueType::typeSpec = 0; #define DEFINE_GOPAINTEDVALUETYPE(N) \ template<> QMetaObject GoPaintedValueType::staticMetaObject = QMetaObject(); \ template<> GoTypeInfo *GoPaintedValueType::typeInfo = 0; \ template<> GoTypeSpec_ *GoPaintedValueType::typeSpec = 0; DEFINE_GOVALUETYPE(1) DEFINE_GOVALUETYPE(2) DEFINE_GOVALUETYPE(3) DEFINE_GOVALUETYPE(4) DEFINE_GOVALUETYPE(5) DEFINE_GOVALUETYPE(6) DEFINE_GOVALUETYPE(7) DEFINE_GOVALUETYPE(8) DEFINE_GOVALUETYPE(9) DEFINE_GOVALUETYPE(10) DEFINE_GOVALUETYPE(11) DEFINE_GOVALUETYPE(12) DEFINE_GOVALUETYPE(13) DEFINE_GOVALUETYPE(14) DEFINE_GOVALUETYPE(15) DEFINE_GOVALUETYPE(16) DEFINE_GOVALUETYPE(17) DEFINE_GOVALUETYPE(18) DEFINE_GOVALUETYPE(19) DEFINE_GOVALUETYPE(20) DEFINE_GOVALUETYPE(21) DEFINE_GOVALUETYPE(22) DEFINE_GOVALUETYPE(23) DEFINE_GOVALUETYPE(24) DEFINE_GOVALUETYPE(25) DEFINE_GOVALUETYPE(26) DEFINE_GOVALUETYPE(27) DEFINE_GOVALUETYPE(28) DEFINE_GOVALUETYPE(29) DEFINE_GOVALUETYPE(30) DEFINE_GOPAINTEDVALUETYPE(1) DEFINE_GOPAINTEDVALUETYPE(2) DEFINE_GOPAINTEDVALUETYPE(3) DEFINE_GOPAINTEDVALUETYPE(4) DEFINE_GOPAINTEDVALUETYPE(5) DEFINE_GOPAINTEDVALUETYPE(6) DEFINE_GOPAINTEDVALUETYPE(7) DEFINE_GOPAINTEDVALUETYPE(8) DEFINE_GOPAINTEDVALUETYPE(9) DEFINE_GOPAINTEDVALUETYPE(10) DEFINE_GOPAINTEDVALUETYPE(11) DEFINE_GOPAINTEDVALUETYPE(12) DEFINE_GOPAINTEDVALUETYPE(13) DEFINE_GOPAINTEDVALUETYPE(14) DEFINE_GOPAINTEDVALUETYPE(15) DEFINE_GOPAINTEDVALUETYPE(16) DEFINE_GOPAINTEDVALUETYPE(17) DEFINE_GOPAINTEDVALUETYPE(18) DEFINE_GOPAINTEDVALUETYPE(19) DEFINE_GOPAINTEDVALUETYPE(20) DEFINE_GOPAINTEDVALUETYPE(21) DEFINE_GOPAINTEDVALUETYPE(22) DEFINE_GOPAINTEDVALUETYPE(23) DEFINE_GOPAINTEDVALUETYPE(24) DEFINE_GOPAINTEDVALUETYPE(25) DEFINE_GOPAINTEDVALUETYPE(26) DEFINE_GOPAINTEDVALUETYPE(27) DEFINE_GOPAINTEDVALUETYPE(28) DEFINE_GOPAINTEDVALUETYPE(29) DEFINE_GOPAINTEDVALUETYPE(30) static int goValueTypeN = 0; static int goPaintedValueTypeN = 0; template int registerSingletonN(char *location, int major, int minor, char *name, GoTypeInfo *info, GoTypeSpec_ *spec) { GoValueType::init(info, spec); return qmlRegisterSingletonType< GoValueType >(location, major, minor, name, [](QQmlEngine *qmlEngine, QJSEngine *jsEngine) -> QObject* { QObject *singleton = new GoValueType(); QQmlEngine::setContextForObject(singleton, qmlEngine->rootContext()); return singleton; }); } template int registerPaintedSingletonN(char *location, int major, int minor, char *name, GoTypeInfo *info, GoTypeSpec_ *spec) { GoPaintedValueType::init(info, spec); return qmlRegisterSingletonType< GoPaintedValueType >(location, major, minor, name, [](QQmlEngine *qmlEngine, QJSEngine *jsEngine) -> QObject* { QObject *singleton = new GoPaintedValueType(); QQmlEngine::setContextForObject(singleton, qmlEngine->rootContext()); return singleton; }); } #define GOVALUETYPE_CASE_SINGLETON(N) \ case N: return registerSingletonN(location, major, minor, name, info, spec); #define GOPAINTEDVALUETYPE_CASE_SINGLETON(N) \ case N: return registerPaintedSingletonN(location, major, minor, name, info, spec); int registerSingleton(char *location, int major, int minor, char *name, GoTypeInfo *info, GoTypeSpec_ *spec) { if (!info->paint) { switch (++goValueTypeN) { GOVALUETYPE_CASE_SINGLETON(1) GOVALUETYPE_CASE_SINGLETON(2) GOVALUETYPE_CASE_SINGLETON(3) GOVALUETYPE_CASE_SINGLETON(4) GOVALUETYPE_CASE_SINGLETON(5) GOVALUETYPE_CASE_SINGLETON(6) GOVALUETYPE_CASE_SINGLETON(7) GOVALUETYPE_CASE_SINGLETON(8) GOVALUETYPE_CASE_SINGLETON(9) GOVALUETYPE_CASE_SINGLETON(10) GOVALUETYPE_CASE_SINGLETON(11) GOVALUETYPE_CASE_SINGLETON(12) GOVALUETYPE_CASE_SINGLETON(13) GOVALUETYPE_CASE_SINGLETON(14) GOVALUETYPE_CASE_SINGLETON(15) GOVALUETYPE_CASE_SINGLETON(16) GOVALUETYPE_CASE_SINGLETON(17) GOVALUETYPE_CASE_SINGLETON(18) GOVALUETYPE_CASE_SINGLETON(19) GOVALUETYPE_CASE_SINGLETON(20) GOVALUETYPE_CASE_SINGLETON(21) GOVALUETYPE_CASE_SINGLETON(22) GOVALUETYPE_CASE_SINGLETON(23) GOVALUETYPE_CASE_SINGLETON(24) GOVALUETYPE_CASE_SINGLETON(25) GOVALUETYPE_CASE_SINGLETON(26) GOVALUETYPE_CASE_SINGLETON(27) GOVALUETYPE_CASE_SINGLETON(28) GOVALUETYPE_CASE_SINGLETON(29) GOVALUETYPE_CASE_SINGLETON(30) } } else { switch (++goPaintedValueTypeN) { GOPAINTEDVALUETYPE_CASE_SINGLETON(1) GOPAINTEDVALUETYPE_CASE_SINGLETON(2) GOPAINTEDVALUETYPE_CASE_SINGLETON(3) GOPAINTEDVALUETYPE_CASE_SINGLETON(4) GOPAINTEDVALUETYPE_CASE_SINGLETON(5) GOPAINTEDVALUETYPE_CASE_SINGLETON(6) GOPAINTEDVALUETYPE_CASE_SINGLETON(7) GOPAINTEDVALUETYPE_CASE_SINGLETON(8) GOPAINTEDVALUETYPE_CASE_SINGLETON(9) GOPAINTEDVALUETYPE_CASE_SINGLETON(10) GOPAINTEDVALUETYPE_CASE_SINGLETON(11) GOPAINTEDVALUETYPE_CASE_SINGLETON(12) GOPAINTEDVALUETYPE_CASE_SINGLETON(13) GOPAINTEDVALUETYPE_CASE_SINGLETON(14) GOPAINTEDVALUETYPE_CASE_SINGLETON(15) GOPAINTEDVALUETYPE_CASE_SINGLETON(16) GOPAINTEDVALUETYPE_CASE_SINGLETON(17) GOPAINTEDVALUETYPE_CASE_SINGLETON(18) GOPAINTEDVALUETYPE_CASE_SINGLETON(19) GOPAINTEDVALUETYPE_CASE_SINGLETON(20) GOPAINTEDVALUETYPE_CASE_SINGLETON(21) GOPAINTEDVALUETYPE_CASE_SINGLETON(22) GOPAINTEDVALUETYPE_CASE_SINGLETON(23) GOPAINTEDVALUETYPE_CASE_SINGLETON(24) GOPAINTEDVALUETYPE_CASE_SINGLETON(25) GOPAINTEDVALUETYPE_CASE_SINGLETON(26) GOPAINTEDVALUETYPE_CASE_SINGLETON(27) GOPAINTEDVALUETYPE_CASE_SINGLETON(28) GOPAINTEDVALUETYPE_CASE_SINGLETON(29) GOPAINTEDVALUETYPE_CASE_SINGLETON(30) } } panicf("too many registered types; please contact the Go QML developers"); return 0; } #define GOVALUETYPE_CASE(N) \ case N: GoValueType::init(info, spec); return qmlRegisterType< GoValueType >(location, major, minor, name); #define GOPAINTEDVALUETYPE_CASE(N) \ case N: GoPaintedValueType::init(info, spec); return qmlRegisterType< GoPaintedValueType >(location, major, minor, name); int registerType(char *location, int major, int minor, char *name, GoTypeInfo *info, GoTypeSpec_ *spec) { if (!info->paint) { switch (++goValueTypeN) { GOVALUETYPE_CASE(1) GOVALUETYPE_CASE(2) GOVALUETYPE_CASE(3) GOVALUETYPE_CASE(4) GOVALUETYPE_CASE(5) GOVALUETYPE_CASE(6) GOVALUETYPE_CASE(7) GOVALUETYPE_CASE(8) GOVALUETYPE_CASE(9) GOVALUETYPE_CASE(10) GOVALUETYPE_CASE(11) GOVALUETYPE_CASE(12) GOVALUETYPE_CASE(13) GOVALUETYPE_CASE(14) GOVALUETYPE_CASE(15) GOVALUETYPE_CASE(16) GOVALUETYPE_CASE(17) GOVALUETYPE_CASE(18) GOVALUETYPE_CASE(19) GOVALUETYPE_CASE(20) GOVALUETYPE_CASE(21) GOVALUETYPE_CASE(22) GOVALUETYPE_CASE(23) GOVALUETYPE_CASE(24) GOVALUETYPE_CASE(25) GOVALUETYPE_CASE(26) GOVALUETYPE_CASE(27) GOVALUETYPE_CASE(28) GOVALUETYPE_CASE(29) GOVALUETYPE_CASE(30) } } else { switch (++goPaintedValueTypeN) { GOPAINTEDVALUETYPE_CASE(1) GOPAINTEDVALUETYPE_CASE(2) GOPAINTEDVALUETYPE_CASE(3) GOPAINTEDVALUETYPE_CASE(4) GOPAINTEDVALUETYPE_CASE(5) GOPAINTEDVALUETYPE_CASE(6) GOPAINTEDVALUETYPE_CASE(7) GOPAINTEDVALUETYPE_CASE(8) GOPAINTEDVALUETYPE_CASE(9) GOPAINTEDVALUETYPE_CASE(10) GOPAINTEDVALUETYPE_CASE(11) GOPAINTEDVALUETYPE_CASE(12) GOPAINTEDVALUETYPE_CASE(13) GOPAINTEDVALUETYPE_CASE(14) GOPAINTEDVALUETYPE_CASE(15) GOPAINTEDVALUETYPE_CASE(16) GOPAINTEDVALUETYPE_CASE(17) GOPAINTEDVALUETYPE_CASE(18) GOPAINTEDVALUETYPE_CASE(19) GOPAINTEDVALUETYPE_CASE(20) GOPAINTEDVALUETYPE_CASE(21) GOPAINTEDVALUETYPE_CASE(22) GOPAINTEDVALUETYPE_CASE(23) GOPAINTEDVALUETYPE_CASE(24) GOPAINTEDVALUETYPE_CASE(25) GOPAINTEDVALUETYPE_CASE(26) GOPAINTEDVALUETYPE_CASE(27) GOPAINTEDVALUETYPE_CASE(28) GOPAINTEDVALUETYPE_CASE(29) GOPAINTEDVALUETYPE_CASE(30) } } panicf("too many registered types; please contact the Go QML developers"); return 0; } // vim:sw=4:st=4:et:ft=cpp ciborium-0.2.12+15.10.20150612/qml.v1/cpp/govalue.cpp0000644000015300001610000002000612536576717022022 0ustar pbuserpbgroup00000000000000#include #include #include #include #include #include #include "govalue.h" #include "capi.h" class GoValueMetaObject : public QAbstractDynamicMetaObject { public: GoValueMetaObject(QObject* value, GoAddr *addr, GoTypeInfo *typeInfo); void activatePropIndex(int propIndex); protected: int metaCall(QMetaObject::Call c, int id, void **a); private: QObject *value; GoAddr *addr; GoTypeInfo *typeInfo; }; GoValueMetaObject::GoValueMetaObject(QObject *value, GoAddr *addr, GoTypeInfo *typeInfo) : value(value), addr(addr), typeInfo(typeInfo) { //d->parent = static_cast(priv->metaObject); *static_cast(this) = *metaObjectFor(typeInfo); QObjectPrivate *objPriv = QObjectPrivate::get(value); objPriv->metaObject = this; } int GoValueMetaObject::metaCall(QMetaObject::Call c, int idx, void **a) { //qWarning() << "GoValueMetaObject::metaCall" << c << idx; switch (c) { case QMetaObject::ReadProperty: case QMetaObject::WriteProperty: { // TODO Cache propertyOffset, methodOffset (and maybe qmlEngine) int propOffset = propertyOffset(); if (idx < propOffset) { return value->qt_metacall(c, idx, a); } GoMemberInfo *memberInfo = typeInfo->fields; for (int i = 0; i < typeInfo->fieldsLen; i++) { if (memberInfo->metaIndex == idx) { if (c == QMetaObject::ReadProperty) { DataValue result; hookGoValueReadField(qmlEngine(value), addr, memberInfo->reflectIndex, memberInfo->reflectGetIndex, memberInfo->reflectSetIndex, &result); if (memberInfo->memberType == DTListProperty) { if (result.dataType != DTListProperty) { panicf("reading DTListProperty field returned non-DTListProperty result"); } QQmlListProperty *in = *reinterpret_cast **>(result.data); QQmlListProperty *out = reinterpret_cast *>(a[0]); *out = *in; // TODO Could provide a single variable in the stack to ReadField instead. delete in; } else { QVariant *out = reinterpret_cast(a[0]); unpackDataValue(&result, out); } } else { DataValue assign; QVariant *in = reinterpret_cast(a[0]); packDataValue(in, &assign); hookGoValueWriteField(qmlEngine(value), addr, memberInfo->reflectIndex, memberInfo->reflectSetIndex, &assign); activate(value, methodOffset() + (idx - propOffset), 0); } return -1; } memberInfo++; } QMetaProperty prop = property(idx); qWarning() << "Property" << prop.name() << "not found!?"; break; } case QMetaObject::InvokeMetaMethod: { if (idx < methodOffset()) { return value->qt_metacall(c, idx, a); } GoMemberInfo *memberInfo = typeInfo->methods; for (int i = 0; i < typeInfo->methodsLen; i++) { if (memberInfo->metaIndex == idx) { // args[0] is the result if any. DataValue args[1 + MaxParams]; for (int i = 1; i < memberInfo->numIn+1; i++) { packDataValue(reinterpret_cast(a[i]), &args[i]); } hookGoValueCallMethod(qmlEngine(value), addr, memberInfo->reflectIndex, args); if (memberInfo->numOut > 0) { unpackDataValue(&args[0], reinterpret_cast(a[0])); } return -1; } memberInfo++; } QMetaMethod m = method(idx); qWarning() << "Method" << m.name() << "not found!?"; break; } default: break; // Unhandled. } return -1; } void GoValueMetaObject::activatePropIndex(int propIndex) { // Properties are added first, so the first fieldLen methods are in // fact the signals of the respective properties. int relativeIndex = propIndex - propertyOffset(); activate(value, methodOffset() + relativeIndex, 0); } GoValue::GoValue(GoAddr *addr, GoTypeInfo *typeInfo, QObject *parent) : addr(addr), typeInfo(typeInfo) { valueMeta = new GoValueMetaObject(this, addr, typeInfo); setParent(parent); } GoValue::~GoValue() { hookGoValueDestroyed(qmlEngine(this), addr); } void GoValue::activate(int propIndex) { valueMeta->activatePropIndex(propIndex); } GoPaintedValue::GoPaintedValue(GoAddr *addr, GoTypeInfo *typeInfo, QObject *parent) : addr(addr), typeInfo(typeInfo) { valueMeta = new GoValueMetaObject(this, addr, typeInfo); setParent(parent); QQuickItem::setFlag(QQuickItem::ItemHasContents, true); QQuickPaintedItem::setRenderTarget(QQuickPaintedItem::FramebufferObject); } GoPaintedValue::~GoPaintedValue() { hookGoValueDestroyed(qmlEngine(this), addr); } void GoPaintedValue::activate(int propIndex) { valueMeta->activatePropIndex(propIndex); } void GoPaintedValue::paint(QPainter *painter) { painter->beginNativePainting(); hookGoValuePaint(qmlEngine(this), addr, typeInfo->paint->reflectIndex); painter->endNativePainting(); } QMetaObject *metaObjectFor(GoTypeInfo *typeInfo) { if (typeInfo->metaObject) { return reinterpret_cast(typeInfo->metaObject); } QMetaObjectBuilder mob; if (typeInfo->paint) { mob.setSuperClass(&QQuickPaintedItem::staticMetaObject); } else { mob.setSuperClass(&QObject::staticMetaObject); } mob.setClassName(typeInfo->typeName); mob.setFlags(QMetaObjectBuilder::DynamicMetaObject); GoMemberInfo *memberInfo; memberInfo = typeInfo->fields; int relativePropIndex = mob.propertyCount(); for (int i = 0; i < typeInfo->fieldsLen; i++) { mob.addSignal("__" + QByteArray::number(relativePropIndex) + "()"); const char *typeName = "QVariant"; if (memberInfo->memberType == DTListProperty) { typeName = "QQmlListProperty"; } QMetaPropertyBuilder propb = mob.addProperty(memberInfo->memberName, typeName, relativePropIndex); propb.setWritable(true); memberInfo->metaIndex = relativePropIndex; memberInfo++; relativePropIndex++; } memberInfo = typeInfo->methods; int relativeMethodIndex = mob.methodCount(); for (int i = 0; i < typeInfo->methodsLen; i++) { if (*memberInfo->resultSignature) { mob.addMethod(memberInfo->methodSignature, memberInfo->resultSignature); } else { mob.addMethod(memberInfo->methodSignature); } memberInfo->metaIndex = relativeMethodIndex; memberInfo++; relativeMethodIndex++; } // TODO Support default properties. //mob.addClassInfo("DefaultProperty", "objects"); QMetaObject *mo = mob.toMetaObject(); // Turn the relative indexes into absolute indexes. memberInfo = typeInfo->fields; int propOffset = mo->propertyOffset(); for (int i = 0; i < typeInfo->fieldsLen; i++) { memberInfo->metaIndex += propOffset; memberInfo++; } memberInfo = typeInfo->methods; int methodOffset = mo->methodOffset(); for (int i = 0; i < typeInfo->methodsLen; i++) { memberInfo->metaIndex += methodOffset; memberInfo++; } typeInfo->metaObject = mo; return mo; } // vim:ts=4:sw=4:et:ft=cpp ciborium-0.2.12+15.10.20150612/qml.v1/cpp/idletimer.cpp0000644000015300001610000000165212536576717022344 0ustar pbuserpbgroup00000000000000#include #include #include #include #include "capi.h" class IdleTimer : public QObject { Q_OBJECT public: static IdleTimer *singleton() { static IdleTimer singleton; return &singleton; } void init(int32_t *guiIdleRun) { this->guiIdleRun = guiIdleRun; } Q_INVOKABLE void start() { timer.start(0, this); } protected: void timerEvent(QTimerEvent *event) { __sync_synchronize(); if (*guiIdleRun > 0) { hookIdleTimer(); } else { timer.stop(); } } private: int32_t *guiIdleRun; QBasicTimer timer; }; void idleTimerInit(int32_t *guiIdleRun) { IdleTimer::singleton()->init(guiIdleRun); } void idleTimerStart() { QMetaObject::invokeMethod(IdleTimer::singleton(), "start", Qt::QueuedConnection); } // vim:ts=4:sw=4:et:ft=cpp ciborium-0.2.12+15.10.20150612/qml.v1/cpp/private/0000755000015300001610000000000012536577044021322 5ustar pbuserpbgroup00000000000000ciborium-0.2.12+15.10.20150612/qml.v1/cpp/private/qobject_p.h0000644000015300001610000000011512536576717023444 0ustar pbuserpbgroup00000000000000#include "private/qtheader.h" #include QT_PRIVATE_HEADER(QtCore,qobject_p.h) ciborium-0.2.12+15.10.20150612/qml.v1/cpp/private/qtheader.h0000644000015300001610000000257612536576717023310 0ustar pbuserpbgroup00000000000000#ifndef QTPRIVATE_H #define QTPRIVATE_H #include #define QT_MAJOR_ (QT_VERSION>>16) #define QT_MINOR_ (QT_VERSION>>8&0xFF) #define QT_MICRO_ (QT_VERSION&0xFF) #if QT_MAJOR_ == 5 #define QT_MAJOR 5 #else #error Unupported Qt major version. Please report. #endif #if QT_MINOR_ == 0 #define QT_MINOR 0 #elif QT_MINOR_ == 1 #define QT_MINOR 1 #elif QT_MINOR_ == 2 #define QT_MINOR 2 #elif QT_MINOR_ == 3 #define QT_MINOR 3 #elif QT_MINOR_ == 4 #define QT_MINOR 4 #elif QT_MINOR_ == 5 #define QT_MINOR 5 #elif QT_MINOR_ == 6 #define QT_MINOR 6 #elif QT_MINOR_ == 7 #define QT_MINOR 7 #elif QT_MINOR_ == 8 #define QT_MINOR 8 #elif QT_MINOR_ == 9 #define QT_MINOR 9 #elif QT_MINOR_ == 10 #define QT_MINOR 10 #else #error Unupported Qt minor version. Please report. #endif #if QT_MICRO_ == 0 #define QT_MICRO 0 #elif QT_MICRO_ == 1 #define QT_MICRO 1 #elif QT_MICRO_ == 2 #define QT_MICRO 2 #elif QT_MICRO_ == 3 #define QT_MICRO 3 #elif QT_MICRO_ == 4 #define QT_MICRO 4 #elif QT_MICRO_ == 5 #define QT_MICRO 5 #elif QT_MICRO_ == 6 #define QT_MICRO 6 #elif QT_MICRO_ == 7 #define QT_MICRO 7 #elif QT_MICRO_ == 8 #define QT_MICRO 8 #elif QT_MICRO_ == 9 #define QT_MICRO 9 #elif QT_MICRO_ == 10 #define QT_MICRO 10 #else #error Unupported Qt micro version. Please report. #endif #define QT_PRIVATE_HEADER(dir,file) #endif // QTPRIVATE_H ciborium-0.2.12+15.10.20150612/qml.v1/cpp/private/qmetaobjectbuilder_p.h0000644000015300001610000000013012536576717025657 0ustar pbuserpbgroup00000000000000#include "private/qtheader.h" #include QT_PRIVATE_HEADER(QtCore,qmetaobjectbuilder_p.h) ciborium-0.2.12+15.10.20150612/qml.v1/cpp/private/qmetaobject_p.h0000644000015300001610000000012112536576717024310 0ustar pbuserpbgroup00000000000000#include "private/qtheader.h" #include QT_PRIVATE_HEADER(QtCore,qmetaobject_p.h) ciborium-0.2.12+15.10.20150612/qml.v1/cpp/moc_idletimer.cpp0000644000015300001610000000611612536576717023202 0ustar pbuserpbgroup00000000000000/**************************************************************************** ** Meta object code from reading C++ file 'idletimer.cpp' ** ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.2.1) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ #include #include #if !defined(Q_MOC_OUTPUT_REVISION) #error "The header file 'idletimer.cpp' doesn't include ." #elif Q_MOC_OUTPUT_REVISION != 67 #error "This file was generated using the moc from 5.2.1. It" #error "cannot be used with the include files from this version of Qt." #error "(The moc has changed too much.)" #endif QT_BEGIN_MOC_NAMESPACE struct qt_meta_stringdata_IdleTimer_t { QByteArrayData data[3]; char stringdata[18]; }; #define QT_MOC_LITERAL(idx, ofs, len) \ Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \ offsetof(qt_meta_stringdata_IdleTimer_t, stringdata) + ofs \ - idx * sizeof(QByteArrayData) \ ) static const qt_meta_stringdata_IdleTimer_t qt_meta_stringdata_IdleTimer = { { QT_MOC_LITERAL(0, 0, 9), QT_MOC_LITERAL(1, 10, 5), QT_MOC_LITERAL(2, 16, 0) }, "IdleTimer\0start\0\0" }; #undef QT_MOC_LITERAL static const uint qt_meta_data_IdleTimer[] = { // content: 7, // revision 0, // classname 0, 0, // classinfo 1, 14, // methods 0, 0, // properties 0, 0, // enums/sets 0, 0, // constructors 0, // flags 0, // signalCount // methods: name, argc, parameters, tag, flags 1, 0, 19, 2, 0x02, // methods: parameters QMetaType::Void, 0 // eod }; void IdleTimer::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) { if (_c == QMetaObject::InvokeMetaMethod) { IdleTimer *_t = static_cast(_o); switch (_id) { case 0: _t->start(); break; default: ; } } Q_UNUSED(_a); } const QMetaObject IdleTimer::staticMetaObject = { { &QObject::staticMetaObject, qt_meta_stringdata_IdleTimer.data, qt_meta_data_IdleTimer, qt_static_metacall, 0, 0} }; const QMetaObject *IdleTimer::metaObject() const { return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject; } void *IdleTimer::qt_metacast(const char *_clname) { if (!_clname) return 0; if (!strcmp(_clname, qt_meta_stringdata_IdleTimer.stringdata)) return static_cast(const_cast< IdleTimer*>(this)); return QObject::qt_metacast(_clname); } int IdleTimer::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QObject::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { if (_id < 1) qt_static_metacall(this, _c, _id, _a); _id -= 1; } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) { if (_id < 1) *reinterpret_cast(_a[0]) = -1; _id -= 1; } return _id; } QT_END_MOC_NAMESPACE ciborium-0.2.12+15.10.20150612/qml.v1/cpp/capi.h0000644000015300001610000001623212536576717020747 0ustar pbuserpbgroup00000000000000#ifndef CAPI_H #define CAPI_H #include #include #ifdef __cplusplus extern "C" { #endif // It's surprising that MaximumParamCount is privately defined within qmetaobject.cpp. // Must fix the objectInvoke function if this is changed. // This is Qt's MaximuParamCount - 1, as it does not take the result value in account. enum { MaxParams = 10 }; typedef void QApplication_; typedef void QMetaObject_; typedef void QObject_; typedef void QVariant_; typedef void QVariantList_; typedef void QString_; typedef void QQmlEngine_; typedef void QQmlContext_; typedef void QQmlComponent_; typedef void QQmlListProperty_; typedef void QQuickWindow_; typedef void QQuickView_; typedef void QMessageLogContext_; typedef void QImage_; typedef void GoValue_; typedef void GoAddr; typedef void GoTypeSpec_; typedef char error; error *errorf(const char *format, ...); void panicf(const char *format, ...); typedef enum { DTUnknown = 0, // Has an unsupported type. DTInvalid = 1, // Does not exist or similar. DTString = 10, DTBool = 11, DTInt64 = 12, DTInt32 = 13, DTUint64 = 14, DTUint32 = 15, DTUintptr = 16, DTFloat64 = 17, DTFloat32 = 18, DTColor = 19, DTGoAddr = 100, DTObject = 101, DTValueMap = 102, DTValueList = 103, DTVariantList = 104, DTListProperty = 105, // Used in type information, not in an actual data value. DTAny = 201, // Can hold any of the above types. DTMethod = 202 } DataType; typedef struct { DataType dataType; char data[8]; int len; } DataValue; typedef struct { char *memberName; // points to memberNames DataType memberType; int reflectIndex; int reflectGetIndex; int reflectSetIndex; int metaIndex; int addrOffset; char *methodSignature; char *resultSignature; int numIn; int numOut; } GoMemberInfo; typedef struct { char *typeName; GoMemberInfo *fields; GoMemberInfo *methods; GoMemberInfo *members; // fields + methods GoMemberInfo *paint; // in methods too int fieldsLen; int methodsLen; int membersLen; char *memberNames; QMetaObject_ *metaObject; } GoTypeInfo; typedef struct { int severity; const char *text; int textLen; const char *file; int fileLen; int line; } LogMessage; void newGuiApplication(); void applicationExec(); void applicationExit(); void applicationFlushAll(); void idleTimerInit(int32_t *guiIdleRun); void idleTimerStart(); void *currentThread(); void *appThread(); QQmlEngine_ *newEngine(QObject_ *parent); QQmlContext_ *engineRootContext(QQmlEngine_ *engine); void engineSetOwnershipCPP(QQmlEngine_ *engine, QObject_ *object); void engineSetOwnershipJS(QQmlEngine_ *engine, QObject_ *object); void engineSetContextForObject(QQmlEngine_ *engine, QObject_ *object); void engineAddImageProvider(QQmlEngine_ *engine, QString_ *providerId, void *imageFunc); void contextGetProperty(QQmlContext_ *context, QString_ *name, DataValue *value); void contextSetProperty(QQmlContext_ *context, QString_ *name, DataValue *value); void contextSetObject(QQmlContext_ *context, QObject_ *value); QQmlContext_ *contextSpawn(QQmlContext_ *context); void delObject(QObject_ *object); void delObjectLater(QObject_ *object); const char *objectTypeName(QObject_ *object); int objectGetProperty(QObject_ *object, const char *name, DataValue *result); error *objectSetProperty(QObject_ *object, const char *name, DataValue *value); void objectSetParent(QObject_ *object, QObject_ *parent); error *objectInvoke(QObject_ *object, const char *method, int methodLen, DataValue *result, DataValue *params, int paramsLen); void objectFindChild(QObject_ *object, QString_ *name, DataValue *result); QQmlContext_ *objectContext(QObject_ *object); int objectIsComponent(QObject_ *object); int objectIsWindow(QObject_ *object); int objectIsView(QObject_ *object); error *objectConnect(QObject_ *object, const char *signal, int signalLen, QQmlEngine_ *engine, void *func, int argsLen); error *objectGoAddr(QObject_ *object, GoAddr **addr); QQmlComponent_ *newComponent(QQmlEngine_ *engine, QObject_ *parent); void componentLoadURL(QQmlComponent_ *component, const char *url, int urlLen); void componentSetData(QQmlComponent_ *component, const char *data, int dataLen, const char *url, int urlLen); char *componentErrorString(QQmlComponent_ *component); QObject_ *componentCreate(QQmlComponent_ *component, QQmlContext_ *context); QQuickWindow_ *componentCreateWindow(QQmlComponent_ *component, QQmlContext_ *context); void windowShow(QQuickWindow_ *win); void windowHide(QQuickWindow_ *win); uintptr_t windowPlatformId(QQuickWindow_ *win); void windowConnectHidden(QQuickWindow_ *win); QObject_ *windowRootObject(QQuickWindow_ *win); QImage_ *windowGrabWindow(QQuickWindow_ *win); QImage_ *newImage(int width, int height); void delImage(QImage_ *image); void imageSize(QImage_ *image, int *width, int *height); unsigned char *imageBits(QImage_ *image); const unsigned char *imageConstBits(QImage_ *image); QString_ *newString(const char *data, int len); void delString(QString_ *s); GoValue_ *newGoValue(GoAddr *addr, GoTypeInfo *typeInfo, QObject_ *parent); void goValueActivate(GoValue_ *value, GoTypeInfo *typeInfo, int addrOffset); void packDataValue(QVariant_ *var, DataValue *result); void unpackDataValue(DataValue *value, QVariant_ *result); QVariantList_ *newVariantList(DataValue *list, int len); QQmlListProperty_ *newListProperty(GoAddr *addr, intptr_t reflectIndex, intptr_t setIndex); int registerType(char *location, int major, int minor, char *name, GoTypeInfo *typeInfo, GoTypeSpec_ *spec); int registerSingleton(char *location, int major, int minor, char *name, GoTypeInfo *typeInfo, GoTypeSpec_ *spec); void installLogHandler(); void hookIdleTimer(); void hookLogHandler(LogMessage *message); void hookGoValueReadField(QQmlEngine_ *engine, GoAddr *addr, int memberIndex, int getIndex, int setIndex, DataValue *result); void hookGoValueWriteField(QQmlEngine_ *engine, GoAddr *addr, int memberIndex, int setIndex, DataValue *assign); void hookGoValueCallMethod(QQmlEngine_ *engine, GoAddr *addr, int memberIndex, DataValue *result); void hookGoValueDestroyed(QQmlEngine_ *engine, GoAddr *addr); void hookGoValuePaint(QQmlEngine_ *engine, GoAddr *addr, intptr_t reflextIndex); QImage_ *hookRequestImage(void *imageFunc, char *id, int idLen, int width, int height); GoAddr *hookGoValueTypeNew(GoValue_ *value, GoTypeSpec_ *spec); void hookWindowHidden(QObject_ *addr); void hookSignalCall(QQmlEngine_ *engine, void *func, DataValue *params); void hookSignalDisconnect(void *func); void hookPanic(char *message); int hookListPropertyCount(GoAddr *addr, intptr_t reflectIndex, intptr_t setIndex); QObject_ *hookListPropertyAt(GoAddr *addr, intptr_t reflectIndex, intptr_t setIndex, int i); void hookListPropertyAppend(GoAddr *addr, intptr_t reflectIndex, intptr_t setIndex, QObject_ *obj); void hookListPropertyClear(GoAddr *addr, intptr_t reflectIndex, intptr_t setIndex); void registerResourceData(int version, char *tree, char *name, char *data); void unregisterResourceData(int version, char *tree, char *name, char *data); #ifdef __cplusplus } // extern "C" #endif #endif // CAPI_H // vim:ts=4:et ciborium-0.2.12+15.10.20150612/qml.v1/cpp/mmemwin.cpp0000644000015300001610000000066012536576717022035 0ustar pbuserpbgroup00000000000000#include #define protREAD 1 #define protWRITE 2 #define protEXEC 4 extern "C" { int mprotect(void *addr, size_t len, int prot) { DWORD wprot = 0; if (prot & protWRITE) { wprot = PAGE_READWRITE; } else if (prot & protREAD) { wprot = PAGE_READONLY; } if (prot & protEXEC) { wprot <<= 4; } DWORD oldwprot; if (!VirtualProtect(addr, len, wprot, &oldwprot)) { return -1; } return 0; } } // extern "C" ciborium-0.2.12+15.10.20150612/qml.v1/cpp/update-moc.sh0000755000015300001610000000063712536576717022261 0ustar pbuserpbgroup00000000000000#!/bin/sh set -e cd `dirname $0` subdir=`basename $PWD` export QT_SELECT=5 ALL=moc_all.cpp echo "// This file is automatically generated by cpp/update-moc.sh" > $ALL for file in `grep -l Q_''OBJECT *`; do mocfile=`echo $file | awk -F. '{print("moc_"$1".cpp")}'` mochack=`sed -n 's,^ *// MOC HACK: \(.*\),\1,p' $file` moc $file | sed "$mochack" > $mocfile echo "#include \"$subdir/$mocfile\"" >> $ALL done ciborium-0.2.12+15.10.20150612/qml.v1/cpp/moc_all.cpp0000644000015300001610000000023612536576717021771 0ustar pbuserpbgroup00000000000000// This file is automatically generated by cpp/update-moc.sh #include "cpp/moc_connector.cpp" #include "cpp/moc_govalue.cpp" #include "cpp/moc_idletimer.cpp" ciborium-0.2.12+15.10.20150612/qml.v1/cpp/govalue.h0000644000015300001610000000204512536576717021472 0ustar pbuserpbgroup00000000000000#ifndef GOVALUE_H #define GOVALUE_H // Unfortunatley we need access to private bits, because the // whole dynamic meta-object concept is sadly being hidden // away, and without it this package wouldn't exist. #include #include #include #include "capi.h" class GoValueMetaObject; QMetaObject *metaObjectFor(GoTypeInfo *typeInfo); class GoValue : public QObject { Q_OBJECT public: GoAddr *addr; GoTypeInfo *typeInfo; GoValue(GoAddr *addr, GoTypeInfo *typeInfo, QObject *parent); virtual ~GoValue(); void activate(int propIndex); private: GoValueMetaObject *valueMeta; }; class GoPaintedValue : public QQuickPaintedItem { Q_OBJECT public: GoAddr *addr; GoTypeInfo *typeInfo; GoPaintedValue(GoAddr *addr, GoTypeInfo *typeInfo, QObject *parent); virtual ~GoPaintedValue(); void activate(int propIndex); virtual void paint(QPainter *painter); private: GoValueMetaObject *valueMeta; }; #endif // GOVALUE_H // vim:ts=4:sw=4:et:ft=cpp ciborium-0.2.12+15.10.20150612/qml.v1/cpp/moc_connector.cpp0000644000015300001610000001401212536576717023210 0ustar pbuserpbgroup00000000000000/**************************************************************************** ** Meta object code from reading C++ file 'connector.h' ** ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.2.1) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ #include "connector.h" #include #include #if !defined(Q_MOC_OUTPUT_REVISION) #error "The header file 'connector.h' doesn't include ." #elif Q_MOC_OUTPUT_REVISION != 67 #error "This file was generated using the moc from 5.2.1. It" #error "cannot be used with the include files from this version of Qt." #error "(The moc has changed too much.)" #endif QT_BEGIN_MOC_NAMESPACE struct qt_meta_stringdata_Connector_t { QByteArrayData data[3]; char stringdata[19]; }; #define QT_MOC_LITERAL(idx, ofs, len) \ Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \ offsetof(qt_meta_stringdata_Connector_t, stringdata) + ofs \ - idx * sizeof(QByteArrayData) \ ) static const qt_meta_stringdata_Connector_t qt_meta_stringdata_Connector = { { QT_MOC_LITERAL(0, 0, 9), QT_MOC_LITERAL(1, 10, 6), QT_MOC_LITERAL(2, 17, 0) }, "Connector\0invoke\0\0" }; #undef QT_MOC_LITERAL static const uint qt_meta_data_Connector[] = { // content: 7, // revision 0, // classname 0, 0, // classinfo 1, 14, // methods 0, 0, // properties 0, 0, // enums/sets 0, 0, // constructors 0, // flags 0, // signalCount // slots: name, argc, parameters, tag, flags 1, 0, 19, 2, 0x0a, // slots: parameters QMetaType::Void, 0 // eod }; void Connector::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) { if (_c == QMetaObject::InvokeMetaMethod) { Connector *_t = static_cast(_o); switch (_id) { case 0: _t->invoke(); break; default: ; } } Q_UNUSED(_a); } const QMetaObject Connector::staticMetaObject = { { &QObject::staticMetaObject, qt_meta_stringdata_Connector.data, qt_meta_data_Connector, qt_static_metacall, 0, 0} }; const QMetaObject *Connector::metaObject() const { return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject; } void *Connector::qt_metacast(const char *_clname) { if (!_clname) return 0; if (!strcmp(_clname, qt_meta_stringdata_Connector.stringdata)) return static_cast(const_cast< Connector*>(this)); return QObject::qt_metacast(_clname); } int Connector::standard_qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QObject::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { if (_id < 1) qt_static_metacall(this, _c, _id, _a); _id -= 1; } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) { if (_id < 1) *reinterpret_cast(_a[0]) = -1; _id -= 1; } return _id; } struct qt_meta_stringdata_PlainObject_t { QByteArrayData data[3]; char stringdata[33]; }; #define QT_MOC_LITERAL(idx, ofs, len) \ Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \ offsetof(qt_meta_stringdata_PlainObject_t, stringdata) + ofs \ - idx * sizeof(QByteArrayData) \ ) static const qt_meta_stringdata_PlainObject_t qt_meta_stringdata_PlainObject = { { QT_MOC_LITERAL(0, 0, 11), QT_MOC_LITERAL(1, 12, 9), QT_MOC_LITERAL(2, 22, 9) }, "PlainObject\0plainType\0plainAddr\0" }; #undef QT_MOC_LITERAL static const uint qt_meta_data_PlainObject[] = { // content: 7, // revision 0, // classname 0, 0, // classinfo 0, 0, // methods 2, 14, // properties 0, 0, // enums/sets 0, 0, // constructors 0, // flags 0, // signalCount // properties: name, type, flags 1, QMetaType::QString, 0x00095001, 2, QMetaType::VoidStar, 0x00095001, 0 // eod }; void PlainObject::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) { Q_UNUSED(_o); Q_UNUSED(_id); Q_UNUSED(_c); Q_UNUSED(_a); } const QMetaObject PlainObject::staticMetaObject = { { &QObject::staticMetaObject, qt_meta_stringdata_PlainObject.data, qt_meta_data_PlainObject, qt_static_metacall, 0, 0} }; const QMetaObject *PlainObject::metaObject() const { return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject; } void *PlainObject::qt_metacast(const char *_clname) { if (!_clname) return 0; if (!strcmp(_clname, qt_meta_stringdata_PlainObject.stringdata)) return static_cast(const_cast< PlainObject*>(this)); return QObject::qt_metacast(_clname); } int PlainObject::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QObject::qt_metacall(_c, _id, _a); if (_id < 0) return _id; #ifndef QT_NO_PROPERTIES if (_c == QMetaObject::ReadProperty) { void *_v = _a[0]; switch (_id) { case 0: *reinterpret_cast< QString*>(_v) = getPlainType(); break; case 1: *reinterpret_cast< void**>(_v) = getPlainAddr(); break; } _id -= 2; } else if (_c == QMetaObject::WriteProperty) { _id -= 2; } else if (_c == QMetaObject::ResetProperty) { _id -= 2; } else if (_c == QMetaObject::QueryPropertyDesignable) { _id -= 2; } else if (_c == QMetaObject::QueryPropertyScriptable) { _id -= 2; } else if (_c == QMetaObject::QueryPropertyStored) { _id -= 2; } else if (_c == QMetaObject::QueryPropertyEditable) { _id -= 2; } else if (_c == QMetaObject::QueryPropertyUser) { _id -= 2; } else if (_c == QMetaObject::RegisterPropertyMetaType) { if (_id < 2) *reinterpret_cast(_a[0]) = -1; _id -= 2; } #endif // QT_NO_PROPERTIES return _id; } QT_END_MOC_NAMESPACE ciborium-0.2.12+15.10.20150612/qml.v1/cpp/capi.cpp0000644000015300001610000006675312536576717021317 0ustar pbuserpbgroup00000000000000#include #include #include #include #include #include #include #include "govalue.h" #include "govaluetype.h" #include "connector.h" #include "capi.h" static char *local_strdup(const char *str) { char *strcopy = 0; if (str) { size_t len = strlen(str) + 1; strcopy = (char *)malloc(len); memcpy(strcopy, str, len); } return strcopy; } error *errorf(const char *format, ...) { va_list ap; va_start(ap, format); QString str = QString().vsprintf(format, ap); va_end(ap); QByteArray ba = str.toUtf8(); return local_strdup(ba.constData()); } void panicf(const char *format, ...) { va_list ap; va_start(ap, format); QString str = QString().vsprintf(format, ap); va_end(ap); QByteArray ba = str.toUtf8(); hookPanic(local_strdup(ba.constData())); } void newGuiApplication() { static char empty[1] = {0}; static char *argv[] = {empty, 0}; static int argc = 1; new QApplication(argc, argv); // The event loop should never die. qApp->setQuitOnLastWindowClosed(false); } void applicationExec() { qApp->exec(); } void applicationExit() { qApp->exit(0); } void applicationFlushAll() { qApp->processEvents(); } void *currentThread() { return QThread::currentThread(); } void *appThread() { return QCoreApplication::instance()->thread(); } QQmlEngine_ *newEngine(QObject_ *parent) { return new QQmlEngine(reinterpret_cast(parent)); } QQmlContext_ *engineRootContext(QQmlEngine_ *engine) { return reinterpret_cast(engine)->rootContext(); } void engineSetContextForObject(QQmlEngine_ *engine, QObject_ *object) { QQmlEngine *qengine = reinterpret_cast(engine); QObject *qobject = reinterpret_cast(object); QQmlEngine::setContextForObject(qobject, qengine->rootContext()); } void engineSetOwnershipCPP(QQmlEngine_ *engine, QObject_ *object) { QQmlEngine *qengine = reinterpret_cast(engine); QObject *qobject = reinterpret_cast(object); qengine->setObjectOwnership(qobject, QQmlEngine::CppOwnership); } void engineSetOwnershipJS(QQmlEngine_ *engine, QObject_ *object) { QQmlEngine *qengine = reinterpret_cast(engine); QObject *qobject = reinterpret_cast(object); qengine->setObjectOwnership(qobject, QQmlEngine::JavaScriptOwnership); } QQmlComponent_ *newComponent(QQmlEngine_ *engine, QObject_ *parent) { QQmlEngine *qengine = reinterpret_cast(engine); //QObject *qparent = reinterpret_cast(parent); QQmlComponent *qcomponent = new QQmlComponent(qengine); // Qt 5.2.0 returns NULL on qmlEngine(qcomponent) without this. QQmlEngine::setContextForObject(qcomponent, qengine->rootContext()); return qcomponent; } class GoImageProvider : public QQuickImageProvider { // TODO Destroy this when engine is destroyed. public: GoImageProvider(void *imageFunc) : QQuickImageProvider(QQmlImageProviderBase::Image), imageFunc(imageFunc) {}; virtual QImage requestImage(const QString &id, QSize *size, const QSize &requestedSize) { QByteArray ba = id.toUtf8(); int width = 0, height = 0; if (requestedSize.isValid()) { width = requestedSize.width(); height = requestedSize.height(); } QImage *ptr = reinterpret_cast(hookRequestImage(imageFunc, (char*)ba.constData(), ba.size(), width, height)); QImage image = *ptr; delete ptr; *size = image.size(); if (requestedSize.isValid() && requestedSize != *size) { image = image.scaled(requestedSize, Qt::KeepAspectRatio); } return image; }; private: void *imageFunc; }; void engineAddImageProvider(QQmlEngine_ *engine, QString_ *providerId, void *imageFunc) { QQmlEngine *qengine = reinterpret_cast(engine); QString *qproviderId = reinterpret_cast(providerId); qengine->addImageProvider(*qproviderId, new GoImageProvider(imageFunc)); } void componentLoadURL(QQmlComponent_ *component, const char *url, int urlLen) { QByteArray qurl(url, urlLen); QString qsurl = QString::fromUtf8(qurl); reinterpret_cast(component)->loadUrl(qsurl); } void componentSetData(QQmlComponent_ *component, const char *data, int dataLen, const char *url, int urlLen) { QByteArray qdata(data, dataLen); QByteArray qurl(url, urlLen); QString qsurl = QString::fromUtf8(qurl); reinterpret_cast(component)->setData(qdata, qsurl); } char *componentErrorString(QQmlComponent_ *component) { QQmlComponent *qcomponent = reinterpret_cast(component); if (qcomponent->isReady()) { return NULL; } if (qcomponent->isError()) { QByteArray ba = qcomponent->errorString().toUtf8(); return local_strdup(ba.constData()); } return local_strdup("component is not ready (why!?)"); } QObject_ *componentCreate(QQmlComponent_ *component, QQmlContext_ *context) { QQmlComponent *qcomponent = reinterpret_cast(component); QQmlContext *qcontext = reinterpret_cast(context); if (!qcontext) { qcontext = qmlContext(qcomponent); } return qcomponent->create(qcontext); } QQuickWindow_ *componentCreateWindow(QQmlComponent_ *component, QQmlContext_ *context) { QQmlComponent *qcomponent = reinterpret_cast(component); QQmlContext *qcontext = reinterpret_cast(context); if (!qcontext) { qcontext = qmlContext(qcomponent); } QObject *obj = qcomponent->create(qcontext); if (!objectIsWindow(obj)) { QQuickView *view = new QQuickView(qmlEngine(qcomponent), 0); view->setContent(qcomponent->url(), qcomponent, obj); view->setResizeMode(QQuickView::SizeRootObjectToView); obj = view; } return obj; } // Workaround for bug https://bugs.launchpad.net/bugs/1179716 struct DoShowWindow : public QQuickWindow { void show() { QQuickWindow::show(); QResizeEvent resize(size(), size()); resizeEvent(&resize); } }; void windowShow(QQuickWindow_ *win) { reinterpret_cast(win)->show(); } void windowHide(QQuickWindow_ *win) { reinterpret_cast(win)->hide(); } uintptr_t windowPlatformId(QQuickWindow_ *win) { return reinterpret_cast(win)->winId(); } void windowConnectHidden(QQuickWindow_ *win) { QQuickWindow *qwin = reinterpret_cast(win); QObject::connect(qwin, &QWindow::visibleChanged, [=](bool visible){ if (!visible) { hookWindowHidden(win); } }); } QObject_ *windowRootObject(QQuickWindow_ *win) { if (objectIsView(win)) { return reinterpret_cast(win)->rootObject(); } return win; } QImage_ *windowGrabWindow(QQuickWindow_ *win) { QQuickWindow *qwin = reinterpret_cast(win); QImage *image = new QImage; *image = qwin->grabWindow().convertToFormat(QImage::Format_ARGB32_Premultiplied); return image; } QImage_ *newImage(int width, int height) { return new QImage(width, height, QImage::Format_ARGB32_Premultiplied); } void delImage(QImage_ *image) { delete reinterpret_cast(image); } void imageSize(QImage_ *image, int *width, int *height) { QImage *qimage = reinterpret_cast(image); *width = qimage->width(); *height = qimage->height(); } unsigned char *imageBits(QImage_ *image) { QImage *qimage = reinterpret_cast(image); return qimage->bits(); } const unsigned char *imageConstBits(QImage_ *image) { QImage *qimage = reinterpret_cast(image); return qimage->constBits(); } void contextSetObject(QQmlContext_ *context, QObject_ *value) { QQmlContext *qcontext = reinterpret_cast(context); QObject *qvalue = reinterpret_cast(value); // Give qvalue an engine reference if it doesn't yet have one. if (!qmlEngine(qvalue)) { QQmlEngine::setContextForObject(qvalue, qcontext->engine()->rootContext()); } qcontext->setContextObject(qvalue); } void contextSetProperty(QQmlContext_ *context, QString_ *name, DataValue *value) { const QString *qname = reinterpret_cast(name); QQmlContext *qcontext = reinterpret_cast(context); QVariant var; unpackDataValue(value, &var); // Give qvalue an engine reference if it doesn't yet have one . QObject *obj = var.value(); if (obj && !qmlEngine(obj)) { QQmlEngine::setContextForObject(obj, qcontext); } qcontext->setContextProperty(*qname, var); } void contextGetProperty(QQmlContext_ *context, QString_ *name, DataValue *result) { QQmlContext *qcontext = reinterpret_cast(context); const QString *qname = reinterpret_cast(name); QVariant var = qcontext->contextProperty(*qname); packDataValue(&var, result); } QQmlContext_ *contextSpawn(QQmlContext_ *context) { QQmlContext *qcontext = reinterpret_cast(context); return new QQmlContext(qcontext); } void delObject(QObject_ *object) { delete reinterpret_cast(object); } void delObjectLater(QObject_ *object) { reinterpret_cast(object)->deleteLater(); } const char *objectTypeName(QObject_ *object) { return reinterpret_cast(object)->metaObject()->className(); } int objectGetProperty(QObject_ *object, const char *name, DataValue *result) { QObject *qobject = reinterpret_cast(object); QVariant var = qobject->property(name); packDataValue(&var, result); if (!var.isValid() && qobject->metaObject()->indexOfProperty(name) == -1) { // TODO May have to check the dynamic property names too. return 0; } return 1; } error *objectSetProperty(QObject_ *object, const char *name, DataValue *value) { QObject *qobject = reinterpret_cast(object); QVariant var; unpackDataValue(value, &var); // Give qvalue an engine reference if it doesn't yet have one. QObject *obj = var.value(); if (obj && !qmlEngine(obj)) { QQmlContext *context = qmlContext(qobject); if (context) { QQmlEngine::setContextForObject(obj, context); } } // Check that the types are compatible. There's probably more to be done here. const QMetaObject *metaObject = qobject->metaObject(); int propIndex = metaObject->indexOfProperty(name); if (propIndex == -1) { return errorf("cannot set non-existent property \"%s\" on type %s", name, qobject->metaObject()->className()); } QMetaProperty prop = metaObject->property(propIndex); int propType = prop.userType(); void *valueArg; if (propType == QMetaType::QVariant) { valueArg = (void *)&var; } else { int varType = var.userType(); QVariant saved = var; if (propType != varType && !var.convert(propType)) { if (varType == QMetaType::QObjectStar) { return errorf("cannot set property \"%s\" with type %s to value of %s*", name, QMetaType::typeName(propType), saved.value()->metaObject()->className()); } else { return errorf("cannot set property \"%s\" with type %s to value of %s", name, QMetaType::typeName(propType), QMetaType::typeName(varType)); } } valueArg = (void *)var.constData(); } int status = -1; int flags = 0; void *args[] = {valueArg, 0, &status, &flags}; QMetaObject::metacall(qobject, QMetaObject::WriteProperty, propIndex, args); return 0; } error *objectInvoke(QObject_ *object, const char *method, int methodLen, DataValue *resultdv, DataValue *paramsdv, int paramsLen) { QObject *qobject = reinterpret_cast(object); QVariant result; QVariant param[MaxParams]; QGenericArgument arg[MaxParams]; for (int i = 0; i < paramsLen; i++) { unpackDataValue(¶msdv[i], ¶m[i]); arg[i] = Q_ARG(QVariant, param[i]); } if (paramsLen > 10) { panicf("fix the parameter dispatching"); } const QMetaObject *metaObject = qobject->metaObject(); // Walk backwards so descendants have priority. for (int i = metaObject->methodCount()-1; i >= 0; i--) { QMetaMethod metaMethod = metaObject->method(i); QMetaMethod::MethodType methodType = metaMethod.methodType(); if (methodType == QMetaMethod::Method || methodType == QMetaMethod::Slot) { QByteArray name = metaMethod.name(); if (name.length() == methodLen && qstrncmp(name.constData(), method, methodLen) == 0) { if (metaMethod.parameterCount() < paramsLen) { // TODO Might continue looking to see if a different signal has the same name and enough arguments. return errorf("method \"%s\" has too few parameters for provided arguments", method); } bool ok; if (metaMethod.returnType() == QMetaType::Void) { ok = metaMethod.invoke(qobject, Qt::DirectConnection, arg[0], arg[1], arg[2], arg[3], arg[4], arg[5], arg[6], arg[7], arg[8], arg[9]); } else { ok = metaMethod.invoke(qobject, Qt::DirectConnection, Q_RETURN_ARG(QVariant, result), arg[0], arg[1], arg[2], arg[3], arg[4], arg[5], arg[6], arg[7], arg[8], arg[9]); } if (!ok) { return errorf("invalid parameters to method \"%s\"", method); } packDataValue(&result, resultdv); return 0; } } } return errorf("object does not expose a method \"%s\"", method); } void objectFindChild(QObject_ *object, QString_ *name, DataValue *resultdv) { QObject *qobject = reinterpret_cast(object); QString *qname = reinterpret_cast(name); QVariant var; QObject *result = qobject->findChild(*qname); if (result) { var.setValue(result); } packDataValue(&var, resultdv); } void objectSetParent(QObject_ *object, QObject_ *parent) { QObject *qobject = reinterpret_cast(object); QObject *qparent = reinterpret_cast(parent); qobject->setParent(qparent); } error *objectConnect(QObject_ *object, const char *signal, int signalLen, QQmlEngine_ *engine, void *func, int argsLen) { QObject *qobject = reinterpret_cast(object); QQmlEngine *qengine = reinterpret_cast(engine); QByteArray qsignal(signal, signalLen); const QMetaObject *meta = qobject->metaObject(); // Walk backwards so descendants have priority. for (int i = meta->methodCount()-1; i >= 0; i--) { QMetaMethod method = meta->method(i); if (method.methodType() == QMetaMethod::Signal) { QByteArray name = method.name(); if (name.length() == signalLen && qstrncmp(name.constData(), signal, signalLen) == 0) { if (method.parameterCount() < argsLen) { // TODO Might continue looking to see if a different signal has the same name and enough arguments. return errorf("signal \"%s\" has too few parameters for provided function", name.constData()); } Connector *connector = new Connector(qobject, method, qengine, func, argsLen); const QMetaObject *connmeta = connector->metaObject(); QObject::connect(qobject, method, connector, connmeta->method(connmeta->methodOffset())); return 0; } } } // Cannot use constData here as the byte array is not null-terminated. return errorf("object does not expose a \"%s\" signal", qsignal.data()); } QQmlContext_ *objectContext(QObject_ *object) { return qmlContext(static_cast(object)); } int objectIsComponent(QObject_ *object) { QObject *qobject = static_cast(object); return dynamic_cast(qobject) ? 1 : 0; } int objectIsWindow(QObject_ *object) { QObject *qobject = static_cast(object); return dynamic_cast(qobject) ? 1 : 0; } int objectIsView(QObject_ *object) { QObject *qobject = static_cast(object); return dynamic_cast(qobject) ? 1 : 0; } error *objectGoAddr(QObject_ *object, GoAddr **addr) { QObject *qobject = static_cast(object); GoValue *goValue = dynamic_cast(qobject); if (goValue) { *addr = goValue->addr; return 0; } GoPaintedValue *goPaintedValue = dynamic_cast(qobject); if (goPaintedValue) { *addr = goPaintedValue->addr; return 0; } return errorf("QML object is not backed by a Go value"); } QString_ *newString(const char *data, int len) { // This will copy data only once. QByteArray ba = QByteArray::fromRawData(data, len); return new QString(ba); } void delString(QString_ *s) { delete reinterpret_cast(s); } GoValue_ *newGoValue(GoAddr *addr, GoTypeInfo *typeInfo, QObject_ *parent) { QObject *qparent = reinterpret_cast(parent); if (typeInfo->paint) { return new GoPaintedValue(addr, typeInfo, qparent); } return new GoValue(addr, typeInfo, qparent); } void goValueActivate(GoValue_ *value, GoTypeInfo *typeInfo, int addrOffset) { GoMemberInfo *fieldInfo = typeInfo->fields; for (int i = 0; i < typeInfo->fieldsLen; i++) { if (fieldInfo->addrOffset == addrOffset) { if (typeInfo->paint) { static_cast(value)->activate(fieldInfo->metaIndex); } else { static_cast(value)->activate(fieldInfo->metaIndex); } return; } fieldInfo++; } // TODO Return an error; probably an unexported field. } void unpackDataValue(DataValue *value, QVariant_ *var) { QVariant *qvar = reinterpret_cast(var); switch (value->dataType) { case DTString: *qvar = QString::fromUtf8(*(char **)value->data, value->len); break; case DTBool: *qvar = bool(*(char *)(value->data) != 0); break; case DTInt64: *qvar = *(qint64*)(value->data); break; case DTInt32: *qvar = *(qint32*)(value->data); break; case DTUint64: *qvar = *(quint64*)(value->data); break; case DTUint32: *qvar = *(quint32*)(value->data); break; case DTFloat64: *qvar = *(double*)(value->data); break; case DTFloat32: *qvar = *(float*)(value->data); break; case DTColor: *qvar = QColor::fromRgba(*(QRgb*)(value->data)); break; case DTVariantList: *qvar = **(QVariantList**)(value->data); delete *(QVariantList**)(value->data); break; case DTObject: qvar->setValue(*(QObject**)(value->data)); break; case DTInvalid: // null would be more natural, but an invalid variant means // it has proper semantics when dealing with non-qml qt code. //qvar->setValue(QJSValue(QJSValue::NullValue)); qvar->clear(); break; default: panicf("unknown data type: %d", value->dataType); break; } } void packDataValue(QVariant_ *var, DataValue *value) { QVariant *qvar = reinterpret_cast(var); // Some assumptions are made below regarding the size of types. // There's apparently no better way to handle this since that's // how the types with well defined sizes (qint64) are mapped to // meta-types (QMetaType::LongLong). switch ((int)qvar->type()) { case QVariant::Invalid: value->dataType = DTInvalid; break; case QMetaType::QUrl: *qvar = qvar->value().toString(); // fallthrough case QMetaType::QString: { value->dataType = DTString; QByteArray ba = qvar->toByteArray(); *(char**)(value->data) = local_strdup(ba.constData()); value->len = ba.size(); break; } case QMetaType::Bool: value->dataType = DTBool; *(qint8*)(value->data) = (qint8)qvar->toInt(); break; case QMetaType::LongLong: // Some of these entries will have to be fixed when handling platforms // where sizeof(long long) != 8 or sizeof(int) != 4. value->dataType = DTInt64; *(qint64*)(value->data) = qvar->toLongLong(); break; case QMetaType::ULongLong: value->dataType = DTUint64; *(quint64*)(value->data) = qvar->toLongLong(); break; case QMetaType::Int: value->dataType = DTInt32; *(qint32*)(value->data) = qvar->toInt(); break; case QMetaType::UInt: value->dataType = DTUint32; *(quint32*)(value->data) = qvar->toUInt(); break; case QMetaType::VoidStar: value->dataType = DTUintptr; *(uintptr_t*)(value->data) = (uintptr_t)qvar->value(); break; case QMetaType::Double: value->dataType = DTFloat64; *(double*)(value->data) = qvar->toDouble(); break; case QMetaType::Float: value->dataType = DTFloat32; *(float*)(value->data) = qvar->toFloat(); break; case QMetaType::QColor: value->dataType = DTColor; *(unsigned int*)(value->data) = qvar->value().rgba(); break; case QMetaType::QVariantList: { QVariantList varlist = qvar->toList(); int len = varlist.size(); DataValue *dvlist = (DataValue *) malloc(sizeof(DataValue) * len); for (int i = 0; i < len; i++) { packDataValue((void*)&varlist.at(i), &dvlist[i]); } value->dataType = DTValueList; value->len = len; *(DataValue**)(value->data) = dvlist; } break; case QMetaType::QVariantMap: { QVariantMap varmap = qvar->toMap(); int len = varmap.size() * 2; DataValue *dvlist = (DataValue *) malloc(sizeof(DataValue) * len); QMapIterator it(varmap); for (int i = 0; i < len; i += 2) { if (!it.hasNext()) { panicf("QVariantMap mutated during iteration"); } it.next(); QVariant key = it.key(); QVariant val = it.value(); packDataValue((void*)&key, &dvlist[i]); packDataValue((void*)&val, &dvlist[i+1]); } value->dataType = DTValueMap; value->len = len; *(DataValue**)(value->data) = dvlist; } break; default: if (qvar->type() == (int)QMetaType::QObjectStar || qvar->canConvert()) { QObject *qobject = qvar->value(); GoValue *goValue = dynamic_cast(qobject); if (goValue) { value->dataType = DTGoAddr; *(void **)(value->data) = goValue->addr; break; } GoPaintedValue *goPaintedValue = dynamic_cast(qobject); if (goPaintedValue) { value->dataType = DTGoAddr; *(void **)(value->data) = goPaintedValue->addr; break; } value->dataType = DTObject; *(void **)(value->data) = qobject; break; } { QQmlListReference ref = qvar->value(); if (ref.isValid() && ref.canCount() && ref.canAt()) { int len = ref.count(); DataValue *dvlist = (DataValue *) malloc(sizeof(DataValue) * len); QVariant elem; for (int i = 0; i < len; i++) { elem.setValue(ref.at(i)); packDataValue(&elem, &dvlist[i]); } value->dataType = DTValueList; value->len = len; *(DataValue**)(value->data) = dvlist; break; } } if (qstrncmp(qvar->typeName(), "QQmlListProperty<", 17) == 0) { QQmlListProperty *list = reinterpret_cast*>(qvar->data()); if (list->count && list->at) { int len = list->count(list); DataValue *dvlist = (DataValue *) malloc(sizeof(DataValue) * len); QVariant elem; for (int i = 0; i < len; i++) { elem.setValue(list->at(list, i)); packDataValue(&elem, &dvlist[i]); } value->dataType = DTValueList; value->len = len; *(DataValue**)(value->data) = dvlist; break; } } panicf("unsupported variant type: %d (%s)", qvar->type(), qvar->typeName()); break; } } QVariantList_ *newVariantList(DataValue *list, int len) { QVariantList *vlist = new QVariantList(); vlist->reserve(len); for (int i = 0; i < len; i++) { QVariant var; unpackDataValue(&list[i], &var); vlist->append(var); } return vlist; } QObject *listPropertyAt(QQmlListProperty *list, int i) { return reinterpret_cast(hookListPropertyAt(list->data, (intptr_t)list->dummy1, (intptr_t)list->dummy2, i)); } int listPropertyCount(QQmlListProperty *list) { return hookListPropertyCount(list->data, (intptr_t)list->dummy1, (intptr_t)list->dummy2); } void listPropertyAppend(QQmlListProperty *list, QObject *obj) { hookListPropertyAppend(list->data, (intptr_t)list->dummy1, (intptr_t)list->dummy2, obj); } void listPropertyClear(QQmlListProperty *list) { hookListPropertyClear(list->data, (intptr_t)list->dummy1, (intptr_t)list->dummy2); } QQmlListProperty_ *newListProperty(GoAddr *addr, intptr_t reflectIndex, intptr_t setIndex) { QQmlListProperty *list = new QQmlListProperty(); list->data = addr; list->dummy1 = (void*)reflectIndex; list->dummy2 = (void*)setIndex; list->at = listPropertyAt; list->count = listPropertyCount; list->append = listPropertyAppend; list->clear = listPropertyClear; return list; } void internalLogHandler(QtMsgType severity, const QMessageLogContext &context, const QString &text) { QByteArray textba = text.toUtf8(); const int fileLength = context.file ? strlen(context.file) : 0; LogMessage message = {severity, textba.constData(), textba.size(), context.file, fileLength, context.line}; hookLogHandler(&message); } void installLogHandler() { qInstallMessageHandler(internalLogHandler); } extern bool qRegisterResourceData(int version, const unsigned char *tree, const unsigned char *name, const unsigned char *data); extern bool qUnregisterResourceData(int version, const unsigned char *tree, const unsigned char *name, const unsigned char *data); void registerResourceData(int version, char *tree, char *name, char *data) { qRegisterResourceData(version, (unsigned char*)tree, (unsigned char*)name, (unsigned char*)data); } void unregisterResourceData(int version, char *tree, char *name, char *data) { qUnregisterResourceData(version, (unsigned char*)tree, (unsigned char*)name, (unsigned char*)data); } // vim:ts=4:sw=4:et:ft=cpp ciborium-0.2.12+15.10.20150612/qml.v1/cpp/govaluetype.h0000644000015300001610000000206412536576717022375 0ustar pbuserpbgroup00000000000000#ifndef GOVALUETYPE_H #define GOVALUETYPE_H #include "govalue.h" template class GoValueType : public GoValue { public: GoValueType() : GoValue(hookGoValueTypeNew(this, typeSpec), typeInfo, 0) {}; static void init(GoTypeInfo *info, GoTypeSpec_ *spec) { typeInfo = info; typeSpec = spec; static_cast(staticMetaObject) = *metaObjectFor(typeInfo); }; static GoTypeSpec_ *typeSpec; static GoTypeInfo *typeInfo; static QMetaObject staticMetaObject; }; template class GoPaintedValueType : public GoPaintedValue { public: GoPaintedValueType() : GoPaintedValue(hookGoValueTypeNew(this, typeSpec), typeInfo, 0) {}; static void init(GoTypeInfo *info, GoTypeSpec_ *spec) { typeInfo = info; typeSpec = spec; static_cast(staticMetaObject) = *metaObjectFor(typeInfo); }; static GoTypeSpec_ *typeSpec; static GoTypeInfo *typeInfo; static QMetaObject staticMetaObject; }; #endif // GOVALUETYPE_H // vim:ts=4:sw=4:et ciborium-0.2.12+15.10.20150612/qml.v1/cpptest/0000755000015300001610000000000012536577044020550 5ustar pbuserpbgroup00000000000000ciborium-0.2.12+15.10.20150612/qml.v1/cpptest/cpptest.h0000644000015300001610000000047312536576717022415 0ustar pbuserpbgroup00000000000000#ifndef UONEAUTH_H #define UONEAUTH_H #include #include #include typedef void TestType_; typedef void PlainTestType_; #ifdef __cplusplus extern "C" { #endif TestType_ *newTestType(); int plainTestTypeN(PlainTestType_ *plain); #ifdef __cplusplus } #endif #endif // UONEAUTH_H ciborium-0.2.12+15.10.20150612/qml.v1/cpptest/cpptest.go0000644000015300001610000000110412536576717022563 0ustar pbuserpbgroup00000000000000// Package cpptest is an internal test helper. package cpptest // #cgo CXXFLAGS: -std=c++0x -Wall -fno-strict-aliasing -I.. // #cgo LDFLAGS: -lstdc++ // // #cgo pkg-config: Qt5Core // // #include "cpptest.h" // import "C" import ( "unsafe" "launchpad.net/ciborium/qml.v1" ) func NewTestType(engine *qml.Engine) qml.Object { var obj qml.Object qml.RunMain(func() { addr := C.newTestType() obj = qml.CommonOf(addr, engine) }) return obj } func PlainTestTypeN(obj qml.Object) int { return int(C.plainTestTypeN(unsafe.Pointer(obj.Property("plainAddr").(uintptr)))) } ciborium-0.2.12+15.10.20150612/qml.v1/cpptest/moc_testtype.cpp0000644000015300001610000001457312536576717024013 0ustar pbuserpbgroup00000000000000/**************************************************************************** ** Meta object code from reading C++ file 'testtype.h' ** ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.2.1) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ #include "testtype.h" #include #include #if !defined(Q_MOC_OUTPUT_REVISION) #error "The header file 'testtype.h' doesn't include ." #elif Q_MOC_OUTPUT_REVISION != 67 #error "This file was generated using the moc from 5.2.1. It" #error "cannot be used with the include files from this version of Qt." #error "(The moc has changed too much.)" #endif QT_BEGIN_MOC_NAMESPACE struct qt_meta_stringdata_TestType_t { QByteArrayData data[10]; char stringdata[119]; }; #define QT_MOC_LITERAL(idx, ofs, len) \ Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \ offsetof(qt_meta_stringdata_TestType_t, stringdata) + ofs \ - idx * sizeof(QByteArrayData) \ ) static const qt_meta_stringdata_TestType_t qt_meta_stringdata_TestType = { { QT_MOC_LITERAL(0, 0, 8), QT_MOC_LITERAL(1, 9, 15), QT_MOC_LITERAL(2, 25, 0), QT_MOC_LITERAL(3, 26, 13), QT_MOC_LITERAL(4, 40, 5), QT_MOC_LITERAL(5, 46, 15), QT_MOC_LITERAL(6, 62, 15), QT_MOC_LITERAL(7, 78, 20), QT_MOC_LITERAL(8, 99, 9), QT_MOC_LITERAL(9, 109, 8) }, "TestType\0plainEmittedCpy\0\0PlainTestType\0" "plain\0plainEmittedRef\0plainEmittedPtr\0" "const PlainTestType*\0emitPlain\0voidAddr\0" }; #undef QT_MOC_LITERAL static const uint qt_meta_data_TestType[] = { // content: 7, // revision 0, // classname 0, 0, // classinfo 4, 14, // methods 1, 44, // properties 0, 0, // enums/sets 0, 0, // constructors 0, // flags 3, // signalCount // signals: name, argc, parameters, tag, flags 1, 1, 34, 2, 0x06, 5, 1, 37, 2, 0x06, 6, 1, 40, 2, 0x06, // methods: name, argc, parameters, tag, flags 8, 0, 43, 2, 0x02, // signals: parameters QMetaType::Void, 0x80000000 | 3, 4, QMetaType::Void, 0x80000000 | 3, 4, QMetaType::Void, 0x80000000 | 7, 4, // methods: parameters QMetaType::Void, // properties: name, type, flags 9, QMetaType::VoidStar, 0x00095001, 0 // eod }; void TestType::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) { if (_c == QMetaObject::InvokeMetaMethod) { TestType *_t = static_cast(_o); switch (_id) { case 0: _t->plainEmittedCpy((*reinterpret_cast< const PlainTestType(*)>(_a[1]))); break; case 1: _t->plainEmittedRef((*reinterpret_cast< const PlainTestType(*)>(_a[1]))); break; case 2: _t->plainEmittedPtr((*reinterpret_cast< const PlainTestType*(*)>(_a[1]))); break; case 3: _t->emitPlain(); break; default: ; } } else if (_c == QMetaObject::IndexOfMethod) { int *result = reinterpret_cast(_a[0]); void **func = reinterpret_cast(_a[1]); { typedef void (TestType::*_t)(const PlainTestType ); if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&TestType::plainEmittedCpy)) { *result = 0; } } { typedef void (TestType::*_t)(const PlainTestType & ); if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&TestType::plainEmittedRef)) { *result = 1; } } { typedef void (TestType::*_t)(const PlainTestType * ); if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&TestType::plainEmittedPtr)) { *result = 2; } } } } const QMetaObject TestType::staticMetaObject = { { &QObject::staticMetaObject, qt_meta_stringdata_TestType.data, qt_meta_data_TestType, qt_static_metacall, 0, 0} }; const QMetaObject *TestType::metaObject() const { return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject; } void *TestType::qt_metacast(const char *_clname) { if (!_clname) return 0; if (!strcmp(_clname, qt_meta_stringdata_TestType.stringdata)) return static_cast(const_cast< TestType*>(this)); return QObject::qt_metacast(_clname); } int TestType::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QObject::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { if (_id < 4) qt_static_metacall(this, _c, _id, _a); _id -= 4; } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) { if (_id < 4) *reinterpret_cast(_a[0]) = -1; _id -= 4; } #ifndef QT_NO_PROPERTIES else if (_c == QMetaObject::ReadProperty) { void *_v = _a[0]; switch (_id) { case 0: *reinterpret_cast< void**>(_v) = getVoidAddr(); break; } _id -= 1; } else if (_c == QMetaObject::WriteProperty) { _id -= 1; } else if (_c == QMetaObject::ResetProperty) { _id -= 1; } else if (_c == QMetaObject::QueryPropertyDesignable) { _id -= 1; } else if (_c == QMetaObject::QueryPropertyScriptable) { _id -= 1; } else if (_c == QMetaObject::QueryPropertyStored) { _id -= 1; } else if (_c == QMetaObject::QueryPropertyEditable) { _id -= 1; } else if (_c == QMetaObject::QueryPropertyUser) { _id -= 1; } else if (_c == QMetaObject::RegisterPropertyMetaType) { if (_id < 1) *reinterpret_cast(_a[0]) = -1; _id -= 1; } #endif // QT_NO_PROPERTIES return _id; } // SIGNAL 0 void TestType::plainEmittedCpy(const PlainTestType _t1) { void *_a[] = { 0, const_cast(reinterpret_cast(&_t1)) }; QMetaObject::activate(this, &staticMetaObject, 0, _a); } // SIGNAL 1 void TestType::plainEmittedRef(const PlainTestType & _t1) { void *_a[] = { 0, const_cast(reinterpret_cast(&_t1)) }; QMetaObject::activate(this, &staticMetaObject, 1, _a); } // SIGNAL 2 void TestType::plainEmittedPtr(const PlainTestType * _t1) { void *_a[] = { 0, const_cast(reinterpret_cast(&_t1)) }; QMetaObject::activate(this, &staticMetaObject, 2, _a); } QT_END_MOC_NAMESPACE ciborium-0.2.12+15.10.20150612/qml.v1/cpptest/update-moc.sh0000755000015300001610000000037412536576717023157 0ustar pbuserpbgroup00000000000000#!/bin/sh set -e cd `dirname $0` export QT_SELECT=5 for file in `grep -l Q_''OBJECT *`; do mocfile=`echo $file | awk -F. '{print("moc_"$1".cpp")}'` mochack=`sed -n 's,^ *// MOC HACK: \(.*\),\1,p' $file` moc $file | sed "$mochack" > $mocfile done ciborium-0.2.12+15.10.20150612/qml.v1/cpptest/testtype.h0000644000015300001610000000151412536576717022611 0ustar pbuserpbgroup00000000000000#ifndef TESTTYPE_H #define TESTTYPE_H #include class PlainTestType { public: PlainTestType(int n) : n(n) {}; int n; }; class TestType : public QObject { Q_OBJECT Q_PROPERTY(void *voidAddr READ getVoidAddr) void *voidAddr; public: TestType(QObject *parent = 0) : QObject(parent), voidAddr((void*)42) {}; void *getVoidAddr() { return voidAddr; }; Q_INVOKABLE void emitPlain() { PlainTestType plain = PlainTestType(42); emit plainEmittedCpy(plain); emit plainEmittedRef(plain); emit plainEmittedPtr(&plain); }; signals: void plainEmittedCpy(const PlainTestType plain); void plainEmittedRef(const PlainTestType &plain); void plainEmittedPtr(const PlainTestType *plain); }; #endif // TESTTYPE_H // vim:ts=4:sw=4:et ciborium-0.2.12+15.10.20150612/qml.v1/cpptest/cpptest.cpp0000644000015300001610000000032512536576717022744 0ustar pbuserpbgroup00000000000000#include #include "cpptest.h" #include "testtype.h" TestType_ *newTestType() { return new TestType(); } int plainTestTypeN(PlainTestType_ *plain) { return static_cast(plain)->n; } ciborium-0.2.12+15.10.20150612/qml.v1/qml.go0000644000015300001610000010211212536576717020211 0ustar pbuserpbgroup00000000000000package qml // #include // // #include "capi.h" // import "C" import ( "errors" "fmt" "launchpad.net/ciborium/qml.v1/gl/glbase" "image" "image/color" "io" "io/ioutil" "os" "path/filepath" "reflect" "strings" "sync" "unsafe" ) // Engine provides an environment for instantiating QML components. type Engine struct { Common values map[interface{}]*valueFold destroyed bool imageProviders map[string]*func(imageId string, width, height int) image.Image } var engines = make(map[unsafe.Pointer]*Engine) // NewEngine returns a new QML engine. // // The Destory method must be called to finalize the engine and // release any resources used. func NewEngine() *Engine { engine := &Engine{values: make(map[interface{}]*valueFold)} RunMain(func() { engine.addr = C.newEngine(nil) engine.engine = engine engine.imageProviders = make(map[string]*func(imageId string, width, height int) image.Image) engines[engine.addr] = engine stats.enginesAlive(+1) }) return engine } func (e *Engine) assertValid() { if e.destroyed { panic("engine already destroyed") } } // Destroy finalizes the engine and releases any resources used. // The engine must not be used after calling this method. // // It is safe to call Destroy more than once. func (e *Engine) Destroy() { if !e.destroyed { RunMain(func() { if !e.destroyed { e.destroyed = true C.delObjectLater(e.addr) if len(e.values) == 0 { delete(engines, e.addr) } else { // The engine reference keeps those values alive. // The last value destroyed will clear it. } stats.enginesAlive(-1) } }) } } // Load loads a new component with the provided location and with the // content read from r. The location informs the resource name for // logged messages, and its path is used to locate any other resources // referenced by the QML content. // // Once a component is loaded, component instances may be created from // the resulting object via its Create and CreateWindow methods. func (e *Engine) Load(location string, r io.Reader) (Object, error) { var cdata *C.char var cdatalen C.int qrc := strings.HasPrefix(location, "qrc:") if qrc { if r != nil { return nil, fmt.Errorf("cannot load qrc resource while providing data: %s", location) } } else { data, err := ioutil.ReadAll(r) if err != nil { return nil, err } if colon, slash := strings.Index(location, ":"), strings.Index(location, "/"); colon == -1 || slash <= colon { if filepath.IsAbs(location) { location = "file:///" + filepath.ToSlash(location) } else { dir, err := os.Getwd() if err != nil { return nil, fmt.Errorf("cannot obtain absolute path: %v", err) } location = "file:///" + filepath.ToSlash(filepath.Join(dir, location)) } } // Workaround issue #84 (QTBUG-41193) by not refering to an existent file. if s := strings.TrimPrefix(location, "file:///"); s != location { if _, err := os.Stat(filepath.FromSlash(s)); err == nil { location = location + "." } } cdata, cdatalen = unsafeBytesData(data) } var err error cloc, cloclen := unsafeStringData(location) comp := &Common{engine: e} RunMain(func() { // TODO The component's parent should probably be the engine. comp.addr = C.newComponent(e.addr, nilPtr) if qrc { C.componentLoadURL(comp.addr, cloc, cloclen) } else { C.componentSetData(comp.addr, cdata, cdatalen, cloc, cloclen) } message := C.componentErrorString(comp.addr) if message != nilCharPtr { err = errors.New(strings.TrimRight(C.GoString(message), "\n")) C.free(unsafe.Pointer(message)) } }) if err != nil { return nil, err } return comp, nil } // LoadFile loads a component from the provided QML file. // Resources referenced by the QML content will be resolved relative to its path. // // Once a component is loaded, component instances may be created from // the resulting object via its Create and CreateWindow methods. func (e *Engine) LoadFile(path string) (Object, error) { if strings.HasPrefix(path, "qrc:") { return e.Load(path, nil) } // TODO Test this. f, err := os.Open(path) if err != nil { return nil, err } defer f.Close() return e.Load(path, f) } // LoadString loads a component from the provided QML string. // The location informs the resource name for logged messages, and its // path is used to locate any other resources referenced by the QML content. // // Once a component is loaded, component instances may be created from // the resulting object via its Create and CreateWindow methods. func (e *Engine) LoadString(location, qml string) (Object, error) { return e.Load(location, strings.NewReader(qml)) } // Context returns the engine's root context. func (e *Engine) Context() *Context { e.assertValid() var ctx Context ctx.engine = e RunMain(func() { ctx.addr = C.engineRootContext(e.addr) }) return &ctx } // TODO ObjectOf is probably still worth it, but turned out unnecessary // for GL functionality. Test it properly before introducing it. // ObjectOf returns the QML Object representation of the provided Go value // within the e engine. //func (e *Engine) ObjectOf(value interface{}) Object { // // TODO Would be good to preserve identity on the Go side. See unpackDataValue as well. // return &Common{ // engine: e, // addr: wrapGoValue(e, value, cppOwner), // } //} // Painter is provided to Paint methods on Go types that have displayable content. type Painter struct { engine *Engine obj Object glctxt glbase.Context } // Object returns the underlying object being painted. func (p *Painter) Object() Object { return p.obj } // GLContext returns the OpenGL context for this painter. func (p *Painter) GLContext() *glbase.Context { return &p.glctxt } // AddImageProvider registers f to be called when an image is requested by QML code // with the specified provider identifier. It is a runtime error to register the same // provider identifier multiple times. // // The imgId provided to f is the requested image source, with the "image:" scheme // and provider identifier removed. For example, with an image image source of // "image://myprovider/icons/home.ext", the respective imgId would be "icons/home.ext". // // If either the width or the height parameters provided to f are zero, no specific // size for the image was requested. If non-zero, the returned image should have the // the provided size, and will be resized if the returned image has a different size. // // See the documentation for more details on image providers: // // http://qt-project.org/doc/qt-5.0/qtquick/qquickimageprovider.html // func (e *Engine) AddImageProvider(prvId string, f func(imgId string, width, height int) image.Image) { if _, ok := e.imageProviders[prvId]; ok { panic(fmt.Sprintf("engine already has an image provider with id %q", prvId)) } e.imageProviders[prvId] = &f cprvId, cprvIdLen := unsafeStringData(prvId) RunMain(func() { qprvId := C.newString(cprvId, cprvIdLen) defer C.delString(qprvId) C.engineAddImageProvider(e.addr, qprvId, unsafe.Pointer(&f)) }) } //export hookRequestImage func hookRequestImage(imageFunc unsafe.Pointer, cid *C.char, cidLen, cwidth, cheight C.int) unsafe.Pointer { f := *(*func(imgId string, width, height int) image.Image)(imageFunc) id := unsafeString(cid, cidLen) width := int(cwidth) height := int(cheight) img := f(id, width, height) var cimage unsafe.Pointer rect := img.Bounds() width = rect.Max.X - rect.Min.X height = rect.Max.Y - rect.Min.Y cimage = C.newImage(C.int(width), C.int(height)) var cbits []byte cbitsh := (*reflect.SliceHeader)((unsafe.Pointer)(&cbits)) cbitsh.Data = (uintptr)((unsafe.Pointer)(C.imageBits(cimage))) cbitsh.Len = width * height * 4 // RGBA cbitsh.Cap = cbitsh.Len i := 0 for y := 0; y < height; y++ { for x := 0; x < width; x++ { r, g, b, a := img.At(x, y).RGBA() *(*uint32)(unsafe.Pointer(&cbits[i])) = (a>>8)<<24 | (r>>8)<<16 | (g>>8)<<8 | (b >> 8) i += 4 } } return cimage } // Context represents a QML context that can hold variables visible // to logic running within it. type Context struct { Common } // SetVar makes the provided value available as a variable with the // given name for QML code executed within the c context. // // If value is a struct, its exported fields are also made accessible to // QML code as attributes of the named object. The attribute name in the // object has the same name of the Go field name, except for the first // letter which is lowercased. This is conventional and enforced by // the QML implementation. // // The engine will hold a reference to the provided value, so it will // not be garbage collected until the engine is destroyed, even if the // value is unused or changed. func (ctx *Context) SetVar(name string, value interface{}) { cname, cnamelen := unsafeStringData(name) RunMain(func() { var dvalue C.DataValue packDataValue(value, &dvalue, ctx.engine, cppOwner) qname := C.newString(cname, cnamelen) defer C.delString(qname) C.contextSetProperty(ctx.addr, qname, &dvalue) }) } // SetVars makes the exported fields of the provided value available as // variables for QML code executed within the c context. The variable names // will have the same name of the Go field names, except for the first // letter which is lowercased. This is conventional and enforced by // the QML implementation. // // The engine will hold a reference to the provided value, so it will // not be garbage collected until the engine is destroyed, even if the // value is unused or changed. func (ctx *Context) SetVars(value interface{}) { RunMain(func() { C.contextSetObject(ctx.addr, wrapGoValue(ctx.engine, value, cppOwner)) }) } // Var returns the context variable with the given name. func (ctx *Context) Var(name string) interface{} { cname, cnamelen := unsafeStringData(name) var dvalue C.DataValue RunMain(func() { qname := C.newString(cname, cnamelen) defer C.delString(qname) C.contextGetProperty(ctx.addr, qname, &dvalue) }) return unpackDataValue(&dvalue, ctx.engine) } // Spawn creates a new context that has ctx as a parent. func (ctx *Context) Spawn() *Context { var result Context result.engine = ctx.engine RunMain(func() { result.addr = C.contextSpawn(ctx.addr) }) return &result } // Object is the common interface implemented by all QML types. // // See the documentation of Common for details about this interface. type Object interface { Common() *Common Addr() uintptr TypeName() string Interface() interface{} Set(property string, value interface{}) Property(name string) interface{} Int(property string) int Int64(property string) int64 Float64(property string) float64 Bool(property string) bool String(property string) string Color(property string) color.RGBA Object(property string) Object Map(property string) *Map List(property string) *List ObjectByName(objectName string) Object Call(method string, params ...interface{}) interface{} Create(ctx *Context) Object CreateWindow(ctx *Context) *Window Destroy() On(signal string, function interface{}) } // List holds a QML list which may be converted to a Go slice of an // appropriate type via Convert. // // In the future this will also be able to hold a reference // to QML-owned maps, so they can be mutated in place. type List struct { // In the future this will be able to hold a reference to QML-owned // lists, so they can be mutated. data []interface{} } // Len returns the number of elements in the list. func (l *List) Len() int { return len(l.data) } // Convert allocates a new slice and copies the list content into it, // performing type conversions as possible, and then assigns the result // to the slice pointed to by sliceAddr. // Convert panics if the list values are not compatible with the // provided slice. func (l *List) Convert(sliceAddr interface{}) { toPtr := reflect.ValueOf(sliceAddr) if toPtr.Kind() != reflect.Ptr || toPtr.Type().Elem().Kind() != reflect.Slice { panic(fmt.Sprintf("List.Convert got a sliceAddr parameter that is not a slice address: %#v", sliceAddr)) } err := convertAndSet(toPtr.Elem(), reflect.ValueOf(l), reflect.Value{}) if err != nil { panic(err.Error()) } } // Map holds a QML map which may be converted to a Go map of an // appropriate type via Convert. // // In the future this will also be able to hold a reference // to QML-owned maps, so they can be mutated in place. type Map struct { data []interface{} } // Len returns the number of pairs in the map. func (m *Map) Len() int { return len(m.data) / 2 } // Convert allocates a new map and copies the content of m property to it, // performing type conversions as possible, and then assigns the result to // the map pointed to by mapAddr. Map panics if m contains values that // cannot be converted to the type of the map at mapAddr. func (m *Map) Convert(mapAddr interface{}) { toPtr := reflect.ValueOf(mapAddr) if toPtr.Kind() != reflect.Ptr || toPtr.Type().Elem().Kind() != reflect.Map { panic(fmt.Sprintf("Map.Convert got a mapAddr parameter that is not a map address: %#v", mapAddr)) } err := convertAndSet(toPtr.Elem(), reflect.ValueOf(m), reflect.Value{}) if err != nil { panic(err.Error()) } } // Common implements the common behavior of all QML objects. // It implements the Object interface. type Common struct { addr unsafe.Pointer engine *Engine } var _ Object = (*Common)(nil) // CommonOf returns the Common QML value for the QObject at addr. // // This is meant for extensions that integrate directly with the // underlying QML logic. func CommonOf(addr unsafe.Pointer, engine *Engine) *Common { return &Common{addr, engine} } // Common returns obj itself. // // This provides access to the underlying *Common for types that // embed it, when these are used via the Object interface. func (obj *Common) Common() *Common { return obj } // TypeName returns the underlying type name for the held value. func (obj *Common) TypeName() string { var name string RunMain(func() { name = C.GoString(C.objectTypeName(obj.addr)) }) return name } // Addr returns the QML object address. // // This is meant for extensions that integrate directly with the // underlying QML logic. func (obj *Common) Addr() uintptr { return uintptr(obj.addr) } // Interface returns the underlying Go value that is being held by // the object wrapper. // // It is a runtime error to call Interface on values that are not // backed by a Go value. func (obj *Common) Interface() interface{} { var result interface{} var cerr *C.error RunMain(func() { var fold *valueFold if cerr = C.objectGoAddr(obj.addr, (*unsafe.Pointer)(unsafe.Pointer(&fold))); cerr == nil { result = fold.gvalue } }) cmust(cerr) return result } // Set changes the named object property to the given value. func (obj *Common) Set(property string, value interface{}) { cproperty := C.CString(property) defer C.free(unsafe.Pointer(cproperty)) var cerr *C.error RunMain(func() { var dvalue C.DataValue packDataValue(value, &dvalue, obj.engine, cppOwner) cerr = C.objectSetProperty(obj.addr, cproperty, &dvalue) }) cmust(cerr) } // Property returns the current value for a property of the object. // If the property type is known, type-specific methods such as Int // and String are more convenient to use. // Property panics if the property does not exist. func (obj *Common) Property(name string) interface{} { cname := C.CString(name) defer C.free(unsafe.Pointer(cname)) var dvalue C.DataValue var found C.int RunMain(func() { found = C.objectGetProperty(obj.addr, cname, &dvalue) }) if found == 0 { panic(fmt.Sprintf("object does not have a %q property", name)) } return unpackDataValue(&dvalue, obj.engine) } // Int returns the int value of the named property. // Int panics if the property cannot be represented as an int. func (obj *Common) Int(property string) int { switch value := obj.Property(property).(type) { case int64: return int(value) case int: return value case uint64: return int(value) case uint32: return int(value) case uintptr: return int(value) case float32: return int(value) case float64: return int(value) default: panic(fmt.Sprintf("value of property %q cannot be represented as an int: %#v", property, value)) } } // Int64 returns the int64 value of the named property. // Int64 panics if the property cannot be represented as an int64. func (obj *Common) Int64(property string) int64 { switch value := obj.Property(property).(type) { case int64: return value case int: return int64(value) case uint64: return int64(value) case uint32: return int64(value) case uintptr: return int64(value) case float32: return int64(value) case float64: return int64(value) default: panic(fmt.Sprintf("value of property %q cannot be represented as an int64: %#v", property, value)) } } // Float64 returns the float64 value of the named property. // Float64 panics if the property cannot be represented as float64. func (obj *Common) Float64(property string) float64 { switch value := obj.Property(property).(type) { case int64: return float64(value) case int: return float64(value) case uint64: return float64(value) case uint32: return float64(value) case uintptr: return float64(value) case float32: return float64(value) case float64: return value default: panic(fmt.Sprintf("value of property %q cannot be represented as a float64: %#v", property, value)) } } // Bool returns the bool value of the named property. // Bool panics if the property is not a bool. func (obj *Common) Bool(property string) bool { value := obj.Property(property) if b, ok := value.(bool); ok { return b } panic(fmt.Sprintf("value of property %q is not a bool: %#v", property, value)) } // String returns the string value of the named property. // String panics if the property is not a string. func (obj *Common) String(property string) string { value := obj.Property(property) if s, ok := value.(string); ok { return s } panic(fmt.Sprintf("value of property %q is not a string: %#v", property, value)) } // Color returns the RGBA value of the named property. // Color panics if the property is not a color. func (obj *Common) Color(property string) color.RGBA { value := obj.Property(property) c, ok := value.(color.RGBA) if !ok { panic(fmt.Sprintf("value of property %q is not a color: %#v", property, value)) } return c } // Object returns the object value of the named property. // Object panics if the property is not a QML object. func (obj *Common) Object(property string) Object { value := obj.Property(property) object, ok := value.(Object) if !ok { panic(fmt.Sprintf("value of property %q is not a QML object: %#v", property, value)) } return object } // List returns the list value of the named property. // List panics if the property is not a list. func (obj *Common) List(property string) *List { value := obj.Property(property) m, ok := value.(*List) if !ok { panic(fmt.Sprintf("value of property %q is not a QML list: %#v", property, value)) } return m } // Map returns the map value of the named property. // Map panics if the property is not a map. func (obj *Common) Map(property string) *Map { value := obj.Property(property) m, ok := value.(*Map) if !ok { panic(fmt.Sprintf("value of property %q is not a QML map: %#v", property, value)) } return m } // ObjectByName returns the Object value of the descendant object that // was defined with the objectName property set to the provided value. // ObjectByName panics if the object is not found. func (obj *Common) ObjectByName(objectName string) Object { cname, cnamelen := unsafeStringData(objectName) var dvalue C.DataValue var object Object RunMain(func() { qname := C.newString(cname, cnamelen) defer C.delString(qname) C.objectFindChild(obj.addr, qname, &dvalue) // unpackDataValue will also initialize the Go type, if necessary. value := unpackDataValue(&dvalue, obj.engine) if dvalue.dataType == C.DTGoAddr { datap := unsafe.Pointer(&dvalue.data) fold := (*(**valueFold)(datap)) if fold.init.IsValid() { panic("internal error: custom Go type not initialized") } object = &Common{fold.cvalue, fold.engine} } else { object, _ = value.(Object) } }) if object == nil { panic(fmt.Sprintf("cannot find descendant with objectName == %q", objectName)) } return object } // Call calls the given object method with the provided parameters. // Call panics if the method does not exist. func (obj *Common) Call(method string, params ...interface{}) interface{} { if len(params) > len(dataValueArray) { panic("too many parameters") } cmethod, cmethodLen := unsafeStringData(method) var result C.DataValue var cerr *C.error RunMain(func() { for i, param := range params { packDataValue(param, &dataValueArray[i], obj.engine, jsOwner) } cerr = C.objectInvoke(obj.addr, cmethod, cmethodLen, &result, &dataValueArray[0], C.int(len(params))) }) cmust(cerr) return unpackDataValue(&result, obj.engine) } // Create creates a new instance of the component held by obj. // The component instance runs under the ctx context. If ctx is nil, // it runs under the same context as obj. // // The Create method panics if called on an object that does not // represent a QML component. func (obj *Common) Create(ctx *Context) Object { if C.objectIsComponent(obj.addr) == 0 { panic("object is not a component") } var root Common root.engine = obj.engine RunMain(func() { ctxaddr := nilPtr if ctx != nil { ctxaddr = ctx.addr } root.addr = C.componentCreate(obj.addr, ctxaddr) }) return &root } // CreateWindow creates a new instance of the component held by obj, // and creates a new window holding the instance as its root object. // The component instance runs under the ctx context. If ctx is nil, // it runs under the same context as obj. // // The CreateWindow method panics if called on an object that // does not represent a QML component. func (obj *Common) CreateWindow(ctx *Context) *Window { if C.objectIsComponent(obj.addr) == 0 { panic("object is not a component") } var win Window win.engine = obj.engine RunMain(func() { ctxaddr := nilPtr if ctx != nil { ctxaddr = ctx.addr } win.addr = C.componentCreateWindow(obj.addr, ctxaddr) }) return &win } // Destroy finalizes the value and releases any resources used. // The value must not be used after calling this method. func (obj *Common) Destroy() { // TODO We might hook into the destroyed signal, and prevent this object // from being used in post-destruction crash-prone ways. RunMain(func() { if obj.addr != nilPtr { C.delObjectLater(obj.addr) obj.addr = nilPtr } }) } var connectedFunction = make(map[*interface{}]bool) // On connects the named signal from obj with the provided function, so that // when obj next emits that signal, the function is called with the parameters // the signal carries. // // The provided function must accept a number of parameters that is equal to // or less than the number of parameters provided by the signal, and the // resepctive parameter types must match exactly or be conversible according // to normal Go rules. // // For example: // // obj.On("clicked", func() { fmt.Println("obj got a click") }) // // Note that Go uses the real signal name, rather than the one used when // defining QML signal handlers ("clicked" rather than "onClicked"). // // For more details regarding signals and QML see: // // http://qt-project.org/doc/qt-5.0/qtqml/qml-qtquick2-connections.html // func (obj *Common) On(signal string, function interface{}) { funcv := reflect.ValueOf(function) funct := funcv.Type() if funcv.Kind() != reflect.Func { panic("function provided to On is not a function or method") } if funct.NumIn() > C.MaxParams { panic("function takes too many arguments") } csignal, csignallen := unsafeStringData(signal) var cerr *C.error RunMain(func() { cerr = C.objectConnect(obj.addr, csignal, csignallen, obj.engine.addr, unsafe.Pointer(&function), C.int(funcv.Type().NumIn())) if cerr == nil { connectedFunction[&function] = true stats.connectionsAlive(+1) } }) cmust(cerr) } //export hookSignalDisconnect func hookSignalDisconnect(funcp unsafe.Pointer) { before := len(connectedFunction) delete(connectedFunction, (*interface{})(funcp)) if before == len(connectedFunction) { panic("disconnecting unknown signal function") } stats.connectionsAlive(-1) } //export hookSignalCall func hookSignalCall(enginep unsafe.Pointer, funcp unsafe.Pointer, args *C.DataValue) { engine := engines[enginep] if engine == nil { panic("signal called after engine was destroyed") } funcv := reflect.ValueOf(*(*interface{})(funcp)) funct := funcv.Type() numIn := funct.NumIn() var params [C.MaxParams]reflect.Value for i := 0; i < numIn; i++ { arg := (*C.DataValue)(unsafe.Pointer(uintptr(unsafe.Pointer(args)) + uintptr(i)*dataValueSize)) param := reflect.ValueOf(unpackDataValue(arg, engine)) if paramt := funct.In(i); param.Type() != paramt { // TODO Provide a better error message when this fails. param = param.Convert(paramt) } params[i] = param } funcv.Call(params[:numIn]) } func cerror(cerr *C.error) error { err := errors.New(C.GoString((*C.char)(unsafe.Pointer(cerr)))) C.free(unsafe.Pointer(cerr)) return err } func cmust(cerr *C.error) { if cerr != nil { panic(cerror(cerr).Error()) } } // TODO Signal emitting support for go values. // Window represents a QML window where components are rendered. type Window struct { Common } // Show exposes the window. func (win *Window) Show() { RunMain(func() { C.windowShow(win.addr) }) } // Hide hides the window. func (win *Window) Hide() { RunMain(func() { C.windowHide(win.addr) }) } // PlatformId returns the window's platform id. // // For platforms where this id might be useful, the value returned will // uniquely represent the window inside the corresponding screen. func (win *Window) PlatformId() uintptr { var id uintptr RunMain(func() { id = uintptr(C.windowPlatformId(win.addr)) }) return id } // Root returns the root object being rendered. // // If the window was defined in QML code, the root object is the window itself. func (win *Window) Root() Object { var obj Common obj.engine = win.engine RunMain(func() { obj.addr = C.windowRootObject(win.addr) }) return &obj } // Wait blocks the current goroutine until the window is closed. func (win *Window) Wait() { // XXX Test this. var m sync.Mutex m.Lock() RunMain(func() { // TODO Must be able to wait for the same Window from multiple goroutines. // TODO If the window is not visible, must return immediately. waitingWindows[win.addr] = &m C.windowConnectHidden(win.addr) }) m.Lock() } var waitingWindows = make(map[unsafe.Pointer]*sync.Mutex) //export hookWindowHidden func hookWindowHidden(addr unsafe.Pointer) { m, ok := waitingWindows[addr] if !ok { panic("window is not waiting") } delete(waitingWindows, addr) m.Unlock() } // Snapshot returns an image with the visible contents of the window. // The main GUI thread is paused while the data is being acquired. func (win *Window) Snapshot() image.Image { // TODO Test this. var cimage unsafe.Pointer RunMain(func() { cimage = C.windowGrabWindow(win.addr) }) defer C.delImage(cimage) // This should be safe to be done out of the main GUI thread. var cwidth, cheight C.int C.imageSize(cimage, &cwidth, &cheight) var cbits []byte cbitsh := (*reflect.SliceHeader)((unsafe.Pointer)(&cbits)) cbitsh.Data = (uintptr)((unsafe.Pointer)(C.imageConstBits(cimage))) cbitsh.Len = int(cwidth * cheight * 8) // ARGB cbitsh.Cap = cbitsh.Len image := image.NewRGBA(image.Rect(0, 0, int(cwidth), int(cheight))) l := int(cwidth * cheight * 4) for i := 0; i < l; i += 4 { var c uint32 = *(*uint32)(unsafe.Pointer(&cbits[i])) image.Pix[i+0] = byte(c >> 16) image.Pix[i+1] = byte(c >> 8) image.Pix[i+2] = byte(c) image.Pix[i+3] = byte(c >> 24) } return image } // TypeSpec holds the specification of a QML type that is backed by Go logic. // // The type specification must be registered with the RegisterTypes function // before it will be visible to QML code, as in: // // qml.RegisterTypes("GoExtensions", 1, 0, []qml.TypeSpec{{ // Init: func(p *Person, obj qml.Object) {}, // }}) // // See the package documentation for more details. // type TypeSpec struct { // Init must be set to a function that is called when QML code requests // the creation of a new value of this type. The provided function must // have the following type: // // func(value *CustomType, object qml.Object) // // Where CustomType is the custom type being registered. The function will // be called with a newly created *CustomType and its respective qml.Object. Init interface{} // Name optionally holds the identifier the type is known as within QML code, // when the registered extension module is imported. If not specified, the // name of the Go type provided as the first argument of Init is used instead. Name string // Singleton defines whether a single instance of the type should be used // for all accesses, as a singleton value. If true, all properties of the // singleton value are directly accessible under the type name. Singleton bool private struct{} // Force use of fields by name. } var types []*TypeSpec // RegisterTypes registers the provided list of type specifications for use // by QML code. To access the registered types, they must be imported from the // provided location and major.minor version numbers. // // For example, with a location "GoExtensions", major 4, and minor 2, this statement // imports all the registered types in the module's namespace: // // import GoExtensions 4.2 // // See the documentation on QML import statements for details on these: // // http://qt-project.org/doc/qt-5.0/qtqml/qtqml-syntax-imports.html // func RegisterTypes(location string, major, minor int, types []TypeSpec) { for i := range types { err := registerType(location, major, minor, &types[i]) if err != nil { panic(err) } } } func registerType(location string, major, minor int, spec *TypeSpec) error { // Copy and hold a reference to the spec data. localSpec := *spec f := reflect.ValueOf(localSpec.Init) ft := f.Type() if ft.Kind() != reflect.Func { return fmt.Errorf("TypeSpec.Init must be a function, got %#v", localSpec.Init) } if ft.NumIn() != 2 { return fmt.Errorf("TypeSpec.Init's function must accept two arguments: %s", ft) } firstArg := ft.In(0) if firstArg.Kind() != reflect.Ptr || firstArg.Elem().Kind() == reflect.Ptr { return fmt.Errorf("TypeSpec.Init's function must take a pointer type as the second argument: %s", ft) } if ft.In(1) != typeObject { return fmt.Errorf("TypeSpec.Init's function must take qml.Object as the second argument: %s", ft) } customType := typeInfo(reflect.New(firstArg.Elem()).Interface()) if localSpec.Name == "" { localSpec.Name = firstArg.Elem().Name() if localSpec.Name == "" { panic("cannot determine registered type name; please provide one explicitly") } } var err error RunMain(func() { cloc := C.CString(location) cname := C.CString(localSpec.Name) cres := C.int(0) if localSpec.Singleton { cres = C.registerSingleton(cloc, C.int(major), C.int(minor), cname, customType, unsafe.Pointer(&localSpec)) } else { cres = C.registerType(cloc, C.int(major), C.int(minor), cname, customType, unsafe.Pointer(&localSpec)) } // It doesn't look like it keeps references to these, but it's undocumented and unclear. C.free(unsafe.Pointer(cloc)) C.free(unsafe.Pointer(cname)) if cres == -1 { err = fmt.Errorf("QML engine failed to register type; invalid type location or name?") } else { types = append(types, &localSpec) } }) return err } // RegisterConverter registers the convereter function to be called when a // value with the provided type name is obtained from QML logic. The function // must return the new value to be used in place of the original value. func RegisterConverter(typeName string, converter func(engine *Engine, obj Object) interface{}) { if converter == nil { delete(converters, typeName) } else { converters[typeName] = converter } } var converters = make(map[string]func(engine *Engine, obj Object) interface{}) // LoadResources registers all resources in the provided resources collection, // making them available to be loaded by any Engine and QML file. // Registered resources are made available under "qrc:///some/path", where // "some/path" is the path the resource was added with. func LoadResources(r *Resources) { var base unsafe.Pointer if len(r.sdata) > 0 { base = *(*unsafe.Pointer)(unsafe.Pointer(&r.sdata)) } else if len(r.bdata) > 0 { base = *(*unsafe.Pointer)(unsafe.Pointer(&r.bdata)) } tree := (*C.char)(unsafe.Pointer(uintptr(base)+uintptr(r.treeOffset))) name := (*C.char)(unsafe.Pointer(uintptr(base)+uintptr(r.nameOffset))) data := (*C.char)(unsafe.Pointer(uintptr(base)+uintptr(r.dataOffset))) C.registerResourceData(C.int(r.version), tree, name, data) } // UnloadResources unregisters all previously registered resources from r. func UnloadResources(r *Resources) { var base unsafe.Pointer if len(r.sdata) > 0 { base = *(*unsafe.Pointer)(unsafe.Pointer(&r.sdata)) } else if len(r.bdata) > 0 { base = *(*unsafe.Pointer)(unsafe.Pointer(&r.bdata)) } tree := (*C.char)(unsafe.Pointer(uintptr(base)+uintptr(r.treeOffset))) name := (*C.char)(unsafe.Pointer(uintptr(base)+uintptr(r.nameOffset))) data := (*C.char)(unsafe.Pointer(uintptr(base)+uintptr(r.dataOffset))) C.unregisterResourceData(C.int(r.version), tree, name, data) } ciborium-0.2.12+15.10.20150612/qml.v1/doc.go0000644000015300001610000001612412536576717020174 0ustar pbuserpbgroup00000000000000// Package qml offers graphical QML application support for the Go language. // // Attention // // This package is in an alpha stage, and still in heavy development. APIs may // change, and things may break. // // At this time contributors and developers that are interested in tracking the // development closely are encouraged to use it. If you'd prefer a more stable // release, please hold on a bit and subscribe to the mailing list for news. It's // in a pretty good state, so it shall not take too long. // // See http://github.com/go-qml/qml for details. // // // Introduction // // The qml package enables Go programs to display and manipulate graphical content // using Qt's QML framework. QML uses a declarative language to express structure // and style, and supports JavaScript for in-place manipulation of the described // content. When using the Go qml package, such QML content can also interact with // Go values, making use of its exported fields and methods, and even explicitly // creating new instances of registered Go types. // // A simple Go application that integrates with QML may perform the following steps // for offering a graphical interface: // // * Call qml.Run from function main providing a function with the logic below // * Create an engine for loading and running QML content (see NewEngine) // * Make Go values and types available to QML (see Context.SetVar and RegisterType) // * Load QML content (see Engine.LoadString and Engine.LoadFile) // * Create a new window for the content (see Component.CreateWindow) // * Show the window and wait for it to be closed (see Window.Show and Window.Wait) // // Some of these topics are covered below, and may also be observed in practice // in the following examples: // // https://github.com/go-qml/qml/tree/v1/examples // // // Simple example // // The following logic demonstrates loading a QML file into a window: // // func main() { // err := qml.Run(run) // ... // } // // func run() error { // engine := qml.NewEngine() // component, err := engine.LoadFile("file.qml") // if err != nil { // return err // } // win := component.CreateWindow(nil) // win.Show() // win.Wait() // return nil // } // // Handling QML objects in Go // // Any QML object may be manipulated by Go via the Object interface. That // interface is implemented both by dynamic QML values obtained from a running // engine, and by Go types in the qml package that represent QML values, such as // Window, Context, and Engine. // // For example, the following logic creates a window and prints its width // whenever it's made visible: // // win := component.CreateWindow(nil) // win.On("visibleChanged", func(visible bool) { // if (visible) { // fmt.Println("Width:", win.Int("width")) // } // }) // // Information about the methods, properties, and signals that are available for QML // objects may be obtained in the Qt documentation. As a reference, the "visibleChanged" // signal and the "width" property used in the example above are described at: // // http://qt-project.org/doc/qt-5.0/qtgui/qwindow.html // // When in doubt about what type is being manipulated, the Object.TypeName method // provides the type name of the underlying value. // // // Publishing Go values to QML // // The simplest way of making a Go value available to QML code is setting it // as a variable of the engine's root context, as in: // // context := engine.Context() // context.SetVar("person", &Person{Name: "Ale"}) // // This logic would enable the following QML code to successfully run: // // import QtQuick 2.0 // Item { // Component.onCompleted: console.log("Name is", person.name) // } // // // Publishing Go types to QML // // While registering an individual Go value as described above is a quick way to get // started, it is also fairly limited. For more flexibility, a Go type may be // registered so that QML code can natively create new instances in an arbitrary // position of the structure. This may be achieved via the RegisterType function, as // the following example demonstrates: // // qml.RegisterTypes("GoExtensions", 1, 0, []qml.TypeSpec{{ // Init: func(p *Person, obj qml.Object) { p.Name = "" }, // }}) // // With this logic in place, QML code can create new instances of Person by itself: // // import QtQuick 2.0 // import GoExtensions 1.0 // Item{ // Person { // id: person // name: "Ale" // } // Component.onCompleted: console.log("Name is", person.name) // } // // // Lowercasing of names // // Independently from the mechanism used to publish a Go value to QML code, its methods // and fields are available to QML logic as methods and properties of the // respective QML object representing it. As required by QML, though, the Go // method and field names are lowercased according to the following scheme when // being accesed from QML: // // value.Name => value.name // value.UPPERName => value.upperName // value.UPPER => value.upper // // // Setters and getters // // While QML code can directly read and write exported fields of Go values, as described // above, a Go type can also intercept writes to specific fields by declaring a setter // method according to common Go conventions. This is often useful for updating the // internal state or the visible content of a Go-defined type. // // For example: // // type Person struct { // Name string // } // // func (p *Person) SetName(name string) { // fmt.Println("Old name is", p.Name) // p.Name = name // fmt.Println("New name is", p.Name) // } // // In the example above, whenever QML code attempts to update the Person.Name field // via any means (direct assignment, object declarations, etc) the SetName method // is invoked with the provided value instead. // // A setter method may also be used in conjunction with a getter method rather // than a real type field. A method is only considered a getter in the presence // of the respective setter, and according to common Go conventions it must not // have the Get prefix. // // Inside QML logic, the getter and setter pair is seen as a single object property. // // // Painting // // Custom types implemented in Go may have displayable content by defining // a Paint method such as: // // func (p *Person) Paint(painter *qml.Painter) { // // ... OpenGL calls with the launchpad.net/ciborium/qml.v1/gl/ package ... // } // // A simple example is available at: // // https://github.com/go-qml/qml/tree/v1/examples/painting // // // Packing resources into the Go qml binary // // Resource files (qml code, images, etc) may be packed into the Go qml application // binary to simplify its handling and distribution. This is done with the genqrc tool: // // http://launchpad.net/ciborium/qml.v1/cmd/genqrc#usage // // The following blog post provides more details: // // http://blog.labix.org/2014/09/26/packing-resources-into-go-qml-binaries // package qml ciborium-0.2.12+15.10.20150612/qml.v1/bridge.go0000644000015300001610000004717012536576717020670 0ustar pbuserpbgroup00000000000000package qml // #cgo CPPFLAGS: -I./cpp // #cgo CXXFLAGS: -std=c++0x -pedantic-errors -Wall -fno-strict-aliasing // #cgo LDFLAGS: -lstdc++ // #cgo pkg-config: Qt5Core Qt5Widgets Qt5Quick // // #include // // #include "cpp/capi.h" // import "C" import ( "fmt" "os" "reflect" "runtime" "sync/atomic" "unsafe" "launchpad.net/ciborium/qml.v1/cdata" ) var ( guiFunc = make(chan func()) guiDone = make(chan struct{}) guiLock = 0 guiMainRef uintptr guiPaintRef uintptr guiIdleRun int32 initialized int32 ) func init() { runtime.LockOSThread() guiMainRef = cdata.Ref() } // Run runs the main QML event loop, runs f, and then terminates the // event loop once f returns. // // Most functions from the qml package block until Run is called. // // The Run function must necessarily be called from the same goroutine as // the main function or the application may fail when running on Mac OS. func Run(f func() error) error { if cdata.Ref() != guiMainRef { panic("Run must be called on the initial goroutine so apps are portable to Mac OS") } if !atomic.CompareAndSwapInt32(&initialized, 0, 1) { panic("qml.Run called more than once") } C.newGuiApplication() C.idleTimerInit((*C.int32_t)(&guiIdleRun)) done := make(chan error, 1) go func() { RunMain(func() {}) // Block until the event loop is running. done <- f() C.applicationExit() }() C.applicationExec() return <-done } // RunMain runs f in the main QML thread and waits for f to return. // // This is meant to be used by extensions that integrate directly with the // underlying QML logic. func RunMain(f func()) { ref := cdata.Ref() if ref == guiMainRef || ref == atomic.LoadUintptr(&guiPaintRef) { // Already within the GUI or render threads. Attempting to wait would deadlock. f() return } // Tell Qt we're waiting for the idle hook to be called. if atomic.AddInt32(&guiIdleRun, 1) == 1 { C.idleTimerStart() } // Send f to be executed by the idle hook in the main GUI thread. guiFunc <- f // Wait until f is done executing. <-guiDone } // Lock freezes all QML activity by blocking the main event loop. // Locking is necessary before updating shared data structures // without race conditions. // // It's safe to use qml functionality while holding a lock, as // long as the requests made do not depend on follow up QML // events to be processed before returning. If that happens, the // problem will be observed as the application freezing. // // The Lock function is reentrant. That means it may be called // multiple times, and QML activities will only be resumed after // Unlock is called a matching number of times. func Lock() { // TODO Better testing for this. RunMain(func() { guiLock++ }) } // Unlock releases the QML event loop. See Lock for details. func Unlock() { RunMain(func() { if guiLock == 0 { panic("qml.Unlock called without lock being held") } guiLock-- }) } // Flush synchronously flushes all pending QML activities. func Flush() { // TODO Better testing for this. RunMain(func() { C.applicationFlushAll() }) } // Changed notifies all QML bindings that the given field value has changed. // // For example: // // qml.Changed(&value, &value.Field) // func Changed(value, fieldAddr interface{}) { valuev := reflect.ValueOf(value) fieldv := reflect.ValueOf(fieldAddr) for valuev.Kind() == reflect.Ptr { valuev = valuev.Elem() } if fieldv.Kind() != reflect.Ptr { panic("qml.Changed received non-address value as fieldAddr") } fieldv = fieldv.Elem() if fieldv.Type().Size() == 0 { panic("cannot report changes on zero-sized fields") } offset := fieldv.UnsafeAddr() - valuev.UnsafeAddr() if !(0 <= offset && offset < valuev.Type().Size()) { panic("provided field is not a member of the given value") } RunMain(func() { tinfo := typeInfo(value) for _, engine := range engines { fold := engine.values[value] for fold != nil { C.goValueActivate(fold.cvalue, tinfo, C.int(offset)) fold = fold.next } // TODO typeNew might also be a linked list keyed by the gvalue. // This would prevent the iteration and the deferrals. for fold, _ = range typeNew { if fold.gvalue == value { // Activate these later so they don't get recursively moved // out of typeNew while the iteration is still happening. defer C.goValueActivate(fold.cvalue, tinfo, C.int(offset)) } } } }) } // hookIdleTimer is run once per iteration of the Qt event loop, // within the main GUI thread, but only if at least one goroutine // has atomically incremented guiIdleRun. // //export hookIdleTimer func hookIdleTimer() { var f func() for { select { case f = <-guiFunc: default: if guiLock > 0 { f = <-guiFunc } else { return } } f() guiDone <- struct{}{} atomic.AddInt32(&guiIdleRun, -1) } } type valueFold struct { engine *Engine gvalue interface{} cvalue unsafe.Pointer init reflect.Value prev *valueFold next *valueFold owner valueOwner } type valueOwner uint8 const ( cppOwner = 1 << iota jsOwner ) // wrapGoValue creates a new GoValue object in C++ land wrapping // the Go value contained in the given interface. // // This must be run from the main GUI thread. func wrapGoValue(engine *Engine, gvalue interface{}, owner valueOwner) (cvalue unsafe.Pointer) { gvaluev := reflect.ValueOf(gvalue) gvaluek := gvaluev.Kind() if gvaluek == reflect.Struct && !hashable(gvalue) { name := gvaluev.Type().Name() if name != "" { name = " (" + name + ")" } panic("cannot hand an unhashable struct value" + name + " to QML logic; use its address instead") } if gvaluek == reflect.Ptr && gvaluev.Elem().Kind() == reflect.Ptr { panic("cannot hand pointer of pointer to QML logic; use a simple pointer instead") } painting := cdata.Ref() == atomic.LoadUintptr(&guiPaintRef) // Cannot reuse a jsOwner because the QML runtime may choose to destroy // the value _after_ we hand it a new reference to the same value. // See issue #68 for details. prev, ok := engine.values[gvalue] if ok && (prev.owner == cppOwner || painting) { return prev.cvalue } if painting { panic("cannot allocate new objects while painting") } parent := nilPtr if owner == cppOwner { parent = engine.addr } fold := &valueFold{ engine: engine, gvalue: gvalue, owner: owner, } fold.cvalue = C.newGoValue(unsafe.Pointer(fold), typeInfo(gvalue), parent) if prev != nil { // Put new fold first so the single cppOwner, if any, is always the first entry. fold.next = prev prev.prev = fold } engine.values[gvalue] = fold //fmt.Printf("[DEBUG] value alive (wrapped): cvalue=%x gvalue=%x/%#v\n", fold.cvalue, addrOf(fold.gvalue), fold.gvalue) stats.valuesAlive(+1) C.engineSetContextForObject(engine.addr, fold.cvalue) switch owner { case cppOwner: C.engineSetOwnershipCPP(engine.addr, fold.cvalue) case jsOwner: C.engineSetOwnershipJS(engine.addr, fold.cvalue) } return fold.cvalue } func addrOf(gvalue interface{}) uintptr { return reflect.ValueOf(gvalue).Pointer() } // typeNew holds fold values that are created by registered types. // These values are special in two senses: first, they don't have a // reference to an engine before they are used in a context that can // set the reference; second, these values always hold a new cvalue, // because they are created as a side-effect of the registered type // being instantiated (it's too late to reuse an existent cvalue). // // For these reasons, typeNew holds the fold for these values until // their engine is known, and once it's known they may have to be // added to the linked list, since mulitple references for the same // gvalue may occur. var typeNew = make(map[*valueFold]bool) //export hookGoValueTypeNew func hookGoValueTypeNew(cvalue unsafe.Pointer, specp unsafe.Pointer) (foldp unsafe.Pointer) { // Initialization is postponed until the engine is available, so that // we can hand Init the qml.Object that represents the object. init := reflect.ValueOf((*TypeSpec)(specp).Init) fold := &valueFold{ init: init, gvalue: reflect.New(init.Type().In(0).Elem()).Interface(), cvalue: cvalue, owner: jsOwner, } typeNew[fold] = true //fmt.Printf("[DEBUG] value alive (type-created): cvalue=%x gvalue=%x/%#v\n", fold.cvalue, addrOf(fold.gvalue), fold.gvalue) stats.valuesAlive(+1) return unsafe.Pointer(fold) } //export hookGoValueDestroyed func hookGoValueDestroyed(enginep unsafe.Pointer, foldp unsafe.Pointer) { fold := (*valueFold)(foldp) engine := fold.engine if engine == nil { before := len(typeNew) delete(typeNew, fold) if len(typeNew) == before { panic("destroying value without an associated engine; who created the value?") } } else if engines[engine.addr] == nil { // Must never do that. The engine holds memory references that C++ depends on. panic(fmt.Sprintf("engine %p was released from global list while its values were still alive", engine.addr)) } else { switch { case fold.prev != nil: fold.prev.next = fold.next if fold.next != nil { fold.next.prev = fold.prev } case fold.next != nil: fold.next.prev = fold.prev if fold.prev != nil { fold.prev.next = fold.next } else { fold.engine.values[fold.gvalue] = fold.next } default: before := len(engine.values) delete(engine.values, fold.gvalue) if len(engine.values) == before { panic("destroying value that knows about the engine, but the engine doesn't know about the value; who cleared the engine?") } if engine.destroyed && len(engine.values) == 0 { delete(engines, engine.addr) } } } //fmt.Printf("[DEBUG] value destroyed: cvalue=%x gvalue=%x/%#v\n", fold.cvalue, addrOf(fold.gvalue), fold.gvalue) stats.valuesAlive(-1) } func deref(value reflect.Value) reflect.Value { for { switch value.Kind() { case reflect.Ptr, reflect.Interface: value = value.Elem() continue } return value } panic("cannot happen") } //export hookGoValueReadField func hookGoValueReadField(enginep, foldp unsafe.Pointer, reflectIndex, getIndex, setIndex C.int, resultdv *C.DataValue) { fold := ensureEngine(enginep, foldp) var field reflect.Value if getIndex >= 0 { field = reflect.ValueOf(fold.gvalue).Method(int(getIndex)).Call(nil)[0] } else { field = deref(reflect.ValueOf(fold.gvalue)).Field(int(reflectIndex)) } field = deref(field) // Cannot compare Type directly as field may be invalid (nil). if field.Kind() == reflect.Slice && field.Type() == typeObjSlice { // TODO Handle getters that return []qml.Object. // TODO Handle other GoValue slices (!= []qml.Object). resultdv.dataType = C.DTListProperty *(*unsafe.Pointer)(unsafe.Pointer(&resultdv.data)) = C.newListProperty(foldp, C.intptr_t(reflectIndex), C.intptr_t(setIndex)) return } fieldk := field.Kind() if fieldk == reflect.Slice || fieldk == reflect.Struct && field.Type() != typeRGBA { if field.CanAddr() { field = field.Addr() } else if !hashable(field.Interface()) { t := reflect.ValueOf(fold.gvalue).Type() for t.Kind() == reflect.Ptr { t = t.Elem() } panic(fmt.Sprintf("cannot access unaddressable and unhashable struct value on interface field %s.%s; value: %#v", t.Name(), t.Field(int(reflectIndex)).Name, field.Interface())) } } var gvalue interface{} if field.IsValid() { gvalue = field.Interface() } // TODO Strings are being passed in an unsafe manner here. There is a // small chance that the field is changed and the garbage collector is run // before C++ has a chance to look at the data. We can solve this problem // by queuing up values in a stack, and cleaning the stack when the // idle timer fires next. packDataValue(gvalue, resultdv, fold.engine, jsOwner) } //export hookGoValueWriteField func hookGoValueWriteField(enginep, foldp unsafe.Pointer, reflectIndex, setIndex C.int, assigndv *C.DataValue) { fold := ensureEngine(enginep, foldp) v := reflect.ValueOf(fold.gvalue) ve := v for ve.Type().Kind() == reflect.Ptr { ve = ve.Elem() } var field, setMethod reflect.Value if reflectIndex >= 0 { // It's a real field rather than a getter. field = ve.Field(int(reflectIndex)) } if setIndex >= 0 { // It has a setter. setMethod = v.Method(int(setIndex)) } assign := unpackDataValue(assigndv, fold.engine) // TODO Return false to the call site if it fails. That's how Qt seems to handle it internally. err := convertAndSet(field, reflect.ValueOf(assign), setMethod) if err != nil { panic(err.Error()) } } func convertAndSet(to, from reflect.Value, setMethod reflect.Value) (err error) { var toType reflect.Type if setMethod.IsValid() { toType = setMethod.Type().In(0) } else { toType = to.Type() } fromType := from.Type() defer func() { // TODO This is catching more than it should. There are calls // to custom code below that should be isolated. if v := recover(); v != nil { err = fmt.Errorf("cannot use %s as a %s", fromType, toType) } }() if fromType == typeList && toType.Kind() == reflect.Slice { list := from.Interface().(*List) from = reflect.MakeSlice(toType, len(list.data), len(list.data)) elemType := toType.Elem() for i, elem := range list.data { from.Index(i).Set(reflect.ValueOf(elem).Convert(elemType)) } } else if fromType == typeMap && toType.Kind() == reflect.Map { qmap := from.Interface().(*Map) from = reflect.MakeMap(toType) elemType := toType.Elem() for i := 0; i < len(qmap.data); i += 2 { key := reflect.ValueOf(qmap.data[i]) val := reflect.ValueOf(qmap.data[i+1]) if val.Type() != elemType { val = val.Convert(elemType) } from.SetMapIndex(key, val) } } else if toType != fromType { from = from.Convert(toType) } if setMethod.IsValid() { setMethod.Call([]reflect.Value{from}) } else { to.Set(from) } return nil } var ( dataValueSize = uintptr(unsafe.Sizeof(C.DataValue{})) dataValueArray [C.MaxParams]C.DataValue ) //export hookGoValueCallMethod func hookGoValueCallMethod(enginep, foldp unsafe.Pointer, reflectIndex C.int, args *C.DataValue) { fold := ensureEngine(enginep, foldp) v := reflect.ValueOf(fold.gvalue) // TODO Must assert that v is necessarily a pointer here, but we shouldn't have to manipulate // gvalue here for that. This should happen in a sensible place in the wrapping functions // that can still error out to the user in due time. method := v.Method(int(reflectIndex)) methodt := method.Type() methodName := v.Type().Method(int(reflectIndex)).Name // TODO Ensure methods with more parameters than this are not registered. var params [C.MaxParams]reflect.Value var err error numIn := methodt.NumIn() for i := 0; i < numIn; i++ { paramdv := (*C.DataValue)(unsafe.Pointer(uintptr(unsafe.Pointer(args)) + (uintptr(i)+1)*dataValueSize)) param := reflect.ValueOf(unpackDataValue(paramdv, fold.engine)) if argt := methodt.In(i); param.Type() != argt { param, err = convertParam(methodName, i, param, argt) if err != nil { panic(err.Error()) } } params[i] = param } result := method.Call(params[:numIn]) if len(result) == 1 { packDataValue(result[0].Interface(), args, fold.engine, jsOwner) } else if len(result) > 1 { if len(result) > len(dataValueArray) { panic("function has too many results") } for i, v := range result { packDataValue(v.Interface(), &dataValueArray[i], fold.engine, jsOwner) } args.dataType = C.DTVariantList *(*unsafe.Pointer)(unsafe.Pointer(&args.data)) = C.newVariantList(&dataValueArray[0], C.int(len(result))) } } func convertParam(methodName string, index int, param reflect.Value, argt reflect.Type) (reflect.Value, error) { out := reflect.New(argt).Elem() err := convertAndSet(out, param, reflect.Value{}) if err != nil { err = fmt.Errorf("cannot convert parameter %d of method %s from %s to %s; provided value: %#v", index, methodName, param.Type(), argt, param.Interface()) return reflect.Value{}, err } return out, nil } func printPaintPanic() { if v := recover(); v != nil { buf := make([]byte, 8192) runtime.Stack(buf, false) fmt.Fprintf(os.Stderr, "panic while painting: %s\n\n%s", v, buf) } } //export hookGoValuePaint func hookGoValuePaint(enginep, foldp unsafe.Pointer, reflectIndex C.intptr_t) { // Besides a convenience this is a workaround for http://golang.org/issue/8588 defer printPaintPanic() defer atomic.StoreUintptr(&guiPaintRef, 0) // The main GUI thread is mutex-locked while paint methods are called, // so no two paintings should be happening at the same time. atomic.StoreUintptr(&guiPaintRef, cdata.Ref()) fold := ensureEngine(enginep, foldp) if fold.init.IsValid() { return } painter := &Painter{engine: fold.engine, obj: &Common{fold.cvalue, fold.engine}} v := reflect.ValueOf(fold.gvalue) method := v.Method(int(reflectIndex)) method.Call([]reflect.Value{reflect.ValueOf(painter)}) } func ensureEngine(enginep, foldp unsafe.Pointer) *valueFold { fold := (*valueFold)(foldp) if fold.engine != nil { if fold.init.IsValid() { initGoType(fold) } return fold } if enginep == nilPtr { panic("accessing value without an engine pointer; who created the value?") } engine := engines[enginep] if engine == nil { panic("unknown engine pointer; who created the engine?") } fold.engine = engine prev := engine.values[fold.gvalue] if prev != nil { for prev.next != nil { prev = prev.next } prev.next = fold fold.prev = prev } else { engine.values[fold.gvalue] = fold } before := len(typeNew) delete(typeNew, fold) if len(typeNew) == before { panic("value had no engine, but was not created by a registered type; who created the value?") } initGoType(fold) return fold } func initGoType(fold *valueFold) { if cdata.Ref() == atomic.LoadUintptr(&guiPaintRef) { go RunMain(func() { _initGoType(fold, true) }) } else { _initGoType(fold, false) } } func _initGoType(fold *valueFold, schedulePaint bool) { if !fold.init.IsValid() { return } // TODO Would be good to preserve identity on the Go side. See unpackDataValue as well. obj := &Common{engine: fold.engine, addr: fold.cvalue} fold.init.Call([]reflect.Value{reflect.ValueOf(fold.gvalue), reflect.ValueOf(obj)}) fold.init = reflect.Value{} if schedulePaint { obj.Call("update") } } //export hookPanic func hookPanic(message *C.char) { defer C.free(unsafe.Pointer(message)) panic(C.GoString(message)) } func listSlice(fold *valueFold, reflectIndex C.intptr_t) *[]Object { field := deref(reflect.ValueOf(fold.gvalue)).Field(int(reflectIndex)) return field.Addr().Interface().(*[]Object) } //export hookListPropertyAt func hookListPropertyAt(foldp unsafe.Pointer, reflectIndex, setIndex C.intptr_t, index C.int) (objp unsafe.Pointer) { fold := (*valueFold)(foldp) slice := listSlice(fold, reflectIndex) return (*slice)[int(index)].Common().addr } //export hookListPropertyCount func hookListPropertyCount(foldp unsafe.Pointer, reflectIndex, setIndex C.intptr_t) C.int { fold := (*valueFold)(foldp) slice := listSlice(fold, reflectIndex) return C.int(len(*slice)) } //export hookListPropertyAppend func hookListPropertyAppend(foldp unsafe.Pointer, reflectIndex, setIndex C.intptr_t, objp unsafe.Pointer) { fold := (*valueFold)(foldp) slice := listSlice(fold, reflectIndex) var objdv C.DataValue objdv.dataType = C.DTObject *(*unsafe.Pointer)(unsafe.Pointer(&objdv.data)) = objp newslice := append(*slice, unpackDataValue(&objdv, fold.engine).(Object)) if setIndex >= 0 { reflect.ValueOf(fold.gvalue).Method(int(setIndex)).Call([]reflect.Value{reflect.ValueOf(newslice)}) } else { *slice = newslice } } //export hookListPropertyClear func hookListPropertyClear(foldp unsafe.Pointer, reflectIndex, setIndex C.intptr_t) { fold := (*valueFold)(foldp) slice := listSlice(fold, reflectIndex) newslice := (*slice)[0:0] if setIndex >= 0 { reflect.ValueOf(fold.gvalue).Method(int(setIndex)).Call([]reflect.Value{reflect.ValueOf(newslice)}) } else { for i := range *slice { (*slice)[i] = nil } *slice = newslice } } ciborium-0.2.12+15.10.20150612/qml.v1/cdata/0000755000015300001610000000000012536577044020142 5ustar pbuserpbgroup00000000000000ciborium-0.2.12+15.10.20150612/qml.v1/cdata/cdata12.c0000644000015300001610000000045112536576717021533 0ustar pbuserpbgroup00000000000000// +build !go1.4 #include "runtime.h" void ·Ref(uintptr ref) { ref = (uintptr)g->m; FLUSH(&ref); } void runtime·main(void); void main·main(void); void ·Addrs(uintptr rmain, uintptr mmain) { rmain = (uintptr)runtime·main; mmain = (uintptr)main·main; FLUSH(&rmain); FLUSH(&mmain); } ciborium-0.2.12+15.10.20150612/qml.v1/cdata/cdata14_amd64.s0000644000015300001610000000046112536576717022551 0ustar pbuserpbgroup00000000000000// +build go1.4 #include "textflag.h" TEXT ·Ref(SB),NOSPLIT,$8-8 CALL runtime·acquirem(SB) MOVQ 0(SP), AX MOVQ AX, ret+0(FP) CALL runtime·releasem(SB) RET TEXT ·Addrs(SB),NOSPLIT,$0-16 MOVQ $runtime·main(SB), AX MOVQ AX, ret+0(FP) MOVQ $runtime·main_main(SB), AX MOVQ AX, ret+8(FP) RET ciborium-0.2.12+15.10.20150612/qml.v1/cdata/cdata_test.go0000644000015300001610000000131612536576717022613 0ustar pbuserpbgroup00000000000000package cdata import ( "runtime" "sync" "testing" ) type refPair struct { ref1, ref2 uintptr } func TestRef(t *testing.T) { const N = 10 runtime.LockOSThread() exit := sync.WaitGroup{} exit.Add(1) defer exit.Done() wg := sync.WaitGroup{} wg.Add(N) ch := make(chan refPair) for i := 0; i < N; i++ { go func() { runtime.LockOSThread() wg.Done() ch <- refPair{Ref(), Ref()} exit.Wait() }() } wg.Wait() refs := make(map[uintptr]bool) for i := 0; i < N; i++ { pair := <-ch if pair.ref1 != pair.ref2 { t.Fatalf("found inconsistent ref: %d != %d", pair.ref1, pair.ref2) } if refs[pair.ref1] { t.Fatalf("found duplicated ref: %d", pair.ref1) } refs[pair.ref1] = true } } ciborium-0.2.12+15.10.20150612/qml.v1/cdata/cdata.go0000644000015300001610000000020412536576717021547 0ustar pbuserpbgroup00000000000000// Package cdata supports the implementation of the qml package. package cdata func Ref() uintptr func Addrs() (uintptr, uintptr) ciborium-0.2.12+15.10.20150612/qml.v1/cdata/cdata14_386.s0000644000015300001610000000046012536576717022155 0ustar pbuserpbgroup00000000000000// +build go1.4 #include "textflag.h" TEXT ·Ref(SB),NOSPLIT,$4-4 CALL runtime·acquirem(SB) MOVL 0(SP), AX MOVL AX, ret+0(FP) CALL runtime·releasem(SB) RET TEXT ·Addrs(SB),NOSPLIT,$0-8 MOVL $runtime·main(SB), AX MOVL AX, ret+0(FP) MOVL $runtime·main_main(SB), AX MOVL AX, ret+8(FP) RET ciborium-0.2.12+15.10.20150612/qml.v1/cdata/cdata14_arm.s0000644000015300001610000000047612536576717022423 0ustar pbuserpbgroup00000000000000// +build go1.4 #include "textflag.h" TEXT ·Ref(SB),NOSPLIT,$4-4 BL runtime·acquirem(SB) MOVW 4(R13), R0 MOVW R0, ret+0(FP) MOVW R0, 4(R13) BL runtime·releasem(SB) RET TEXT ·Addrs(SB),NOSPLIT,$0-8 MOVW $runtime·main(SB), R0 MOVW R0, ret+0(FP) MOVW $runtime·main_main(SB), R0 MOVW R0, ret+4(FP) RET ciborium-0.2.12+15.10.20150612/qml.v1/all.cpp0000644000015300001610000000033212536576717020346 0ustar pbuserpbgroup00000000000000 #include "cpp/capi.cpp" #include "cpp/govalue.cpp" #include "cpp/govaluetype.cpp" #include "cpp/idletimer.cpp" #include "cpp/connector.cpp" #include "cpp/moc_all.cpp" #ifdef _WIN32 #include "cpp/mmemwin.cpp" #endif ciborium-0.2.12+15.10.20150612/qml.v1/log.go0000644000015300001610000000731112536576717020206 0ustar pbuserpbgroup00000000000000package qml // #include "capi.h" // import "C" import ( "fmt" "log" "path/filepath" "strings" ) // SetLogger sets the target for messages logged by the qml package, // including console.log and related calls from within qml code. // // The logger value must implement either the StdLogger interface, // which is satisfied by the standard *log.Logger type, or the QmlLogger // interface, which offers more control over the logged message. // // If no logger is provided, the qml package will send messages to the // default log package logger. This behavior may also be restored by // providing a nil logger to this function. func SetLogger(logger interface{}) { if logger == nil { logHandler = defaultLogger{} return } if qmll, ok := logger.(QmlLogger); ok { logHandler = qmll return } if stdl, ok := logger.(StdLogger); ok { logHandler = wrappedStdLogger{stdl} return } panic("unsupported logger interface") } // The QmlLogger interface may be implemented to better control how // log messages from the qml package are handled. Values that // implement either StdLogger or QmlLogger may be provided to the // SetLogger function. type QmlLogger interface { // QmlOutput is called whenever a new message is available for logging. // The message value must not be used after the method returns. QmlOutput(message LogMessage) error } // The StdLogger interface is implemented by standard *log.Logger values. // Values that implement either StdLogger or QmlLogger may be provided // to the SetLogger function. type StdLogger interface { // Output is called whenever a new message is available for logging. // See the standard log.Logger type for more details. Output(calldepth int, s string) error } // NOTE: LogMessage is an interface to avoid allocating and copying // several strings for each logged message. // LogMessage is implemented by values provided to QmlLogger.QmlOutput. type LogMessage interface { Severity() LogSeverity Text() string File() string Line() int String() string // returns "file:line: text" privateMarker() } type LogSeverity int const ( LogDebug LogSeverity = iota LogWarning LogCritical LogFatal ) var logHandler QmlLogger = defaultLogger{} type defaultLogger struct{} func (defaultLogger) QmlOutput(msg LogMessage) error { log.Println(msg.String()) return nil } func init() { // Install the C++ log handler that diverts calls to the hook below. C.installLogHandler() } //export hookLogHandler func hookLogHandler(cmsg *C.LogMessage) { // Workarund for QTBUG-35943 text := unsafeString(cmsg.text, cmsg.textLen) if strings.HasPrefix(text, `"Qt Warning: Compose file:`) { return } msg := logMessage{c: cmsg} logHandler.QmlOutput(&msg) msg.invalid = true } type wrappedStdLogger struct { StdLogger } func (l wrappedStdLogger) QmlOutput(msg LogMessage) error { return l.Output(0, msg.String()) } type logMessage struct { c *C.LogMessage // invalid flags that cmsg points to unreliable memory, // since the log hook has already returned. invalid bool } func (m *logMessage) assertValid() { if m.invalid { panic("attempted to use log message outside of log hook") } } func (m *logMessage) Severity() LogSeverity { return LogSeverity(m.c.severity) } func (m *logMessage) Line() int { m.assertValid() return int(m.c.line) } func (m *logMessage) String() string { m.assertValid() file := unsafeString(m.c.file, m.c.fileLen) text := unsafeString(m.c.text, m.c.textLen) return fmt.Sprintf("%s:%d: %s", filepath.Base(file), m.c.line, text) } func (m *logMessage) File() string { m.assertValid() return C.GoStringN(m.c.file, m.c.fileLen) } func (m *logMessage) Text() string { m.assertValid() return C.GoStringN(m.c.text, m.c.line) } func (*logMessage) privateMarker() {} ciborium-0.2.12+15.10.20150612/qml.v1/README.md0000644000015300001610000001234212536576717020355 0ustar pbuserpbgroup00000000000000# QML support for the Go language Documentation ------------- The introductory documentation as well as the detailed API documentation is available at [gopkg.in/qml.v1](http://godoc.org/gopkg.in/qml.v1). Blog posts ---------- Some relevant blog posts: * [Announcing qml v1 for Go](http://blog.labix.org/2014/08/13/announcing-qml-v1-for-go) * [Packing resources into Go qml binaries](http://blog.labix.org/2014/09/26/packing-resources-into-go-qml-binaries) * [Go qml contest results](http://blog.labix.org/2014/04/25/qml-contest-results) * [Arbitrary Qt extensions with Go qml](http://blog.labix.org/2014/03/21/arbitrary-qt-extensions-with-go-qml) * [The new Go qml OpenGL API](http://blog.labix.org/2014/08/29/the-new-go-qml-opengl-api) * [QML components with Go and OpenGL](http://blog.labix.org/2013/12/23/qml-components-with-go-and-opengl) Videos ------ These introductory videos demonstrate the use of Go QML: * [Initial demo and overview](http://youtu.be/FVQlMrPa7lI) * [Initial demo running on an Ubuntu Touch phone](http://youtu.be/HB-3o8Cysec) * [Spinning Gopher with Go + QML + OpenGL](http://youtu.be/qkH7_dtOyPk) * [SameGame QML tutorial in Go](http://youtu.be/z8noX48hiMI) Community --------- Please join the [mailing list](https://groups.google.com/forum/#!forum/go-qml) for following relevant development news and discussing project details. Installation ------------ To try the alpha release you'll need: * Go >= 1.2, for the C++ support of _go build_ * Qt 5.0.X or 5.1.X with the development files * The Qt headers qmetaobject_p.h and qmetaobjectbuilder_p.h, for the dynamic meta object support See below for more details about getting these requirements installed in different environments and operating systems. After the requirements are satisfied, _go get_ should work as usual: go get gopkg.in/qml.v1 Requirements on Ubuntu ---------------------- If you are using Ubuntu, the [Ubuntu SDK](http://developer.ubuntu.com/get-started/) will take care of the Qt dependencies: $ sudo add-apt-repository ppa:ubuntu-sdk-team/ppa $ sudo apt-get update $ sudo apt-get install qtdeclarative5-dev qtbase5-private-dev qtdeclarative5-private-dev libqt5opengl5-dev qtdeclarative5-qtquick2-plugin and Go >= 1.2 may be installed using [godeb](http://blog.labix.org/2013/06/15/in-flight-deb-packages-of-go): $ # Pick the right one for your system: 386 or amd64 $ ARCH=amd64 $ wget -q https://godeb.s3.amazonaws.com/godeb-$ARCH.tar.gz $ tar xzvf godeb-$ARCH.tar.gz godeb $ sudo mv godeb /usr/local/bin $ godeb install $ go get gopkg.in/qml.v1 Requirements on Ubuntu Touch ---------------------------- After following the [installation instructions](https://wiki.ubuntu.com/Touch/Install) for Ubuntu Touch, run the following commands to get a working build environment inside the device: $ adb shell # cd /tmp # wget https://github.com/go-qml/qml/raw/v1/cmd/ubuntu-touch/setup.sh # /bin/bash setup.sh # su - phablet $ At the end of setup.sh, the phablet user will have GOPATH=$HOME in the environment, the qml package will be built, and the particle example will be built and run. For stopping it from the command line, run as the phablet user: $ ubuntu-app-stop gopkg.in.qml.particle-example for running it again: $ ubuntu-app-launch gopkg.in.qml.particle-example These commands depend on the following file, installed by setup.sh: ~/.local/share/applications/gopkg.in.qml.particle-example.desktop Requirements on Mac OS X ------------------------ On Mac OS X you'll need QT5. It's easiest to install with Homebrew, a third-party package management system for OS X. Installation instructions for Homebrew are here: http://brew.sh/ Then, install the qt5 and pkg-config packages: $ brew install qt5 pkg-config Then, force brew to "link" qt5 (this makes it available under /usr/local): $ brew link --force qt5 And finally, fetch and install go-qml: $ go get gopkg.in/qml.v1 Requirements on Windows ----------------------- On Windows you'll need the following: * [MinGW gcc](http://sourceforge.net/projects/mingw/files/latest/download) 4.8.1 (install mingw-get and install the gcc from within the setup GUI) * [Qt 5.1.1](http://download.qt-project.org/official_releases/qt/5.1/5.1.1/qt-windows-opensource-5.1.1-mingw48_opengl-x86-offline.exe) for MinGW 4.8 * [Go >= 1.2](http://golang.org/doc/install) Then, assuming Qt was installed under `C:\Qt5.1.1\`, set up the following environment variables in the respective configuration: CPATH += C:\Qt5.1.1\5.1.1\mingw48_32\include LIBRARY_PATH += C:\Qt5.1.1\5.1.1\mingw48_32\lib PATH += C:\Qt5.1.1\5.1.1\mingw48_32\bin After reopening the shell for the environment changes to take effect, this should work: go get gopkg.in/qml.v1 Requirements everywhere else ---------------------------- If your operating system does not offer these dependencies readily, you may still have success installing [Go >= 1.2](http://golang.org/doc/install) and [Qt 5.0.2](http://download.qt-project.org/archive/qt/5.0/5.0.2/) directly from the upstreams. Note that you'll likely have to adapt environment variables to reflect the custom installation path for these libraries. See the instructions above for examples. ciborium-0.2.12+15.10.20150612/qml.v1/datatype.go0000644000015300001610000003554712536576717021254 0ustar pbuserpbgroup00000000000000package qml // #include // #include "capi.h" import "C" import ( "bytes" "fmt" "image/color" "reflect" "strings" "unicode" "unsafe" ) var ( intIs64 bool intDT C.DataType ptrSize = C.size_t(unsafe.Sizeof(uintptr(0))) nilPtr = unsafe.Pointer(uintptr(0)) nilCharPtr = (*C.char)(nilPtr) typeString = reflect.TypeOf("") typeBool = reflect.TypeOf(false) typeInt = reflect.TypeOf(int(0)) typeInt64 = reflect.TypeOf(int64(0)) typeInt32 = reflect.TypeOf(int32(0)) typeFloat64 = reflect.TypeOf(float64(0)) typeFloat32 = reflect.TypeOf(float32(0)) typeIface = reflect.TypeOf(new(interface{})).Elem() typeRGBA = reflect.TypeOf(color.RGBA{}) typeObjSlice = reflect.TypeOf([]Object(nil)) typeObject = reflect.TypeOf([]Object(nil)).Elem() typePainter = reflect.TypeOf(&Painter{}) typeList = reflect.TypeOf(&List{}) typeMap = reflect.TypeOf(&Map{}) typeGenericMap = reflect.TypeOf(map[string]interface{}(nil)) ) func init() { var i int = 1<<31 - 1 intIs64 = (i+1 > 0) if intIs64 { intDT = C.DTInt64 } else { intDT = C.DTInt32 } } // packDataValue packs the provided Go value into a C.DataValue for // shiping into C++ land. // // For simple types (bool, int, etc) value is converted into a // native C++ value. For anything else, including cases when value // has a type that has an underlying simple type, the Go value itself // is encapsulated into a C++ wrapper so that field access and method // calls work. // // This must be run from the main GUI thread due to the cases where // calling wrapGoValue is necessary. func packDataValue(value interface{}, dvalue *C.DataValue, engine *Engine, owner valueOwner) { datap := unsafe.Pointer(&dvalue.data) if value == nil { dvalue.dataType = C.DTInvalid return } switch value := value.(type) { case string: dvalue.dataType = C.DTString cstr, cstrlen := unsafeStringData(value) *(**C.char)(datap) = cstr dvalue.len = cstrlen case bool: dvalue.dataType = C.DTBool *(*bool)(datap) = value case int: if value > 1<<31-1 { dvalue.dataType = C.DTInt64 *(*int64)(datap) = int64(value) } else { dvalue.dataType = C.DTInt32 *(*int32)(datap) = int32(value) } case int64: dvalue.dataType = C.DTInt64 *(*int64)(datap) = value case int32: dvalue.dataType = C.DTInt32 *(*int32)(datap) = value case uint64: dvalue.dataType = C.DTUint64 *(*uint64)(datap) = value case uint32: dvalue.dataType = C.DTUint32 *(*uint32)(datap) = value case float64: dvalue.dataType = C.DTFloat64 *(*float64)(datap) = value case float32: dvalue.dataType = C.DTFloat32 *(*float32)(datap) = value case *Common: dvalue.dataType = C.DTObject *(*unsafe.Pointer)(datap) = value.addr case color.RGBA: dvalue.dataType = C.DTColor *(*uint32)(datap) = uint32(value.A)<<24 | uint32(value.R)<<16 | uint32(value.G)<<8 | uint32(value.B) default: dvalue.dataType = C.DTObject if obj, ok := value.(Object); ok { *(*unsafe.Pointer)(datap) = obj.Common().addr } else { *(*unsafe.Pointer)(datap) = wrapGoValue(engine, value, owner) } } } // TODO Handle byte slices. // unpackDataValue converts a value shipped by C++ into a native Go value. // // HEADS UP: This is considered safe to be run out of the main GUI thread. // If that changes, fix the call sites. func unpackDataValue(dvalue *C.DataValue, engine *Engine) interface{} { datap := unsafe.Pointer(&dvalue.data) switch dvalue.dataType { case C.DTString: s := C.GoStringN(*(**C.char)(datap), dvalue.len) // TODO If we move all unpackDataValue calls to the GUI thread, // can we get rid of this allocation somehow? C.free(unsafe.Pointer(*(**C.char)(datap))) return s case C.DTBool: return *(*bool)(datap) case C.DTInt64: return *(*int64)(datap) case C.DTInt32: return int(*(*int32)(datap)) case C.DTUint64: return *(*uint64)(datap) case C.DTUint32: return *(*uint32)(datap) case C.DTUintptr: return *(*uintptr)(datap) case C.DTFloat64: return *(*float64)(datap) case C.DTFloat32: return *(*float32)(datap) case C.DTColor: var c uint32 = *(*uint32)(datap) return color.RGBA{byte(c >> 16), byte(c >> 8), byte(c), byte(c >> 24)} case C.DTGoAddr: // ObjectByName also does this fold conversion, to have access // to the cvalue. Perhaps the fold should be returned. fold := (*(**valueFold)(datap)) ensureEngine(engine.addr, unsafe.Pointer(fold)) return fold.gvalue case C.DTInvalid: return nil case C.DTObject: // TODO Would be good to preserve identity on the Go side. See initGoType as well. obj := &Common{ engine: engine, addr: *(*unsafe.Pointer)(datap), } if len(converters) > 0 { // TODO Embed the type name in DataValue to drop these calls. typeName := obj.TypeName() if typeName == "PlainObject" { typeName = strings.TrimRight(obj.String("plainType"), "&*") if strings.HasPrefix(typeName, "const ") { typeName = typeName[6:] } } if f, ok := converters[typeName]; ok { return f(engine, obj) } } return obj case C.DTValueList, C.DTValueMap: var dvlist []C.DataValue var dvlisth = (*reflect.SliceHeader)(unsafe.Pointer(&dvlist)) dvlisth.Data = uintptr(*(*unsafe.Pointer)(datap)) dvlisth.Len = int(dvalue.len) dvlisth.Cap = int(dvalue.len) result := make([]interface{}, len(dvlist)) for i := range result { result[i] = unpackDataValue(&dvlist[i], engine) } C.free(*(*unsafe.Pointer)(datap)) if dvalue.dataType == C.DTValueList { return &List{result} } else { return &Map{result} } } panic(fmt.Sprintf("unsupported data type: %d", dvalue.dataType)) } func dataTypeOf(typ reflect.Type) C.DataType { // Compare against the specific types rather than their kind. // Custom types may have methods that must be supported. switch typ { case typeString: return C.DTString case typeBool: return C.DTBool case typeInt: return intDT case typeInt64: return C.DTInt64 case typeInt32: return C.DTInt32 case typeFloat32: return C.DTFloat32 case typeFloat64: return C.DTFloat64 case typeIface: return C.DTAny case typeRGBA: return C.DTColor case typeObjSlice: return C.DTListProperty } return C.DTObject } var typeInfoSize = C.size_t(unsafe.Sizeof(C.GoTypeInfo{})) var memberInfoSize = C.size_t(unsafe.Sizeof(C.GoMemberInfo{})) var typeInfoCache = make(map[reflect.Type]*C.GoTypeInfo) func appendLoweredName(buf []byte, name string) []byte { var last rune var lasti int for i, rune := range name { if !unicode.IsUpper(rune) { if lasti == 0 { last = unicode.ToLower(last) } buf = append(buf, string(last)...) buf = append(buf, name[i:]...) return buf } if i > 0 { buf = append(buf, string(unicode.ToLower(last))...) } lasti, last = i, rune } return append(buf, string(unicode.ToLower(last))...) } func typeInfo(v interface{}) *C.GoTypeInfo { vt := reflect.TypeOf(v) for vt.Kind() == reflect.Ptr { vt = vt.Elem() } typeInfo := typeInfoCache[vt] if typeInfo != nil { return typeInfo } typeInfo = (*C.GoTypeInfo)(C.malloc(typeInfoSize)) typeInfo.typeName = C.CString(vt.Name()) typeInfo.metaObject = nilPtr typeInfo.paint = (*C.GoMemberInfo)(nilPtr) var setters map[string]int var getters map[string]int // TODO Only do that if it's a struct? vtptr := reflect.PtrTo(vt) if vt.Kind() != reflect.Struct { panic(fmt.Sprintf("handling of %s (%#v) is incomplete; please report to the developers", vt, v)) } numField := vt.NumField() numMethod := vtptr.NumMethod() privateFields := 0 privateMethods := 0 // struct { FooBar T; Baz T } => "fooBar\0baz\0" namesLen := 0 for i := 0; i < numField; i++ { field := vt.Field(i) if field.PkgPath != "" { privateFields++ continue } namesLen += len(field.Name) + 1 } for i := 0; i < numMethod; i++ { method := vtptr.Method(i) if method.PkgPath != "" { privateMethods++ continue } namesLen += len(method.Name) + 1 // Track setters and getters. if len(method.Name) > 3 && method.Name[:3] == "Set" { if method.Type.NumIn() == 2 { if setters == nil { setters = make(map[string]int) } setters[method.Name[3:]] = i } } else if method.Type.NumIn() == 1 && method.Type.NumOut() == 1 { if getters == nil { getters = make(map[string]int) } getters[method.Name] = i } } names := make([]byte, 0, namesLen) for i := 0; i < numField; i++ { field := vt.Field(i) if field.PkgPath != "" { continue // not exported } names = appendLoweredName(names, field.Name) names = append(names, 0) } for i := 0; i < numMethod; i++ { method := vtptr.Method(i) if method.PkgPath != "" { continue // not exported } if _, ok := getters[method.Name]; !ok { continue } if _, ok := setters[method.Name]; !ok { delete(getters, method.Name) continue } // This is a getter method names = appendLoweredName(names, method.Name) names = append(names, 0) } for i := 0; i < numMethod; i++ { method := vtptr.Method(i) if method.PkgPath != "" { continue // not exported } if _, ok := getters[method.Name]; ok { continue // getter already handled above } names = appendLoweredName(names, method.Name) names = append(names, 0) } if len(names) != namesLen { panic("pre-allocated buffer size was wrong") } typeInfo.memberNames = C.CString(string(names)) // Assemble information on members. membersLen := numField - privateFields + numMethod - privateMethods membersi := uintptr(0) mnamesi := uintptr(0) members := uintptr(C.malloc(memberInfoSize * C.size_t(membersLen))) mnames := uintptr(unsafe.Pointer(typeInfo.memberNames)) for i := 0; i < numField; i++ { field := vt.Field(i) if field.PkgPath != "" { continue // not exported } memberInfo := (*C.GoMemberInfo)(unsafe.Pointer(members + uintptr(memberInfoSize)*membersi)) memberInfo.memberName = (*C.char)(unsafe.Pointer(mnames + mnamesi)) memberInfo.memberType = dataTypeOf(field.Type) memberInfo.reflectIndex = C.int(i) memberInfo.reflectGetIndex = -1 memberInfo.reflectSetIndex = -1 memberInfo.addrOffset = C.int(field.Offset) membersi += 1 mnamesi += uintptr(len(field.Name)) + 1 if methodIndex, ok := setters[field.Name]; ok { memberInfo.reflectSetIndex = C.int(methodIndex) } } for i := 0; i < numMethod; i++ { method := vtptr.Method(i) if method.PkgPath != "" { continue // not exported } if _, ok := getters[method.Name]; !ok { continue // not a getter } memberInfo := (*C.GoMemberInfo)(unsafe.Pointer(members + uintptr(memberInfoSize)*membersi)) memberInfo.memberName = (*C.char)(unsafe.Pointer(mnames + mnamesi)) memberInfo.memberType = dataTypeOf(method.Type.Out(0)) memberInfo.reflectIndex = -1 memberInfo.reflectGetIndex = C.int(getters[method.Name]) memberInfo.reflectSetIndex = C.int(setters[method.Name]) memberInfo.addrOffset = 0 membersi += 1 mnamesi += uintptr(len(method.Name)) + 1 } for i := 0; i < numMethod; i++ { method := vtptr.Method(i) if method.PkgPath != "" { continue // not exported } if _, ok := getters[method.Name]; ok { continue // getter already handled above } memberInfo := (*C.GoMemberInfo)(unsafe.Pointer(members + uintptr(memberInfoSize)*membersi)) memberInfo.memberName = (*C.char)(unsafe.Pointer(mnames + mnamesi)) memberInfo.memberType = C.DTMethod memberInfo.reflectIndex = C.int(i) memberInfo.reflectGetIndex = -1 memberInfo.reflectSetIndex = -1 memberInfo.addrOffset = 0 signature, result := methodQtSignature(method) // TODO The signature data might be embedded in the same array as the member names. memberInfo.methodSignature = C.CString(signature) memberInfo.resultSignature = C.CString(result) // TODO Sort out methods with a variable number of arguments. // It's called while bound, so drop the receiver. memberInfo.numIn = C.int(method.Type.NumIn() - 1) memberInfo.numOut = C.int(method.Type.NumOut()) membersi += 1 mnamesi += uintptr(len(method.Name)) + 1 if method.Name == "Paint" && memberInfo.numIn == 1 && memberInfo.numOut == 0 && method.Type.In(1) == typePainter { typeInfo.paint = memberInfo } } typeInfo.members = (*C.GoMemberInfo)(unsafe.Pointer(members)) typeInfo.membersLen = C.int(membersLen) typeInfo.fields = typeInfo.members typeInfo.fieldsLen = C.int(numField - privateFields + len(getters)) typeInfo.methods = (*C.GoMemberInfo)(unsafe.Pointer(members + uintptr(memberInfoSize)*uintptr(typeInfo.fieldsLen))) typeInfo.methodsLen = C.int(numMethod - privateMethods - len(getters)) if int(membersi) != membersLen { panic("used more space than allocated for member names") } if int(mnamesi) != namesLen { panic("allocated buffer doesn't match used space") } if typeInfo.fieldsLen+typeInfo.methodsLen != typeInfo.membersLen { panic("lengths are inconsistent") } typeInfoCache[vt] = typeInfo return typeInfo } func methodQtSignature(method reflect.Method) (signature, result string) { var buf bytes.Buffer for i, rune := range method.Name { if i == 0 { buf.WriteRune(unicode.ToLower(rune)) } else { buf.WriteString(method.Name[i:]) break } } buf.WriteByte('(') n := method.Type.NumIn() for i := 1; i < n; i++ { if i > 1 { buf.WriteByte(',') } buf.WriteString("QVariant") } buf.WriteByte(')') signature = buf.String() switch method.Type.NumOut() { case 0: // keep it as "" case 1: result = "QVariant" default: result = "QVariantList" } return } func hashable(value interface{}) (hashable bool) { defer func() { recover() }() return value == value } // unsafeString returns a Go string backed by C data. // // If the C data is deallocated or moved, the string will be // invalid and will crash the program if used. As such, the // resulting string must only be used inside the implementation // of the qml package and while the life time of the C data // is guaranteed. func unsafeString(data *C.char, size C.int) string { var s string sh := (*reflect.StringHeader)(unsafe.Pointer(&s)) sh.Data = uintptr(unsafe.Pointer(data)) sh.Len = int(size) return s } // unsafeStringData returns a C string backed by Go data. The C // string is NOT null-terminated, so its length must be taken // into account. // // If the s Go string is garbage collected, the returned C data // will be invalid and will crash the program if used. As such, // the resulting data must only be used inside the implementation // of the qml package and while the life time of the Go string // is guaranteed. func unsafeStringData(s string) (*C.char, C.int) { return *(**C.char)(unsafe.Pointer(&s)), C.int(len(s)) } // unsafeBytesData returns a C string backed by Go data. The C // string is NOT null-terminated, so its length must be taken // into account. // // If the array backing the b Go slice is garbage collected, the // returned C data will be invalid and will crash the program if // used. As such, the resulting data must only be used inside the // implementation of the qml package and while the life time of // the Go array is guaranteed. func unsafeBytesData(b []byte) (*C.char, C.int) { return *(**C.char)(unsafe.Pointer(&b)), C.int(len(b)) } ciborium-0.2.12+15.10.20150612/qml.v1/gl/0000755000015300001610000000000012536577044017470 5ustar pbuserpbgroup00000000000000ciborium-0.2.12+15.10.20150612/qml.v1/gl/glbase/0000755000015300001610000000000012536577044020725 5ustar pbuserpbgroup00000000000000ciborium-0.2.12+15.10.20150612/qml.v1/gl/glbase/glbase.go0000644000015300001610000000147312536576717022524 0ustar pbuserpbgroup00000000000000package glbase // A Context represents an OpenGL context that may be rendered on by the // version-specific APIs under this package. type Context struct { // This is just a marker at the moment, as the GL.API functions will // initialize their GL context from the current context in the // renderer thread. The design supports proper expansion and fixes for // upstream changes that break that model, though. private struct{} } // Contexter is implemented by values that have an assigned OpenGL context. type Contexter interface { GLContext() *Context } type ( Bitfield uint32 Enum uint32 Sync uintptr Clampf float32 Clampd float64 Uniform int32 Attrib int32 Texture uint32 Program uint32 Shader uint32 Buffer uint32 Framebuffer uint32 Renderbuffer uint32 ) ciborium-0.2.12+15.10.20150612/qml.v1/.gitignore0000644000015300001610000000014412536576717021063 0ustar pbuserpbgroup00000000000000examples/qmlscene/qmlscene examples/snapweb/snapweb examples/particle/particle gl/gengl/gengl *.swp ciborium-0.2.12+15.10.20150612/qml.v1/LICENSE0000644000015300001610000002105312536576717020102 0ustar pbuserpbgroup00000000000000This software is licensed under the LGPLv3, included below. As a special exception to the GNU Lesser General Public License version 3 ("LGPL3"), the copyright holders of this Library give you permission to convey to a third party a Combined Work that links statically or dynamically to this Library without providing any Minimal Corresponding Source or Minimal Application Code as set out in 4d or providing the installation information set out in section 4e, provided that you comply with the other provisions of LGPL3 and provided that you meet, for the Application the terms and conditions of the license(s) which apply to the Application. Except as stated in this special exception, the provisions of LGPL3 will continue to comply in full to this Library. If you modify this Library, you may apply this exception to your version of this Library, but you are not obliged to do so. If you do not wish to do so, delete this exception statement from your version. This exception does not (and cannot) modify any license terms which apply to the Application, with which you must still comply. GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below. 0. Additional Definitions. As used herein, "this License" refers to version 3 of the GNU Lesser General Public License, and the "GNU GPL" refers to version 3 of the GNU General Public License. "The Library" refers to a covered work governed by this License, other than an Application or a Combined Work as defined below. An "Application" is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library. A "Combined Work" is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the "Linked Version". The "Minimal Corresponding Source" for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version. The "Corresponding Application Code" for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work. 1. Exception to Section 3 of the GNU GPL. You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL. 2. Conveying Modified Versions. If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version: a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy. 3. Object Code Incorporating Material from Library Header Files. The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following: a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the object code with a copy of the GNU GPL and this license document. 4. Combined Works. You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following: a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the Combined Work with a copy of the GNU GPL and this license document. c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document. d) Do one of the following: 0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source. 1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version. e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.) 5. Combined Libraries. You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License. b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 6. Revised Versions of the GNU Lesser General Public License. The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation. If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library. ciborium-0.2.12+15.10.20150612/qml.v1/stats.go0000644000015300001610000000213212536576717020557 0ustar pbuserpbgroup00000000000000package qml import ( "sync" ) var stats *Statistics var statsMutex sync.Mutex func Stats() (snapshot Statistics) { statsMutex.Lock() snapshot = *stats statsMutex.Unlock() return } func CollectStats(enabled bool) { statsMutex.Lock() if enabled { if stats == nil { stats = &Statistics{} } } else { stats = nil } statsMutex.Unlock() } func ResetStats() { statsMutex.Lock() old := stats stats = &Statistics{} // These are absolute values: stats.EnginesAlive = old.EnginesAlive stats.ValuesAlive = old.ValuesAlive statsMutex.Unlock() return } type Statistics struct { EnginesAlive int ValuesAlive int ConnectionsAlive int } func (stats *Statistics) enginesAlive(delta int) { if stats != nil { statsMutex.Lock() stats.EnginesAlive += delta statsMutex.Unlock() } } func (stats *Statistics) valuesAlive(delta int) { if stats != nil { statsMutex.Lock() stats.ValuesAlive += delta statsMutex.Unlock() } } func (stats *Statistics) connectionsAlive(delta int) { if stats != nil { statsMutex.Lock() stats.ConnectionsAlive += delta statsMutex.Unlock() } } ciborium-0.2.12+15.10.20150612/qml.v1/resources.go0000644000015300001610000002066212536576717021443 0ustar pbuserpbgroup00000000000000package qml import ( "bytes" "fmt" "sort" "strings" ) // ParseResources parses the resources collection serialized in data. func ParseResources(data []byte) (*Resources, error) { if len(data) < 20 || string(data[:4]) != "qres" { return nil, fmt.Errorf("invalid resources data") } r, err := parseResourcesHeader(data[:20], len(data)) if err != nil { return nil, err } r.bdata = data return r, nil } // ParseResourcesString parses the resources collection serialized in data. func ParseResourcesString(data string) (*Resources, error) { if len(data) < 20 || data[:4] != "qres" { return nil, fmt.Errorf("invalid resources data") } r, err := parseResourcesHeader([]byte(data[:20]), len(data)) if err != nil { return nil, err } r.sdata = data return r, nil } func parseResourcesHeader(h []byte, size int) (*Resources, error) { r := &Resources{ version: read32(h[4:]), treeOffset: read32(h[8:]), dataOffset: read32(h[12:]), nameOffset: read32(h[16:]), } if r.version != resVersion { return nil, fmt.Errorf("unsupported resources version: %d", r.version) } // Ideally this would do a full validation, but it's a good start. if !(20 <= r.treeOffset && r.treeOffset < size && 20 <= r.dataOffset && r.dataOffset < size && 20 <= r.nameOffset && r.nameOffset < size) { return nil, fmt.Errorf("corrupted resources data") } return r, nil } func read32(b []byte) int { return int(uint32(b[0])<<24 | uint32(b[1])<<16 | uint32(b[2])<<8 | uint32(b[3])) } // Resources is a compact representation of a collection of resources // (images, qml files, etc) that may be loaded by an Engine and referenced // by QML at "qrc:///some/path", where "some/path" is the path the // resource was added with. // // Resources must be registered with LoadResources to become available. type Resources struct { sdata string bdata []byte version int treeOffset int dataOffset int nameOffset int } // Bytes returns a binary representation of the resources collection that // may be parsed back with ParseResources or ParseResourcesString. func (r *Resources) Bytes() []byte { if len(r.sdata) > 0 { return []byte(r.sdata) } return r.bdata } // ResourcesPacker builds a Resources collection with provided resources. type ResourcesPacker struct { root resFile } // Pack builds a resources collection with all resources previously added. func (rp *ResourcesPacker) Pack() *Resources { rw := newResourcesWriter(rp) rw.write() return &Resources{ bdata: rw.out.Bytes(), version: resVersion, dataOffset: rw.dataOffset, nameOffset: rw.nameOffset, treeOffset: rw.treeOffset, } } type resFile struct { name string sdata string bdata []byte children resFiles } // Add adds a resource with the provided data under "qrc:///"+path. func (rp *ResourcesPacker) Add(path string, data []byte) { file := rp.addFile(path) file.bdata = data } // AddString adds a resource with the provided data under "qrc:///"+path. func (rp *ResourcesPacker) AddString(path, data string) { file := rp.addFile(path) file.sdata = data } func (rp *ResourcesPacker) addFile(path string) *resFile { file := &rp.root names := strings.Split(path, "/") if len(names[0]) == 0 { names = names[1:] } NextItem: for _, name := range names { for i := range file.children { child := &file.children[i] if child.name == name { file = child continue NextItem } } file.children = append(file.children, resFile{name: name}) file = &file.children[len(file.children)-1] } if len(file.children) > 0 || file.sdata != "" || file.bdata != nil { panic("cannot add same resources path twice: " + path) } return file } type resWriter struct { root *resFile treeOffset int dataOffset int nameOffset int treeOffsets map[*resFile]int dataOffsets map[*resFile]int nameOffsets map[string]int pending []*resFile out bytes.Buffer } func newResourcesWriter(rp *ResourcesPacker) *resWriter { rw := &resWriter{ root: &rp.root, treeOffsets: make(map[*resFile]int), dataOffsets: make(map[*resFile]int), nameOffsets: make(map[string]int), pending: make([]*resFile, maxPending(&rp.root)), } pending := rw.pending pending[0] = rw.root n := 1 for n > 0 { n-- file := pending[n] sort.Sort(file.children) for i := range file.children { child := &file.children[i] if len(child.children) > 0 { pending[n] = child n++ } } } return rw } func maxPending(file *resFile) int { max := 1 for i := range file.children { if len(file.children) > 0 { max += maxPending(&file.children[i]) } } return max } func (rw *resWriter) write() { rw.writeHeader() rw.writeDataBlobs() rw.writeDataNames() rw.writeDataTree() rw.finishHeader() } func (rw *resWriter) writeHeader() { rw.out.WriteString("qres\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00") } func (rw *resWriter) finishHeader() { rw.write32at(4, resVersion) rw.write32at(8, uint32(rw.treeOffset)) rw.write32at(12, uint32(rw.dataOffset)) rw.write32at(16, uint32(rw.nameOffset)) } func (rw *resWriter) writeDataBlobs() { rw.dataOffset = rw.out.Len() pending := rw.pending pending[0] = rw.root n := 1 for n > 0 { n-- file := pending[n] for i := range file.children { child := &file.children[i] if len(child.children) > 0 { pending[n] = child n++ } else { rw.dataOffsets[child] = rw.out.Len() - rw.dataOffset rw.writeDataBlob(child) } } } } func (rw *resWriter) writeDataBlob(file *resFile) { if len(file.sdata) > 0 { rw.write32(uint32(len(file.sdata))) rw.out.WriteString(file.sdata) } else { rw.write32(uint32(len(file.bdata))) rw.out.Write(file.bdata) } } func (rw *resWriter) writeDataNames() { rw.nameOffset = rw.out.Len() pending := rw.pending pending[0] = rw.root n := 1 for n > 0 { n-- file := pending[n] for i := range file.children { child := &file.children[i] if len(child.children) > 0 { pending[n] = child n++ } if _, ok := rw.nameOffsets[child.name]; !ok { rw.nameOffsets[child.name] = rw.out.Len() - rw.nameOffset rw.writeDataName(child.name) } } } } func (rw *resWriter) writeDataName(name string) { rw.write16(uint16(len(name))) rw.write32(qt_hash(name)) for _, r := range name { rw.write16(uint16(r)) } } func (rw *resWriter) writeDataTree() { rw.treeOffset = rw.out.Len() // Compute first child offset for each parent. pending := rw.pending pending[0] = rw.root n := 1 offset := 1 for n > 0 { n-- file := pending[n] rw.treeOffsets[file] = offset for i := range file.children { child := &file.children[i] offset++ if len(child.children) > 0 { pending[n] = child n++ } } } // Actually write it out. rw.writeDataInfo(rw.root) pending[0] = rw.root n = 1 for n > 0 { n-- file := pending[n] for i := range file.children { child := &file.children[i] rw.writeDataInfo(child) if len(child.children) > 0 { pending[n] = child n++ } } } } func (rw *resWriter) writeDataInfo(file *resFile) { rw.write32(uint32(rw.nameOffsets[file.name])) if len(file.children) > 0 { rw.write16(uint16(resDirectory)) rw.write32(uint32(len(file.children))) rw.write32(uint32(rw.treeOffsets[file])) } else { rw.write16(uint16(resNone)) rw.write16(0) // QLocale::AnyCountry rw.write16(1) // QLocale::C rw.write32(uint32(rw.dataOffsets[file])) } } const ( resVersion = 1 resNone = 0 resCompressed = 1 resDirectory = 2 ) func (rw *resWriter) write16(v uint16) { rw.out.Write([]byte{byte(v >> 8), byte(v)}) } func (rw *resWriter) write32(v uint32) { rw.out.Write([]byte{byte(v >> 24), byte(v >> 16), byte(v >> 8), byte(v)}) } func (rw *resWriter) write32at(index int, v uint32) { b := rw.out.Bytes() b[index+0] = byte(v >> 24) b[index+1] = byte(v >> 16) b[index+2] = byte(v >> 8) b[index+3] = byte(v) } type resFiles []resFile func (rf resFiles) Len() int { return len(rf) } func (rf resFiles) Less(i, j int) bool { return qt_hash(rf[i].name) < qt_hash(rf[j].name) } func (rf resFiles) Swap(i, j int) { rf[i], rf[j] = rf[j], rf[i] } // qt_hash returns the hash of p as determined by the internal qt_hash function in Qt. // // According to the documentation in qhash.cpp this algorithm is used whenever // the hash may be stored or reused across Qt versions, and must not change. // The algorithm in qHash (used in QString, etc) is different and may change. func qt_hash(p string) uint32 { var h uint32 for _, r := range p { h = (h << 4) + uint32(r) h ^= (h & 0xf0000000) >> 23 h &= 0x0fffffff } return h } ciborium-0.2.12+15.10.20150612/qml.v1/testing.go0000644000015300001610000000323312536576717021101 0ustar pbuserpbgroup00000000000000package qml // #include // int mprotect(void *addr, size_t len, int prot); import "C" import ( "bytes" "encoding/binary" "launchpad.net/ciborium/qml.v1/cdata" "reflect" "unsafe" ) const pageSize = 4096 func qmain() { Run(func() error { tmain(); return nil }) } func tmain() { tstub() } func tstub() { tstub() } func SetupTesting() { ptr := func(f func()) uintptr { return reflect.ValueOf(f).Pointer() } rmain, mmain := cdata.Addrs() fset(rmain, mmain, ptr(qmain)) fset(ptr(tmain), ptr(tstub), mmain) } const ( protREAD = 1 protWRITE = 2 protEXEC = 4 ) func fset(target, old, new uintptr) { pageOffset := target % pageSize pageAddr := target - pageOffset var mem []byte memh := (*reflect.SliceHeader)(unsafe.Pointer(&mem)) memh.Data = pageAddr memh.Len = pageSize * 2 memh.Cap = pageSize * 2 oldAddr := make([]byte, 8) newAddr := make([]byte, 8) binary.LittleEndian.PutUint64(oldAddr, uint64(old)) binary.LittleEndian.PutUint64(newAddr, uint64(new)) // BSD's syscall package misses Mprotect. Use cgo instead. C.mprotect(unsafe.Pointer(pageAddr), C.size_t(len(mem)), protEXEC|protREAD|protWRITE) defer C.mprotect(unsafe.Pointer(pageAddr), C.size_t(len(mem)), protEXEC|protREAD) delta := make([]byte, 4) for i, c := range mem[pageOffset:] { if c == 0xe8 && int(pageOffset)+i+5 < len(mem) { instrAddr := pageAddr + pageOffset + uintptr(i) binary.LittleEndian.PutUint32(delta, uint32(old-instrAddr-5)) if bytes.Equal(mem[int(pageOffset)+i+1:int(pageOffset)+i+5], delta) { binary.LittleEndian.PutUint32(mem[int(pageOffset)+i+1:], uint32(new-instrAddr-5)) return } } } panic("cannot setup qml package for testing") } ciborium-0.2.12+15.10.20150612/lib/0000755000015300001610000000000012536577044016516 5ustar pbuserpbgroup00000000000000ciborium-0.2.12+15.10.20150612/lib/ubuntu-push-client/0000755000015300001610000000000012536577044022271 5ustar pbuserpbgroup00000000000000ciborium-0.2.12+15.10.20150612/lib/ubuntu-push-client/legacy-helpers/0000755000015300001610000000000012536577044025175 5ustar pbuserpbgroup00000000000000ciborium-0.2.12+15.10.20150612/lib/ubuntu-push-client/legacy-helpers/ciborium0000755000015300001610000000002412536576712026731 0ustar pbuserpbgroup00000000000000#!/bin/sh cp $1 $2 ciborium-0.2.12+15.10.20150612/gettext/0000755000015300001610000000000012536577044017434 5ustar pbuserpbgroup00000000000000ciborium-0.2.12+15.10.20150612/gettext/README.md0000644000015300001610000000355412536576712020723 0ustar pbuserpbgroup00000000000000# gosexy/gettext Go bindings for [GNU gettext][1], an internationalization and localization library for writing multilingual systems. ## Requeriments The GNU C library. If you're using GNU/Linux, FreeBSD or OSX you should already have it. ## Installation Use `go get` to download and install the binding: ```sh go get github.com/gosexy/gettext ``` ## Usage ```go package main import ( "github.com/gosexy/gettext" "fmt" "os" ) func main() { gettext.BindTextdomain("example", ".") gettext.Textdomain("example") os.Setenv("LANGUAGE", "es_MX.utf8") gettext.SetLocale(gettext.LC_ALL, "") fmt.Println(gettext.Gettext("Hello, world!")) } ``` You can use `os.Setenv` to set the `LANGUAGE` environment variable or set it on a terminal: ```sh export LANGUAGE="es_MX.utf8" ./gettext-program ``` Note that `xgettext` does not officially support Go syntax yet, however, you can generate a valid `.pot` file by forcing `xgettest` to use the C++ syntax: ```sh xgettext -d example -s gettext_test.go -o example.pot -L c++ -i \ --keyword=NGettext:1,2 --keyword=Gettext ``` This will generate a `example.pot` file. After translating the `.pot` file, you must generate `.po` and `.mo` files and remember to set the UTF-8 charset. ```sh msginit -l es_MX -o example.po -i example.pot msgfmt -c -v -o example.mo example.po ``` Finally, move the `.mo` file to an appropriate location. ```sh mv example.mo examples/es_MX.utf8/LC_MESSAGES/example.mo ``` ## Documentation You can read `gosexy/gettext` documentation from a terminal ```sh go doc github.com/gosexy/gettext ``` Or you can [browse it](http://godoc.org/github.com/gosexy/gettext) online. The original gettext documentation could be very useful as well: ```sh man 3 gettext ``` Here's another [good tutorial][2] on using gettext. [1]: http://www.gnu.org/software/gettext/ [2]: http://oriya.sarovar.org/docs/gettext_single.html ciborium-0.2.12+15.10.20150612/gettext/gettext.go0000644000015300001610000001347712536576712021464 0ustar pbuserpbgroup00000000000000/* Copyright (c) 2012 José Carlos Nieto, http://xiam.menteslibres.org/ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ package gettext /* #include #include #include */ import "C" import ( "fmt" "strings" "unsafe" ) var ( // For all of the locale. LC_ALL = uint(C.LC_ALL) // For regular expression matching (it determines the meaning of range // expressions and equivalence classes) and string collation. LC_COLATE = uint(C.LC_ALL) // For regular expression matching, character classification, conversion, // case-sensitive comparison, and wide character functions. LC_CTYPE = uint(C.LC_CTYPE) // For localizable natural-language messages. LC_MESSAGES = uint(C.LC_MESSAGES) // For monetary formatting. LC_MONETARY = uint(C.LC_MONETARY) // For number formatting (such as the decimal point and the thousands // separator). LC_NUMERIC = uint(C.LC_NUMERIC) // For time and date formatting. LC_TIME = uint(C.LC_TIME) ) // Sets or queries the program's current locale. func SetLocale(category uint, locale string) string { clocale := C.CString(locale) res := C.GoString(C.setlocale(C.int(category), clocale)) C.free(unsafe.Pointer(clocale)) return res } // Sets directory containing message catalogs. func BindTextdomain(domainname string, dirname string) string { cdirname := C.CString(dirname) cdomainname := C.CString(domainname) res := C.GoString(C.bindtextdomain(cdomainname, cdirname)) C.free(unsafe.Pointer(cdirname)) C.free(unsafe.Pointer(cdomainname)) return res } // Sets the output codeset for message catalogs for domain domainname. func BindTextdomainCodeset(domainname string, codeset string) string { cdomainname := C.CString(domainname) ccodeset := C.CString(codeset) res := C.GoString(C.bind_textdomain_codeset(cdomainname, ccodeset)) C.free(unsafe.Pointer(cdomainname)) C.free(unsafe.Pointer(ccodeset)) return res } // Sets or retrieves the current message domain. func Textdomain(domainname string) string { cdomainname := C.CString(domainname) res := C.GoString(C.textdomain(cdomainname)) C.free(unsafe.Pointer(cdomainname)) return res } // Attempt to translate a text string into the user's native language, by // looking up the translation in a message catalog. func Gettext(msgid string) string { cmsgid := C.CString(msgid) res := C.GoString(C.gettext(cmsgid)) C.free(unsafe.Pointer(cmsgid)) return res } // Like Gettext(), but looking up the message in the specified domain. func DGettext(domain string, msgid string) string { cdomain := C.CString(domain) cmsgid := C.CString(msgid) res := C.GoString(C.dgettext(cdomain, cmsgid)) C.free(unsafe.Pointer(cdomain)) C.free(unsafe.Pointer(cmsgid)) return res } // Like Gettext(), but looking up the message in the specified domain and // category. func DCGettext(domain string, msgid string, category uint) string { cdomain := C.CString(domain) cmsgid := C.CString(msgid) res := C.GoString(C.dcgettext(cdomain, cmsgid, C.int(category))) C.free(unsafe.Pointer(cdomain)) C.free(unsafe.Pointer(cmsgid)) return res } // Attempt to translate a text string into the user's native language, by // looking up the appropriate plural form of the translation in a message // catalog. func NGettext(msgid string, msgid_plural string, n uint64) string { cmsgid := C.CString(msgid) cmsgid_plural := C.CString(msgid_plural) res := C.GoString(C.ngettext(cmsgid, cmsgid_plural, C.ulong(n))) C.free(unsafe.Pointer(cmsgid)) C.free(unsafe.Pointer(cmsgid_plural)) return res } // Like fmt.Sprintf() but without %!(EXTRA) errors. func Sprintf(format string, a ...interface{}) string { expects := strings.Count(format, "%") - strings.Count(format, "%%") if expects > 0 { arguments := make([]interface{}, expects) for i := 0; i < expects; i++ { if len(a) > i { arguments[i] = a[i] } } return fmt.Sprintf(format, arguments...) } return format } // Like NGettext(), but looking up the message in the specified domain. func DNGettext(domainname string, msgid string, msgid_plural string, n uint64) string { cdomainname := C.CString(domainname) cmsgid := C.CString(msgid) cmsgid_plural := C.CString(msgid_plural) res := C.GoString(C.dngettext(cdomainname, cmsgid, cmsgid_plural, C.ulong(n))) C.free(unsafe.Pointer(cdomainname)) C.free(unsafe.Pointer(cmsgid)) C.free(unsafe.Pointer(cmsgid_plural)) return res } // Like NGettext(), but looking up the message in the specified domain and // category. func DCNGettext(domainname string, msgid string, msgid_plural string, n uint64, category uint) string { cdomainname := C.CString(domainname) cmsgid := C.CString(msgid) cmsgid_plural := C.CString(msgid_plural) res := C.GoString(C.dcngettext(cdomainname, cmsgid, cmsgid_plural, C.ulong(n), C.int(category))) C.free(unsafe.Pointer(cdomainname)) C.free(unsafe.Pointer(cmsgid)) C.free(unsafe.Pointer(cmsgid_plural)) return res } ciborium-0.2.12+15.10.20150612/gettext/LICENSE0000644000015300001610000000211212536576712020436 0ustar pbuserpbgroup00000000000000Copyright (c) 2012-2013 José Carlos Nieto, http://xiam.menteslibres.org/ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ciborium-0.2.12+15.10.20150612/udisks2/0000755000015300001610000000000012536577044017334 5ustar pbuserpbgroup00000000000000ciborium-0.2.12+15.10.20150612/udisks2/jobs.go0000644000015300001610000001041612536576712020623 0ustar pbuserpbgroup00000000000000/* * Copyright 2015 Canonical Ltd. * * Authors: * Manuel de la Pena : manuel.delapena@cannical.com * * ciborium is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 3. * * ciborium is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ package udisks2 import ( "log" "runtime" "sort" "launchpad.net/go-dbus/v1" ) type job struct { Event Event Operation string Paths []string WasCompleted bool } type jobManager struct { onGoingJobs map[dbus.ObjectPath]job FormatEraseJobs chan job FormatMkfsJobs chan job UnmountJobs chan job MountJobs chan job } func newJobManager(d *dispatcher) *jobManager { // listen to the diff job events and ensure that they are dealt with in the correct channel ongoing := make(map[dbus.ObjectPath]job) eraseChan := make(chan job) mkfsChan := make(chan job) unmountChan := make(chan job) mountChan := make(chan job) m := &jobManager{ongoing, eraseChan, mkfsChan, unmountChan, mountChan} runtime.SetFinalizer(m, cleanJobData) // create a go routine that will filter the diff jobs go func() { for { select { case e := <-d.Jobs: log.Println("New event", e.Path, "Properties:", e.Props, "Interfaces:", e.Interfaces) if e.isRemovalEvent() { log.Print("Is removal event") m.processRemovalEvent(e) } else { m.processAdditionEvent(e) } } } log.Print("Job manager routine done") }() return m } func (m *jobManager) processRemovalEvent(e Event) { log.Println("Deal with job event removal", e.Path, e.Interfaces) if job, ok := m.onGoingJobs[e.Path]; ok { // assert that we did loose the jobs interface, the dispatcher does sort the interfaces i := sort.SearchStrings(e.Interfaces, dbusJobInterface) if i != len(e.Interfaces) { log.Print("Job completed.") // complete event found job.WasCompleted = true if job.Operation == formatErase { log.Print("Sending completed erase job") m.FormatEraseJobs <- job } if job.Operation == formateMkfs { log.Print("Sending completed mkfs job") m.FormatMkfsJobs <- job } if job.Operation == unmountFs { log.Print("Sending completed unmount job") m.UnmountJobs <- job } if job.Operation == mountFs { log.Print("Sending complete mount job") m.MountJobs <- job } log.Print("Removed ongoing job for path", e.Path) delete(m.onGoingJobs, e.Path) return } else { log.Println("Ignoring event for path", e.Path, "because the job interface was not lost") return } } else { log.Println("Ignoring event for path", e.Path) return } } func (m *jobManager) processAdditionEvent(e Event) { j, ok := m.onGoingJobs[e.Path] if !ok { log.Println("Creating job for new path", e.Path, "details are", e) log.Println("New job operation", e.Props.jobOperation()) operation := e.Props.jobOperation() var paths []string if e.Props.isMkfsFormatJob() || e.Props.isUnmountJob() || e.Props.isMountJob() { log.Print("Get paths from formatMkfs or unmountFs or mountFs event.") paths = e.Props.getFormattedPaths() } j = job{e, operation, paths, false} m.onGoingJobs[e.Path] = j } else { log.Print("Updating job for path ", e.Path) j.Event = e if e.Props.isEraseFormatJob() { j.Operation = formatErase } if e.Props.isMkfsFormatJob() { j.Operation = formateMkfs j.Paths = e.Props.getFormattedPaths() } } if j.Operation == formatErase { log.Print("Sending erase job from addition.") m.FormatEraseJobs <- j } else if j.Operation == formateMkfs { log.Print("Sending format job from addition.") m.FormatMkfsJobs <- j } else if j.Operation == unmountFs { log.Print("Sending nmount job from addition.") m.UnmountJobs <- j } else { log.Println("Ignoring job event with operation", j.Operation) } } func (m *jobManager) free() { close(m.FormatEraseJobs) close(m.FormatMkfsJobs) } func cleanJobData(m *jobManager) { m.free() } ciborium-0.2.12+15.10.20150612/udisks2/common_test.go0000644000015300001610000000143112536576712022212 0ustar pbuserpbgroup00000000000000/* * Copyright 2015 Canonical Ltd. * * Authors: * Manuel de la Pena : manuel.delapena@cannical.com * * ciborium is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 3. * * ciborium is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ package udisks2 import ( "testing" . "launchpad.net/gocheck" ) func Test(t *testing.T) { TestingT(t) } ciborium-0.2.12+15.10.20150612/udisks2/properties.go0000644000015300001610000000754312536576712022071 0ustar pbuserpbgroup00000000000000/* * Copyright 2015 Canonical Ltd. * * Authors: * Sergio Schvezov: sergio.schvezov@cannical.com * Manuel de la Pena: manuel.delapena@canonical.com * * ciborium is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 3. * * ciborium is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ package udisks2 import ( "log" "reflect" "launchpad.net/go-dbus/v1" ) const ( formatErase = "format-erase" formateMkfs = "format-mkfs" unmountFs = "filesystem-unmount" mountFs = "filesystem-mount" mountPointsProperty = "MountPoints" uuidProperty = "UUID" tableProperty = "Table" partitionableProperty = "HintPartitionable" operationProperty = "Operation" objectsProperty = "Objects" ) type VariantMap map[string]dbus.Variant type InterfacesAndProperties map[string]VariantMap func (i InterfacesAndProperties) isMounted() bool { propFS, ok := i[dbusFilesystemInterface] if !ok { return false } mountpointsVariant, ok := propFS[mountPointsProperty] if !ok { return false } if reflect.TypeOf(mountpointsVariant.Value).Kind() != reflect.Slice { return false } mountpoints := reflect.ValueOf(mountpointsVariant.Value).Len() log.Println("Mount points found:", mountpoints) return mountpoints > 0 } func (i InterfacesAndProperties) hasPartition() bool { prop, ok := i[dbusPartitionInterface] if !ok { return false } // check if a couple of properties exist if _, ok := prop[uuidProperty]; !ok { return false } if _, ok := prop[tableProperty]; !ok { return false } return true } func (i InterfacesAndProperties) isPartitionable() bool { prop, ok := i[dbusBlockInterface] if !ok { return false } partitionableHintVariant, ok := prop[partitionableProperty] if !ok { return false } if reflect.TypeOf(partitionableHintVariant.Value).Kind() != reflect.Bool { return false } return reflect.ValueOf(partitionableHintVariant.Value).Bool() } func (i InterfacesAndProperties) jobOperation() string { prop, ok := i[dbusJobInterface] if !ok { return "" } operationVariant, ok := prop[operationProperty] if !ok { return "" } if reflect.TypeOf(operationVariant.Value).Kind() != reflect.String { return "" } return reflect.ValueOf(operationVariant.Value).String() } func (i InterfacesAndProperties) isEraseFormatJob() bool { return i.jobOperation() == formatErase } func (i InterfacesAndProperties) isMkfsFormatJob() bool { return i.jobOperation() == formateMkfs } func (i InterfacesAndProperties) isUnmountJob() bool { return i.jobOperation() == unmountFs } func (i InterfacesAndProperties) isMountJob() bool { return i.jobOperation() == mountFs } func (i InterfacesAndProperties) getFormattedPaths() []string { var objectPaths []string prop, ok := i[dbusJobInterface] if !ok { return objectPaths } operationVariant, ok := prop[operationProperty] if !ok { return objectPaths } operationStr := reflect.ValueOf(operationVariant.Value).String() if operationStr == formateMkfs || operationStr == unmountFs || operationStr == mountFs { objs, ok := prop[objectsProperty] if ok { objsVal := reflect.ValueOf(objs.Value) length := objsVal.Len() objectPaths = make([]string, length, length) for i := 0; i < length; i++ { objectPaths[i] = objsVal.Index(i).Elem().String() } return objectPaths } } return objectPaths } func (i InterfacesAndProperties) isFilesystem() bool { _, ok := i[dbusFilesystemInterface] return ok } ciborium-0.2.12+15.10.20150612/udisks2/dispatcher_test.go0000644000015300001610000000545712536576712023064 0ustar pbuserpbgroup00000000000000/* * Copyright 2015 Canonical Ltd. * * Authors: * Manuel de la Pena : manuel.delapena@cannical.com * * ciborium is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 3. * * ciborium is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ package udisks2 import ( "launchpad.net/go-dbus/v1" . "launchpad.net/gocheck" ) type DispatcherTestSuite struct { d *dispatcher completed chan bool } var _ = Suite(&DispatcherTestSuite{}) func (s *DispatcherTestSuite) SetUpTest(c *C) { jobs_ch := make(chan Event) additions_ch := make(chan Event) remove_ch := make(chan Event) s.d = &dispatcher{nil, nil, nil, jobs_ch, additions_ch, remove_ch} s.completed = make(chan bool) } func (s *DispatcherTestSuite) TestProcessAdditionsJob(c *C) { path := dbus.ObjectPath("/org/freedesktop/UDisks2/jobs/3") props := make(map[string]VariantMap) interfaces := make([]string, 0, 0) event := Event{path, props, interfaces} // create a goroutine to test the event go func() { fwd_e := <-s.d.Jobs c.Assert(fwd_e.Path, Equals, path) s.completed <- true }() s.d.processAddition(event) <-s.completed } func (s *DispatcherTestSuite) TestProcessAdditionsDrive(c *C) { path := dbus.ObjectPath("/org/freedesktop/UDisks2/block_devices/mmcblk1") props := make(map[string]VariantMap) interfaces := make([]string, 0, 0) event := Event{path, props, interfaces} // create a goroutine to test the event go func() { fwd_e := <-s.d.Additions c.Assert(fwd_e.Path, Equals, path) s.completed <- true }() s.d.processAddition(event) <-s.completed } func (s *DispatcherTestSuite) TestProcessRemovalJob(c *C) { path := dbus.ObjectPath("/org/freedesktop/UDisks2/jobs/3") props := make(map[string]VariantMap) interfaces := make([]string, 0, 0) event := Event{path, props, interfaces} // create a goroutine to test the event go func() { fwd_e := <-s.d.Jobs c.Assert(fwd_e.Path, Equals, path) s.completed <- true }() s.d.processRemoval(event) <-s.completed } func (s *DispatcherTestSuite) TestProcessRemovalDrive(c *C) { path := dbus.ObjectPath("/org/freedesktop/UDisks2/block_devices/mmcblk1") props := make(map[string]VariantMap) interfaces := make([]string, 0, 0) event := Event{path, props, interfaces} // create a goroutine to test the event go func() { fwd_e := <-s.d.Removals c.Assert(fwd_e.Path, Equals, path) s.completed <- true }() s.d.processRemoval(event) <-s.completed } ciborium-0.2.12+15.10.20150612/udisks2/jobs_test.go0000644000015300001610000001306612536576712021666 0ustar pbuserpbgroup00000000000000/* * Copyright 2015 Canonical Ltd. * * Authors: * Manuel de la Pena : manuel.delapena@cannical.com * * ciborium is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 3. * * ciborium is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ package udisks2 import ( "launchpad.net/go-dbus/v1" . "launchpad.net/gocheck" ) type JobManagerTestSuite struct { ongoing map[dbus.ObjectPath]job events chan Event manager *jobManager completed chan bool } var _ = Suite(&JobManagerTestSuite{}) func (s *JobManagerTestSuite) SetUpTest(c *C) { s.ongoing = make(map[dbus.ObjectPath]job) eraseChan := make(chan job) mkfsChan := make(chan job) unmountChan := make(chan job) mountChan := make(chan job) s.manager = &jobManager{s.ongoing, eraseChan, mkfsChan, unmountChan, mountChan} s.completed = make(chan bool) } func (s *JobManagerTestSuite) TearDownTest(c *C) { close(s.manager.FormatEraseJobs) close(s.manager.FormatMkfsJobs) close(s.completed) } func (s *JobManagerTestSuite) TestProcessAddEventNewErase(c *C) { path := dbus.ObjectPath("/org/freedesktop/UDisks2/jobs/3") go func() { for j := range s.manager.FormatEraseJobs { c.Assert(j.Operation, Equals, formatErase) c.Assert(j.WasCompleted, Equals, false) // assert that the job is present in the ongoing map _, ok := s.ongoing[path] c.Assert(ok, Equals, true) s.completed <- true } }() interfaces := make([]string, 0, 0) props := make(map[string]VariantMap) props[dbusJobInterface] = make(map[string]dbus.Variant) props[dbusJobInterface][operationProperty] = dbus.Variant{formatErase} objsPaths := make([]string, 1, 1) objsPaths[0] = "/path/to/erased/fs" props[dbusJobInterface][objectsProperty] = dbus.Variant{objsPaths} event := Event{path, props, interfaces} s.manager.processAdditionEvent(event) <-s.completed } func (s *JobManagerTestSuite) TestProcessAddEventNewFormat(c *C) { path := dbus.ObjectPath("/org/freedesktop/UDisks2/jobs/1") go func() { for j := range s.manager.FormatMkfsJobs { c.Assert(j.Operation, Equals, formateMkfs) c.Assert(j.WasCompleted, Equals, false) // assert that the job is present in the ongoing map _, ok := s.ongoing[path] c.Assert(ok, Equals, true) s.completed <- true } }() interfaces := make([]string, 0, 0) props := make(map[string]VariantMap) props[dbusJobInterface] = make(map[string]dbus.Variant) props[dbusJobInterface][operationProperty] = dbus.Variant{formateMkfs} objsPaths := make([]interface{}, 1, 1) objsPaths[0] = "/path/to/new/fs" props[dbusJobInterface][objectsProperty] = dbus.Variant{objsPaths} event := Event{path, props, interfaces} s.manager.processAdditionEvent(event) <-s.completed } func (s *JobManagerTestSuite) TestProcessAddEventPresent(c *C) { path := dbus.ObjectPath("/org/freedesktop/UDisks2/jobs/1") // add a ongoing job for the given path s.ongoing[path] = job{} go func() { for j := range s.manager.FormatMkfsJobs { c.Assert(j.Operation, Equals, formateMkfs) c.Assert(j.WasCompleted, Equals, false) // assert that the job is present in the ongoing map _, ok := s.ongoing[path] c.Assert(ok, Equals, true) s.completed <- true } }() interfaces := make([]string, 0, 0) props := make(map[string]VariantMap) props[dbusJobInterface] = make(map[string]dbus.Variant) props[dbusJobInterface][operationProperty] = dbus.Variant{formateMkfs} objsPaths := make([]interface{}, 1, 1) objsPaths[0] = "/path/to/new/fs" props[dbusJobInterface][objectsProperty] = dbus.Variant{objsPaths} event := Event{path, props, interfaces} s.manager.processAdditionEvent(event) <-s.completed } func (s *JobManagerTestSuite) TestProcessRemovalEventMissing(c *C) { path := dbus.ObjectPath("/org/freedesktop/UDisks2/jobs/1") interfaces := make([]string, 1, 1) interfaces[0] = dbusJobInterface props := make(map[string]VariantMap) event := Event{path, props, interfaces} // nothing bad should happen s.manager.processRemovalEvent(event) } func (s *JobManagerTestSuite) TestProcessRemovalEventInterfaceMissing(c *C) { path := dbus.ObjectPath("/org/freedesktop/UDisks2/jobs/1") interfaces := make([]string, 1, 1) interfaces[0] = "com.test.Random" props := make(map[string]VariantMap) event := Event{path, props, interfaces} s.ongoing[path] = job{} // nothing bad should happen s.manager.processRemovalEvent(event) } func (s *JobManagerTestSuite) TestProcessRemovalEventMkfs(c *C) { path := dbus.ObjectPath("/org/freedesktop/UDisks2/jobs/1") // create an erase job and add it to the ongoing map, check that the job // is fwd to the channel as completed and removed from the map formattedPaths := make([]string, 1, 1) formattedPaths[0] = "/one/path/to/a/fmormatted/fs/1" presentJob := job{Event{}, formateMkfs, formattedPaths, false} s.ongoing[path] = presentJob go func() { for j := range s.manager.FormatMkfsJobs { c.Assert(j.Operation, Equals, formateMkfs) c.Assert(j.WasCompleted, Equals, true) c.Assert(len(j.Paths), Equals, 1) s.completed <- true } }() interfaces := make([]string, 1, 1) interfaces[0] = dbusJobInterface props := make(map[string]VariantMap) event := Event{path, props, interfaces} s.manager.processRemovalEvent(event) <-s.completed } ciborium-0.2.12+15.10.20150612/udisks2/dispatcher.go0000644000015300001610000001150412536576712022013 0ustar pbuserpbgroup00000000000000/* * Copyright 2015 Canonical Ltd. * * Authors: * Manuel de la Pena : manuel.delapena@cannical.com * * ciborium is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 3. * * ciborium is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ package udisks2 import ( "log" "runtime" "sort" "strings" "launchpad.net/go-dbus/v1" ) const ( jobPrefixPath = "/org/freedesktop/UDisks2/jobs/" blockDevicesPath = "/org/freedesktop/UDisks2/block_devices/" ) type Interfaces []string type Event struct { Path dbus.ObjectPath Props InterfacesAndProperties Interfaces Interfaces } // isRemovalEvent returns if an event represents an InterfacesRemoved signal from the dbus ObjectManager // dbus interface. An event is a removal event when it carries a set of the interfaces that have been lost // in a dbus object path. func (e *Event) isRemovalEvent() bool { return len(e.Interfaces) != 0 } type dispatcher struct { conn *dbus.Connection additionsWatch *dbus.SignalWatch removalsWatch *dbus.SignalWatch Jobs chan Event Additions chan Event Removals chan Event } func connectToSignal(conn *dbus.Connection, path dbus.ObjectPath, inter, member string) (*dbus.SignalWatch, error) { log.Println("Connecting to signal", path, inter, member) w, err := conn.WatchSignal(&dbus.MatchRule{ Type: dbus.TypeSignal, Sender: dbusName, Interface: dbusObjectManagerInterface, Member: member, Path: path}) return w, err } // newDispatcher tries to return a dispatcher instance that is connected to the dbus signal that must be listened // in order to interact with UDisk. If the connection with the signals could not be performed an error is returned. func newDispatcher(conn *dbus.Connection) (*dispatcher, error) { log.Print("Creating new dispatcher.") add_w, err := connectToSignal(conn, dbusObject, dbusObjectManagerInterface, dbusAddedSignal) if err != nil { return nil, err } remove_w, err := connectToSignal(conn, dbusObject, dbusObjectManagerInterface, dbusRemovedSignal) if err != nil { return nil, err } jobs_ch := make(chan Event) additions_ch := make(chan Event) remove_ch := make(chan Event) d := &dispatcher{conn, add_w, remove_w, jobs_ch, additions_ch, remove_ch} runtime.SetFinalizer(d, cleanDispatcherData) // create the go routines used to grab the events and dispatch them accordingly return d, nil } func (d *dispatcher) Init() { log.Print("Init the dispatcher.") go func() { for msg := range d.additionsWatch.C { var event Event if err := msg.Args(&event.Path, &event.Props); err != nil { log.Print(err) continue } log.Print("New addition event for path ", event.Path, event.Props) d.processAddition(event) } }() go func() { for msg := range d.removalsWatch.C { log.Print("New removal event for path.") var event Event if err := msg.Args(&event.Path, &event.Interfaces); err != nil { log.Print(err) continue } sort.Strings(event.Interfaces) log.Print("Removal event is ", event.Path, " Interfaces: ", event.Interfaces) d.processRemoval(event) } }() } func (d *dispatcher) free() { log.Print("Cleaning dispatcher resources.") // cancel all watches so that goroutines are done and close the // channels d.additionsWatch.Cancel() d.removalsWatch.Cancel() close(d.Jobs) close(d.Additions) close(d.Removals) } func (d *dispatcher) processAddition(event Event) { log.Print("Processing an add event from path ", event.Path) // according to the object path we know if the even was a job one or not if strings.HasPrefix(string(event.Path), jobPrefixPath) { log.Print("Sending a new job event.") select { case d.Jobs <- event: log.Print("Sent event ", event.Path) } } else { log.Print("Sending a new general add event.") select { case d.Additions <- event: log.Print("Sent event ", event.Path) } } } func (d *dispatcher) processRemoval(event Event) { log.Print("Processing a remove event from path ", event.Path) // according to the object path we know if the even was a job one or not if strings.HasPrefix(string(event.Path), jobPrefixPath) { log.Print("Sending a new remove job event.") select { case d.Jobs <- event: log.Println("Sent event", event.Path) } } else { log.Print("Sending a new general remove event.") select { case d.Removals <- event: log.Println("Sent event", event.Path) } } } func cleanDispatcherData(d *dispatcher) { d.free() } ciborium-0.2.12+15.10.20150612/udisks2/properties_test.go0000644000015300001610000002100712536576712023117 0ustar pbuserpbgroup00000000000000/* * Copyright 2015 Canonical Ltd. * * Authors: * Manuel de la Pena : manuel.delapena@cannical.com * * ciborium is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 3. * * ciborium is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ package udisks2 import ( "sort" "launchpad.net/go-dbus/v1" . "launchpad.net/gocheck" ) type InterfacesAndPropertiesTestSuite struct { properties InterfacesAndProperties } var _ = Suite(&InterfacesAndPropertiesTestSuite{}) func (s *InterfacesAndPropertiesTestSuite) SetUpTest(c *C) { s.properties = make(map[string]VariantMap) } func (s *InterfacesAndPropertiesTestSuite) TestIsMountedMissingInterface(c *C) { // empty properties means that the interface is missing c.Assert(s.properties.isMounted(), Equals, false) } func (s *InterfacesAndPropertiesTestSuite) TestIsMountedMissingMountPoints(c *C) { // add the expected interface but without the mount points property s.properties[dbusFilesystemInterface] = make(map[string]dbus.Variant) c.Assert(s.properties.isMounted(), Equals, false) } func (s *InterfacesAndPropertiesTestSuite) TestIsMountedNotSlize(c *C) { s.properties[dbusFilesystemInterface] = make(map[string]dbus.Variant) s.properties[dbusFilesystemInterface]["MountPoints"] = dbus.Variant{5} c.Assert(s.properties.isMounted(), Equals, false) } func (s *InterfacesAndPropertiesTestSuite) TestIsMountedZeroMountPoints(c *C) { mount_points := make([]string, 0, 0) s.properties[dbusFilesystemInterface] = make(map[string]dbus.Variant) s.properties[dbusFilesystemInterface]["MountPoints"] = dbus.Variant{mount_points} c.Assert(s.properties.isMounted(), Equals, false) } func (s *InterfacesAndPropertiesTestSuite) TestIsMountedSeveralMountPoints(c *C) { mount_points := make([]string, 1, 1) mount_points[0] = "/random/mount/point" s.properties[dbusFilesystemInterface] = make(map[string]dbus.Variant) s.properties[dbusFilesystemInterface]["MountPoints"] = dbus.Variant{mount_points} c.Assert(s.properties.isMounted(), Equals, true) } func (s *InterfacesAndPropertiesTestSuite) TestHasPartitionMissingInterface(c *C) { // an empty map should result in false c.Assert(s.properties.hasPartition(), Equals, false) } func (s *InterfacesAndPropertiesTestSuite) TestHasPartitionMissinUUID(c *C) { // add the interface with no properties s.properties[dbusPartitionInterface] = make(map[string]dbus.Variant) c.Assert(s.properties.hasPartition(), Equals, false) } func (s *InterfacesAndPropertiesTestSuite) TestHasParitionMissingTable(c *C) { s.properties[dbusPartitionInterface] = make(map[string]dbus.Variant) s.properties[dbusPartitionInterface]["UUID"] = dbus.Variant{"A UUID"} c.Assert(s.properties.hasPartition(), Equals, false) } func (s *InterfacesAndPropertiesTestSuite) TestHasParitionPresent(c *C) { s.properties[dbusPartitionInterface] = make(map[string]dbus.Variant) s.properties[dbusPartitionInterface]["UUID"] = dbus.Variant{"A UUID"} s.properties[dbusPartitionInterface]["Table"] = dbus.Variant{"A Table"} c.Assert(s.properties.hasPartition(), Equals, true) } func (s *InterfacesAndPropertiesTestSuite) TestIsPartitionableMissingInterface(c *C) { // an empty map should result in false c.Assert(s.properties.isPartitionable(), Equals, false) } func (s *InterfacesAndPropertiesTestSuite) TestIsParitionableMissingHint(c *C) { s.properties[dbusBlockInterface] = make(map[string]dbus.Variant) c.Assert(s.properties.isPartitionable(), Equals, false) } func (s *InterfacesAndPropertiesTestSuite) TestIsParitionableHintNotBool(c *C) { s.properties[dbusBlockInterface] = make(map[string]dbus.Variant) s.properties[dbusBlockInterface]["HintPartitionable"] = dbus.Variant{"A String"} c.Assert(s.properties.isPartitionable(), Equals, false) } func (s *InterfacesAndPropertiesTestSuite) TestIsPartitionable(c *C) { s.properties[dbusBlockInterface] = make(map[string]dbus.Variant) s.properties[dbusBlockInterface]["HintPartitionable"] = dbus.Variant{true} c.Assert(s.properties.isPartitionable(), Equals, true) } func (s *InterfacesAndPropertiesTestSuite) TestIsNotPartitionable(c *C) { s.properties[dbusBlockInterface] = make(map[string]dbus.Variant) s.properties[dbusBlockInterface]["HintPartitionable"] = dbus.Variant{false} c.Assert(s.properties.isPartitionable(), Equals, false) } func (s *InterfacesAndPropertiesTestSuite) TestIsEraseFormatJobMissingInterface(c *C) { // an empty map should result in false c.Assert(s.properties.isEraseFormatJob(), Equals, false) } func (s *InterfacesAndPropertiesTestSuite) TestIsEraseFormatJobMissingOperation(c *C) { s.properties[dbusJobInterface] = make(map[string]dbus.Variant) c.Assert(s.properties.isEraseFormatJob(), Equals, false) } func (s *InterfacesAndPropertiesTestSuite) TestIsEraseFormatJobWrongType(c *C) { s.properties[dbusJobInterface] = make(map[string]dbus.Variant) s.properties[dbusJobInterface]["Operation"] = dbus.Variant{false} c.Assert(s.properties.isEraseFormatJob(), Equals, false) } func (s *InterfacesAndPropertiesTestSuite) TestIsEraseFormatJobWrongOperation(c *C) { s.properties[dbusJobInterface] = make(map[string]dbus.Variant) s.properties[dbusJobInterface]["Operation"] = dbus.Variant{"false"} c.Assert(s.properties.isEraseFormatJob(), Equals, false) } func (s *InterfacesAndPropertiesTestSuite) TestIsEraseFormatJob(c *C) { s.properties[dbusJobInterface] = make(map[string]dbus.Variant) s.properties[dbusJobInterface]["Operation"] = dbus.Variant{"format-erase"} c.Assert(s.properties.isEraseFormatJob(), Equals, true) } func (s *InterfacesAndPropertiesTestSuite) TestIsMkfsFormatJobMissingInterface(c *C) { c.Assert(s.properties.isMkfsFormatJob(), Equals, false) } func (s *InterfacesAndPropertiesTestSuite) TestIsMkfsFormatJobMissingOperation(c *C) { s.properties[dbusJobInterface] = make(map[string]dbus.Variant) c.Assert(s.properties.isMkfsFormatJob(), Equals, false) } func (s *InterfacesAndPropertiesTestSuite) TestIsMkfsFormatJobWrongType(c *C) { s.properties[dbusJobInterface] = make(map[string]dbus.Variant) s.properties[dbusJobInterface]["Operation"] = dbus.Variant{true} c.Assert(s.properties.isMkfsFormatJob(), Equals, false) } func (s *InterfacesAndPropertiesTestSuite) TestIsMkfsFormatJobWrongOperation(c *C) { s.properties[dbusJobInterface] = make(map[string]dbus.Variant) s.properties[dbusJobInterface]["Operation"] = dbus.Variant{"false"} c.Assert(s.properties.isMkfsFormatJob(), Equals, false) } func (s *InterfacesAndPropertiesTestSuite) TestIsMkfsFormatJob(c *C) { s.properties[dbusJobInterface] = make(map[string]dbus.Variant) s.properties[dbusJobInterface]["Operation"] = dbus.Variant{"format-mkfs"} c.Assert(s.properties.isMkfsFormatJob(), Equals, true) } func (s *InterfacesAndPropertiesTestSuite) TestGetFormattedPathsMissingInterface(c *C) { paths := s.properties.getFormattedPaths() c.Assert(len(paths), Equals, 0) } func (s *InterfacesAndPropertiesTestSuite) TestGetFormattedPathsMissingProperty(c *C) { s.properties[dbusJobInterface] = make(map[string]dbus.Variant) paths := s.properties.getFormattedPaths() c.Assert(len(paths), Equals, 0) } func (s *InterfacesAndPropertiesTestSuite) TestGetFormattedPaths(c *C) { firstPath := "/path/to/new/fs/1" secondPath := "/path/to/new/fs/2" thirdPath := "/path/to/new/fs/3" objsPaths := make([]interface{}, 3, 3) objsPaths[0] = firstPath objsPaths[1] = secondPath objsPaths[2] = thirdPath s.properties[dbusJobInterface] = make(map[string]dbus.Variant) s.properties[dbusJobInterface]["Operation"] = dbus.Variant{"format-mkfs"} s.properties[dbusJobInterface]["Objects"] = dbus.Variant{objsPaths} paths := s.properties.getFormattedPaths() //sort.Strings(paths) c.Assert(len(paths), Equals, len(objsPaths)) c.Assert(sort.SearchStrings(paths, firstPath), Not(Equals), len(paths)) c.Assert(sort.SearchStrings(paths, secondPath), Not(Equals), len(paths)) c.Assert(sort.SearchStrings(paths, thirdPath), Not(Equals), len(paths)) } func (s *InterfacesAndPropertiesTestSuite) TestIsFileSystemNoInterface(c *C) { c.Assert(s.properties.isFilesystem(), Equals, false) } func (s *InterfacesAndPropertiesTestSuite) TestIsFileSystem(c *C) { s.properties[dbusFilesystemInterface] = make(map[string]dbus.Variant) c.Assert(s.properties.isFilesystem(), Equals, true) } ciborium-0.2.12+15.10.20150612/udisks2/udisks2.go0000644000015300001610000004540512536576712021260 0ustar pbuserpbgroup00000000000000/* * Copyright 2014-2015 Canonical Ltd. * * Authors: * Sergio Schvezov: sergio.schvezov@cannical.com * Manuel de la Pena: manuel.delapena@canonical.com * * ciborium is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 3. * * nuntium is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ package udisks2 import ( "errors" "fmt" "os" "path" "reflect" "runtime" "sort" "strings" "sync" "time" "log" "launchpad.net/go-dbus/v1" ) const ( dbusName = "org.freedesktop.UDisks2" dbusObject = "/org/freedesktop/UDisks2" dbusObjectManagerInterface = "org.freedesktop.DBus.ObjectManager" dbusBlockInterface = "org.freedesktop.UDisks2.Block" dbusDriveInterface = "org.freedesktop.UDisks2.Drive" dbusFilesystemInterface = "org.freedesktop.UDisks2.Filesystem" dbusPartitionInterface = "org.freedesktop.UDisks2.Partition" dbusPartitionTableInterface = "org.freedesktop.UDisks2.PartitionTable" dbusJobInterface = "org.freedesktop.UDisks2.Job" dbusPropertiesInterface = "org.freedesktop.DBus.Properties" dbusAddedSignal = "InterfacesAdded" dbusRemovedSignal = "InterfacesRemoved" ) var ErrUnhandledFileSystem = errors.New("unhandled filesystem") type Drive struct { Path dbus.ObjectPath blockDevices map[dbus.ObjectPath]InterfacesAndProperties driveInfo InterfacesAndProperties Mounted bool } type MountEvent struct { Path dbus.ObjectPath Mountpoint string } type driveMap map[dbus.ObjectPath]*Drive type mountpointMap map[dbus.ObjectPath]string type UDisks2 struct { conn *dbus.Connection validFS sort.StringSlice blockAdded chan *Event driveAdded *dbus.SignalWatch mountRemoved chan string blockError chan error driveRemoved *dbus.SignalWatch blockDevice chan bool drives driveMap mountpoints mountpointMap mapLock sync.Mutex startLock sync.Mutex dispatcher *dispatcher jobs *jobManager pendingMounts []string formatCompleted chan *Event formatErrors chan error umountCompleted chan string unmountErrors chan error mountCompleted chan MountEvent mountErrors chan error } func NewStorageWatcher(conn *dbus.Connection, filesystems ...string) (u *UDisks2) { u = &UDisks2{ conn: conn, validFS: sort.StringSlice(filesystems), drives: make(driveMap), mountpoints: make(mountpointMap), pendingMounts: make([]string, 0, 0), } runtime.SetFinalizer(u, cleanDriveWatch) return u } func (u *UDisks2) SubscribeAddEvents() (<-chan *Event, <-chan error) { u.blockAdded = make(chan *Event) u.blockError = make(chan error) return u.blockAdded, u.blockError } func (u *UDisks2) SubscribeRemoveEvents() <-chan string { u.mountRemoved = make(chan string) return u.mountRemoved } func (u *UDisks2) SubscribeBlockDeviceEvents() <-chan bool { u.blockDevice = make(chan bool) return u.blockDevice } func (u *UDisks2) SubscribeFormatEvents() (<-chan *Event, <-chan error) { u.formatCompleted = make(chan *Event) u.formatErrors = make(chan error) return u.formatCompleted, u.formatErrors } func (u *UDisks2) SubscribeUnmountEvents() (<-chan string, <-chan error) { u.umountCompleted = make(chan string) u.unmountErrors = make(chan error) return u.umountCompleted, u.unmountErrors } func (u *UDisks2) SubscribeMountEvents() (<-chan MountEvent, <-chan error) { u.mountCompleted = make(chan MountEvent) u.mountErrors = make(chan error) return u.mountCompleted, u.mountErrors } func (u *UDisks2) Mount(s *Event) { go func() { var mountpoint string obj := u.conn.Object(dbusName, s.Path) options := make(VariantMap) options["auth.no_user_interaction"] = dbus.Variant{true} reply, err := obj.Call(dbusFilesystemInterface, "Mount", options) if err != nil { u.mountErrors <- err } if err := reply.Args(&mountpoint); err != nil { u.mountErrors <- err } log.Println("Mounth path for '", s.Path, "' set to be", mountpoint) }() } func (u *UDisks2) Unmount(d *Drive) { if d.Mounted { for blockPath, _ := range d.blockDevices { u.umount(blockPath) } } else { log.Println("Block is not mounted", d) u.unmountErrors <- fmt.Errorf("Drive is not mounted ", d) } } func (u *UDisks2) syncUmount(o dbus.ObjectPath) error { log.Println("Unmounting", o) obj := u.conn.Object(dbusName, o) options := make(VariantMap) options["auth.no_user_interaction"] = dbus.Variant{true} _, err := obj.Call(dbusFilesystemInterface, "Unmount", options) return err } func (u *UDisks2) umount(o dbus.ObjectPath) { go func() { err := u.syncUmount(o) if err != nil { u.unmountErrors <- err } }() } func (u *UDisks2) syncFormat(o dbus.ObjectPath) error { // perform sync call to format the device log.Println("Formatting", o) obj := u.conn.Object(dbusName, o) options := make(VariantMap) options["auth.no_user_interaction"] = dbus.Variant{true} _, err := obj.Call(dbusBlockInterface, "Format", "vfat", options) return err } func (u *UDisks2) Format(d *Drive) { go func() { log.Println("Format", d) // do a sync call to unmount for blockPath, _ := range d.blockDevices { mps := u.mountpointsForPath(blockPath) if len(mps) > 0 { log.Println("Unmounting", blockPath) err := u.syncUmount(blockPath) if err != nil { log.Println("Error while doing a pre-format unmount:", err) u.formatErrors <- err return } } } // delete all the partitions for blockPath, block := range d.blockDevices { if block.hasPartition() { if err := u.deletePartition(blockPath); err != nil { log.Println("Issues while deleting partition on", blockPath, ":", err) u.formatErrors <- err return } // delete the block from the map as it shouldn't exist anymore delete(d.blockDevices, blockPath) } } // format the blocks with PartitionTable for blockPath, block := range d.blockDevices { if !block.isPartitionable() { continue } // perform sync call to format the device log.Println("Formatting", blockPath) err := u.syncFormat(blockPath) if err != nil { u.formatErrors <- err } } // no, we do not send a success because it should be done ONLY when we get a format job done // event from the dispatcher. }() } func (u *UDisks2) deletePartition(o dbus.ObjectPath) error { log.Println("Calling delete on", o) obj := u.conn.Object(dbusName, o) options := make(VariantMap) options["auth.no_user_interaction"] = dbus.Variant{true} _, err := obj.Call(dbusPartitionInterface, "Delete", options) return err } func (u *UDisks2) mountpointsForPath(p dbus.ObjectPath) []string { var mountpoints []string proxy := u.conn.Object(dbusName, p) reply, err := proxy.Call(dbusPropertiesInterface, "Get", dbusFilesystemInterface, mountPointsProperty) if err != nil { log.Println("Error getting mount points") return mountpoints } if reply.Type == dbus.TypeError { log.Println("dbus error: %", reply.ErrorName) return mountpoints } mountpointsVar := dbus.Variant{} if err = reply.Args(&mountpointsVar); err != nil { log.Println("Error reading arg", err) return mountpoints } mountPointsVal := reflect.ValueOf(mountpointsVar.Value) length := mountPointsVal.Len() mountpoints = make([]string, length, length) for i := 0; i < length; i++ { array := reflect.ValueOf(mountPointsVal.Index(i).Interface()) arrayLenght := array.Len() byteArray := make([]byte, arrayLenght, arrayLenght) for j := 0; j < arrayLenght; j++ { byteArray[j] = array.Index(j).Interface().(byte) } mp := string(byteArray) mp = mp[0 : len(mp)-1] log.Println("New mp found", mp) mountpoints[i] = mp } return mountpoints } func (u *UDisks2) ExternalDrives() []Drive { u.startLock.Lock() defer u.startLock.Unlock() var drives []Drive for _, d := range u.drives { if !d.hasSystemBlockDevices() && len(d.blockDevices) != 0 { drives = append(drives, *d) } } return drives } func (u *UDisks2) Init() (err error) { d, err := newDispatcher(u.conn) if err == nil { u.dispatcher = d u.jobs = newJobManager(d) go func() { for { select { case e := <-u.dispatcher.Additions: if err := u.processAddEvent(&e); err != nil { log.Print("Issues while processing ", e.Path, ": ", err) } case e := <-u.dispatcher.Removals: if err := u.processRemoveEvent(e.Path, e.Interfaces); err != nil { log.Println("Issues while processing remove event:", err) } case j := <-u.jobs.FormatEraseJobs: if j.WasCompleted { log.Print("Erase job completed.") } else { log.Print("Erase job started.") } case j := <-u.jobs.FormatMkfsJobs: if j.WasCompleted { log.Println("Format job done for", j.Event.Path) u.pendingMounts = append(u.pendingMounts, j.Paths...) sort.Strings(u.pendingMounts) } else { log.Print("Format job started.") } case j := <-u.jobs.UnmountJobs: if j.WasCompleted { log.Println("Unmount job was finished for", j.Event.Path, "for paths", j.Paths) for _, path := range j.Paths { u.umountCompleted <- path log.Println("Removing", path, "from", u.mountpoints) delete(u.mountpoints, dbus.ObjectPath(path)) } } else { log.Print("Unmount job started.") } case j := <-u.jobs.MountJobs: if j.WasCompleted { log.Println("Mount job was finished for", j.Event.Path, "for paths", j.Paths) for _, path := range j.Paths { // grab the mointpoints from the variant mountpoints := u.mountpointsForPath(dbus.ObjectPath(path)) log.Println("Mount points are", mountpoints) if len(mountpoints) > 0 { p := dbus.ObjectPath(path) mp := string(mountpoints[0]) u.mountpoints[p] = string(mp) // update the drives for _, d := range u.drives { changed := d.SetMounted(p) if changed { e := MountEvent{d.Path, mp} log.Println("New mount event", e) go func() { for _, t := range [...]int{1, 2, 3, 4, 5, 10} { _, err := os.Stat(mp) if err != nil { log.Println("Mountpoint", mp, "not yet present. Wating", t, "seconds due to", err) time.Sleep(time.Duration(t) * time.Second) } else { break } } log.Println("Sending new event to channel.") u.mountCompleted <- e }() } } } } } else { log.Print("Mount job started.") } } } }() d.Init() u.emitExistingDevices() return nil } return err } func (u *UDisks2) connectToSignal(path dbus.ObjectPath, inter, member string) (*dbus.SignalWatch, error) { w, err := u.conn.WatchSignal(&dbus.MatchRule{ Type: dbus.TypeSignal, Sender: dbusName, Interface: dbusObjectManagerInterface, Member: member, Path: path}) return w, err } func (u *UDisks2) connectToSignalInterfacesAdded() (*dbus.SignalWatch, error) { return u.connectToSignal(dbusObject, dbusObjectManagerInterface, dbusAddedSignal) } func (u *UDisks2) connectToSignalInterfacesRemoved() (*dbus.SignalWatch, error) { return u.connectToSignal(dbusObject, dbusObjectManagerInterface, dbusRemovedSignal) } func (u *UDisks2) emitExistingDevices() { log.Println("emitExistingDevices") u.startLock.Lock() defer u.startLock.Unlock() obj := u.conn.Object(dbusName, dbusObject) reply, err := obj.Call(dbusObjectManagerInterface, "GetManagedObjects") if err != nil { log.Println("Cannot get initial state for devices:", err) } log.Println("GetManagedObjects was done") allDevices := make(map[dbus.ObjectPath]InterfacesAndProperties) if err := reply.Args(&allDevices); err != nil { log.Println("Cannot get initial state for devices:", err) } var blocks, drives []*Event // separate drives from blocks to avoid aliasing for objectPath, props := range allDevices { s := &Event{objectPath, props, make([]string, 0, 0)} switch objectPathType(objectPath) { case deviceTypeDrive: drives = append(drives, s) case deviceTypeBlock: blocks = append(blocks, s) } } for i := range drives { if err := u.processAddEvent(drives[i]); err != nil { log.Println("Error while processing events:", err) } } for i := range blocks { if err := u.processAddEvent(blocks[i]); err != nil { log.Println("Error while processing events:", err) } } } func (u *UDisks2) processAddEvent(s *Event) error { log.Println("processAddEvents(", s.Path, s.Props, s.Interfaces, ")") u.mapLock.Lock() defer u.mapLock.Unlock() pos := sort.SearchStrings(u.pendingMounts, string(s.Path)) if pos != len(u.pendingMounts) && s.Props.isFilesystem() { log.Println("Path", s.Path, "must be remounted.") u.formatCompleted <- s } if isBlockDevice, err := u.drives.addInterface(s); err != nil { return err } else if isBlockDevice { log.Println("New block device added.") if u.blockAdded != nil && u.blockError != nil { if ok, err := u.desiredMountableEvent(s); err != nil { u.blockError <- err } else if ok { u.blockAdded <- s } } if u.blockDevice != nil { log.Println("Sedding block device to channel") u.blockDevice <- true } } return nil } func (u *UDisks2) processRemoveEvent(objectPath dbus.ObjectPath, interfaces Interfaces) error { log.Println("Remove event for", objectPath) mountpoint, mounted := u.mountpoints[objectPath] if mounted { log.Println("Removing mountpoint", mountpoint) delete(u.mountpoints, objectPath) if u.mountRemoved != nil && interfaces.desiredUnmountEvent() { u.mountRemoved <- mountpoint } else { return errors.New("mounted but does not remove filesystem interface") } } u.mapLock.Lock() log.Println("Removing device", objectPath) if strings.HasPrefix(string(objectPath), path.Join(dbusObject, "drives")) { delete(u.drives, objectPath) } else { // TODO: remove filesystem interface from map } u.mapLock.Unlock() if u.blockDevice != nil { log.Println("Removing block device to channel.") u.blockDevice <- false } return nil } func cleanDriveWatch(u *UDisks2) { log.Print("Cancelling Interfaces signal watch") u.driveAdded.Cancel() u.driveRemoved.Cancel() } func (iface Interfaces) desiredUnmountEvent() bool { for i := range iface { fmt.Println(iface[i]) if iface[i] == dbusFilesystemInterface { return true } } return false } func (u *UDisks2) desiredMountableEvent(s *Event) (bool, error) { // No file system interface means we can't mount it even if we wanted to _, ok := s.Props[dbusFilesystemInterface] if !ok { log.Println("Filesystem interface is missing.") return false, nil } drivePath, err := s.getDrive() if err != nil { log.Println("Issues while getting drive:", err) return false, nil } drive, ok := u.drives[drivePath] if !ok { log.Println("Drive with path", drivePath, "not found") return false, nil } if ok := drive.hasSystemBlockDevices(); ok { log.Println(drivePath, "which contains", s.Path, "has HintSystem set") return false, nil } driveProps, ok := drive.driveInfo[dbusDriveInterface] if !ok { log.Println(drivePath, "doesn't hold a Drive interface") return false, nil } if mediaRemovableVariant, ok := driveProps["MediaRemovable"]; !ok { log.Println(drivePath, "which holds", s.Path, "doesn't have MediaRemovable") return false, nil } else { mediaRemovable := reflect.ValueOf(mediaRemovableVariant.Value).Bool() if !mediaRemovable { log.Println(drivePath, "which holds", s.Path, "is not MediaRemovable") return false, nil } } if s.Props.isMounted() { return false, nil } propBlock, ok := s.Props[dbusBlockInterface] if !ok { return false, nil } id, ok := propBlock["IdType"] if !ok { log.Println(s.Path, "doesn't hold IdType") return false, nil } fs := reflect.ValueOf(id.Value).String() if fs == "" { return false, nil } i := u.validFS.Search(fs) if i >= u.validFS.Len() || u.validFS[i] != fs { log.Println(fs, "not in:", u.validFS, "for", s.Path) return false, ErrUnhandledFileSystem } return true, nil } func (d *Drive) hasSystemBlockDevices() bool { for _, blockDevice := range d.blockDevices { if propBlock, ok := blockDevice[dbusBlockInterface]; ok { if systemHintVariant, ok := propBlock["HintSystem"]; ok { return reflect.ValueOf(systemHintVariant.Value).Bool() } } } return false } func (d *Drive) Model() string { propDrive, ok := d.driveInfo[dbusDriveInterface] if !ok { return "" } modelVariant, ok := propDrive["Model"] if !ok { return "" } return reflect.ValueOf(modelVariant.Value).String() } func (d *Drive) SetMounted(path dbus.ObjectPath) bool { for p, _ := range d.blockDevices { if p == path { d.Mounted = true return true } } return false } func (s *Event) getDrive() (dbus.ObjectPath, error) { propBlock, ok := s.Props[dbusBlockInterface] if !ok { return "", fmt.Errorf("interface %s not found", dbusBlockInterface) } driveVariant, ok := propBlock["Drive"] if !ok { return "", errors.New("property 'Drive' not found") } return dbus.ObjectPath(reflect.ValueOf(driveVariant.Value).String()), nil } func newDrive(s *Event) *Drive { return &Drive{ Path: s.Path, blockDevices: make(map[dbus.ObjectPath]InterfacesAndProperties), driveInfo: s.Props, Mounted: s.Props.isMounted(), } } const ( deviceTypeBlock = iota deviceTypeDrive deviceTypeUnhandled ) type dbusObjectPathType uint func objectPathType(objectPath dbus.ObjectPath) dbusObjectPathType { objectPathString := string(objectPath) if strings.HasPrefix(objectPathString, path.Join(dbusObject, "drives")) { return deviceTypeDrive } else if strings.HasPrefix(objectPathString, path.Join(dbusObject, "block_devices")) { return deviceTypeBlock } else { return deviceTypeUnhandled } } func (dm *driveMap) addInterface(s *Event) (bool, error) { var blockDevice bool switch objectPathType(s.Path) { case deviceTypeDrive: if _, ok := (*dm)[s.Path]; ok { log.Println("WARNING: replacing", s.Path, "with new drive event") } (*dm)[s.Path] = newDrive(s) case deviceTypeBlock: driveObjectPath, err := s.getDrive() if err != nil { return blockDevice, err } if _, ok := (*dm)[driveObjectPath]; !ok { drive := newDrive(s) log.Println("Creating new drive", drive) (*dm)[s.Path] = drive } else { (*dm)[driveObjectPath].blockDevices[s.Path] = s.Props (*dm)[driveObjectPath].Mounted = s.Props.isMounted() } blockDevice = true default: // we don't care about other object paths log.Println("Unhandled object path", s.Path) } return blockDevice, nil }