20 #include <libaudgui/libaudgui-gtk.h>
45 const char *
name = header->name;
46 const char * text = header->about_text;
50 name = dgettext (header->domain, name);
51 text = dgettext (header->domain, text);
54 char * title = g_strdup_printf (
_(
"About %s"), name);
55 audgui_simple_message (& misc->
about_window, GTK_MESSAGE_INFO, title, text);
59 static void response_cb (GtkWidget * window,
int response,
const PluginPreferences * p)
61 if (response == GTK_RESPONSE_OK && p->apply)
64 gtk_widget_destroy (window);
67 static void destroy_cb (GtkWidget * window,
const PluginPreferences * p)
77 const PluginPreferences * p = header->prefs;
88 const char *
name = header->name;
90 name = dgettext (header->domain, header->name);
92 char * title = g_strdup_printf (
_(
"%s Settings"), name);
94 GtkWidget * window = p->apply ? gtk_dialog_new_with_buttons (title,
NULL, 0,
95 GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OK, GTK_RESPONSE_OK,
NULL)
96 : gtk_dialog_new_with_buttons (title,
NULL, 0, GTK_STOCK_CLOSE,
97 GTK_RESPONSE_CLOSE,
NULL);
101 GtkWidget * content = gtk_dialog_get_content_area ((GtkDialog *) window);
102 GtkWidget *
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
104 gtk_box_pack_start ((GtkBox *) content, box,
TRUE,
TRUE, 0);
106 g_signal_connect (window,
"response", (GCallback)
response_cb, (
void *) p);
107 g_signal_connect (window,
"destroy", (GCallback)
destroy_cb, (
void *) p);
110 g_signal_connect (window,
"destroy", (GCallback) gtk_widget_destroyed, & misc->
config_window);
112 gtk_widget_show_all (window);
GtkWidget * config_window
static void destroy_cb(GtkWidget *window, const PluginPreferences *p)
static void response_cb(GtkWidget *window, int response, const PluginPreferences *p)
void plugin_make_config_window(PluginHandle *plugin)
#define PLUGIN_HAS_FUNC(p, func)
void plugin_misc_cleanup(PluginHandle *plugin)
const void * plugin_get_header(PluginHandle *plugin)
void * plugin_get_misc_data(PluginHandle *plugin, int size)
void create_widgets_with_domain(void *box, const PreferencesWidget *widgets, int amt, const char *domain)
void plugin_make_about_window(PluginHandle *plugin)
const char PluginHandle decoder const char PluginHandle decoder const char PluginHandle decoder void box
void data PluginHandle plugin