GithubHelp home page GithubHelp logo

gtk-bindings's People

Contributors

bergel avatar demarey avatar estebanlm avatar guillep avatar noha avatar pavel-krivanek avatar sbragagnolo avatar tesonep avatar tinchodias avatar vincentblondeau avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gtk-bindings's Issues

Resources not being deallocated

External objects are being created without being sent initialize to make them auto release.

See senders of:

pango_cairo_create_layout: cr
pango_layout_new: context
pango_ft2_font_map_create_context

Please note I don't use the Gtk bindings directly, but the Pango predecessor https://github.com/estebanlm/pharo-pango. It looks like these methods haven't changed, so thought I'd bring it to your attention.

Cheers,

Stew

Is the referenced Win64 VM+GTK the best option ?

Ok, maybe I broke it myself, by just copying (but not overwriting existing files) into the dir where PharoLauncher downloads the VM (11, x64).

That sorta worked, but some symbol was not found in some DLL (and every update of VM would've deleted the GTK).

Then I remembered that I had an x64 Gtk3 installer (slightly less messy than copying it out from MSYS2 yourself).

I fired it up, let it add the dir into PATH, and et-voila, gtk-bindings & spec-gtk work with the default P11/x64 VM managed by PharoLauncher.

the binaries I used are from: https://github.com/tschoonj/GTK-for-Windows-Runtime-Environment-Installer/releases (used the last version from 2022).

Perhaps combo of stock VM + system-wide GTK3 install could also be recommended in README ? Or does the default VM lack something vital ?

Installation Fails on GdkTLibrary

Screenshot 2022-01-08 at 3 54 25 PM

Hi, when executing the installation script it fails as the class GdkTLibrary doesn't exist when creating traits.

Please find screen shot attached and stack trace below.

Note that I used the recommended scripts to install Pharo and Gtk+3 via homebrew.

I'm running Monterey on a Mac M1.

Cheers,

Stew

UndefinedObject(Object)>>doesNotUnderstand: #asTraitComposition
UndefinedObject>>doesNotUnderstand: #asTraitComposition
MCClassDefinition>>traitCompositionCompiled
[ :builder |
builder
superclass: superClass;
name: name;
layoutClass: (ObjectLayout layoutForType: type);
slots: self instanceVariables;
sharedVariables: self classVariables;
sharedPools: self sharedPoolsString;
classSlots: self classInstanceVariables;
traitComposition: self traitCompositionCompiled;
classTraitComposition: self classTraitCompositionCompiled;
comment: comment stamp: commentStamp;
category: category;
environment: superClass environment ] in [ Smalltalk classInstaller
make: [ :builder |
builder
superclass: superClass;
name: name;
layoutClass: (ObjectLayout layoutForType: type);
slots: self instanceVariables;
sharedVariables: self classVariables;
sharedPools: self sharedPoolsString;
classSlots: self classInstanceVariables;
traitComposition: self traitCompositionCompiled;
classTraitComposition: self classTraitCompositionCompiled;
comment: comment stamp: commentStamp;
category: category;
environment: superClass environment ] ] in MCClassDefinition>>createClass in Block: [ :builder | ...
ShiftClassInstaller>>make:
ShiftClassInstaller class>>make:
[ Smalltalk classInstaller
make: [ :builder |
builder
superclass: superClass;
name: name;
layoutClass: (ObjectLayout layoutForType: type);
slots: self instanceVariables;
sharedVariables: self classVariables;
sharedPools: self sharedPoolsString;
classSlots: self classInstanceVariables;
traitComposition: self traitCompositionCompiled;
classTraitComposition: self classTraitCompositionCompiled;
comment: comment stamp: commentStamp;
category: category;
environment: superClass environment ] ] in MCClassDefinition>>createClass in Block: [ Smalltalk classInstaller...
FullBlockClosure(BlockClosure)>>on:do:
MCClassDefinition>>createClass
MCClassDefinition>>load
MCClassDefinition(MCDefinition)>>addMethodAdditionTo:
[ :each | each addMethodAdditionTo: methodAdditions ] in MCPackageLoader>>basicLoadDefinitions in Block: [ :each | each addMethodAdditionTo: methodAddition...etc...
[ :each | | newLabel |
"Special handling for first and last element"
(count = 0 or: [ count + 1 = size or: [(Time millisecondsSince: lastUpdate) >= msecs]])
ifTrue: [
bar current: count.
oldLabel = (newLabel := (labelBlock cull: each) ifNil: [oldLabel])
ifFalse: [
bar label: newLabel.
oldLabel := newLabel ].
lastUpdate := Time millisecondClockValue ].
aBlock value: each.
count := count + 1 ] in [:bar |
labelBlock := aStringOrBlock isString
ifTrue: [
bar label: aStringOrBlock.
[ :dummyItem | aStringOrBlock] ]
ifFalse: [ aStringOrBlock ].

	self do: [ :each | | newLabel |
		"Special handling for first and last element"
		(count = 0 or: [ count + 1 = size or: [(Time millisecondsSince: lastUpdate) >= msecs]]) 
			ifTrue: [ 
				bar current: count.
				oldLabel = (newLabel := (labelBlock cull: each) ifNil: [oldLabel]) 
					ifFalse: [
						bar label: newLabel.
						oldLabel := newLabel ].
			lastUpdate := Time millisecondClockValue ].
		aBlock value: each.
		count := count + 1 ] ] in OrderedCollection(Collection)>>do:displayingProgress:every: in Block: [ :each | | newLabel |...

OrderedCollection>>do:
[:bar |
labelBlock := aStringOrBlock isString
ifTrue: [
bar label: aStringOrBlock.
[ :dummyItem | aStringOrBlock] ]
ifFalse: [ aStringOrBlock ].

	self do: [ :each | | newLabel |
		"Special handling for first and last element"
		(count = 0 or: [ count + 1 = size or: [(Time millisecondsSince: lastUpdate) >= msecs]]) 
			ifTrue: [ 
				bar current: count.
				oldLabel = (newLabel := (labelBlock cull: each) ifNil: [oldLabel]) 
					ifFalse: [
						bar label: newLabel.
						oldLabel := newLabel ].
			lastUpdate := Time millisecondClockValue ].
		aBlock value: each.
		count := count + 1 ] ] in OrderedCollection(Collection)>>do:displayingProgress:every: in Block: [:bar |...

FullBlockClosure(BlockClosure)>>cull:
[ ^ block cull: self ] in [ self prepareForRunning.
CurrentJob value: self during: [ ^ block cull: self ] ] in Job>>run in Block: [ ^ block cull: self ]
[ activeProcess
psValueAt: index
put: anObject.
aBlock value ] in CurrentJob(DynamicVariable)>>value:during: in Block: [ activeProcess...
FullBlockClosure(BlockClosure)>>ensure:
CurrentJob(DynamicVariable)>>value:during:
CurrentJob class(DynamicVariable class)>>value:during:
[ self prepareForRunning.
CurrentJob value: self during: [ ^ block cull: self ] ] in Job>>run in Block: [ self prepareForRunning....
FullBlockClosure(BlockClosure)>>ensure:
Job>>run
MorphicUIManager(UIManager)>>displayProgress:from:to:during:
ByteString(String)>>displayProgressFrom:to:during:
OrderedCollection(Collection)>>do:displayingProgress:every:
OrderedCollection(Collection)>>do:displayingProgress:
MCPackageLoader>>basicLoadDefinitions
[self basicLoadDefinitions] in MCPackageLoader>>basicLoad in Block: [self basicLoadDefinitions]

Still not working on Ubuntu

I see that the Pharo-Mars code has been split into two projects. Unfortunately this has still not fixed the problem with Ubuntu. It is still totally impossible to run pharo mars on ubuntu.

Just loading the GTK-bindings package into ubuntu causes a segfault.
Xubuntu 20.04 64-bit - I followed the instructions on gtk-bindings readme page.

Crash report attached
crash.txt

GtkEntry clipboard pasting using keyboard

On Windows, when a content is pasted into the GtkEntry using a keybaord shortcut (Ctrl+V), some older windows content is used. Pasting from a context menu works as expected and then pasting using the keyboard uses that clipboard content.

1exJaYoV0f

  • put test2 into the clipboard
  • paste it using the context menu
  • put test3 into the clipboard
  • delete, paste using clipboard -> pastes test2
  • delete, paste using clipboard -> pastes test2
  • delete, paste using the context menu -> pastes test3

super strange... maybe a general Gtk bug? Multiline text input works normally with keyboard

Example does not work

Hi I have tried on

brew install gtk+3
curl https://get.pharo.org/64/100+vm | bash
./pharo-ui Pharo.image

Then

Metacello new
        repository: 'github://pharo-spec/gtk-bindings';
        baseline: 'Gtk';
        onConflict: [ :e | e useIncoming ];
        onUpgrade: [ :e | e useIncoming ];
        ignoreImage;
        load.
GEngine ensureRunning.
GtkRunLoop defer: [
	GtkWindow new 
		title: 'Gtk3 Window';
		add: (GtkBox newVertical
			packStart: (GtkLabel newLabel: 'Hello!');
			yourself);
		showAll ]

And I have this error

Screen.Recording.2022-05-10.at.15.21.31.mov

system macOs, monterey m1 pro

GRunLoop references GtkEngine

('GObject-Base' referencing 'Gtk-Base')

This happens in GRunLoop class>>#current:

current
	^ GtkEngine current runLoop

I see two possible fixes:

  • Just replace this method by ^ GEngine current runLoop
  • Move this current to GtkRunLoop and place a ^ self subclassResponsability in GRunLoop.

@estebanlm ?

README is outdated.

I've installed image as recommended for Linux. Then I tried to run the testing code and ended with error Unknown variable: GtkApplication.
Investigating code a little bit further reveals that GtkRunLoop does not have defer class method anymore. So I guess, README needs a bit of fixing to bring it up to date to the current code.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.