aboutsummaryrefslogtreecommitdiff
path: root/main/src
diff options
context:
space:
mode:
Diffstat (limited to 'main/src')
-rw-r--r--main/src/ui/application.vala8
-rw-r--r--main/src/ui/main_window.vala (renamed from main/src/ui/unified_window.vala)12
-rw-r--r--main/src/ui/main_window_controller.vala (renamed from main/src/ui/unified_window_controller.vala)16
3 files changed, 18 insertions, 18 deletions
diff --git a/main/src/ui/application.vala b/main/src/ui/application.vala
index 2b4b2d3e..9b6763fa 100644
--- a/main/src/ui/application.vala
+++ b/main/src/ui/application.vala
@@ -6,8 +6,8 @@ using Xmpp;
public class Dino.Ui.Application : Gtk.Application, Dino.Application {
private Notifications notifications;
- private UnifiedWindow window;
- public UnifiedWindowController controller;
+ private MainWindow window;
+ public MainWindowController controller;
public Database db { get; set; }
public Dino.Entities.Settings settings { get; set; }
@@ -35,9 +35,9 @@ public class Dino.Ui.Application : Gtk.Application, Dino.Application {
activate.connect(() => {
if (window == null) {
- controller = new UnifiedWindowController(this, stream_interactor, db);
+ controller = new MainWindowController(this, stream_interactor, db);
config = new Config(db);
- window = new UnifiedWindow(this, stream_interactor, db, config);
+ window = new MainWindow(this, stream_interactor, db, config);
controller.set_window(window);
if ((get_flags() & ApplicationFlags.IS_SERVICE) == ApplicationFlags.IS_SERVICE) window.delete_event.connect(window.hide_on_delete);
diff --git a/main/src/ui/unified_window.vala b/main/src/ui/main_window.vala
index 50f57228..afa16645 100644
--- a/main/src/ui/unified_window.vala
+++ b/main/src/ui/main_window.vala
@@ -6,7 +6,7 @@ using Dino.Entities;
namespace Dino.Ui {
-public class UnifiedWindow : Gtk.Window {
+public class MainWindow : Gtk.Window {
public signal void conversation_selected(Conversation conversation);
@@ -36,7 +36,7 @@ public class UnifiedWindow : Gtk.Window {
private Database db;
private Config config;
- public UnifiedWindow(Application application, StreamInteractor stream_interactor, Database db, Config config) {
+ public MainWindow(Application application, StreamInteractor stream_interactor, Database db, Config config) {
Object(application : application);
this.stream_interactor = stream_interactor;
this.db = db;
@@ -195,7 +195,7 @@ public class UnifiedWindow : Gtk.Window {
}
}
-public class WelcomePlceholder : UnifiedWindowPlaceholder {
+public class WelcomePlceholder : MainWindowPlaceholder {
public WelcomePlceholder() {
title_label.label = _("Welcome to Dino!");
label.label = _("Sign in or create an account to get started.");
@@ -205,7 +205,7 @@ public class WelcomePlceholder : UnifiedWindowPlaceholder {
}
}
-public class NoAccountsPlaceholder : UnifiedWindowPlaceholder {
+public class NoAccountsPlaceholder : MainWindowPlaceholder {
public NoAccountsPlaceholder() {
title_label.label = _("No active accounts");
primary_button.label = _("Manage accounts");
@@ -215,7 +215,7 @@ public class NoAccountsPlaceholder : UnifiedWindowPlaceholder {
}
}
-public class NoConversationsPlaceholder : UnifiedWindowPlaceholder {
+public class NoConversationsPlaceholder : MainWindowPlaceholder {
public NoConversationsPlaceholder() {
title_label.label = _("No active conversations");
primary_button.label = _("Start Conversation");
@@ -227,7 +227,7 @@ public class NoConversationsPlaceholder : UnifiedWindowPlaceholder {
}
[GtkTemplate (ui = "/im/dino/Dino/unified_window_placeholder.ui")]
-public class UnifiedWindowPlaceholder : Box {
+public class MainWindowPlaceholder : Box {
[GtkChild] public Label title_label;
[GtkChild] public Label label;
[GtkChild] public Button primary_button;
diff --git a/main/src/ui/unified_window_controller.vala b/main/src/ui/main_window_controller.vala
index ca958bf1..3107527d 100644
--- a/main/src/ui/unified_window_controller.vala
+++ b/main/src/ui/main_window_controller.vala
@@ -6,17 +6,17 @@ using Dino.Entities;
namespace Dino.Ui {
-public class UnifiedWindowController : Object {
+public class MainWindowController : Object {
private StreamInteractor stream_interactor;
private Conversation? conversation;
private Application app;
private Database db;
- private UnifiedWindow window;
+ private MainWindow window;
private ConversationViewController conversation_view_controller;
- public UnifiedWindowController(Application application, StreamInteractor stream_interactor, Database db) {
+ public MainWindowController(Application application, StreamInteractor stream_interactor, Database db) {
this.app = application;
this.stream_interactor = stream_interactor;
this.db = db;
@@ -25,7 +25,7 @@ public class UnifiedWindowController : Object {
stream_interactor.account_removed.connect(check_unset_conversation);
}
- public void set_window(UnifiedWindow window) {
+ public void set_window(MainWindow window) {
this.window = window;
this.conversation_view_controller = new ConversationViewController(window.conversation_view, window.conversation_titlebar, stream_interactor);
@@ -129,14 +129,14 @@ public class UnifiedWindowController : Object {
ArrayList<Account> accounts = stream_interactor.get_accounts();
if (!know_exists && accounts.size == 0) {
if (db.get_accounts().size == 0) {
- window.set_stack_state(UnifiedWindow.StackState.CLEAN_START);
+ window.set_stack_state(MainWindow.StackState.CLEAN_START);
} else {
- window.set_stack_state(UnifiedWindow.StackState.NO_ACTIVE_ACCOUNTS);
+ window.set_stack_state(MainWindow.StackState.NO_ACTIVE_ACCOUNTS);
}
} else if (stream_interactor.get_module(ConversationManager.IDENTITY).get_active_conversations().size == 0) {
- window.set_stack_state(UnifiedWindow.StackState.NO_ACTIVE_CONVERSATIONS);
+ window.set_stack_state(MainWindow.StackState.NO_ACTIVE_CONVERSATIONS);
} else {
- window.set_stack_state(UnifiedWindow.StackState.CONVERSATION);
+ window.set_stack_state(MainWindow.StackState.CONVERSATION);
}
}