Skip to content

Commit

Permalink
Merge branch 'develop' into feature/SES-42_pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilBohleber committed Aug 5, 2024
2 parents cbff11e + 9c9fafc commit b41200f
Show file tree
Hide file tree
Showing 26 changed files with 1,496 additions and 1,216 deletions.
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"name": "(RelWithDebInfo) Launch Easystorage",
"type": "cppvsdbg",
"request": "launch",
"program": "${workspaceFolder}/build/win32-MSVC-x64/RelWithDebInfo/bin/ionos-easystorage.exe",
"program": "${workspaceFolder}/build/win32-MSVC-x64/RelWithDebInfo/bin/ionoseasystorage.exe",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
Expand Down
8 changes: 4 additions & 4 deletions NEXTCLOUD.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
set( APPLICATION_NAME "IONOS Easystorage" )
set( APPLICATION_NAME "IONOS EasyStorage" )
set( APPLICATION_SHORTNAME "Easystorage" )
set( APPLICATION_EXECUTABLE "ionos-easystorage" )
set( APPLICATION_EXECUTABLE "ionoseasystorage" )
set( APPLICATION_CONFIG_NAME "${APPLICATION_EXECUTABLE}" )
set( APPLICATION_DOMAIN "nextcloud.com" )
set( APPLICATION_VENDOR "IONOS Group SE" )
Expand All @@ -15,8 +15,8 @@ else()
endif()

