Mercurial > projects > dwt-linux
comparison dwt/widgets/ToolTip.d @ 211:00180515eb65
Update to SWT 3.3.2
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Wed, 19 Mar 2008 21:36:28 +0100 |
parents | 17f8449522fd |
children | 380bad9f6852 |
comparison
equal
deleted
inserted
replaced
210:e3472c527a14 | 211:00180515eb65 |
---|---|
675 if ((style & DWT.BALLOON) is 0) return; | 675 if ((style & DWT.BALLOON) is 0) return; |
676 if (layoutMessage !is null) OS.g_object_unref (layoutMessage); | 676 if (layoutMessage !is null) OS.g_object_unref (layoutMessage); |
677 layoutMessage = null; | 677 layoutMessage = null; |
678 if (message.length !is 0) { | 678 if (message.length !is 0) { |
679 layoutMessage = OS.gtk_widget_create_pango_layout (handle, toStringz( message )); | 679 layoutMessage = OS.gtk_widget_create_pango_layout (handle, toStringz( message )); |
680 if (OS.GTK_VERSION >= OS.buildVERSION (2, 4, 0)) { | |
681 OS.pango_layout_set_auto_dir (layoutMessage, false); | |
682 } | |
680 OS.pango_layout_set_wrap (layoutMessage, OS.PANGO_WRAP_WORD_CHAR); | 683 OS.pango_layout_set_wrap (layoutMessage, OS.PANGO_WRAP_WORD_CHAR); |
681 } | 684 } |
682 if (OS.GTK_WIDGET_VISIBLE (handle)) configure (); | 685 if (OS.GTK_WIDGET_VISIBLE (handle)) configure (); |
683 } | 686 } |
684 | 687 |
702 if ((style & DWT.BALLOON) is 0) return; | 705 if ((style & DWT.BALLOON) is 0) return; |
703 if (layoutText !is null) OS.g_object_unref (layoutText); | 706 if (layoutText !is null) OS.g_object_unref (layoutText); |
704 layoutText = null; | 707 layoutText = null; |
705 if (text.length !is 0) { | 708 if (text.length !is 0) { |
706 layoutText = OS.gtk_widget_create_pango_layout (handle, toStringz(text)); | 709 layoutText = OS.gtk_widget_create_pango_layout (handle, toStringz(text)); |
710 if (OS.GTK_VERSION >= OS.buildVERSION (2, 4, 0)) { | |
711 OS.pango_layout_set_auto_dir (layoutText, false); | |
712 } | |
707 auto boldAttr = OS.pango_attr_weight_new (OS.PANGO_WEIGHT_BOLD); | 713 auto boldAttr = OS.pango_attr_weight_new (OS.PANGO_WEIGHT_BOLD); |
708 boldAttr.start_index = 0; | 714 boldAttr.start_index = 0; |
709 boldAttr.end_index = text.length+1; | 715 boldAttr.end_index = text.length+1; |
710 auto attrList = OS.pango_attr_list_new (); | 716 auto attrList = OS.pango_attr_list_new (); |
711 OS.pango_attr_list_insert (attrList, boldAttr); | 717 OS.pango_attr_list_insert (attrList, boldAttr); |