summaryrefslogtreecommitdiff
path: root/src/gtkext
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2015-07-17 16:36:21 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2015-07-17 16:36:21 (GMT)
commit24d3836fcf8d443eb654b981f65478cd9923b8f1 (patch)
tree7672a28b864127e8958c3c6cce751dcf646d2fbe /src/gtkext
parenta61f089babe336b012da31a494b0f7470b6e1a9a (diff)
Updated the Python bindings.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@552 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/gtkext')
-rw-r--r--src/gtkext/gtkextstatusbar.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gtkext/gtkextstatusbar.c b/src/gtkext/gtkextstatusbar.c
index 5fd37fe..74c23bd 100644
--- a/src/gtkext/gtkextstatusbar.c
+++ b/src/gtkext/gtkextstatusbar.c
@@ -223,6 +223,8 @@ bstatus_id_t gtk_extended_status_bar_push(GtkExtStatusBar *bar, const char *mess
size_t index; /* Indice du nouvel élément */
bar_update_info *info; /* Informations à mémoriser */
+ if (bar == NULL) return 0;
+
/* Mise à jour de la pile */
g_mutex_lock(&bar->stack_access);
@@ -274,6 +276,8 @@ void gtk_extended_status_bar_update_activity(GtkExtStatusBar *bar, bstatus_id_t
{
bar_update_info *info; /* Informations à mémoriser */
+ if (bar == NULL) return;
+
/* Mise à jour de la pile */
g_mutex_lock(&bar->stack_access);
@@ -315,6 +319,8 @@ void gtk_extended_status_bar_remove(GtkExtStatusBar *bar, bstatus_id_t id)
size_t i; /* Boucle de parcours */
bar_update_info *info; /* Informations à mémoriser */
+ if (bar == NULL) return;
+
/* Mise à jour de la pile */
g_mutex_lock(&bar->stack_access);
@@ -402,6 +408,8 @@ static gboolean gtk_extended_status_update(bar_update_info *info)
static void free_bar_update_info(bar_update_info *info)
{
+ if (info->bar != NULL)
+
g_object_unref(G_OBJECT(info->bar));
free(info);
@@ -425,6 +433,8 @@ static void _gtk_extended_status_bar_change_content(GtkExtStatusBar *bar)
{
size_t top; /* Indice de l'élément visé */
+ if (bar == NULL) return;
+
g_mutex_lock(&bar->stack_access);
if (bar->cur_msg > 0)
@@ -470,6 +480,8 @@ static void _gtk_extended_status_bar_update_activity(GtkExtStatusBar *bar)
double value; /* Valeur à prendre en compte */
gchar percent[5]; /* Pourcentage en version txt. */
+ if (bar == NULL) return;
+
g_mutex_lock(&bar->stack_access);
if (bar->stack_size > 0)
@@ -556,6 +568,8 @@ void fini_progessive_status(status_blob_info *info)
{
gtk_extended_status_bar_remove(info->bar, info->id);
+ if (info->bar != NULL)
+
g_object_unref(G_OBJECT(info->bar));
free(info);