+ /* cap it at "max" */
+ if (max > 0)
+ self->w = MIN(self->w, max);
+}
+
+void popup_height_to_string(ObPopup *self, gchar *text)
+{
+ self->h = RrMinHeight(self->a_text) + ob_rr_theme->paddingy * 2;
+}
+
+void popup_width_to_strings(ObPopup *self, gchar **strings, gint max)
+{
+ gint i, maxw;
+
+ maxw = 0;
+ for (i = 0; strings[i] != NULL; ++i) {
+ popup_width_to_string(self, strings[i], max);
+ maxw = MAX(maxw, self->w);
+ }
+ self->w = maxw;