~timo-jyrinki/ubuntu/utopic/rhythmbox/enable_grilo_rhythmbox

« back to all changes in this revision

Viewing changes to podcast/rb-podcast-main-source.c

  • Committer: Package Import Robot
  • Author(s): Michael Biebl
  • Date: 2012-03-12 12:07:21 UTC
  • mfrom: (1.2.28)
  • Revision ID: package-import@ubuntu.com-20120312120721-ubdep6yl0sgfbr7i
Tags: 2.96-1
* New upstream release.
* Update Build-Depends:
  - Bump libgtk-3-dev to (>= 3.2.0).
  - Drop gir1.2-gtk-3.0, pulled via libgtk-3-dev.
  - Bump libglib2.0-dev (>= 2.28.0).
* Re-add magnatune plugin.

Show diffs side-by-side

added added

removed removed

Lines of Context:
194
194
 
195
195
}
196
196
 
197
 
static gboolean
 
197
static void
 
198
error_dialog_response_cb (GtkDialog *dialog, int response, RBPodcastMainSource *source)
 
199
{
 
200
        const char *url = g_object_get_data (G_OBJECT (dialog), "feed-url");
 
201
 
 
202
        if (response == GTK_RESPONSE_YES) {
 
203
                RBPodcastManager *pd;
 
204
                g_object_get (source, "podcast-manager", &pd, NULL);
 
205
                rb_podcast_manager_insert_feed_url (pd, url);
 
206
                g_object_unref (pd);
 
207
        }
 
208
 
 
209
        gtk_widget_destroy (GTK_WIDGET (dialog));
 
210
}
 
211
 
 
212
static void
198
213
feed_error_cb (RBPodcastManager *pd,
 
214
               const char *url,
199
215
               const char *error,
200
216
               gboolean existing,
201
217
               RBPodcastMainSource *source)
202
218
{
203
219
        GtkWidget *dialog;
204
 
        int result;
205
220
 
206
221
        /* if the podcast feed doesn't already exist in the db,
207
222
         * ask if the user wants to add it anyway; if it already
224
239
        gtk_window_set_title (GTK_WINDOW (dialog), "");
225
240
        gtk_container_set_border_width (GTK_CONTAINER (dialog), 6);
226
241
 
227
 
        result = gtk_dialog_run (GTK_DIALOG (dialog));
228
 
        gtk_widget_destroy (dialog);
 
242
        g_object_set_data_full (G_OBJECT (dialog), "feed-url", g_strdup (url), g_free);
 
243
        g_signal_connect (dialog, "response", G_CALLBACK (error_dialog_response_cb), source);
229
244
 
230
 
        /* in the existing feed case, the response will be _OK or _NONE.
231
 
         * we want to return FALSE here in this case, so this check works.
232
 
         */
233
 
        return (result == GTK_RESPONSE_YES);
 
245
        gtk_widget_show_all (dialog);
234
246
}
235
247
 
236
248
static void