Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Benjamin "Ziirish" SANS
Conky-Images-Display
Commits
b050a543
Commit
b050a543
authored
Feb 28, 2013
by
Benjamin SANS
Browse files
fix: segfault on new install + gnome3 complient
parent
cf266b12
Changes
9
Hide whitespace changes
Inline
Side-by-side
src/backends/cid-amarok.c
View file @
b050a543
...
...
@@ -148,7 +148,7 @@ cid_check_amarok_cover_exists (CidMainContainer **pCid, gchar *cURI)
gchar
*
cRet
=
g_strdup
(
cURI
);
gchar
**
cCleanURI
=
g_strsplit
(
cRet
,
"@"
,
0
);
gchar
**
cSplitedURI
=
g_strsplit
(
cCleanURI
[
1
],
"."
,
0
);
if
(
g_strcasecmp
(
cSplitedURI
[
0
],
"nocover"
)
==
0
)
if
(
g_
ascii_
strcasecmp
(
cSplitedURI
[
0
],
"nocover"
)
==
0
)
{
g_free
(
cRet
);
cRet
=
cid_db_search_cover
(
pCid
,
...
...
src/backends/cid-exaile.c
View file @
b050a543
...
...
@@ -158,7 +158,7 @@ cid_check_exaile_cover_exists (gchar *cURI)
while
(
cCleanURI
[
cpt
]
!=
NULL
)
cpt
++
;
gchar
**
cSplitedURI
=
g_strsplit
(
cCleanURI
[
cpt
-
1
],
"."
,
0
);
if
(
g_strcasecmp
(
cSplitedURI
[
0
],
"nocover"
)
==
0
)
if
(
g_
ascii_
strcasecmp
(
cSplitedURI
[
0
],
"nocover"
)
==
0
)
{
g_free
(
cCleanURI
);
g_free
(
cSplitedURI
);
...
...
@@ -195,8 +195,8 @@ getExaileSongInfos(void)
musicData
.
playing_track
=
0
;
if
((
bFirstLoop
&&
cOldArtist
==
NULL
&&
cOldTitle
==
NULL
)
||
(
g_strcasecmp
(
cOldArtist
,
musicData
.
playing_artist
)
!=
0
&&
g_strcasecmp
(
cOldTitle
,
musicData
.
playing_title
)
!=
0
))
(
g_
ascii_
strcasecmp
(
cOldArtist
,
musicData
.
playing_artist
)
!=
0
&&
g_
ascii_
strcasecmp
(
cOldTitle
,
musicData
.
playing_title
)
!=
0
))
bSongChanged
=
TRUE
;
else
bSongChanged
=
FALSE
;
...
...
src/cid-cover.c
View file @
b050a543
...
...
@@ -51,10 +51,10 @@ cid_get_xml_file (const gchar *artist,
cid_file_remove
(
DEFAULT_DOWNLOADED_IMAGE_LOCATION
);
}
if
(
g_strcasecmp
(
"Unknown"
,
artist
)
==
0
||
g_strcasecmp
(
"Unknown"
,
album
)
==
0
||
g_strcasecmp
(
"Inconnu"
,
artist
)
==
0
||
g_strcasecmp
(
"Inconnu"
,
album
)
==
0
)
if
(
g_
ascii_
strcasecmp
(
"Unknown"
,
artist
)
==
0
||
g_
ascii_
strcasecmp
(
"Unknown"
,
album
)
==
0
||
g_
ascii_
strcasecmp
(
"Inconnu"
,
artist
)
==
0
||
g_
ascii_
strcasecmp
(
"Inconnu"
,
album
)
==
0
)
{
return
FALSE
;
}
...
...
@@ -223,8 +223,8 @@ cid_db_store_cover (CidMainContainer **pCid,
&&
cArtist
!=
NULL
&&
cAlbum
!=
NULL
,
NULL
);
g_return_val_if_fail
(
g_strcasecmp
(
cArtist
,
"unknown"
)
!=
0
&&
g_strcasecmp
(
cAlbum
,
"unknown"
)
!=
0
,
g_return_val_if_fail
(
g_
ascii_
strcasecmp
(
cArtist
,
"unknown"
)
!=
0
&&
g_
ascii_
strcasecmp
(
cAlbum
,
"unknown"
)
!=
0
,
NULL
);
CidMainContainer
*
cid
=
*
pCid
;
GKeyFile
*
pKeyFile
;
...
...
src/gui/cid-gui-callback.c
View file @
b050a543
...
...
@@ -417,7 +417,7 @@ _cid_show_image_preview (GtkFileChooser *pFileChooser,
if
(
pixbuf
!=
NULL
)
{
gtk_image_set_from_pixbuf
(
pPreviewImage
,
pixbuf
);
g
dk_pixbuf
_unref
(
pixbuf
);
g
_object
_unref
(
pixbuf
);
gtk_file_chooser_set_preview_widget_active
(
pFileChooser
,
TRUE
);
}
else
...
...
@@ -658,7 +658,7 @@ _cid_selection_changed (GtkTreeModel *model,
1
);
}
gtk_image_set_from_pixbuf
(
pPreviewImage
,
pPreviewPixbuf
);
g
dk_pixbuf
_unref
(
pPreviewPixbuf
);
g
_object
_unref
(
pPreviewPixbuf
);
if
(
bDistant
)
{
...
...
src/gui/cid-gui-callback.h
View file @
b050a543
...
...
@@ -26,6 +26,7 @@
#include <gtk/gtk.h>
#include <gdk/gdkscreen.h>
#include <glib-object.h>
G_BEGIN_DECLS
...
...
src/gui/cid-gui-factory.c
View file @
b050a543
...
...
@@ -504,7 +504,7 @@ cid_generate_ihm_from_keyfile (GKeyFile *pKeyFile,
gtk_image_set_from_pixbuf
(
GTK_IMAGE
(
pImage
),
pixbuf
);
g
dk_pixbuf
_unref
(
pixbuf
);
g
_object
_unref
(
pixbuf
);
gtk_container_add
(
GTK_CONTAINER
(
pLabelContainer
),
pImage
);
...
...
@@ -1982,7 +1982,7 @@ cid_generate_ihm_from_keyfile (GKeyFile *pKeyFile,
if
(
pixbuf
!=
NULL
)
{
gtk_image_set_from_pixbuf
(
GTK_IMAGE
(
pImage
),
pixbuf
);
g
dk_pixbuf
_unref
(
pixbuf
);
g
_object
_unref
(
pixbuf
);
gtk_container_add
(
GTK_CONTAINER
(
pLabelContainer
),
pImage
);
}
...
...
src/gui/cid-gui-factory.h
View file @
b050a543
...
...
@@ -26,6 +26,7 @@
#include <gtk/gtk.h>
#include <gdk/gdkscreen.h>
#include <glib-object.h>
#include "../cid-struct.h"
G_BEGIN_DECLS
...
...
src/tools/cid-console-call.c
View file @
b050a543
...
...
@@ -123,7 +123,7 @@ cid_console_get_boolean_with_error_full (const gchar *cCommand,
}
pclose
(
pPipe
);
strtok
(
cRead
,
"
\n
"
);
gboolean
bRet
=
g_strcasecmp
(
cRead
,
"true"
)
==
0
;
gboolean
bRet
=
g_
ascii_
strcasecmp
(
cRead
,
"true"
)
==
0
;
g_free
(
cRead
);
return
bRet
;
}
...
...
src/tools/cid-file-utilities.c
View file @
b050a543
...
...
@@ -106,14 +106,23 @@ cid_file_remove (const gchar* cFilePath)
gboolean
cid_file_check_config_version
(
CidMainContainer
**
pCid
,
const
gchar
*
f
)
{
CidMainContainer
*
cid
=
*
pCid
;
gchar
*
cCommand
=
NULL
;
gchar
line_f1
[
80
],
line_f2
[
80
];
FILE
*
f1
,
*
f2
;
if
(
cid
->
config
->
bDevMode
)
return
TRUE
;
gchar
*
cOrigFile
=
g_strdup_printf
(
"%s/%s"
,
CID_DATA_DIR
,
CID_CONFIG_FILE
);
f1
=
fopen
((
const
char
*
)
cOrigFile
,
"r"
);
f2
=
fopen
((
const
char
*
)
f
,
"r"
);
g_free
(
cOrigFile
);
if
(
!
f1
||
!
f2
)
cid_exit
(
pCid
,
3
,
"couldn't read conf file, try to delete it"
);
if
(
!
fgets
(
line_f1
,
80
,
f1
)
||
!
fgets
(
line_f2
,
80
,
f2
))
cid_exit
(
pCid
,
3
,
"couldn't read conf file, try to delete it"
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment