Updating branch refs/heads/master to 0e4103763f45c0930d8d12664713f7ae3d72442c (commit) from 8c440ac6f3f1a9740ba2f2379fd18fa19844b1f8 (commit)
commit 0e4103763f45c0930d8d12664713f7ae3d72442c Author: Sean Davis <smd.seanda...@gmail.com> Date: Sun Sep 8 13:24:58 2013 -0400 Fix settings-dialog crashing on close src/parole-conf-dialog.c | 5 +++-- src/parole-player.c | 9 ++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/parole-conf-dialog.c b/src/parole-conf-dialog.c index ed0741b..27bf5df 100644 --- a/src/parole-conf-dialog.c +++ b/src/parole-conf-dialog.c @@ -136,8 +136,7 @@ G_DEFINE_TYPE (ParoleConfDialog, parole_conf_dialog, G_TYPE_OBJECT) static void parole_conf_dialog_destroy (GtkWidget *widget, ParoleConfDialog *self) { - gtk_widget_destroy (widget); - g_object_unref (self); + gtk_widget_hide(widget); } /* Replace the playlist with newly opened files */ @@ -640,6 +639,8 @@ void parole_conf_dialog_open (ParoleConfDialog *self, GtkWidget *parent) switch_widget = GTK_WIDGET (gtk_builder_get_object (builder, "enable-subtitle")); g_signal_connect(G_OBJECT(switch_widget), "notify::active", G_CALLBACK(parole_conf_dialog_enable_subtitle_changed_cb), self); + g_signal_connect(G_OBJECT(dialog), "delete-event", G_CALLBACK(gtk_widget_hide_on_delete), NULL); + gtk_builder_connect_signals (builder, self); g_object_unref (builder); diff --git a/src/parole-player.c b/src/parole-player.c index f1b274b..9fe2f20 100644 --- a/src/parole-player.c +++ b/src/parole-player.c @@ -318,6 +318,8 @@ struct ParolePlayerPrivate ParoleButton *button; #endif + ParoleConfDialog *settings_dialog; + XfceSMClient *sm_client; gchar *client_id; @@ -2188,11 +2190,7 @@ parole_player_media_menu_select_cb (GtkMenuItem *widget, ParolePlayer *player) void parole_player_open_preferences_cb (GtkWidget *widget, ParolePlayer *player) { - ParoleConfDialog *dialog; - - dialog = parole_conf_dialog_new (); - - parole_conf_dialog_open (dialog, player->priv->window); + parole_conf_dialog_open (player->priv->settings_dialog, player->priv->window); } void @@ -2914,6 +2912,7 @@ parole_player_init (ParolePlayer *player) builder = parole_builder_get_main_interface (); player->priv->conf = parole_conf_new (); + player->priv->settings_dialog = parole_conf_dialog_new(); g_signal_connect_swapped (player->priv->conf, "notify::reset-saver", G_CALLBACK (parole_player_reset_saver_changed_cb), player); _______________________________________________ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits