Commit 908fa27d authored by Ziirish's avatar Ziirish

re-fixing GUI bug with UTF8 strings + CMake scripts corrections + fix a bug...

re-fixing GUI bug with UTF8 strings + CMake scripts corrections + fix a bug with configuration file management
parent f8c85496
......@@ -43,7 +43,7 @@ set (bindir ${prefix}/bin)
########### project ###############
project ("cid")
set (VERSION "1.1.6-dev")
set (VERSION "1.1.6-dev2")
add_definitions (-W -Werror -fno-builtin -g) #-Wunreachable-code -Wno-unused-parameter -Wall
if (NOT ${CMAKE_BUILD_TYPE})
......
#!en;@PACKAGE_VERSION@
#!en;@VERSION@
######## This is the conf file of cid, released under the GPL.##########
# leave blank to use the cid defaults parameters
# use the cid configuration panel to edit it (with cid -e for instance)
......@@ -83,6 +83,12 @@ CONTROLS=
#b Give the play/pause status
STATE=
#c+4[0;1] Symbols color (r,g,b,a)/
SYMBOLS_COLOR=1;1;1;1;
#c+4[0;1] Symbols color when the mouse is over (r,g,b,a)/
SYMBOLS_COLOR_OVER=1;1;1;0.5;
#U Search the following files
#{%user% stands for the username\n%home% stands for the user's home directory\n%artist% stands for the artist's name\n%album% stands for the album name}/
FILES_LIST=album;albumart;cover;folder;.cover;.folder;
......@@ -107,10 +113,10 @@ OUTLINE_COLOR=0;0;0;0.5;
############## CID OPTIONS ###############
##########################################
#[@prefix@/@DATADIRNAME@/@PACKAGE@/options.png]
#[@CID_DATA_DIR@/options.png]
[Options]
#F+[Customisation options;@prefix@/@DATADIRNAME@/@PACKAGE@/options.png]
#F+[Customisation options;@CID_DATA_DIR@/options.png]
frame_3=
#S+ Default image
......@@ -122,7 +128,7 @@ HIDE=
#F+[Animation;@prefix@/@DATADIRNAME@/@PACKAGE@/animation.png]
#F+[Animation;@CID_DATA_DIR@/animation.png]
frame_animation=
#b Run an animation when the music changes
......@@ -175,7 +181,7 @@ DL_PATH=
############## MPD ###############
##########################################
#[@prefix@/@DATADIRNAME@/@PACKAGE@/default.svg]
#[@CID_DATA_DIR@/default.svg]
[MPD]
#S+ Songs directory
......
......@@ -13,7 +13,7 @@ foreach (PO_INPUT ${PO_FILES})
set (MO_OUTPUT ${PO_INPUT_BASE}.gmo) # le nom du fichier en sortie.
message (STATUS " Building ${MO_OUTPUT}...")
add_custom_command (TARGET i18n COMMAND ${MSGFMT_EXECUTABLE} -o ${CMAKE_CURRENT_BINARY_DIR}/${MO_OUTPUT} ${PO_INPUT}) # appel a msgfmt.
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${MO_OUTPUT} DESTINATION ${datadir}/locale/${PO_INPUT_BASE}/LC_MESSAGES RENAME ${GETTEXT_PACKAGE}.mo) # installation du fichier dans le bon repertoire.
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${MO_OUTPUT} DESTINATION ${datadir}/locale/${PO_INPUT_BASE}/LC_MESSAGES RENAME ${PACKAGE}.mo) # installation du fichier dans le bon repertoire.
endif()
endforeach ()
......@@ -62,14 +62,12 @@ SET(cid_SRCS
include_directories(
${PACKAGE_INCLUDE_DIRS}
${XEXTEND_INCLUDE_DIRS}
${CMAKE_SOURCE_DIR}/src
)
# Make sure the linker can find the libraries.
link_directories(
${PACKAGE_LIBRARY_DIRS}
${XEXTEND_LIBRARY_DIRS}
)
# Add executable that is built from the source files.
......@@ -80,13 +78,12 @@ add_executable (${PROJECT_NAME}
# Link the executable to the librairies.
target_link_libraries (${PROJECT_NAME}
${PACKAGE_LIBRARIES}
${XEXTEND_LIBRARIES}
${LIBCRYPT_LIBS}
)
# install the program once it is built.
install(
TARGETS ${PACKAGE}
DESTINATION bin)
DESTINATION ${bindir})
......@@ -151,8 +151,7 @@ cid_threaded_animation (AnimationType iAnim, gint iDelay)
{
if (cid_measure_is_running(pMeasureTimerAnimation))
cid_stop_measure_timer(pMeasureTimerAnimation);
//if (cid_measure_is_active(pMeasureTimerAnimation))
cid_free_measure_timer(pMeasureTimerAnimation);
cid_free_measure_timer(pMeasureTimerAnimation);
}
pMeasureTimerAnimation = cid_new_measure_timer (iDelay,
NULL,
......@@ -167,8 +166,7 @@ cid_threaded_animation (AnimationType iAnim, gint iDelay)
{
if (cid_measure_is_running(pMeasureTimerAnimation))
cid_stop_measure_timer(pMeasureTimerAnimation);
//if (cid_measure_is_active(pMeasureTimerAnimation))
cid_free_measure_timer(pMeasureTimerAnimation);
cid_free_measure_timer(pMeasureTimerAnimation);
}
pMeasureTimerAnimation = cid_new_measure_timer (iDelay,
NULL,
......@@ -183,8 +181,7 @@ cid_threaded_animation (AnimationType iAnim, gint iDelay)
{
if (cid_measure_is_running(pMeasureTimerFocus))
cid_stop_measure_timer(pMeasureTimerFocus);
//if (cid_measure_is_active(pMeasureTimerFocus))
cid_free_measure_timer(pMeasureTimerFocus);
cid_free_measure_timer(pMeasureTimerFocus);
}
pMeasureTimerFocus = cid_new_measure_timer (iDelay,
NULL,
......@@ -199,8 +196,7 @@ cid_threaded_animation (AnimationType iAnim, gint iDelay)
{
if (cid_measure_is_running(pMeasureTimerFocus))
cid_stop_measure_timer(pMeasureTimerFocus);
//if (cid_measure_is_active(pMeasureTimerFocus))
cid_free_measure_timer(pMeasureTimerFocus);
cid_free_measure_timer(pMeasureTimerFocus);
}
pMeasureTimerFocus = cid_new_measure_timer (iDelay,
NULL,
......
......@@ -314,8 +314,7 @@ cid_read_key_file (CidMainContainer **pCid, const gchar *f)
if (cid->config->bUnvalidKey && !bReloaded)
{
cid_save_data (pCid);
cid_read_key_file (pCid, f);
cid_file_check_config_version (pCid, f);
bReloaded = TRUE;
}
}
......
......@@ -112,16 +112,17 @@ void
cid_parse_nl (gchar **input)
{
gchar *in = *input;
gint length = 0;
for (;in[length] != '\0'; length++);
gint length = strlen (*input);
gint ind = 0, cpt = 0;
gchar *output = g_malloc (length);
gboolean found = FALSE;
gchar *output = g_malloc (sizeof(gchar)*(length+1));
while (ind<length)
{
if (in[ind] == '\\' && ind < length-1 && in[ind+1] == 'n')
{
output[cpt] = '\n';
ind++;
found = TRUE;
}
else
{
......@@ -130,9 +131,12 @@ cid_parse_nl (gchar **input)
ind++,cpt++;
}
output[cpt] = '\0';
g_free (*input);
*input = NULL;
*input = g_strdup (output);
if (found)
{
g_free (*input);
*input = NULL;
*input = g_strdup (output);
}
g_free (output);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment