Added the use_search_box option
This commit is contained in:
parent
c7207c4d25
commit
3f132616fe
@ -195,6 +195,9 @@ Specifies whether or not actions should be executed on a single click or a doubl
|
|||||||
.TP
|
.TP
|
||||||
.B pre_display_exec=\fIBOOL\fR
|
.B pre_display_exec=\fIBOOL\fR
|
||||||
This modifies the behavior of pre_display_cmd and causes the command in question to be directly executed via fork/exec rather than through the shell.
|
This modifies the behavior of pre_display_cmd and causes the command in question to be directly executed via fork/exec rather than through the shell.
|
||||||
|
.TP
|
||||||
|
.B use_search_box=\fIBOOL\fR
|
||||||
|
Specifies whether or not wofi should use a GtkSearchEntry or a regular GtkEntry. The search entry has a little search icon and a clear text button that the regular entry lacks. Default is true
|
||||||
|
|
||||||
.SH CSS SELECTORS
|
.SH CSS SELECTORS
|
||||||
Any GTK widget can be selected by using the name of its CSS node, these however might change with updates and are not guaranteed to stay constant. Wofi also provides certain widgets with names and classes which can be referenced from CSS to give access to the most important widgets easily. \fBwofi\fR(7) contains the current widget layout used by wofi so if you want to get into CSS directly using GTK widget names look there for info.
|
Any GTK widget can be selected by using the name of its CSS node, these however might change with updates and are not guaranteed to stay constant. Wofi also provides certain widgets with names and classes which can be referenced from CSS to give access to the most important widgets easily. \fBwofi\fR(7) contains the current widget layout used by wofi so if you want to get into CSS directly using GTK widget names look there for info.
|
||||||
|
@ -2013,7 +2013,14 @@ void wofi_init(struct map* _config) {
|
|||||||
outer_box = gtk_box_new(outer_orientation, 0);
|
outer_box = gtk_box_new(outer_orientation, 0);
|
||||||
gtk_widget_set_name(outer_box, "outer-box");
|
gtk_widget_set_name(outer_box, "outer-box");
|
||||||
gtk_container_add(GTK_CONTAINER(window), outer_box);
|
gtk_container_add(GTK_CONTAINER(window), outer_box);
|
||||||
|
|
||||||
|
bool use_search_box = strcmp(config_get(config, "use_search_box", "true"), "true") == 0;
|
||||||
|
if(use_search_box) {
|
||||||
entry = gtk_search_entry_new();
|
entry = gtk_search_entry_new();
|
||||||
|
} else {
|
||||||
|
entry = gtk_entry_new();
|
||||||
|
}
|
||||||
|
|
||||||
g_signal_connect(entry, "size-allocate", G_CALLBACK(widget_allocate), NULL);
|
g_signal_connect(entry, "size-allocate", G_CALLBACK(widget_allocate), NULL);
|
||||||
|
|
||||||
gtk_widget_set_name(entry, "input");
|
gtk_widget_set_name(entry, "input");
|
||||||
|
Loading…
Reference in New Issue
Block a user