summaryrefslogtreecommitdiff
path: root/src/deamon.vala
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2015-05-03 07:25:37 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2015-05-03 07:25:37 +0200
commita1c05d93bbb3c1bdb0c0fed9d7110804037cfd55 (patch)
treecb97ed3768912934cfc0e817beca620200d91993 /src/deamon.vala
parent5478fe2ceb86715f4ab9a51eb97c517465febfa6 (diff)
Imported Upstream version 0.6.2upstream/0.6.2
Diffstat (limited to 'src/deamon.vala')
-rw-r--r--src/deamon.vala45
1 files changed, 28 insertions, 17 deletions
diff --git a/src/deamon.vala b/src/deamon.vala
index ff7e764..a35e666 100644
--- a/src/deamon.vala
+++ b/src/deamon.vala
@@ -32,11 +32,18 @@ public class Deamon : GLib.Object {
public static string version;
/////////////////////////////////////////////////////////////////////
+ /// Varaibles set by the commend line parser.
+ /////////////////////////////////////////////////////////////////////
+
+ public static bool header_bar = false;
+ public static bool stack_switcher = false;
+
+ /////////////////////////////////////////////////////////////////////
/// The beginning of everything.
/////////////////////////////////////////////////////////////////////
public static int main(string[] args) {
- version = "0.6.1";
+ version = "0.6.2";
Logger.init();
Gtk.init(ref args);
@@ -71,6 +78,10 @@ public class Deamon : GLib.Object {
"Open the Pie with the given ID", "ID" },
{ "reset", 'r', 0, GLib.OptionArg.NONE, out reset,
"Reset all options to default values" },
+ { "header-bar", 'b', 0, GLib.OptionArg.NONE, out header_bar,
+ "Uses the new GTK.HeaderBar" },
+ { "stack-switcher", 's', 0, GLib.OptionArg.NONE, out stack_switcher,
+ "Uses the new GTK.StackSwitcher" },
{ null }
};
@@ -102,24 +113,25 @@ public class Deamon : GLib.Object {
Intl.bindtextdomain ("gnomepie", Paths.locales);
Intl.textdomain ("gnomepie");
- // init toolkits and static stuff
- ActionRegistry.init();
- GroupRegistry.init();
+ if (handle_command_line(args, false)) {
+
+ // init toolkits and static stuff
+ ActionRegistry.init();
+ GroupRegistry.init();
- PieManager.init();
- Icon.init();
+ PieManager.init();
+ Icon.init();
- // launch the indicator
- this.indicator = new Indicator();
+ // launch the indicator
+ this.indicator = new Indicator();
- // connect SigHandlers
- Posix.signal(Posix.SIGINT, sig_handler);
- Posix.signal(Posix.SIGTERM, sig_handler);
+ // connect SigHandlers
+ Posix.signal(Posix.SIGINT, sig_handler);
+ Posix.signal(Posix.SIGTERM, sig_handler);
- // finished loading... so run the prog!
- message("Started happily...");
+ // finished loading... so run the prog!
+ message("Started happily...");
- if (handle_command_line(args, false)) {
Gtk.main();
}
});
@@ -143,10 +155,9 @@ public class Deamon : GLib.Object {
private bool handle_command_line(string[] args, bool show_preferences) {
// create command line options
- var context = new GLib.OptionContext("");
- context.set_help_enabled(true);
+ var context = new GLib.OptionContext(" - the pie menu for linux");
context.add_main_entries(options, null);
- context.add_group(Gtk.get_option_group (false));
+ context.add_group(Gtk.get_option_group(false));
try {
context.parse(ref args);