From 2464e593300f677ed5dc953a36f25b84edfd07ae Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Fri, 13 Jul 2007 16:39:27 -0400 Subject: [PATCH] rename switchtodesktop to gotodesktop. make stuff compile as well. --- Makefile.am | 1 - openbox/actions/all.c | 1 - openbox/actions/all.h | 1 - openbox/actions/desktop.c | 19 +++++++++++-------- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Makefile.am b/Makefile.am index 61cb6bbb..0c5d7cc8 100644 --- a/Makefile.am +++ b/Makefile.am @@ -159,7 +159,6 @@ openbox_openbox_SOURCES = \ openbox/actions/desktop.c \ openbox/actions/dockautohide.c \ openbox/actions/directionalcyclewindows.c \ - openbox/actions/directionaldesktop.c \ openbox/actions/directionaltargetwindow.c \ openbox/actions/execute.c \ openbox/actions/exit.c \ diff --git a/openbox/actions/all.c b/openbox/actions/all.c index a80443bf..c4d7982c 100644 --- a/openbox/actions/all.c +++ b/openbox/actions/all.c @@ -31,7 +31,6 @@ void action_all_startup() action_resize_startup(); action_decorations_startup(); action_desktop_startup(); - action_directionaldesktop_startup(); action_resizerelative_startup(); action_addremovedesktop_startup(); action_dockautohide_startup(); diff --git a/openbox/actions/all.h b/openbox/actions/all.h index 17b4fe3b..5ab6f366 100644 --- a/openbox/actions/all.h +++ b/openbox/actions/all.h @@ -32,7 +32,6 @@ void action_directionaltargetwindow_startup(); void action_resize_startup(); void action_decorations_startup(); void action_desktop_startup(); -void action_directionaldesktop_startup(); void action_resizerelative_startup(); void action_addremovedesktop_startup(); void action_dockautohide_startup(); diff --git a/openbox/actions/desktop.c b/openbox/actions/desktop.c index 3132a4fc..0e9ad739 100644 --- a/openbox/actions/desktop.c +++ b/openbox/actions/desktop.c @@ -21,12 +21,12 @@ typedef struct { gboolean wrap; ObDirection dir; } rel; - } + }; gboolean send; gboolean follow; } Options; -static gpointer setup_switch_func(ObParseInst *i, xmlDocPtr doc, +static gpointer setup_go_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node); static gpointer setup_send_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node); @@ -34,13 +34,13 @@ static gboolean run_func(ObActionsData *data, gpointer options); void action_desktop_startup() { - actions_register("SwitchToDesktop", setup_switch_func, g_free, run_func, + actions_register("GoToDesktop", setup_go_func, g_free, run_func, NULL, NULL); actions_register("SendToDesktop", setup_send_func, g_free, run_func, NULL, NULL); } -static gpointer setup_switch_func(ObParseInst *i, xmlDocPtr doc, +static gpointer setup_go_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node) { xmlNodePtr n; @@ -104,7 +104,10 @@ static gpointer setup_switch_func(ObParseInst *i, xmlDocPtr doc, static gpointer setup_send_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node) { - Options *o = setup_switch_func(i, doc, node); + xmlNodePtr n; + Options *o; + + o = setup_go_func(i, doc, node); o->send = TRUE; o->follow = TRUE; @@ -130,9 +133,9 @@ static gboolean run_func(ObActionsData *data, gpointer options) d = o->abs.desktop; break; case RELATIVE: - d = screen_cycle_desktop(o->abs.dir, - o->abs.wrap, - o->abs.linear, + d = screen_cycle_desktop(o->rel.dir, + o->rel.wrap, + o->rel.linear, FALSE, TRUE, FALSE); break; } -- 2.45.2