Re: GTK4 documentation

2017-12-12 Thread lrn1986
On 12/12/2017 10:29 PM, Emmanuele Bassi wrote:
> On 12 December 2017 at 18:19, Igor Korot  wrote:
>>  Hi, ALL,
>> On the page https://developer.gnome.org/gtk4/stable/gtk4-General.html
>> in the "Description"
>> part in the sample code it is referencing the "gtk_init( ,  );".
>> However, if you look at the actual function -
>> https://developer.gnome.org/gtk4/stable/gtk4-General.html#gtk-init -
>> it is documented as "void gtk_init(void);", i.e. it does not take any
>> arguments.
>>
>> I am not sure which one is correct - just wanted to report this to you guys.
> 
> The reference hasn't been updated, as we're still releasing developers
> snapshots and we're churning on the API. By the time 4.0 is released,
> the API reference will be updated.

Ironic, since the documentation URL has the word "stable" in it...



signature.asc
Description: OpenPGP digital signature
___
gtk-list mailing list
gtk-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-list


Re: Set number of visible items for

2018-03-12 Thread lrn1986

On 12.03.2018 15:39, Igor Korot wrote:

Hi,

On Mon, Mar 12, 2018 at 7:20 AM, infirit . wrote:

 G


Does this suppose to mean something?


Most likely a verbatim CC to the gtk list about setting the minimal number of 
items to be visible in a combobox dropdown list.




signature.asc
Description: OpenPGP digital signature
___
gtk-list mailing list
gtk-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-list


Re: GTK4: gtk_tree_view_enable_model_drag_dest () and GdkContentFormats

2018-03-12 Thread lrn1986

On 12.03.2018 19:45, Marcus Schätzle wrote:

Hi all,

I've done a port of a program to GTK4 (3.93.3); there is a part that I have not 
yet gotten to work and that is drag and drop inside a tree view.


I have particularly trouble understanding using the target formats 
inside gtk_tree_view_enable_model_drag_dest (). For the GTK 3 version I use 
a GtkTargetEntry structure initialised with {{ "STRING", 
GTK_TARGET_SAME_WIDGET, 0 }}, which has always worked fine so far.


That is surprising. Usually i'd go for "UTF8_STRING".

For GTK 4 I 
am supposed to use GdkContentFormats. But which mime types am I supposed to 
fill into gtk_content_formats_new ()?


"text/plain;charset=utf-8" is the GTK4 equivalent of "UTF8_STRING"

That's all i know.

Note that last time i checked there was a bug that prevented DnD from working 
correctly in some cases. For example, DnD of text didn't work for GtkTextView, 
but did work for GtkEntry.




signature.asc
Description: OpenPGP digital signature
___
gtk-list mailing list
gtk-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-list


Re: gtk on windows 10

2018-03-09 Thread lrn1986

On 10.03.2018 1:36, Kasper Peeters wrote:

I have successfully compiled a previously linux-only gtk-based program
on Windows 10 using the vcpkg packages. Things run, but the look is not
good yet.

What is the up-to-date status of getting gtk apps on Windows 10 to look
as native as possible?


You can run with GTK_CSD=0, but it will only work on windows that do not 
require CSD (the "require CSD" bit is up to the developer of an application; if 
it needs CSD, there's nothing you can do). Either way, that would only affect 
window decorations, not the widgets themselves.


It's possible to install a theme that makes gtk3 look more windows-ish (not 
just decorations, but all of the widgets). The "win32" theme was one attempt to 
do that, but in my opinion it fell short, and it's not maintained, as far as i 
know. The "win32" theme uses parts of Windows theming API to draw things, which 
makes it look more native in some places, but Windows theming API really sucks 
(the things it lets you draw are stuck in Windows 7 era or something...).
It might be possible to make a pure-CSS "Windows" theme just making GTK theme 
engine draw something Windows-like, without using Windows theming API. However, 
i do not want to spend time doing that (besides, i don't know CSS very well). 
Unless you find someone who does, you're out of luck.


So the answer to your question is "you can't". There are some things that can 
be improved about the whole decorations situation (i prototyped some of them, 
looks promising), but for the widgets themselves the things described above are 
really all there is to it.




signature.asc
Description: OpenPGP digital signature
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list