Update interface name

This commit is contained in:
reionwong 2021-09-15 15:46:38 +08:00
parent 15005d64c9
commit 10ee6ffa49
6 changed files with 21 additions and 16 deletions

View file

@ -26,9 +26,9 @@
Desktop::Desktop(QObject *parent) Desktop::Desktop(QObject *parent)
: QObject(parent) : QObject(parent)
, m_dockInterface("org.cutefish.Dock", , m_dockInterface("com.cutefish.Dock",
"/Dock", "/Dock",
"org.cutefish.Dock", QDBusConnection::sessionBus()) "com.cutefish.Dock", QDBusConnection::sessionBus())
, m_leftMargin(0) , m_leftMargin(0)
, m_rightMargin(0) , m_rightMargin(0)
, m_bottomMargin(0) , m_bottomMargin(0)
@ -39,7 +39,7 @@ Desktop::Desktop(QObject *parent)
connect(&m_dockInterface, SIGNAL(directionChanged()), this, SLOT(updateMargins())); connect(&m_dockInterface, SIGNAL(directionChanged()), this, SLOT(updateMargins()));
connect(&m_dockInterface, SIGNAL(visibilityChanged()), this, SLOT(updateMargins())); connect(&m_dockInterface, SIGNAL(visibilityChanged()), this, SLOT(updateMargins()));
} else { } else {
QDBusServiceWatcher *watcher = new QDBusServiceWatcher("org.cutefish.Dock", QDBusServiceWatcher *watcher = new QDBusServiceWatcher("com.cutefish.Dock",
QDBusConnection::sessionBus(), QDBusConnection::sessionBus(),
QDBusServiceWatcher::WatchForUnregistration, QDBusServiceWatcher::WatchForUnregistration,
this); this);

View file

@ -24,13 +24,13 @@
DesktopSettings::DesktopSettings(QObject *parent) DesktopSettings::DesktopSettings(QObject *parent)
: QObject(parent) : QObject(parent)
, m_interface("org.cutefish.Settings", , m_interface("com.cutefish.Settings",
"/Theme", "org.cutefish.Theme", "/Theme", "com.cutefish.Theme",
QDBusConnection::sessionBus(), this) QDBusConnection::sessionBus(), this)
{ {
QDBusServiceWatcher *watcher = new QDBusServiceWatcher(this); QDBusServiceWatcher *watcher = new QDBusServiceWatcher(this);
watcher->setConnection(QDBusConnection::sessionBus()); watcher->setConnection(QDBusConnection::sessionBus());
watcher->addWatchedService("org.cutefish.Settings"); watcher->addWatchedService("com.cutefish.Settings");
connect(watcher, &QDBusServiceWatcher::serviceRegistered, this, &DesktopSettings::init); connect(watcher, &QDBusServiceWatcher::serviceRegistered, this, &DesktopSettings::init);
init(); init();

View file

@ -201,6 +201,7 @@ void FilePropertiesDialog::init()
if (!m_multiple) { if (!m_multiple) {
KFileItem item = m_items.first(); KFileItem item = m_items.first();
QFileInfo info(item.url().toLocalFile());
QString path; QString path;
m_fileName = m_items.first().name(); m_fileName = m_items.first().name();
@ -212,11 +213,15 @@ void FilePropertiesDialog::init()
m_mimeType = m_items.first().mimetype(); m_mimeType = m_items.first().mimetype();
m_size = KIO::convertSize(m_items.first().size()); m_size = KIO::convertSize(m_items.first().size());
m_location = QFileInfo(m_items.first().localPath()).dir().path(); m_location = info.dir().path();
m_creationTime = item.time(KFileItem::CreationTime).toString(); m_creationTime = info.birthTime().toString(Qt::SystemLocaleLongDate);
m_modifiedTime = item.time(KFileItem::ModificationTime).toString(); m_modifiedTime = info.lastModified().toString(Qt::SystemLocaleLongDate);
m_accessedTime = item.time(KFileItem::AccessTime).toString(); m_accessedTime = info.lastRead().toString(Qt::SystemLocaleLongDate);
// m_creationTime = item.time(KFileItem::CreationTime).toString();
// m_modifiedTime = item.time(KFileItem::ModificationTime).toString();
// m_accessedTime = item.time(KFileItem::AccessTime).toString();
m_isWritable = m_items.first().isWritable(); m_isWritable = m_items.first().isWritable();

View file

@ -978,8 +978,8 @@ void FolderModel::setWallpaperSelected()
if (!url.isLocalFile()) if (!url.isLocalFile())
return; return;
QDBusInterface iface("org.cutefish.Settings", "/Theme", QDBusInterface iface("com.cutefish.Settings", "/Theme",
"org.cutefish.Theme", "com.cutefish.Theme",
QDBusConnection::sessionBus(), nullptr); QDBusConnection::sessionBus(), nullptr);
if (iface.isValid()) if (iface.isValid())
iface.call("setWallpaper", url.toLocalFile()); iface.call("setWallpaper", url.toLocalFile());

View file

@ -69,7 +69,7 @@ Item {
isDesktopView: true isDesktopView: true
iconSize: globalSettings.desktopIconSize iconSize: globalSettings.desktopIconSize
maximumIconSize: globalSettings.maximumIconSize maximumIconSize: globalSettings.maximumIconSize
minimumIconSize: globalSettings.minimumIconSize minimumIconSize: 22
focus: true focus: true
model: dirModel model: dirModel

View file

@ -53,7 +53,7 @@ GridView {
property var iconSize: settings.gridIconSize property var iconSize: settings.gridIconSize
property var maximumIconSize: settings.maximumIconSize property var maximumIconSize: settings.maximumIconSize
property var minimumIconSize: settings.minimumIconSize property var minimumIconSize: 22 //settings.minimumIconSize
property variant cachedRectangleSelection: null property variant cachedRectangleSelection: null
@ -221,7 +221,7 @@ GridView {
} }
cellHeight: { cellHeight: {
var iconHeight = iconSize + (FishUI.Units.fontMetrics.height * 3) + FishUI.Units.largeSpacing var iconHeight = iconSize + (FishUI.Units.fontMetrics.height * 2) + FishUI.Units.largeSpacing * 2
if (isDesktopView) { if (isDesktopView) {
var extraHeight = calcExtraSpacing(iconHeight, control.height - topMargin - bottomMargin) var extraHeight = calcExtraSpacing(iconHeight, control.height - topMargin - bottomMargin)
return iconHeight + extraHeight return iconHeight + extraHeight
@ -628,7 +628,7 @@ GridView {
width = targetItem.width - FishUI.Units.smallSpacing width = targetItem.width - FishUI.Units.smallSpacing
height = targetItem.labelArea.paintedHeight + FishUI.Units.largeSpacing * 2 height = targetItem.labelArea.paintedHeight + FishUI.Units.largeSpacing * 2
x = targetItem.x + Math.abs(Math.min(control.contentX, control.originX)) x = targetItem.x + Math.abs(Math.min(control.contentX, control.originX))
y = pos.y - FishUI.Units.largeSpacing y = pos.y - FishUI.Units.smallSpacing
text = targetItem.labelArea.text text = targetItem.labelArea.text
targetItem.labelArea.visible = false targetItem.labelArea.visible = false
_editor.select(0, dirModel.fileExtensionBoundary(targetItem.index)) _editor.select(0, dirModel.fileExtensionBoundary(targetItem.index))