Skip to content

Commit

Permalink
2019年 06月 18日 星期二 09:00:43 CST
Browse files Browse the repository at this point in the history
  • Loading branch information
rocket049 committed Jun 18, 2019
1 parent 2b7d12b commit 1c1f796
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
13 changes: 13 additions & 0 deletions client/libclient/exports.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ import (
"net/http"
"os"
"path/filepath"
"sort"
"strconv"
"strings"
"time"
Expand Down Expand Up @@ -430,7 +431,19 @@ func Client_SearchPersons(key *C.char, callback unsafe.Pointer) {
return
}
//ret := []FriendData{}
frdArray := []UserBaseInfo{}
for _, v := range frds {
frdArray = append(frdArray, v)
}
sort.SliceStable(frdArray, func(i, j int) bool {
a := frdArray[i].Desc[0:1]
b := frdArray[j].Desc[0:1]
if a == b {
return frdArray[i].Id < frdArray[j].Id
}
return a < b
})
for _, v := range frdArray {
//ret = append(ret, FriendData{Id: v.Id, Name: v.Name, Sex: v.Sex,
//Age: time.Now().Year() - v.Birthday.Year(), Desc: v.Desc})
if v.Id == cSrv.id {
Expand Down
2 changes: 1 addition & 1 deletion client/search.vala
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public class SearchDialg:GLib.Object{
this.store1.clear();
this.persons = new GLib.List<UserMsg?>();
//this.store1.set_sort_column_id(0,Gtk.SortType.ASCENDING);
this.store1.set_sort_column_id(5,Gtk.SortType.ASCENDING );
//this.store1.set_sort_column_id(5,Gtk.SortType.ASCENDING );

client.search_person_async(this.key1.text);
}
Expand Down
5 changes: 3 additions & 2 deletions client/ui.vala
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ static LoginDialog login1;
static AddUserDialog adduser1;
static MultiSendUi msend_ui;
static ChatClient client;
static int RELEASE=42;
static int LATESTVER=0;
static int RELEASE=43;
const string ver = "1.3.21"; //43

public struct UserMsg{
public int64 id;
Expand Down Expand Up @@ -1059,7 +1060,7 @@ public class AppWin:Gtk.ApplicationWindow{
act2.activate.connect (() => {
application1.hold ();
var dlg_about = new Gtk.MessageDialog(this, Gtk.DialogFlags.MODAL, Gtk.MessageType.INFO, Gtk.ButtonsType.OK,null);
dlg_about.text = _("Copy Right: Fu Huizhong <fuhuizn@163.com>");
dlg_about.text = _("Copy Right: Fu Huizhong <fuhuizn@163.com>") +"\n\n PowerChat "+ver;
//var markup = "<h2>Fu Huizhong <fuhuizn@163.com></h2><p><b>PC Homepage:</b><br/><a href='https://gitee.com/rocket049/powerchat'>https://gitee.com/rocket049/powerchat</a><br/><a href='https://github.com/rocket049/powerchat'>https://github.com/rocket049/powerchat</a><br/><b>Android Homepage:</b><br/><a href='https://gitee.com/sonichy/PowerChat_Android'>https://gitee.com/sonichy/PowerChat_Android</a></p>";
var markup = _("PC Homepage")+":\n<a href='https://gitee.com/rocket049/powerchat'>https://gitee.com/rocket049/powerchat</a>\n<a href='https://github.com/rocket049/powerchat'>https://github.com/rocket049/powerchat</a>\n"+_("Android Homepage")+":\n<a href='https://gitee.com/sonichy/PowerChat_Android'>https://gitee.com/sonichy/PowerChat_Android</a>";
//dlg_about.secondary_text = "Fu Huizhong <fuhuizn@163.com>";
Expand Down

0 comments on commit 1c1f796

Please sign in to comment.