fix for deprecation of old gtk_combo behavior in gtk
This commit is contained in:
parent
c70968d825
commit
7c796baa9b
|
@ -84,7 +84,7 @@ gboolean darksnow_config_store(char opt, char *save_path) {
|
|||
adddate = (char) (gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON (checkbutton_adddate) ))? '1': '0';
|
||||
|
||||
/* Combo box inputs */
|
||||
icecast = (char *) gtk_entry_get_text ( GTK_ENTRY( GTK_COMBO(combo_icecast)->entry));
|
||||
icecast = (char *) gtk_combo_box_get_active_text(GTK_COMBO_BOX(combo_icecast));
|
||||
format = (char *) gtk_entry_get_text ( GTK_ENTRY(GTK_COMBO (combo_format)->entry ));
|
||||
bitrate = (char *) gtk_entry_get_text ( GTK_ENTRY(GTK_COMBO(combo_bitrate)->entry));
|
||||
bitratemode = (char *) gtk_entry_get_text ( GTK_ENTRY(GTK_COMBO(combo_bitratemode)->entry));
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* This source code is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Public License as published
|
||||
* by the Free Software Foundation; either version 2 of the License,
|
||||
* by the Free Software Foundation; either version 3 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This source code is distributed in the hope that it will be useful,
|
||||
|
@ -230,13 +230,11 @@ int main( int argc, char *argv[], char *envp[]) {
|
|||
|
||||
/* Server Options Widgets */
|
||||
label_icecast = gtk_label_new ( gettext("Streaming Destination: "));
|
||||
combo_icecast = gtk_combo_new ();
|
||||
glist_icecast = NULL;
|
||||
glist_icecast = g_list_append (glist_icecast, "Icecast 1");
|
||||
glist_icecast = g_list_append (glist_icecast, "Icecast 2");
|
||||
glist_icecast = g_list_append (glist_icecast, "Shoutcast");
|
||||
gtk_combo_set_popdown_strings (GTK_COMBO (combo_icecast), glist_icecast);
|
||||
gtk_entry_set_text ( GTK_ENTRY(GTK_COMBO(combo_icecast)->entry), "Icecast 2");
|
||||
combo_icecast = gtk_combo_box_entry_new_text();
|
||||
gchar *txt[] = {"Icecast 1", "Icecast 2", "Shoutcast", NULL };
|
||||
gchar **p=txt;
|
||||
while (*p) gtk_combo_box_append_text(GTK_COMBO_BOX(combo_icecast), *p++);
|
||||
gtk_combo_box_set_active ( GTK_COMBO_BOX(combo_icecast), 1);
|
||||
|
||||
label_server = gtk_label_new ( gettext("Server: "));
|
||||
entry_server = gtk_entry_new ();
|
||||
|
|
|
@ -192,7 +192,12 @@ void dark_put_in_box ( GtkWidget *widget, gpointer data ) {
|
|||
gtk_entry_set_text ( (GtkEntry *) entry_server, server);
|
||||
gtk_entry_set_text ( (GtkEntry *) entry_remotedump, remotedump);
|
||||
gtk_entry_set_text ( (GtkEntry *) entry_localdump, localdump);
|
||||
gtk_entry_set_text ( GTK_ENTRY(GTK_COMBO(combo_icecast)->entry), icecast);
|
||||
if (strcmp(icecast, "Icecast 1") == 0)
|
||||
gtk_combo_box_set_active ( GTK_COMBO_BOX(combo_icecast), 0);
|
||||
if (strcmp(icecast, "Icecast 2") == 0)
|
||||
gtk_combo_box_set_active ( GTK_COMBO_BOX(combo_icecast), 1);
|
||||
if (strcmp(icecast, "Shoutcast") == 0)
|
||||
gtk_combo_box_set_active ( GTK_COMBO_BOX(combo_icecast), 2);
|
||||
gtk_entry_set_text ( GTK_ENTRY(GTK_COMBO(combo_format)->entry), format);
|
||||
gtk_entry_set_text ( GTK_ENTRY(GTK_COMBO(combo_bitrate)->entry), bitrate);
|
||||
gtk_entry_set_text ( GTK_ENTRY(GTK_COMBO(combo_bitratemode)->entry), bitratemode);
|
||||
|
|
Loading…
Reference in New Issue