File tree Expand file tree Collapse file tree 1 file changed +27
-1
lines changed Expand file tree Collapse file tree 1 file changed +27
-1
lines changed Original file line number Diff line number Diff line change 11/*
2- * Copyright 2009-2022 Peter Kosyh <p.kosyh at gmail.com>
2+ * Copyright 2009-2025 Peter Kosyh <p.kosyh at gmail.com>
33 *
44 * Permission is hereby granted, free of charge, to any person
55 * obtaining a copy of this software and associated documentation files
@@ -254,6 +254,28 @@ static int out_dpi(const void *v, char **out)
254254 return 0 ;
255255}
256256
257+ static int out_win_align (const void * v , char * * out )
258+ {
259+ int mode = * (int * )v ;
260+ switch (mode ) {
261+ case ALIGN_LEFT :
262+ * out = strdup ("left" );
263+ break ;
264+ case ALIGN_RIGHT :
265+ * out = strdup ("right" );
266+ break ;
267+ case ALIGN_CENTER :
268+ * out = strdup ("center" );
269+ break ;
270+ case ALIGN_JUSTIFY :
271+ * out = strdup ("justify" );
272+ break ;
273+ default :
274+ return -1 ;
275+ }
276+ return 0 ;
277+ }
278+
257279static int parse_include (const char * v , void * data )
258280{
259281 int rc ;
@@ -682,6 +704,10 @@ char *theme_getvar(char *name)
682704 if (out_dpi (cmd_parser [i ].p , & s ))
683705 return NULL ;
684706 return s ;
707+ } else if (cmd_parser [i ].fn == parse_win_align ) {
708+ if (out_win_align (cmd_parser [i ].p , & s ))
709+ return NULL ;
710+ return s ;
685711 } else
686712 return NULL ;
687713 break ;
You can’t perform that action at this time.
0 commit comments