1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2024-11-25 13:55:34 -05:00

Cleanups.

This commit is contained in:
Dave Davenport 2016-02-19 21:16:35 +01:00
parent 038346b640
commit 9121732e36
4 changed files with 11 additions and 18 deletions

View file

@ -44,9 +44,6 @@
// We limit at 1000000 rows for now.
#define DMENU_MAX_ROWS 1000000
// TODO HACK TO BE REMOVED
extern Display *display;
struct range_pair
{
unsigned int start;
@ -378,7 +375,7 @@ static void dmenu_finish ( RofiViewState *state, int retv)
static void dmenu_finalize ( RofiViewState *state )
{
int retv = FALSE;
DmenuModePrivateData *pd = (DmenuModePrivateData *) (Mode *) ( rofi_view_get_mode ( state ) )->private_data;
DmenuModePrivateData *pd = (DmenuModePrivateData *) rofi_view_get_mode ( state )->private_data;
unsigned int cmd_list_length = pd->cmd_list_length;
char **cmd_list = pd->cmd_list;
@ -389,7 +386,6 @@ static void dmenu_finalize ( RofiViewState *state )
int restart = 0;
// Special behavior.
// TODO clean this up!
if ( pd->only_selected ) {
/**
* Select item mode.
@ -539,8 +535,10 @@ int dmenu_switcher_dialog ( void )
g_strfreev ( tokens );
return TRUE;
}
// TODO remove
RofiViewState *state = rofi_view_create ( &dmenu_mode, input, pd->prompt, pd->message, menu_flags, dmenu_finalize );
RofiViewState *state = rofi_view_create (
&dmenu_mode, input,
pd->prompt, pd->message,
menu_flags, dmenu_finalize );
rofi_view_set_selected_line ( state, pd->selected_line );
rofi_view_set_active ( state );

View file

@ -270,9 +270,6 @@ int show_error_message ( const char *msg, int markup )
return EXIT_FAILURE;
}
rofi_view_error_dialog ( msg, markup );
//teardown ( pfd );
// TODO this looks incorrect.
// g_main_loop_quit ( main_loop );
return EXIT_SUCCESS;
}

View file

@ -1665,7 +1665,6 @@ void rofi_view_error_dialog ( const char *msg, int markup )
state->update = TRUE;
state->border = config.padding + config.menu_bw;
state->x11_event_loop = __error_dialog_event_loop;
// TODO fix
state->finalize = process_result_error;
// Try to grab the keyboard as early as possible.

View file

@ -509,7 +509,6 @@ void x11_parse_key ( char *combo, unsigned int *mod, KeySym *key )
KeySym sym = XStringToKeysym ( combo + i );
if ( sym == NoSymbol || ( !modmask && ( strchr ( combo, '-' ) || strchr ( combo, '+' ) ) ) ) {
// TODO popup
g_string_append_printf ( str, "Sorry, rofi cannot understand the key combination: <i>%s</i>\n", combo );
g_string_append ( str, "\nRofi supports the following modifiers:\n\t" );
g_string_append ( str, "<i>Shift,Control,Alt,AltGR,SuperL,SuperR," );