mirror of
https://github.com/lbonn/rofi
synced 2025-02-17 05:18:31 +00:00
[Dmenu] Small fix that disabled async mode when multi-select is enabled.
This commit is contained in:
parent
caa92637f1
commit
ab1dfe7f61
1 changed files with 6 additions and 4 deletions
|
@ -514,6 +514,7 @@ static int dmenu_mode_init(Mode *sw) {
|
|||
DmenuModePrivateData *pd = (DmenuModePrivateData *)mode_get_private_data(sw);
|
||||
|
||||
pd->async = TRUE;
|
||||
pd->multi_select = FALSE;
|
||||
|
||||
// For now these only work in sync mode.
|
||||
if (find_arg("-sync") >= 0 || find_arg("-dump") >= 0 ||
|
||||
|
@ -522,6 +523,10 @@ static int dmenu_mode_init(Mode *sw) {
|
|||
find_arg("-selected-row") >= 0) {
|
||||
pd->async = FALSE;
|
||||
}
|
||||
if ( find_arg("-multi-select") >= 0 ) {
|
||||
pd->multi_select = TRUE;
|
||||
pd->async = FALSE;
|
||||
}
|
||||
|
||||
pd->separator = '\n';
|
||||
pd->selected_line = UINT32_MAX;
|
||||
|
@ -907,14 +912,11 @@ int dmenu_mode_dialog(void) {
|
|||
DmenuScriptEntry *cmd_list = pd->cmd_list;
|
||||
|
||||
pd->only_selected = FALSE;
|
||||
pd->multi_select = FALSE;
|
||||
pd->ballot_selected = "☑ ";
|
||||
pd->ballot_unselected = "☐ ";
|
||||
find_arg_str("-ballot-selected-str", &(pd->ballot_selected));
|
||||
find_arg_str("-ballot-unselected-str", &(pd->ballot_unselected));
|
||||
if (find_arg("-multi-select") >= 0) {
|
||||
pd->multi_select = TRUE;
|
||||
}
|
||||
|
||||
if (find_arg("-markup-rows") >= 0) {
|
||||
pd->do_markup = TRUE;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue