~snaggen/rhythmbox/bpm

« back to all changes in this revision

Viewing changes to daapsharing/rb-daap-dialog.c

  • Committer: Jonathan Matthew
  • Author(s): Jonathan Matthew
  • Date: 2007-01-07 12:16:12 UTC
  • Revision ID: git-v1:5b6958ea3cf24f2c8bcfa15b9cab1fc7798b7305
Moved lots of files around. Now everything should be in the directory it's

2007-01-07  Jonathan Matthew  <jonathan@kaolin.wh9.net>

        Moved lots of files around.  Now everything should be in the directory
        it's built in and all plugin-specific files should be installed into
        the plugin directory.

        * plugins/audioscrobbler/rb-audioscrobbler-plugin.c:
        (impl_create_configure_dialog):
        * plugins/audioscrobbler/rb-audioscrobbler.c:
        (rb_audioscrobbler_class_init), (rb_audioscrobbler_dispose),
        (rb_audioscrobbler_finalize),
        (rb_audioscrobbler_get_config_widget):
        * plugins/audioscrobbler/rb-audioscrobbler.h:
        Use rb_plugin_find_file where needed.

        * widgets/rb-uri-dialog.c: (rb_uri_dialog_class_init),
        (rb_uri_dialog_init), (rb_uri_dialog_finalize),
        (rb_uri_dialog_new), (rb_uri_dialog_response_cb),
        (rb_uri_dialog_text_changed):
        * widgets/rb-uri-dialog.h:
        New common 'enter a URI' dialog, used by iradio and podcast code.

        * plugins/iradio/rb-iradio-plugin.c: (impl_activate):
        * plugins/iradio/rb-iradio-source.c:
        (rb_iradio_source_constructor), (rb_iradio_source_new),
        (impl_song_properties), (rb_iradio_source_first_time_changed),
        (new_station_location_added), (rb_iradio_source_cmd_new_station):
        * plugins/iradio/rb-iradio-source.h:
        * plugins/iradio/rb-station-properties-dialog.c:
        (rb_station_properties_dialog_class_init),
        (rb_station_properties_dialog_init),
        (rb_station_properties_dialog_constructor),
        (rb_station_properties_dialog_set_property),
        (rb_station_properties_dialog_get_property),
        (rb_station_properties_dialog_new):
        * plugins/iradio/rb-station-properties-dialog.h:
        Use the common URI dialog, use rb_plugin_find_file where needed.

        * sources/rb-podcast-source.c:
        (rb_podcast_source_location_added_cb),
        (rb_podcast_source_cmd_new_podcast):
        Use the common URI dialog.

svn path=/trunk/; revision=4725

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
2
 
 *
3
 
 *  Implementation of DAAP (iTunes Music Sharing) dialogs
4
 
 *  (password & name collision)
5
 
 *
6
 
 *  Copyright (C) 2005 Charles Schmidt <cschmidt2@emich.edu>
7
 
 *
8
 
 *  This program is free software; you can redistribute it and/or modify
9
 
 *  it under the terms of the GNU General Public License as published by
10
 
 *  the Free Software Foundation; either version 2 of the License, or
11
 
 *  (at your option) any later version.
12
 
 *
13
 
 *  This program is distributed in the hope that it will be useful,
14
 
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
 
 *  GNU General Public License for more details.
17
 
 *
18
 
 *  You should have received a copy of the GNU General Public License
19
 
 *  along with this program; if not, write to the Free Software
20
 
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA.
21
 
 *
22
 
 */
23
 
 
24
 
#include "config.h"
25
 
 
26
 
#include <string.h>
27
 
 
28
 
#include <glib/gi18n.h>
29
 
#include <glib/gprintf.h>
30
 
#include <gtk/gtk.h>
31
 
 
32
 
#include "rb-daap-dialog.h"
33
 
 
34
 
char *
35
 
rb_daap_collision_dialog_new_run (GtkWindow  *parent,
36
 
                                  const char *old_name)
37
 
{
38
 
        GtkWidget *dialog;
39
 
        GtkWidget *hbox;
40
 
        GtkWidget *image;
41
 
        GtkWidget *vbox;
42
 
        char *s;
43
 
        GtkWidget *label;
44
 
        GtkWidget *entry;
45
 
        gint resp;
46
 
 
47
 
        dialog = gtk_dialog_new_with_buttons (_("Invalid share name"),
48
 
                                              parent,
49
 
                                              GTK_DIALOG_DESTROY_WITH_PARENT,
50
 
                                              GTK_STOCK_OK,
51
 
                                              GTK_RESPONSE_OK,
52
 
                                              NULL);
53
 
        gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
54
 
        gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
55
 
 
56
 
        hbox = gtk_hbox_new (FALSE, 6);
57
 
        gtk_container_set_border_width (GTK_CONTAINER (hbox), 12);
58
 
        gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), hbox, TRUE, TRUE, 0);
59
 
 
60
 
        image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_ERROR, GTK_ICON_SIZE_DIALOG);
61
 
        gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0);
62
 
 
63
 
        vbox = gtk_vbox_new (FALSE, 6);
64
 
        gtk_box_pack_start (GTK_BOX (hbox), vbox, TRUE, TRUE, 0);
65
 
 
66
 
        s = g_strdup_printf (_("The shared music name '%s' is already taken. Please choose another."), old_name);
67
 
        label = gtk_label_new (s);
68
 
        gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
69
 
        g_free (s);
70
 
 
71
 
        hbox = gtk_hbox_new (FALSE, 12);
72
 
        gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
73
 
 
74
 
        label = gtk_label_new_with_mnemonic (_("Shared music _name:"));
75
 
        gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
76
 
 
77
 
        entry = gtk_entry_new ();
78
 
        gtk_box_pack_start (GTK_BOX (hbox), entry, TRUE, TRUE, 0);
79
 
        gtk_label_set_mnemonic_widget (GTK_LABEL (label), entry);
80
 
        gtk_entry_set_text (GTK_ENTRY (entry), old_name);
81
 
        gtk_entry_set_activates_default (GTK_ENTRY (entry), TRUE);
82
 
 
83
 
        gtk_widget_show_all (dialog);
84
 
 
85
 
        do {
86
 
                resp = gtk_dialog_run (GTK_DIALOG (dialog));
87
 
        } while (resp != GTK_RESPONSE_OK);
88
 
 
89
 
        s = g_strdup (gtk_entry_get_text (GTK_ENTRY (entry)));
90
 
        gtk_widget_destroy (dialog);
91
 
 
92
 
        return s;
93
 
}