diff options
author | Dave Davenport <qball@gmpclient.org> | 2017-01-09 08:39:02 +0100 |
---|---|---|
committer | Dave Davenport <qball@gmpclient.org> | 2017-01-09 08:39:02 +0100 |
commit | 5188e36147010c22c3fc5041e7a82f3f1a7c9e3f (patch) | |
tree | 8309344d59cbda00b35550a846d64b9a15d2b6fe /source | |
parent | f42e4ffbd7b19723eb2ffeab744ed3b6724b056c (diff) |
Remove unused functions and other small fixes
Diffstat (limited to 'source')
-rw-r--r-- | source/theme.c | 2 | ||||
-rw-r--r-- | source/widgets/box.c | 7 | ||||
-rw-r--r-- | source/widgets/listview.c | 2 | ||||
-rw-r--r-- | source/widgets/widget.c | 8 |
4 files changed, 2 insertions, 17 deletions
diff --git a/source/theme.c b/source/theme.c index b7e89ec9..03f86fde 100644 --- a/source/theme.c +++ b/source/theme.c @@ -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 ); diff --git a/source/widgets/box.c b/source/widgets/box.c index 3b25e2a9..14ab1e70 100644 --- a/source/widgets/box.c +++ b/source/widgets/box.c @@ -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; -} diff --git a/source/widgets/listview.c b/source/widgets/listview.c index cecbe9b9..96b8619e 100644 --- a/source/widgets/listview.c +++ b/source/widgets/listview.c @@ -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 ) { diff --git a/source/widgets/widget.c b/source/widgets/widget.c index 36d1f6c3..c51e63ff 100644 --- a/source/widgets/widget.c +++ b/source/widgets/widget.c @@ -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 ); |