C++ in ubuntu pop up message via notify-send command . zenity command

void Util::threadLambda170(int x, int y)
{
    thread t1([](int x, int y)
              {
        auto result=pow(x,y);
        cout<<fixed<<"Pow="<<result<<endl; },
              x, y);
    t1.join();
   
    string str("/usr/bin/notify-send \"Finished in void Util::threadLambda170(int x,int y) \" ");
    str.append(getTimeNow35());
    system(str.c_str());
}

 

void Util::threadLambda170(int x, int y)
{
    thread t1([](int x, int y)
              {
        auto result=pow(x,y);
        cout<<fixed<<"Pow="<<result<<endl; },
              x, y);
    t1.join();
     
    string str;
    str.append("zenity --info --text=");
    str.append("\"Finished in void Util::threadLambda170(int x,int y)\n\"");
    str.append(getTimeNow35());
    int cmdResult = system(str.c_str());
    cout<<"cmdResult="<<cmdResult<<",in "<<__LINE__<<endl;    
}

 

 

 

 

 

 

 

 

 

 

void Util::notifysend172()
{
    string str;
    str.append("notify-send ");
    str.append("\"In void Util::notifysend172() \"");
    str.append(" \"Now is \"");
    str.append(getTimeNow35());
    system(str.c_str());
}

 

posted @ 2022-03-16 13:23  FredGrit  阅读(43)  评论(0编辑  收藏  举报