From 281209c79d5d1447dcf2f34eb0e827ea4def487b Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Tue, 20 Nov 2012 13:27:10 +0400 Subject: [PATCH] lib/widget/*.[ch]: fix indentation. Signed-off-by: Andrew Borodin --- lib/widget/dialog.c | 3 ++- lib/widget/groupbox.c | 2 +- lib/widget/groupbox.h | 2 +- lib/widget/input.c | 5 +++-- lib/widget/input.h | 2 +- lib/widget/menu.c | 3 +-- lib/widget/quick.c | 2 +- lib/widget/widget-common.c | 4 ++-- lib/widget/widget-common.h | 13 +++++++------ 9 files changed, 19 insertions(+), 17 deletions(-) diff --git a/lib/widget/dialog.c b/lib/widget/dialog.c index ab632993d..8e011cc41 100644 --- a/lib/widget/dialog.c +++ b/lib/widget/dialog.c @@ -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; diff --git a/lib/widget/groupbox.c b/lib/widget/groupbox.c index 39aeccd55..7fef8f91f 100644 --- a/lib/widget/groupbox.c +++ b/lib/widget/groupbox.c @@ -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); diff --git a/lib/widget/groupbox.h b/lib/widget/groupbox.h index 1ff6f3b43..06fb0d35c 100644 --- a/lib/widget/groupbox.h +++ b/lib/widget/groupbox.h @@ -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 ****************************************************************************/ diff --git a/lib/widget/input.c b/lib/widget/input.c index b65aa7a42..5d671ec6d 100644 --- a/lib/widget/input.c +++ b/lib/widget/input.c @@ -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) diff --git a/lib/widget/input.h b/lib/widget/input.h index e82ecd4d3..ff6a50554 100644 --- a/lib/widget/input.h +++ b/lib/widget/input.h @@ -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 *********************************************************/ diff --git a/lib/widget/menu.c b/lib/widget/menu.c index c6f67fe14..0aa9445f6 100644 --- a/lib/widget/menu.c +++ b/lib/widget/menu.c @@ -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); } /* --------------------------------------------------------------------------------------------- */ diff --git a/lib/widget/quick.c b/lib/widget/quick.c index ce0f9ca0d..e3c42fb5b 100644 --- a/lib/widget/quick.c +++ b/lib/widget/quick.c @@ -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; diff --git a/lib/widget/widget-common.c b/lib/widget/widget-common.c index 986206911..549202bb1 100644 --- a/lib/widget/widget-common.c +++ b/lib/widget/widget-common.c @@ -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); } diff --git a/lib/widget/widget-common.h b/lib/widget/widget-common.h index 6cd3e3a96..4aa873466 100644 --- a/lib/widget/widget-common.h +++ b/lib/widget/widget-common.h @@ -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 */ -- 2.11.4.GIT