Skip to content

Commit

Permalink
Merge branch 'release-0.5.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
naxuroqa committed Nov 23, 2018
2 parents eb931f5 + 032e8d1 commit b7f1add
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 14 deletions.
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
project('venom', ['vala', 'c'],
license: 'GPL3+',
version: '0.5.0'
version: '0.5.1'
)

i18n = import('i18n')
Expand Down
6 changes: 4 additions & 2 deletions src/core/Application.vala
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,9 @@ namespace Venom {
private void save_global_settings() {
try {
var settings_string = GlobalSettings.serialize(global_settings);
FileIO.save_contents_text(R.constants.default_global_settings(), settings_string);
var filename = R.constants.default_global_settings();
create_path_for_filename(filename);
FileIO.save_contents_text(filename, settings_string);
} catch (Error e) {
logger.e("Saving global settings failed: " + e.message);
}
Expand Down Expand Up @@ -290,7 +292,7 @@ namespace Venom {
public void on_show_about() {
logger.d("on_show_about");
var about_dialog = widget_factory.create_about_dialog();
about_dialog.transient_for = get_active_window();
about_dialog.transient_for = get_active_window() as ApplicationWindow;
about_dialog.run();
about_dialog.destroy();
}
Expand Down
3 changes: 3 additions & 0 deletions src/testing/mocks/MockToxSession.vala
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,9 @@ namespace Mock {
.create();
return mock().actual_call(this, "conference_get_title", args).get_string();
}
public Gee.Iterable<uint32> conference_get_chatlist() {
return (Gee.Iterable<uint32>) mock().actual_call(this, "conference_get_chatlist").get_object();
}
public void file_control(uint32 friend_number, uint32 file_number, ToxCore.FileControl control) throws ToxError {
var args = Arguments.builder()
.uint(friend_number)
Expand Down
4 changes: 4 additions & 0 deletions src/tox/ToxAdapterConferenceListener.vala
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ namespace Venom {
this.session = session;
session.set_conference_listener(this);
friends = session.get_friends();
var chatlist = session.conference_get_chatlist();
foreach (var conference_number in chatlist) {
on_conference_new(conference_number, "");
}
}

public virtual void on_remove_conference(IContact c) throws Error {
Expand Down
2 changes: 1 addition & 1 deletion src/tox/ToxAdapterFiletransferListener.vala
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ namespace Venom {
var buf = transfer.get_avatar_buffer();
var directory = GLib.File.new_for_path(R.constants.avatars_folder());
if (!directory.query_exists()) {
directory.make_directory();
directory.make_directory_with_parents();
}

var id = contact.get_id();
Expand Down
10 changes: 10 additions & 0 deletions src/tox/ToxSession.vala
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ namespace Venom {
public abstract void conference_delete(uint32 conference_number) throws ToxError;
public abstract void conference_invite(uint32 friend_number, uint32 conference_number) throws ToxError;
public abstract void conference_join(uint32 friend_number, ConferenceType type, uint8[] cookie) throws ToxError;
public abstract Gee.Iterable<uint32> conference_get_chatlist();

public abstract void conference_send_message(uint32 conference_number, string message) throws ToxError;
public abstract void conference_set_title(uint32 conference_number, string title) throws ToxError;
Expand Down Expand Up @@ -838,6 +839,15 @@ namespace Venom {
}
}

public Gee.Iterable<uint32> conference_get_chatlist() {
var chatlist = handle.conference_get_chatlist();
var list = new Gee.ArrayList<uint32>();
foreach (var c in chatlist) {
list.add(c);
}
return list;
}

public void @lock() {
mutex.@lock();
}
Expand Down
17 changes: 7 additions & 10 deletions src/view/AboutDialog.vala
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ namespace Venom {
this.logger = logger;
logger.d("AboutDialog created.");

artists = {
"ItsDuke <[email protected]>"
};
authors = {
"naxuroqa <[email protected]>",
"John Poulakos <[email protected]>",
Expand All @@ -39,26 +42,20 @@ namespace Venom {
"Bahkuh <[email protected]>",
"Joel Leclerc <[email protected]>",
"infirit <[email protected]>",
"Maxim Golubev <[email protected]>",
null
};
artists = {
"ItsDuke <[email protected]>",
null
"Maxim Golubev <[email protected]>"
};
string [] packagers = {
"Sean <[email protected]>",
null
var packagers = new string[] {
"Sean <[email protected]>"
};
add_credit_section(_("Packagers"), packagers);
comments = _("A modern Tox client for the Linux desktop");
copyright = _("Copyright © 2013-2018 Venom authors and contributors");
license_type = Gtk.License.GPL_3_0;
logo_icon_name = "venom-symbolic";
program_name = "Venom";
translator_credits = _("translator-credits");
version = Config.VERSION;
website = "https://github.com/naxuroqa/Venom";
website_label = "Github";
}

~AboutDialog() {
Expand Down

0 comments on commit b7f1add

Please sign in to comment.