changeset 2900:36b68e7ad725

added stream parameters widgets
author Andrew O. Shadoura <bugzilla@tut.by>
date Wed, 13 Aug 2008 13:36:54 +0300
parents 130ab8a76ce6
children 167606c02d76
files src/icecast/icecast.c
diffstat 1 files changed, 60 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/icecast/icecast.c	Wed Aug 13 12:41:36 2008 +0300
+++ b/src/icecast/icecast.c	Wed Aug 13 13:36:54 2008 +0300
@@ -518,7 +518,7 @@
     stream_genre = g_strdup(gtk_entry_get_text(GTK_ENTRY(genre_entry)));
 
     g_free(stream_description);
-    stream_description = g_strdup(gtk_entry_get_text(GTK_ENTRY(genre_entry)));
+    stream_description = g_strdup(gtk_entry_get_text(GTK_ENTRY(description_entry)));
 
     db = aud_cfg_db_open();
     aud_cfg_db_set_int(db, ICECAST_CFGID, "streamformat", streamformat);
@@ -721,6 +721,65 @@
 
         gtk_box_pack_start(GTK_BOX(configure_vbox), gtk_hseparator_new(), FALSE, FALSE, 0);
 
+        hbox = gtk_hbox_new(FALSE, 5);
+        gtk_box_pack_start(GTK_BOX(configure_vbox), hbox, FALSE, FALSE, 0);
+
+        public_check = gtk_check_button_new_with_label(_("Stream is public"));
+
+        gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(public_check), stream_is_public?TRUE:FALSE);
+
+        gtk_box_pack_start(GTK_BOX(hbox), public_check, TRUE, TRUE, 0);
+
+        hbox = gtk_hbox_new(FALSE, 5);
+        gtk_box_pack_start(GTK_BOX(configure_vbox), hbox, FALSE, FALSE, 0);
+
+        label = gtk_label_new(_("Stream name:"));
+        gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
+
+        name_entry = gtk_entry_new();
+
+	gtk_entry_set_text(GTK_ENTRY(name_entry), stream_name);
+
+        gtk_box_pack_start(GTK_BOX(hbox), name_entry, TRUE, TRUE, 0);
+
+        hbox = gtk_hbox_new(FALSE, 5);
+        gtk_box_pack_start(GTK_BOX(configure_vbox), hbox, FALSE, FALSE, 0);
+
+        label = gtk_label_new(_("Stream URL:"));
+        gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
+
+        url_entry = gtk_entry_new();
+
+	gtk_entry_set_text(GTK_ENTRY(url_entry), stream_url);
+
+        gtk_box_pack_start(GTK_BOX(hbox), url_entry, TRUE, TRUE, 0);
+
+        hbox = gtk_hbox_new(FALSE, 5);
+        gtk_box_pack_start(GTK_BOX(configure_vbox), hbox, FALSE, FALSE, 0);
+
+        label = gtk_label_new(_("Stream genre:"));
+        gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
+
+        genre_entry = gtk_entry_new();
+
+	gtk_entry_set_text(GTK_ENTRY(genre_entry), stream_genre);
+
+        gtk_box_pack_start(GTK_BOX(hbox), genre_entry, TRUE, TRUE, 0);
+
+        hbox = gtk_hbox_new(FALSE, 5);
+        gtk_box_pack_start(GTK_BOX(configure_vbox), hbox, FALSE, FALSE, 0);
+
+        label = gtk_label_new(_("Stream description:"));
+        gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
+
+        description_entry = gtk_entry_new();
+
+	gtk_entry_set_text(GTK_ENTRY(description_entry), stream_description);
+
+        gtk_box_pack_start(GTK_BOX(hbox), description_entry, TRUE, TRUE, 0);
+
+        gtk_box_pack_start(GTK_BOX(configure_vbox), gtk_hseparator_new(), FALSE, FALSE, 0);
+
         configure_bbox = gtk_hbutton_box_new();
         gtk_button_box_set_layout(GTK_BUTTON_BOX(configure_bbox),
                                   GTK_BUTTONBOX_END);