[rhythmbox] ref playlist classes so they actually exist if needed
- From: Jonathan Matthew <jmatthew src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rhythmbox] ref playlist classes so they actually exist if needed
- Date: Tue, 10 Jan 2012 11:37:58 +0000 (UTC)
commit 3ab606c19acddefee9bdc2f19e6769b67f2570b0
Author: Jonathan Matthew <jonathan d14n org>
Date: Tue Jan 10 21:37:07 2012 +1000
ref playlist classes so they actually exist if needed
fixes crash on startup introduced in the previous commit
sources/rb-auto-playlist-source.c | 4 +++-
sources/rb-static-playlist-source.c | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/sources/rb-auto-playlist-source.c b/sources/rb-auto-playlist-source.c
index eac629c..3629456 100644
--- a/sources/rb-auto-playlist-source.c
+++ b/sources/rb-auto-playlist-source.c
@@ -240,7 +240,7 @@ rb_auto_playlist_source_create_actions (RBShell *shell)
RBAutoPlaylistSourceClass *klass;
GtkUIManager *uimanager;
- klass = RB_AUTO_PLAYLIST_SOURCE_CLASS (g_type_class_peek (RB_TYPE_AUTO_PLAYLIST_SOURCE));
+ klass = RB_AUTO_PLAYLIST_SOURCE_CLASS (g_type_class_ref (RB_TYPE_AUTO_PLAYLIST_SOURCE));
klass->action_group = gtk_action_group_new ("AutoPlaylistActions");
gtk_action_group_set_translation_domain (klass->action_group, GETTEXT_PACKAGE);
@@ -258,6 +258,8 @@ rb_auto_playlist_source_create_actions (RBShell *shell)
rb_source_search_basic_create_for_actions (klass->action_group,
rb_auto_playlist_source_radio_actions,
G_N_ELEMENTS (rb_auto_playlist_source_radio_actions));
+
+ g_type_class_unref (klass);
}
static void
diff --git a/sources/rb-static-playlist-source.c b/sources/rb-static-playlist-source.c
index b71170f..2ebcbac 100644
--- a/sources/rb-static-playlist-source.c
+++ b/sources/rb-static-playlist-source.c
@@ -199,7 +199,7 @@ rb_static_playlist_source_create_actions (RBShell *shell)
RBStaticPlaylistSourceClass *klass;
GtkUIManager *uimanager;
- klass = RB_STATIC_PLAYLIST_SOURCE_CLASS (g_type_class_peek (RB_TYPE_STATIC_PLAYLIST_SOURCE));
+ klass = RB_STATIC_PLAYLIST_SOURCE_CLASS (g_type_class_ref (RB_TYPE_STATIC_PLAYLIST_SOURCE));
klass->action_group = gtk_action_group_new ("StaticPlaylistActions");
gtk_action_group_set_translation_domain (klass->action_group, GETTEXT_PACKAGE);
@@ -217,6 +217,8 @@ rb_static_playlist_source_create_actions (RBShell *shell)
rb_source_search_basic_create_for_actions (klass->action_group,
rb_static_playlist_source_radio_actions,
G_N_ELEMENTS (rb_static_playlist_source_radio_actions));
+
+ g_type_class_unref (klass);
}
static void
rb_static_playlist_source_init (RBStaticPlaylistSource *source)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]