diff options
Diffstat (limited to 'gtk/src')
-rw-r--r-- | gtk/src/callbacks.c | 49 | ||||
-rw-r--r-- | gtk/src/ghb.m4 | 424 | ||||
-rw-r--r-- | gtk/src/hb-backend.c | 69 | ||||
-rw-r--r-- | gtk/src/hb-backend.h | 2 | ||||
-rw-r--r-- | gtk/src/internal_defaults.json | 4 | ||||
-rw-r--r-- | gtk/src/main.c | 6 | ||||
-rw-r--r-- | gtk/src/makedeps.py | 2 | ||||
-rw-r--r-- | gtk/src/presets.c | 6 |
8 files changed, 309 insertions, 253 deletions
diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c index a02751a06..eac27e8b9 100644 --- a/gtk/src/callbacks.c +++ b/gtk/src/callbacks.c @@ -592,7 +592,7 @@ set_destination_settings(signal_user_data_t *ud, GhbValue *settings) // If auto-naming is disabled, this will be the default filename. GString *str = g_string_new(""); const gchar *vol_name; - vol_name = ghb_dict_get_string(settings, "volume_label"); + vol_name = ghb_dict_get_string(settings, "volume"); g_string_append_printf(str, "%s", vol_name); g_string_append_printf(str, ".%s", extension); filename = g_string_free(str, FALSE); @@ -610,7 +610,7 @@ set_destination_settings(signal_user_data_t *ud, GhbValue *settings) if (!strncmp(p, "{source}", strlen("{source}"))) { const gchar *vol_name; - vol_name = ghb_dict_get_string(settings, "volume_label"); + vol_name = ghb_dict_get_string(settings, "volume"); g_string_append_printf(str, "%s", vol_name); p += strlen("{source}"); } @@ -847,18 +847,18 @@ update_source_label(signal_user_data_t *ud, const gchar *source) label = get_file_label(filename); } g_free(filename); - GtkWidget *widget = GHB_WIDGET (ud->builder, "volume_label"); + GtkWidget *widget = GHB_WIDGET (ud->builder, "source_label"); if (label != NULL) { gtk_label_set_text (GTK_LABEL(widget), label); - ghb_dict_set_string(ud->globals, "volume_label", label); + ghb_dict_set_string(ud->globals, "volume", label); g_free(label); } else { label = _("No Title Found"); gtk_label_set_text (GTK_LABEL(widget), label); - ghb_dict_set_string(ud->globals, "volume_label", label); + ghb_dict_set_string(ud->globals, "volume", label); return FALSE; } return TRUE; @@ -2169,6 +2169,7 @@ ghb_set_title_settings(signal_user_data_t *ud, GhbValue *settings) if (title != NULL) { GhbValue *job_dict; + char * source_name; job_dict = hb_preset_job_init(ghb_scan_handle(), title_id, settings); ghb_dict_set(settings, "Job", job_dict); @@ -2182,23 +2183,9 @@ ghb_set_title_settings(signal_user_data_t *ud, GhbValue *settings) ghb_dict_set_int(settings, "source_width", title->geometry.width); ghb_dict_set_int(settings, "source_height", title->geometry.height); ghb_dict_set_string(settings, "source", title->path); - if (title->type == HB_STREAM_TYPE || title->type == HB_FF_STREAM_TYPE) - { - if (title->name != NULL && title->name[0] != 0) - { - ghb_dict_set_string(settings, "volume_label", title->name); - } - else - { - gchar *label = _("No Title Found"); - ghb_dict_set_string(settings, "volume_label", label); - } - } - else - { - ghb_dict_set(settings, "volume_label", ghb_value_dup( - ghb_dict_get_value(ud->globals, "volume_label"))); - } + source_name = ghb_create_source_label(title); + ghb_dict_set_string(settings, "source_label", source_name); + ghb_dict_set_string(settings, "volume", source_name); int crop[4]; @@ -2269,6 +2256,11 @@ ghb_set_title_settings(signal_user_data_t *ud, GhbValue *settings) } ghb_sanitize_audio_track_settings(settings); } + else + { + ghb_dict_set_string(settings, "source_label", _("No Title Found")); + ghb_dict_set_string(settings, "volume", _("New Video")); + } set_destination_settings(ud, settings); ghb_dict_set(settings, "dest_dir", ghb_value_dup( @@ -2340,13 +2332,18 @@ static gboolean update_preview = FALSE; G_MODULE_EXPORT void title_changed_cb(GtkWidget *widget, signal_user_data_t *ud) { - gint title_id, titleindex, count; + gint title_id, titleindex, count; const hb_title_t * title; + GtkLabel * title_label; + const char * opt; - g_debug("title_changed_cb ()"); title_id = ghb_widget_int(widget); title = ghb_lookup_title(title_id, &titleindex); + opt = ghb_create_title_label(title); + title_label = GTK_LABEL(GHB_WIDGET(ud->builder, "title_label")); + gtk_label_set_markup(title_label, opt); + count = ghb_array_len(ud->settings_array); int idx = (titleindex >= 0 && titleindex < count) ? titleindex : 0; if (ghb_dict_get_bool(ud->prefs, "SyncTitleSettings")) @@ -3683,7 +3680,7 @@ ghb_backend_events(signal_user_data_t *ud) ghb_update_ui_combo_box(ud, "title", NULL, FALSE); load_all_titles(ud, titleindex); - label = GTK_LABEL(GHB_WIDGET (ud->builder, "volume_label")); + label = GTK_LABEL(GHB_WIDGET (ud->builder, "source_label")); ghb_clear_scan_state(GHB_STATE_SCANDONE); // Are there really any titles. @@ -4502,8 +4499,6 @@ ghb_hbfd(signal_user_data_t *ud, gboolean hbfd) widget = GHB_WIDGET(ud->builder, "show_activity"); gtk_widget_set_visible(widget, !hbfd); - widget = GHB_WIDGET(ud->builder, "chapter_box"); - gtk_widget_set_visible(widget, !hbfd); widget = GHB_WIDGET(ud->builder, "container_box"); gtk_widget_set_visible(widget, !hbfd); widget = GHB_WIDGET(ud->builder, "SettingsStackSwitcher"); diff --git a/gtk/src/ghb.m4 b/gtk/src/ghb.m4 index e026744a9..88ceb5d1a 100644 --- a/gtk/src/ghb.m4 +++ b/gtk/src/ghb.m4 @@ -1025,6 +1025,7 @@ libx264 authors: <property name="visible">True</property> <property name="can_focus">False</property> <property name="hexpand">True</property> + <property name="halign">GTK_ALIGN_FILL</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <child> <object class="GtkToolbar" id="toolbar1"> @@ -1169,14 +1170,32 @@ Activity</property> </packing> </child> <child> - <object class="GtkBox" id="hbox54"> - <property name="orientation">horizontal</property> + <object class="GtkGrid" id="source_title_preset_grid"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> + <property name="hexpand">True</property> + <property name="column_spacing">5</property> + <property name="hexpand">True</property> + <property name="halign">GTK_ALIGN_FILL</property> <property name="margin-start">12</property> <property name="margin-end">12</property> - <property name="margin-bottom">6</property> + <property name="row-spacing">2</property> + <child> + <object class="GtkLabel" id="label7"> + <property name="visible">True</property> + <property name="justify">left</property> + <property name="xalign">0</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes"><b>Source:</b></property> + <property name="use_markup">True</property> + </object> + <packing> + <property name="top_attach">0</property> + <property name="left_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> <child> <object class="GtkBox" id="SourceInfoBox"> <property name="orientation">horizontal</property> @@ -1185,20 +1204,7 @@ Activity</property> <property name="spacing">6</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <child> - <object class="GtkLabel" id="label7"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label" translatable="yes"><b>Source:</b></property> - <property name="use_markup">True</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="volume_label"> + <object class="GtkLabel" id="source_label"> <property name="visible">True</property> <property name="max-width-chars">60</property> <property name="can_focus">False</property> @@ -1230,9 +1236,10 @@ Activity</property> </child> </object> <packing> - <property name="expand">True</property> - <property name="fill">True</property> - <property name="position">0</property> + <property name="top_attach">0</property> + <property name="left_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> </packing> </child> <child> @@ -1241,6 +1248,8 @@ Activity</property> <property name="visible">False</property> <property name="can_focus">False</property> <property name="spacing">6</property> + <property name="hexpand">True</property> + <property name="halign">GTK_ALIGN_FILL</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <child> <object class="GtkLabel" id="source_scan_label"> @@ -1275,38 +1284,23 @@ Activity</property> </child> </object> <packing> - <property name="expand">True</property> - <property name="fill">True</property> - <property name="position">1</property> + <property name="top_attach">0</property> + <property name="left_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> </packing> </child> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">1</property> - </packing> - </child> - <child> - <object class="GtkGrid" id="table7"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="hexpand">True</property> - <property name="column_spacing">5</property> - <property name="hexpand">True</property> - <property name="halign">GTK_ALIGN_FILL</property> - <property name="margin-start">12</property> - <property name="margin-end">12</property> - <property name="row-spacing">2</property> <child> <object class="GtkLabel" id="label20"> <property name="visible">True</property> + <property name="justify">left</property> + <property name="xalign">0</property> <property name="can_focus">False</property> - <property name="halign">end</property> - <property name="label" translatable="yes">Title:</property> + <property name="use_markup">True</property> + <property name="label" translatable="yes"><b>Title:</b></property> </object> <packing> - <property name="top_attach">0</property> + <property name="top_attach">1</property> <property name="left_attach">0</property> <property name="width">1</property> <property name="height">1</property> @@ -1318,19 +1312,46 @@ Activity</property> <property name="visible">True</property> <property name="can_focus">False</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> - <property name="hexpand">True</property> - <property name="halign">GTK_ALIGN_FILL</property> + <property name="hexpand">False</property> + <property name="halign">start</property> <property name="spacing">5</property> <child> <object class="GtkComboBox" id="title"> <property name="visible">True</property> <property name="valign">GTK_ALIGN_CENTER</property> <property name="can_focus">False</property> + <property name="hexpand">False</property> <property name="halign">start</property> + <property name="width-request">100</property> + <property name="wrap-width">1</property> + <property name="popup-fixed-width">False</property> <property name="tooltip_text" translatable="yes">Set the title to encode. By default the longest title is chosen. This is often the feature title of a DVD.</property> <property name="has_frame">False</property> + <child> + <object class="GtkFrame" id="title_frame"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> + <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property> + <child> + <object class="GtkLabel" id="title_label"> + <property name="width-chars">30</property> + <property name="max-width-chars">30</property> + <property name="ellipsize">end</property> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin-start">6</property> + <property name="margin-end">6</property> + <property name="halign">start</property> + <property name="xalign">0.0</property> + <property name="use_markup">True</property> + <property name="label" translatable="yes"><small>No Titles</small></property> + </object> + </child> + </object> + </child> <signal name="changed" handler="title_changed_cb" swapped="no"/> </object> <packing> @@ -1344,7 +1365,9 @@ This is often the feature title of a DVD.</property> <property name="visible">False</property> <property name="can_focus">False</property> <property name="halign">end</property> - <property name="label" translatable="yes">Angle:</property> + <property name="use_markup">True</property> + <property name="margin-start">6</property> + <property name="label" translatable="yes"><b>Angle:</b></property> </object> <packing> <property name="expand">False</property> @@ -1371,23 +1394,21 @@ This is often the feature title of a DVD.</property> <property name="position">2</property> </packing> </child> - </object> - <packing> - <property name="top_attach">0</property> - <property name="left_attach">1</property> - <property name="width">1</property> - <property name="height">1</property> - </packing> - </child> - <child> - <object class="GtkBox" id="chapter_box"> - <property name="halign">start</property> - <property name="valign">center</property> - <property name="orientation">horizontal</property> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> - <property name="spacing">5</property> + <child> + <object class="GtkLabel" id="range_label"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="halign">end</property> + <property name="use_markup">True</property> + <property name="margin-start">6</property> + <property name="label" translatable="yes"><b>Range:</b></property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">3</property> + </packing> + </child> <child> <object class="GtkComboBox" id="PtoPType"> <property name="visible">True</property> @@ -1399,12 +1420,12 @@ This is often the feature title of a DVD.</property> <packing> <property name="expand">False</property> <property name="fill">True</property> - <property name="position">0</property> + <property name="position">4</property> </packing> </child> <child> <object class="GtkSpinButton" id="start_point"> - <property name="width-chars">10</property> + <property name="width-chars">11</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> @@ -1420,24 +1441,24 @@ This is often the feature title of a DVD.</property> <packing> <property name="expand">False</property> <property name="fill">True</property> - <property name="position">1</property> + <property name="position">5</property> </packing> </child> <child> <object class="GtkLabel" id="label56"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="label" translatable="yes">through</property> + <property name="label" translatable="yes">-</property> </object> <packing> <property name="expand">False</property> <property name="fill">True</property> - <property name="position">2</property> + <property name="position">6</property> </packing> </child> <child> <object class="GtkSpinButton" id="end_point"> - <property name="width-chars">10</property> + <property name="width-chars">11</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> @@ -1453,49 +1474,7 @@ This is often the feature title of a DVD.</property> <packing> <property name="expand">False</property> <property name="fill">True</property> - <property name="position">3</property> - </packing> - </child> - <child> - <object class="GtkBox" id="hbox47"> - <property name="orientation">horizontal</property> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> - <property name="spacing">7</property> - <child> - <object class="GtkLabel" id="label6"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="halign">start</property> - <property name="label" translatable="yes">Duration:</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="title_duration"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> - <property name="halign">start</property> - <property name="label" translatable="yes">hh:mm:ss</property> - <property name="width-chars">8</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">1</property> - </packing> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">4</property> + <property name="position">7</property> </packing> </child> </object> @@ -1506,120 +1485,123 @@ This is often the feature title of a DVD.</property> <property name="height">1</property> </packing> </child> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">2</property> - </packing> - </child> - <child> - <object class="GtkBox" id="preset_selection_box"> - <property name="halign">start</property> - <property name="valign">center</property> - <property name="orientation">horizontal</property> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> - <property name="margin-start">12</property> - <property name="margin-end">12</property> - <property name="margin-top">6</property> - <property name="spacing">5</property> <child> <object class="GtkLabel" id="preset_selection_label"> <property name="visible">True</property> + <property name="justify">left</property> + <property name="xalign">0</property> <property name="can_focus">False</property> <property name="label" translatable="yes"><b>Preset:</b></property> <property name="use_markup">True</property> </object> <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">0</property> + <property name="top_attach">2</property> + <property name="left_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> </packing> </child> <child> - <object class="GtkMenuButton" id="presets_menu_button"> + <object class="GtkBox" id="preset_selection_box"> + <property name="halign">start</property> + <property name="valign">center</property> + <property name="orientation">horizontal</property> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="direction">right</property> + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> + <property name="margin-end">12</property> + <property name="margin-top">6</property> + <property name="spacing">5</property> <child> - <object class="GtkBox" id="presets_menu_button_box"> - <property name="orientation">horizontal</property> + <object class="GtkMenuButton" id="presets_menu_button"> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="direction">right</property> <child> - <object class="GtkLabel" id="presets_menu_button_label"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="width-chars">50</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">Choose Preset</property> - <property name="use_markup">True</property> - </object> - <packing> - <property name="expand">True</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkImage" id="presets_menu_button_arrow"> + <object class="GtkBox" id="presets_menu_button_box"> + <property name="orientation">horizontal</property> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="icon_name">pan-end-symbolic</property> + <child> + <object class="GtkLabel" id="presets_menu_button_label"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="width-chars">50</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Choose Preset</property> + <property name="use_markup">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkImage" id="presets_menu_button_arrow"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="icon_name">pan-end-symbolic</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">1</property> - </packing> </child> </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="preset_selection_modified_label"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="width-chars">10</property> + <property name="label" translatable="yes"></property> + <property name="use_markup">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + <child> + <object class="GtkButton" id="preset_selection_reload"> + <property name="label" translatable="yes">Reload</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="tooltip_text" translatable="yes">Reload the encoding settings for the currently selected preset. + Modifications will be discarded.</property> + <property name="receives_default">True</property> + <property name="halign">end</property> + <property name="action-name">app.preset-reload</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">3</property> + </packing> </child> </object> <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">1</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="preset_selection_modified_label"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="width-chars">10</property> - <property name="label" translatable="yes"></property> - <property name="use_markup">True</property> - </object> - <packing> - <property name="expand">True</property> - <property name="fill">True</property> - <property name="position">2</property> - </packing> - </child> - <child> - <object class="GtkButton" id="preset_selection_reload"> - <property name="label" translatable="yes">Reload</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="tooltip_text" translatable="yes">Reload the encoding settings for the currently selected preset. -Modifications will be discarded.</property> - <property name="receives_default">True</property> - <property name="halign">end</property> - <property name="action-name">app.preset-reload</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">3</property> + <property name="top_attach">2</property> + <property name="left_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> </packing> </child> </object> <packing> <property name="expand">False</property> <property name="fill">True</property> - <property name="position">3</property> + <property name="position">1</property> </packing> </child> </object> @@ -1783,6 +1765,44 @@ sync for broken players that do not honor MP4 edit lists.</property> </packing> </child> <child> + <object class="GtkLabel" id="label6"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="yalign">0</property> + <property name="halign">start</property> + <property name="use_markup">True</property> + <property name="margin-top">12</property> + <property name="label" translatable="yes"><b>Duration:</b></property> + </object> + <packing> + <property name="top_attach">4</property> + <property name="left_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="title_duration"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> + <property name="halign">start</property> + <property name="xalign">0</property> + <property name="yalign">0</property> + <property name="hexpand">False</property> + <property name="label" translatable="yes">hh:mm:ss</property> + <property name="margin-top">12</property> + <property name="width-chars">8</property> + </object> + <packing> + <property name="top_attach">4</property> + <property name="left_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> <object class="GtkLabel" id="tracks_summary_label"> <property name="visible">True</property> <property name="can_focus">False</property> @@ -1794,7 +1814,7 @@ sync for broken players that do not honor MP4 edit lists.</property> <property name="use_markup">True</property> </object> <packing> - <property name="top_attach">4</property> + <property name="top_attach">5</property> <property name="left_attach">0</property> <property name="width">1</property> <property name="height">1</property> @@ -1816,7 +1836,7 @@ sync for broken players that do not honor MP4 edit lists.</property> <property name="use_markup">True</property> </object> <packing> - <property name="top_attach">4</property> + <property name="top_attach">5</property> <property name="left_attach">1</property> <property name="width">1</property> <property name="height">8</property> @@ -1834,7 +1854,7 @@ sync for broken players that do not honor MP4 edit lists.</property> <property name="margin-top">12</property> </object> <packing> - <property name="top_attach">12</property> + <property name="top_attach">13</property> <property name="left_attach">0</property> <property name="width">1</property> <property name="height">1</property> @@ -1856,7 +1876,7 @@ sync for broken players that do not honor MP4 edit lists.</property> <property name="use_markup">True</property> </object> <packing> - <property name="top_attach">12</property> + <property name="top_attach">13</property> <property name="left_attach">1</property> <property name="width">1</property> <property name="height">4</property> @@ -7009,7 +7029,7 @@ This file may be reloaded at a later time to edit your jobs and re-encode.</prop <property name="halign">end</property> <property name="margin-end">6</property> <property name="use_markup">True</property> - <property name="label" translatable="yes"><b>Destination:</b></property> + <property name="label" translatable="yes"><b>Save As:</b></property> </object> <packing> <property name="top_attach">0</property> diff --git a/gtk/src/hb-backend.c b/gtk/src/hb-backend.c index 126146cd3..310db858e 100644 --- a/gtk/src/hb-backend.c +++ b/gtk/src/hb-backend.c @@ -1335,9 +1335,9 @@ ghb_init_combo_box(GtkComboBox *combo) { gtk_cell_layout_clear(GTK_CELL_LAYOUT(combo)); cell = GTK_CELL_RENDERER(gtk_cell_renderer_text_new()); - g_object_set(cell, "max-width-chars", 60, NULL); + g_object_set(cell, "max-width-chars", 80, NULL); g_object_set(cell, "ellipsize", PANGO_ELLIPSIZE_END, NULL); - gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(combo), cell, TRUE); + gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(combo), cell, FALSE); gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(combo), cell, "markup", 0, "sensitive", 1, NULL); } @@ -2051,16 +2051,51 @@ language_opts_set(signal_user_data_t *ud, const gchar *name, } gchar* +ghb_create_source_label(const hb_title_t * title) +{ + char * volname; + char * source; + + if (title != NULL && title->name != NULL && title->name[0] != 0) + { + volname = strdup(title->name); + if (title->type == HB_DVD_TYPE) + { + ghb_sanitize_volname(volname); + } + if (title->type == HB_BD_TYPE) + { + source = g_strdup_printf(_("%s - (%05d.MPLS)"), + volname, title->playlist); + g_free(volname); + } + else + { + source = volname; + } + } + else + { + source = g_strdup(_("No Title Found")); + } + return source; +} + +gchar* ghb_create_title_label(const hb_title_t *title) { gchar *label; + if (title == NULL) + { + return g_strdup(_("No Title Found")); + } if (title->type == HB_STREAM_TYPE || title->type == HB_FF_STREAM_TYPE) { if (title->duration != 0) { char *tmp; - tmp = g_strdup_printf (_("%d - %02dh%02dm%02ds - %s"), + tmp = g_strdup_printf (_("%3d - %02dh%02dm%02ds - %s"), title->index, title->hours, title->minutes, title->seconds, title->name); label = g_markup_escape_text(tmp, -1); @@ -2069,7 +2104,7 @@ ghb_create_title_label(const hb_title_t *title) else { char *tmp; - tmp = g_strdup_printf ("%d - %s", + tmp = g_strdup_printf ("%3d - %s", title->index, title->name); label = g_markup_escape_text(tmp, -1); g_free(tmp); @@ -2079,28 +2114,20 @@ ghb_create_title_label(const hb_title_t *title) { if (title->duration != 0) { - label = g_strdup_printf(_("%d (%05d.MPLS) - %02dh%02dm%02ds"), - title->index, title->playlist, title->hours, - title->minutes, title->seconds); + label = g_strdup_printf(_("%3d - %02dh%02dm%02ds - (%05d.MPLS)"), + title->index, title->hours, title->minutes, + title->seconds, title->playlist); } else { - label = g_strdup_printf(_("%d (%05d.MPLS) - Unknown Length"), + label = g_strdup_printf(_("%3d - (%05d.MPLS)"), title->index, title->playlist); } } else { - if (title->duration != 0) - { - label = g_strdup_printf(_("%d - %02dh%02dm%02ds"), - title->index, title->hours, title->minutes, title->seconds); - } - else - { - label = g_strdup_printf(_("%d - Unknown Length"), - title->index); - } + label = g_strdup_printf(_("%3d - %02dh%02dm%02ds"), + title->index, title->hours, title->minutes, title->seconds); } return label; } @@ -4707,8 +4734,8 @@ ghb_get_preview_image( return preview; } -static void -sanitize_volname(gchar *name) +void +ghb_sanitize_volname(gchar *name) { gchar *a, *b; @@ -4740,7 +4767,7 @@ ghb_dvd_volname(const gchar *device) if (name != NULL && name[0] != 0) { name = g_strdup(name); - sanitize_volname(name); + ghb_sanitize_volname(name); return name; } return NULL; diff --git a/gtk/src/hb-backend.h b/gtk/src/hb-backend.h index d3c1410b5..e6b5c4883 100644 --- a/gtk/src/hb-backend.h +++ b/gtk/src/hb-backend.h @@ -230,5 +230,7 @@ char * ghb_get_display_aspect_string(int disp_width, int disp_height); hb_handle_t* ghb_scan_handle(void); hb_handle_t* ghb_queue_handle(void); hb_handle_t* ghb_live_handle(void); +void ghb_sanitize_volname(gchar *name); +gchar* ghb_create_source_label(const hb_title_t * title); #endif // _HBBACKEND_H_ diff --git a/gtk/src/internal_defaults.json b/gtk/src/internal_defaults.json index 91027d825..967a80c31 100644 --- a/gtk/src/internal_defaults.json +++ b/gtk/src/internal_defaults.json @@ -3,7 +3,7 @@ "SkipDiskFreeCheck": false, "show_preview": false, "scan_source": "", - "volume_label": "New Video" + "volume": "New Video" }, "OneTimeInitialization": { "title": "none" @@ -53,7 +53,7 @@ "start_point": 1.0, "start_frame": -1, "title_selected": false, - "volume_label": "New Video", + "source_label": "New Video", "chapter_list": [], "vquality_type_bitrate": false, "vquality_type_constant": false, diff --git a/gtk/src/main.c b/gtk/src/main.c index 6fc69d8e4..5046f0e4c 100644 --- a/gtk/src/main.c +++ b/gtk/src/main.c @@ -795,6 +795,12 @@ const gchar *MyCSS = background-color: @gray32; \n\ color: @white; \n\ } \n\ + \n\ +entry \n\ +{ \n\ + margin: 0px 0px 0px 0px; \n\ + padding: 0px 0px 0px 0px; \n\ +} \n\ " #if GTK_CHECK_VERSION(3, 20, 0) " \n\ diff --git a/gtk/src/makedeps.py b/gtk/src/makedeps.py index e78b39fd8..4dae9d0e0 100644 --- a/gtk/src/makedeps.py +++ b/gtk/src/makedeps.py @@ -11,7 +11,7 @@ dep_map = ( DepEntry("title", "start_point", "none", True, False), DepEntry("title", "end_point", "none", True, False), DepEntry("title", "angle", "none", True, False), - DepEntry("title", "angle_label", "1", True, False), + DepEntry("title", "angle_label", "none", True, False), DepEntry("angle_count", "angle", "1", True, True), DepEntry("angle_count", "angle_label", "1", True, True), DepEntry("vquality_type_bitrate", "VideoAvgBitrate", "1", False, False), diff --git a/gtk/src/presets.c b/gtk/src/presets.c index 9a650e3de..3978e444c 100644 --- a/gtk/src/presets.c +++ b/gtk/src/presets.c @@ -2706,6 +2706,7 @@ presets_list_selection_changed_cb(GtkTreeSelection *selection, signal_user_data_ { GtkLabel * label; GSimpleAction * action; + GtkWidget * widget; set_preset_menu_button_label(ud, path); label = GTK_LABEL(GHB_WIDGET(ud->builder, @@ -2714,6 +2715,8 @@ presets_list_selection_changed_cb(GtkTreeSelection *selection, signal_user_data_ action = G_SIMPLE_ACTION(g_action_map_lookup_action( G_ACTION_MAP(ud->app), "preset-reload")); g_simple_action_set_enabled(action, FALSE); + widget = GHB_WIDGET(ud->builder, "preset_selection_reload"); + gtk_widget_set_visible(widget, FALSE); } free(path); } @@ -2726,6 +2729,7 @@ ghb_clear_presets_selection(signal_user_data_t *ud) GtkTreeSelection * selection; GtkLabel * label; GSimpleAction * action; + GtkWidget * widget; if (ud->dont_clear_presets) return; treeview = GTK_TREE_VIEW(GHB_WIDGET(ud->builder, "presets_list")); @@ -2740,6 +2744,8 @@ ghb_clear_presets_selection(signal_user_data_t *ud) action = G_SIMPLE_ACTION(g_action_map_lookup_action(G_ACTION_MAP(ud->app), "preset-reload")); g_simple_action_set_enabled(action, TRUE); + widget = GHB_WIDGET(ud->builder, "preset_selection_reload"); + gtk_widget_set_visible(widget, TRUE); } G_MODULE_EXPORT void |