summaryrefslogtreecommitdiff
path: root/src/gtkext
diff options
context:
space:
mode:
Diffstat (limited to 'src/gtkext')
-rw-r--r--src/gtkext/gtkbinarystrip.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/gtkext/gtkbinarystrip.c b/src/gtkext/gtkbinarystrip.c
index 0ad0763..9a1b827 100644
--- a/src/gtkext/gtkbinarystrip.c
+++ b/src/gtkext/gtkbinarystrip.c
@@ -436,13 +436,21 @@ static gboolean gtk_binary_strip_query_tooltip(GtkWidget *widget, gint x, gint y
void gtk_binary_strip_attach(GtkBinaryStrip *strip, GLoadedBinary *binary)
{
+ GtkWidget *widget; /* Autre version du composant */
+
if (strip->binary != NULL)
g_object_unref(G_OBJECT(strip->binary));
strip->binary = binary;
- g_object_ref(G_OBJECT(strip->binary));
- gtk_widget_queue_draw(GTK_WIDGET(strip));
+ if (strip->binary != NULL)
+ g_object_ref(G_OBJECT(strip->binary));
+
+ widget = GTK_WIDGET(strip);
+
+ gtk_widget_set_sensitive(widget, strip->binary != NULL);
+
+ gtk_widget_queue_draw(widget);
}