comparison dwt/widgets/Group.d @ 248:34409a2fc053

Fix call OS.gtk_label_set_text_with_mnemonic with valid ptr, even for zero length strings.
author Frank Benoit <benoit@tionex.de>
date Thu, 22 May 2008 19:00:47 +0200
parents 380bad9f6852
children 5a30aa9820f3
comparison
equal deleted inserted replaced
247:da992144273f 248:34409a2fc053
283 public void setText (String string) { 283 public void setText (String string) {
284 checkWidget(); 284 checkWidget();
285 if (string is null) error (DWT.ERROR_NULL_ARGUMENT); 285 if (string is null) error (DWT.ERROR_NULL_ARGUMENT);
286 text = string; 286 text = string;
287 char [] chars = fixMnemonic (string); 287 char [] chars = fixMnemonic (string);
288 OS.gtk_label_set_text_with_mnemonic (cast(GtkLabel*)labelHandle, toStringz(chars)); 288 OS.gtk_label_set_text_with_mnemonic (cast(GtkLabel*)labelHandle, chars.toStringzValidPtr());
289 if (string.length !is 0) { 289 if (string.length !is 0) {
290 if (OS.gtk_frame_get_label_widget (cast(GtkFrame*)handle) is null) { 290 if (OS.gtk_frame_get_label_widget (cast(GtkFrame*)handle) is null) {
291 OS.gtk_frame_set_label_widget (cast(GtkFrame*)handle, labelHandle); 291 OS.gtk_frame_set_label_widget (cast(GtkFrame*)handle, labelHandle);
292 } 292 }
293 } else { 293 } else {