comparison src/audacious/util.c @ 4513:867d7caeb95b

- indentation of ui_main.c - moving around some functions and removing some (unused) ones
author mf0102 <0102@gmx.at>
date Tue, 22 Apr 2008 18:27:57 +0200
parents 246244ead30e
children 8f36cce36fef
comparison
equal deleted inserted replaced
4512:df578e2bba19 4513:867d7caeb95b
752 list->data = list->prev->data; 752 list->data = list->prev->data;
753 list->prev->data = temp; 753 list->prev->data = temp;
754 } 754 }
755 } 755 }
756 756
757
758 void
759 util_menu_position(GtkMenu * menu, gint * x, gint * y,
760 gboolean * push_in, gpointer data)
761 {
762 GtkRequisition requisition;
763 gint screen_width;
764 gint screen_height;
765 MenuPos *pos = data;
766
767 gtk_widget_size_request(GTK_WIDGET(menu), &requisition);
768
769 screen_width = gdk_screen_width();
770 screen_height = gdk_screen_height();
771
772 *x = CLAMP(pos->x - 2, 0, MAX(0, screen_width - requisition.width));
773 *y = CLAMP(pos->y - 2, 0, MAX(0, screen_height - requisition.height));
774 }
775
776 GdkFont * 757 GdkFont *
777 util_font_load(const gchar * name) 758 util_font_load(const gchar * name)
778 { 759 {
779 GdkFont *font; 760 GdkFont *font;
780 PangoFontDescription *desc; 761 PangoFontDescription *desc;