Mercurial > projects > dwt-linux
comparison dwt/widgets/Shell.d @ 255:5a30aa9820f3
removed tango.stdc.stringz imports and allow null for arrays and string arguments.
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sun, 15 Jun 2008 22:32:20 +0200 |
parents | ba11f2eee658 |
children | c0d810de7093 |
comparison
equal
deleted
inserted
replaced
254:8bca790583c3 | 255:5a30aa9820f3 |
---|---|
41 import dwt.widgets.Monitor; | 41 import dwt.widgets.Monitor; |
42 import dwt.widgets.TypedListener; | 42 import dwt.widgets.TypedListener; |
43 import dwt.widgets.Widget; | 43 import dwt.widgets.Widget; |
44 | 44 |
45 import Unicode = tango.text.Unicode; | 45 import Unicode = tango.text.Unicode; |
46 import tango.stdc.stringz; | |
47 | 46 |
48 /** | 47 /** |
49 * Instances of this class represent the "windows" | 48 * Instances of this class represent the "windows" |
50 * which the desktop or "window manager" is managing. | 49 * which the desktop or "window manager" is managing. |
51 * Instances that do not have a parent (that is, they | 50 * Instances that do not have a parent (that is, they |
1925 void setToolTipText (GtkWidget* rootWidget, GtkWidget* tipWidget, String string) { | 1924 void setToolTipText (GtkWidget* rootWidget, GtkWidget* tipWidget, String string) { |
1926 if (OS.GTK_VERSION >= OS.buildVERSION (2, 12, 0)) { | 1925 if (OS.GTK_VERSION >= OS.buildVERSION (2, 12, 0)) { |
1927 char * buffer = null; | 1926 char * buffer = null; |
1928 if (string !is null && string.length > 0) { | 1927 if (string !is null && string.length > 0) { |
1929 char [] chars = fixMnemonic (string, false); | 1928 char [] chars = fixMnemonic (string, false); |
1930 buffer = tango.stdc.stringz.toStringz( chars ); | 1929 buffer = toStringz( chars ); |
1931 } | 1930 } |
1932 OS.gtk_widget_set_tooltip_text (rootWidget, null); | 1931 OS.gtk_widget_set_tooltip_text (rootWidget, null); |
1933 /* | 1932 /* |
1934 * Bug in GTK. In GTK 2.12, due to a miscalculation of window | 1933 * Bug in GTK. In GTK 2.12, due to a miscalculation of window |
1935 * coordinates, using gtk_tooltip_trigger_tooltip_query () | 1934 * coordinates, using gtk_tooltip_trigger_tooltip_query () |
1964 } | 1963 } |
1965 } else { | 1964 } else { |
1966 char* buffer = null; | 1965 char* buffer = null; |
1967 if (string !is null && string.length > 0) { | 1966 if (string !is null && string.length > 0) { |
1968 char [] chars = fixMnemonic (string, false); | 1967 char [] chars = fixMnemonic (string, false); |
1969 buffer = tango.stdc.stringz.toStringz( chars ); | 1968 buffer = toStringz( chars ); |
1970 } | 1969 } |
1971 if (tooltipsHandle is null) { | 1970 if (tooltipsHandle is null) { |
1972 tooltipsHandle = cast(GtkWidget*)OS.gtk_tooltips_new (); | 1971 tooltipsHandle = cast(GtkWidget*)OS.gtk_tooltips_new (); |
1973 if (tooltipsHandle is null) error (DWT.ERROR_NO_HANDLES); | 1972 if (tooltipsHandle is null) error (DWT.ERROR_NO_HANDLES); |
1974 OS.g_object_ref (tooltipsHandle); | 1973 OS.g_object_ref (tooltipsHandle); |