diff --git a/ebin/gajumine.app b/ebin/gajumine.app index 1d00c44..64d46a3 100644 --- a/ebin/gajumine.app +++ b/ebin/gajumine.app @@ -3,6 +3,6 @@ {registered,[]}, {included_applications,[]}, {applications,[stdlib,kernel]}, - {vsn,"0.1.2"}, + {vsn,"0.1.3"}, {modules,[gajumine,gmc_con,gmc_gui,gmc_setup,gmc_sup]}, {mod,{gajumine,[]}}]}. diff --git a/src/gajumine.erl b/src/gajumine.erl index eea96d4..241f2d9 100644 --- a/src/gajumine.erl +++ b/src/gajumine.erl @@ -3,7 +3,7 @@ %%% @end -module(gajumine). --vsn("0.1.2"). +-vsn("0.1.3"). -behavior(application). -author("Craig Everett "). -copyright("Craig Everett "). diff --git a/src/gmc_con.erl b/src/gmc_con.erl index 91a76aa..cdfc09f 100644 --- a/src/gmc_con.erl +++ b/src/gmc_con.erl @@ -3,7 +3,7 @@ %%% @end -module(gmc_con). --vsn("0.1.2"). +-vsn("0.1.3"). -author("Craig Everett "). -copyright("Craig Everett "). -license("GPL-3.0-or-later"). @@ -396,8 +396,8 @@ optimize_count() -> M = list_to_integer(string:trim(os:cmd("cat /proc/meminfo | grep MemTotal | awk '{print $2}'"))) * 1024, {P, M}; {unix, darwin} -> - P = list_to_integer(os:cmd("sysctl -n hw.physicalcpu")), - M = list_to_integer(os:cmd("sysctl -n hw.memsize")), + P = list_to_integer(string:trim(os:cmd("sysctl -n hw.physicalcpu"))), + M = list_to_integer(string:trim(os:cmd("sysctl -n hw.memsize"))), {P, M}; {win32, nt} -> P = list_to_integer(os:getenv("NUMBER_OF_PROCESSORS")), diff --git a/src/gmc_gui.erl b/src/gmc_gui.erl index 6519980..107cd5e 100644 --- a/src/gmc_gui.erl +++ b/src/gmc_gui.erl @@ -3,7 +3,7 @@ %%% @end -module(gmc_gui). --vsn("0.1.2"). +-vsn("0.1.3"). -author("Craig Everett "). -copyright("Craig Everett "). -license("GPL-3.0-or-later"). @@ -34,6 +34,7 @@ candy = none :: none | wx:wx_object(), height = none :: none | wx:wx_object(), block = none :: none | wx:wx_object(), + % solved = 0 :: non_neg_integer(), % Add a widget to show this. Maybe mess = none :: none | wx:wx_object(), buff = new_buff() :: buff(), buttons = [] :: [#w{}]}). @@ -300,6 +301,9 @@ do_message({pool_notification, #{info := #{msg := MSG}}}, State = #s{height = He #{candidate := #{candidate := Candidate}} -> ok = wxStaticText:setLabel(CandT, Candidate), State; + #{solution_accepted := #{seq := Seq}} -> + Entry = io_lib:format("~nSolution Accepted! You solved one! Sequence: ~w", [Seq]), + do_message2(Entry, State); Other -> Entry = io_lib:format("~nUnexpected 'pool_notification': ~tp", [Other]), do_message2(Entry, State) @@ -339,6 +343,9 @@ add_message(Entry, Mess, Buff) -> {flush, Updated} -> String = unicode:characters_to_list(lists:reverse(element(5, Updated))), ok = wxTextCtrl:changeValue(Mess, String), + Last = wxTextCtrl:getLastPosition(Mess), + ok = wxTextCtrl:showPosition(Mess, Last), + ok = wxTextCtrl:thaw(Mess), Updated; {append, Updated} -> ok = wxTextCtrl:appendText(Mess, Entry), diff --git a/src/gmc_setup.erl b/src/gmc_setup.erl index d038255..eb4ffd8 100644 --- a/src/gmc_setup.erl +++ b/src/gmc_setup.erl @@ -12,7 +12,7 @@ %%% @end -module(gmc_setup). --vsn("0.1.2"). +-vsn("0.1.3"). -author("Craig Everett "). -copyright("Craig Everett "). -license("GPL-3.0-or-later"). diff --git a/src/gmc_sup.erl b/src/gmc_sup.erl index 2956686..fe8a60b 100644 --- a/src/gmc_sup.erl +++ b/src/gmc_sup.erl @@ -12,7 +12,7 @@ %%% @end -module(gmc_sup). --vsn("0.1.2"). +-vsn("0.1.3"). -behaviour(supervisor). -author("Craig Everett "). -copyright("Craig Everett "). diff --git a/zomp.meta b/zomp.meta index e16c61a..7020b14 100644 --- a/zomp.meta +++ b/zomp.meta @@ -4,7 +4,7 @@ {prefix,"gmc"}. {author,"Craig Everett"}. {desc,"Mining client for the Gajumaru Root"}. -{package_id,{"qpq","gajumine",{0,1,2}}}. +{package_id,{"qpq","gajumine",{0,1,3}}}. {deps,[{"uwiger","gmconfig",{0,1,2}}, {"uwiger","gproc",{1,0,1}}, {"uwiger","gmhive_client",{0,2,1}},