Skip to content

Commit

Permalink
Add option to start easystroke disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
thjaeger committed Aug 10, 2011
1 parent 48a8d26 commit c1ba1a7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
1 change: 0 additions & 1 deletion grabber.cc
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,6 @@ Grabber::Grabber() : children(ROOT) {
current = BUTTON;
suspended = 0;
suspend();
disabled = false;
active = true;
grabbed = NONE;
xi_grabbed = false;
Expand Down
8 changes: 6 additions & 2 deletions main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1240,6 +1240,7 @@ void Main::usage(char *me, bool good) {
printf(" -D --no-dbus Don't try to register as a DBus service\n");
printf(" -e --experimental Start in experimental mode\n");
printf(" -g, --show-gui Show the configuration dialog on startup\n");
printf(" -x --disable Start disabled\n");
printf(" -v, --verbose Increase verbosity level\n");
printf(" -h, --help Display this help and exit\n");
printf(" --version Output version information and exit\n");
Expand All @@ -1260,7 +1261,6 @@ std::string Main::parse_args_and_init_gtk() {
{"help",0,0,'h'},
{"version",0,0,'V'},
{"show-gui",0,0,'g'},
{"no-dbus",0,0,'D'},
{0,0,0,0}
};
static struct option long_opts2[] = {
Expand All @@ -1270,6 +1270,7 @@ std::string Main::parse_args_and_init_gtk() {
{"show-gui",0,0,'g'},
{"verbose",0,0,'v'},
{"no-dbus",0,0,'D'},
{"disabled",0,0,'x'},
{0,0,0,0}
};
std::string display;
Expand Down Expand Up @@ -1297,7 +1298,7 @@ std::string Main::parse_args_and_init_gtk() {
oldHandler = XSetErrorHandler(xErrorHandler);
oldIOHandler = XSetIOErrorHandler(xIOErrorHandler);

while ((opt = getopt_long(argc, argv, "c:egvD", long_opts2, 0)) != -1) {
while ((opt = getopt_long(argc, argv, "c:egvDx", long_opts2, 0)) != -1) {
switch (opt) {
case 'c':
config_dir = optarg;
Expand All @@ -1311,6 +1312,9 @@ std::string Main::parse_args_and_init_gtk() {
case 'D':
no_dbus = true;
break;
case 'x':
disabled.set(true);
break;
case 'd':
case 'n':
case 'g':
Expand Down
2 changes: 1 addition & 1 deletion win.cc
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ Glib::RefPtr<Gdk::Pixbuf> Stroke::drawEmpty_(int size) {
return pb;
}

Source<bool> disabled;
Source<bool> disabled(false);

class MenuCheck : private Base {
IO<bool> &io;
Expand Down

0 comments on commit c1ba1a7

Please sign in to comment.