v1.2.4: Fixed key_submit not properly working with multi-action entires
This commit is contained in:
parent
39e038b900
commit
20aef29dc5
@ -1,4 +1,4 @@
|
|||||||
project('wofi', 'c', version : 'v1.2.2', default_options : ['c_std=c99', 'buildtype=release', 'warning_level=2'])
|
project('wofi', 'c', version : 'v1.2.4', default_options : ['c_std=c99', 'buildtype=release', 'warning_level=2'])
|
||||||
cc = meson.get_compiler('c')
|
cc = meson.get_compiler('c')
|
||||||
|
|
||||||
pkgcfg = import('pkgconfig')
|
pkgcfg = import('pkgconfig')
|
||||||
|
16
src/wofi.c
16
src/wofi.c
@ -1294,9 +1294,19 @@ static gboolean key_press(GtkWidget* widget, GdkEvent* event, gpointer data) {
|
|||||||
GList* children = gtk_flow_box_get_selected_children(GTK_FLOW_BOX(inner_box));
|
GList* children = gtk_flow_box_get_selected_children(GTK_FLOW_BOX(inner_box));
|
||||||
if(gtk_widget_has_focus(entry)) {
|
if(gtk_widget_has_focus(entry)) {
|
||||||
g_signal_emit_by_name(entry, "activate", entry, NULL);
|
g_signal_emit_by_name(entry, "activate", entry, NULL);
|
||||||
} else if(gtk_widget_has_focus(inner_box) || (children->data != NULL && gtk_widget_has_focus(children->data))) {
|
} else if(gtk_widget_has_focus(inner_box) || children->data != NULL) {
|
||||||
if(children->data != NULL) {
|
gpointer obj = children->data;
|
||||||
g_signal_emit_by_name(children->data, "activate", children->data, NULL);
|
|
||||||
|
if(obj != NULL) {
|
||||||
|
GtkWidget* exp = gtk_bin_get_child(GTK_BIN(obj));
|
||||||
|
if(GTK_IS_EXPANDER(exp)) {
|
||||||
|
GtkWidget* box = gtk_bin_get_child(GTK_BIN(exp));
|
||||||
|
GtkListBoxRow* row = gtk_list_box_get_selected_row(GTK_LIST_BOX(box));
|
||||||
|
if(row != NULL) {
|
||||||
|
obj = row;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
g_signal_emit_by_name(obj, "activate", obj, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
g_list_free(children);
|
g_list_free(children);
|
||||||
|
Loading…
Reference in New Issue
Block a user