summaryrefslogtreecommitdiffstats
path: root/gtk/src/queuehandler.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2015-05-06 16:04:08 +0000
committerjstebbins <[email protected]>2015-05-06 16:04:08 +0000
commit9c0e97cc2c369e0c720441d182bbde20210742f4 (patch)
tree8b8f74ed24d0f617c9980d9043ebd53c33c531f3 /gtk/src/queuehandler.c
parent81bcee10d2ad88f44c0f7791f2dd8da4ee2c1b76 (diff)
libhb,cli: add preset management to libhb, use it in cli
This results in custom preset support in the CLI and additional command line options to fully support all preset keys. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7158 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk/src/queuehandler.c')
-rw-r--r--gtk/src/queuehandler.c30
1 files changed, 10 insertions, 20 deletions
diff --git a/gtk/src/queuehandler.c b/gtk/src/queuehandler.c
index 67ce7dca4..876d49ec9 100644
--- a/gtk/src/queuehandler.c
+++ b/gtk/src/queuehandler.c
@@ -236,13 +236,14 @@ add_to_queue_list(signal_user_data_t *ud, GhbValue *settings, GtkTreeIter *piter
// Next line in the display (Picture settings)
// Picture: Source: W x H, Output W x H (Animorphic), Display W x H
- int width, height, pic_par;
+ const char *pic_par;
+ int width, height;
int crop[4];
gboolean keep_aspect;
width = ghb_dict_get_int(settings, "scale_width");
height = ghb_dict_get_int(settings, "scale_height");
- pic_par = ghb_dict_get_int(settings, "PicturePAR");
+ pic_par = ghb_dict_get_string(settings, "PicturePAR");
keep_aspect = ghb_dict_get_bool(settings, "PictureKeepRatio");
crop[0] = ghb_dict_get_int(settings, "PictureTopCrop");
crop[1] = ghb_dict_get_int(settings, "PictureBottomCrop");
@@ -250,9 +251,7 @@ add_to_queue_list(signal_user_data_t *ud, GhbValue *settings, GtkTreeIter *piter
crop[3] = ghb_dict_get_int(settings, "PictureRightCrop");
gchar *aspect_desc;
- switch (pic_par)
- {
- case 0:
+ if (pic_par == NULL || !strcasecmp(pic_par, "off"))
{
if (keep_aspect)
{
@@ -262,27 +261,18 @@ add_to_queue_list(signal_user_data_t *ud, GhbValue *settings, GtkTreeIter *piter
{
aspect_desc = _("(Aspect Lost)");
}
- } break;
-
- case 1:
- {
- aspect_desc = _("(Anamorphic)");
- } break;
-
- case 2:
+ }
+ else if (!strcasecmp(pic_par, "strict") || !strcasecmp(pic_par, "loose"))
{
aspect_desc = _("(Anamorphic)");
- } break;
-
- case 3:
+ }
+ else if (!strcasecmp(pic_par, "custom"))
{
aspect_desc = _("(Custom Anamorphic)");
- } break;
-
- default:
+ }
+ else
{
aspect_desc = "";
- } break;
}
gint source_width, source_height;