Commit 836b00b0 authored by Sebastian Ramacher's avatar Sebastian Ramacher

Move update_state_by_keyval

parent 0f3e0ccf
......@@ -48,8 +48,6 @@ HIDDEN void girara_mouse_event_free(girara_mouse_event_t* mouse_event);
HIDDEN void girara_config_load_default(girara_session_t* session);
HIDDEN void update_state_by_keyval(int *state, int keyval);
HIDDEN void widget_add_class(GtkWidget* widget, const char* styleclass);
HIDDEN void widget_remove_class(GtkWidget* widget, const char* styleclass);
......
......@@ -498,6 +498,22 @@ simulate_key_press(girara_session_t* session, int state, int key)
return true;
}
static void
update_state_by_keyval(int *state, int keyval)
{
if (state == NULL) {
return;
}
if ((keyval >= '!' && keyval <= '/')
|| (keyval >= ':' && keyval <= '@')
|| (keyval >= '[' && keyval <= '`')
|| (keyval >= '{' && keyval <= '~')
) {
*state |= GDK_SHIFT_MASK;
}
}
bool
girara_sc_feedkeys(girara_session_t* session, girara_argument_t* argument,
girara_event_t* UNUSED(event), unsigned int t)
......
......@@ -363,22 +363,6 @@ error_free:
return NULL;
}
void
update_state_by_keyval(int *state, int keyval)
{
if (state == NULL) {
return;
}
if ((keyval >= '!' && keyval <= '/')
|| (keyval >= ':' && keyval <= '@')
|| (keyval >= '[' && keyval <= '`')
|| (keyval >= '{' && keyval <= '~')
) {
*state |= GDK_SHIFT_MASK;
}
}
char*
girara_escape_string(const char* value)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment