pidgin/gtkprefs.c

changeset 17203
0ddb7ad27baa
parent 16626
8b0e5bf44f6b
child 17239
27beb0e7a304
child 17287
72e491a54a63
child 18068
b6554e3c8224
equal deleted inserted replaced
17202:32ab8bec7403 17203:0ddb7ad27baa
1470 pref = g_strdup_printf(PIDGIN_PREFS_ROOT "/sound/file/%s", 1470 pref = g_strdup_printf(PIDGIN_PREFS_ROOT "/sound/file/%s",
1471 pidgin_sound_get_event_option(sound_row_sel)); 1471 pidgin_sound_get_event_option(sound_row_sel));
1472 purple_prefs_set_path(pref, ""); 1472 purple_prefs_set_path(pref, "");
1473 g_free(pref); 1473 g_free(pref);
1474 1474
1475 gtk_entry_set_text(GTK_ENTRY(sound_entry), "(default)"); 1475 gtk_entry_set_text(GTK_ENTRY(sound_entry), _("(default)"));
1476 } 1476 }
1477 1477
1478 static void 1478 static void
1479 sound_chosen_cb(void *user_data, const char *filename) 1479 sound_chosen_cb(void *user_data, const char *filename)
1480 { 1480 {
1559 pref = g_strdup_printf(PIDGIN_PREFS_ROOT "/sound/file/%s", 1559 pref = g_strdup_printf(PIDGIN_PREFS_ROOT "/sound/file/%s",
1560 pidgin_sound_get_event_option(sound_row_sel)); 1560 pidgin_sound_get_event_option(sound_row_sel));
1561 file = purple_prefs_get_path(pref); 1561 file = purple_prefs_get_path(pref);
1562 g_free(pref); 1562 g_free(pref);
1563 if (sound_entry) 1563 if (sound_entry)
1564 gtk_entry_set_text(GTK_ENTRY(sound_entry), (file && *file != '\0') ? file : "(default)"); 1564 gtk_entry_set_text(GTK_ENTRY(sound_entry), (file && *file != '\0') ? file : _("(default)"));
1565 g_value_unset (&val); 1565 g_value_unset (&val);
1566 } 1566 }
1567 1567
1568 static GtkWidget * 1568 static GtkWidget *
1569 sound_page() 1569 sound_page()
1751 sound_entry = gtk_entry_new(); 1751 sound_entry = gtk_entry_new();
1752 pref = g_strdup_printf(PIDGIN_PREFS_ROOT "/sound/file/%s", 1752 pref = g_strdup_printf(PIDGIN_PREFS_ROOT "/sound/file/%s",
1753 pidgin_sound_get_event_option(0)); 1753 pidgin_sound_get_event_option(0));
1754 file = purple_prefs_get_path(pref); 1754 file = purple_prefs_get_path(pref);
1755 g_free(pref); 1755 g_free(pref);
1756 gtk_entry_set_text(GTK_ENTRY(sound_entry), (file && *file != '\0') ? file : "(default)"); 1756 gtk_entry_set_text(GTK_ENTRY(sound_entry), (file && *file != '\0') ? file : _("(default)"));
1757 gtk_editable_set_editable(GTK_EDITABLE(sound_entry), FALSE); 1757 gtk_editable_set_editable(GTK_EDITABLE(sound_entry), FALSE);
1758 gtk_box_pack_start(GTK_BOX(hbox), sound_entry, FALSE, FALSE, PIDGIN_HIG_BOX_SPACE); 1758 gtk_box_pack_start(GTK_BOX(hbox), sound_entry, FALSE, FALSE, PIDGIN_HIG_BOX_SPACE);
1759 1759
1760 button = gtk_button_new_with_label(_("Test")); 1760 button = gtk_button_new_with_label(_("Test"));
1761 g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(test_sound), NULL); 1761 g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(test_sound), NULL);

mercurial