summaryrefslogtreecommitdiff
path: root/src/argv.cpp
diff options
context:
space:
mode:
authorinfirit <[email protected]>2014-12-18 21:45:30 +0100
committerinfirit <[email protected]>2014-12-18 21:45:30 +0100
commit120ef9172463db2778b4790baa8ba7ae650aa247 (patch)
tree0db727e3e8cd174980292e53c0ab302ace641fac /src/argv.cpp
parente11a700443d383ab35b84995962dfbe06c056063 (diff)
downloadmate-system-monitor-120ef9172463db2778b4790baa8ba7ae650aa247.tar.bz2
mate-system-monitor-120ef9172463db2778b4790baa8ba7ae650aa247.tar.xz
Add command line flags for each tab to display it on startup
Taken from GSM commit: fdc3dac969e9961fd0ae525595534b25b7920e8b From: Robert Roth <[email protected]> Gnome bug: https://bugzilla.gnome.org/show_bug.cgi?id=629571
Diffstat (limited to 'src/argv.cpp')
-rw-r--r--src/argv.cpp24
1 files changed, 23 insertions, 1 deletions
diff --git a/src/argv.cpp b/src/argv.cpp
index f1a3a86..42e8d70 100644
--- a/src/argv.cpp
+++ b/src/argv.cpp
@@ -10,13 +10,35 @@ namespace procman
{
OptionGroup::OptionGroup()
: Glib::OptionGroup("", ""),
- show_system_tab(false)
+ show_system_tab(false),
+ show_processes_tab(false),
+ show_resources_tab(false),
+ show_file_systems_tab(false)
{
Glib::OptionEntry sys_tab;
sys_tab.set_long_name("show-system-tab");
sys_tab.set_short_name('s');
sys_tab.set_description(_("Show the System tab"));
+
+ Glib::OptionEntry proc_tab;
+ proc_tab.set_long_name("show-processes-tab");
+ proc_tab.set_short_name('p');
+ proc_tab.set_description(_("Show the Processes tab"));
+
+ Glib::OptionEntry res_tab;
+ res_tab.set_long_name("show-resources-tab");
+ res_tab.set_short_name('r');
+ res_tab.set_description(_("Show the Resources tab"));
+
+ Glib::OptionEntry fs_tab;
+ fs_tab.set_long_name("show-file-systems-tab");
+ fs_tab.set_short_name('f');
+ fs_tab.set_description(_("Show the File Systems tab"));
+
this->add_entry(sys_tab, this->show_system_tab);
+ this->add_entry(proc_tab, this->show_processes_tab);
+ this->add_entry(res_tab, this->show_resources_tab);
+ this->add_entry(fs_tab, this->show_file_systems_tab);
}
}