[GB.DB.FORM]
* BUG: Use the Proxy property in data bound controls. [GB.DESKTOP] * BUG: Fix the reading of big X11 properties. git-svn-id: svn://localhost/gambas/trunk@3554 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
parent
3eda9c5098
commit
f4b4816f4c
1
TODO
1
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
|
||||
|
||||
|
@ -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 ""
|
||||
|
||||
|
@ -19,6 +19,7 @@ Private $hForm As FBrowser
|
||||
Public Sub _new()
|
||||
|
||||
$hForm = New FBrowser(Me)
|
||||
Me.Proxy = $hForm.DataView
|
||||
|
||||
End
|
||||
|
||||
|
@ -36,6 +36,7 @@ Public Sub _new()
|
||||
|
||||
$hCtrl = New ComboBox(Me) As "ComboBox"
|
||||
Me._AutoResize = True
|
||||
Me.Proxy = $hCtrl
|
||||
'$hCtrl.ReadOnly = TRUE
|
||||
|
||||
End
|
||||
|
@ -111,6 +111,8 @@ Private Sub CreateControl()
|
||||
$hCtrl.Background = If(bReadOnly, Color.ButtonBackground, Color.Default)
|
||||
If bFocus Then $hCtrl.SetFocus
|
||||
|
||||
Me.Proxy = $hCtrl
|
||||
|
||||
End
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.3 KiB |
@ -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
|
||||
|
@ -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
|
||||
|
@ -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"
|
||||
|
@ -42,3 +42,10 @@ Public Sub Button1_Click()
|
||||
|
||||
|
||||
End
|
||||
|
||||
Public Sub Button2_Click()
|
||||
|
||||
TextArea1.SetFocus
|
||||
Desktop.SendKeys("[return]")
|
||||
|
||||
End
|
||||
|
@ -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")
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user