diff --git a/TODO b/TODO index 5c2d79a0c..0f79f8ff3 100644 --- a/TODO +++ b/TODO @@ -45,6 +45,7 @@ GUI RELATED STUFF - Keep ListView.SelectAll(Boolean) for compatibility. - Remove ScreenShot() method. - Fix infinite loop when clicking with the right mouse button in an iconview. +- Clean up gb.db.form component. Use the Proxy property in controls. DESKTOP COMPONENT diff --git a/comp/src/gb.db.form/.lang/.pot b/comp/src/gb.db.form/.lang/.pot index ca7b2cd09..b8ca6bdb1 100644 --- a/comp/src/gb.db.form/.lang/.pot +++ b/comp/src/gb.db.form/.lang/.pot @@ -10,11 +10,11 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: DataControl.class:83 DataView.class:354 +#: DataControl.class:83 DataView.class:356 msgid "True" msgstr "" -#: DataControl.class:84 DataView.class:354 +#: DataControl.class:84 DataView.class:356 msgid "False" msgstr "" @@ -30,19 +30,19 @@ msgstr "" msgid "You must fill all mandatory fields." msgstr "" -#: DataView.class:516 +#: DataView.class:518 msgid "Unable to save value." msgstr "" -#: DataView.class:518 +#: DataView.class:520 msgid "Incorrect value." msgstr "" -#: DataView.class:673 +#: DataView.class:675 msgid "Unable to save record." msgstr "" -#: DataView.class:815 +#: DataView.class:817 msgid "Unable to delete record." msgstr "" diff --git a/comp/src/gb.db.form/.src/DataBrowser.class b/comp/src/gb.db.form/.src/DataBrowser.class index be9f53121..9714350a2 100644 --- a/comp/src/gb.db.form/.src/DataBrowser.class +++ b/comp/src/gb.db.form/.src/DataBrowser.class @@ -19,6 +19,7 @@ Private $hForm As FBrowser Public Sub _new() $hForm = New FBrowser(Me) + Me.Proxy = $hForm.DataView End diff --git a/comp/src/gb.db.form/.src/DataCombo.class b/comp/src/gb.db.form/.src/DataCombo.class index e2a0199fb..2cf6dbfff 100644 --- a/comp/src/gb.db.form/.src/DataCombo.class +++ b/comp/src/gb.db.form/.src/DataCombo.class @@ -36,6 +36,7 @@ Public Sub _new() $hCtrl = New ComboBox(Me) As "ComboBox" Me._AutoResize = True + Me.Proxy = $hCtrl '$hCtrl.ReadOnly = TRUE End diff --git a/comp/src/gb.db.form/.src/DataControl.class b/comp/src/gb.db.form/.src/DataControl.class index bc903de18..46db00347 100644 --- a/comp/src/gb.db.form/.src/DataControl.class +++ b/comp/src/gb.db.form/.src/DataControl.class @@ -111,6 +111,8 @@ Private Sub CreateControl() $hCtrl.Background = If(bReadOnly, Color.ButtonBackground, Color.Default) If bFocus Then $hCtrl.SetFocus + Me.Proxy = $hCtrl + End diff --git a/comp/src/gb.db.form/.src/DataView.class b/comp/src/gb.db.form/.src/DataView.class index 6fc964787..045af83bf 100644 --- a/comp/src/gb.db.form/.src/DataView.class +++ b/comp/src/gb.db.form/.src/DataView.class @@ -62,6 +62,8 @@ Private $iRowNewRecord As Integer = -1 Public Sub _new() $hCtrl = New TableView(Me) As "TableView" + Me.Proxy = $hCtrl + $hTimer = New Timer As "TableView" $hCreateTimer = New Timer As "CreateTimer" $hCtrl.Header = TableView.Both diff --git a/examples/examples/Misc/Notepad/.icon.png b/examples/examples/Misc/Notepad/.icon.png index 315321029..823375770 100644 Binary files a/examples/examples/Misc/Notepad/.icon.png and b/examples/examples/Misc/Notepad/.icon.png differ diff --git a/examples/examples/Misc/Notepad/.project b/examples/examples/Misc/Notepad/.project index e282c3c4e..73bb5a372 100644 --- a/examples/examples/Misc/Notepad/.project +++ b/examples/examples/Misc/Notepad/.project @@ -1,12 +1,12 @@ # Gambas Project File 3.0 -# Compiled with Gambas 2.99.0 (r2977) +# Compiled with Gambas 2.99.0 Startup=FNotepad Icon=notepad.png Version=0.0.1 Component=gb.image Component=gb.gui Component=gb.form -Environment="GB_GUI=gb.gtk" +Environment="GB_GUI=gb.qt4" TabSize=2 Translate=1 Language=fr diff --git a/examples/examples/Video/MoviePlayer/.project b/examples/examples/Video/MoviePlayer/.project index 5dc11c96c..561924c9f 100644 --- a/examples/examples/Video/MoviePlayer/.project +++ b/examples/examples/Video/MoviePlayer/.project @@ -1,5 +1,5 @@ # Gambas Project File 3.0 -# Compiled with Gambas 2.99.0 (r3105) +# Compiled with Gambas 2.99.0 Startup=FMoviePlayer Icon=video.png Version=0.0.3 diff --git a/gb.desktop/src/gb.desktop/.settings b/gb.desktop/src/gb.desktop/.settings index 6a63b235e..9a69543e3 100644 --- a/gb.desktop/src/gb.desktop/.settings +++ b/gb.desktop/src/gb.desktop/.settings @@ -13,7 +13,7 @@ SearchString=True [OpenFile] Active=1 -File[1]=".src/Desktop.class:191.8" +File[1]=".src/Desktop.class:173.20" File[2]=".src/Main.module:8.2" File[3]=".src/_DesktopPasswords.class:65.56" File[4]=".src/Form1.form" @@ -21,7 +21,7 @@ File[5]=".src/Form2.form" File[6]=".src/Form2.class:0.0" File[7]=".src/_DesktopWindows.class:29.15" File[8]=".src/DesktopWatcher.class:54.35" -File[9]=".src/Form1.class:43.0" +File[9]=".src/Form1.class:48.27" File[10]=".src/_DesktopIcons.class:0.0" File[11]=".src/DesktopWindow.class:155.0" File[12]=".src/Atom.class:13.0" diff --git a/gb.desktop/src/gb.desktop/.src/Form1.class b/gb.desktop/src/gb.desktop/.src/Form1.class index 036eba365..818efcf5b 100644 --- a/gb.desktop/src/gb.desktop/.src/Form1.class +++ b/gb.desktop/src/gb.desktop/.src/Form1.class @@ -42,3 +42,10 @@ Public Sub Button1_Click() End + +Public Sub Button2_Click() + + TextArea1.SetFocus + Desktop.SendKeys("[return]") + +End diff --git a/gb.desktop/src/gb.desktop/.src/Form1.form b/gb.desktop/src/gb.desktop/.src/Form1.form index b823719e6..e1327f293 100644 --- a/gb.desktop/src/gb.desktop/.src/Form1.form +++ b/gb.desktop/src/gb.desktop/.src/Form1.form @@ -2,18 +2,24 @@ { Form Form MoveScaled(0,0,64,46) - Text = ("") Icon = Picture["icon:/64/bookmark"] Arrangement = Arrange.Vertical { Button1 Button MoveScaled(4,2,16,4) Text = ("Go") } + { TextArea1 TextArea + MoveScaled(41,3,16,16) + } { ScrollView1 ScrollView MoveScaled(3,7,49,31) Expand = True Arrangement = Arrange.Row - Spacing = 2 + Spacing = True Padding = 2 } + { Button2 Button + MoveScaled(21,2,16,4) + Text = ("SendKeys") + } } diff --git a/gb.desktop/src/x11.c b/gb.desktop/src/x11.c index f002f773e..8802cab5f 100644 --- a/gb.desktop/src/x11.c +++ b/gb.desktop/src/x11.c @@ -107,6 +107,7 @@ static void init_atoms() } #define PROPERTY_START_READ 256 +#define PROPERTY_NEXT_READ 1024 #if 0 // On 64 bits OS, format 32 are actually long, i.e. int padded to 64 bits! @@ -129,6 +130,7 @@ char *X11_get_property(Window wid, Atom prop, Atom *type, int *format, int *pcou uchar *data; unsigned long count; unsigned long after; + unsigned long offset; int size; *pcount = 0; @@ -146,14 +148,17 @@ char *X11_get_property(Window wid, Atom prop, Atom *type, int *format, int *pcou _property_value = GB.NewString((char *)data, count * size); XFree(data); - if (after) + offset = count * size / sizeof(long); + + while (after) { - if (XGetWindowProperty(_display, wid, prop, PROPERTY_START_READ / sizeof(long), (after + 3) / sizeof(long), + if (XGetWindowProperty(_display, wid, prop, offset, PROPERTY_NEXT_READ / sizeof(long), False, AnyPropertyType, type, format, &count, &after, &data) != Success) return NULL; *pcount += count; + offset += count * size / sizeof(long); GB.AddString(&_property_value, (char *)data, count * size); XFree(data);