Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037 #include "config.h"
00038 #include "rec_param_dlg.hh"
00039 #include "unistd.h"
00040 #include <gtkmm/messagedialog.h>
00041 #include <gtkmm/filechooserdialog.h>
00042 #include <gtkmm/stock.h>
00043 void rec_param_dlg::on_sim_rb_clicked(){
00044 ok_btn->set_sensitive(true);
00045 if (marte_rb->get_active()){
00046 int id=getuid();
00047 if (id!=0){
00048 ok_btn->set_sensitive(false);
00049 Gtk::MessageDialog dialog(*this, "wmpSniffer v0.1b");
00050 dialog.set_secondary_text("Root Privileges are needed to use MaRTE Monitor");
00051 dialog.run();
00052 }
00053 }
00054 }
00055
00056 void rec_param_dlg::on_button24_clicked(){
00057 Gtk::FileChooserDialog dialog("Please choose a folder",
00058 Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER);
00059 dialog.set_transient_for(*this);
00060
00061
00062 dialog.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
00063 dialog.add_button(Gtk::Stock::OK, Gtk::RESPONSE_OK);
00064
00065 int result = dialog.run();
00066 switch (result) {
00067 case (Gtk::RESPONSE_OK): {
00068 break;
00069 }
00070 case (Gtk::RESPONSE_CANCEL): {
00071
00072 return;
00073 break;
00074 }
00075 default: {
00076
00077 break;
00078 }
00079 }
00080 }
00081
00082 void rec_param_dlg::on_shmem_btn_clicked(){
00083 Gtk::FileChooserDialog dialog("Please choose an executable",
00084 Gtk::FILE_CHOOSER_ACTION_OPEN);
00085 dialog.set_transient_for(*this);
00086
00087
00088 dialog.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
00089 dialog.add_button(Gtk::Stock::OK, Gtk::RESPONSE_OK);
00090
00091 int result = dialog.run();
00092 switch (result) {
00093 case (Gtk::RESPONSE_OK): {
00094 break;
00095 }
00096 case (Gtk::RESPONSE_CANCEL): {
00097 return;
00098 break;
00099 }
00100 default: {
00101
00102 break;
00103 }
00104 }
00105 shmem_file->set_text(dialog.get_filename());
00106 }
00107
00108 #include <vte-0.0/vte/vte.h>
00109 #include "icon.h"
00110
00111 rec_param_dlg::rec_param_dlg() : rec_param_dlg_glade(){
00112 set_icon(Gdk::Pixbuf::create_from_xpm_data(icon));
00113 frame13->hide();
00114 set_size_request(400,200);
00115 }
00116 void rec_param_dlg::on_filename_clicked(){
00117 Gtk::FileChooserDialog dialog("Please choose a Filename",
00118 Gtk::FILE_CHOOSER_ACTION_SAVE);
00119 dialog.set_transient_for(*this);
00120 dialog.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
00121 dialog.add_button(Gtk::Stock::OK, Gtk::RESPONSE_OK);
00122 dialog.run();
00123 filename_txt->set_text(dialog.get_filename());
00124 }