Remove unused functions and other small fixes

This commit is contained in:
Dave Davenport 2017-01-09 08:39:02 +01:00
parent f42e4ffbd7
commit 5188e36147
6 changed files with 2 additions and 35 deletions

View File

@ -48,15 +48,5 @@ box * box_create ( const char *name, boxType type );
* Add a widget to the box.
*/
void box_add ( box *box, widget *child, gboolean expand, int index );
/**
* @param box Handle to the box widget.
*
* Obtains the minimal size required to display all widgets. (expanding widgets are not counted, except for their
* spacing)
*
* @returns the minimum size in pixels.
*/
int box_get_fixed_pixels ( box *box );
/*@}*/
#endif // ROFI_HBOX_H

View File

@ -174,14 +174,6 @@ void widget_set_clicked_handler ( widget *wid, widget_clicked_cb cb, void *udata
*/
gboolean widget_motion_notify ( widget *wid, xcb_motion_notify_event_t *xme );
/**
* @param wid The widget handle
* @param name The name of the widget.
*
* Set name on widget.
*/
void widget_set_name ( widget *wid, const char *name );
/**
* @param wid The widget handle
*

View File

@ -80,7 +80,7 @@ void rofi_theme_free ( ThemeWidget *widget )
static void rofi_theme_print_distance ( Distance d )
{
if ( d.type == PW_PX ) {
printf ( "%upx ", (int) d.distance );
printf ( "%upx ", (unsigned int) d.distance );
}
else if ( d.type == PW_PERCENT ) {
printf ( "%f%% ", d.distance );

View File

@ -343,10 +343,3 @@ static void box_update ( widget *wid )
hori_calculate_size ( b );
}
}
int box_get_fixed_pixels ( box *box )
{
if ( box != NULL ) {
return box->max_size;
}
return 0;
}

View File

@ -533,10 +533,10 @@ void listview_nav_page_next ( listview *lv )
static int listview_get_desired_height ( widget *wid )
{
listview *lv = (listview *) wid;
int spacing = distance_get_pixel ( lv->spacing, ORIENTATION_VERTICAL );
if ( lv == NULL || lv->widget.enabled == FALSE ) {
return 0;
}
int spacing = distance_get_pixel ( lv->spacing, ORIENTATION_VERTICAL );
int h = lv->menu_lines;
if ( !( lv->fixed_num_lines ) ) {
if ( lv->dynamic ) {

View File

@ -262,14 +262,6 @@ gboolean widget_motion_notify ( widget *wid, xcb_motion_notify_event_t *xme )
return FALSE;
}
void widget_set_name ( widget *wid, const char *name )
{
if ( wid->name ) {
g_free ( wid );
}
wid->name = g_strdup ( name );
}
int widget_padding_get_left ( const widget *wid )
{
int distance = distance_get_pixel ( wid->padding.left, ORIENTATION_HORIZONTAL );