comparison gtk3/dw.c @ 1400:ccd383e11ff8

Allow removing of tooltips by passing NULL or "" and prevent double tooltips on some platforms.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Sun, 27 Nov 2011 20:28:15 +0000
parents 58c084177e3e
children 28210f7941c7
comparison
equal deleted inserted replaced
1399:8e569dd09d94 1400:ccd383e11ff8
4343 void API dw_window_set_tooltip(HWND handle, char *bubbletext) 4343 void API dw_window_set_tooltip(HWND handle, char *bubbletext)
4344 { 4344 {
4345 int _locked_by_me = FALSE; 4345 int _locked_by_me = FALSE;
4346 4346
4347 DW_MUTEX_LOCK; 4347 DW_MUTEX_LOCK;
4348 gtk_widget_set_tooltip_text(handle, bubbletext); 4348 if(bubbletext && *bubbletext)
4349 gtk_widget_set_tooltip_text(handle, bubbletext);
4350 else
4351 gtk_widget_set_has_tooltip(handle, FALSE);
4349 DW_MUTEX_UNLOCK; 4352 DW_MUTEX_UNLOCK;
4350 } 4353 }
4351 4354
4352 /* 4355 /*
4353 * Gets the text used for a given window. 4356 * Gets the text used for a given window.