lib/widget/*.[ch]: fix indentation.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2012-11-20 13:27:10 +04:00
parent 47fc9f669f
commit 281209c79d
9 changed files with 19 additions and 17 deletions

View File

@ -784,7 +784,8 @@ create_dlg (gboolean modal, int y1, int x1, int lines, int cols,
new_d = g_new0 (WDialog, 1);
w = WIDGET (new_d);
init_widget (w, y1, x1, lines, cols, (callback != NULL) ? callback : dlg_default_callback, mouse_handler);
init_widget (w, y1, x1, lines, cols, (callback != NULL) ? callback : dlg_default_callback,
mouse_handler);
widget_want_cursor (w, FALSE);
new_d->state = DLG_CONSTRUCT;

View File

@ -117,7 +117,7 @@ groupbox_new (int y, int x, int height, int width, const char *title)
/* --------------------------------------------------------------------------------------------- */
void
groupbox_set_title (WGroupbox *g, const char *title)
groupbox_set_title (WGroupbox * g, const char *title)
{
Widget *w = WIDGET (g);

View File

@ -25,7 +25,7 @@ typedef struct WGroupbox
/*** declarations of public functions ************************************************************/
WGroupbox *groupbox_new (int y, int x, int height, int width, const char *title);
void groupbox_set_title (WGroupbox *g, const char *title);
void groupbox_set_title (WGroupbox * g, const char *title);
/*** inline functions ****************************************************************************/

View File

@ -195,7 +195,8 @@ do_show_hist (WInput * in)
len = get_history_length (in->history);
r = history_show (&in->history, WIDGET (in), g_list_position (in->history_current, in->history));
r = history_show (&in->history, WIDGET (in),
g_list_position (in->history_current, in->history));
if (r != NULL)
{
input_assign_text (in, r);
@ -1291,7 +1292,7 @@ input_update (WInput * in, gboolean clear_first)
in->mark = min (in->mark, buf_len);
/* don't draw widget not put into dialog */
if (WIDGET(in)->owner == NULL)
if (WIDGET (in)->owner == NULL)
return;
if (has_history != 0)

View File

@ -70,7 +70,7 @@ typedef struct
input_complete_t completion_flags;
char charbuf[MB_LEN_MAX]; /* buffer for multibytes characters */
size_t charpoint; /* point to end of mulibyte sequence in charbuf */
WLabel *label; /* label associated with this input line*/
WLabel *label; /* label associated with this input line */
} WInput;
/*** global variables defined in .c file *********************************************************/

View File

@ -248,8 +248,7 @@ menubar_draw (WMenuBar * menubar)
if (menubar->is_dropped)
menubar_draw_drop (menubar);
else
widget_move (w, 0,
MENU (g_list_nth_data (menubar->menu, menubar->selected))->start_x);
widget_move (w, 0, MENU (g_list_nth_data (menubar->menu, menubar->selected))->start_x);
}
/* --------------------------------------------------------------------------------------------- */

View File

@ -169,7 +169,7 @@ quick_dialog_skip (quick_dialog_t * quick_dlg, int nskip)
int y1 = 0; /* bottom of 1st column in case of two columns */
int y2 = -1; /* start of two columns */
int width1 = 0; /* width of single column */
int width2 = 0; /* width of each of two columns*/
int width2 = 0; /* width of each of two columns */
gboolean have_groupbox = FALSE;
gboolean two_columns = FALSE;
gboolean put_buttons = FALSE;

View File

@ -191,7 +191,7 @@ widget_default_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm
* @param enable TRUE if specified options should be added, FALSE if options should be removed
*/
void
widget_default_set_options_callback (Widget *w, widget_options_t options, gboolean enable)
widget_default_set_options_callback (Widget * w, widget_options_t options, gboolean enable)
{
if (enable)
w->options |= options;
@ -212,7 +212,7 @@ widget_default_set_options_callback (Widget *w, widget_options_t options, gboole
* @param enable TRUE if specified options should be added, FALSE if options should be removed
*/
void
widget_set_options (Widget *w, widget_options_t options, gboolean enable)
widget_set_options (Widget * w, widget_options_t options, gboolean enable)
{
w->set_options (w, options, enable);
}

View File

@ -103,7 +103,7 @@ struct Widget
unsigned int id; /* Number of the widget, starting with 0 */
widget_cb_fn callback;
mouse_h mouse;
void (*set_options) (Widget *w, widget_options_t options, gboolean enable);
void (*set_options) (Widget * w, widget_options_t options, gboolean enable);
struct WDialog *owner;
};
@ -129,18 +129,19 @@ void release_hotkey (const hotkey_t hotkey);
/* return width on terminal of hotkey */
int hotkey_width (const hotkey_t hotkey);
/* draw hotkey of widget */
void hotkey_draw (Widget *w, const hotkey_t hotkey, gboolean focused);
void hotkey_draw (Widget * w, const hotkey_t hotkey, gboolean focused);
/* widget initialization */
void init_widget (Widget * w, int y, int x, int lines, int cols,
widget_cb_fn callback, mouse_h mouse_handler);
/* Default callback for widgets */
cb_ret_t widget_default_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data);
void widget_default_set_options_callback (Widget *w, widget_options_t options, gboolean enable);
void widget_set_options (Widget *w, widget_options_t options, gboolean enable);
cb_ret_t widget_default_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm,
void *data);
void widget_default_set_options_callback (Widget * w, widget_options_t options, gboolean enable);
void widget_set_options (Widget * w, widget_options_t options, gboolean enable);
void widget_set_size (Widget * widget, int y, int x, int lines, int cols);
/* select color for widget in dependance of state */
void widget_selectcolor (Widget *w, gboolean focused, gboolean hotkey);
void widget_selectcolor (Widget * w, gboolean focused, gboolean hotkey);
void widget_erase (Widget * w);
/* get mouse pointer location within widget */