* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*/
+/** @file disobedience/misc.c
+ * @brief Miscellaneous GTK+ interfacing stuff
+ */
#include "disobedience.h"
/* Miscellaneous GTK+ stuff ------------------------------------------------ */
+WT(cached_image);
+
/* Functions */
+/** @brief Put scrollbars around a widget
+ * @param child Widget to surround
+ * @param widgetname Name for (both) widgets
+ * @return Scroll widget
+ */
GtkWidget *scroll_widget(GtkWidget *child,
const char *widgetname) {
GtkWidget *scroller = gtk_scrolled_window_new(0, 0);
return scroller;
}
+/** @brief Find an image
+ * @param name Relative path to image
+ * @return pixbuf containing image
+ *
+ * Images are cached so it's perfectly sensible to call this lots of times even
+ * for the same image.
+ *
+ * Images are searched for in @c pkgdatadir/static.
+ */
GdkPixbuf *find_image(const char *name) {
static const struct cache_type image_cache_type = { INT_MAX };
error(0, "%s", err->message);
return 0;
}
+ NW(cached_image);
cache_put(&image_cache_type, name, pb);
}
return pb;
}
+/** @brief Pop up an error message */
void popup_error(const char *msg) {
GtkWidget *w;
indent-tabs-mode:nil
End:
*/
-
-/* arch-tag:tV2wkVwV3p2A66vyViQJSw */