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) {
|
ReadIntOption(settings, "file_dialog_type", [&](auto v) {
|
||||||
const auto typedValue = Platform::FileDialog::ImplementationType(v);
|
using Platform::FileDialog::ImplementationType;
|
||||||
if (typedValue >= Platform::FileDialog::ImplementationType::Default
|
if (v >= int(ImplementationType::Default)
|
||||||
&& typedValue < Platform::FileDialog::ImplementationType::Count) {
|
&& v < int(ImplementationType::Count)) {
|
||||||
SetFileDialogType(typedValue);
|
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) {
|
QString ImplementationTypeLabel(ImplementationType value) {
|
||||||
switch (value) {
|
switch (value) {
|
||||||
case ImplementationType::XDP: return qsl("XDG Desktop Portal");
|
case ImplementationType::XDP: return qsl("XDG Desktop Portal");
|
||||||
case ImplementationType::GTK: return qsl("GTK");
|
|
||||||
case ImplementationType::Qt: return qsl("Qt");
|
case ImplementationType::Qt: return qsl("Qt");
|
||||||
}
|
}
|
||||||
Unexpected("Value in Platform::FileDialog::ImplementationTypeLabel.");
|
Unexpected("Value in Platform::FileDialog::ImplementationTypeLabel.");
|
||||||
|
|
@ -105,14 +104,6 @@ QString ImplementationTypeDescription(ImplementationType value) {
|
||||||
#ifdef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
#ifdef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||||
case ImplementationType::XDP: return tr::ktg_file_dialog_disabled_on_build(tr::now);
|
case ImplementationType::XDP: return tr::ktg_file_dialog_disabled_on_build(tr::now);
|
||||||
#endif // DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
#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();
|
return QString();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,6 @@ namespace FileDialog {
|
||||||
enum class ImplementationType {
|
enum class ImplementationType {
|
||||||
Default,
|
Default,
|
||||||
XDP,
|
XDP,
|
||||||
GTK,
|
|
||||||
Qt,
|
Qt,
|
||||||
Count,
|
Count,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue