Re: "Responsive Design" with Gtk+

2016-07-19 Thread Stefan Salewski
On Tue, 2016-07-19 at 21:29 +1000, sam@sam.today wrote:
> In my reddit application, I have this terribly long buttonbox

You may try

https://developer.gnome.org/gtk3/stable/GtkLabel.html#gtk-label-set-ellipsize

for your button labels.

For example, I am using it in notebook tab labels in a paned widget,
and when I reduce one half of the paned, a label like "Long file name"
shrinks to "Long fi...". If that is something you may like, you may try
that.

___
gtk-list mailing list
gtk-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-list


"Responsive Design" with Gtk+

2016-07-19 Thread sam

Hi All,

In my reddit application, I have this terribly long buttonbox that 
displays some useful information about each comment (eg. showing the 
author's name, score, date, etc).  However, the box gets too long for 
the window sometimes.  In that situation, it is desirable for me to 
hide some of the buttons (eg, don't show the date) rather than force 
the user to expand the window.


Is there an idiomatic way to do this?

My current hack scares me.  It is quite simple [1]. I wrap the button 
box in a GtkBin, which uses Height for Width size allocation.  When the 
box is asked for it's minimum requires width, it reports 1px,  When it 
is asked for it's preferred hight for width, it takes that width figure 
and hides the appropriate buttons to fit within that width.  However, 
this causes a lot of gtk warnings in the console.  It is also very slow.


Thanks,
Sam

[1] 
https://github.com/samdroid-apps/something-for-reddit/blob/master/src/comments.py#L413-L438
___
gtk-list mailing list
gtk-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-list


Re: GLib Library License

2016-07-19 Thread Dov Grobgeld
GLib is licensed under LGPL which allows linking with non-LGPL code. But
you still have to provide access for the end user to update the LGPL code
that your application uses. In theory this means either providing your
proprietary code as object files or in practice, linking to the LGPL code
dynamically and provide file system access for the end user to replace the
LGPL shared library. This is usually no problem for a desktop application,
but might not be possible for "consoles", mobile phones, or other closed
system. In such systems you might not be able to provide for the demands of
the LGPL license, in which case you cannot use the LGPL software.

Note that I am not a lawyer, and this is my own interpretation, and for
legal advice you should turn to a lawyer.

Regards,
Dov




On Mon, Jul 11, 2016 at 4:29 PM, Aleksandr Palamar 
wrote:

> Hi, GTK-List users.
>
> I'm curious about GLib license, mainly because I'm thinking about using
> Vala in closed source (or zlib if that would be possible in future)
> project, which may (or not) be used on different platforms including iOS
> (which doesn't allow dynamic linkage), PS4 and XBoxOne. Would it require to
> make application available under LGPL as well or I would able to kept
> application under any license I like while sharing (if target platform
> allows it, because I doubt about PS4 and XONE) changes for GLib if there
> was any. Just don't want to go wrong way and force myself to drain inside
> license problems in future.
>
> Regards, Aleksandr Palamar
>
> ___
> gtk-list mailing list
> gtk-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/gtk-list
>
>
___
gtk-list mailing list
gtk-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-list


GLib Library License

2016-07-19 Thread Aleksandr Palamar
Hi, GTK-List users.

I'm curious about GLib license, mainly because I'm thinking about using
Vala in closed source (or zlib if that would be possible in future)
project, which may (or not) be used on different platforms including iOS
(which doesn't allow dynamic linkage), PS4 and XBoxOne. Would it require to
make application available under LGPL as well or I would able to kept
application under any license I like while sharing (if target platform
allows it, because I doubt about PS4 and XONE) changes for GLib if there
was any. Just don't want to go wrong way and force myself to drain inside
license problems in future.

Regards, Aleksandr Palamar
___
gtk-list mailing list
gtk-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-list


Re: [Vala] GIO, GVfs, custom isolated URI handler

2016-07-19 Thread Aaron Andersen

Hi Aleksandr,

Maybe what you're looking for is PhysicsFS: https://icculus.org/physfs/

I'm not sure if there is a Vala binding already, but creating one  
would be fairly trivial.


I don't believe PhysicsFS will do the priority search for you, but it  
wouldn't require much code to implement that.


Given what you've stated as your goal I don't think any bicycles need  
to be reinvented :-)


Aaron

Quoting Aleksandr Palamar :


Hi, everyone.

I'm kind of new to GLib in general, but already have some basic
understanding of how it works. I'm planning to make a game using Vala
(which means GLib, GObject and GIO). One of the first things is to make
isolated VFS with different mount points on file system, each of has it's
own priority while looking for an existing file. I saw that GIO has
something for mounting and it's own GVfs, so may I extend/set up them in
some way to achieve my goal or that is totally another opera and I would
have to reinvent my own bicycle?

For example, while asking for file by URI resource://textures/blank.ktx it
will try to search for (sorted by priority):

~/.game/mod/textures/blank.ktx
~/.game/base/textures/blank.ktx
/opt/game/mod/textures/blank.ktx
/opt/game/base/textures/blank.ktx
___
vala-list mailing list
vala-l...@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list




___
gtk-list mailing list
gtk-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-list


Re: [Vala] GIO, GVfs, custom isolated URI handler

2016-07-19 Thread mar...@saepia.net
Hello,

isn't what you are planning an overkill? Are you sure you need a filesystem
abstraction layer for something that is basically, calling stat() a few
times?

You may also think about using GResource for compiling all resources and
linking statically with the app (that makes sense if they are not huge, of
course).

Marcin

2016-07-13 11:39 GMT+02:00 Aleksandr Palamar :

> Hi, everyone.
>
> I'm kind of new to GLib in general, but already have some basic
> understanding of how it works. I'm planning to make a game using Vala
> (which means GLib, GObject and GIO). One of the first things is to make
> isolated VFS with different mount points on file system, each of has it's
> own priority while looking for an existing file. I saw that GIO has
> something for mounting and it's own GVfs, so may I extend/set up them in
> some way to achieve my goal or that is totally another opera and I would
> have to reinvent my own bicycle?
>
> For example, while asking for file by URI resource://textures/blank.ktx it
> will try to search for (sorted by priority):
>
> ~/.game/mod/textures/blank.ktx
> ~/.game/base/textures/blank.ktx
> /opt/game/mod/textures/blank.ktx
> /opt/game/base/textures/blank.ktx
> ___
> vala-list mailing list
> vala-l...@gnome.org
> https://mail.gnome.org/mailman/listinfo/vala-list
>
___
gtk-list mailing list
gtk-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-list


GIO, GVfs, custom isolated URI handler

2016-07-19 Thread Aleksandr Palamar
Hi, everyone.

I'm kind of new to GLib in general, but already have some basic
understanding of how it works. I'm planning to make a game using Vala
(which means GLib, GObject and GIO). One of the first things is to make
isolated VFS with different mount points on file system, each of has it's
own priority while looking for an existing file. I saw that GIO has
something for mounting and it's own GVfs, so may I extend/set up them in
some way to achieve my goal or that is totally another opera and I would
have to reinvent my own bicycle?

For example, while asking for file by URI resource://textures/blank.ktx it
will try to search for (sorted by priority):

~/.game/mod/textures/blank.ktx
~/.game/base/textures/blank.ktx
/opt/game/mod/textures/blank.ktx
/opt/game/base/textures/blank.ktx
___
gtk-list mailing list
gtk-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-list