Add preliminary set_busy fuinction to activity bar
This commit is contained in:
parent
08722cd6f9
commit
dc4b377b13
@ -53,6 +53,14 @@ ActivityBar *activity_bar_new();
|
|||||||
*/
|
*/
|
||||||
void activity_bar_set_ready(ActivityBar *bar);
|
void activity_bar_set_ready(ActivityBar *bar);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enable spinner and set \p text. If text is NULL, 'Working...' is displayed
|
||||||
|
* @param bar Activity bar object
|
||||||
|
* @param text Text to display, may be NULL
|
||||||
|
|
||||||
|
*/
|
||||||
|
void activity_bar_set_busy(ActivityBar *bar, const char *text);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __LAYER_ELEMENT_H__ */
|
#endif /* __LAYER_ELEMENT_H__ */
|
||||||
|
@ -105,5 +105,11 @@ void activity_bar_set_ready(ActivityBar *bar)
|
|||||||
gtk_spinner_stop(GTK_SPINNER(bar->spinner));
|
gtk_spinner_stop(GTK_SPINNER(bar->spinner));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void activity_bar_set_busy(ActivityBar *bar, const char *text)
|
||||||
|
{
|
||||||
|
gtk_label_set_text(GTK_LABEL(bar->label), (text ? text : "Working..."));
|
||||||
|
gtk_spinner_start(GTK_SPINNER(bar->spinner));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/** @} */
|
/** @} */
|
||||||
|
Loading…
Reference in New Issue
Block a user