91
92
static gboolean impl_show_popup (RBDisplayPage *page);
92
static GList *impl_get_ui_actions (RBDisplayPage *page);
93
93
static void impl_get_status (RBDisplayPage *page, char **text, char **progress_text, float *progress);
95
95
/* source methods */
204
202
page_class->show_popup = impl_show_popup;
205
203
page_class->get_status = impl_get_status;
206
page_class->get_ui_actions = impl_get_ui_actions;
208
source_class->impl_can_browse = (RBSourceFeatureFunc) rb_true_function;
209
205
source_class->impl_can_copy = (RBSourceFeatureFunc) rb_false_function;
210
206
source_class->impl_can_delete = (RBSourceFeatureFunc) rb_true_function;
211
207
source_class->impl_can_pause = (RBSourceFeatureFunc) rb_false_function;
237
233
source->priv = RB_IRADIO_SOURCE_GET_PRIVATE (source);
239
source->priv->vbox = gtk_vbox_new (FALSE, 5);
241
gtk_container_add (GTK_CONTAINER (source), source->priv->vbox);
243
235
gtk_icon_size_lookup (RB_SOURCE_ICON_SIZE, &size, NULL);
244
236
pixbuf = gtk_icon_theme_load_icon (gtk_icon_theme_get_default (),
245
237
IRADIO_SOURCE_ICON,
301
293
GtkAction *action;
302
294
GSettings *settings;
295
GtkUIManager *ui_manager;
298
RBSourceToolbar *toolbar;
304
300
RB_CHAIN_GOBJECT_METHOD (rb_iradio_source_parent_class, constructed, object);
305
301
source = RB_IRADIO_SOURCE (object);
307
source->priv->paned = gtk_hpaned_new ();
303
paned = gtk_hpaned_new ();
309
305
g_object_get (source, "shell", &shell, NULL);
310
306
g_object_get (shell,
311
307
"db", &source->priv->db,
312
308
"shell-player", &source->priv->player,
309
"ui-manager", &ui_manager,
314
311
g_object_unref (shell);
343
340
"MusicNewInternetRadioStation");
344
341
/* Translators: this is the toolbar button label for
345
342
New Internet Radio Station action. */
346
g_object_set (action, "short-label", C_("Radio", "New"), NULL);
343
g_object_set (action, "short-label", C_("Radio", "Add"), NULL);
349
346
/* set up stations view */
395
392
g_object_set (source->priv->genres, "vscrollbar_policy",
396
393
GTK_POLICY_AUTOMATIC, NULL);
398
gtk_paned_pack1 (GTK_PANED (source->priv->paned),
399
GTK_WIDGET (source->priv->genres), FALSE, FALSE);
400
gtk_paned_pack2 (GTK_PANED (source->priv->paned),
401
GTK_WIDGET (source->priv->stations), TRUE, FALSE);
403
gtk_box_pack_start (GTK_BOX (source->priv->vbox), source->priv->paned, TRUE, TRUE, 0);
395
gtk_paned_pack1 (GTK_PANED (paned), GTK_WIDGET (source->priv->genres), FALSE, FALSE);
396
gtk_paned_pack2 (GTK_PANED (paned), GTK_WIDGET (source->priv->stations), TRUE, FALSE);
399
toolbar = rb_source_toolbar_new (RB_SOURCE (source), ui_manager);
400
rb_source_toolbar_add_search_entry (toolbar, NULL, _("Search your internet radio stations"));
402
grid = gtk_grid_new ();
403
gtk_grid_set_column_spacing (GTK_GRID (grid), 6);
404
gtk_grid_set_row_spacing (GTK_GRID (grid), 6);
405
gtk_grid_attach (GTK_GRID (grid), GTK_WIDGET (toolbar), 0, 0, 1, 1);
406
gtk_grid_attach (GTK_GRID (grid), paned, 0, 1, 1, 1);
408
gtk_container_add (GTK_CONTAINER (source), grid);
405
410
rb_source_bind_settings (RB_SOURCE (source),
406
411
GTK_WIDGET (source->priv->stations),
408
413
GTK_WIDGET (source->priv->genres));
410
415
gtk_widget_show_all (GTK_WIDGET (source));
483
488
"entry-type", entry_type,
484
489
"plugin", plugin,
485
"search-type", RB_SOURCE_SEARCH_INCREMENTAL,
486
490
"settings", g_settings_get_child (settings, "source"),
491
"toolbar-path", "/IRadioSourceToolBar",
488
493
g_object_unref (settings);
489
494
rb_shell_register_entry_type_for_source (shell, source, entry_type);