hm..
This commit is contained in:
parent
b32181ac69
commit
007a84323f
1 changed files with 8 additions and 1 deletions
|
@ -14,6 +14,8 @@ typedef struct {
|
||||||
GSList *actions;
|
GSList *actions;
|
||||||
} Options;
|
} Options;
|
||||||
|
|
||||||
|
static gboolean cycling = FALSE;
|
||||||
|
|
||||||
static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
|
static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
|
||||||
static void free_func(gpointer options);
|
static void free_func(gpointer options);
|
||||||
static gboolean run_func(ObActionsData *data, gpointer options);
|
static gboolean run_func(ObActionsData *data, gpointer options);
|
||||||
|
@ -92,6 +94,7 @@ static gboolean run_func(ObActionsData *data, gpointer options)
|
||||||
TRUE,
|
TRUE,
|
||||||
o->dialog,
|
o->dialog,
|
||||||
FALSE, FALSE);
|
FALSE, FALSE);
|
||||||
|
cycling = TRUE;
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -129,6 +132,9 @@ static gboolean i_input_func(guint initial_state,
|
||||||
|
|
||||||
static void i_cancel_func(gpointer options)
|
static void i_cancel_func(gpointer options)
|
||||||
{
|
{
|
||||||
|
/* we get cancelled when we move focus, but we're not cycling anymore, so
|
||||||
|
just ignore that */
|
||||||
|
if (cycling)
|
||||||
end_cycle(TRUE, 0, options);
|
end_cycle(TRUE, 0, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -149,4 +155,5 @@ static void end_cycle(gboolean cancel, guint state, Options *o)
|
||||||
actions_run_acts(o->actions, OB_USER_ACTION_KEYBOARD_KEY,
|
actions_run_acts(o->actions, OB_USER_ACTION_KEYBOARD_KEY,
|
||||||
state, -1, -1, 0, OB_FRAME_CONTEXT_NONE, ft);
|
state, -1, -1, 0, OB_FRAME_CONTEXT_NONE, ft);
|
||||||
}
|
}
|
||||||
|
cycling = FALSE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue