core: remove unused functions gui_bar_get_min_width and gui_bar_get_min_height (issue #1012)

This commit is contained in:
Sébastien Helleu 2017-06-06 07:29:05 +02:00
parent fa3a4355ce
commit 1e22a96a10

View File

@ -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.
*