aboutsummaryrefslogtreecommitdiff
path: root/main/src
diff options
context:
space:
mode:
authorfiaxh <git@mx.ax.lt>2017-11-06 01:02:13 +0100
committerfiaxh <git@mx.ax.lt>2017-11-16 14:09:30 +0100
commit1d0745177e7a116455811dfd26e07b848cb89b75 (patch)
tree7517c4b1e1fd932e22bff091c9eb93f1c1884b35 /main/src
parentf6ac5bbd26638412a2289fd1d28ef12de1d7e8b5 (diff)
downloaddino-1d0745177e7a116455811dfd26e07b848cb89b75.tar.gz
dino-1d0745177e7a116455811dfd26e07b848cb89b75.zip
Replace deprecated function usages
Diffstat (limited to 'main/src')
-rw-r--r--main/src/ui/add_conversation/add_groupchat_dialog.vala8
-rw-r--r--main/src/ui/application.vala2
-rw-r--r--main/src/ui/contact_details/dialog.vala4
-rw-r--r--main/src/ui/manage_accounts/dialog.vala2
-rw-r--r--main/src/ui/occupant_menu/list.vala4
5 files changed, 10 insertions, 10 deletions
diff --git a/main/src/ui/add_conversation/add_groupchat_dialog.vala b/main/src/ui/add_conversation/add_groupchat_dialog.vala
index 274ab6f9..b18e9bbb 100644
--- a/main/src/ui/add_conversation/add_groupchat_dialog.vala
+++ b/main/src/ui/add_conversation/add_groupchat_dialog.vala
@@ -18,7 +18,7 @@ protected class AddGroupchatDialog : Gtk.Dialog {
[GtkChild] private Entry nick_entry;
private StreamInteractor stream_interactor;
- private Xmpp.Xep.Bookmarks.Conference? edit_confrence = null;
+ private Xmpp.Xep.Bookmarks.Conference? edit_conference = null;
private bool alias_entry_changed = false;
public AddGroupchatDialog(StreamInteractor stream_interactor) {
@@ -37,7 +37,7 @@ protected class AddGroupchatDialog : Gtk.Dialog {
public AddGroupchatDialog.for_conference(StreamInteractor stream_interactor, Account account, Xmpp.Xep.Bookmarks.Conference conference) {
this(stream_interactor);
- edit_confrence = conference;
+ edit_conference = conference;
ok_button.label = _("Save");
ok_button.sensitive = true;
accounts_stack.set_visible_child_name("label");
@@ -67,10 +67,10 @@ protected class AddGroupchatDialog : Gtk.Dialog {
Xmpp.Xep.Bookmarks.Conference conference = new Xmpp.Xep.Bookmarks.Conference(jid_entry.text);
conference.nick = nick_entry.text != "" ? nick_entry.text : null;
conference.name = alias_entry.text;
- if (edit_confrence == null) {
+ if (edit_conference == null) {
stream_interactor.get_module(MucManager.IDENTITY).add_bookmark(account_combobox.selected, conference);
} else {
- stream_interactor.get_module(MucManager.IDENTITY).replace_bookmark(account_combobox.selected, edit_confrence, conference);
+ stream_interactor.get_module(MucManager.IDENTITY).replace_bookmark(account_combobox.selected, edit_conference, conference);
}
close();
}
diff --git a/main/src/ui/application.vala b/main/src/ui/application.vala
index 625673fb..e4fdd9eb 100644
--- a/main/src/ui/application.vala
+++ b/main/src/ui/application.vala
@@ -102,7 +102,7 @@ public class Dino.Ui.Application : Gtk.Application, Dino.Application {
SimpleAction quit_action = new SimpleAction("quit", null);
quit_action.activate.connect(quit);
add_action(quit_action);
- add_accelerator("<Ctrl>Q", "app.quit", null);
+ set_accels_for_action("app.quit", new string[]{"<Ctrl>Q"});
Builder builder = new Builder.from_resource("/im/dino/menu_app.ui");
MenuModel menu = builder.get_object("menu_app") as MenuModel;
diff --git a/main/src/ui/contact_details/dialog.vala b/main/src/ui/contact_details/dialog.vala
index 70e495d1..2f1fc81e 100644
--- a/main/src/ui/contact_details/dialog.vala
+++ b/main/src/ui/contact_details/dialog.vala
@@ -57,7 +57,7 @@ public class Dialog : Gtk.Dialog {
private void setup_top() {
if (conversation.type_ == Conversation.Type.CHAT) {
name_label.visible = false;
- jid_label.set_padding(new Button().get_style_context().get_padding(StateFlags.NORMAL).left + 1, 0);
+ jid_label.margin_start = new Button().get_style_context().get_padding(StateFlags.NORMAL).left + 1;
name_hybrid.text = Util.get_conversation_display_name(stream_interactor, conversation);
destroy.connect(() => {
if (name_hybrid.text != Util.get_conversation_display_name(stream_interactor, conversation)) {
@@ -79,7 +79,7 @@ public class Dialog : Gtk.Dialog {
add_category(category);
ListBoxRow list_row = new ListBoxRow() { activatable=false, visible=true };
- Box row = new Box(Orientation.HORIZONTAL, 20) { margin_left=15, margin_right=15, margin_top=3, margin_bottom=3, visible=true };
+ Box row = new Box(Orientation.HORIZONTAL, 20) { margin_start=15, margin_end=15, margin_top=3, margin_bottom=3, visible=true };
list_row.add(row);
Label label_label = new Label(label) { xalign=0, yalign=0.5f, hexpand=true, visible=true };
if (description != null && description != "") {
diff --git a/main/src/ui/manage_accounts/dialog.vala b/main/src/ui/manage_accounts/dialog.vala
index 5ce16ec9..6fdce712 100644
--- a/main/src/ui/manage_accounts/dialog.vala
+++ b/main/src/ui/manage_accounts/dialog.vala
@@ -61,7 +61,7 @@ public class Dialog : Gtk.Dialog {
Label label = new Label(e.name) { xalign=1, yalign=0, visible=true };
label.get_style_context().add_class("dim-label");
- label.set_padding(0, e.label_top_padding == -1 ? default_top_padding : e.label_top_padding);
+ label.margin_top = e.label_top_padding == -1 ? default_top_padding : e.label_top_padding;
settings_list.attach(label, 0, row_index);
if (widget is Widget) {
diff --git a/main/src/ui/occupant_menu/list.vala b/main/src/ui/occupant_menu/list.vala
index 3477885f..47adccb6 100644
--- a/main/src/ui/occupant_menu/list.vala
+++ b/main/src/ui/occupant_menu/list.vala
@@ -119,10 +119,10 @@ public class List : Box {
if (aff == affiliation) count++;
}
- Label title_label = new Label("") { margin_left=10, xalign=0, visible=true };
+ Label title_label = new Label("") { margin_start=10, xalign=0, visible=true };
title_label.set_markup(@"<b>$(Markup.escape_text(aff_str))</b>");
- Label count_label = new Label(@"$count") { xalign=0, margin_right=7, expand=true, visible=true };
+ Label count_label = new Label(@"$count") { xalign=0, margin_end=7, expand=true, visible=true };
count_label.get_style_context().add_class("dim-label");
Grid grid = new Grid() { margin_top=top?5:15, column_spacing=5, hexpand=true, visible=true };