[rhythmbox] fmradio: don't use gtk_dialog_run to display dialogs
- From: Jonathan Matthew <jmatthew src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rhythmbox] fmradio: don't use gtk_dialog_run to display dialogs
- Date: Sun, 5 Feb 2012 23:22:55 +0000 (UTC)
commit 2adbb7f6dadc4a2a415af7f34909cf4cf94e8caa
Author: Jonathan Matthew <jonathan d14n org>
Date: Mon Feb 6 09:20:47 2012 +1000
fmradio: don't use gtk_dialog_run to display dialogs
plugins/fmradio/rb-fm-radio-source.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/plugins/fmradio/rb-fm-radio-source.c b/plugins/fmradio/rb-fm-radio-source.c
index a3b87c4..67fb048 100644
--- a/plugins/fmradio/rb-fm-radio-source.c
+++ b/plugins/fmradio/rb-fm-radio-source.c
@@ -376,6 +376,12 @@ new_station_location_added (RBURIDialog *dialog, const char *frequency,
}
static void
+new_station_response_cb (GtkDialog *dialog, int response, gpointer meh)
+{
+ gtk_widget_destroy (GTK_WIDGET (dialog));
+}
+
+static void
rb_fm_radio_source_cmd_new_station (GtkAction *action, RBFMRadioSource *self)
{
GtkWidget *dialog;
@@ -385,8 +391,8 @@ rb_fm_radio_source_cmd_new_station (GtkAction *action, RBFMRadioSource *self)
g_signal_connect_object (dialog, "location-added",
G_CALLBACK (new_station_location_added),
self, 0);
- gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (GTK_WIDGET (dialog));
+ g_signal_connect (dialog, "response", G_CALLBACK (new_station_response_cb), NULL);
+ gtk_widget_show_all (dialog);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]