set( APPLICATION_ICON_SET "SVG" )
set( APPLICATION_SERVER_URL "" CACHE STRING "URL for the server to use. If entered, the UI field will be pre-filled with it" )
set( APPLICATION_SERVER_URL_ENFORCE ON ) # If set and APPLICATION_SERVER_URL is defined, the server can only connect to the pre-defined URL
set( APPLICATION_SERVER_URL "https://use09.thegood.cloud" CACHE STRING "URL for the server to use. If entered, the UI field will be pre-filled with it" )
set( APPLICATION_SERVER_URL_ENFORCE OFF ) # If set and APPLICATION_SERVER_URL is defined, the server can only connect to the pre-defined URL
set( APPLICATION_REV_DOMAIN "com.nextcloud.desktopclient" )
# set( APPLICATION_VIRTUALFILE_SUFFIX "nextcloud" CACHE STRING "Virtual file suffix (not including the .)")
set( APPLICATION_OCSP_STAPLING_ENABLED OFF )
Expand Down
2 changes: 2 additions & 0 deletions src/gui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,8 @@ set(client_SRCS
syncconflictsmodel.cpp
linkButton.h
linkButton.cpp
sesButton.h
sesButton.cpp
fileactivitylistmodel.h
fileactivitylistmodel.cpp
filedetails/datefieldbackend.h
Expand Down
35 changes: 35 additions & 0 deletions src/gui/foldercreationdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,15 @@

#include "foldercreationdialog.h"
#include "ui_foldercreationdialog.h"
#include "ionostheme.h"
#include "sesButton.h"

#include <limits>

#include <QDir>
#include <QMessageBox>
#include <QLoggingCategory>
#include <QHBoxLayout>

namespace OCC {

Expand All @@ -32,9 +35,12 @@ FolderCreationDialog::FolderCreationDialog(const QString &destination, QWidget *
{
ui->setupUi(this);

customizeStyle();

ui->labelErrorMessage->setVisible(false);

setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
setWindowFlags(windowFlags() | Qt::Dialog | Qt::WindowMinMaxButtonsHint);

connect(ui->newFolderNameEdit, &QLineEdit::textChanged, this, &FolderCreationDialog::slotNewFolderNameEditTextEdited);

Expand Down Expand Up @@ -92,4 +98,33 @@ void FolderCreationDialog::slotNewFolderNameEditTextEdited()
}
}

void FolderCreationDialog::customizeStyle()
{
ui->buttonBox->setLayoutDirection(Qt::RightToLeft);

QDialog *dialog = qobject_cast<QDialog*>(this);
QPushButton *okButton = ui->buttonBox->button(QDialogButtonBox::Ok);
QPushButton *cancelButton = ui->buttonBox->button(QDialogButtonBox::Cancel);
QHBoxLayout* buttonlayout = qobject_cast<QHBoxLayout*>(ui->buttonBox->layout());

if(dialog){
dialog->setFixedSize(626, 156);
}

if(buttonlayout){
buttonlayout->setSpacing(16);
}

if(okButton){
okButton->setMinimumWidth(80);
okButton->setMinimumHeight(40);
okButton->setStyleSheet(QStringLiteral("QPushButton") + SesButton::rawPrimaryStyle());
}

if(cancelButton){
cancelButton->setMinimumWidth(80);
cancelButton->setMinimumHeight(40);
cancelButton->setStyleSheet(QStringLiteral("QPushButton") + SesButton::rawSecondaryStyle());
}
}
}
2 changes: 2 additions & 0 deletions src/gui/foldercreationdialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ private slots:
Ui::FolderCreationDialog *ui;

QString _destination;

void customizeStyle();
};

}
Expand Down
188 changes: 90 additions & 98 deletions src/gui/foldercreationdialog.ui
Original file line number Diff line number Diff line change
@@ -1,100 +1,92 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>OCC::FolderCreationDialog</class>
<widget class="QDialog" name="OCC::FolderCreationDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>355</width>
<height>138</height>
</rect>
</property>
<property name="windowTitle">
<string>Create new folder</string>
</property>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="geometry">
<rect>
<x>0</x>
<y>90</y>
<width>341</width>
<height>32</height>
</rect>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
<widget class="QLineEdit" name="newFolderNameEdit">
<property name="geometry">
<rect>
<x>20</x>
<y>30</y>
<width>321</width>
<height>22</height>
</rect>
</property>
<property name="placeholderText">
<string>Enter folder name</string>
</property>
</widget>
<widget class="QLabel" name="labelErrorMessage">
<property name="enabled">
<bool>true</bool>
</property>
<property name="geometry">
<rect>
<x>20</x>
<y>60</y>
<width>321</width>
<height>16</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(255, 0, 0)</string>
</property>
<property name="text">
<string>Folder already exists</string>
</property>
</widget>
</widget>
<resources/>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>OCC::FolderCreationDialog</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>248</x>
<y>254</y>
</hint>
<hint type="destinationlabel">
<x>157</x>
<y>274</y>
</hint>
</hints>
</connection>
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>OCC::FolderCreationDialog</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>316</x>
<y>260</y>
</hint>
<hint type="destinationlabel">
<x>286</x>
<y>274</y>
</hint>
</hints>
</connection>
</connections>
</ui>
<class>OCC::FolderCreationDialog</class>
<widget class="QDialog" name="OCC::FolderCreationDialog">
<property name="windowTitle">
<string>IONOS EASYSTORAGE Create new folder</string>
</property>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="geometry">
<rect>
<x>426</x>
<y>90</y>
<width>341</width>
<height>40</height>
</rect>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
<widget class="QLineEdit" name="newFolderNameEdit">
<property name="geometry">
<rect>
<x>24</x>
<y>30</y>
<width>578</width>
<height>40</height>
</rect>
</property>
<property name="placeholderText">
<string>Enter folder name</string>
</property>
</widget>
<widget class="QLabel" name="labelErrorMessage">
<property name="enabled">
<bool>true</bool>
</property>
<property name="geometry">
<rect>
<x>24</x>
<y>69</y>
<width>321</width>
<height>16</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(255, 0, 0)</string>
</property>
<property name="text">
<string>Folder already exists</string>
</property>
</widget>
</widget>
<resources/>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>OCC::FolderCreationDialog</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>248</x>
<y>254</y>
</hint>
<hint type="destinationlabel">
<x>157</x>
<y>274</y>
</hint>
</hints>
</connection>
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>OCC::FolderCreationDialog</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>316</x>
<y>260</y>
</hint>
<hint type="destinationlabel">
<x>286</x>
<y>274</y>
</hint>
</hints>
</connection>
</connections>
</ui>
Loading

0 comments on commit b41200f

Please sign in to comment.