diff -Nru haguichi-1.3.5~ubuntu15.04.1/CMakeLists.txt haguichi-1.3.6~ubuntu15.04.1/CMakeLists.txt
--- haguichi-1.3.5~ubuntu15.04.1/CMakeLists.txt 2016-08-07 20:24:34.000000000 +0000
+++ haguichi-1.3.6~ubuntu15.04.1/CMakeLists.txt 2016-12-06 20:50:14.000000000 +0000
@@ -42,7 +42,7 @@
pkg_check_modules(DEPS REQUIRED ${MODULES_TO_CHECK})
-add_subdirectory(src)
+add_subdirectory(src/menus)
add_subdirectory(data/icons/hicolor/22x22)
add_subdirectory(data/icons/hicolor/32x32)
add_subdirectory(data/icons/ubuntu-mono-light/24x24)
@@ -51,10 +51,13 @@
add_subdirectory(data/icons/hicolor/24x24)
add_subdirectory(data/icons/hicolor/16x16)
add_subdirectory(data/icons/ubuntu-mono-dark/22x22)
+add_subdirectory(src/dialogs)
add_subdirectory(data)
add_subdirectory(data/icons/hicolor/48x48)
add_subdirectory(data/icons/hicolor/scalable)
add_subdirectory(data/icons/ubuntu-mono-dark/24x24)
+add_subdirectory(src/widgets)
add_subdirectory(data/icons/hicolor/256x256)
add_subdirectory(data/icons/ubuntu-mono-light/22x22)
+add_subdirectory(src)
diff -Nru haguichi-1.3.5~ubuntu15.04.1/data/haguichi.appdata.xml haguichi-1.3.6~ubuntu15.04.1/data/haguichi.appdata.xml
--- haguichi-1.3.5~ubuntu15.04.1/data/haguichi.appdata.xml 2016-08-07 20:24:34.000000000 +0000
+++ haguichi-1.3.6~ubuntu15.04.1/data/haguichi.appdata.xml 2016-12-06 20:50:14.000000000 +0000
@@ -15,6 +15,7 @@
https://www.haguichi.net/appdata/screenshot-3.png
+
diff -Nru haguichi-1.3.5~ubuntu15.04.1/data/org.haguichi.gschema.xml haguichi-1.3.6~ubuntu15.04.1/data/org.haguichi.gschema.xml
--- haguichi-1.3.5~ubuntu15.04.1/data/org.haguichi.gschema.xml 2016-08-07 20:24:34.000000000 +0000
+++ haguichi-1.3.6~ubuntu15.04.1/data/org.haguichi.gschema.xml 2016-12-06 20:50:14.000000000 +0000
@@ -1,6 +1,14 @@
+
+
+
+
+
+
+
+
@@ -49,7 +57,10 @@
- ['true;true;_Browse Shares;%FILEMANAGER smb://%A/;%FILEMANAGER smb://[%A]/;IPv4', 'true;false;_View Remote Desktop;%REMOTEDESKTOP %A;%REMOTEDESKTOP [%A];IPv4', 'true;false;_Ping;%TERMINAL ping %A;%TERMINAL ping6 %A;IPv4']
+ ['true;true;_Browse Shares;%FILEMANAGER smb://%A/;%FILEMANAGER smb://[%A]/;IPv4', 'true;false;_View Remote Desktop;%REMOTEDESKTOP %A;%REMOTEDESKTOP [%A];IPv4', 'true;false;_Ping;%TERMINAL ping %A;%TERMINAL ping6 %A;IPv4', 'false;false;_SSH;%TERMINAL ssh %A;%TERMINAL ssh %A;IPv4']
+
+
+ 'auto'
'auto'
@@ -83,6 +94,9 @@
[]
+
+ []
+
%S %A']]>
diff -Nru haguichi-1.3.5~ubuntu15.04.1/debian/bzr-builder.manifest haguichi-1.3.6~ubuntu15.04.1/debian/bzr-builder.manifest
--- haguichi-1.3.5~ubuntu15.04.1/debian/bzr-builder.manifest 2016-08-07 20:24:34.000000000 +0000
+++ haguichi-1.3.6~ubuntu15.04.1/debian/bzr-builder.manifest 2016-12-06 20:50:15.000000000 +0000
@@ -1,2 +1,2 @@
# bzr-builder format 0.3 deb-version {debupstream}
-lp:haguichi/trunk revid:stephen@stephenbrandt.com-20160807162148-j81ve8312ny8h2mk
+lp:haguichi/trunk revid:stephen@stephenbrandt.com-20161204172117-z77jipv34f1ydqgc
diff -Nru haguichi-1.3.5~ubuntu15.04.1/debian/changelog haguichi-1.3.6~ubuntu15.04.1/debian/changelog
--- haguichi-1.3.5~ubuntu15.04.1/debian/changelog 2016-08-07 20:24:34.000000000 +0000
+++ haguichi-1.3.6~ubuntu15.04.1/debian/changelog 2016-12-06 20:50:15.000000000 +0000
@@ -1,8 +1,14 @@
-haguichi (1.3.5~ubuntu15.04.1) vivid; urgency=low
+haguichi (1.3.6~ubuntu15.04.1) vivid; urgency=low
* Auto build.
- -- Stephen Brandt Sun, 07 Aug 2016 20:24:34 +0000
+ -- Stephen Brandt Tue, 06 Dec 2016 20:50:15 +0000
+
+haguichi (1.3.6) vivid; urgency=low
+
+ * New version
+
+ -- Stephen Brandt Sun, 07 Aug 2016 21:41:29 +0200
haguichi (1.3.5) vivid; urgency=low
diff -Nru haguichi-1.3.5~ubuntu15.04.1/debian/control haguichi-1.3.6~ubuntu15.04.1/debian/control
--- haguichi-1.3.5~ubuntu15.04.1/debian/control 2016-08-07 20:24:34.000000000 +0000
+++ haguichi-1.3.6~ubuntu15.04.1/debian/control 2016-12-06 20:50:14.000000000 +0000
@@ -8,7 +8,7 @@
Package: haguichi
Architecture: any
Depends: libglib2.0-0 (>= 2.42), libglib2.0-bin (>= 2.42), libgtk-3-0 (>= 3.14), libnotify4 (>= 0.7.6)
-Recommends: haguichi-indicator, bash, coreutils, dnsutils, iputils-ping | inetutils-ping, policykit-1 | gksu | kdesudo, tar, adwaita-icon-theme (>= 3.14) | elementary-icon-theme (>= 3.2)
+Recommends: haguichi-indicator, bash, coreutils, desktop-file-utils, dnsutils, iputils-ping | inetutils-ping, xdg-utils, policykit-1 | gksu | kdesudo, tar, adwaita-icon-theme (>= 3.14) | elementary-icon-theme (>= 3.2)
Description: Graphical frontend for Hamachi
Haguichi provides a graphical frontend for Hamachi on Linux.
.
diff -Nru haguichi-1.3.5~ubuntu15.04.1/haguichi.avprj haguichi-1.3.6~ubuntu15.04.1/haguichi.avprj
--- haguichi-1.3.5~ubuntu15.04.1/haguichi.avprj 2016-08-07 20:24:34.000000000 +0000
+++ haguichi-1.3.6~ubuntu15.04.1/haguichi.avprj 2016-12-06 20:50:14.000000000 +0000
@@ -1,11 +1,11 @@
### AutoVala Project ###
-autovala_version: 19
+autovala_version: 21
project_name: haguichi
*vala_version: 0.26
vala_binary: src/haguichi
-version: 1.3.5
+version: 1.3.6
compile_options: --target-glib 2.32
compile_options: --thread
*vala_check_package: atk
@@ -64,6 +64,48 @@
*po: po
+*translate: vala src/session.vala
+*translate: vala src/network.vala
+*translate: vala src/sidebar.vala
+*translate: vala src/headerbar.vala
+*translate: vala src/preferences.vala
+*translate: vala src/text.vala
+*translate: vala src/command.vala
+*translate: vala src/controller.vala
+*translate: vala src/connection.vala
+*translate: vala src/hamachi.vala
+*translate: vala src/member.vala
+*translate: vala src/debug.vala
+*translate: vala src/member-event.vala
+*translate: vala src/haguichi.vala
+*translate: vala src/key.vala
+*translate: vala src/status.vala
+*translate: vala src/settings.vala
+*translate: vala src/utils.vala
+*translate: vala src/network-view.vala
+*translate: vala src/global-events.vala
+*translate: vala src/bubble.vala
+*translate: vala src/window.vala
+*translate: vala src/global-actions.vala
+*translate: vala src/menus/member-menu.vala
+*translate: vala src/menus/network-menu.vala
+*translate: vala src/menus/command-menu-item.vala
+*translate: vala src/widgets/message-box.vala
+*translate: vala src/widgets/sidebar-entry.vala
+*translate: vala src/widgets/command-button.vala
+*translate: vala src/widgets/sidebar-label.vala
+*translate: vala src/widgets/group-box.vala
+*translate: vala src/widgets/message-bar.vala
+*translate: vala src/widgets/commands-editor.vala
+*translate: vala src/dialogs/join-create-network.vala
+*translate: vala src/dialogs/add-edit-command.vala
+*translate: vala src/dialogs/confirm.vala
+*translate: vala src/dialogs/message.vala
+*translate: vala src/dialogs/change-password.vala
+*translate: vala src/dialogs/base.vala
+*translate: vala src/dialogs/attach.vala
+*translate: vala src/dialogs/change-nick.vala
+
*appdata: data/haguichi.appdata.xml
*desktop: data/haguichi.desktop
diff -Nru haguichi-1.3.5~ubuntu15.04.1/po/CMakeLists.txt haguichi-1.3.6~ubuntu15.04.1/po/CMakeLists.txt
--- haguichi-1.3.5~ubuntu15.04.1/po/CMakeLists.txt 2016-08-07 20:24:34.000000000 +0000
+++ haguichi-1.3.6~ubuntu15.04.1/po/CMakeLists.txt 2016-12-06 20:50:14.000000000 +0000
@@ -3,4 +3,4 @@
include (Translations)
add_translations_directory("haguichi")
-add_translations_catalog("haguichi" ../src )
+add_translations_catalog("haguichi" ../src ../src/dialogs ../src/menus ../src/widgets )
diff -Nru haguichi-1.3.5~ubuntu15.04.1/README.md haguichi-1.3.6~ubuntu15.04.1/README.md
--- haguichi-1.3.5~ubuntu15.04.1/README.md 1970-01-01 00:00:00.000000000 +0000
+++ haguichi-1.3.6~ubuntu15.04.1/README.md 2016-12-06 20:50:14.000000000 +0000
@@ -0,0 +1,29 @@
+# Haguichi
+Provides a graphical frontend for Hamachi on Linux.
+
+## Links
+* [Homepage](https://www.haguichi.net)
+* [Download](https://www.haguichi.net/download/)
+* [Bug tracker](https://bugs.launchpad.net/haguichi)
+* [Translations](https://translations.launchpad.net/haguichi)
+* [Donate](https://www.haguichi.net/donate/)
+
+## Screenshot
+![Screenshot](https://www.haguichi.net/appdata/screenshot-1.png)
+
+## IRC
+Channel #haguichi on irc.freenode.net
+
+## License
+Copyright © 2007–2016 Stephen Brandt
+
+Haguichi is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published
+by the Free Software Foundation, either version 3 of the License,
+or (at your option) any later version.
+
+Haguichi is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+See the GNU General Public License for more details.
+
diff -Nru haguichi-1.3.5~ubuntu15.04.1/src/CMakeLists.txt haguichi-1.3.6~ubuntu15.04.1/src/CMakeLists.txt
--- haguichi-1.3.5~ubuntu15.04.1/src/CMakeLists.txt 2016-08-07 20:24:34.000000000 +0000
+++ haguichi-1.3.6~ubuntu15.04.1/src/CMakeLists.txt 2016-12-06 20:50:14.000000000 +0000
@@ -7,13 +7,13 @@
set (RELEASE_NAME "haguichi")
set (CMAKE_C_FLAGS "")
set (PREFIX ${CMAKE_INSTALL_PREFIX})
-set (VERSION "1.3.5")
+set (VERSION "1.3.6")
set (TESTSRCDIR "${CMAKE_SOURCE_DIR}")
set (DOLLAR "$")
configure_file (${CMAKE_SOURCE_DIR}/src/Config.vala.cmake ${CMAKE_BINARY_DIR}/src/Config.vala)
add_definitions(-DGETTEXT_PACKAGE=\"${GETTEXT_PACKAGE}\")
-set (VERSION "1.3.5")
+set (VERSION "1.3.6")
add_definitions (${DEPS_CFLAGS})
link_libraries ( ${DEPS_LIBRARIES} )
link_directories ( ${DEPS_LIBRARY_DIRS} )
diff -Nru haguichi-1.3.5~ubuntu15.04.1/src/command.vala haguichi-1.3.6~ubuntu15.04.1/src/command.vala
--- haguichi-1.3.5~ubuntu15.04.1/src/command.vala 2016-08-07 20:24:34.000000000 +0000
+++ haguichi-1.3.6~ubuntu15.04.1/src/command.vala 2016-12-06 20:50:14.000000000 +0000
@@ -110,7 +110,7 @@
sudo_args = "";
sudo_start = "-- ";
- string command = (string) Settings.command_for_super_user.val;
+ string command = (string) Settings.super_user.val;
string[] commands = {"pkexec", "gksudo", "gksu", "gnomesu", "kdesudo", "kdesu", "sudo"};
if ((command in commands) &&
@@ -240,10 +240,30 @@
{
// Keep
}
+ else if (exists ("gvncviewer"))
+ {
+ remote_desktop = "gvncviewer";
+ }
else if (exists ("krdc"))
{
remote_desktop = "krdc";
}
+ else if (exists ("vncviewer"))
+ {
+ remote_desktop = "vncviewer";
+ }
+ else if (exists ("xtightvncviewer"))
+ {
+ remote_desktop = "xtightvncviewer";
+ }
+ else if (exists ("xvnc4viewer"))
+ {
+ remote_desktop = "xvnc4viewer";
+ }
+ else if (exists ("rdesktop"))
+ {
+ remote_desktop = "rdesktop";
+ }
Debug.log (Debug.domain.ENVIRONMENT, "Command.determine_remote_desktop_thread", "Command for remote desktop: " + remote_desktop);
return null;
@@ -330,7 +350,8 @@
string[] _array = _string.split (";", 6);
if ((_array.length == 6) &&
- (_array[1] == "true"))
+ (_array[1] == "true") &&
+ (custom_exists (_array[3], _array[4])))
{
command = _array;
}
@@ -339,6 +360,33 @@
return command;
}
+ public static string[] return_by_number (int number)
+ {
+ string[] command = new string[] {""};
+ string[] commands = (string[]) Settings.custom_commands.val;
+
+ int count = 0;
+
+ foreach (string _string in commands)
+ {
+ string[] _array = _string.split (";", 6);
+
+ if ((_array.length == 6) &&
+ (_array[0] == "true") &&
+ (custom_exists (_array[3], _array[4])))
+ {
+ count ++;
+
+ if (count == number)
+ {
+ command = _array;
+ }
+ }
+ }
+
+ return command;
+ }
+
public static void open_uri (string uri)
{
try
@@ -348,6 +396,12 @@
catch (Error e)
{
Debug.log (Debug.domain.ERROR, "Command.open_uri", e.message);
+
+ if (exists ("xdg-open"))
+ {
+ Debug.log (Debug.domain.ENVIRONMENT, "Command.open_uri", "Falling back to xdg-open");
+ execute ("xdg-open " + uri);
+ }
}
}
}
diff -Nru haguichi-1.3.5~ubuntu15.04.1/src/connection.vala haguichi-1.3.6~ubuntu15.04.1/src/connection.vala
--- haguichi-1.3.5~ubuntu15.04.1/src/connection.vala 2016-08-07 20:24:34.000000000 +0000
+++ haguichi-1.3.6~ubuntu15.04.1/src/connection.vala 2016-12-06 20:50:14.000000000 +0000
@@ -11,10 +11,26 @@
public class Connection : Object
{
public List networks;
+ private HashTable long_nicks_hash;
public Connection ()
{
networks = new List();
+ long_nicks_hash = new HashTable(str_hash, str_equal);
+
+ // Retreive saved long nicks from GSettings
+ string[] long_nicks = (string[]) Settings.long_nicks.val;
+
+ // Add saved long nicks to the hash table
+ foreach (string long_nick in long_nicks)
+ {
+ string[] parts = long_nick.split (";", 2);
+
+ if (parts.length == 2)
+ {
+ add_long_nick (parts[0], parts[1]);
+ }
+ }
}
public void add_network (Network network)
@@ -36,4 +52,35 @@
{
networks = new List();
}
+
+ public bool has_long_nick (string client_id)
+ {
+ return long_nicks_hash.contains (client_id);
+ }
+
+ public string get_long_nick (string client_id)
+ {
+ return long_nicks_hash.lookup (client_id);
+ }
+
+ public void add_long_nick (string client_id, string long_nick)
+ {
+ // Lock hash table while inserting because this function can be called from asynchronous Member.get_long_nick threads
+ lock (long_nicks_hash)
+ {
+ long_nicks_hash.insert (client_id, long_nick);
+ }
+ }
+
+ public void save_long_nicks ()
+ {
+ string[] long_nicks = {};
+
+ long_nicks_hash.foreach ((client_id, long_nick) =>
+ {
+ long_nicks += client_id + ";" + long_nick;
+ });
+
+ Settings.long_nicks.val = long_nicks;
+ }
}
diff -Nru haguichi-1.3.5~ubuntu15.04.1/src/controller.vala haguichi-1.3.6~ubuntu15.04.1/src/controller.vala
--- haguichi-1.3.5~ubuntu15.04.1/src/controller.vala 2016-08-07 20:24:34.000000000 +0000
+++ haguichi-1.3.6~ubuntu15.04.1/src/controller.vala 2016-12-06 20:50:14.000000000 +0000
@@ -20,6 +20,7 @@
public static int num_update_cycles;
private static int num_wait_for_internet_cycles;
private static string start_output;
+ private static string old_list;
private static HashTable members_left_hash;
private static HashTable members_online_hash;
@@ -427,13 +428,13 @@
string output = Hamachi.login();
if ((output.contains (".. ok")) ||
- (output.contains ("Already logged in")) ) // Ok, logged in.
+ (output.contains ("Already logged in")) ) // Ok, logged in
{
Debug.log (Debug.domain.INFO, "Controller.go_login_thread", "Connected!");
last_status = 6;
- Thread.usleep (1000000); // Wait a second to get updated info and list
+ Thread.usleep (2000000); // Wait two seconds to get updated info and list
Hamachi.get_info();
@@ -460,7 +461,8 @@
private static void get_network_list ()
{
- Haguichi.connection.networks = Hamachi.return_list();
+ Hamachi.get_list();
+ Haguichi.connection.networks = Hamachi.return_networks();
Haguichi.window.network_view.fill_tree();
GlobalEvents.connection_established();
}
@@ -503,7 +505,13 @@
if (last_status >= 6)
{
- new_networks_list = Hamachi.return_list();
+ old_list = Hamachi.last_list;
+ Hamachi.get_list();
+
+ if (old_list != Hamachi.last_list)
+ {
+ new_networks_list = Hamachi.return_networks();
+ }
}
if (continue_update)
@@ -550,6 +558,10 @@
{
Debug.log (Debug.domain.INFO, "Controller.update_list", "Demo mode, not really updating list.");
}
+ else if (old_list == Hamachi.last_list)
+ {
+ Debug.log (Debug.domain.INFO, "Controller.update_list", "Connected, list not changed. Skipping update.");
+ }
else
{
Debug.log (Debug.domain.INFO, "Controller.update_list", "Connected, updating list.");
@@ -802,7 +814,8 @@
public static void notify_members_joined ()
{
- members_joined_hash.foreach ((member_id, member_event) => {
+ members_joined_hash.foreach ((member_id, member_event) =>
+ {
notify_member_joined (member_event.nick, member_event.first_network, (member_event.networks_length - 1));
});
}
@@ -824,7 +837,8 @@
public static void notify_members_left ()
{
- members_left_hash.foreach ((member_id, member_event) => {
+ members_left_hash.foreach ((member_id, member_event) =>
+ {
notify_member_left (member_event.nick, member_event.first_network, (member_event.networks_length - 1));
});
}
@@ -846,7 +860,8 @@
public static void notify_members_online ()
{
- members_online_hash.foreach ((member_id, member_event) => {
+ members_online_hash.foreach ((member_id, member_event) =>
+ {
notify_member_online (member_event.nick, member_event.first_network, (member_event.networks_length - 1));
});
}
@@ -868,7 +883,8 @@
public static void notify_members_offline ()
{
- members_offline_hash.foreach ((member_id, member_event) => {
+ members_offline_hash.foreach ((member_id, member_event) =>
+ {
notify_member_offline (member_event.nick, member_event.first_network, (member_event.networks_length - 1));
});
}
diff -Nru haguichi-1.3.5~ubuntu15.04.1/src/dialogs/attach.vala haguichi-1.3.6~ubuntu15.04.1/src/dialogs/attach.vala
--- haguichi-1.3.5~ubuntu15.04.1/src/dialogs/attach.vala 2016-08-07 20:24:34.000000000 +0000
+++ haguichi-1.3.6~ubuntu15.04.1/src/dialogs/attach.vala 2016-12-06 20:50:14.000000000 +0000
@@ -184,17 +184,17 @@
switch (mode)
{
case "Attaching":
- account_entry.sensitive = false;
- with_networks.sensitive = false;
- cancel_but.sensitive = false;
- attach_but.sensitive = false;
+ account_entry.sensitive = false;
+ with_networks.sensitive = false;
+ cancel_but.sensitive = false;
+ attach_but.sensitive = false;
break;
case "Normal":
- account_entry.sensitive = true;
- with_networks.sensitive = true;
- cancel_but.sensitive = true;
- attach_but.sensitive = true;
+ account_entry.sensitive = true;
+ with_networks.sensitive = true;
+ cancel_but.sensitive = true;
+ attach_but.sensitive = true;
break;
}
}
diff -Nru haguichi-1.3.5~ubuntu15.04.1/src/dialogs/base.vala haguichi-1.3.6~ubuntu15.04.1/src/dialogs/base.vala
--- haguichi-1.3.5~ubuntu15.04.1/src/dialogs/base.vala 2016-08-07 20:24:34.000000000 +0000
+++ haguichi-1.3.6~ubuntu15.04.1/src/dialogs/base.vala 2016-12-06 20:50:14.000000000 +0000
@@ -21,10 +21,10 @@
{
GlobalEvents.set_modal_dialog (this);
- text = header_text;
- secondary_text = message_text;
- message_type = _message_type;
- transient_for = parent;
+ text = header_text;
+ secondary_text = message_text;
+ message_type = _message_type;
+ transient_for = parent;
response.connect (on_response);
}
diff -Nru haguichi-1.3.5~ubuntu15.04.1/src/dialogs/CMakeLists.txt haguichi-1.3.6~ubuntu15.04.1/src/dialogs/CMakeLists.txt
--- haguichi-1.3.5~ubuntu15.04.1/src/dialogs/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000
+++ haguichi-1.3.6~ubuntu15.04.1/src/dialogs/CMakeLists.txt 2016-12-06 20:50:14.000000000 +0000
@@ -0,0 +1,3 @@
+### CMakeLists automatically created with AutoVala
+### Do not edit
+
diff -Nru haguichi-1.3.5~ubuntu15.04.1/src/dialogs/join-create-network.vala haguichi-1.3.6~ubuntu15.04.1/src/dialogs/join-create-network.vala
--- haguichi-1.3.5~ubuntu15.04.1/src/dialogs/join-create-network.vala 2016-08-07 20:24:34.000000000 +0000
+++ haguichi-1.3.6~ubuntu15.04.1/src/dialogs/join-create-network.vala 2016-12-06 20:50:14.000000000 +0000
@@ -74,7 +74,7 @@
id_label.halign = Align.END;
id_label.mnemonic_widget = id_entry;
- password_entry = new Entry ();
+ password_entry = new Entry();
password_entry.changed.connect (hide_message);
password_entry.activates_default = true;
password_entry.visibility = false;
@@ -86,8 +86,8 @@
Grid grid = new Grid();
grid.row_spacing = 6;
grid.column_spacing = 6;
- grid.attach (id_label, 0, 1, 1, 1);
- grid.attach (id_entry, 1, 1, 1, 1);
+ grid.attach (id_label, 0, 1, 1, 1);
+ grid.attach (id_entry, 1, 1, 1, 1);
grid.attach (password_label, 0, 2, 1, 1);
grid.attach (password_entry, 1, 2, 1, 1);
grid.margin = 11;
@@ -104,7 +104,7 @@
get_action_area().margin = 6;
get_action_area().margin_top = 0;
- hide_message ();
+ hide_message();
set_mode ("Normal");
id_entry.grab_focus();
diff -Nru haguichi-1.3.5~ubuntu15.04.1/src/global-events.vala haguichi-1.3.6~ubuntu15.04.1/src/global-events.vala
--- haguichi-1.3.5~ubuntu15.04.1/src/global-events.vala 2016-08-07 20:24:34.000000000 +0000
+++ haguichi-1.3.6~ubuntu15.04.1/src/global-events.vala 2016-12-06 20:50:14.000000000 +0000
@@ -114,16 +114,16 @@
public static void about ()
{
Gtk.show_about_dialog (null,
- "transient-for", Haguichi.window,
- "program-name", Text.app_name,
- "logo-icon-name", Text.app_name.down(),
- "comments", Text.app_comments,
- "version", Text.app_version,
- "license", Text.app_license,
- "copyright", Text.app_copyright,
- "website", Text.app_website,
- "website-label", Text.app_website_label,
- "authors", Text.app_authors,
+ "transient-for", Haguichi.window,
+ "program-name", Text.app_name,
+ "logo-icon-name", Text.app_name.down(),
+ "comments", Text.app_comments,
+ "version", Text.app_version,
+ "license", Text.app_license,
+ "copyright", Text.app_copyright,
+ "website", Text.app_website,
+ "website-label", Text.app_website_label,
+ "authors", Text.app_authors,
"translator-credits", Text.app_translator_credits);
}
@@ -342,7 +342,7 @@
public static void open_config ()
{
- Command.open_uri ("file://"+Hamachi.data_path);
+ Command.open_uri ("file://" + Hamachi.data_path);
}
public static void help ()
@@ -384,6 +384,7 @@
}
Haguichi.window.hide();
+ Haguichi.connection.save_long_nicks();
if ((bool) Settings.disconnect_on_quit.val)
{
diff -Nru haguichi-1.3.5~ubuntu15.04.1/src/haguichi.vala haguichi-1.3.6~ubuntu15.04.1/src/haguichi.vala
--- haguichi-1.3.5~ubuntu15.04.1/src/haguichi.vala 2016-08-07 20:24:34.000000000 +0000
+++ haguichi-1.3.6~ubuntu15.04.1/src/haguichi.vala 2016-12-06 20:50:14.000000000 +0000
@@ -88,7 +88,9 @@
use_app_menu = true;
}
- if ((Environment.get_variable ("XDG_CURRENT_DESKTOP") == "GNOME") ||
+ if ((Environment.get_variable ("XDG_CURRENT_DESKTOP") == "Deepin") ||
+ (Environment.get_variable ("XDG_CURRENT_DESKTOP") == "GNOME") ||
+ (Environment.get_variable ("XDG_CURRENT_DESKTOP") == "KDE") ||
(Environment.get_variable ("XDG_CURRENT_DESKTOP") == "Pantheon") ||
(Environment.get_variable ("XDG_CURRENT_DESKTOP") == "XFCE") ||
(Environment.get_variable ("XDG_CURRENT_DESKTOP").has_suffix (":GNOME"))) // Any GNOME based desktop, for example "Budgie:GNOME"
@@ -133,12 +135,12 @@
}
if ((s == "-v") || (s == "--version"))
{
- stdout.printf ("%s\n", Text.app_name + " " + Text.app_version);
+ stdout.printf ("%s %s\n", Text.app_name, Text.app_version);
return 0;
}
if (s == "--license")
{
- stdout.printf ("%s\n", "\n" + Text.app_info + "\n\n" + Text.app_license + "\n");
+ stdout.printf ("\n%s\n\n%s\n\n", Text.app_info, Text.app_license);
return 0;
}
@@ -160,8 +162,7 @@
}
else if (s.has_prefix ("-"))
{
- stdout.printf ("%s\n", "Unknown option " + s + "\n");
- stdout.printf ("%s\n", Text.app_help);
+ stdout.printf ("Unknown option %s\n\n%s\n", s, Text.app_help);
return 0;
}
}
diff -Nru haguichi-1.3.5~ubuntu15.04.1/src/hamachi.vala haguichi-1.3.6~ubuntu15.04.1/src/hamachi.vala
--- haguichi-1.3.5~ubuntu15.04.1/src/hamachi.vala 2016-08-07 20:24:34.000000000 +0000
+++ haguichi-1.3.6~ubuntu15.04.1/src/hamachi.vala 2016-12-06 20:50:14.000000000 +0000
@@ -15,6 +15,7 @@
public static string version;
public static string ip_version;
public static string last_info;
+ public static string last_list;
private static string service;
public static void init ()
@@ -34,7 +35,7 @@
if (Haguichi.demo_mode)
{
- version = "2.1.0.165";
+ version = "2.1.0.174";
return;
}
@@ -101,23 +102,37 @@
Debug.log (Debug.domain.HAMACHI, "Hamachi.determine_version", "Unknown version");
}
- private static void determine_service ()
+ public static void determine_service ()
{
- if (Command.exists ("systemctl"))
+ string init_system = (string) Settings.init_system.val;
+
+ if (Command.exists ("systemctl") &&
+ ((init_system == "auto") ||
+ (init_system == "systemctl")))
{
- service = "systemctl {0} logmein-hamachi"; // systemd
+ // Systemd
+ service = "systemctl {0} logmein-hamachi";
}
- else if (Command.exists ("service"))
+ else if (Command.exists ("service") &&
+ ((init_system == "auto") ||
+ (init_system == "service")))
{
- service = "service logmein-hamachi {0}"; // Upstart
+ // Upstart
+ service = "service logmein-hamachi {0}";
}
- else if (FileUtils.test ("/etc/init.d/logmein-hamachi", GLib.FileTest.EXISTS))
+ else if (FileUtils.test ("/etc/init.d/logmein-hamachi", GLib.FileTest.EXISTS) &&
+ ((init_system == "auto") ||
+ (init_system == "init.d")))
{
- service = "/etc/init.d/logmein-hamachi {0}"; // SysVinit
+ // Sysvinit
+ service = "/etc/init.d/logmein-hamachi {0}";
}
- else if (FileUtils.test ("/etc/rc.d/logmein-hamachi", GLib.FileTest.EXISTS))
+ else if (FileUtils.test ("/etc/rc.d/logmein-hamachi", GLib.FileTest.EXISTS) &&
+ ((init_system == "auto") ||
+ (init_system == "rc.d")))
{
- service = "/etc/rc.d/logmein-hamachi {0}"; // BSD style init
+ // BSD style init
+ service = "/etc/rc.d/logmein-hamachi {0}";
}
Debug.log (Debug.domain.ENVIRONMENT, "Hamachi.determine_service", service);
@@ -226,7 +241,7 @@
try
{
MatchInfo mi;
- new Regex ("""^(?[0-9\.]{7,15})?[ ]*(?[0-9a-z\:]+)?$""").match (ouput, 0, out mi);
+ new Regex ("""^(?[0-9\.]{7,15})?[ ]*(?[0-9a-f\:]{2,45})?$""").match (ouput, 0, out mi);
ipv4 = mi.fetch_named ("ipv4");
ipv6 = mi.fetch_named ("ipv6");
@@ -417,14 +432,6 @@
return success;
}
- private static string get_list ()
- {
- string output = Command.return_output ("hamachi list");
- Debug.log (Debug.domain.HAMACHI, "Hamachi.get_list", "\n" + output);
-
- return output;
- }
-
public static string random_address ()
{
string address = "25.";
@@ -461,9 +468,8 @@
return id;
}
- public static List return_list ()
+ public static string get_list ()
{
- List networks = new List();
string output = "";
if (Haguichi.demo_mode)
@@ -512,16 +518,25 @@
}
else
{
- output = get_list();
+ output = Command.return_output ("hamachi list");
+ Debug.log (Debug.domain.HAMACHI, "Hamachi.get_list", "\n" + output);
}
- string[] split = output.split ("\n");
+ last_list = output;
+ return last_list;
+ }
+
+ public static List return_networks ()
+ {
+ List networks = new List();
+
+ string[] split = last_list.split ("\n");
string cur_network_id = "";
try
{
Regex network_regex = new Regex ("""^ (?.{1}) \[(?.+?)\][ ]*(?.*?)[ ]*(capacity: [0-9]+/(?[0-9]+),)?[ ]*(\[(?[0-9\./]{9,19})\])?[ ]*( subscription type: (?[^,]+),)?( owner: (?.*))?$""");
- Regex normal_member_regex = new Regex ("""^ (?.{1}) (?[0-9-]{11})[ ]+(?.*?)[ ]*(?[0-9\.]{7,15})?[ ]*(alias: (?[0-9\.]{7,15}|not set))?[ ]*(?[0-9a-f\:]+\:[0-9a-f\:]+)?[ ]*(?direct|via relay|via server)?[ ]*(?UDP|TCP)?[ ]*(?[0-9\.]+\:[0-9]+)?[ ]*(?[ a-zA-Z]+)?$""");
+ Regex normal_member_regex = new Regex ("""^ (?.{1}) (?[0-9-]{11})[ ]+(?.*?)[ ]*(?[0-9\.]{7,15})?[ ]*(alias: (?[0-9\.]{7,15}|not set))?[ ]*(?[0-9a-f\:]{2,45})?[ ]*(?direct|via relay|via server)?[ ]*(?UDP|TCP)?[ ]*(?[0-9\.]{7,15}\:[0-9]{1,5})?[ ]*(?[ a-zA-Z]+)?$""");
Regex unapproved_member_regex = new Regex ("""^ \? (?[0-9-]{11})[ ]*$""");
foreach (string s in split)
@@ -632,7 +647,7 @@
}
catch (RegexError e)
{
- Debug.log (Debug.domain.ERROR, "Hamachi.return_list", e.message);
+ Debug.log (Debug.domain.ERROR, "Hamachi.return_networks", e.message);
}
return networks;
diff -Nru haguichi-1.3.5~ubuntu15.04.1/src/headerbar.vala haguichi-1.3.6~ubuntu15.04.1/src/headerbar.vala
--- haguichi-1.3.5~ubuntu15.04.1/src/headerbar.vala 2016-08-07 20:24:34.000000000 +0000
+++ haguichi-1.3.6~ubuntu15.04.1/src/headerbar.vala 2016-12-06 20:50:14.000000000 +0000
@@ -62,13 +62,13 @@
var change_nick = new GLib.MenuItem (Text.change_nick_label, "app.change-nick");
var info = new GLib.MenuItem (Text.information_label, "app.info");
- var info_section = new GLib.Menu ();
+ var info_section = new GLib.Menu();
info_section.append_item (info);
- var nick_section = new GLib.Menu ();
+ var nick_section = new GLib.Menu();
nick_section.append_item (change_nick);
- var copy_section = new GLib.Menu ();
+ var copy_section = new GLib.Menu();
copy_section.append_item (copy_ipv4);
copy_section.append_item (copy_ipv6);
copy_section.append_item (copy_id);
@@ -118,7 +118,7 @@
refresh_but.set_action_name ("app.refresh");
- var gear_menu = new GLib.Menu ();
+ var gear_menu = new GLib.Menu();
var open_config = new GLib.MenuItem (Text.config_folder_label, "app.open-config");
var save_config = new GLib.MenuItem (Text.config_save_label, "app.save-config");
@@ -137,28 +137,28 @@
var about = new GLib.MenuItem (Text.about_label, "app.about");
var quit = new GLib.MenuItem (Text.quit_label, "app.quit");
- var backup_section = new GLib.Menu ();
+ var backup_section = new GLib.Menu();
backup_section.append_item (save_config);
backup_section.append_item (restore_config);
- var config_submenu = new GLib.Menu ();
+ var config_submenu = new GLib.Menu();
config_submenu.append_item (open_config);
config_submenu.append_section (null, backup_section);
- var sort_section = new GLib.Menu ();
+ var sort_section = new GLib.Menu();
sort_section.append_item (sort_by_name);
sort_section.append_item (sort_by_status);
- var filter_section = new GLib.Menu ();
+ var filter_section = new GLib.Menu();
filter_section.append_item (show_offline);
- var preferences_section = new GLib.Menu ();
+ var preferences_section = new GLib.Menu();
preferences_section.append_item (preferences);
- var donate_section = new GLib.Menu ();
+ var donate_section = new GLib.Menu();
donate_section.append_item (donate);
- var meta_section = new GLib.Menu ();
+ var meta_section = new GLib.Menu();
meta_section.append_item (help);
meta_section.append_item (about);
meta_section.append_item (quit);
@@ -195,10 +195,10 @@
show_all();
connect_but.get_preferred_width (out connect_but_width, null);
- client_but.get_preferred_width (out client_but_width, null);
- box.get_preferred_width (out box_width, null);
- search_but.get_preferred_width (out search_but_width, null);
- gear_but.get_preferred_width (out gear_but_width, null);
+ client_but.get_preferred_width (out client_but_width, null);
+ box.get_preferred_width (out box_width, null);
+ search_but.get_preferred_width (out search_but_width, null);
+ gear_but.get_preferred_width (out gear_but_width, null);
hide_all_buttons();
@@ -353,7 +353,7 @@
GlobalActions.info.set_enabled (true);
- GlobalEvents.stop_search ();
+ GlobalEvents.stop_search();
set_subtitle (Text.disconnected);
break;
diff -Nru haguichi-1.3.5~ubuntu15.04.1/src/key.vala haguichi-1.3.6~ubuntu15.04.1/src/key.vala
--- haguichi-1.3.5~ubuntu15.04.1/src/key.vala 2016-08-07 20:24:34.000000000 +0000
+++ haguichi-1.3.6~ubuntu15.04.1/src/key.vala 2016-12-06 20:50:14.000000000 +0000
@@ -89,7 +89,7 @@
(key == Settings.member_template_small.key_name) ||
(key == Settings.member_template_large.key_name))
{
- Haguichi.window.network_view.set_layout();
+ Haguichi.window.network_view.refresh_layout();
}
else if (key == Settings.nickname.key_name)
{
@@ -174,7 +174,11 @@
{
Haguichi.window.network_view.go_sort ((string) _value);
}
- else if (key == Settings.command_for_super_user.key_name)
+ else if (key == Settings.init_system.key_name)
+ {
+ Hamachi.determine_service();
+ }
+ else if (key == Settings.super_user.key_name)
{
Command.determine_sudo();
}
diff -Nru haguichi-1.3.5~ubuntu15.04.1/src/member.vala haguichi-1.3.6~ubuntu15.04.1/src/member.vala
--- haguichi-1.3.5~ubuntu15.04.1/src/member.vala 2016-08-07 20:24:34.000000000 +0000
+++ haguichi-1.3.6~ubuntu15.04.1/src/member.vala 2016-12-06 20:50:14.000000000 +0000
@@ -33,14 +33,14 @@
client_id = _client_id;
tunnel = _tunnel;
- set_sort_strings ();
+ set_sort_strings();
is_evicted = false;
}
public void init ()
{
- get_long_nick (nick);
+ get_long_nick (nick, true);
}
public void update (Status _status, string _network_id, string? _ipv4, string? _ipv6, string? _nick, string _client_id, string? _tunnel)
@@ -52,7 +52,7 @@
client_id = _client_id;
tunnel = _tunnel;
- get_long_nick (_nick);
+ get_long_nick (_nick, false);
}
private void set_sort_strings ()
@@ -61,48 +61,67 @@
status_sort_string = status.status_sortable + nick + client_id;
}
- public void get_long_nick (string _nick)
+ public void get_long_nick (string _nick, bool _init)
{
- if ((_nick.length >= 25) &&
- (nick.length > 25) &&
+ if ((_init == false) &&
+ (_nick.length >= 25) &&
+ (nick.length >= 25) &&
(nick.has_prefix (_nick)))
{
// Long nick has already been retreived and is probably not altered, since the first 25 characters are identical
}
- else if ((_nick.length >= 25) ||
- (_nick.has_suffix ("�")))
+ else if (_nick.length >= 25)
{
- // Retrieve long nick
- new Thread (null, get_long_nick_thread);
+ if ((_nick.validate() == false) &&
+ (_init == true))
+ {
+ // Set nick to "Unknown" initially when the string is not valid UTF-8 encoded to prevent Gtk and Pango warnings,
+ // which typically happens when multibyte characters get cut off in the network list
+ nick = Text.unknown;
+ }
+
+ if ((_nick.validate() == true) &&
+ (Haguichi.connection.has_long_nick (client_id)) &&
+ (Haguichi.connection.get_long_nick (client_id).has_prefix (_nick)))
+ {
+ // Get long nick from cache
+ nick = Haguichi.connection.get_long_nick (client_id);
+ set_sort_strings();
+
+ Debug.log (Debug.domain.INFO, "Member.get_long_nick", "Retrieved long nick for client " + client_id + " from cache: " + nick);
+ }
+ else
+ {
+ // Retrieve long nick from hamachi
+ new Thread (null, get_long_nick_thread);
+ }
}
else
{
// Save passed nick
nick = _nick;
- set_sort_strings ();
+ set_sort_strings();
}
}
private void* get_long_nick_thread ()
{
- if (Haguichi.demo_mode)
+ string output = Command.return_output ("hamachi peer " + client_id);
+ Debug.log (Debug.domain.HAMACHI, "Member.get_long_nick_thread", output);
+
+ string _nick = Hamachi.retrieve (output, "nickname");
+ if (_nick != "")
{
- Debug.log (Debug.domain.HAMACHI, "Member.get_long_nick_thread", "Demo mode, keeping nick " + nick);
+ nick = _nick;
}
- else
+ Haguichi.connection.add_long_nick (client_id, nick);
+ set_sort_strings();
+
+ Idle.add_full (Priority.DEFAULT_IDLE, () =>
{
- string output = Command.return_output ("hamachi peer " + client_id);
- Debug.log (Debug.domain.HAMACHI, "Member.GetLongNickThread", output);
-
- nick = Hamachi.retrieve (output, "nickname");
- set_sort_strings ();
-
- Idle.add_full (Priority.DEFAULT_IDLE, () =>
- {
- Haguichi.window.network_view.update_member (this);
- return false;
- });
- }
+ Haguichi.window.network_view.update_member (this);
+ return false;
+ });
return null;
}
@@ -126,11 +145,11 @@
{
if (Haguichi.demo_mode)
{
- nick = "Nick";
- ipv4 = "192.168.155.23";
- status = new Status ("*");
+ nick = "Nick";
+ ipv4 = "192.168.155.23";
+ status = new Status ("*");
- set_sort_strings ();
+ set_sort_strings();
Haguichi.window.network_view.update_member (this);
HaguichiWindow.sidebar.refresh_tab();
diff -Nru haguichi-1.3.5~ubuntu15.04.1/src/menus/CMakeLists.txt haguichi-1.3.6~ubuntu15.04.1/src/menus/CMakeLists.txt
--- haguichi-1.3.5~ubuntu15.04.1/src/menus/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000
+++ haguichi-1.3.6~ubuntu15.04.1/src/menus/CMakeLists.txt 2016-12-06 20:50:14.000000000 +0000
@@ -0,0 +1,3 @@
+### CMakeLists automatically created with AutoVala
+### Do not edit
+
diff -Nru haguichi-1.3.5~ubuntu15.04.1/src/network.vala haguichi-1.3.6~ubuntu15.04.1/src/network.vala
--- haguichi-1.3.5~ubuntu15.04.1/src/network.vala 2016-08-07 20:24:34.000000000 +0000
+++ haguichi-1.3.6~ubuntu15.04.1/src/network.vala 2016-12-06 20:50:14.000000000 +0000
@@ -258,7 +258,7 @@
Idle.add_full (Priority.HIGH_IDLE, () =>
{
Haguichi.window.network_view.update_network (this);
- HaguichiWindow.sidebar.refresh_tab ();
+ HaguichiWindow.sidebar.refresh_tab();
return false;
});
}
@@ -312,7 +312,7 @@
approve = approval;
- HaguichiWindow.sidebar.refresh_tab ();
+ HaguichiWindow.sidebar.refresh_tab();
new Thread (null, set_approval_thread);
}
diff -Nru haguichi-1.3.5~ubuntu15.04.1/src/network-view.vala haguichi-1.3.6~ubuntu15.04.1/src/network-view.vala
--- haguichi-1.3.5~ubuntu15.04.1/src/network-view.vala 2016-08-07 20:24:34.000000000 +0000
+++ haguichi-1.3.6~ubuntu15.04.1/src/network-view.vala 2016-12-06 20:50:14.000000000 +0000
@@ -125,10 +125,15 @@
private bool is_network (TreeModel _model, TreeIter _iter)
{
+ return !is_member (_model, _iter);
+ }
+
+ private bool is_member (TreeModel _model, TreeIter _iter)
+ {
Value member_val;
_model.get_value (_iter, member_column, out member_val);
- if ((Member) member_val == null)
+ if ((Member) member_val != null)
{
return true;
}
@@ -181,7 +186,7 @@
network.return_member_count (out member_count, out member_online_count);
string status_string = Utils.format ("\n{0} {1}", Text.status, network.status.status_text, null);
- string id_string = Utils.format ("\n{0} {1}", Text.network_id, network.id, null);
+ string id_string = Utils.format ("\n{0} {1}", Text.network_id, Markup.escape_text (network.id), null);
string count_string = Utils.format (Text.member_count, member_online_count.to_string(), member_count.to_string(), null);
string member_string = Utils.format ("\n{0} {1}", Text.members, count_string, null);
string capacity_string = "";
@@ -214,7 +219,7 @@
approve_string = Utils.format ("\n{0} {1}", Text.approval, Text.automatically, null);
}
- tip_label.set_markup (""+Markup.escape_text (network.name)+""+status_string+id_string+member_string+owner_string+capacity_string+lock_string+approve_string+"");
+ tip_label.set_markup ("" + Markup.escape_text (network.name) + "" + status_string + id_string + member_string + owner_string + capacity_string + lock_string + approve_string + "");
tip_icon.set_from_icon_name (Utils.get_network_icon_name (false), IconSize.DIALOG);
@@ -257,7 +262,7 @@
connection_string = Utils.format ("\n{0} {1}", Text.connection, member.status.connection_type, null);
}
- tip_label.set_markup (""+Markup.escape_text (member.nick)+""+status_string+client_string+address_string+tunnel_string+connection_string+"");
+ tip_label.set_markup ("" + Markup.escape_text (member.nick) + "" + status_string + client_string + address_string + tunnel_string + connection_string + "");
tip_icon.set_from_icon_name (Utils.get_member_icon_name (false), IconSize.DIALOG);
@@ -603,18 +608,15 @@
if (is_network (_model, _iter))
{
- string name = Markup.escape_text (network.name);
- name = name.replace ("\n", "");
- name = name.replace ("\r", "");
- name = name.replace ("\t", "");
- name = name.replace ("\b", "");
+ string id = Markup.escape_text (network.id).replace ("%", "{PERCENTSIGN}");
+ string name = Markup.escape_text (network.name).replace ("%", "{PERCENTSIGN}");
int member_count;
int member_online_count;
network.return_member_count (out member_count, out member_online_count);
string template = network_template;
- template = template.replace ("%ID", network.id);
+ template = template.replace ("%ID", id);
template = template.replace ("%N", name);
template = template.replace ("%S", network.status.status_text);
template = template.replace ("%T", member_count.to_string());
@@ -635,7 +637,7 @@
template = template.replace ("%*_", "");
}
- text_cell.markup = template;
+ text_cell.markup = template.replace ("{PERCENTSIGN}", "%");
if (network.status.status_int == 0)
{
@@ -648,11 +650,7 @@
}
else
{
- string name = Markup.escape_text (member.nick);
- name = name.replace ("\n", "");
- name = name.replace ("\r", "");
- name = name.replace ("\t", "");
- name = name.replace ("\b", "");
+ string name = Markup.escape_text (member.nick).replace ("%", "{PERCENTSIGN}");
string address = "";
if ((member.ipv4 != null) &&
@@ -673,8 +671,9 @@
template = template.replace ("%ID", member.client_id);
template = template.replace ("%N", name);
template = template.replace ("%A", address);
- template = template.replace ("%IP4", (member.ipv4 == null) ? "" : member.ipv4);
- template = template.replace ("%IP6", (member.ipv6 == null) ? "" : member.ipv6);
+ template = template.replace ("%IP4", (member.ipv4 == null) ? "" : member.ipv4);
+ template = template.replace ("%IP6", (member.ipv6 == null) ? "" : member.ipv6);
+ template = template.replace ("%TUN", (member.tunnel == null) ? "" : member.tunnel);
template = template.replace ("%S", member.status.status_text);
template = template.replace ("%CX", member.status.connection_type);
template = template.replace ("
", "\n");
@@ -692,7 +691,7 @@
template = template.replace ("%*_", "");
}
- text_cell.markup = template;
+ text_cell.markup = template.replace ("{PERCENTSIGN}", "%");
if (member.status.status_int == 0)
{
@@ -781,8 +780,7 @@
{
string[] command = Command.return_default();
- if ((command.length == 6) &&
- (Command.custom_exists (command[3], command[4])))
+ if (command.length == 6)
{
Command.execute (Command.return_custom (last_member, command[3], command[4], command[5]));
}
@@ -942,15 +940,43 @@
return false;
}
+ public void activate_command_by_number (int number)
+ {
+ TreeModel _model;
+ TreeIter _iter;
+
+ if (get_selection().get_selected (out _model, out _iter))
+ {
+ if (is_member (sorted_store, _iter))
+ {
+ Value member_val;
+ sorted_store.get_value (_iter, member_column, out member_val);
+ Member member = (Member) member_val;
+
+ if (member.status.status_int == 1)
+ {
+ string[] command = Command.return_by_number (number);
+
+ if (command.length == 6)
+ {
+ Command.execute (Command.return_custom (member, command[3], command[4], command[5]));
+ }
+ }
+ }
+ }
+ }
+
private void set_network_list_icon_size (IconSize size)
{
icon_cell.stock_size = size;
columns_autosize();
}
- public void set_layout ()
+ public void refresh_layout ()
{
- set_layout_from_string (current_layout);
+ string layout = current_layout;
+ current_layout = "";
+ set_layout_from_string (layout);
}
public void set_layout_from_string (string layout)
diff -Nru haguichi-1.3.5~ubuntu15.04.1/src/preferences.vala haguichi-1.3.6~ubuntu15.04.1/src/preferences.vala
--- haguichi-1.3.5~ubuntu15.04.1/src/preferences.vala 2016-08-07 20:24:34.000000000 +0000
+++ haguichi-1.3.6~ubuntu15.04.1/src/preferences.vala 2016-12-06 20:50:14.000000000 +0000
@@ -167,7 +167,7 @@
interval_label.halign = Align.START;
interval_box = new Box (Orientation.HORIZONTAL, 0);
- interval_box.pack_start (interval_spin, false, false, 0);
+ interval_box.pack_start (interval_spin, false, false, 0);
interval_box.pack_start (interval_label, false, false, 0);
GroupBox behavior_box = new GroupBox (Text.behavior_group);
@@ -177,7 +177,7 @@
behavior_box.add_widget (interval_box);
Box system_box = new Box (Orientation.VERTICAL, 0);
- system_box.pack_start (hamachi_box, false, false, 0);
+ system_box.pack_start (hamachi_box, false, false, 0);
system_box.pack_start (behavior_box, false, false, 0);
system_box.pack_start (new Box (Orientation.VERTICAL, 0), true, true, 8);
diff -Nru haguichi-1.3.5~ubuntu15.04.1/src/session.vala haguichi-1.3.6~ubuntu15.04.1/src/session.vala
--- haguichi-1.3.5~ubuntu15.04.1/src/session.vala 2016-08-07 20:24:34.000000000 +0000
+++ haguichi-1.3.6~ubuntu15.04.1/src/session.vala 2016-12-06 20:50:14.000000000 +0000
@@ -77,7 +77,7 @@
public bool get_modality ()
{
- return (Haguichi.modal_dialog != null);
+ return (Haguichi.modal_dialog != null);
}
public bool get_visibility ()
@@ -88,5 +88,5 @@
public signal void mode_changed (string mode);
public signal void modality_changed (bool modal);
public signal void visibility_changed (bool visible);
- public signal void quitted ();
+ public signal void quitted();
}
diff -Nru haguichi-1.3.5~ubuntu15.04.1/src/settings.vala haguichi-1.3.6~ubuntu15.04.1/src/settings.vala
--- haguichi-1.3.5~ubuntu15.04.1/src/settings.vala 2016-08-07 20:24:34.000000000 +0000
+++ haguichi-1.3.6~ubuntu15.04.1/src/settings.vala 2016-12-06 20:50:14.000000000 +0000
@@ -22,7 +22,8 @@
public static Key start_in_tray;
public static Key update_network_list;
public static Key custom_commands;
- public static Key command_for_super_user;
+ public static Key init_system;
+ public static Key super_user;
public static Key check_internet_hostname;
public static Key check_internet_ip;
public static Key nickname;
@@ -30,6 +31,7 @@
public static Key reconnect_interval;
public static Key update_interval;
public static Key collapsed_networks;
+ public static Key long_nicks;
public static Key network_list_icon_size_large;
public static Key network_list_icon_size_small;
public static Key member_template_large;
@@ -64,7 +66,8 @@
reconnect_on_connection_loss = new Key ("behavior", "reconnect-on-connection-loss");
update_network_list = new Key ("behavior", "update-network-list");
custom_commands = new Key ("commands", "customizable");
- command_for_super_user = new Key ("commands", "super-user");
+ init_system = new Key ("commands", "init-system");
+ super_user = new Key ("commands", "super-user");
check_internet_hostname = new Key ("config", "check-internet-hostname");
check_internet_ip = new Key ("config", "check-internet-ip");
nickname = new Key ("config", "nickname");
@@ -72,6 +75,7 @@
reconnect_interval = new Key ("config", "reconnect-interval");
update_interval = new Key ("config", "update-interval");
collapsed_networks = new Key ("network-list", "collapsed-networks");
+ long_nicks = new Key ("network-list", "long-nicks");
member_template_large = new Key ("network-list", "member-template-large");
member_template_small = new Key ("network-list", "member-template-small");
network_template_large = new Key ("network-list", "network-template-large");
diff -Nru haguichi-1.3.5~ubuntu15.04.1/src/sidebar.vala haguichi-1.3.6~ubuntu15.04.1/src/sidebar.vala
--- haguichi-1.3.5~ubuntu15.04.1/src/sidebar.vala 2016-08-07 20:24:34.000000000 +0000
+++ haguichi-1.3.6~ubuntu15.04.1/src/sidebar.vala 2016-12-06 20:50:14.000000000 +0000
@@ -147,7 +147,7 @@
info_button_box.add (attach_button);
info_box = new Box (Orientation.VERTICAL, 0);
- info_box.pack_start (info_grid, false, false, 0);
+ info_box.pack_start (info_grid, false, false, 0);
info_box.pack_start (info_button_box, true, true, 0);
@@ -264,7 +264,7 @@
network_box = new Box (Orientation.VERTICAL, 0);
network_box.vexpand = true;
- network_box.pack_start (network_grid, false, false, 0);
+ network_box.pack_start (network_grid, false, false, 0);
network_box.pack_start (network_password_button, false, false, 0);
network_box.pack_start (network_button_box, true, true, 0);
@@ -349,7 +349,7 @@
member_box = new Box (Orientation.VERTICAL, 0);
- member_box.pack_start (member_grid, false, false, 0);
+ member_box.pack_start (member_grid, false, false, 0);
member_box.pack_start (commands_box, false, false, 0);
member_box.pack_start (approval_box, true, true, 0);
member_box.pack_start (member_button_box, true, true, 0);
diff -Nru haguichi-1.3.5~ubuntu15.04.1/src/text.vala haguichi-1.3.6~ubuntu15.04.1/src/text.vala
--- haguichi-1.3.5~ubuntu15.04.1/src/text.vala 2016-08-07 20:24:34.000000000 +0000
+++ haguichi-1.3.6~ubuntu15.04.1/src/text.vala 2016-12-06 20:50:14.000000000 +0000
@@ -11,7 +11,7 @@
public class Text : Object
{
public const string app_name = "Haguichi";
- public const string app_version = "1.3.5";
+ public const string app_version = "1.3.6";
public const string app_website = "https://www.haguichi.net/";
public const string app_website_label = "www.haguichi.net";
public static string app_comments;
diff -Nru haguichi-1.3.5~ubuntu15.04.1/src/utils.vala haguichi-1.3.6~ubuntu15.04.1/src/utils.vala
--- haguichi-1.3.5~ubuntu15.04.1/src/utils.vala 2016-08-07 20:24:34.000000000 +0000
+++ haguichi-1.3.6~ubuntu15.04.1/src/utils.vala 2016-12-06 20:50:14.000000000 +0000
@@ -12,13 +12,13 @@
{
public static string format (owned string text, string? param1, string? param2, string? param3)
{
- if (param1 == null) {text = text.replace ("{0}", "");}
- if (param2 == null) {text = text.replace ("{1}", "");}
- if (param3 == null) {text = text.replace ("{2}", "");}
+ if (param1 == null) { text = text.replace ("{0}", ""); }
+ if (param2 == null) { text = text.replace ("{1}", ""); }
+ if (param3 == null) { text = text.replace ("{2}", ""); }
- if (param1 != null) {text = text.replace ("{0}", param1);}
- if (param2 != null) {text = text.replace ("{1}", param2);}
- if (param3 != null) {text = text.replace ("{2}", param3);}
+ if (param1 != null) { text = text.replace ("{0}", param1); }
+ if (param2 != null) { text = text.replace ("{1}", param2); }
+ if (param3 != null) { text = text.replace ("{2}", param3); }
return text;
}
diff -Nru haguichi-1.3.5~ubuntu15.04.1/src/widgets/CMakeLists.txt haguichi-1.3.6~ubuntu15.04.1/src/widgets/CMakeLists.txt
--- haguichi-1.3.5~ubuntu15.04.1/src/widgets/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000
+++ haguichi-1.3.6~ubuntu15.04.1/src/widgets/CMakeLists.txt 2016-12-06 20:50:14.000000000 +0000
@@ -0,0 +1,3 @@
+### CMakeLists automatically created with AutoVala
+### Do not edit
+
diff -Nru haguichi-1.3.5~ubuntu15.04.1/src/widgets/commands-editor.vala haguichi-1.3.6~ubuntu15.04.1/src/widgets/commands-editor.vala
--- haguichi-1.3.5~ubuntu15.04.1/src/widgets/commands-editor.vala 2016-08-07 20:24:34.000000000 +0000
+++ haguichi-1.3.6~ubuntu15.04.1/src/widgets/commands-editor.vala 2016-12-06 20:50:14.000000000 +0000
@@ -75,7 +75,7 @@
column1.pack_start (toggle_cell, false);
- column2.pack_start (text_cell, true);
+ column2.pack_start (text_cell, true);
column2.pack_start (default_cell, false);
column2.set_cell_data_func (text_cell, text_cell_layout);
@@ -263,11 +263,11 @@
if (store.get_iter_first (out iter)) // First command
{
- store.set_value (iter, default_column , false);
+ store.set_value (iter, default_column, false);
while (store.iter_next (ref iter)) // All other commands
{
- store.set_value (iter, default_column , false);
+ store.set_value (iter, default_column, false);
}
}
@@ -277,7 +277,7 @@
if (tv.get_selection().get_selected (out model, out selected))
{
- store.set_value (selected, default_column , true);
+ store.set_value (selected, default_column, true);
}
update_commands();
@@ -454,7 +454,7 @@
Value command_ipv6_val; store.get_value (iter, command_ipv6_column, out command_ipv6_val);
Value priority_val; store.get_value (iter, priority_column, out priority_val);
- string is_active = (bool) active_val ? "true" : "false";
+ string is_active = (bool) active_val ? "true" : "false";
string is_default = (bool) default_val ? "true" : "false";
string command_ipv4 = ((string) command_ipv4_val).replace (";", "{COLON}");
diff -Nru haguichi-1.3.5~ubuntu15.04.1/src/widgets/message-box.vala haguichi-1.3.6~ubuntu15.04.1/src/widgets/message-box.vala
--- haguichi-1.3.5~ubuntu15.04.1/src/widgets/message-box.vala 2016-08-07 20:24:34.000000000 +0000
+++ haguichi-1.3.6~ubuntu15.04.1/src/widgets/message-box.vala 2016-12-06 20:50:14.000000000 +0000
@@ -42,8 +42,8 @@
pack_start (new Box (Orientation.VERTICAL, 0), true, true, 0);
pack_start (new Box (Orientation.VERTICAL, 0), true, true, 0);
pack_start (new Box (Orientation.VERTICAL, 0), true, true, 0);
- pack_start (heading, false, false, 0);
- pack_start (message, false, false, 0);
+ pack_start (heading, false, false, 0);
+ pack_start (message, false, false, 0);
pack_start (button_box, false, false, 0);
pack_start (new Box (Orientation.VERTICAL, 0), true, true, 0);
pack_start (new Box (Orientation.VERTICAL, 0), true, true, 0);
diff -Nru haguichi-1.3.5~ubuntu15.04.1/src/window.vala haguichi-1.3.6~ubuntu15.04.1/src/window.vala
--- haguichi-1.3.5~ubuntu15.04.1/src/window.vala 2016-08-07 20:24:34.000000000 +0000
+++ haguichi-1.3.6~ubuntu15.04.1/src/window.vala 2016-12-06 20:50:14.000000000 +0000
@@ -180,7 +180,7 @@
delete_event.connect (on_win_delete);
key_press_event.connect (on_key_press);
- width = (int) Settings.win_width.val + Settings.decorator_offset;
+ width = (int) Settings.win_width.val + Settings.decorator_offset;
height = (int) Settings.win_height.val + Settings.decorator_offset;
x = (int) Settings.win_x.val;
@@ -336,11 +336,28 @@
{
if (Gdk.ModifierType.CONTROL_MASK in event.state)
{
- if (event.keyval == Gdk.Key.bracketleft)
+ if (((event.keyval >= 49) && // "1"
+ (event.keyval <= 57)) || // "9"
+ ((event.keyval >= 65457) && // "1" - NumPad
+ (event.keyval <= 65465))) // "9" - NumPad
+ {
+ int number = (int) event.keyval;
+
+ if (number > 65456)
+ {
+ number -= 65456;
+ }
+ else if (number > 48)
+ {
+ number -= 48;
+ }
+ network_view.activate_command_by_number (number);
+ }
+ else if (event.keyval == Gdk.Key.bracketleft)
{
network_view.expand_all();
}
- if (event.keyval == Gdk.Key.bracketright)
+ else if (event.keyval == Gdk.Key.bracketright)
{
network_view.collapse_all();
}
@@ -355,7 +372,7 @@
{
if (!GlobalEvents.search_active)
{
- GlobalEvents.start_search();
+ GlobalEvents.start_search();
}
else if (!search_entry.has_focus)
{