mirror of https://github.com/daleclack/My_GtkUi
Update Runner
This commit is contained in:
parent
3fb2582ac5
commit
1e89576b8e
|
@ -74,6 +74,7 @@
|
|||
"typeindex": "cpp",
|
||||
"typeinfo": "cpp",
|
||||
"valarray": "cpp",
|
||||
"variant": "cpp"
|
||||
"variant": "cpp",
|
||||
"charconv": "cpp"
|
||||
}
|
||||
}
|
|
@ -7,7 +7,7 @@ hbox(Gtk::ORIENTATION_HORIZONTAL,5),
|
|||
open_btn("...")
|
||||
{
|
||||
//Ininalize window
|
||||
set_title("Run a Application");
|
||||
set_title("Run a Command");
|
||||
set_icon_name("myrunner");
|
||||
set_default_size(300,150);
|
||||
add_button("OK",Gtk::RESPONSE_OK);
|
||||
|
@ -36,7 +36,7 @@ open_btn("...")
|
|||
void GtkRunner::on_response(int response_id){
|
||||
if(response_id==Gtk::RESPONSE_OK){
|
||||
//Start The Application
|
||||
Glib::ustring program=app_entry.get_text();
|
||||
std::string program=app_entry.get_text();
|
||||
std::thread first(system,program.c_str());
|
||||
first.detach();
|
||||
}
|
||||
|
@ -65,7 +65,8 @@ void GtkRunner::file_dialog(){
|
|||
void GtkRunner::dialog_response(int response){
|
||||
if(response==Gtk::RESPONSE_ACCEPT){
|
||||
Glib::ustring filename=dialog->get_filename();
|
||||
app_entry.set_text(filename);
|
||||
Glib::ustring text = Glib::filename_to_utf8(filename);
|
||||
app_entry.set_text(text);
|
||||
}
|
||||
dialog.reset();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue