changeset 3731:0e5da33a32b7

fun util dialog shit -> vtable
author William Pitcock <nenolod@atheme.org>
date Sat, 13 Oct 2007 19:11:52 -0500
parents ebf763c51061
children 40d138de8460
files src/audacious/plugin.h src/audacious/pluginenum.c src/audacious/util.c src/audacious/util.h
diffstat 4 files changed, 18 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/audacious/plugin.h	Sat Oct 13 19:08:44 2007 -0500
+++ b/src/audacious/plugin.h	Sat Oct 13 19:11:52 2007 -0500
@@ -279,6 +279,12 @@
     InputPlugin *(*uri_get_plugin)(const gchar *filename);
     void (*uri_set_plugin)(const gchar *uri, InputPlugin *ip);
 
+    /* Util funcs */
+    GtkWidget *(*util_info_dialog)(const gchar * title, const gchar * text,
+                                   const gchar * button_text, gboolean modal,
+                                   GCallback button_action,
+                                   gpointer action_data);
+
 };
 
 /* Convenience macros for accessing the public API. */
@@ -366,6 +372,9 @@
 #define aud_uri_get_plugin		_audvt->uri_get_plugin
 #define aud_uri_set_plugin		_audvt->uri_set_plugin
 
+#define aud_info_dialog			_audvt->util_info_dialog
+#define audacious_info_dialog		_audvt->util_info_dialog
+
 /* for multi-file plugins :( */
 extern struct _AudaciousFuncTableV1 *_audvt;
 
--- a/src/audacious/pluginenum.c	Sat Oct 13 19:08:44 2007 -0500
+++ b/src/audacious/pluginenum.c	Sat Oct 13 19:11:52 2007 -0500
@@ -131,6 +131,8 @@
 
     .uri_get_plugin = uri_get_plugin,
     .uri_set_plugin = uri_set_plugin,
+
+    .util_info_dialog = util_info_dialog,
 };
 
 /*****************************************************************/
--- a/src/audacious/util.c	Sat Oct 13 19:08:44 2007 -0500
+++ b/src/audacious/util.c	Sat Oct 13 19:11:52 2007 -0500
@@ -894,9 +894,9 @@
  * Return value: A GTK widget handle for the message box.
  **/
 GtkWidget *
-audacious_info_dialog(const gchar * title, const gchar * text,
-                  const gchar * button_text, gboolean modal,
-                  GCallback button_action, gpointer action_data)
+util_info_dialog(const gchar * title, const gchar * text,
+                 const gchar * button_text, gboolean modal,
+                 GCallback button_action, gpointer action_data)
 {
   GtkWidget *dialog;
   GtkWidget *dialog_vbox, *dialog_hbox, *dialog_bbox;
--- a/src/audacious/util.h	Sat Oct 13 19:08:44 2007 -0500
+++ b/src/audacious/util.h	Sat Oct 13 19:11:52 2007 -0500
@@ -91,10 +91,10 @@
 
 GdkPixmap *audacious_pixmap_resize(GdkWindow *src, GdkGC *src_gc, GdkPixmap *in, gint width, gint height);
 
-GtkWidget *audacious_info_dialog(const gchar * title, const gchar * text,
-                             const gchar * button_text, gboolean modal,
-                             GCallback button_action,
-                             gpointer action_data);
+GtkWidget *util_info_dialog(const gchar * title, const gchar * text,
+                            const gchar * button_text, gboolean modal,
+                            GCallback button_action,
+                            gpointer action_data);
 
 GdkPixmap *create_dblsize_pixmap(GdkPixmap *pix);