aboutsummaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/CMakeLists.txt3
-rw-r--r--main/meson.build3
-rw-r--r--main/src/ui/application.vala8
-rw-r--r--main/src/ui/conversation_content_view/conversation_view.vala9
-rw-r--r--main/src/windows/preferences_window/account_preferences_subpage.vala21
5 files changed, 2 insertions, 42 deletions
diff --git a/main/CMakeLists.txt b/main/CMakeLists.txt
index 2c533907..39b1320e 100644
--- a/main/CMakeLists.txt
+++ b/main/CMakeLists.txt
@@ -125,9 +125,6 @@ endif()
if(GTK4_VERSION VERSION_GREATER_EQUAL "4.12")
set(MAIN_DEFINITIONS ${MAIN_DEFINITIONS} GTK_4_12)
endif()
-if(Adwaita_VERSION VERSION_GREATER_EQUAL "1.2")
- set(MAIN_DEFINITIONS ${MAIN_DEFINITIONS} Adw_1_2)
-endif()
if(Adwaita_VERSION VERSION_GREATER_EQUAL "1.3")
set(MAIN_DEFINITIONS ${MAIN_DEFINITIONS} Adw_1_3)
endif()
diff --git a/main/meson.build b/main/meson.build
index 95deabfd..69044a1f 100644
--- a/main/meson.build
+++ b/main/meson.build
@@ -113,9 +113,6 @@ c_args = [
vala_args = [
'--vapidir', meson.current_source_dir() / 'vapi',
]
-if dep_libadwaita.version() == 'unknown' or dep_libadwaita.version().version_compare('>=1.2')
- vala_args += ['-D', 'Adw_1_2']
-endif
if dep_gtk4.version() == 'unknown' or dep_gtk4.version().version_compare('>=4.6')
vala_args += ['-D', 'GTK_4_6']
endif
diff --git a/main/src/ui/application.vala b/main/src/ui/application.vala
index d0fde297..9d69c10b 100644
--- a/main/src/ui/application.vala
+++ b/main/src/ui/application.vala
@@ -259,17 +259,11 @@ public class Dino.Ui.Application : Adw.Application, Dino.Application {
case "0.4": version = @"$version - Ilulissat"; break;
}
}
-#if Adw_1_2
+
Adw.AboutWindow about_window = new Adw.AboutWindow();
about_window.application_icon = "im.dino.Dino";
about_window.application_name = "Dino";
about_window.issue_url = "https://github.com/dino/dino/issues";
-#else
- Gtk.AboutDialog about_window = new Gtk.AboutDialog();
- about_window.logo_icon_name = "im.dino.Dino";
- about_window.program_name = "Dino";
- about_window.website_label = "dino.im";
-#endif
about_window.destroy_with_parent = true;
about_window.transient_for = window;
about_window.modal = true;
diff --git a/main/src/ui/conversation_content_view/conversation_view.vala b/main/src/ui/conversation_content_view/conversation_view.vala
index 519aa01f..27472585 100644
--- a/main/src/ui/conversation_content_view/conversation_view.vala
+++ b/main/src/ui/conversation_content_view/conversation_view.vala
@@ -301,18 +301,9 @@ public class ConversationView : Widget, Plugins.ConversationItemCollection, Plug
}
private Adw.Animation scroll_animation(double target) {
-#if ADW_1_2
return new Adw.TimedAnimation(scrolled, scrolled.vadjustment.value, target, 500,
new Adw.PropertyAnimationTarget(scrolled.vadjustment, "value")
);
-#else
- return new Adw.TimedAnimation(scrolled, scrolled.vadjustment.value, target, 500,
- new Adw.CallbackAnimationTarget(value => {
- scrolled.vadjustment.value = value;
- })
- );
-#endif
-
}
public void initialize_around_message(Conversation conversation, ContentItem content_item) {
diff --git a/main/src/windows/preferences_window/account_preferences_subpage.vala b/main/src/windows/preferences_window/account_preferences_subpage.vala
index a1966e34..a462666d 100644
--- a/main/src/windows/preferences_window/account_preferences_subpage.vala
+++ b/main/src/windows/preferences_window/account_preferences_subpage.vala
@@ -52,10 +52,8 @@ public class Dino.Ui.AccountPreferencesSubpage : Gtk.Box {
show_remove_account_dialog();
});
enter_password_button.clicked.connect(() => {
-
- var password = new PasswordEntry() { show_peek_icon=true };
-#if Adw_1_2
var dialog = new Adw.MessageDialog((Window)this.get_root(), "Enter password for %s".printf(account.bare_jid.to_string()), null);
+ var password = new PasswordEntry() { show_peek_icon=true };
dialog.response.connect((response) => {
if (response == "connect") {
account.password = password.text;
@@ -66,23 +64,6 @@ public class Dino.Ui.AccountPreferencesSubpage : Gtk.Box {
dialog.set_extra_child(password);
dialog.add_response("cancel", _("Cancel"));
dialog.add_response("connect", _("Connect"));
-#else
- Gtk.MessageDialog dialog = new Gtk.MessageDialog (
- (Window)this.get_root(), Gtk.DialogFlags.DESTROY_WITH_PARENT | Gtk.DialogFlags.MODAL,
- Gtk.MessageType.QUESTION, Gtk.ButtonsType.OK_CANCEL,
- "Enter password for %s", account.bare_jid.to_string());
- Button ok_button = dialog.get_widget_for_response(ResponseType.OK) as Button;
- ok_button.label = _("Connect");
-
- dialog.response.connect((response) => {
- if (response == ResponseType.OK) {
- account.password = password.text;
- model.reconnect_account(account);
- }
- dialog.close();
- });
- dialog.get_content_area().append(password);
-#endif
dialog.present();
});