Remove gtk file dialog option (#189)
Since gtk file dialog implementation was removed from tdesktop
This commit is contained in:
parent
7f295113e0
commit
f541e46147
3 changed files with 7 additions and 14 deletions
|
|
@ -650,10 +650,13 @@ bool Manager::readCustomFile() {
|
|||
});
|
||||
|
||||
ReadIntOption(settings, "file_dialog_type", [&](auto v) {
|
||||
const auto typedValue = Platform::FileDialog::ImplementationType(v);
|
||||
if (typedValue >= Platform::FileDialog::ImplementationType::Default
|
||||
&& typedValue < Platform::FileDialog::ImplementationType::Count) {
|
||||
SetFileDialogType(typedValue);
|
||||
using Platform::FileDialog::ImplementationType;
|
||||
if (v >= int(ImplementationType::Default)
|
||||
&& v < int(ImplementationType::Count)) {
|
||||
SetFileDialogType(ImplementationType(v));
|
||||
} else if (v >= int(ImplementationType::Count)) {
|
||||
SetFileDialogType(ImplementationType(
|
||||
int(ImplementationType::Count) - 1));
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -94,7 +94,6 @@ namespace FileDialog {
|
|||
QString ImplementationTypeLabel(ImplementationType value) {
|
||||
switch (value) {
|
||||
case ImplementationType::XDP: return qsl("XDG Desktop Portal");
|
||||
case ImplementationType::GTK: return qsl("GTK");
|
||||
case ImplementationType::Qt: return qsl("Qt");
|
||||
}
|
||||
Unexpected("Value in Platform::FileDialog::ImplementationTypeLabel.");
|
||||
|
|
@ -105,14 +104,6 @@ QString ImplementationTypeDescription(ImplementationType value) {
|
|||
#ifdef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||
case ImplementationType::XDP: return tr::ktg_file_dialog_disabled_on_build(tr::now);
|
||||
#endif // DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||
#ifdef DESKTOP_APP_DISABLE_GTK_INTEGRATION
|
||||
case ImplementationType::GTK: return tr::ktg_file_dialog_disabled_on_build(tr::now);
|
||||
#else // DESKTOP_APP_DISABLE_GTK_INTEGRATION
|
||||
case ImplementationType::GTK:
|
||||
return GtkIntegration::Instance()
|
||||
? QString()
|
||||
: tr::ktg_file_dialog_disabled_by_option(tr::now);
|
||||
#endif // !DESKTOP_APP_DISABLE_GTK_INTEGRATION
|
||||
}
|
||||
return QString();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@ namespace FileDialog {
|
|||
enum class ImplementationType {
|
||||
Default,
|
||||
XDP,
|
||||
GTK,
|
||||
Qt,
|
||||
Count,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue