diff --git a/src/gui/gui-bar.c b/src/gui/gui-bar.c index 0c7e136e0..c2b3c2dfc 100644 --- a/src/gui/gui-bar.c +++ b/src/gui/gui-bar.c @@ -170,80 +170,6 @@ gui_bar_search_position (const char *position) return -1; } -/* - * Returns minimum width of a bar window displayed for a bar. - * - * For example, if a bar is displayed in 3 windows, this function returns min - * width of these 3 bar windows. - */ - -int -gui_bar_get_min_width (struct t_gui_bar *bar) -{ - struct t_gui_window *ptr_win; - struct t_gui_bar_window *ptr_bar_win; - int min_width; - - if (CONFIG_INTEGER(bar->options[GUI_BAR_OPTION_TYPE]) == GUI_BAR_TYPE_ROOT) - return bar->bar_window->width; - - min_width = INT_MAX; - for (ptr_win = gui_windows; ptr_win; ptr_win = ptr_win->next_window) - { - for (ptr_bar_win = ptr_win->bar_windows; ptr_bar_win; - ptr_bar_win = ptr_bar_win->next_bar_window) - { - if (ptr_bar_win->bar == bar) - { - if (ptr_bar_win->width < min_width) - min_width = ptr_bar_win->width; - } - } - } - - if (min_width == INT_MAX) - return 0; - - return min_width; -} - -/* - * Returns minimum height of a bar window displayed for a bar. - * - * For example, if a bar is displayed in 3 windows, this function returns min - * width of these 3 bar windows. - */ - -int -gui_bar_get_min_height (struct t_gui_bar *bar) -{ - struct t_gui_window *ptr_win; - struct t_gui_bar_window *ptr_bar_win; - int min_height; - - if (CONFIG_INTEGER(bar->options[GUI_BAR_OPTION_TYPE]) == GUI_BAR_TYPE_ROOT) - return bar->bar_window->height; - - min_height = INT_MAX; - for (ptr_win = gui_windows; ptr_win; ptr_win = ptr_win->next_window) - { - for (ptr_bar_win = ptr_win->bar_windows; ptr_bar_win; - ptr_bar_win = ptr_bar_win->next_bar_window) - { - if (ptr_bar_win->bar == bar) - { - if (ptr_bar_win->height < min_height) - min_height = ptr_bar_win->height; - } - } - } - - if (min_height == INT_MAX) - return 0; - - return min_height; -} - /* * Checks if "add_size" is OK for bar. *