mirror of
https://github.com/davatorium/rofi.git
synced 2025-02-10 15:44:41 -05:00
Indent.
This commit is contained in:
parent
ba296f9210
commit
9b0a430fd4
12 changed files with 20 additions and 25 deletions
|
@ -40,7 +40,7 @@
|
|||
* Type of a mode.
|
||||
* Access should be done via mode_* functions.
|
||||
*/
|
||||
typedef struct rofi_mode Mode;
|
||||
typedef struct rofi_mode Mode;
|
||||
|
||||
/**
|
||||
* Enum used to sum the possible states of ROFI.
|
||||
|
|
|
@ -40,7 +40,6 @@ typedef enum
|
|||
*/
|
||||
extern const char * const PropertyTypeName[P_NUM_TYPES];
|
||||
|
||||
|
||||
/** Style of text highlight */
|
||||
typedef enum
|
||||
{
|
||||
|
@ -143,7 +142,6 @@ typedef struct
|
|||
ThemeColor color;
|
||||
} RofiHighlightColorStyle;
|
||||
|
||||
|
||||
/**
|
||||
* Enumeration indicating location or gravity of window.
|
||||
*
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
*
|
||||
* @{
|
||||
*/
|
||||
typedef struct RofiViewState RofiViewState;
|
||||
typedef struct RofiViewState RofiViewState;
|
||||
typedef enum
|
||||
{
|
||||
/** Create a menu for entering text */
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
/**
|
||||
* Abstract handle to the box widget internal state.
|
||||
*/
|
||||
typedef struct _box box;
|
||||
typedef struct _box box;
|
||||
|
||||
/**
|
||||
* @param name The name of the widget.
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
/**
|
||||
* Abstract handle to the container widget internal state.
|
||||
*/
|
||||
typedef struct _window container;
|
||||
typedef struct _window container;
|
||||
|
||||
/**
|
||||
* @param name The name of the widget.
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
* Handle to the listview.
|
||||
* No internal fields should be accessed directly.
|
||||
*/
|
||||
typedef struct _listview listview;
|
||||
typedef struct _listview listview;
|
||||
|
||||
/**
|
||||
* The scrolling type used in the list view
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
* Abstract structure holding internal state of a widget.
|
||||
* Structure is elaborated in widget-internal.h
|
||||
*/
|
||||
typedef struct _widget widget;
|
||||
typedef struct _widget widget;
|
||||
|
||||
/**
|
||||
* Type of the widget. It is used to bubble events to the relevant widget.
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
/**
|
||||
* xcb data structure type declaration.
|
||||
*/
|
||||
typedef struct _xcb_stuff xcb_stuff;
|
||||
typedef struct _xcb_stuff xcb_stuff;
|
||||
|
||||
/**
|
||||
* Global pointer to xcb_stuff instance.
|
||||
|
|
|
@ -45,15 +45,14 @@ static char **get_script_output ( char *command, char *arg, unsigned int *length
|
|||
{
|
||||
int fd = -1;
|
||||
GError *error = NULL;
|
||||
char **retv = NULL;
|
||||
char **argv = NULL;
|
||||
int argc = 0;
|
||||
char **retv = NULL;
|
||||
char **argv = NULL;
|
||||
int argc = 0;
|
||||
*length = 0;
|
||||
if ( g_shell_parse_argv ( command, &argc, &argv, &error ) )
|
||||
{
|
||||
argv = g_realloc ( argv, (argc+2)*sizeof(char*) );
|
||||
argv[argc] = g_strdup(arg);
|
||||
argv[argc+1] = NULL;
|
||||
if ( g_shell_parse_argv ( command, &argc, &argv, &error ) ) {
|
||||
argv = g_realloc ( argv, ( argc + 2 ) * sizeof ( char* ) );
|
||||
argv[argc] = g_strdup ( arg );
|
||||
argv[argc + 1] = NULL;
|
||||
g_spawn_async_with_pipes ( NULL, argv, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, NULL, &fd, NULL, &error );
|
||||
}
|
||||
if ( error != NULL ) {
|
||||
|
@ -95,7 +94,7 @@ static char **get_script_output ( char *command, char *arg, unsigned int *length
|
|||
|
||||
static char **execute_executor ( Mode *sw, char *result, unsigned int *length )
|
||||
{
|
||||
char **retv = get_script_output ( sw->ed, result, length );
|
||||
char **retv = get_script_output ( sw->ed, result, length );
|
||||
return retv;
|
||||
}
|
||||
|
||||
|
|
|
@ -706,7 +706,7 @@ void rofi_theme_convert_old ( void )
|
|||
"* { bordercolor: %s; }",
|
||||
"* { separatorcolor: %s; }"
|
||||
};
|
||||
for ( int i = 0; retv && i < 3 && retv[i] ; i++ ) {
|
||||
for ( int i = 0; retv && i < 3 && retv[i]; i++ ) {
|
||||
char *str = g_strdup_printf ( conf[i], rofi_theme_convert_color ( retv[i] ) );
|
||||
rofi_theme_parse_string ( str );
|
||||
g_free ( str );
|
||||
|
@ -792,8 +792,8 @@ void rofi_theme_convert_old ( void )
|
|||
rofi_theme_parse_string ( str );
|
||||
g_free ( str );
|
||||
// inputbar
|
||||
str = g_strdup_printf ( "#window.mainbox.inputbar { padding: %dpx;}\n"\
|
||||
"#window.mainbox.inputbar.box { padding: 0px; }", config.line_padding );
|
||||
str = g_strdup_printf ( "#window.mainbox.inputbar { padding: %dpx;}\n" \
|
||||
"#window.mainbox.inputbar.box { padding: 0px; }", config.line_padding );
|
||||
rofi_theme_parse_string ( str );
|
||||
g_free ( str );
|
||||
}
|
||||
|
|
|
@ -897,16 +897,14 @@ double textbox_get_estimated_char_width ( void )
|
|||
return char_width;
|
||||
}
|
||||
|
||||
static double ch_width = -1;
|
||||
static double ch_width = -1;
|
||||
double textbox_get_estimated_ch ( void )
|
||||
{
|
||||
|
||||
if ( ch_width < 0 ) {
|
||||
int width = pango_font_metrics_get_approximate_digit_width ( p_metrics );
|
||||
ch_width = ( width ) / (double) PANGO_SCALE;
|
||||
}
|
||||
return ch_width;
|
||||
|
||||
}
|
||||
|
||||
int textbox_get_estimated_height ( const textbox *tb, int eh )
|
||||
|
|
|
@ -550,7 +550,7 @@ void config_parse_xresource_dump ( void )
|
|||
|
||||
static void config_parse_dump_config_option ( XrmOption *option )
|
||||
{
|
||||
if ( option->type == xrm_Char || option->source == CONFIG_DEFAULT ) {
|
||||
if ( option->type == xrm_Char || option->source == CONFIG_DEFAULT ) {
|
||||
printf ( "/*" );
|
||||
}
|
||||
printf ( "\t%s: ", option->name );
|
||||
|
|
Loading…
Add table
Reference in a new issue