~ubuntu-branches/ubuntu/precise/rhythmbox/precise-201203091205

« back to all changes in this revision

Viewing changes to podcast/rb-feed-podcast-properties-dialog.c

Tags: upstream-0.9.5
ImportĀ upstreamĀ versionĀ 0.9.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 *
17
17
 *  You should have received a copy of the GNU General Public License
18
18
 *  along with this program; if not, write to the Free Software
19
 
 *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
19
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA.
20
20
 *
21
21
 */
22
22
 
36
36
#include "rb-dialog.h"
37
37
#include "rb-rating.h"
38
38
#include "rb-cut-and-paste-code.h"
 
39
#include "rhythmdb.h"
39
40
 
40
41
static void rb_feed_podcast_properties_dialog_class_init (RBFeedPodcastPropertiesDialogClass *klass);
41
42
static void rb_feed_podcast_properties_dialog_init (RBFeedPodcastPropertiesDialog *dialog);
205
206
{
206
207
        const char *name;
207
208
        char *tmp;      
208
 
        name = rb_refstring_get (dialog->priv->current_entry->title);
 
209
        name = rhythmdb_entry_get_string (dialog->priv->current_entry, RHYTHMDB_PROP_TITLE);
209
210
        tmp = g_strdup_printf (_("%s Properties"), name);
210
211
        gtk_window_set_title (GTK_WINDOW (dialog), tmp);
211
212
        g_free (tmp);
214
215
static void
215
216
rb_feed_podcast_properties_dialog_update_title_label (RBFeedPodcastPropertiesDialog *dialog)
216
217
{
217
 
        gtk_label_set_text (GTK_LABEL (dialog->priv->title),
218
 
                            rb_refstring_get (dialog->priv->current_entry->title));
 
218
        const char *title;
 
219
 
 
220
        title = rhythmdb_entry_get_string (dialog->priv->current_entry, RHYTHMDB_PROP_TITLE);
 
221
        gtk_label_set_text (GTK_LABEL (dialog->priv->title), title);
219
222
}
220
223
 
221
224
static void
222
225
rb_feed_podcast_properties_dialog_update_author (RBFeedPodcastPropertiesDialog *dialog)
223
226
{
224
 
        gtk_label_set_text (GTK_LABEL (dialog->priv->author),
225
 
                            rb_refstring_get (dialog->priv->current_entry->artist));
 
227
        const char *artist;
 
228
 
 
229
        artist = rhythmdb_entry_get_string (dialog->priv->current_entry, RHYTHMDB_PROP_ARTIST);
 
230
        gtk_label_set_text (GTK_LABEL (dialog->priv->author), artist);
226
231
}
227
232
 
228
233
static void
229
234
rb_feed_podcast_properties_dialog_update_location (RBFeedPodcastPropertiesDialog *dialog)
230
235
{
 
236
        const char *location;
231
237
        char *unescaped;
232
 
        unescaped = gnome_vfs_unescape_string_for_display (dialog->priv->current_entry->location);
 
238
 
 
239
        location = rhythmdb_entry_get_string (dialog->priv->current_entry, RHYTHMDB_PROP_LOCATION);
 
240
        unescaped = gnome_vfs_unescape_string_for_display (location);
233
241
        gtk_label_set_text (GTK_LABEL (dialog->priv->location), unescaped);
234
242
        g_free (unescaped);
235
243
}
237
245
static void
238
246
rb_feed_podcast_properties_dialog_update_copyright (RBFeedPodcastPropertiesDialog *dialog)
239
247
{
240
 
        gtk_label_set_text (GTK_LABEL (dialog->priv->copyright),
241
 
                            rb_refstring_get (dialog->priv->current_entry->podcast->copyright));
 
248
        const char *copyright;
 
249
 
 
250
        copyright = rhythmdb_entry_get_string (dialog->priv->current_entry, RHYTHMDB_PROP_COPYRIGHT);
 
251
        gtk_label_set_text (GTK_LABEL (dialog->priv->copyright), copyright);
242
252
}
243
253
 
244
254
static void
245
255
rb_feed_podcast_properties_dialog_update_language (RBFeedPodcastPropertiesDialog *dialog)
246
256
{
247
 
        gtk_label_set_text (GTK_LABEL (dialog->priv->language),
248
 
                            rb_refstring_get (dialog->priv->current_entry->podcast->lang));
 
257
        const char *language;
 
258
 
 
259
        language = rhythmdb_entry_get_string (dialog->priv->current_entry, RHYTHMDB_PROP_LANG);
 
260
        gtk_label_set_text (GTK_LABEL (dialog->priv->language), language);
249
261
}
250
262
 
251
263
static void
275
287
static void
276
288
rb_feed_podcast_properties_dialog_update_summary (RBFeedPodcastPropertiesDialog *dialog)
277
289
{
278
 
        gtk_label_set (GTK_LABEL (dialog->priv->summary),
279
 
                       rb_refstring_get (dialog->priv->current_entry->podcast->summary));
 
290
        const char *summary;
 
291
 
 
292
        summary = rhythmdb_entry_get_string (dialog->priv->current_entry, RHYTHMDB_PROP_SUMMARY);
 
293
        gtk_label_set (GTK_LABEL (dialog->priv->summary), summary);
280
294
}
281
295
 
282
296
static char *