Re: The Future?

2019-03-10 Thread Daniel Kasak via gtk-list
On Mon, Mar 11, 2019 at 7:54 AM Jerome Flesch  wrote:

> Le 2019-03-10 12:01, Kasper Peeters a écrit :
> >> 1. GTK is not so cross-platform anymore: on Windows and macOS, you
> >> are supposed to build your own library binaries (gvsbuild for Windows
> >> and jhbuild for macOS exist, but are not foolproof).
> >
> > That's definitely not true; on Windows there's vcpkg and on macOS
> > there is Homebrew; both let you install reasonably up-to-date versions
> > of GTK3 with a single command line.
>
> For Windows, there is also Msys2 ( https://www.msys2.org/ ). It may be
> more handy for porting applications from Linux to Windows. This is what
> I intend to use to build the next versions of Paperwork (
> https://openpaper.work ) for Windows.
>
>
I've also had extreme difficulty in the past with deploying on Windows. Not
being a ( proficient ) C developer, and not having experience with building
on Windows didn't help. I've toyed with broadway ( including writing an
authentication layer, app launcher and transparent proxy ) for giving
Windows users a relatively painless way of accessing apps, though was
discouraged from this by statements of broadway being experimental and
probably not making it through the gtk-4 work. More recently this may have
changed ( there were a bunch of commits to broadway stuff for gtk-4 ),
though from a user perspective there are still some bits missing. I've
recently ( last year or so ) switched to deploying with Flatpak, and this
has worked astonishingly well. In particular, Alexander Larsson's work:
 - https://blogs.gnome.org/alexl/2018/09/17/flatpak-on-windows/
 - https://github.com/flatpak/flatpak/tree/wip/WSL
  ... has given us a very easy path for at least bringing up our apps on
Windows. You still need an X Server ( I use MobaXterm, though I assume we
could build and package an X server too? ). The only thing that hasn't
worked out-of-the-box for us has been maximising windows. This is a bit
nasty, but with some hacks to save + restore window geometry, it's not a
deal-breaker. Keep in mind we haven't done a production deployment yet (
luckily all clients recently have been fine with running Linux ), but I've
done a reasonable amount ( many hours ) of testing and only found this 1
issue.

I would suggest people who need windows binaries check out the Flatpak
angle.

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


Re: GtkStack, builder and hidden objects

2019-02-19 Thread Daniel Kasak via gtk-list
Hi Emmanuele. Thanks for the response.

No, I checked for that ... the only thing like it is when I construct the
stack *switcher*:

$self->{main_stack} = $self->{builder}->get_object( "main_stack" );
$self->{main_stack_switcher} = Gtk3::StackSwitcher->new();
$self->{main_stack_switcher}->set_stack( $self->{main_stack} );
$self->{builder}->get_object( 'HeaderBar' )->pack_end(
$self->{main_stack_switcher} );
$self->{main_stack_switcher}->show;

 ... which I do in code because there are other things that are packed into
the header bar by code.

Dan

On Tue, Feb 19, 2019 at 11:22 PM Emmanuele Bassi  wrote:

> Hi;
>
> Are you calling gtk_widget_show_all() on the Stack or Notebook, at any
> point?
>
> If you call show_all() on a container, all children will be marked as
> visible; you need to use gtk_widget_set_no_show_all() if you don't want
> this behaviour.
>
> Ciao,
>  Emmanuele.
>
> On Tue, 19 Feb 2019 at 12:14, Daniel Kasak via gtk-list <
> gtk-list@gnome.org> wrote:
>
>> Hi all.
>>
>> I'm using glade to lay out my UIs. I've just noticed after porting some
>> things that used GtkNotebook to GtkStack that objects that I've set as
>> *not* visible ( in glade, select the object, go to the 'common' page, go to
>> 'widget flags' and de-select 'Visible' ) are in fact visible. It seems like
>> GtkStack is calling 'show all' on the widget tree.
>>
>> Is this intended behaviour? I would expect my 'Visible' flag to be
>> honoured, though I can see how this would be extra work.
>>
>> For now, I've hooked up some code to re-hide my hidden widgets when the
>> GtkStack's 'set-focus-child' event fires.
>>
>> Dan
>> ___
>> gtk-list mailing list
>> gtk-list@gnome.org
>> https://mail.gnome.org/mailman/listinfo/gtk-list
>>
>
>
> --
> https://www.bassi.io
> [@] ebassi [@gmail.com]
>
___
gtk-list mailing list
gtk-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-list


GtkStack, builder and hidden objects

2019-02-19 Thread Daniel Kasak via gtk-list
Hi all.

I'm using glade to lay out my UIs. I've just noticed after porting some
things that used GtkNotebook to GtkStack that objects that I've set as
*not* visible ( in glade, select the object, go to the 'common' page, go to
'widget flags' and de-select 'Visible' ) are in fact visible. It seems like
GtkStack is calling 'show all' on the widget tree.

Is this intended behaviour? I would expect my 'Visible' flag to be
honoured, though I can see how this would be extra work.

For now, I've hooked up some code to re-hide my hidden widgets when the
GtkStack's 'set-focus-child' event fires.

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


Re: Python- Modal Window

2018-12-10 Thread Daniel Kasak via gtk-list
On Tue, Dec 11, 2018 at 6:36 AM J.Arun Mani via gtk-list 
wrote:

> Hello,
> I'm making a Python3 powered project which opens whenever someone opens
> their computer (assume Linux-Debain based) and asks them some details. The
> user should not be allowed to use the computer without giving the details.
> The project is based on GTK3 and is for Debian based OS. I need help in the
> following-
> How can I make the application modal? That is, make sure that the user
> cannot access any thing in desktop without giving the details (the
> application is a compulsory one, thus one should not be able to close or
> minimise it).
>
> I researched on this a bit and found the answers leading to Desktop
> Managers. But I'm stuck how to start with them using Python. So need some
> help here.
>
> Thank You
> J. Arun Mani
>

The easiest way I can see to do this is to have your computer set up to
auto-login ( eg maybe something along the lines of
https://askubuntu.com/questions/175248/how-to-autologin-without-entering-username-and-passwordin-text-mode
) ... and then have it start X automatically ... but with a ~/.xinitrc that
launches *just* your python app, instead of a window manager. Then if the
user has done what's needed, you'd have your app launch a window manager.
I'd do it like this because once a window manager is running, you don't
have a reliable way of preventing users from escaping your app. Maybe there
is a better way?

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


Re: GtkTextView and undo/redo

2018-11-28 Thread Daniel Kasak via gtk-list
On Thu, Nov 29, 2018 at 4:00 AM Igor Korot via gtk-list 
wrote:

> Hi, ALL,
> I'm surprised that there is no Undo/Redo functionality inside GtkTextView.
> Or maybe I'm looking at the wrong class and Undo/Redo is in a different
> one?
>
> Thank you.
>

There's no undo/redo facility in GtkTextView, now. If you can pull in an
external lib, GtkSourceView has undo/redo facility, and can otherwise be
used as a drop-in replacement for GttkTextView ( at least in my cases ).

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


Signal for treeview column changing size

2018-09-19 Thread Daniel Kasak via gtk-list
Hi all. Is there a signal for when a treeview column is resized? I don't
see anything on:

- https://developer.gnome.org/gtk3/stable/GtkTreeViewColumn.html ( or up
the object hierarchy - which gives permissions denied errors, by the way ),
or
- https://developer.gnome.org/gtk3/stable/GtkCellRenderer.html

I'm not 100% on top of which object type I should be looking at in this
case.

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