mirror of
https://github.com/davatorium/rofi.git
synced 2025-07-31 21:59:25 -04:00
Indenting.
This commit is contained in:
parent
5259eb11bc
commit
8c345273ff
3 changed files with 27 additions and 27 deletions
|
@ -142,6 +142,6 @@ char ** config_parser_return_display_help ( unsigned int *length );
|
||||||
*
|
*
|
||||||
* @param p Property to set
|
* @param p Property to set
|
||||||
*/
|
*/
|
||||||
void config_parse_set_property ( const Property *p);
|
void config_parse_set_property ( const Property *p );
|
||||||
/* @}*/
|
/* @}*/
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1051,7 +1051,7 @@ int main ( int argc, char *argv[] )
|
||||||
config_parse_xresource_options ( xcb );
|
config_parse_xresource_options ( xcb );
|
||||||
config_parse_xresource_options_file ( config_path );
|
config_parse_xresource_options_file ( config_path );
|
||||||
|
|
||||||
find_arg_str ( "-theme", &(config.theme));
|
find_arg_str ( "-theme", &( config.theme ) );
|
||||||
if ( config.theme ) {
|
if ( config.theme ) {
|
||||||
TICK_N ( "Parse theme" );
|
TICK_N ( "Parse theme" );
|
||||||
if ( rofi_theme_parse_file ( config.theme ) ) {
|
if ( rofi_theme_parse_file ( config.theme ) ) {
|
||||||
|
@ -1072,7 +1072,6 @@ int main ( int argc, char *argv[] )
|
||||||
TICK_N ( "Setup Modi" );
|
TICK_N ( "Setup Modi" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const char ** theme_str = find_arg_strv ( "-theme-str" );
|
const char ** theme_str = find_arg_strv ( "-theme-str" );
|
||||||
if ( theme_str ) {
|
if ( theme_str ) {
|
||||||
for ( int index = 0; theme_str && theme_str[index]; index++ ) {
|
for ( int index = 0; theme_str && theme_str[index]; index++ ) {
|
||||||
|
|
|
@ -387,10 +387,9 @@ void config_parse_cmd_options ( void )
|
||||||
|
|
||||||
static void __config_parser_set_property ( XrmOption *option, const Property *p )
|
static void __config_parser_set_property ( XrmOption *option, const Property *p )
|
||||||
{
|
{
|
||||||
if ( option->type == xrm_String )
|
if ( option->type == xrm_String ) {
|
||||||
{
|
|
||||||
if ( p->type != P_STRING ) {
|
if ( p->type != P_STRING ) {
|
||||||
fprintf(stderr, "Option: %s needs to be set with a string.\n", option->name);
|
fprintf ( stderr, "Option: %s needs to be set with a string.\n", option->name );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ( ( option )->mem != NULL ) {
|
if ( ( option )->mem != NULL ) {
|
||||||
|
@ -401,46 +400,48 @@ static void __config_parser_set_property ( XrmOption *option, const Property *p
|
||||||
|
|
||||||
// Memory
|
// Memory
|
||||||
( option )->mem = *( option->value.str );
|
( option )->mem = *( option->value.str );
|
||||||
option->source = CONFIG_FILE_THEME;
|
option->source = CONFIG_FILE_THEME;
|
||||||
} else if ( option->type == xrm_Number ) {
|
}
|
||||||
if ( p->type != P_INTEGER ){
|
else if ( option->type == xrm_Number ) {
|
||||||
fprintf(stderr, "Option: %s needs to be set with a number.\n", option->name);
|
if ( p->type != P_INTEGER ) {
|
||||||
|
fprintf ( stderr, "Option: %s needs to be set with a number.\n", option->name );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
*(option->value.snum) = p->value.i;
|
*( option->value.snum ) = p->value.i;
|
||||||
option->source = CONFIG_FILE_THEME;
|
option->source = CONFIG_FILE_THEME;
|
||||||
} else if ( option->type == xrm_SNumber ) {
|
}
|
||||||
if ( p->type != P_INTEGER ){
|
else if ( option->type == xrm_SNumber ) {
|
||||||
fprintf(stderr, "Option: %s needs to be set with a number.\n", option->name);
|
if ( p->type != P_INTEGER ) {
|
||||||
|
fprintf ( stderr, "Option: %s needs to be set with a number.\n", option->name );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
*(option->value.num) = (unsigned int )(p->value.i);
|
*( option->value.num ) = (unsigned int ) ( p->value.i );
|
||||||
option->source = CONFIG_FILE_THEME;
|
option->source = CONFIG_FILE_THEME;
|
||||||
} else if ( option->type == xrm_Boolean ) {
|
}
|
||||||
if ( p->type != P_BOOLEAN ){
|
else if ( option->type == xrm_Boolean ) {
|
||||||
fprintf(stderr, "Option: %s needs to be set with a boolean.\n", option->name);
|
if ( p->type != P_BOOLEAN ) {
|
||||||
|
fprintf ( stderr, "Option: %s needs to be set with a boolean.\n", option->name );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
*(option->value.num) = (p->value.b);
|
*( option->value.num ) = ( p->value.b );
|
||||||
option->source = CONFIG_FILE_THEME;
|
option->source = CONFIG_FILE_THEME;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void config_parse_set_property ( const Property *p )
|
void config_parse_set_property ( const Property *p )
|
||||||
{
|
{
|
||||||
for ( unsigned int i = 0; i < sizeof ( xrmOptions ) / sizeof ( XrmOption ); ++i ) {
|
for ( unsigned int i = 0; i < sizeof ( xrmOptions ) / sizeof ( XrmOption ); ++i ) {
|
||||||
XrmOption *op = &( xrmOptions[i] );
|
XrmOption *op = &( xrmOptions[i] );
|
||||||
if ( g_strcmp0 ( op->name, p->name) == 0 ) {
|
if ( g_strcmp0 ( op->name, p->name ) == 0 ) {
|
||||||
__config_parser_set_property ( op, p );
|
__config_parser_set_property ( op, p );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for ( unsigned int i = 0; i < num_extra_options; ++i ) {
|
for ( unsigned int i = 0; i < num_extra_options; ++i ) {
|
||||||
XrmOption *op = &( extra_options[i] );
|
XrmOption *op = &( extra_options[i] );
|
||||||
if ( g_strcmp0 ( op->name, p->name) == 0 ) {
|
if ( g_strcmp0 ( op->name, p->name ) == 0 ) {
|
||||||
__config_parser_set_property ( op, p );
|
__config_parser_set_property ( op, p );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue