aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2020-02-21 03:06:27 +0100
committerfiaxh <git@lightrise.org>2020-02-22 02:58:36 +0100
commitf282ef68a44d6b1924869160b4ddcb88d8d8e715 (patch)
tree4c1ea9383a6c27f0adb062a27547ca6ddbd80785
parentd550fc905c79dccd51adb2d296140810ddc694fb (diff)
downloaddino-f282ef68a44d6b1924869160b4ddcb88d8d8e715.tar.gz
dino-f282ef68a44d6b1924869160b4ddcb88d8d8e715.zip
Rename UnifiedWindow -> MainWindow
-rw-r--r--main/CMakeLists.txt4
-rw-r--r--main/data/unified_window_placeholder.ui2
-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
5 files changed, 21 insertions, 21 deletions
diff --git a/main/CMakeLists.txt b/main/CMakeLists.txt
index c6d92fa4..64627565 100644
--- a/main/CMakeLists.txt
+++ b/main/CMakeLists.txt
@@ -101,8 +101,8 @@ SOURCES
src/ui/global_search.vala
src/ui/notifications.vala
src/ui/settings_dialog.vala
- src/ui/unified_window.vala
- src/ui/unified_window_controller.vala
+ src/ui/main_window.vala
+ src/ui/main_window_controller.vala
src/ui/add_conversation/add_conference_dialog.vala
src/ui/add_conversation/add_contact_dialog.vala
diff --git a/main/data/unified_window_placeholder.ui b/main/data/unified_window_placeholder.ui
index cfabd132..88186f62 100644
--- a/main/data/unified_window_placeholder.ui
+++ b/main/data/unified_window_placeholder.ui
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
- <template class="DinoUiUnifiedWindowPlaceholder">
+ <template class="DinoUiMainWindowPlaceholder">
<property name="valign">center</property>
<property name="visible">True</property>
<child>
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);
}
}