Lines 625-651
Link Here
|
625 |
static void |
625 |
static void |
626 |
ogmrip_profile_editor_dialog_video_codec_combo_changed (OGMRipProfileEditorDialog *dialog, GtkWidget *combo) |
626 |
ogmrip_profile_editor_dialog_video_codec_combo_changed (OGMRipProfileEditorDialog *dialog, GtkWidget *combo) |
627 |
{ |
627 |
{ |
628 |
GtkTreeIter iter; |
628 |
GType codec; |
629 |
|
629 |
|
630 |
if (gtk_combo_box_get_active_iter (GTK_COMBO_BOX (combo), &iter)) |
630 |
codec = ogmrip_combo_box_get_active_video_codec (GTK_COMBO_BOX (combo)); |
|
|
631 |
if (codec != G_TYPE_NONE) |
631 |
{ |
632 |
{ |
632 |
GType codec; |
|
|
633 |
GtkTreeModel *model; |
633 |
GtkTreeModel *model; |
|
|
634 |
GtkTreeIter iter; |
634 |
gboolean exists; |
635 |
gboolean exists; |
635 |
gint active; |
636 |
gint active; |
636 |
gchar *name; |
|
|
637 |
|
637 |
|
638 |
model = gtk_combo_box_get_model (GTK_COMBO_BOX (combo)); |
638 |
model = gtk_combo_box_get_model (GTK_COMBO_BOX (dialog->priv->video_preset_combo)); |
639 |
gtk_tree_model_get (model, &iter, 1, &name, -1); |
|
|
640 |
|
639 |
|
641 |
codec = ogmrip_profile_editor_dialog_get_video_codec_type (dialog, name); |
640 |
if (gtk_tree_model_iter_nth_child (model, &iter, NULL, OGMRIP_VIDEO_PRESET_USER)) |
642 |
g_free (name); |
641 |
gtk_list_store_remove (GTK_LIST_STORE (model), &iter); |
643 |
|
|
|
644 |
gtk_combo_box_remove_text (GTK_COMBO_BOX (dialog->priv->video_preset_combo), OGMRIP_VIDEO_PRESET_USER); |
645 |
|
642 |
|
646 |
exists = ogmrip_options_plugin_exists (codec); |
643 |
exists = ogmrip_options_plugin_exists (codec); |
647 |
if (exists) |
644 |
if (exists) |
648 |
gtk_combo_box_append_text (GTK_COMBO_BOX (dialog->priv->video_preset_combo), _("User")); |
645 |
{ |
|
|
646 |
gtk_list_store_append (GTK_LIST_STORE (model), &iter); |
647 |
gtk_list_store_set (GTK_LIST_STORE (model), &iter, 0, _("User"), -1); |
648 |
} |
649 |
|
649 |
|
650 |
active = gtk_combo_box_get_active (GTK_COMBO_BOX (dialog->priv->video_preset_combo)); |
650 |
active = gtk_combo_box_get_active (GTK_COMBO_BOX (dialog->priv->video_preset_combo)); |
651 |
|
651 |
|
Lines 660-680
Link Here
|
660 |
static void |
660 |
static void |
661 |
ogmrip_profile_editor_dialog_audio_codec_combo_changed (OGMRipProfileEditorDialog *dialog, GtkWidget *combo) |
661 |
ogmrip_profile_editor_dialog_audio_codec_combo_changed (OGMRipProfileEditorDialog *dialog, GtkWidget *combo) |
662 |
{ |
662 |
{ |
663 |
GtkTreeIter iter; |
663 |
if (dialog->priv->audio_options_button) |
664 |
|
|
|
665 |
if (gtk_combo_box_get_active_iter (GTK_COMBO_BOX (combo), &iter)) |
666 |
{ |
664 |
{ |
667 |
GType codec; |
665 |
GType codec; |
668 |
GtkTreeModel *model; |
|
|
669 |
gchar *name; |
670 |
|
666 |
|
671 |
model = gtk_combo_box_get_model (GTK_COMBO_BOX (combo)); |
667 |
codec = ogmrip_combo_box_get_active_audio_codec (GTK_COMBO_BOX (combo)); |
672 |
gtk_tree_model_get (model, &iter, 1, &name, -1); |
668 |
if (codec != G_TYPE_NONE) |
673 |
|
|
|
674 |
codec = ogmrip_profile_editor_dialog_get_audio_codec_type (dialog, name); |
675 |
g_free (name); |
676 |
|
677 |
if (dialog->priv->audio_options_button) |
678 |
gtk_widget_set_sensitive (dialog->priv->audio_options_button, |
669 |
gtk_widget_set_sensitive (dialog->priv->audio_options_button, |
679 |
ogmrip_options_plugin_exists (codec)); |
670 |
ogmrip_options_plugin_exists (codec)); |
680 |
} |
671 |
} |
Lines 683-703
Link Here
|
683 |
static void |
674 |
static void |
684 |
ogmrip_profile_editor_dialog_subp_codec_combo_changed (OGMRipProfileEditorDialog *dialog, GtkWidget *combo) |
675 |
ogmrip_profile_editor_dialog_subp_codec_combo_changed (OGMRipProfileEditorDialog *dialog, GtkWidget *combo) |
685 |
{ |
676 |
{ |
686 |
GtkTreeIter iter; |
677 |
if (dialog->priv->subp_options_button) |
687 |
|
|
|
688 |
if (gtk_combo_box_get_active_iter (GTK_COMBO_BOX (combo), &iter)) |
689 |
{ |
678 |
{ |
690 |
GType codec; |
679 |
GType codec; |
691 |
GtkTreeModel *model; |
|
|
692 |
gchar *name; |
693 |
|
694 |
model = gtk_combo_box_get_model (GTK_COMBO_BOX (combo)); |
695 |
gtk_tree_model_get (model, &iter, 1, &name, -1); |
696 |
|
697 |
codec = ogmrip_profile_editor_dialog_get_subp_codec_type (dialog, name); |
698 |
g_free (name); |
699 |
|
680 |
|
700 |
if (dialog->priv->subp_options_button) |
681 |
codec = ogmrip_combo_box_get_active_subp_codec (GTK_COMBO_BOX (combo)); |
|
|
682 |
if (codec != G_TYPE_NONE) |
701 |
gtk_widget_set_sensitive (dialog->priv->subp_options_button, |
683 |
gtk_widget_set_sensitive (dialog->priv->subp_options_button, |
702 |
ogmrip_options_plugin_exists (codec)); |
684 |
ogmrip_options_plugin_exists (codec)); |
703 |
} |
685 |
} |
Lines 754-760
Link Here
|
754 |
GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE, |
736 |
GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE, |
755 |
NULL); |
737 |
NULL); |
756 |
gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE); |
738 |
gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE); |
|
|
739 |
#if !GTK_CHECK_VERSION(2,22,0) |
757 |
gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE); |
740 |
gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE); |
|
|
741 |
#endif |
758 |
gtk_container_set_border_width (GTK_CONTAINER (dialog), 5); |
742 |
gtk_container_set_border_width (GTK_CONTAINER (dialog), 5); |
759 |
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_CLOSE); |
743 |
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_CLOSE); |
760 |
gtk_window_set_icon_from_stock (GTK_WINDOW (dialog), GTK_STOCK_PREFERENCES); |
744 |
gtk_window_set_icon_from_stock (GTK_WINDOW (dialog), GTK_STOCK_PREFERENCES); |
Lines 951-957
Link Here
|
951 |
dialog->priv->audio_quality_label = glade_xml_get_widget (xml, "audio-quality-label"); |
935 |
dialog->priv->audio_quality_label = glade_xml_get_widget (xml, "audio-quality-label"); |
952 |
dialog->priv->audio_quality_spin = glade_xml_get_widget (xml, "audio-quality-spin"); |
936 |
dialog->priv->audio_quality_spin = glade_xml_get_widget (xml, "audio-quality-spin"); |
953 |
ogmrip_settings_bind (settings, dialog->priv->profile_section, |
937 |
ogmrip_settings_bind (settings, dialog->priv->profile_section, |
954 |
OGMRIP_GCONF_AUDIO_QUALITY, G_OBJECT (widget), "value"); |
938 |
OGMRIP_GCONF_AUDIO_QUALITY, G_OBJECT (dialog->priv->audio_quality_spin), "value"); |
955 |
|
939 |
|
956 |
widget = glade_xml_get_widget (xml, "normalize-check"); |
940 |
widget = glade_xml_get_widget (xml, "normalize-check"); |
957 |
ogmrip_settings_bind (settings, dialog->priv->profile_section, |
941 |
ogmrip_settings_bind (settings, dialog->priv->profile_section, |