mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-11 13:50:48 -05:00
Remove unused functions and other small fixes
This commit is contained in:
parent
f42e4ffbd7
commit
5188e36147
6 changed files with 2 additions and 35 deletions
|
@ -48,15 +48,5 @@ box * box_create ( const char *name, boxType type );
|
||||||
* Add a widget to the box.
|
* Add a widget to the box.
|
||||||
*/
|
*/
|
||||||
void box_add ( box *box, widget *child, gboolean expand, int index );
|
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
|
#endif // ROFI_HBOX_H
|
||||||
|
|
|
@ -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 );
|
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
|
* @param wid The widget handle
|
||||||
*
|
*
|
||||||
|
|
|
@ -80,7 +80,7 @@ void rofi_theme_free ( ThemeWidget *widget )
|
||||||
static void rofi_theme_print_distance ( Distance d )
|
static void rofi_theme_print_distance ( Distance d )
|
||||||
{
|
{
|
||||||
if ( d.type == PW_PX ) {
|
if ( d.type == PW_PX ) {
|
||||||
printf ( "%upx ", (int) d.distance );
|
printf ( "%upx ", (unsigned int) d.distance );
|
||||||
}
|
}
|
||||||
else if ( d.type == PW_PERCENT ) {
|
else if ( d.type == PW_PERCENT ) {
|
||||||
printf ( "%f%% ", d.distance );
|
printf ( "%f%% ", d.distance );
|
||||||
|
|
|
@ -343,10 +343,3 @@ static void box_update ( widget *wid )
|
||||||
hori_calculate_size ( b );
|
hori_calculate_size ( b );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int box_get_fixed_pixels ( box *box )
|
|
||||||
{
|
|
||||||
if ( box != NULL ) {
|
|
||||||
return box->max_size;
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
|
@ -533,10 +533,10 @@ void listview_nav_page_next ( listview *lv )
|
||||||
static int listview_get_desired_height ( widget *wid )
|
static int listview_get_desired_height ( widget *wid )
|
||||||
{
|
{
|
||||||
listview *lv = (listview *) wid;
|
listview *lv = (listview *) wid;
|
||||||
int spacing = distance_get_pixel ( lv->spacing, ORIENTATION_VERTICAL );
|
|
||||||
if ( lv == NULL || lv->widget.enabled == FALSE ) {
|
if ( lv == NULL || lv->widget.enabled == FALSE ) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
int spacing = distance_get_pixel ( lv->spacing, ORIENTATION_VERTICAL );
|
||||||
int h = lv->menu_lines;
|
int h = lv->menu_lines;
|
||||||
if ( !( lv->fixed_num_lines ) ) {
|
if ( !( lv->fixed_num_lines ) ) {
|
||||||
if ( lv->dynamic ) {
|
if ( lv->dynamic ) {
|
||||||
|
|
|
@ -262,14 +262,6 @@ gboolean widget_motion_notify ( widget *wid, xcb_motion_notify_event_t *xme )
|
||||||
return FALSE;
|
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 widget_padding_get_left ( const widget *wid )
|
||||||
{
|
{
|
||||||
int distance = distance_get_pixel ( wid->padding.left, ORIENTATION_HORIZONTAL );
|
int distance = distance_get_pixel ( wid->padding.left, ORIENTATION_HORIZONTAL );
|
||||||
|
|
Loading…
Reference in a new issue