mirror of https://github.com/buggins/dlangui.git
Fix warnings in ircclient example.
This commit is contained in:
parent
9da549ebd8
commit
8a4484e6e7
|
@ -5,7 +5,7 @@ import dlangui.core.logger;
|
|||
import dlangui.core.collections;
|
||||
import std.string : empty, format, startsWith;
|
||||
import std.conv : to;
|
||||
import std.utf : toUTF32, toUTF8;
|
||||
import std.utf : toUTF32;
|
||||
|
||||
interface IRCClientCallback {
|
||||
void onIRCConnect(IRCClient client);
|
||||
|
|
|
@ -116,8 +116,8 @@ class IRCFrame : AppFrame, IRCClientCallback {
|
|||
window.close();
|
||||
return true;
|
||||
case IRCActions.HelpAbout:
|
||||
window.showMessageBox(UIString("About DlangUI IRC Client"d),
|
||||
UIString("DLangUI IRC Client\n(C) Vadim Lopatin, 2015\nhttp://github.com/buggins/dlangui\nSimple IRC client"d));
|
||||
window.showMessageBox(UIString.fromRaw("About DlangUI IRC Client"d),
|
||||
UIString.fromRaw("DLangUI IRC Client\n(C) Vadim Lopatin, 2015\nhttp://github.com/buggins/dlangui\nSimple IRC client"d));
|
||||
return true;
|
||||
case IRCActions.EditPreferences:
|
||||
showPreferences();
|
||||
|
|
|
@ -6,7 +6,7 @@ import dlangui.widgets.widget;
|
|||
import dlangui.dml.parser;
|
||||
import ircclient.ui.frame;
|
||||
import ircclient.ui.settings;
|
||||
import std.utf;
|
||||
import std.utf : toUTF32;
|
||||
import std.conv : to;
|
||||
|
||||
class SettingsDialog : Dialog {
|
||||
|
@ -14,7 +14,7 @@ class SettingsDialog : Dialog {
|
|||
IRCSettings _settings;
|
||||
bool _allowConnect;
|
||||
this(IRCFrame parent, IRCSettings settings, bool allowConnect) {
|
||||
super(UIString("IRC Client Settings"d), parent.window,
|
||||
super(UIString.fromRaw("IRC Client Settings"d), parent.window,
|
||||
DialogFlag.Modal | DialogFlag.Resizable | DialogFlag.Popup, 500, 400);
|
||||
_icon = "dlangui-logo1";
|
||||
_frame = parent;
|
||||
|
@ -81,18 +81,18 @@ class SettingsDialog : Dialog {
|
|||
}
|
||||
|
||||
void controlsToSettings() {
|
||||
_settings.host = std.utf.toUTF8(childById("edHost").text);
|
||||
_settings.host = toUTF8(childById("edHost").text);
|
||||
try {
|
||||
_settings.port = cast(ushort)to!ulong(childById("edPort").text);
|
||||
} catch (Exception e) {
|
||||
// ignore
|
||||
_settings.port = 6667;
|
||||
}
|
||||
_settings.nick = std.utf.toUTF8(childById("edNick").text);
|
||||
_settings.alternateNick = std.utf.toUTF8(childById("edAlternateNick").text);
|
||||
_settings.userName = std.utf.toUTF8(childById("edUsername").text);
|
||||
_settings.userRealName = std.utf.toUTF8(childById("edRealName").text);
|
||||
_settings.defChannel = std.utf.toUTF8(childById("edChannel").text);
|
||||
_settings.nick = toUTF8(childById("edNick").text);
|
||||
_settings.alternateNick = toUTF8(childById("edAlternateNick").text);
|
||||
_settings.userName = toUTF8(childById("edUsername").text);
|
||||
_settings.userRealName = toUTF8(childById("edRealName").text);
|
||||
_settings.defChannel = toUTF8(childById("edChannel").text);
|
||||
}
|
||||
|
||||
override void close(const Action action) {
|
||||
|
|
Loading…
Reference in New Issue