~ubuntu-branches/ubuntu/quantal/rhythmbox/quantal-proposed

« back to all changes in this revision

Viewing changes to sources/rb-static-playlist-source.c

  • Committer: Package Import Robot
  • Author(s): Didier Roche
  • Date: 2012-01-17 16:56:40 UTC
  • mfrom: (1.1.62)
  • Revision ID: package-import@ubuntu.com-20120117165640-pr034mkhmti3efh6
Tags: 2.95-0ubuntu1
* New upstream release:
  - wrong shortcut for Show / Hide the Queue Sidebar (LP: #461279)
* debian/watch:
  - update to latest url    
* debian/patches/00_fix_for_glib_2.32.patch:
  - was taken upstream, removed

Show diffs side-by-side

added added

removed removed

Lines of Context:
149
149
        RBSourceSearch *default_search;
150
150
        RhythmDBQuery *search_query;
151
151
 
152
 
        GtkActionGroup *action_group;
153
152
        gboolean dispose_has_run;
154
153
} RBStaticPlaylistSourcePrivate;
155
154
 
194
193
        g_type_class_add_private (klass, sizeof (RBStaticPlaylistSourcePrivate));
195
194
}
196
195
 
 
196
void
 
197
rb_static_playlist_source_create_actions (RBShell *shell)
 
198
{
 
199
        RBStaticPlaylistSourceClass *klass;
 
200
        GtkUIManager *uimanager;
 
201
 
 
202
        klass = RB_STATIC_PLAYLIST_SOURCE_CLASS (g_type_class_ref (RB_TYPE_STATIC_PLAYLIST_SOURCE));
 
203
 
 
204
        klass->action_group = gtk_action_group_new ("StaticPlaylistActions");
 
205
        gtk_action_group_set_translation_domain (klass->action_group, GETTEXT_PACKAGE);
 
206
 
 
207
        g_object_get (shell, "ui-manager", &uimanager, NULL);
 
208
        gtk_ui_manager_insert_action_group (uimanager, klass->action_group, 0);
 
209
        g_object_unref (uimanager);
 
210
 
 
211
        gtk_action_group_add_radio_actions (klass->action_group,
 
212
                                            rb_static_playlist_source_radio_actions,
 
213
                                            G_N_ELEMENTS (rb_static_playlist_source_radio_actions),
 
214
                                            0,
 
215
                                            NULL,
 
216
                                            NULL);
 
217
        rb_source_search_basic_create_for_actions (klass->action_group,
 
218
                                                   rb_static_playlist_source_radio_actions,
 
219
                                                   G_N_ELEMENTS (rb_static_playlist_source_radio_actions));
 
220
 
 
221
        g_type_class_unref (klass);
 
222
}
197
223
static void
198
224
rb_static_playlist_source_init (RBStaticPlaylistSource *source)
199
225
{
243
269
                priv->filter_model = NULL;
244
270
        }
245
271
 
246
 
        if (priv->action_group != NULL) {
247
 
                g_object_unref (priv->action_group);
248
 
                priv->action_group = NULL;
249
 
        }
250
 
 
251
272
        if (priv->default_search != NULL) {
252
273
                g_object_unref (priv->default_search);
253
274
                priv->default_search = NULL;
302
323
        gtk_widget_set_hexpand (paned, TRUE);
303
324
        gtk_widget_set_vexpand (paned, TRUE);
304
325
 
 
326
        priv->default_search = rb_source_search_basic_new (RHYTHMDB_PROP_SEARCH_MATCH);
 
327
 
305
328
        g_object_get (source, "shell", &shell, NULL);
306
 
        priv->action_group = _rb_display_page_register_action_group (RB_DISPLAY_PAGE (source),
307
 
                                                                     "StaticPlaylistActions",
308
 
                                                                     NULL, 0,
309
 
                                                                     shell);
310
 
        if (gtk_action_group_get_action (priv->action_group,
311
 
                                         rb_static_playlist_source_radio_actions[0].name) == NULL) {
312
 
                gtk_action_group_add_radio_actions (priv->action_group,
313
 
                                                    rb_static_playlist_source_radio_actions,
314
 
                                                    G_N_ELEMENTS (rb_static_playlist_source_radio_actions),
315
 
                                                    0,
316
 
                                                    NULL,
317
 
                                                    NULL);
318
 
                rb_source_search_basic_create_for_actions (priv->action_group,
319
 
                                                           rb_static_playlist_source_radio_actions,
320
 
                                                           G_N_ELEMENTS (rb_static_playlist_source_radio_actions));
321
 
        }
322
 
        priv->default_search = rb_source_search_basic_new (RHYTHMDB_PROP_SEARCH_MATCH);
323
 
 
324
329
        g_object_get (shell, "ui-manager", &ui_manager, NULL);
325
330
        g_object_unref (shell);
326
331