Re: Some strings corrupted when inserting into liststore model

2021-10-18 Thread Daniel Kasak via gtk-perl-list
Right. I found a hack on https://perldoc.perl.org/perlunicode ( which
you directed me to ) that appears to have fixed *this* particular
issue ( though it's not clear what I've then broken as a result )
Calling:

Encode::_utf8_on($_)

 ... for every value just prior to being pushed into the model appears
to work. Yay :)

Thanks!

Dan

On Mon, Oct 18, 2021 at 11:12 PM Jeremy Volkening via gtk-perl-list
 wrote:
>
> On Mon, Oct 18, 2021 at 08:39:36PM +1100, Daniel Kasak via gtk-perl-list 
> wrote:
> > It's not really clear if there's something *else* I'm
> > supposed to do to these strings coming out of the DB or not?
>
> Typically you need to tell Perl to treat them as UTF-8. Without knowing 
> exactly how you're getting your strings into Perl, there are a number of ways 
> to do this (https://perldoc.perl.org/perlunicode). For instance, if you're 
> reading from a filehandle you can set its mode:
>
> binmode(\*STDIN, ':utf8');
>
> Or you can can specifically mark the string after it's imported:
>
> use Encode;
> $str = Encode::decode("UTF-8", $str);
>
> One of these might help with your issue.
>
> Jeremy
> ___
> gtk-perl-list mailing list
> gtk-perl-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/gtk-perl-list
___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-perl-list


Re: Some strings corrupted when inserting into liststore model

2021-10-18 Thread Daniel Kasak via gtk-perl-list
Hi Jeremy. Thanks for the response :)

> In the case of your example script, you need 'use utf8;' in the preamble. In 
> the case of your example script, you
> need 'use utf8;' in the preamble. This fixes handling of the hard-coded 
> unicode characters in the script -- it won't
> necessarily fix the issue with the strings coming from your database.

Interesting. Yeah I don't usually embed unicode in source - I'd
forgotten about that :)

>  Are you certain they are being stored in the database correctly?

Yeah actually they're coming from an execution plan, so they're not
"stored" as such in the database. Example:

+-+--+---+--++
| id  | estRows  | task  | access object|
operator info  |
+-+--+---+--++
| TableReader_7   | 6656.67  | root  |  |
data:Selection_6   |
| └─Selection_6   | 6656.67  | cop[tikv] |  |
ne(dett.ffa_client.city, "")   |
|   └─TableFullScan_5 | 1.00 | cop[tikv] | table:ffa_client |
keep order:false, stats:pseudo |
+-+--+---+--++
3 rows in set (0.010 sec)

It renders correctly in a console in the MySQL client. I can inspect
the values in a debugger and copy them out, and they render correctly
both inside the IDE, and in a text editor when I paste the values. I
was under the impression that Perl handled strings as kinda-utf8
internally. It's not really clear if there's something *else* I'm
supposed to do to these strings coming out of the DB or not? Anyway,
they totally look correct if I print() them or inspect them in an IDE.

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


Some strings corrupted when inserting into liststore model

2021-10-17 Thread Daniel Kasak via gtk-perl-list
Hi all. I'm seeing some strings ( coming from a database ) corrupted
when I insert into a liststore model. I've pasted a bare-bones script
before which demonstrates the issue ( hard-coded string value in this
case ). Any ideas what's happening and how to get the original string
rendering? Interestingly, I can copy/paste directly into the
treeview/cell and it handles data input this way.

---

#!/usr/bin/perl

use strict;
use warnings;

use Gtk3 '-init';
use Glib 'TRUE', 'FALSE';

use Encode;

my $window = Gtk3::Window->new;
$window->signal_connect( destroy => sub { Gtk3->main_quit } );
$window->set_border_width(8);
$window->set_default_size( 300, 250 );

my $box = Gtk3::Box->new( 'vertical', 8 );
$box->set_homogeneous(FALSE);
$window->add($box);

my $sw = Gtk3::ScrolledWindow->new( undef, undef );
$sw->set_shadow_type('etched-in');
$sw->set_policy( 'never', 'automatic' );
$box->pack_start( $sw, TRUE, TRUE, 5 );

# Create TreeModel
my $model = Gtk3::ListStore->new( 'Glib::String', );
my $iter = $model->append();
$model->set( $iter , 0 , "└─Selection_6" );

# Create a TreeView
my $treeview = Gtk3::TreeView->new($model);
$treeview->set_rules_hint(TRUE);
$treeview->set_search_column(0);
$sw->add($treeview);

# Add columns to TreeView
add_columns($treeview);

$window->show_all;
Gtk3->main();

sub add_columns {
my $treeview = shift;
my $model= $treeview->get_model();
my $renderer = Gtk3::CellRendererText->new;
# Column for description
my $column = Gtk3::TreeViewColumn->new_with_attributes(
'Description', $renderer, text => 0 );
$column->set_sort_column_id(0);
$treeview->append_column($column);
}
___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-perl-list


Re: mapping of Gtk3::main_iteration

2021-05-17 Thread Daniel Kasak via gtk-perl-list
On Sat, May 15, 2021 at 5:21 PM Juergen Harms via gtk-perl-list
 wrote:
>
> Hello,
>
> When I run
>
> if (Gtk3:::event_spending () ) { Gtk3->main_iteration (); }

Quick note. I had used this pattern ( or something similar ) in
various places to keep the GUI ticking over while waiting for
something to happen, and I commented in a gtk+ dev list about some
issue I was having. I was told *not* to use this pattern - that it was
broken, and in particular would cause major issues under Wayland or
Broadway backends. I later confirmed this. I guess if you're *only*
targeting X, it appears to work.

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


Re: Glib::IO->add_watch

2019-04-03 Thread Daniel Kasak via gtk-perl-list
On Thu, Apr 4, 2019 at 6:45 AM Jeff via gtk-perl-list
 wrote:
>
> On 03/04/2019 00:35, Daniel Kasak via gtk-perl-list wrote:
> > Hi all. I'm trying to adapt some code I have for tailing the output of
> > an app. When I fork using open() ... things work ( I have some issues
> > with tail never exiting, but that's to be expected ). When I open a
> > filehandle for reading these redirected log files however, my callback
> > I passed to add_watch() gets called in a busy loop, and nothing else
> > happens. I assume I'm just doing something simple wrong? What is that
> > thing? :) Thanks ...
>
> The _watch_cmd() sub in gscan2pdf does what you want - uses
> Glib::IO->add_watch() on stdout and stderr and triggers a callback on
> every line read:
>
> https://sourceforge.net/p/gscan2pdf/code/ci/master/tree/lib/Gscan2pdf/Frontend/CLI.pm#l504

Thanks for the response Jeff ... but the example you linked is very
similar to what I have ( in another codebase ) that works. ie I don't
have problems with this method when *forking* a process - it works
really well. I have problems with this method when I want to tail ( or
use Glib::IO->add_watch() on ) STDOUT & STDERR of the *current*
process.

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


Discourse?

2019-04-02 Thread Daniel Kasak via gtk-perl-list
It looks like we were missed in the email (  ... no-one cares
about Perl devs ) ... but I assume we'll be moving to discourse like
the rest of the gtk pack?
https://discourse.gnome.org/c/platform/language-bindings

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


Glib::IO->add_watch

2019-04-02 Thread Daniel Kasak via gtk-perl-list
Hi all. I'm trying to adapt some code I have for tailing the output of
an app. When I fork using open() ... things work ( I have some issues
with tail never exiting, but that's to be expected ). When I open a
filehandle for reading these redirected log files however, my callback
I passed to add_watch() gets called in a busy loop, and nothing else
happens. I assume I'm just doing something simple wrong? What is that
thing? :) Thanks ...

Dan

---

# Redirect STDOUT / STDERR to log files
my $app_log_path = "$logdir/app_" . $timestamp . ".log";
my $err_log_path = "$logdir/err_" . $timestamp . ".log";

my ( $STDOUT_READER , $STDERR_READER );

say( "Redirecting:\nSTDOUT: $app_log_path\nSTDERR: $err_log_path" );
open STDOUT, '>', $app_log_path or die "Can't redirect STDOUT: $!";
open STDERR, '>', $err_log_path or die "Can't redirect STDERR: $!";

# open $STDOUT_READER , "<" , $app_log_path or die( "Can't open stdout
log file!: $!" );
open( $STDOUT_READER, "tail -f $app_log_path |" )
|| die( "Can't fork!\n" . $! );

# open $STDERR_READER , "<" , $err_log_path or die( "Can't open stderr
log file!: $!" );
open( $STDERR_READER, "tail -f $err_log_path |" )
|| die( "Can't fork!\n" . $! );

Glib::IO->add_watch( fileno( $STDOUT_READER ) , ['in'] , sub {
my ( $fileno, $condition ) = @_;
# parse logs and write to textview
}
___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-perl-list


Re: Treeview (liststore) CSS question

2019-03-18 Thread Daniel Kasak via gtk-app-devel-list
On Tue, Mar 19, 2019 at 3:01 AM Mike Martin via gtk-app-devel-list <
gtk-app-devel-list@gnome.org> wrote:

> Is it possible to set different background for a treestore, with a
> liststore, for populated rows v blank area.
>
> ie: If I have a dynamic treeview I would like to have one background colour
> for the rows and another for the treestore where there are no rows
>
> The particular example has the following tree
> Grid,Notebook,grid,scrolledwindow,treeview
>

Use set_cell_data_func:
https://developer.gnome.org/gtk3/stable/GtkTreeViewColumn.html#gtk-tree-view-column-set-cell-data-func

You'd have to do this for every GtkTreeViewColumn you wanted to colour.
Your callback would then fetch whatever value you want to use as a test (
ie to test whether the row is 'empty' or not ), and set the renderer's
"background' property to whatever colour you're after ( the callback get's
passed the renderer ).

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


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


Detecting the gdk backend

2019-02-06 Thread Daniel Kasak via gtk-app-devel-list
Hi all. Is there a way to detect the gdk backend an app is using? I know
about the environment variable - GDK_BACKEND. But often this is not set,
and gtk just picks whatever's available. I need ever-so-slightly different
app behaviour, depending on the backend. Any ideas?

Dan
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-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


Re: Missing gtk-config binary issues when building from source (Gtk3 only)

2018-11-02 Thread Daniel Kasak via gtk-perl-list
You're probably better off asking in the flatpak list. Anyway, I have
things building nicely, after quite a bit of help from that list. Here's a
template I used, mainly for building perl:
https://github.com/flathub/org.frozen_bubble.frozen-bubble/blob/master/org.frozen_bubble.frozen-bubble.json

Here's my current builder json file, which includes gtk-perl stuff:
http://tesla.duckdns.org/downloads/biz.smartassociates.sdf.json

I can't share all resources yet - I have open-source and commerical stuff
all tangled up at the moment ... but hope to do a major open-source release
soon :)

Dan

On Sat, Nov 3, 2018 at 12:08 AM Roderich Schupp via gtk-perl-list <
gtk-perl-list@gnome.org> wrote:

> On Fri, Nov 2, 2018 at 1:15 PM Mildred Ki'Lya via gtk-perl-list <
> gtk-perl-list@gnome.org> wrote:
>
>> Hello, i'm not subscribed to the list, but I need help compiling Gtk-perl.
>>
>>
> As for "Gtk-perl", you mean https://metacpan.org/release/Gtk-Perl ?
> That's using gtk+2.x which is incompatible with you installed gtk 3.24.1.
> Do you really want this old version of gtk?
> For gtk+3.x you want https://metacpan.org/release/Gtk3 (which depends on
> Perl modules Glib, Cairo::GObject and Glib::Object::Introspection).
>
> Cheers, Roderich
>
> ___
> gtk-perl-list mailing list
> gtk-perl-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/gtk-perl-list
>
___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-perl-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


Re: cannot make GdkRectangle synonymous to the unregistered type CairoRectangleInt at C:/msys64/mingw64/lib/perl5/site_perl/Gtk3.pm line 479.

2018-09-15 Thread Daniel Kasak via gtk-perl-list
Unrelated, and not offering help on this particular issue ( sorry ) ... but
...

Do you have build scripts for Windows? I had some that worked at one point,
but they stopped working shortly after, and I didn't have the time / skills
to keep them maintained.

Dan

On Sun, Sep 16, 2018 at 5:09 AM Torsten Schoenfeld 
wrote:

> On 04.06.2018 15:45, gtk-perl-l...@talkvideo.net wrote:
> > With the patches below I get:
> >
> > perl -e "use Gtk3;"
> >
> > Cairo::GObject: registering 44919376 (CairoRectangleInt)
> > Glib: trying to look up 63302960 (CairoRectangleInt)
> > cannot make GdkRectangle synonymous to the unregistered type
> CairoRectangleInt at C:/msys64/mingw64/lib/perl5/site_perl/Gtk3.pm line 479.
> > BEGIN failed--compilation aborted at -e line 1.
>
> This suggests that multiple library installation are getting mixed up on
> your system.  Try to look for multiple *glib*.dll, *gobject*.dll,
> *cairo*.dll and *cairo-gobject*.dll.
>
> -Torsten
> ___
> gtk-perl-list mailing list
> gtk-perl-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/gtk-perl-list
>
___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-perl-list


Deleting rows from a model

2018-09-13 Thread Daniel Kasak via gtk-perl-list
Hi all. I've been looking at a long-standing bug in one of my libraries,
triggered when I delete multiple rows from a tree model. After looking
closer, my original bug appears to be caused by the fact that after going:

$model->remove( $iter );

 ... $iter is now pointing at the *next* row, without me having to go:

$model->iter_next( $iter );

So this initially seemed to be easy to solve - just don't call iter_next()
if I've deleted a row. But ... I was previously exiting the loop, based on
the return of $model->iter_next( $iter ). If there are no more rows, this
call returns false. Since I'm not calling it for deleted rows, and since
$iter is still 'set' in this case, how do I know if I'm at the end of the
model?

Currently in this situation, my loop exits anyway, but due to:

(main.pl:7769): Gtk-CRITICAL **: 20:49:43.945: gtk_list_store_get_value:
assertion 'iter_is_valid (iter, list_store)' failed

(main.pl:7769): Gtk-CRITICAL **: 20:49:55.529: gtk_list_store_get_value:
assertion 'iter_is_valid (iter, list_store)' failed
*** unhandled exception in callback:
***   [gperl_sv_from_value] FIXME: unhandled type - 0 ((null) fundamental
for (null))
***  ignoring at /usr/local/lib64/perl5/5.24.1/Gtk3.pm line 546.

 ... which I guess is because, as the error says, $iter is not valid. Is
there an iter_is_valid() method or something?

Thanks :)

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


Re: First deprecate APIs and then remove them in the next major version

2017-12-17 Thread Daniel Kasak
Yeah, I poked originally. See:
 https://bugzilla.gnome.org/show_bug.cgi?id=156017#c3
 https://bugzilla.gnome.org/show_bug.cgi?id=156017#c5
 https://bugzilla.gnome.org/show_bug.cgi?id=156017#c6

Other people commented and submitted further patches after that. After
that, I just gave up. If you're looking for more volunteers, have a good
think about this.

Just recently another bug has been marked as a duplicate of this one. I get
the feeling if I just continue to ping the bug, or the list, people would
tell me to pull my head in because it's not scratching their itch or
whatever. I only brought it up in the context of someone else saying there
are issues getting patches reviewed and applied.

Regarding IRC - I've never used it because it doesn't save history, so I
have to keep an IRC client open 24/7 just to see people's responses - and
the people I'm waiting on are invariably in a different timezone. If you
have a viable product, submitting a bug to their bug tracking systems and
pinging a couple of times should be sufficient - and I note what's been
said above regarding there only being 1 full-time developer on the product.
Redirecting people to IRC doesn't make less work for anyone - it makes
more. Anyway, I did email the gtk-devel-list - from memory - though
admittedly it was 13 years ago, as you mentioned.

> Otherwise, you get exactly what you paid for.

Oh, I had that one coming. Thankyou.

Dan

On Mon, Dec 18, 2017 at 11:16 AM, Emmanuele Bassi <eba...@gmail.com> wrote:

> On 17 December 2017 at 23:14, Daniel Kasak <d.j.kasak...@gmail.com> wrote:
>
> >> Just one example, gtk3 (yes 3, not even 4) is currently completely
> >> unusable on
> >> Mac, so I sent a patch to fix this:
> >>
> >> https://bugzilla.gnome.org/show_bug.cgi?id=791174
> >>
> >> I know my patch is suboptimal, but to make this clear: it does not
> address
> >> a
> >> minor bug, this bug is a real show stopper on Mac, and this change is
> >> purely
> >> gtk internal. Of course it is not a clean solution, but there is no
> reason
> >> to
> >> simply apply this patch (at a bare minimum at least to the gtk3/stable
> >> branch)
> >> with a FIXME comment for now so that people on Mac can finally start
> using
> >> gtk3
> >> at all.
> >
> >
> > I really have to agree. One of my bugs I raised in 2004 - which involves
> > data loss - is still open. I submitted a patch ( which was difficult at
> the
> > time - I only dabble in C when I absolutely have to ) which received very
> > little feedback, and the bug has rotted since.
>
> Yes, everyone has their own pet bug where they submitted a patch and
> waited for feedback, as if GTK doesn't have ~3000 issues open at any
> given time, and a constant stream of bugmail.
>
> It would be *great* if we could review all incoming patches; sadly, we
> either do that, or we spend time actually developing the toolkit.
>
> Plus, if you have a patch lying in bugzilla for *13* years and you
> never bothered to actually poke people about it, then I don't think
> it'll ever get bumped up in terms of priority on the list of things to
> do.
>
> > "Send a patch" only goes so far. If patches don't get reviewed, or don't
> get
> > sufficient feedback, and never get accepted, what's the point in sending
> > patches?
>
> Your role doesn't terminate at sending a patch.
>
> It's your bug, your patch, and your responsibility for bringing it up
> to the people *volunteering* to work on GTK. If you have a patch that
> is languishing in Bugzilla, join the #gtk+ IRC channel on
> irc.gnome.org, or send an email to gtk-devel-list.
>
> Otherwise, you get exactly what you paid for.
>
> Ciao,
>  Emmanuele.
>
> --
> https://www.bassi.io
> [@] ebassi [@gmail.com]
>
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: First deprecate APIs and then remove them in the next major version

2017-12-17 Thread Daniel Kasak
On Sun, Dec 17, 2017 at 1:12 AM, Christian Schoenebeck <
schoeneb...@linuxsampler.org> wrote:

> On Samstag, 16. Dezember 2017 12:05:03 CET Sébastien Wilmet wrote:
> > On Fri, Dec 15, 2017 at 11:10:46AM -0500, Matthias Clasen wrote:
> > > I know this may sound harsh, but: If you want things to work
> differently,
> > > send patches.
>
> In theory. In practice you send patches and then you get a response like
> "hmm,
> not sure about that, I would like to have it differently", and that
> without an
> actual suggestion how to do that "differently".
>
> Like you said, if you want things differently, send your patches. But then
> as
> a patch sender you have the same expectation: you don't like the patch,
> make a
> better suggestion! You don't have a better suggestion or at least an
> adequate
> feedback? Ok, then apply the patch and simply add FIXME comment(s) at your
> own
> discretion and maybe one day somebody replaces it with a better solution.
>
> Just one example, gtk3 (yes 3, not even 4) is currently completely
> unusable on
> Mac, so I sent a patch to fix this:
>
> https://bugzilla.gnome.org/show_bug.cgi?id=791174
>
> I know my patch is suboptimal, but to make this clear: it does not address
> a
> minor bug, this bug is a real show stopper on Mac, and this change is
> purely
> gtk internal. Of course it is not a clean solution, but there is no reason
> to
> simply apply this patch (at a bare minimum at least to the gtk3/stable
> branch)
> with a FIXME comment for now so that people on Mac can finally start using
> gtk3
> at all.
>

I really have to agree. One of my bugs I raised in 2004 - which involves
data loss - is still open. I submitted a patch ( which was difficult at the
time - I only dabble in C when I absolutely have to ) which received very
little feedback, and the bug has rotted since. I believe it exists in gtk+
versions 2 and 3, but I removed support for GtkComboBoxEntry widgets from
all my code when porting to version 3 to avoid the issue entirely.

"Send a patch" only goes so far. If patches don't get reviewed, or don't
get sufficient feedback, and never get accepted, what's the point in
sending patches?

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


Re: Gtk+4.x and broadway ( and other remote options )

2017-12-06 Thread Daniel Kasak
Hi Alexander. I appreciate you clarifying this for us. It was a nice
surprise to read on Phoronix recently that you're still committing fixes &
improvements to the broadway codebase. I'd like to understand - has
anything changed in the past year that's brought you back to broadway? I
know there are still a handful of users around who would love to see this
continue ( some of them email me directly, and I have to answer: "sorry -
I'm just a user as well" ). If throwing money at the problem works, we
might be able to arrange that, maybe via a crowdfunding page, or something
less formal. Would it be worth it to you or Redhat?

Dan

On Fri, Dec 16, 2016 at 2:25 AM, Alexander Larsson <al...@redhat.com> wrote:

> On ons, 2016-12-07 at 14:18 +1100, Daniel Kasak wrote:
> > Hi all.
> >
> > I posting here in response to comments on bug:
> > https://bugzilla.gnome.org/show_bug.cgi?id=775680 ( summary: broadway
> > support likely to be removed from Gtk+4.0 ).
> >
> > I think it would be a massive pity to drop broadway support from gtk.
> > It's been a god-send for me and those I work with - it provides the
> > best remote access to gtk apps and performs way better than vnc. I've
> > actually been working on an authentication + transparent proxy for
> > broadway, so multiple users can access multiple apps all via https on
> > port 443: https://tesla.duckdns.org/transparent-proxy-for-broadway-gt
> > k3-html5-backend/
>
> So, there are two issues with broadway.
>
> First of all, I wrote it mostly as a proof of concept of an interesting
> idea. I have zero cycles to spend on it anymore, nor do any of the
> other people who currently work on Gtk+. Its still there, because it
> just works and is not really a burden on the existing code unless you
> use it.
>
> Secondly, while it just keeps working in gtk3, the same is not true for
> Gtk4. We're doing massive changes to the internals of the drawing
> model, with the end goal of having a much more modern base targeting
> how current GPU hardware works. This is very much not how broadway
> works though, so there is some conflict here. For now, we have fallback
> code for the rendering that keeps broadway working, so we're keeping it
> around, but if at any point broadway becomes a problem to keep working
> we're going to drop. I don't really forsee this happening at the
> moment, but there are no guarantees.
>
> --
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> =-=-=-=-=-=-=-=
>  Alexander LarssonRed Hat, Inc
>al...@redhat.comalexander.lars...@gmail.com
> He's a lonely bohemian shaman on his last day in the job. She's a
> beautiful psychic schoolgirl looking for love in all the wrong places.
> They fight crime!
>
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: webassembly

2017-11-20 Thread Daniel Kasak
While I concede this ( webassembly ) and broadway are most likely
dead-in-the-water for gtk+4, there's no harm in me putting my hand up as a
possible user, if such things did eventuate. It's probably more likely that
a wayland compositor gets welded to an RDP/VNC server and becomes usable?
As for broadway being a 'toy' ... it's a pretty impressive toy, really. It
does everything I wanted, other than copy & paste, and was remarkably
stable. It wouldn't be so attractive if it wasn't damn near impossible to
build gtk+ on Windows ... or if flatpak a) worked on windows, and b) would
build perl stuff.

Anyway, if there is enough demand, we can look into pooling our cash and
funding development ( eg via freelancer or something ). At this point,
there only seems to be about a post every 6 to 12 months about broadway,
and half of them are from me ;)

Dan

On Tue, Nov 21, 2017 at 6:42 AM, Andrea Zagli via gtk-devel-list <
gtk-devel-list@gnome.org> wrote:

> Il giorno lun 20 nov 2017 19:23:08 CET, Emmanuele Bassi ha scritto:
>
> On 20 November 2017 at 17:34, Andrea Zagli  wrote:
>>
>>> Il giorno lun 20 nov 2017 16:02:11 CET, Emmanuele Bassi ha scritto:
>>>
>>> Hi;

 On 20 November 2017 at 14:52, Andrea Zagli via gtk-devel-list
  wrote:

>
> do you plan to port (i don't know if "port" is the right word) glib/gtk
> to
> webassembly?
>


 There are no plans that I'm aware of, nor use cases that have
 materialised that would require such a port.


>>>
>>>
>>> for example it could replace broadway
>>>
>>
>> Considering that the Broadway backend is mostly a toy, and it hasn't
>> seen much development at all in master, I'm not sure replacing it is
>> going to work.
>>
>> Writing new GDK backends, and ensuring that they keep working, is not
>> a trivial matter.
>>
>> since i hate other languages than c, i wrote a little library with glib to
>>> easy develop cgi; and i use other libraries (libgda, libsoup, libxml, etc
>>> etc) to make my web apps
>>>
>>> the base code for that web apps is always a library that i use also for
>>> the
>>> gui backend of the web app
>>>
>>> with webassembly i could write backend and frontend in glib/gtk
>>>
>>
>> If you are volunteering to write a new GDK backend, and maintain it,
>> then by all means: feel free to work on it and submit your code for
>> review!
>>
>> I strongly advise you work on the master branch, as the rendering
>> model has drastically changed from the gtk-2-24 and gtk-3-22 stable
>> branches.
>>
>>
>
> unfortunately my knowledge of glib/gtk structure/architecture is close to
> zero
>
> same thing for webassembly and what it means port to it a library of the
> level of glib/gtk
>
>
> PS: an other use case could be use latest version of glib/gtk/etc "under"
> winxp (but maybe the browser version that support webassembly doesn't
> suport anymore winxp)
>
> ___
> gtk-devel-list mailing list
> gtk-devel-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/gtk-devel-list
>
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: Broken link in docs - GdkEventMask

2017-11-04 Thread Daniel Kasak
Hey Eric. Yours is looking nice :) At the moment, I'm just drawing
rectangular bars in my graphs:
http://tesla.duckdns.org/downloads/screenshot.jpg

I'm not on top of the maths required for nice curvy lines at this point,
but I should read up on it. There have been more pressing issues to deal
with up to this point. Anyway I'll check out your project - thanks for the
link :)

Dan

On Sat, Nov 4, 2017 at 12:23 PM,  wrote:

>
>
> Hi Dan,
>
> A little aside here. I put together a multigraph widget. Works better than
> my last attempt at drawing many graphs in one drawing area.
>
> https://github.com/cecashon/OrderedSetVelociRaptor/tree/
> master/Misc/MultiGraph
>
> Yep, a lot of linear equations and loops. Cairo can draw fast so it does
> well. Better than I thought it would. Haven't captured any kwh with it
> though. Haven't figured out how to do Perl bindings yet either. Some fun
> with graphs.
>
> Eric
>
>
___
gtk-list mailing list
gtk-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-list


Re: Broken link in docs - GdkEventMask

2017-11-02 Thread Daniel Kasak
Thanks Emmanuele :)

On Fri, Nov 3, 2017 at 9:00 AM, Emmanuele Bassi <eba...@gmail.com> wrote:

> On 2 November 2017 at 21:46, Daniel Kasak <d.j.kasak...@gmail.com> wrote:
> > Hi all.
> >
> > On the page: https://developer.gnome.org/gtk3/stable/GtkWidget.html#
> gtk-widget-add-events
> >  ... the link for GdkEventMask points to:
> > https://developer.gnome.org/gtk3/gdk4/gdk4-Events.html#GdkEventMask
> > ... which doesn't exist.
>
> Yes, that's a known gtk-doc issue with the developer.gnome.org
> scripts; the actual page is:
>
>   https://developer.gnome.org/gdk3/stable/gdk3-Events.html#GdkEventMask
>
> You probably want to install DevHelp and have the documentation
> locally, instead of using the website.
>
> > Could anyone point me to some docs that would help me understand what
> > I pass to gtk_widget_add_events? I have some ( perl ) code that I was
> > given in the gtk-perl list to add some events for catching mouse
> > events:
> >
> > $drawing_area->add_events(0x004|0x100|0x200);
>
> > This works, but:
> >  a) I don't know where these values are coming from and what they are
> >  b) I'd like to also catch mouse wheel events now
> >
> > Any tips?
>
> This is a gtk-perl-list question, really. The Perl bindings for GLib
> typically use strings, not an enumeration, for flags; see:
>
>   http://gtk2-perl.sourceforge.net/doc/pod/Glib.html#PERL_VERSUS_C
>
> the section about flags. So if you want to handle pointer events, you
> want to use:
>
>   [ "button-press-mask", "button-release-mask" ]
>
> and if you want to get scrolling events, you want to add "scroll-mask"
> and "smooth-scroll-mask".
>
> Ciao,
>  Emmanuele.
>
> --
> https://www.bassi.io
> [@] ebassi [@gmail.com]
>
___
gtk-list mailing list
gtk-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-list


Broken link in docs - GdkEventMask

2017-11-02 Thread Daniel Kasak
Hi all.

On the page: 
https://developer.gnome.org/gtk3/stable/GtkWidget.html#gtk-widget-add-events
 ... the link for GdkEventMask points to:
https://developer.gnome.org/gtk3/gdk4/gdk4-Events.html#GdkEventMask
... which doesn't exist.

Could anyone point me to some docs that would help me understand what
I pass to gtk_widget_add_events? I have some ( perl ) code that I was
given in the gtk-perl list to add some events for catching mouse
events:

$drawing_area->add_events(0x004|0x100|0x200);

This works, but:
 a) I don't know where these values are coming from and what they are
 b) I'd like to also catch mouse wheel events now

Any tips?

Thanks :)

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


Re: Drawing Area issues ( continued, with example )

2017-10-10 Thread Daniel Kasak
Ah, thankyou :) Yes, indeed, if I avoid constructing further contexts,
it works. I can replace this with just calling set_source_rgba() on
the 1 context in *most* cases, though I'd have to have *two* passes
for the graphs, as I draw a 'highlight' line ( lighter colour ) as
well as the 'regular' line that encloses the bars ( and which I call
->fill inside of later ). Still, that's not much more work.

Does anyone know ... would this bug be in the bindings, or in gtk+ or cairo?

Dan

On Wed, Oct 11, 2017 at 1:43 PM, Jeremy Volkening <j...@base2bio.com> wrote:
> On Tue, Oct 10, 2017 at 09:38:03PM +1100, Daniel Kasak wrote:
>>
>> I've cut down my app to a "relatively small" example which doesn't
>> need a database connection or loads of other stuff. It's still 400+
>> lines ( with lots of whitespace ). I know it's asking a lot, but if
>> someone can figure out what I'm doing wrong, I'd be very grateful ...
>
>
> Your issues stem from the creation of multiple contexts referencing the
> DrawingArea surface within the 'draw' callback, i.e.
>
> my $surface = $cairo_context->get_target;
> # and later..
> my $this_stat_context = Cairo::Context->create( $surface );
>
> If you re-write your code without doing this -- just use the context passed
> into the 'draw' signal callback along with save() and restore() -- I think
> you will find your issues disappear. I haven't completely re-written your
> code, but I tested on one small bit and it had the desired effect.
>
> Why this happens is a little bit hazy to me. If you print the values
> passed into the 'draw' callback, you can see that all of the pointers to the
> cairo context are the same for the different DAs. Somehow this gets sorted
> out if you just use the context as given, but my guess is that when you are
> calling get_target() it returns the surface for the first DrawingArea only,
> and then your issues arise.
>
> Regards,
> Jeremy
>
> --
> Civilization is the limitless multiplication of unnecessary necessities.
> -- Mark Twain
> ___
> gtk-perl-list mailing list
> gtk-perl-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/gtk-perl-list
___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-perl-list


Drawing Area issues ( continued, with example )

2017-10-10 Thread Daniel Kasak
Hi again everyone.

I've cut down my app to a "relatively small" example which doesn't
need a database connection or loads of other stuff. It's still 400+
lines ( with lots of whitespace ). I know it's asking a lot, but if
someone can figure out what I'm doing wrong, I'd be very grateful ...

If you hit the 'graph 1 date' button, you'll get a perfectly working
graph ( hit it multiple times to cycle through the 4 series I've added
to the example data ). If you hit the 'graph 4 dates' button, you'll
see the bug I'm trying to fix. The 'render text dots' checkbutton
activates rendering of some dots via Pango in approximately the same
areas as the graph series should be rendered. The dot rendering uses
the same cairo context that I'm using for rendering the graph series.
I would expect that if I'm doing something horribly wrong with my
cairo contexts, the *dots* would also render in the wrong place ...
but that's not happening.

Help!

Fully self-contained example:
http://tesla.duckdns.org/downloads/drawing_area.tar.bz2

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


Re: How to get a "traditional" file-chooser

2017-09-14 Thread Daniel Kasak
Come on. It's troll bait. He comes to a gtk+ list, declaring his
preference upfront to not use gtk3 because the "file chooser is
driving me crazy". In what why is the file chooser driving him crazy?
Unknown - other than it not looking like GTK2 or qt ( unknown version
) file chooser. Just wondering: what apps use a file chooser anyway?
He didn't mention that either. There's gedit and glade ( I'm guessing
he's not using glade ). He does mention that "more and more
applications of my desktop are ( being ) ported to GTK3". I'm again
wondering which applications. If you're on Gnome or Cinnamon or
whatever, you get *all* GTK3 apps, not a mix  Doesn't add up to me.
Anyway, would you like to tease more information out of Clemens
regarding what parts of the file chooser is driving him crazy? In the
meantime, I stand by my recommendation. If someone passionately hates
parts of a gui toolkit, they should use apps written in a different
toolkit. If, on the other hand, they have a serious intention to use
gtk3, then constructive observations / suggestions / feature requests
would have been included, and things like "drive me crazy" and "I
tried to avoid GTK3 applications" would not. Quick comparison ... I
don't use QT apps when I have a choice either ... I prefer GTK apps. I
like GTK's default theme better, and I also develop GTK apps. I like
some consistency on my desktop, so once there's a critical mass of
apps using 1 toolkit, I try to have all apps using that toolkit.
That's personal choice. However, note that I don't rock up to QT
mailing lists declaring "Hey there donkeys ... I've tried really hard
not to use QT because I think the calendar widget looks like arse. How
about you make it more like GTK3?".

On Fri, Sep 15, 2017 at 9:43 AM, Paul Davis <p...@linuxaudiosystems.com> wrote:
> Now that was surely helpful.
>
> On Thu, Sep 14, 2017 at 6:48 PM, Daniel Kasak <d.j.kasak...@gmail.com>
> wrote:
>>
>> Of course there is. Use GTK2 or QT apps. I suggest Redhat 5. That shit
>> is old school.
>>
>> On Fri, Sep 15, 2017 at 4:22 AM, Clemens Eisserer <linuxhi...@gmail.com>
>> wrote:
>> > Hi,
>> >
>> > Until recently I tried to avoid GTK3 applications, because the GTK3's
>> > file chooser is driving me crazy.
>> > However, as more and more applications of my desktop environment are
>> > ported to GTK3, I wonder ... is there any way, to get a more
>> > traditional file chooser for GTK3 applications which resembles what
>> > GTK2 or QT offer?
>> >
>> > Thank you in advance, Clemens
>> > ___
>> > 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
>
>
___
gtk-list mailing list
gtk-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-list


Re: How to get a "traditional" file-chooser

2017-09-14 Thread Daniel Kasak
Of course there is. Use GTK2 or QT apps. I suggest Redhat 5. That shit
is old school.

On Fri, Sep 15, 2017 at 4:22 AM, Clemens Eisserer  wrote:
> Hi,
>
> Until recently I tried to avoid GTK3 applications, because the GTK3's
> file chooser is driving me crazy.
> However, as more and more applications of my desktop environment are
> ported to GTK3, I wonder ... is there any way, to get a more
> traditional file chooser for GTK3 applications which resembles what
> GTK2 or QT offer?
>
> Thank you in advance, Clemens
> ___
> 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


Re: Motion events in a DrawingArea

2017-08-17 Thread Daniel Kasak

$cr->rotate( $angle );

# Inform Pango to re-layout the text with the new transformation
Pango::Cairo::update_layout( $cr, $layout );

my ( $width, $height ) = $layout->get_size;
$cr->move_to( $x, $y );
Pango::Cairo::show_layout( $cr, $layout );

$cr->restore;

}

sub handle_graph_mouse_move {

my ( $widget, $event ) = @_;

use Data::Dumper;

print "event:\n" . Dumper( $event ) . "\n";

}

On Thu, Aug 17, 2017 at 3:35 AM, Torsten Schoenfeld <kaffeeti...@gmx.de> wrote:
> On 16.08.2017 14:12, Daniel Kasak wrote:
>> I'm trying to capture mouse events in a DrawingArea ( in Gtk3 ). I'm
>> adapting code at http://www.perlmonks.org/?node_id=583578 ... but when
>> I go:
>>
>> $self->{drawing_area}->set_events(
>> [ qw/   exposure-mask
>> leave-notify-mask
>> button-press-mask
>> pointer-motion-mask
>> pointer-motion-hint-mask
>> /
>> ]
>> );
>>
>>  ... I get a warning:
>>
>> Gtk-CRITICAL **: gtk_widget_set_events: assertion
>> '!_gtk_widget_get_realized (widget)' failed
>
> We would need to see more code to give specific advice, but the error
> message suggests that you need to call set_events() earlier, because the
> widget has already been realized.  (Note the "!" in the assertion.)
___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-perl-list


Flatpak

2017-07-23 Thread Daniel Kasak
Has anyone played with packaging apps in Flatpak yet? AFAIK there are
no runtimes that include perl at this point, so I'd have to package
quite a bit ... might be worthwhile building a perl runtime that
others can use.

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


Broken link in online docs - GdkRGBA

2017-07-05 Thread Daniel Kasak
Hi all.

At 
https://developer.gnome.org/gtk3/stable/GtkColorButton.html#GtkColorButton--rgba
there is a broken link for GdkRGBA.

I guess it should be:
https://developer.gnome.org/gdk3/stable/gdk3-RGBA-Colors.html

 ... but is:
https://developer.gnome.org/gtk3/gdk4/gdk4-RGBA-Colors.html#GdkRGBA

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


Find path under mouse

2017-06-19 Thread Daniel Kasak
Hi all. Reposting from the gtk-perl list ... no responses there ...

Back in gtk+-2.x, I had some code that could find the path underneath
the mouse ( I was looking for double-click events in a treeview in
this case ):

---

my ( $self, $treeview, $event ) = @_;

if ( $event->type eq '2button-press' ) {

# A double-click event

if ( $event->window == $treeview->get_bin_window ) {

my ( $path, $column, $cell_x, $cell_y ) =
$treeview->get_path_at_pos ( $event->x, $event->y );

---

Now I'm doing something similar in gtk+-3.x. I've set up an event
handler for keypress events, and I'm successfully catching the CTRL-C
keypress event. But I don't see immediately how to get the path /
position under the mouse ...

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


Re: gtk+ 4.x

2017-05-01 Thread Daniel Kasak
Great. Thanks :)

On Mon, May 1, 2017 at 11:27 PM, Torsten Schoenfeld <kaffeeti...@gmx.de> wrote:
> On 14.12.2016 01:47, Daniel Kasak wrote:
>> Just curious ... with gtk+ 4.0 in development, what does the perl
>> binding situation look like? Is it largely a matter of doing a
>> search+replace ( in the binding code ) and rebuilding, or is it a
>> larger effort to support?
>
> Assuming that the gtk+ devs continue to support gobject-introspection,
> you will be able to simply do the following to obtain a first approximation:
>
> use Glib::Object::Introspection;
> Glib::Object::Introspection->setup (
>   basename => 'Gtk',
>   version => '4.0',
>   package => 'Gtk4');
>
> And 'perli11ndoc' (or directly 'perli11ndoc Gtk4' for the text
> interface) would provide API documentation.
>
> If you want the additional convenience and backwards compatibility that
> the overrides in Gtk3 provide, then these would have to be ported.
> ___
> gtk-perl-list mailing list
> gtk-perl-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/gtk-perl-list
___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-perl-list


Re: Async HTTP download with Glib event loop doesn't work on windows

2017-04-09 Thread Daniel Kasak
Sorry for the delay in getting stuff together - as I mentioned, we're
renovating, and everything upstairs is packed / covered in dust / not
functioning. Anyway, I've set up my home server again. I have binaries
available at:
https://tesla.duckdns.org/gtk3-perl-windows/ ... direct link:
http://tesla.duckdns.org/downloads/JewelKit-1.0_strawberry-5.20.1-gtk-3.14.3.zip

This includes gtk+-3.14.3 and whatever other libs + bindings were
current at the time.

The documentation of the build process is available at:
http://win32.arrozcru.org/wiki/index.php?title=Perl-gtk3_for_Windows

I didn't come up with these - I paid another guy to do it, but I did
follow his instructions, and they worked at the time. They don't work
now :( If you can make them work, please document things. I've been
meaning to try pushing some of the patches required to make things
build, but finding the time to do it has been challenging, and it's
also difficult to do, not being the person who actually did the work (
ie the patches ).

Anyway, hopefully this is useful to you. Enjoy :)

Dan

On Sat, Mar 11, 2017 at 7:42 PM, Daniel Kasak <d.j.kasak...@gmail.com> wrote:
> I have some old(ish) binaries of Glib::Object::Introspection for Windows.
> Yes they were a major pain to build. I'd usually point you to my blog (
> http://tesla.duckdns.org ) - but it's offline at the moment ... we're
> renovating the house and my ADLS2, home server, and other things are totally
> out of action at the moment. If you're interested, I can go and get the
> server and rescue stuff off it. I also have build instructions that worked
> when they were written ( 18 months ago ). I tried repeating the process a
> couple of months back, and there are unfortunately major issues again, and
> I've kinda lost interest in building for Windows. Anyway, me know if you
> want Windows and/or build instructions.
>
> Dan
>
> On Sat, Mar 11, 2017 at 3:16 AM, Peter Juhasz <peter.juhas...@gmail.com>
> wrote:
>>
>>
>> On Fri, Mar 10, 2017 at 4:38 PM, Emmanuele Bassi <eba...@gmail.com> wrote:
>>>
>>> Without knowing how AnyEvent works, if the handler involves threads
>>> then calling *any* GTK+ API from different threads than the one that
>>> called `gtk_main()` is going to blow up your application. Even if it
>>> worked in one release, during a specific alignment of planets, or if
>>> you placed the machines in a pentacle drawn in goat blood, there's no
>>> guarantee that it'll keep working. GTK+ simply does *not* support
>>> multi-threaded access of the windowing system resources.
>>>
>>
>> It does not do anything like that. It only uses Glib::Timeout, Glib::IO,
>> Glib::Idle watchers in fairly standard ways.
>>
>>>
>>> GTK+ and the G* platform has a whole bunch of API to deal with these
>>> cases, like GTask[0]. Sadly, it's not very Perlish because nobody
>>> wrote introspection overrides for it. Additionally, for things like
>>> HTTP requests, there's a whole library called libsoup[1] which
>>> integrates with the GLib main loop.
>>>
>>
>> We're considering libsoup, but it depends on Glib::Object::Introspection
>> for which there are no windows builds (that we know of).
>>
>>>
>>> Ciao,
>>>  Emmanuele.
>>>
>>
>> thanks,
>> Peter
>>
>>
>> ___
>> gtk-perl-list mailing list
>> gtk-perl-list@gnome.org
>> https://mail.gnome.org/mailman/listinfo/gtk-perl-list
>>
>
___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-perl-list


Re: Combobox and columns

2017-04-02 Thread Daniel Kasak
This bit is a little non-obvious. The related documentation is:
https://developer.gnome.org/gtk3/stable/GtkCellLayout.html#gtk-cell-layout-set-attributes

So you can pass various attributes into the renderer / cell layout /
whatever. I'm still slightly confused by it, but I can make it work :)

In perl, I have a convenience method for setting up renderers for
combos with multi-column models:

---

sub create_combo_renderers {

my ( $self, $widget, $text_column, $icon_column ) = @_;

if ( $icon_column ) {
my $renderer = Gtk3::CellRendererPixbuf->new;
$widget->pack_start( $renderer, FALSE );
$widget->set_attributes( $renderer, pixbuf => $icon_column );
}

my $renderer = Gtk3::CellRendererText->new;
$widget->pack_start( $renderer, FALSE );
$widget->set_attributes( $renderer, text => $text_column );

}

---

It's the last line:
$widget->set_attributes( $renderer, text => $text_column );
 ... that tells the renderer / cell layout which column to use.

Dan


On Mon, Apr 3, 2017 at 8:33 AM, Eric Cashon via gtk-list
 wrote:
> Hi Axel,
>
> How do you want to change the list column combo in your program?
>
> If you use a combo2 box row to change a combo1 box column from a list you
> might have a "changed" callback that looks something like the following.
>
> Eric
>
> ...
> GtkCellRenderer *renderer=NULL;
> ...
> renderer=gtk_cell_renderer_text_new();
> ...
> static void change_column(GtkComboBox *combo2, GtkComboBox *combo1)
>   {
> gint row=gtk_combo_box_get_active(combo2);
> gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(combo1),
> GTK_CELL_RENDERER(renderer), "text", row, NULL);
> gtk_widget_queue_draw(GTK_WIDGET(combo1));
>   }
>
>
>
> -Original Message-
> From: axel 
> To: gtk-list 
> Sent: Sun, Apr 2, 2017 6:39 am
> Subject: Combobox and columns
>
> Have a liststore with 4 columns. And a combobox with a cellrenderer.
> UI made with Glade. Programm is written in C.
>
> How to choose one of the columns out of the liststore to use/show in the
> combobox?
> I can set in Glade the actual column but I need it to be done on runtime.
>
>
>
> Cheers,
> Axel
>
> ___
> 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
>
___
gtk-list mailing list
gtk-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-list


Re: Glade crash

2017-03-02 Thread Daniel Kasak
There is no attachment. Try sharing it a different way - pastebin or
something.

Dan

On Wed, Mar 1, 2017 at 5:18 AM, pozzugno  wrote:

> Most probably this isn't the most appropriate mailing list, because I
> think my issue is related to Glade (and not Gtk libraries).
>
> Attached is one of my graphical interface, designed with Glade.
> Unfortunately when Glade opens this file, it seems it is very unstable if I
> try to change something.
>
> For example, let's try to delete the row in the fans_store GtkListStore
> object. Glade 3.20 will crash (at least in Windows).
>
> Do you understand why? I tried many things, even editing manually the
> .glade file with a text-editor. Many times, Glade wil crash during opening
> the edited file.
>
>
> ___
> gtk-app-devel-list mailing list
> gtk-app-devel-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
>
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Tooltip for GtkTextView contents

2017-02-21 Thread Daniel Kasak
Thanks for the response. It came down to a simple logic error. In this code:

my $start_iter;

if ( $iter->starts_word ) {
$start_iter = $iter;
} else {
$iter->backward_word_start;
$start_iter = $iter;
}

$iter->forward_word_end;

 ... I set $start_iter to be $iter. This *doesn't* make a copy of the
iter ... so when I call $iter->backward_word_start or
$iter->forward_word_end ... both $start_iter and $iter are pointing to
the same position. The correct method of getting 2 iters ( eg for
'start' and 'end' ) is to create them independently.

Dan

On Sat, Feb 18, 2017 at 6:51 AM,   wrote:
>
> Hi Dan,
>
> I am not very good with Perl but it looks like the iters aren't getting
> moved forward and backwards on the word the cursor is over. In C, the
> callback would look something like
>
> static gboolean query_tooltip(GtkWidget *textview, gint x, gint y, gboolean
> keyboard_mode, GtkTooltip *tooltip, gpointer user_data)
>   {
> GtkTextIter start_iter;
> GtkTextIter end_iter;
> GtkTextBuffer *buffer=gtk_text_view_get_buffer(GTK_TEXT_VIEW(textview));
> gtk_text_view_get_iter_at_location(GTK_TEXT_VIEW(textview), _iter,
> x, y);
> if(gtk_text_iter_inside_word(_iter))
>   {
> start_iter=end_iter;
> gtk_text_iter_forward_word_end(_iter);
> gtk_text_iter_backward_word_start(_iter);
> gchar *string=gtk_text_buffer_get_text(buffer, _iter,
> _iter, TRUE);
> gtk_tooltip_set_text(tooltip, string);
> g_free(string);
> return TRUE;
>   }
> return FALSE;
>   }
>
> Should be similar in Perl, right?
>
> Eric
>
>
___
gtk-list mailing list
gtk-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-list


Re: Tooltip for GtkTextView contents

2017-02-16 Thread Daniel Kasak
Also should note - the detection of whether the pointer is over a word
or not ( $iter->inside_word ) *is* working correctly ... as my app
appears to be returning correctly when I'm pointing at whitespace. It
just prints blank lines when I point at some text.

Dan

On Fri, Feb 17, 2017 at 3:50 PM, Daniel Kasak <d.j.kasak...@gmail.com> wrote:
> Hi all.
>
> I'd like to provide help on special text ( tokens in code ) in a
> GtkSourceView / GtkTextView. I see my question is basically:
> https://mail.gnome.org/archives/gtk-list/2010-May/msg00107.html
>
>  ... and the important part of the response to this question was:
>
> "Simply set text view's "has-tooltip" property to "TRUE" and connect handler 
> to
> "query-tooltip" signal. Use coordinates provided by callback to find
> the word that cursor hovers over and then do the lookup. I think
> things should be relatively simple."
>
> So I've done attempted this in Perl:
>
> ---
>
> sub on_PARAM_VALUE_query_tooltip {
>
> my ( $self, $sourceview, $window_x, $window_y, $keyboard_mode,
> $tooltip ) = @_;
>
> my ( $buffer_x, $buffer_y ) = $sourceview->window_to_buffer_coords
> ( 'GTK_TEXT_WINDOW_TEXT', $window_x, $window_y );
>
> my ( $trailing, $iter ) = $sourceview->get_iter_at_position(
> $buffer_x, $buffer_y );
>
> if ( ! $iter->inside_word ) {
> return FALSE;
> }
>
> my $start_iter;
>
> if ( $iter->starts_word ) {
> $start_iter = $iter;
> } else {
> $iter->backward_word_start;
> $start_iter = $iter;
> }
>
> $iter->forward_word_end;
>
> my $text = $sourceview->get_buffer->get_text( $start_iter, $iter, 1 );
>
> print "$text\n";
>
> }
>
> ---
>
> This code runs, produces iters where expected, but then never gets any text.
>
> What have I done wrong?
>
> Thanks :)
>
> Dan
___
gtk-list mailing list
gtk-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-list


Tooltip for GtkTextView contents

2017-02-16 Thread Daniel Kasak
Hi all.

I'd like to provide help on special text ( tokens in code ) in a
GtkSourceView / GtkTextView. I see my question is basically:
https://mail.gnome.org/archives/gtk-list/2010-May/msg00107.html

 ... and the important part of the response to this question was:

"Simply set text view's "has-tooltip" property to "TRUE" and connect handler to
"query-tooltip" signal. Use coordinates provided by callback to find
the word that cursor hovers over and then do the lookup. I think
things should be relatively simple."

So I've done attempted this in Perl:

---

sub on_PARAM_VALUE_query_tooltip {

my ( $self, $sourceview, $window_x, $window_y, $keyboard_mode,
$tooltip ) = @_;

my ( $buffer_x, $buffer_y ) = $sourceview->window_to_buffer_coords
( 'GTK_TEXT_WINDOW_TEXT', $window_x, $window_y );

my ( $trailing, $iter ) = $sourceview->get_iter_at_position(
$buffer_x, $buffer_y );

if ( ! $iter->inside_word ) {
return FALSE;
}

my $start_iter;

if ( $iter->starts_word ) {
$start_iter = $iter;
} else {
$iter->backward_word_start;
$start_iter = $iter;
}

$iter->forward_word_end;

my $text = $sourceview->get_buffer->get_text( $start_iter, $iter, 1 );

print "$text\n";

}

---

This code runs, produces iters where expected, but then never gets any text.

What have I done wrong?

Thanks :)

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


Re: GTK3 Glade and rendering in Windows/Linux]

2017-02-02 Thread Daniel Kasak
I'm not sure of the licensing implications ( maybe there are none ),
but the current Ubuntu theme is implemented exclusively in css. If you
have a Ubuntu box, you can locate them in /usr/share/themes ( eg
/usr/share/themes/Ambiance/gtk-3.20 is one particular theme ). If you
copy these into the right directory ( depends on your gtk+ environment
), you can use them under Windows. Note that you'll need a theme
that's written for your gtk+ version - the theming spec is now stable
for current gtk-3.x.

Dan

On Wed, Feb 1, 2017 at 3:16 AM, Michael Torrie  wrote:
> On 01/31/2017 05:54 AM, Happy wrote:
>>
>> Thanks for the note. Hope the following links work. As you can see the
>> windows are much different in size as well as the spacing.
>>
>> Ubuntu:
>> https://drive.google.com/file/d/0BxjwKUaYdW_zYnUydWExX2NNdE0/view?usp=s
>> haring
>>
>> Windows:
>> https://drive.google.com/file/d/0BxjwKUaYdW_zeFhZdFYtelViUGM/view?usp=s
>> haring
>>
>> Glade.glade file:
>> https://drive.google.com/file/d/0BxjwKUaYdW_zYWY4UnZweDhRbGc/view?usp=s
>> haring
>>
>> Thanks
>
> The differences are due to different themes used.  If you used the same
> theme between Windows and Linux, the output should look near identical.
> But if you want it to look somewhat native on Windows, stick with the
> default Windows-ish theme there.  The Windows UI look and feel has
> gotten rather big and spaced out in recent years, so maybe the theme is
> just reflecting this.  Does your GTK+ GUI look very different than
> native Win32 apps?
>
> There's no reason I can think of to expect or want things to look pixel
> per pixel identical between different operating systems and desktop
> environments, though like I said you can do that by manually picking the
> same theme as you use on the other platform.  GTK's layouts are flexible
> and can adapt and adjust to many different sizes and spacings.
>
> Just a note that your Windows example appears to be scaled by Windows
> because of the UI DPI setting; you can turn that off by right-clicking
> on the executable and going to properties, compatibility and disabling
> the scaling option.
> ___
> gtk-app-devel-list mailing list
> gtk-app-devel-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: GTK3 Glade and rendering in Windows/Linux]

2017-01-31 Thread Daniel Kasak
Neither of your messages had any attachments. Probably they're
stripped out by the mailing list server. If you're trying to point
people to files, screenshots, etc, try  chucking them on a blog or
pastebin or something.

Dan

On Sun, Jan 29, 2017 at 12:44 PM, Happy  wrote:
>
> Attached is a glade file. These render as seen in the attachments in
> Windows and Ubuntu(16.10). In Windows(10) the window is far larger as
> well as is for the spacing. It there a away to get the spacing and size
> down alike the rendering in Windows ? I guess this is not so much
> related to glade but more towards GTK, but if this assumption is wrong,
> then apologies for posting.
>
> ___
> gtk-app-devel-list mailing list
> gtk-app-devel-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


gtk+ 4.x

2016-12-13 Thread Daniel Kasak
Hi all.

Just curious ... with gtk+ 4.0 in development, what does the perl
binding situation look like? Is it largely a matter of doing a
search+replace ( in the binding code ) and rebuilding, or is it a
larger effort to support?

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


Gtk+4.x and broadway ( and other remote options )

2016-12-06 Thread Daniel Kasak
Hi all.

I posting here in response to comments on bug:
https://bugzilla.gnome.org/show_bug.cgi?id=775680 ( summary: broadway
support likely to be removed from Gtk+4.0 ).

I think it would be a massive pity to drop broadway support from gtk.
It's been a god-send for me and those I work with - it provides the
best remote access to gtk apps and performs way better than vnc. I've
actually been working on an authentication + transparent proxy for
broadway, so multiple users can access multiple apps all via https on
port 443: 
https://tesla.duckdns.org/transparent-proxy-for-broadway-gtk3-html5-backend/

I've dabbled in C here and there ( mainly patching minor bugs ). It's
been quite a long time since I used it at all. However I'm interested
in attempting to keep broadway support alive. I currently develop gtk
apps ( every day ) using the Perl bindings. So I'm familiar with it
from an application-developer perspective.

I have no idea how big/complex a task it is I'm talking about. Could
someone please comment on the difficulty of keeping broadway support
working, given the planned gtk+4.x changes. I guess this would be
easier if someone offers to mentor me ( please ) - though I realise we
all have busy lives.

Another option, if the task is too large or difficult for me, is to
either offer a bounty here, or to post a project on something like
freelancer. I also realise that work done via freelancer would
possibly be of questionable quality, and would quite possibly break
with later gtk+ versions again. Any comments on this option?

Another option would be another remote-desktop / remote-app
capability. I've read a little on wayland / weston and RDP. I think
RDP would be a reasonable option, though haven't managed to get it
working yet.

What does everyone think my best options are, and why?

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


Re: GTK+ with Broadway

2016-12-05 Thread Daniel Kasak
Yes it is. Do something like:

ssh -C -L 1:127.0.0.1:1 me@remote_broadway_server

I also posted recently on a way to get multiplexed connections and
SSL/TLS termination:
https://tesla.duckdns.org/transparent-proxy-for-broadway-gtk3-html5-backend/

I'm trying to make some time to implement a complete solution, with an
authentication+cookie database and configurable redirection ( ie to
multiple broadway applications ), but free time is hard to come by.

Dan

On Tue, Dec 6, 2016 at 2:01 AM, Igor D <ivb...@gmail.com> wrote:
> Hi,
>
> Is it possible to forward connection from web browser to Broadway display
> server via SSH ?
>
> Thanks,
> Igor
>
> On Tue, Nov 29, 2016 at 12:15 PM, Daniel Kasak <d.j.kasak...@gmail.com>
> wrote:
>>
>> Unfortunately, no there is no way to do this. *If* copy + paste were
>> implemented between a broadway app and the browser, then you could at
>> least push a link to a file to download into the browser, and the user
>> could copy it and paste it into a new tab. Anyway, copy + paste is not
>> implemented yet ( Hi devs ... if this is easy, it would be pretty
>> damned handy ).
>>
>> I haven't had to do anything like this yet, but if I had to tomorrow,
>> I'd get users to enter an email address in a config screen, and I'd
>> email documents or links to downloads to them. Not ideal, I know.
>>
>> Dan
>>
>> On Tue, Nov 29, 2016 at 7:31 PM, Igor D <ivb...@gmail.com> wrote:
>> > Hi,
>> >
>> > I'm working with GTK+ via Broadway.
>> > I need to upload and save some file on local computer (which run
>> > browser).
>> > Can I do in this mode that and how ?
>> >
>> > Thanks,
>> > Igor
>> >
>> > On Thu, Oct 13, 2016 at 3:10 PM, Igor D <ivb...@gmail.com> wrote:
>> >>
>> >> Hi Dan,
>> >>
>> >> I don't need real time graphing or something like that. It should work
>> >> only after triggers from user.
>> >>
>> >> I don't remember exactly which feature was missed. I'll recheck.
>> >>
>> >> Your inputs are optimistic :-)
>> >>
>> >> Thanks a lot for the help.
>> >> Igor
>> >>
>> >>
>> >>
>> >> On Thu, Oct 13, 2016 at 2:04 PM, Daniel Kasak <d.j.kasak...@gmail.com>
>> >> wrote:
>> >>>
>> >>> On Thu, Oct 13, 2016 at 5:31 PM, Igor D <ivb...@gmail.com> wrote:
>> >>>
>> >>> > Hi,
>> >>> >
>> >>> > Thanks for prompt reply.
>> >>> >
>> >>> > Yes, I have couple of specific concerns:
>> >>> > 1. Performance. I'm not looking for something special but expect
>> >>> > something
>> >>> > reasonable. My few experiments show
>> >>> > that performance may be too low.
>> >>>
>> >>> I haven't seen bad performance in terms of user experience, though I
>> >>> have noticed high CPU usage in the broadwayd process(es). My very
>> >>> rough guess is that you can support somewhere between 2-3 times the
>> >>> number of active users as CPU cores on your system before users start
>> >>> to notice. I've never done any stress-testing to see what exactly
>> >>> would happened if you pushed this limit. I guess if you're trying to
>> >>> deliver to more users than this model supports, you're entering "real"
>> >>> web-app development. Out of interest, what kind of applications are
>> >>> you considering distributing?
>> >>>
>> >>> It will depend a lot on what your app is doing I guess. Real-time
>> >>> graphing or apps where there is constant rendering happening ( eg text
>> >>> flying past in a log viewer ) will consume a lot more CPU than an app
>> >>> that sits still and waits for a user to do something.
>> >>>
>> >>> I've also noticed that broadway gives a much better experience than
>> >>> VNC. VNC is laggy and has rendering glitches. Broadway is pretty
>> >>> impressive under conditions where VNC degrades badly.
>> >>>
>> >>> > 2. Reduced feature set, comparing to GTK without broadway. I found
>> >>> > few
>> >>> > minor
>> >>> > differences but this makes me afraid that it might be more.
>> >>>
>> >>> I haven't noticed any reduced features at all. You may hav

Re: The Big Gtk limitations: a reliable GUI builder

2016-11-30 Thread Daniel Kasak
On Thu, Dec 1, 2016 at 12:32 AM, Pozz Pozz  wrote:

> So this is a Windows only *Gtk* bug, it isn't related to Glade.
> Considering it affects all drag operations for every Gtk applications,
> it's very strange it wasn't fixed yet.
>
> My first impression is Gtk is a product for Linux applications. Using Gtk
> for Windows-only application isn't so smart... I don't know why I selected
> Gtk as my Windows GUI framework.

Frankly, this attitude will get you nowhere, fast. If I was at all
inclined to investigate and further assist, that motivation just
evaporated.

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


Re: The Big Gtk limitations: a reliable GUI builder

2016-11-29 Thread Daniel Kasak
I can confirm both these bugs ( crash copying the treeview, margins
not rendered under altering properties ) under Linux. Actually the top
and bottom margins are rendered immediately, but the left and right
margins need you to alter them before they're rendered correctly.
Sounds like a pretty simple fix for this one. No idea why the treeview
is crashing for you - you've possibly gotten the XML file into an
invalid state that Glade doesn't like. Anyway, you should enter these
in bugzilla :)

I don't drag + drop either - I just cut/copy/paste things around.

Re: the treeview being rendered with 0 space ... you can set it to
'expand' and it should take up some space ... either that or set a
minimum width.

My normal workflow is to lay things out *roughly* in glade, then
actually run the app and see what it looks like. This is partly
because I'm writing database apps and generating lots of content based
on dynamic data. It really doesn't take long to switch back to glade,
tweak things, then re-open the app ( or window ) and see the results.

Dan

On Wed, Nov 30, 2016 at 10:28 AM, pozzugno <pozzu...@gmail.com> wrote:
> First of all, I'm using Glade 3.20.0 for Windows, installed through Msys2
> project. I don't know if Glade is more stable under Linux OS.
>
> When I open a file, non-null margins aren't rendered correctly. Take a look
> at the screencast [1]. As soon as I change one margin (from 10 to 11, for
> example), it is rendered correctly.
>
> Another problem, is very difficult to drag one or more widgets (under a
> sub-tree) between two places. When I click on a widget (or container) and
> start moving, the mouse pointer disappears at all, so the target place is
> very difficult to find (see [2]). During dragging movement, something
> appears at the top-left corner of the window.
>
> It is very simple to have a crash when working with Treeviews. Open the
> attached file, select the Treeview, press Ctrl+C (or select Copy) and...
> puff! Other times Glade crashes when I try to create a column in the
> Treeview.
>
> When I copy a box filled with widgets from one container to another
> container, it seems the margins value aren't copied. I don't know if there
> are other parameters that aren't copied.
>
> Daniel, you wrote you don't populate liststore associated to treeviews. I
> agree with you, but if you don't populate the associated liststore (at list
> the columns description), the treeview is rendered with zero space. Even if
> you add columns in the treeview, you need to associated a compatible
> liststore to see the real effect.
>
> Those are bugs related strictly to Glade, so this post could be off-topic
> for this mailing list. However my goal wasn't to list all the bugs I found
> in Glade, but to understand if my Gtk/Glade workflow/setup is wrong someway.
>
>
> [1]
> https://drive.google.com/file/d/0B1s7dNPGsJ3CQmpxTTVfZkZfdFE/view?usp=sharing
> [2]
> https://drive.google.com/file/d/0B1s7dNPGsJ3CQmpxTTVfZkZfdFE/view?usp=sharing
>
>
>
> Il 29/11/2016 23:08, Daniel Kasak ha scritto:
>>
>> Glade crashes sometimes, yes. It's been much better recently - 3.20
>> seems pretty stable for me. I don't edit liststores in glade at all,
>> so I can't comment on that - I construct and populate them
>> dynamically, and use glade just to place the treeview. I don't really
>> have the other issues you're talking about. I can move things around
>> freely without issues - cut and paste. I've written quite a few apps
>> over the past 15 or so years, using glade and gtk ( 2 and 3 ) - most
>> recently an ETL framework's UI - this is quite a complex beast. No pen
>> and paper involved. No QT either. Maybe record a screencast of your
>> issues so we can get an idea of what you're doing wrong.
>>
>> Dan
>>
>> On Wed, Nov 30, 2016 at 3:51 AM, Pozz Pozz <pozzu...@gmail.com> wrote:
>>>
>>> I don't know why, but some weeks ago I selected Gtk as my next GUI
>>> framework to learn. After some work, I have a very big issue: the
>>> associated GUI builder Glade is not stable at all.
>>>
>>> Many times, when I work with Treeview and Liststore, Glade crashes. I
>>> can't
>>> press Ctrl+C to copy a sub-tree to another place.
>>> The render is not good: margins aren't shown correctly after loading the
>>> file.
>>> It's impossible to move widgets from one place to another (maybe from one
>>> box element to a grid element).
>>>
>>> I know I can design the GUI directly in the code, but it's a big effort
>>> for
>>> me. Usually my GUIs are full of widgets and I'd like to preview them.
>>>
>>> How do you create com

Re: The Big Gtk limitations: a reliable GUI builder

2016-11-29 Thread Daniel Kasak
Glade crashes sometimes, yes. It's been much better recently - 3.20
seems pretty stable for me. I don't edit liststores in glade at all,
so I can't comment on that - I construct and populate them
dynamically, and use glade just to place the treeview. I don't really
have the other issues you're talking about. I can move things around
freely without issues - cut and paste. I've written quite a few apps
over the past 15 or so years, using glade and gtk ( 2 and 3 ) - most
recently an ETL framework's UI - this is quite a complex beast. No pen
and paper involved. No QT either. Maybe record a screencast of your
issues so we can get an idea of what you're doing wrong.

Dan

On Wed, Nov 30, 2016 at 3:51 AM, Pozz Pozz  wrote:
> I don't know why, but some weeks ago I selected Gtk as my next GUI
> framework to learn. After some work, I have a very big issue: the
> associated GUI builder Glade is not stable at all.
>
> Many times, when I work with Treeview and Liststore, Glade crashes. I can't
> press Ctrl+C to copy a sub-tree to another place.
> The render is not good: margins aren't shown correctly after loading the
> file.
> It's impossible to move widgets from one place to another (maybe from one
> box element to a grid element).
>
> I know I can design the GUI directly in the code, but it's a big effort for
> me. Usually my GUIs are full of widgets and I'd like to preview them.
>
> How do you create complex GUIs? Do you really use pen and paper and write
> it directly in code?
>
> IMHO this is a very big limitation and I'm tempted to migrate to QT
> libraries, even if I loose many working days.
> ___
> gtk-app-devel-list mailing list
> gtk-app-devel-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: GTK+ with Broadway

2016-11-29 Thread Daniel Kasak
Unfortunately, no there is no way to do this. *If* copy + paste were
implemented between a broadway app and the browser, then you could at
least push a link to a file to download into the browser, and the user
could copy it and paste it into a new tab. Anyway, copy + paste is not
implemented yet ( Hi devs ... if this is easy, it would be pretty
damned handy ).

I haven't had to do anything like this yet, but if I had to tomorrow,
I'd get users to enter an email address in a config screen, and I'd
email documents or links to downloads to them. Not ideal, I know.

Dan

On Tue, Nov 29, 2016 at 7:31 PM, Igor D <ivb...@gmail.com> wrote:
> Hi,
>
> I'm working with GTK+ via Broadway.
> I need to upload and save some file on local computer (which run browser).
> Can I do in this mode that and how ?
>
> Thanks,
> Igor
>
> On Thu, Oct 13, 2016 at 3:10 PM, Igor D <ivb...@gmail.com> wrote:
>>
>> Hi Dan,
>>
>> I don't need real time graphing or something like that. It should work
>> only after triggers from user.
>>
>> I don't remember exactly which feature was missed. I'll recheck.
>>
>> Your inputs are optimistic :-)
>>
>> Thanks a lot for the help.
>> Igor
>>
>>
>>
>> On Thu, Oct 13, 2016 at 2:04 PM, Daniel Kasak <d.j.kasak...@gmail.com>
>> wrote:
>>>
>>> On Thu, Oct 13, 2016 at 5:31 PM, Igor D <ivb...@gmail.com> wrote:
>>>
>>> > Hi,
>>> >
>>> > Thanks for prompt reply.
>>> >
>>> > Yes, I have couple of specific concerns:
>>> > 1. Performance. I'm not looking for something special but expect
>>> > something
>>> > reasonable. My few experiments show
>>> > that performance may be too low.
>>>
>>> I haven't seen bad performance in terms of user experience, though I
>>> have noticed high CPU usage in the broadwayd process(es). My very
>>> rough guess is that you can support somewhere between 2-3 times the
>>> number of active users as CPU cores on your system before users start
>>> to notice. I've never done any stress-testing to see what exactly
>>> would happened if you pushed this limit. I guess if you're trying to
>>> deliver to more users than this model supports, you're entering "real"
>>> web-app development. Out of interest, what kind of applications are
>>> you considering distributing?
>>>
>>> It will depend a lot on what your app is doing I guess. Real-time
>>> graphing or apps where there is constant rendering happening ( eg text
>>> flying past in a log viewer ) will consume a lot more CPU than an app
>>> that sits still and waits for a user to do something.
>>>
>>> I've also noticed that broadway gives a much better experience than
>>> VNC. VNC is laggy and has rendering glitches. Broadway is pretty
>>> impressive under conditions where VNC degrades badly.
>>>
>>> > 2. Reduced feature set, comparing to GTK without broadway. I found few
>>> > minor
>>> > differences but this makes me afraid that it might be more.
>>>
>>> I haven't noticed any reduced features at all. You may have to set
>>> some environment variables to activate things like gtk+ themes and
>>> icon packs, but I haven't found anything with broadway that doesn't
>>> work as I expect from a regular X11 experience. What differences have
>>> you seen? If it's just things like icon packs, it might be worth
>>> documenting what's needed to get on-par with X11.
>>>
>>> Dan
>>>
>>> >
>>> > Thanks,
>>> > Igor
>>> >
>>> > On Thu, Oct 13, 2016 at 1:21 AM, Daniel Kasak <d.j.kasak...@gmail.com>
>>> > wrote:
>>> >>
>>> >> I've been using it on+off for a couple of years. As far as widget
>>> >> toolkit functionality goes, it's a stable platform for me. Security is
>>> >> not handled by broadway, except for basic password authentication ( 1
>>> >> password per linux user who runs broadway apps ). I posted on this
>>> >> topic a little while back:
>>> >>
>>> >>
>>> >> http://tesla.duckdns.org/transparent-proxy-for-broadway-gtk3-html5-backend/
>>> >>
>>> >> Are you after some info in particular?
>>> >>
>>> >> Dan
>>> >>
>>> >> On Thu, Oct 13, 2016 at 5:49 AM, Igor D <ivb...@gmail.com> wrote:
>>> >> > Hi,
>>> >> >
>>> >> > I wonder if someone have practical experience with GTK+ with
>>> >> > Broadway.
>>> >> > I'll be glad to have feedback.
>>> >> >
>>> >> > Thanks
>>> >> > Igor
>>> >> >
>>> >> > ___
>>> >> > 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
>
___
gtk-list mailing list
gtk-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-list


Re: GtkTreeView does not show data after clear()

2016-11-25 Thread Daniel Kasak
You might want to check out one of my projects - Gtk3::Ex::DBI.

Example constructor:

$self->{param} = Gtk3::Ex::DBI::Datasheet->new(
{
dbh => $self->{globals}->{connections}->{CONTROL}
  , sql => {
  select=> "TEMPLATE_NAME,
PARAM_NAME, PARAM_DESC, PARAM_DEFAULT"
, from  => "param"
, order_by  => "PARAM_NAME"
   }
  , force_upper_case_fields => 1
  , primary_keys=> [ "TEMPLATE_NAME", "PARAM_NAME" ]
  #, dont_update_keys=> 1
  , auto_incrementing   => 0
  , fields  => [
{
name=> "TEMPLATE_NAME"
  , renderer=> "hidden"
  , dont_update => 1
}
  , {
name=> "PARAM_NAME"
  , x_percent   => 30
}
  , {
name=> "PARAM_DESC"
  , x_percent   => 40
}
  , {
name=> "PARAM_DEFAULT"
  , x_percent   => 30
}
]
  , vbox=> $self->{builder}->get_object( "param" )
  , recordset_tools_box => $self->{builder}->get_object(
"PARAM_recordset_tools" )
  , before_insert   => sub { $self->before_param_insert }
  , on_insert   => sub { $self->on_param_insert }
} );

Here's a screenshot of what the above code produces ( it's from an ETL
framework I'm hopefully open-sourcing soon ):
http://tesla.duckdns.org/downloads/param.jpg

The 'vbox' is a Gtk3::Box in your glade window where a datasheet will
be created.
The 'recordset_tools_box' is a Gtk3::Box where a set of buttons will
be created - apply, insert, delete, undo.

In this example, I'm injecting primary keys in because they're not
defined in the database ( data warehouse appliance that doesn't
enforce keys ), but if you have PKs defined in the database, they're
detected and used.

I seriously need to update my website / docs, but for now, install
from cpan and give it a spin, and let me know if you have any
questions.

Dan

On Tue, Nov 22, 2016 at 12:35 PM, David Lowrence  wrote:
> I'm writing a program in gtk3-perl and am experiencing a problem with a
> TreeView that does not display a second load of data after a clear().  FWIW,
> I'm doing a customer search, and this sub is run if there are multiple
> results from a search on a name.
>
>  I am including the code below where this happens..  I'm using xml generated
> by glade and loading it with GtkBuilder.  Notice that I'm using clear()
> before the first display, on an empty ListStore, and the first pass displays
> correctly.  If I do a subsequent search, the dialog shows with the header
> for the TreeView, but nothing is shown.  If I eliminate the clear(), then
> the data from the previous search is shown (as expected), with the result of
> the second search appended, but when clear() is executed, the data is blank.
>
> I've used the same procedure with Gtk2 in another program, and it worked,
> and, in fact, I edited this file to use Gtk2, and edited the .glade file
> until it didn't produce errors on load and this worked.  I even rewrote the
> program in C, and it works as expected.  Admittedly, when I experimented
> with Gtk2, I simply deleted properties and things in the glade file and the
> output was not correct, bu6 I don't believe I eliminated anything that would
> have corrected the problem.
>
> Of course AFAIK, there is no documentation as of yet for Gtk3-Perl, and I
> could be using some incorrect code, but I truly feel that there's a bug in
> the Gtk3 code that is doing this.
>
> I've been a bit longwinded, but, to summarize, when $dlg is run the first
> time, the tree view displays the data, but on a second pass, after dlear()
> ing, nothing (except for the column headers) is shown.
>
> The database engine I'm using is DBI with DBD::Pg (postgresql)
>
> sub select_cust_from_ids {
> my $ids = shift;# A list of ID's to search for in the database
>
> #   'dlg_customer_view_multi' is a dialog defined in the glade file.  it is
> a dialog
> #containing a treeview with its ListStore Model and its columns defined
> also in
> #the glade file.
> my $dlg = $builder->get_object ('dlg_customer_view_multi');
> my $view = $builder->get_object ('treeview_customer_data');
>
> # First build a list of placeholders for the query
> my @placeholders;
>
> foreach (@$ids) {
> push @placeholders, 'cust_id = ?';
> }
>
> my $qry = qq/SELECT lastname,firstname,coalesce(mi,''),streetaddr,/ .
> qq/city,state,zip,cust_id FROM poolsalesfullview WHERE / .
> join (' OR ', @placeholders);
>
> my $custs = $dbh->selectall_arrayref ($qry, undef, @$ids);
>unless ($custs) {
> 

Re: GTK glade SQLite Problem

2016-10-24 Thread Daniel Kasak
Have a look at one of my projects. They're in Perl, but the logic flow
is the same:

http://search.cpan.org/~dkasak/Gtk3-Ex-DBI-3.2/lib/Gtk3/Ex/DBI/Form.pm

Briefly, there are issues in your example code. In insert_sqlite() you
need to fetch values back from your builder object. In perl, you'd do
that like:

$builder->get_object( 'some_widget_name' )->get_value

 ... assuming the widget actually has a 'get_value' method. Some
widgets will have other ways of getting at their values. Sorry - I'm
not a huge Python fan. Maybe there are some libraries you can leverage
already. I've actually considered porting my 'form' and 'datasheet'
classes to Python, but ... well ... I'm not a huge Python fan :)

If you're going to push ahead, first implement and test the logic to
insert a record into SQLite, with some hard-coded values. Then
implement the logic to fetch values from your builder object. Then
combine the 2.

Dan

On Mon, Oct 24, 2016 at 4:34 PM, Sangram Kakade
 wrote:
> Hello Everyone,
>
> I am Newbie in Python and i want some help
> I already created DB and in glade two Text Entry Box and one button
> and i want when i put some value in text entry it must be stored in db
>
> here is my code:
>
> import gi
> gi.require_version('Gtk', '3.0')
> from gi.repository import Gtk
> import sqlite3
> import sys
>
>
> class Handler:
>
> def insert_sqlite():
> connection = sqlite3.connect('mydatabase')
> cursor = connection.cursor()
> sql ="INSERT INTO person_info (name,lastnm) VALUES ('%s','%s')"
> cursor.execute(sql)
> data = cursor.fetchall()
>
> for d in data:
> print(d)
>
>
> connection.commit()
> connection.close
>
>
> def display_details():
> connection = sqlite3.connect('mydatabase')
> cursor = connection.cursor()
> sql = "SELECT * FROM person_info "
> cursor.execute(sql)
> data = cursor.fetchall()
>
> for d in data:
> print(d)
>
> connection.commit()
> connection.close
>
>
> builder = Gtk.Builder()
> builder.add_from_file("cool.glade")
> builder.connect_signals(Handler())
> window = builder.get_object("window1")
> window.show_all()
>
> Gtk.main()
>
>
>
> I also set signal in glade
> clicked signal( insert_sqlite)
> on save button
>
> but data is not save in Database
> Please Help me guys
> --
> Thanks & Regards,
> Sangram Kakade 
> Python/Django Developer
> Mob.No. 9975159162 / 8796535503
> ___
> gtk-app-devel-list mailing list
> gtk-app-devel-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: GTK+ with Broadway

2016-10-13 Thread Daniel Kasak
On Thu, Oct 13, 2016 at 5:31 PM, Igor D <ivb...@gmail.com> wrote:

> Hi,
>
> Thanks for prompt reply.
>
> Yes, I have couple of specific concerns:
> 1. Performance. I'm not looking for something special but expect something
> reasonable. My few experiments show
> that performance may be too low.

I haven't seen bad performance in terms of user experience, though I
have noticed high CPU usage in the broadwayd process(es). My very
rough guess is that you can support somewhere between 2-3 times the
number of active users as CPU cores on your system before users start
to notice. I've never done any stress-testing to see what exactly
would happened if you pushed this limit. I guess if you're trying to
deliver to more users than this model supports, you're entering "real"
web-app development. Out of interest, what kind of applications are
you considering distributing?

It will depend a lot on what your app is doing I guess. Real-time
graphing or apps where there is constant rendering happening ( eg text
flying past in a log viewer ) will consume a lot more CPU than an app
that sits still and waits for a user to do something.

I've also noticed that broadway gives a much better experience than
VNC. VNC is laggy and has rendering glitches. Broadway is pretty
impressive under conditions where VNC degrades badly.

> 2. Reduced feature set, comparing to GTK without broadway. I found few minor
> differences but this makes me afraid that it might be more.

I haven't noticed any reduced features at all. You may have to set
some environment variables to activate things like gtk+ themes and
icon packs, but I haven't found anything with broadway that doesn't
work as I expect from a regular X11 experience. What differences have
you seen? If it's just things like icon packs, it might be worth
documenting what's needed to get on-par with X11.

Dan

>
> Thanks,
> Igor
>
> On Thu, Oct 13, 2016 at 1:21 AM, Daniel Kasak <d.j.kasak...@gmail.com>
> wrote:
>>
>> I've been using it on+off for a couple of years. As far as widget
>> toolkit functionality goes, it's a stable platform for me. Security is
>> not handled by broadway, except for basic password authentication ( 1
>> password per linux user who runs broadway apps ). I posted on this
>> topic a little while back:
>>
>> http://tesla.duckdns.org/transparent-proxy-for-broadway-gtk3-html5-backend/
>>
>> Are you after some info in particular?
>>
>> Dan
>>
>> On Thu, Oct 13, 2016 at 5:49 AM, Igor D <ivb...@gmail.com> wrote:
>> > Hi,
>> >
>> > I wonder if someone have practical experience with GTK+ with Broadway.
>> > I'll be glad to have feedback.
>> >
>> > Thanks
>> > Igor
>> >
>> > ___
>> > 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


Re: GTK+ with Broadway

2016-10-12 Thread Daniel Kasak
I've been using it on+off for a couple of years. As far as widget
toolkit functionality goes, it's a stable platform for me. Security is
not handled by broadway, except for basic password authentication ( 1
password per linux user who runs broadway apps ). I posted on this
topic a little while back:
http://tesla.duckdns.org/transparent-proxy-for-broadway-gtk3-html5-backend/

Are you after some info in particular?

Dan

On Thu, Oct 13, 2016 at 5:49 AM, Igor D  wrote:
> Hi,
>
> I wonder if someone have practical experience with GTK+ with Broadway.
> I'll be glad to have feedback.
>
> Thanks
> Igor
>
> ___
> 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


Transparent proxy / multiplexing for Gtk+ / broadway applications

2016-10-04 Thread Daniel Kasak
Hi all.

I've written a blog post with an approach that I've just gotten
working for transparent proxying of broadway applications ... so you
can have a single port ( eg https ) open, and proxy each client to
their own broadway instance.

It's not pretty, but it works :)

http://tesla.duckdns.org/transparent-proxy-for-broadway-gtk3-html5-backend/

There is some example code and instructions for how to set things up.

Hopefully someone finds it useful :)

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


Dynamically proxy broadway traffic

2016-09-15 Thread Daniel Kasak
Hi all.

This question is mildly off-topic, but on the other hand I assume it
would also be of great interest to people here. I'm trying to set up a
reverse proxy for broadway ( gtk's html5 backend ) traffic. The idea
is:

1) The browser hits a login page, which is regular html. After a login
is successful, a new broadwayd process is launched, and a new instance
of a gtk app is launched. The port that broadway is running on is
stored in a hash "somewhere", and a cookie is set containing the key.

2) The browser is redirected to the reverse proxy. The proxy inspects
the request ( eg passes it to HTTP::Request ) and pulls out the key.
It then checks in the broadway mapping hash to see if this is a valid
key/port. If so, it proxies all traffic from this browser to the
correct port; if not, they're redirected to the login page.

All of this could then sit behind an nginx https proxy, providing
secure access for multiple remote clients to gtk+ apps :)

I've implemented part 1. For part 2, I've been trying to figure out
how to adapt the code:
http://cpansearch.perl.org/src/PEVANS/IO-Async-0.70/examples/tcp-proxy.pl

This code ( it's very concise ) actually works perfectly for proxying
broadway traffic ... to a static port. I've been trying to get my head
around how I'd intercept the 1st bit of traffic - unfortunately, the
way this example code is written, the connection to the backend is
opened before we start reading. Can anyone see how to do this? Am I
approaching it the right by ( ie using this example code )? Maybe
there's an easier way?

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


Re: 'Cannot convert arbitrary SV to GValue' when setting child property of GtkStack

2016-08-10 Thread Daniel Kasak
That's it :) Thanks Torsten.

Dan

On Tue, Aug 9, 2016 at 5:53 PM, "Torsten Schönfeld" <kaffeeti...@gmx.de> wrote:
> "Daniel Kasak" <d.j.kasak...@gmail.com>:
>> I'm trying to set the 'needs-attention' property of a GtkStack's child page.
>>
>> When I go:
>>
>> use Glib qw( TRUE FALSE );
>>
>> my $needs_attention = FALSE;
>>
>> if ( $self->{ 'Column' . $i . 'Datasheet' }->count ) {
>> $needs_attention = TRUE;
>> }
>>
>> my $child = $self->{stack}->get_child_by_name( 'page' . $i );
>>
>> $self->{stack}->child_set_property(
>> $child
>>   , 'needs-attention'
>>   , $needs_attention
>> );
>>
>>  ... I get:
>>
>> Cannot convert arbitrary SV to GValue'
>
> Looks like the Gtk3::Container::child_set* and child_get* methods need 
> overrides.  Fow now, child_set_property expects a GValue, so as a workaround, 
> try something like this:
>
>   my $gvalue = Glib::Object::Introspection::GValueWrapper->new (
> 'Glib::Boolean', $needs_attention);
>   $self->{stack}->child_set_property ($child, 'needs-attention', $gvalue);
> ___
> gtk-perl-list mailing list
> gtk-perl-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/gtk-perl-list
___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-perl-list


'Cannot convert arbitrary SV to GValue' when setting child property of GtkStack

2016-08-08 Thread Daniel Kasak
Hi all.

I'm trying to set the 'needs-attention' property of a GtkStack's child page.

When I go:

use Glib qw( TRUE FALSE );

my $needs_attention = FALSE;

if ( $self->{ 'Column' . $i . 'Datasheet' }->count ) {
$needs_attention = TRUE;
}

my $child = $self->{stack}->get_child_by_name( 'page' . $i );

$self->{stack}->child_set_property(
$child
  , 'needs-attention'
  , $needs_attention
);

 ... I get:

Cannot convert arbitrary SV to GValue'

The 'needs-attention' property ( doc:
https://developer.gnome.org/gtk3/stable/GtkStack.html ) says that the
property is a 'gboolean'. How do I get a gboolean?

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


Re: GtkStack and needs-attention property

2016-08-08 Thread Daniel Kasak
OK never mind. I've found this one myself:

https://developer.gnome.org/gtk3/stable/GtkContainer.html#gtk-container-child-set-property

On Tue, Aug 9, 2016 at 10:03 AM, Daniel Kasak <d.j.kasak...@gmail.com> wrote:
> Hi all.
>
> I can see how to set the 'needs-attention' property while creating and
> adding children to a GtkStack. However I don't see how to set the
> 'needs-attention' property once all widgets are constructed.
>
> If I later use 'gtk_stack_get_child_by_name' I can get the widget that
> I added to the stack ( in my case, a GtkBox ), but can't set the
> 'needs-attention' property on it:
>
> Gtk3::Box does not support property 'needs-attention'.
>
> Is there a way to do this?
>
> Dan
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


GtkStack and needs-attention property

2016-08-08 Thread Daniel Kasak
Hi all.

I can see how to set the 'needs-attention' property while creating and
adding children to a GtkStack. However I don't see how to set the
'needs-attention' property once all widgets are constructed.

If I later use 'gtk_stack_get_child_by_name' I can get the widget that
I added to the stack ( in my case, a GtkBox ), but can't set the
'needs-attention' property on it:

Gtk3::Box does not support property 'needs-attention'.

Is there a way to do this?

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


Re: Gtk3 version of GtkSourceView

2016-08-01 Thread Daniel Kasak
Wow thanks :)

Dan

On Mon, Aug 1, 2016 at 3:48 PM,  <max.augsb...@gmx.de> wrote:
> Dear Dan,
>
> I have written a Gtk3::SourceView module for Perl using Gobject
> Introspection.
> Please see here: https://metacpan.org/pod/Gtk3::SourceView
>
> You need the typelib files for GtkSource (see for more informations the POD
> documentation) and then can simply install this module by "cpanm
> Gtk3::SourceView".
>
> If you have further questions regarding the module, please let me know.
> Hopefully I can then help you ;-)
>
> Best wishes,
> Max
>
> Gesendet: Montag, 01. August 2016 um 07:31 Uhr
> Von: "Daniel Kasak" <d.j.kasak...@gmail.com>
> An: "GTK-Perl List" <gtk-perl-list@gnome.org>
> Betreff: Gtk3 version of GtkSourceView
> Hi all.
>
> The GtkSourceView page: https://wiki.gnome.org/Projects/GtkSourceView says:
>
> "Can be used from many programming languages. Thanks to GObject
> Introspection, automatic bindings are available for JavaScript,
> Python, Vala and others."
>
> Does that include Perl? I don't quite follow what's required with
> introspection for bindings to work.
>
> Dan
> ___
> gtk-perl-list mailing list
> gtk-perl-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/gtk-perl-list
>
>
>
> ___
> gtk-perl-list mailing list
> gtk-perl-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/gtk-perl-list
>
___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-perl-list


Re: gtk_main_iteration under broadway

2016-08-01 Thread Daniel Kasak
I see. Sorry to ruffle your feathers :) Until now, I was under the
impression that this was the way things are done - as you note, it's
what's recommended to us evil Perl users. I've done some parts
threaded already, but I've found implementations on different
platforms ( eg Windows ) kinda temperamental. Anyway, thanks for the
response and explanation.

Dan

On Mon, Aug 1, 2016 at 7:16 PM, Emmanuele Bassi <eba...@gmail.com> wrote:
> Hi;
>
> On 29 July 2016 at 04:48, Daniel Kasak <d.j.kasak...@gmail.com> wrote:
>> Hi all.
>>
>> I've got some convenience functions that update a progress bar for long
>> running operations. I do:
>>
>> Gtk3::main_iteration() while ( Gtk3::events_pending() );
>
> Stop. I know this kind of behaviour is peddled and cargo culted on
> gtk-perl-list because "hey, it works in my abominable 2500 lines
> single file Perl program that I have to use for work and nobody will
> ever bother to read or change", but it's a really stupid thing to do,
> that goes against the design of GTK+.
>
> Either you move your blocking code inside a thread and update the UI
> using Glib::idle_add(), like any sensible person would; or you stop
> using synchronous operations blocking the main loop, and then try to
> "catch up" at the end so that your UI doesn't continuously lock up.
>
> Those two functions are a crutch that expose design and implementation
> issues in your code, or in the library code you're using. Stop hurting
> yourself.
>
> The only reason why those two functions haven't been deprecated — and
> I swear I'll deprecate them before we get into GTK+ 4 — is because
> they were used in the test suite, i.e. for controlled, non-interactive
> use cases.
>
>>  ... ( in Perl ) after updating the progress bar, so that the window's
>> contents are updated while my code continues to run. This works great in X
>> and wayland. However in broadway, I quite often see CPU usage in broadwayd
>> rise to 100%, and my application hang, immediately after the above line of
>> line.
>
> You're doing a busy loop.
>
>> Is this known to be not safe under broadway?
>
> That construct is known to be unsafe *everywhere*. The only reason why
> you don't get into a busy loop just as often is that you're getting
> another process involved (the X server on X11, the Wayland compositor
> on Wayland) and that introduces a potential lag between the "events
> pending" and the "main iteration" steps of the loop.
>
> You're doing something broken. Stop doing it.
>
> Ciao,
>  Emmanuele.
>
> --
> https://www.bassi.io
> [@] ebassi [@gmail.com]
___
gtk-list mailing list
gtk-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-list


Gtk3 version of GtkSourceView

2016-07-31 Thread Daniel Kasak
Hi all.

The GtkSourceView page: https://wiki.gnome.org/Projects/GtkSourceView says:

"Can be used from many programming languages. Thanks to GObject
Introspection, automatic bindings are available for JavaScript,
Python, Vala and others."

Does that include Perl? I don't quite follow what's required with
introspection for bindings to work.

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


gtk_main_iteration under broadway

2016-07-28 Thread Daniel Kasak
Hi all.

I've got some convenience functions that update a progress bar for long
running operations. I do:

Gtk3::main_iteration() while ( Gtk3::events_pending() );

 ... ( in Perl ) after updating the progress bar, so that the window's
contents are updated while my code continues to run. This works great in X
and wayland. However in broadway, I quite often see CPU usage in broadwayd
rise to 100%, and my application hang, immediately after the above line of
line.

Is this known to be not safe under broadway?

I can put together a demo if needed, but it's pretty easy for me to trigger
...

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


"A new combobox"

2016-07-28 Thread Daniel Kasak
Hi all.

I'm a Perl god and C "relative newbie', and I'm interested in the new
combobox work, ie
https://raw.githubusercontent.com/gnome-design-team/gnome-mockups/master/theming/widgets/combobox-replacements.png
and https://git.gnome.org/browse/gtk+/log/?h=wip/combo

If someone can mentor me, I'd be interested in attempting to complete
it. What state is it in? Is it realistic of me to think it would be
within my reach? I've done a very small amount of hacking in C -
mainly fixing bugs where necessary.

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


Re: Re[2]: argv revisited

2016-05-08 Thread Daniel Kasak
On Mon, May 9, 2016 at 2:24 AM, Andrew Robinson  wrote:

> Because you are entertaining.

Ditto. In fact every single one of your posts has had multiple dummy
spits. Your particular balance of begging for more help vs pouring
scorn on those who try to help is unique. Where else do you post? I
must subscribe there too ...

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


Remote gtk3 app rendering issues

2016-04-20 Thread Daniel Kasak
Greetings all. I have a bizarre issue that makes me wonder if I
understand how remote X applications work ...

I'm running Sabayon Linux on my dev laptop. My work has a bunch of
Ubuntu 14.04 LTS servers. When I ssh into a server and run a gtk3 app,
it renders widgets in a horrible 3.1 style, and many icons are
missing.

But if I tar up /usr/share/themes/Ambiance on the server, and dump it
into my ~/.themes on my laptop, the widgets render in the 'Ambiance'
theme - but *only* if I *also* tell my local window manager (
Enlightenment ) to use the Ambiance theme. I usually use the Adwaita
theme. I see that Ubuntu 14.04 LTS doesn't have the Adwaita theme -
maybe it's too old for this?

What's going on here? I thought the X client did all the rendering,
and pushed pixmaps to the ( in this case, remote ) X server. But
clearly resources on my laptop are being used here.

Perhaps I'm approaching things incorrectly? What's the "recommended"
way of running remote ( gtk3 in particular ) apps and having them
render nicely - ie as they would if I was actually on the server I'm
ssh'd in to?

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


Re: Get a list of object *names* from GtkBuilder

2015-11-26 Thread Daniel Kasak
OK so based on Emmanuele's suggestion ( thanks, by the way ), I've
done it like this, which is dodgy, but still pretty simple, and could
be of use for others who might bump into this thread with similar
requirements.

First, in the abstract 'window' class, I've got a global variable to
store the names of GtkPaned widgets:

---

my @all_gtkPaned_names;

---

Then just after I've generated a window from a gtkBuilder file, I go:

@all_GtkPaned_names = ();

if ( $window->{options}->{builder_path} ) {

my $xml_parser = XML::Parser->new( Style => 'Subs', Pkg => 'window' );
my $whatever   = $xml_parser->parsefile(
$window->{options}->{builder_path} );

}

foreach my $paned_name ( @all_GtkPaned_names ) {

my $state_name = $class . ':' . $paned_name . ':position';
my $state = $globals->{config_manager}->simpleGet( $state_name );
my $widget = $window->{builder}->get_object( $paned_name );

if ( $state ) {
$widget->set_position( $state );
}

$widget->signal_connect(
notify  => sub { $window->save_gtkPaned_state( @_,
$state_name ) }
);

}

---

Then I have a *static* *function* ( ie not a method ) in the same
class, which gets called by XML::Parser because of the options passed
to its constructor ( ie the style and pkg ):

---

sub object {

my ( $expat, $object, $class, $gtk_object_class, $gtk_object_name,
$gtk_object_name ) = @_;

if ( $gtk_object_class eq 'GtkPaned' ) {
push @all_GtkPaned_names, $gtk_object_name;
}

}

---

In here I'm obviously just appending to the global list of widgets.

I've also got:

---

sub save_gtkPaned_state {

my ( $self, $widget, $some_boolean_thing, $state_name ) = @_;

$self->{globals}->{config_manager}->simpleSet( $state_name,
$widget->get_position );

}

---

That's pretty much it ( I think ). Hopefully it's useful to someone.

I still think it would be handy to be able to enumerate over the list
of widget names without having to use an external parser, but I
concede it's kinda a corner case, and not too difficult to work
around.

Dan

On Wed, Nov 18, 2015 at 12:14 PM, Daniel Kasak <d.j.kasak...@gmail.com> wrote:
> I anticipated this question :)
>
> Here's what I'm trying to do ...
>
> I've got an abstract 'window' class that handles loading windows from
> a builder file, and attaching some convenience functions and stuff. I
> want to save the state of various things in a SQLite database. For
> example, GtkPaned positions are causing me issues on different
> resolutions and DPIs. So I'd like to be able to do:
>
> foreach my $item ( $window->{builder}->get_objects() ) {
> if ( ref $item eq "Gtk3::Paned" ) {
> my $name = $item->get_name;
> my $state_name = $class . ':' . $name . ':position';
> my $state = $globals->{config_manager}->simpleGet( $state_name
> ); # simpleGet fetches from a SQLite key/value pair config db
> $item->set_position( $state );
> }
> }
>
>  ... on startup. I'd of course have signals on the 'notify' signal of
> each Gtk3::Paned to save the state each time it's altered ( with some
> work-arounds for initial state ). This code would similarly have to
> know the name of each item, so it could write it to the SQLite DB.
>
> I've done this all manually for a couple of widgets ( ie by having
> special code per widget ), but being able to do it generically as
> above would be a far better solution. Thoughts?
>
> Dan
>
>
> On Tue, Nov 17, 2015 at 4:57 AM, Emmanuele Bassi <eba...@gmail.com> wrote:
>> Hi;
>>
>> On 16 November 2015 at 02:26, Daniel Kasak <d.j.kasak...@gmail.com> wrote:
>>> Greetings all.
>>>
>>> I'd like to get a list of object names from a GtkBuilder object ( I'm
>>> using Perl ). I know about
>>> https://developer.gnome.org/gtk3/stable/GtkBuilder.html#gtk-builder-get-objects
>>> - which returns a list of objects, but I really need the names. Is it
>>> possible?
>>
>> The question would be "why do you think you need the names from the
>> XML, considering you wrote the XML definitions in the first place" —
>> i.e. since you're the author, you're supposed to already know those
>> names, not figure them out programmatically.
>>
>> In practice, you could load up the XML yourself and figure those names
>> out using the XML::Parser or XML::LibXML modules in Perl; but the
>> question betrays some confusion as to what GtkBuilder UI definition
>> files are, and how they are used, so it's probably better for you to
>> answer the question: what is it that you're trying to achieve?
>>
>> Ciao,
>>  Emmanuele.
>>
>> --
>> https://www.bassi.io
>> [@] ebassi [@gmail.com]
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Re: Get a list of object *names* from GtkBuilder

2015-11-17 Thread Daniel Kasak
I anticipated this question :)

Here's what I'm trying to do ...

I've got an abstract 'window' class that handles loading windows from
a builder file, and attaching some convenience functions and stuff. I
want to save the state of various things in a SQLite database. For
example, GtkPaned positions are causing me issues on different
resolutions and DPIs. So I'd like to be able to do:

foreach my $item ( $window->{builder}->get_objects() ) {
if ( ref $item eq "Gtk3::Paned" ) {
my $name = $item->get_name;
my $state_name = $class . ':' . $name . ':position';
my $state = $globals->{config_manager}->simpleGet( $state_name
); # simpleGet fetches from a SQLite key/value pair config db
$item->set_position( $state );
}
}

 ... on startup. I'd of course have signals on the 'notify' signal of
each Gtk3::Paned to save the state each time it's altered ( with some
work-arounds for initial state ). This code would similarly have to
know the name of each item, so it could write it to the SQLite DB.

I've done this all manually for a couple of widgets ( ie by having
special code per widget ), but being able to do it generically as
above would be a far better solution. Thoughts?

Dan


On Tue, Nov 17, 2015 at 4:57 AM, Emmanuele Bassi <eba...@gmail.com> wrote:
> Hi;
>
> On 16 November 2015 at 02:26, Daniel Kasak <d.j.kasak...@gmail.com> wrote:
>> Greetings all.
>>
>> I'd like to get a list of object names from a GtkBuilder object ( I'm
>> using Perl ). I know about
>> https://developer.gnome.org/gtk3/stable/GtkBuilder.html#gtk-builder-get-objects
>> - which returns a list of objects, but I really need the names. Is it
>> possible?
>
> The question would be "why do you think you need the names from the
> XML, considering you wrote the XML definitions in the first place" —
> i.e. since you're the author, you're supposed to already know those
> names, not figure them out programmatically.
>
> In practice, you could load up the XML yourself and figure those names
> out using the XML::Parser or XML::LibXML modules in Perl; but the
> question betrays some confusion as to what GtkBuilder UI definition
> files are, and how they are used, so it's probably better for you to
> answer the question: what is it that you're trying to achieve?
>
> Ciao,
>  Emmanuele.
>
> --
> https://www.bassi.io
> [@] ebassi [@gmail.com]
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Get a list of object *names* from GtkBuilder

2015-11-15 Thread Daniel Kasak
Greetings all.

I'd like to get a list of object names from a GtkBuilder object ( I'm
using Perl ). I know about
https://developer.gnome.org/gtk3/stable/GtkBuilder.html#gtk-builder-get-objects
- which returns a list of objects, but I really need the names. Is it
possible?

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


Re: Gtk3::Ex::DBI::Datasheet query() signal problem

2015-11-08 Thread Daniel Kasak
Yikes :)

I'll try to reproduce it here. If not, I might get back to you and ask
for a small sample script that triggers the issue. I have to admit,
since the port from Gtk2, I lost quite a bit of functionality ( custom
cell renderers ) and haven't quite investigated all errors that didn't
cause me immediate issues. Is this actually causing any bugs for you,
or just producing nasty warnings? My guess is that where previously I
had to ( or could ) destroy some signals attached to various things,
maybe the thing this signal is attached to is already destroyed, and
took the signal with it?

Anyway ... I'll look into it. Thanks for using my software :)

Dan

On Sun, Nov 8, 2015 at 1:53 AM, Geert Dobbels
 wrote:
> Hello,
>
> I started to use Gtk3::Ex::DBI::Datasheet a week or 2 ago and have been
> successful with all I needed until I started to use the query() method on an
> existing Datasheet object.  I tried with and without a where_object but
> always get the same result:
>
> GLib-GObject-WARNING **: gsignal.c:2579: instance '0x85952a0' has no handler
> with id '1496' at
> /home/geert/Documents/proyectos/gladetests/Gtk3/Ex/DBI/Datasheet.pm line
> 2014.
>
> The line 2014 is where the signal_handler_disconnect is done in the
> following chunk of code exctracted from Datasheet.pm:
>
>   # Destroy changed_signal attached to old model ...
> if ( $self->{changed_signal} ) {
> $self->{treeview}->get_model->signal_handler_disconnect(
> $self->{changed_signal} );
> }
>
>
> I had a look at the $self object to see if I could find anything wrong with
> it, but could not get anything out of that.  This is a Data::Dumper printout
> of the $self variable right before the above shown chunk of code is
> executed:
>
> self : $VAR1 = bless( {
>  'treeview_treestore_def' => [
>'Glib::Int',
>'Glib::String',
>'Glib::String',
>'Glib::String'
>  ],
>  'column_info' => {
> 'projectname' => {}
>   },
>  'changed_signal' => 1496,
>  'query_execution_time' => '0.000144004821777344',
>  'recordset_tool_items' => undef,
>  'after_size_allocate' => undef,
>  'quiet' => 0,
>  'sw_footer_no_scroll' => undef,
>  'fixed_row_height' => 0,
>  'auto_incrementing' => 1,
>  'recordset_tools_box' => undef,
>  'footer' => undef,
>  'dump_on_error' => undef,
>  'supported_recordset_items' => {
>   'undo' => {
> 'icon_name' => 'edit-undo',
>   'type' =>
> 'button'
> },
>   'apply' => {
> 'type' => 'button',
> 'icon_name' => 'gtk-apply'
>  },
>   'delete' => {
> 'icon_name' => 'gtk-delete',
> 'type' => 'button'
>   },
>   'insert' => {
> 'icon_name' => 'gtk-add',
> 'type' => 'button'
>   }
> },
>  'data_lock_field' => undef,
>  'on_insert' => undef,
>  'primary_key_column' => undef,
>  'auto_tools_box' => undef,
>  'status_icon_width' => 0,
>  'custom_changed_text' => undef,
>  'dbh' => bless( {}, 'DBI::db' ),
>  'months_array' => 'Dec',
>  'dont_update_keys' => 0,
>  'quick_renderers' => 0,
>  'server' => 'MySQL',
>  'objects_and_signals' => [
> [
>   bless( {
> 'dependant_columns' => [],
>'column' => 1,
>'on_changed' => undef
>  },
> 'Gtk3::CellRendererText' ),
>   1370
> ],
> [
>   bless( {
>'on_changed' =>
> undef,
> 'dependant_columns' => [],
>

Broadway on Ubuntu 14.04

2015-11-05 Thread Daniel Kasak
Hi all.

Reposting from http://ubuntuforums.org/showthread.php?t=2301869 ... (
I'm not getting any takers there ).

I'm a long-time Gentoo user, and attempting to get an application
running on a Ubuntu VM ( 14.04 LTS ) for work. I'm using gtk's
broadway backend, which in Gentoo can be enabled by setting the
'broadway' USE flag. It's proving to be quite difficult with Ubuntu,
unfortunately.

First, I tried using the binaries from:
https://launchpad.net/~malizor/+arch...u/gtk-broadway. This package
doesn't install cleanly. I get strange errors about incompatibilities,
and I end up with a broadwayd binary, but with gtk+ build without
broadway support.

Next I followed instructions at:
http://www.cyberciti.biz/faq/rebuild...inary-package/. I edited
debian/rules in the gtk+ source folder, and added
--enable-broadway-backend. I then continued to build as per the
instructions ( ie fakeroot debian/rules binary ). This almost works.
It dies right at the end:

Code:

dh_install -plibgtk-3-0  --sourcedir=debian/install/shared
dh_link -plibgtk-3-0
dh_installmime -plibgtk-3-0
dh_installgsettings -plibgtk-3-0
dh_gconf -plibgtk-3-0
dh_icons -plibgtk-3-0
dh_translations -plibgtk-3-0
dh_langpack: processing files to add translation domain 'gtk30'..
# Install the binaries with a -3.0 suffix
mv debian/libgtk-3-0/usr/lib/x86_64-linux-gnu/libgtk-3-0/gtk-update-icon-cache \

debian/libgtk-3-0/usr/lib/x86_64-linux-gnu/libgtk-3-0/gtk-update-icon-cache-3.0
mv: cannot stat
‘debian/libgtk-3-0/usr/lib/x86_64-linux-gnu/libgtk-3-0/gtk-update-icon-cache’:
No such file or directory
make: *** [binary-install/libgtk-3-0] Error 1
root@ggs010:~/gtk+3.0-3.10.8#

I have no idea why this error occurs.

Does anyone know how I can get broadway support in gtk+ in Ubuntu 14.04?

Thanks ...

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


Anyone used Docker for packaging / distribution?

2015-10-14 Thread Daniel Kasak
As per the subject ... has anyone used Docker for gtk-perl apps? If so ...
got any examples of docker-compose.yml files to share? :)

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


Re: Trigger a GtkEntryCompletion's popup

2015-10-08 Thread Daniel Kasak
I had issues with GtkComboBoxText last time I tried it, though admittedly
that was a long time back. Anyway, yes I'm aware of these widgets, and use
GtkComboBox regularly. I'll look into GtkComboBoxText again. But the
question remains - is there a way to trigger the completion's popup?

Dan

On Fri, Oct 9, 2015 at 8:21 AM, Stefan Salewski <m...@ssalewski.de> wrote:

> On Thu, 2015-10-08 at 15:36 +1100, Daniel Kasak wrote:
> > Hi all. I have some GtkEntry widgets with a GtkEntryCompletion
> > attached.
> > I've set the minimum key length to 0, hoping this would make the
> > completion's popup appear on focus in, but it doesn't. I have noticed
> > that
> > if I type something, then hit backspace, the popup appears. So I guess
> > I
> > can hook up some code on focus-in to simulate this - ie insert some
> > text
> > and delete it. Is there a cleaner way of doing it?
> >
>
> Maybe you want a
>
> https://developer.gnome.org/gtk3/stable/GtkComboBox.html
> https://developer.gnome.org/gtk3/stable/GtkComboBoxText.html
>
> with active entry widget (has-entry = TRUE) ?
>
> So you can select from a list of text or enter own text.
>
___
gtk-list mailing list
gtk-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-list


Trigger a GtkEntryCompletion's popup

2015-10-07 Thread Daniel Kasak
Hi all. I have some GtkEntry widgets with a GtkEntryCompletion attached.
I've set the minimum key length to 0, hoping this would make the
completion's popup appear on focus in, but it doesn't. I have noticed that
if I type something, then hit backspace, the popup appears. So I guess I
can hook up some code on focus-in to simulate this - ie insert some text
and delete it. Is there a cleaner way of doing it?

Thanks.

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


Re: WHere is the icons

2015-08-11 Thread Daniel Kasak
I posted on this topic a little while back ( a month or 2 from memory ).
The icon theme you're using has to have icons of the same name that you're
trying to use. If you're using a 'default' ( eg adwaita ) icon theme in
conjunction with icon names that *used* to work a couple of years ago,
you're likely to have issues. Either choose an older icon theme, or migrate
to the new 'best practices'.

You can also run with GTK_DEBUG=icontheme set - this can show you some info
about where gtk is looking to find icons. See
https://developer.gnome.org/gtk3/stable/gtk-running.html

Good luck, Gentoo warrior :) Oh ... you're running 'stable' ... luck not
required ;)

Dan

On Tue, Aug 11, 2015 at 1:31 PM, Igor Korot ikoro...@gmail.com wrote:

 Stefan et al,

 On Mon, Aug 10, 2015 at 2:23 PM, Stefan Salewski m...@ssalewski.de
 wrote:
  On Mon, 2015-08-10 at 12:28 -0400, Igor Korot wrote:
  But then how do I set the label for such button?
  It looks like this function can be used for bitmap buttons only (no
  labels).
 
  Of course you can continue using the deprecated stock item, as long as
  that still works...
 
  My impression is, that recommendation for recent GTK3 is to have only
  textual label for buttons and menu items generally, with some
  exceptions...
 
  We can use gtk_button_new() with a container widget argument, which may
  contain a label and an image. Some details I found here
 
  https://developer.gnome.org/gtk3/stable/GtkImageMenuItem.html
 
  Unfortunately that is some more work now...

 Here is what I have right now:

 [code]
 static
 GtkWidget *gtk_my_dialog_add_button_to (GtkBox *box, const gchar *label,
 const gchar *stock, gint
 response_id)
 {
 /* create the button */
 GtkWidget *button = gtk_button_new_with_mnemonic (label);
 gtk_widget_set_can_default(button, true);
 GtkWidget *image = NULL;
 #if GTK_CHECK_VERSION( 3, 10, 0 )
 if( !gtk_check_version( 3, 10, 0 ) )
 {
 image = gtk_image_new_from_icon_name( stock, GTK_ICON_SIZE_BUTTON
 );
 }
 else
 #endif
 {
 /* add a stock icon inside it */
 wxGCC_WARNING_SUPPRESS(deprecated-declarations);
 image = gtk_image_new_from_stock (stock, GTK_ICON_SIZE_BUTTON);
 wxGCC_WARNING_RESTORE()
 }
 gtk_button_set_image (GTK_BUTTON (button), image);

 /* add to the given (container) widget */
 if (box)
 gtk_box_pack_end (box, button, FALSE, TRUE, 8);

 /* add the button to the dialog's action area */
 gtk_dialog_add_action_widget (GTK_DIALOG (dlg), button, response_id);

return button;
 }

 extern C {
 static void gtk_my_dialog_init(GTypeInstance* instance, void*)
 {
 // some code
 #if GTK_CHECK_VERSION( 3, 10, 0 )
 if( !gtk_check_version( 3, 10, 0 ) )
 {
 continuebtn = gtk_assert_dialog_add_button( dlg, Continue,
 yes, GTK_ASSERT_DIALOG_CONTINUE);
 }
 else
 #endif
 {
 wxGCC_WARNING_SUPPRESS(deprecated-declarations);
 continuebtn = gtk_assert_dialog_add_button (dlg, _Continue,
 GTK_STOCK_YES, GTK_ASSERT_DIALOG_CONTINUE);
 wxGCC_WARNING_RESTORE();
 }
 // some more code
 }
 [/code]

 I am running currently KDE-4 on Gentoo Linux (stable). This peice of
 code works when running against GTK+-2.24, i.e. I see
 both label and the icon. However, when running against GTK+-3.16.5 all
 I can see is just a text and no icon.

 What am I doing wrong? Am I using the right replacements? Do I use it
 properly?

 Thank you.

 
 ___
 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


Re: WHere is the icons

2015-08-11 Thread Daniel Kasak
On Wed, Aug 12, 2015 at 7:15 AM, Igor Korot ikoro...@gmail.com wrote:

 Daniel,

 On Tue, Aug 11, 2015 at 2:09 AM, Daniel Kasak d.j.kasak...@gmail.com
 wrote:
  I posted on this topic a little while back ( a month or 2 from memory ).
 The
  icon theme you're using has to have icons of the same name that you're
  trying to use. If you're using a 'default' ( eg adwaita ) icon theme in
  conjunction with icon names that used to work a couple of years ago,
 you're
  likely to have issues. Either choose an older icon theme, or migrate to
 the
  new 'best practices'.

 Problem is I am not running under GNOME. I have KDE4 installed on my
 machine and
 I'm trying to port the GTK2 app to work with GTK3.


I don't use KDE, but I recommend using Gnome, at least until you're on top
of these issues. Read up on the ways of setting your icon theme if you're
not going to use Gnome. I don't use Gnome either, by the way ( and so I
know what it's like to get gtk+ to play nicely outside it ).


 The thing is - I want to have a clean compilation before saying: this
 works fine. ;-)

 Now, since you mention best practice, let me ask you - what is it?
 Using named icon? If yes - can you throw in some code? I will see if
 that will find the icon...


No code at this point, sorry. To be honest, I'm only just barely across
icon handling myself. I'm not developing gtk+ stuff full-time any more, and
only return to it occasionally ( sadly, usually to see that more stuff has
broken ).

Here's part of a response I got a while back when I posted about none of my
icons being rendered any more:

---

This whole mess has been deprecated (and rightfully so) because it
makes it impossible to actually determine what will go to the screen
reliably; it was added before we had icon themes, and survived far too
long afterwards.

If you want to use symbolic names for icons, as opposed to loading
assets using GdkPixbuf, you should use the name of the icon in the
icon theme — in this case, 'document-new' instead of 'gtk-new' (which
is the string hiding behind the GTK_STOCK_NEW symbol).

The deprecation notes for each stock item here:

  https://developer.gnome.org/gtk3/stable/gtk3-Stock-Items.html

And the freedesktop.org icon naming specification here:

  http://standards.freedesktop.org/icon-naming-spec/icon
-naming-spec-latest.html

Should give you a head start on porting your code and your coding
practices. The Adwaita icon theme (which is used as a template for
most icon themes available these days) contains more icons that you
can use.

---

Dan

On Wed, Aug 12, 2015 at 7:15 AM, Igor Korot ikoro...@gmail.com wrote:

 Daniel,

 On Tue, Aug 11, 2015 at 2:09 AM, Daniel Kasak d.j.kasak...@gmail.com
 wrote:
  I posted on this topic a little while back ( a month or 2 from memory ).
 The
  icon theme you're using has to have icons of the same name that you're
  trying to use. If you're using a 'default' ( eg adwaita ) icon theme in
  conjunction with icon names that used to work a couple of years ago,
 you're
  likely to have issues. Either choose an older icon theme, or migrate to
 the
  new 'best practices'.

 Problem is I am not running under GNOME. I have KDE4 installed on my
 machine and
 I'm trying to port the GTK2 app to work with GTK3.

 The thing is - I want to have a clean compilation before saying: this
 works fine. ;-)

 Now, since you mention best practice, let me ask you - what is it?
 Using named icon? If yes - can you throw in some code? I will see if
 that will find the icon...

 
  You can also run with GTK_DEBUG=icontheme set - this can show you some
 info
  about where gtk is looking to find icons. See
  https://developer.gnome.org/gtk3/stable/gtk-running.html

 Now, I may be able to install GNOME and run it there just to make sure KDE
 is
 out of the picture. ;-)

 
  Good luck, Gentoo warrior :) Oh ... you're running 'stable' ... luck not
  required ;)

 Yup, I will need it.

 Thank you.

 
  Dan
 
  On Tue, Aug 11, 2015 at 1:31 PM, Igor Korot ikoro...@gmail.com wrote:
 
  Stefan et al,
 
  On Mon, Aug 10, 2015 at 2:23 PM, Stefan Salewski m...@ssalewski.de
  wrote:
   On Mon, 2015-08-10 at 12:28 -0400, Igor Korot wrote:
   But then how do I set the label for such button?
   It looks like this function can be used for bitmap buttons only (no
   labels).
  
   Of course you can continue using the deprecated stock item, as long as
   that still works...
  
   My impression is, that recommendation for recent GTK3 is to have only
   textual label for buttons and menu items generally, with some
   exceptions...
  
   We can use gtk_button_new() with a container widget argument, which
 may
   contain a label and an image. Some details I found here
  
   https://developer.gnome.org/gtk3/stable/GtkImageMenuItem.html
  
   Unfortunately that is some more work now...
 
  Here is what I have right now:
 
  [code]
  static
  GtkWidget *gtk_my_dialog_add_button_to (GtkBox *box, const gchar *label

Re: What to use on GTK+3

2015-08-08 Thread Daniel Kasak
No no no. Everybody is wrong. What we need is:

[ Actually, now that I come to think about it, this is not the action
I would like to take at this time. Thankyou all the same]
[ This is precisely the action that I require, and I thank you for the
explicit dialog and verbose text in the buttons; it really makes sure
I know what it about to happen, and possibly makes the rest of the
text of the dialog redundant, but hey, at least there is zero scope
for confusion]

Dan

On Sun, Aug 9, 2015 at 11:45 AM, Paul Davis p...@linuxaudiosystems.com wrote:
 On Sat, Aug 8, 2015 at 8:41 PM, Allin Cottrell cottr...@wfu.edu wrote:

 However, in relation to Igor's original point, giving the user options of
 Yes/No is IMO fine if your dialog asks a short, simple question that
 requires an answer of Yes or No. As in

 Overwrite filename? Yes/No
 Send message? Yes/No
 Really delete X? Yes/No

 One could rephrase these messages as something other than Yes/No questions
 but would that actually be clearer? I doubt it.

 I think you're wrong. Each one of these can be converted into a dialog
 of the following general form:

   Need confirmation to carry out potentially significant action

 [ Do not take this action ][ Take this action ]


 A specific case may help


   Overwriting this file may cause data loss

[ Do not overwrite the file ]   [ Overwrite the file ]


 or

   Once your message is sent, you cannot delete it.

[ Do not send this message]  [ Send this message]


 Both these examples are clearer, because they explain what is at stake.
 ___
 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


Re: Bindings for a 3rd-party library

2015-07-09 Thread Daniel Kasak
OK I'm returning to this after a long period of not doing anything ...

This part does *something:

Glib::Object::Introspection-setup(
basename = 'GtkFlow'
  , version  = '0.2'
  , package  = 'GtkFlow'
);

 ... because if I don't adjust my LD_LIBRARY_PATH, I get errors about
missing libraries. When I set LD_LIBRARY_PATH to where I installed
libgtkflow, the errors disappear.

However, that's as far as I get. The next part:

GtkFlow::Source-new()
GtkFlow::Sink-new()

 ... gives errors like:


On Fri, May 22, 2015 at 9:17 PM, Emmanuele Bassi eba...@gmail.com wrote:
 Hi;

 On 22 May 2015 at 12:11, Daniel Kasak d.j.kasak...@gmail.com wrote:
 On Fri, May 22, 2015 at 5:37 PM, Torsten Schönfeld kaffeeti...@gmx.de 
 wrote:
 Daniel Kasak d.j.kasak...@gmail.com:
 I'm wondering ... how much work is involved in getting Perl bindings
 for this library working? I guess it would depend on how it's written?
 Or does the introspection that comes along with gtk3 make it generally
 an easy task?

 Something like this should get you started:

   Glib::Object::Introspection-setup (
 basename = 'GtkFlow',
 version = '0.2',
 package = 'GtkFlow'); # or whatever package you prefer

   GtkFlow::Source-new (...)
   GtkFlow::Sink-new (...)

 Aha. Thanks :)

 Sadly, the library is written in Vala and uses Gee, which means that
 some of its functions — especially the ones that deal with collections
 — will not be introspectable, and thus will not be available in any
 language *except* Vala.

 Ciao,
  Emmanuele.

 --
 https://www.bassi.io
 [@] ebassi [@gmail.com]
___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-perl-list


Re: Bindings for a 3rd-party library

2015-07-09 Thread Daniel Kasak
oops :) new laptop ... sent before i was ready ...

GtkFlow::Source-new()
GtkFlow::Sink-new()

 ... gives errors like:

Can't locate object method new via package GtkFlow::Source
(perhaps you forgot to load GtkFlow::Source?)

Also I can't list class methods by any method I know ( eg tried many
on 
http://stackoverflow.com/questions/910430/how-do-i-list-available-methods-on-a-given-object-or-package-in-perl
).

eg:

my @methods =   Class::Inspector-methods( 'Foo::Class', 'full', 'public' );

print Dumper( \@methods );

 ... prints an empty array.

Is this hidden by Glib::Introspection? Or is something else going wrong?

Also I didn't quite follow this:

some of its functions — especially the ones that deal with collections
— will not be introspectable

Collections? Not sure what you mean here. Anyway the python examples
seem to do basically all I'm interested in, so I'm hoping there is
just something simple I'm missing. Sorry - I don't understand the new
introspection stuff at all.

Dan

On Thu, Jul 9, 2015 at 4:00 PM, Daniel Kasak d.j.kasak...@gmail.com wrote:
 OK I'm returning to this after a long period of not doing anything ...

 This part does *something:

 Glib::Object::Introspection-setup(
 basename = 'GtkFlow'
   , version  = '0.2'
   , package  = 'GtkFlow'
 );

  ... because if I don't adjust my LD_LIBRARY_PATH, I get errors about
 missing libraries. When I set LD_LIBRARY_PATH to where I installed
 libgtkflow, the errors disappear.

 However, that's as far as I get. The next part:

 GtkFlow::Source-new()
 GtkFlow::Sink-new()

  ... gives errors like:


 On Fri, May 22, 2015 at 9:17 PM, Emmanuele Bassi eba...@gmail.com wrote:
 Hi;

 On 22 May 2015 at 12:11, Daniel Kasak d.j.kasak...@gmail.com wrote:
 On Fri, May 22, 2015 at 5:37 PM, Torsten Schönfeld kaffeeti...@gmx.de 
 wrote:
 Daniel Kasak d.j.kasak...@gmail.com:
 I'm wondering ... how much work is involved in getting Perl bindings
 for this library working? I guess it would depend on how it's written?
 Or does the introspection that comes along with gtk3 make it generally
 an easy task?

 Something like this should get you started:

   Glib::Object::Introspection-setup (
 basename = 'GtkFlow',
 version = '0.2',
 package = 'GtkFlow'); # or whatever package you prefer

   GtkFlow::Source-new (...)
   GtkFlow::Sink-new (...)

 Aha. Thanks :)

 Sadly, the library is written in Vala and uses Gee, which means that
 some of its functions — especially the ones that deal with collections
 — will not be introspectable, and thus will not be available in any
 language *except* Vala.

 Ciao,
  Emmanuele.

 --
 https://www.bassi.io
 [@] ebassi [@gmail.com]
___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-perl-list


Distributing OSX binaries

2015-07-03 Thread Daniel Kasak
Hi all.

I've previously built OSX binaries, just for myself, but now I'd like
to share amongst some workmates. I'm not really up-to-speed with OSX
and packaging ( new job, Mac-only shop ).

I built using jhbuild, and by default, it installed into ~/gtk/inst. I
moved the 'inst' folder to ~/gtk3-perl and ran gtk3-demo, just to see
what would happen. This happened:

dyld: Library not loaded: /Users/danielkasak/gtk/inst/lib/libgtk-3.0.dylib
  Referenced from: /Users/danielkasak/gtk3-perl/bin/gtk3-demo
  Reason: image not found
Trace/BPT trap: 5

I did a bit of searching on library paths for OSX, and then did:

export DYLD_LIBRARY_PATH=~/gtk3-perl/lib

 ... and tried to run gtk3-demo again:

dyld: Symbol not found: __cg_jpeg_resync_to_restart
  Referenced from:
/System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
  Expected in: /Users/danielkasak/gtk3-perl/lib/libJPEG.dylib
 in /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
Trace/BPT trap: 5

I don't know what to do about this.

Any hints?

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


Re: Glib-Object-Introspection on Windows

2015-06-23 Thread Daniel Kasak
Ah sorry. Yes it did fix things. Thanks :)

Dan

On Tue, Jun 23, 2015 at 10:18 AM, Brian Manning c...@xaoc.org wrote:

 On Sun, May 17, 2015 at 7:24 PM, Daniel Kasak d.j.kasak...@gmail.com
 wrote:
  Thanks a LOT for the quick response Torsten. My Windows VM is sitting
  @ home, waiting for me to try out your patch. I tried connecting from
  work, but my connection isn't fast enough to make it feasible :/

 We never heard back from you; did this patch solve your problems on
 Windows?

 Thanks,

 Brian

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


Re: Outdated win32 bundle

2015-06-18 Thread Daniel Kasak
Hi all. I've got my own builds of Gtk+ for Windows, available at:
http://tesla.duckdns.org/jewelkit-1-0-released/ ( I have another build
I'm ready to upload in the next week actually ).

This contains perl as well as Gtk+. I make regular releases (
currently ). I also have a bunch of patches I've been meaning to
submit ( fixing build issues ). In particular, the object
introspection stuff is a MAJOR PITA to build on Windows, and AFAIK is
impossible to build in Linux with a cross-compiler.

It would be fantastic if building Gtk+ ( and bindings ) on Windows
were far less painful ... and better yet if there were official
installers ... though I guess that's asking a bit much for
corner-cases like perl developers' needs :)

Dan

On Fri, Jun 19, 2015 at 4:20 AM, Tarnyko tarn...@tarnyko.net wrote:
 anatoly techtonik writes:

 On Fri, Jun 12, 2015 at 2:42 PM, Emmanuele Bassi eba...@gmail.com wrote:

 On 12 June 2015 at 12:27, anatoly techtonik techto...@gmail.com wrote:

 On Thu, Jun 11, 2015 at 4:15 PM, Emmanuele Bassi eba...@gmail.com
 wrote:


 Currently, we advertise ad hoc Windows builds on gtk.org; those are
 out of date, and lack many of the bug fixes that went into GTK.


 I see two problems here:
 - [ ] http://www.gtk.org/download/win32.php - doesn't say this info
 - [ ] http://www.gtk.org/download/win32.php - doesn't have a link to
   the site source to fix that


 Yes, that's why I said:
 | The current stance of everyone involved in the Windows backend for
 | GLib and GTK+ is to stop advertising binary builds for Windows
 There's also a bug about this:
 https://bugzilla.gnome.org/show_bug.cgi?id=747742
 It would be good to fix the website to reflect the reality.


 That's not that I mean. I mean that the site will not be fixed if there is
 no visible way to fix that. Can we solve this problem first? Where is the
 site source and what is the process to add the source link (along with
 description of the site update process) to the site footer?

 Points that are also missing to enable me (or anybody else) to
 fix the situation:
 1. Is it possible to make lack many of the bug fixes that went into
 GTK
 a link to actual list?


 The actual list is published with each release of GTK+.


 That means that data about all previous versions need to be updated
 with new fixed bugs. Is the publishing process automated enough to
 allow this?

 2. How to detect automatically that builds listed on the page are out
 of date?


 There are no new builds. The last build for Windows was for GTK+ 3.6,
 which, as of today, is two and half years old.


 The question assumes that. When the build becomes out of date?

 The website needs to be changed to reflect the reality of the project,
 not the past.


 Marking old releases as outdated does just that.

 This
 situation is confusing for application developers, and makes the
 project look bad. It also reflect badly on the great work that
 developers have been doing in order to make GTK work well on Windows.


 Editing the site with heads up on the situation and an entrypoint
 to change it would make it better.


 Indeed it would.


 I am glad there is no misunderstanding between us here. =) Can we now
 make an actionable item out of it? So that it is clear for everybody how
 to
 do this and what to do exactly as a next step.

 On top of that, we don't offer binary builds for any other platform,
 and instead rely on distributors — like Homebrew on Mac; the *BSD
 ports; or the various Linux distributions — to provide binary builds
 for them. Windows is an anomaly, mostly because there weren't
 good/usable software distributions in the past. This has now changed,
 and it's a good thing to ensure that developers on Windows get
 reliable, up to date software.


 You're speaking about Chocolatey or about Steam? =)


 I'm talking about MSYS2.


 I think that the concept of package managers for Windows is flawed,
 but it is just my opinion as a Windows user with 10+ years experience.

 MSYS2 is for developers, not for end users.


 Ok. Still I don't get it. I wanted a local directory install for GTK
 libs for
 compiling Wesnoth. I don't want system global install of MSYS2 - I
 already have MinGW unpacked locally and building with SCons. Is that
 possible?


 That's possible if you build GTK+ for yourself.


 But that is possible with current binary downloads. That's a regression
 and
 vendor dependency on MSYS2 project. For project like Wesnoth GTK is one
 of the dozen possible dependencies and exclusive requirements and
 processes for every dependency makes life of a build system integrators
 a nightmare.

 There have been no binary builds of GTK+ since January 2013, but there
 have been five new development cycles, so if you want to use an up to
 date version of GTK+, your current choices for building your
 application on Windows are either to build GTK yourself, alongside its
 dependencies, or use MSYS2 and its packages.


 I don't want to use MSYS2. My build chains 

Re: Treeviews: changing the color of column headers

2015-06-13 Thread Daniel Kasak
I've done this in Gtk2. I don't have my laptop and old code handy
right now, but from memory:

- create a label
- set_markup() on the label, and set your colour(s) in there
- use TreeViewColumn.set_widget() to override the default label

If you can't get it working, post again and I'll go and dig out the
old ( perl ) code that I used.

Dan

On Sun, Jun 14, 2015 at 7:55 AM, Stefan Salewski m...@ssalewski.de wrote:
 On Sat, 2015-06-13 at 20:43 +0200, Stefan Salewski wrote:
 On Tue, 2015-06-09 at 08:54 +0200, Juan L. Freniche wrote:
  I am trying to change the color of the column headers of a treeview,
  with no sucess at all.

 It is funny that currently many people try to change default colors of
 GTK widgets. Of course generally that is not a good idea -- common sense
 is to give users their default styles. Of course, for special
 applications that may be OK. For tree view headers, I can remember that
 I tried to chance something style related, and it worked after I added a
 custom label widget as header text. See

 http://www.daa.com.au/pipermail/pygtk/2009-February/016601.html

  Try using a custom widget for the header using
  TreeViewColumn.set_widget()


 Sorry, have not been able to get it working with GTK2. I tried to put a
 label in a column header and change the color of the label with
 gtk_widget_modify_bg(label, GTK_STATE_NORMAL, color). But it seems to
 have no effect. Maybe it would work for GTK3, there we have
 gtk_widget_override_color().


 ___
 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


Combos NULL values and/or 'no value selected'

2015-05-26 Thread Daniel Kasak
Greetings.

I'm trying to find a sensible approach to dealing with NULL values,
combos, and database values. It's of course a valid situation where a
database field has a NULL value. It's also valid that someone wants to
SET a database field to NULL, by somehow de-selecting a currently
selected item in a combo.

How do I do this? :) There are a few approaches that come to mind ...

1) Is there an easy way for a user to *de-select* a selected item in a
combo? I don't see any way of doing this currently, but if there *was*
such a way, my problem would be solved. I'm having difficulty
connecting to signals like the button press event and populate-popup
event ( maybe combos don't have this ). Right-clicking the combo and
clicking an item 'de-select' might be ok, though not really obvious.

2) I've tried adding to the combo's model an initial row. All my combo
models have at least 2 columns - the ID and the text to be displayed.
So if I add an initial row with both the ID and text columns set to
NULL ( undef - I'm using perl - whatever ) ... I actually get the
desired effect ( both in setting and getting values between combo  DB
), but I also get warnings:

Use of uninitialized value in list assignment at
/usr/local/lib64/perl5/5.20.1/Gtk3.pm line 1572.
Argument  isn't numeric in subroutine entry at
/usr/local/lib64/perl5/5.20.1/x86_64-linux-thread-multi/Glib/Object/Introspection.pm
line 58.

 ... which is not really ideal. I don't think it's safe to use any
other values - 0, for example, might be a valid ID from the database.
Other than the issue of the STDOUT looking bad, is this a bad idea for
any other reason?

Maybe there are some other approaches that aren't occurring to me. Thoughts?

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


Re: Bindings for a 3rd-party library

2015-05-22 Thread Daniel Kasak
On Fri, May 22, 2015 at 5:37 PM, Torsten Schönfeld kaffeeti...@gmx.de wrote:
 Daniel Kasak d.j.kasak...@gmail.com:
 I'm wondering ... how much work is involved in getting Perl bindings
 for this library working? I guess it would depend on how it's written?
 Or does the introspection that comes along with gtk3 make it generally
 an easy task?

 Something like this should get you started:

   Glib::Object::Introspection-setup (
 basename = 'GtkFlow',
 version = '0.2',
 package = 'GtkFlow'); # or whatever package you prefer

   GtkFlow::Source-new (...)
   GtkFlow::Sink-new (...)

Aha. Thanks :)

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


Re: Flowgraphs for Gtk3!

2015-05-21 Thread Daniel Kasak
Excellent! I was actually just thinking about how I'd do this. I'd
very much like for this to work with the Perl bindings. I'll have a
chat to people in the gtk-perl list and see how difficult it would be
to make it work.

Dan

On Thu, May 21, 2015 at 1:24 PM, Lee Fallat ircsurfe...@gmail.com wrote:
 Wow, absolutely fantastic Daniel (Dan?). I checked out the source and I
 can't believe how concise it is. Very clean. Another application I can see
 this for is in PulseAudio volume control, when users redirect audio from
 multiple sources to a sink.

 Once again, great job!

 Lee

 On Wed, May 20, 2015 at 11:02 PM, Daniel Brendle grindh...@skarphed.org
 wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA256

 Hi there!

 I wanted to introduce you to a project that has been on my
 to-do-stack for a long time. Now it grew to be somewhat presentable.
 Meet our very own Blender-Node-Editor-like flowgraph library for Gtk3:

 https://github.com/grindhold/libgtkflow

 GtkFlow gives you a new Widget, the GtkFlow.NodeView you can add nodes
 to this view that have inputs and outputs (so called sinks and sources
 respectively). These Nodes and the connections between them can be
 arranged by the user by dragging and dropping.
 It provides an easy way for users to communicate to a program how
 things interact and how things are connected.

 If you develop UI (especially for GNOME-related stuff), please let
 yourself be inspired how Flowgraphs could enhance your UI-concept.
 Some usecases i thought about are:
   - A GUI for GStreamer that you can build and export your GStreamer
 pipelines from/to
   - UI Replacement for GNURadio's Flowgraph implementation
   - Video Compositing for PiTiVi

 I am eager to hear about your thoughts of possible usecases and
 especially for feedback about the library itself.

 If anyone can use it, i'd also be happy about helpers that engage in
 pushing the project further.


 Yours, Grindhold
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v2

 iQIcBAEBCAAGBQJVXUqxAAoJEBuqgJs6izSEDbQP/i4mNisnbV98DBrhe6Scb7So
 Zg+Q1e7z9fpyEqoWI1sFsT640nt+pvZrNFjWYUA4zBDoUGM9FgGW7LAtgDAd/LNq
 ghz0luwwfOJu+dDum698YhSpFv87J0uLRK7UMYzf1GSMm4I2qwEsIuZnTq+QsffY
 HTEt0+vSsG9yVC5Be/bFDTxVuJO6Bs3X1bGP0LkSpLoFL0gt3OSR7MpZBD4NNVwZ
 /cZ3LLwEWAGeOx+EnfkT33zdReJuDrFrYJRIwoPUWMYJ1jR/C5h4rYSa+EAPmTf5
 d+SVg4vfWBeHxPhA/pJVRLPcYqngdj7g/aMBx9HCFjkSdmTRwI6KnVZpK0OKmGzY
 sgMmMr8bTs+cWDTnE8JsTm83Ph42HcJ8Y0RTECEFYrtGCIE2HPHOW/gOjWs8ZY72
 rtgctD2kXWtGttsowr+cpp+lxvK7rxuIzAQuJjWhuK0NDBRKvfBaqMCWmrN4rPvK
 +kegFRrGg3crNSZgUcH29+Kwu0D+Ad4urkej5I+0pVkUO+f6LkiMOJe6bTkjycS5
 9aCWJqtrSeI19UGKv0V2rRsq9LgZDxaFiu164B01WaVpJs9Wm2Kd5pjlw1ZPpMnO
 DSCv1tgS/PsB3BHfq5mzffaQ+45phpesQq5wW9IqYBu5IAobIz8fWQSngxdtA4mX
 l4riNalBqyC4VQDlT7S/
 =J1cf
 -END PGP SIGNATURE-
 ___
 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

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


Bindings for a 3rd-party library

2015-05-21 Thread Daniel Kasak
Hi all.

I just saw this announced in the gtk list:
https://github.com/grindhold/libgtkflow

This would be S handy for me. I want to write a query builder like
MS Access, and this would be a god-send.

I'm wondering ... how much work is involved in getting Perl bindings
for this library working? I guess it would depend on how it's written?
Or does the introspection that comes along with gtk3 make it generally
an easy task?

I'd obviously be keen to do it, if I was capable of it, but I'd need some help.

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


Re: Gtk-3.14.3 on Windows: icon rendering issues

2015-05-20 Thread Daniel Kasak
Aha. Thanks Emmanuele. I'm now totally on top of what is needed :)

Dan

On Wed, May 20, 2015 at 8:01 PM, Emmanuele Bassi eba...@gmail.com wrote:
 Hi;

 sorry, it was late at night and I was on my phone, so I was unhelpfully terse.

 On 20 May 2015 at 01:32, Daniel Kasak d.j.kasak...@gmail.com wrote:
 Can you please explain this further? I had assumed this was the
 correct way to ask for the 'new' icon, from whatever icon theme was
 selected.

 No, that's the way you use the deprecated GTK+ stock items, which may
 have an associated icon and may have an associated label, or both, or
 even neither. Stock icons may map to icons that may be outsourced to
 the current icon theme, or to resources embedded into the GTK+'s
 shared library, or to resources inside an application, if the
 application registers their own stock items.

 This whole mess has been deprecated (and rightfully so) because it
 makes it impossible to actually determine what will go to the screen
 reliably; it was added before we had icon themes, and survived far too
 long afterwards.

 If you want to use symbolic names for icons, as opposed to loading
 assets using GdkPixbuf, you should use the name of the icon in the
 icon theme — in this case, 'document-new' instead of 'gtk-new' (which
 is the string hiding behind the GTK_STOCK_NEW symbol).

 The deprecation notes for each stock item here:

   https://developer.gnome.org/gtk3/stable/gtk3-Stock-Items.html

 And the freedesktop.org icon naming specification here:

   
 http://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html

 Should give you a head start on porting your code and your coding
 practices. The Adwaita icon theme (which is used as a template for
 most icon themes available these days) contains more icons that you
 can use.

 Also I'm not convinced this build is working correctly WRT selecting
 icon themes - as noted, changing the theme in my settings.ini has no
 effect on icons that do get rendered ( and there aren't many of them
 ).

 You need to check that the icon theme is in the correct path (usually:
 PREFIX/share/icons); that the icon theme cache is updated
 (gtk-update-icon-cache or gtk3-update-icon-cache is run after
 installation); that the GdkPixbuf loader are set and available for the
 various formats used by the icon theme assets.

 Ciao,
  Emmanuele.

 Dan

 On Wed, May 20, 2015 at 10:04 AM, Emmanuele Bassi eba...@gmail.com wrote:
 Hi;

 Do not use gtk-new and other stock button names: use the correctly named
 icons from the theme.

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


Re: Gtk-3.14.3 on Windows: icon rendering issues

2015-05-19 Thread Daniel Kasak
I'm back with exactly the same issue :(

I'm doing another full windows build ( the previous one was flaky WRT
rendering pixbufs, so I thought I'd try a full rebuild ). Previously,
adding the adwaita-icon-theme package fixed the issue, and I saw the
default Adwaita icons. Now, this doesn't seem to help. I've set
GTK_DEBUG=icontheme and seen a LOT of messages about icons in the
Adwaita directory, which would seem to suggest gtk is traversing the
directory.

Is there a definitive list of things that need to be set up to tell
gtk3 where to look for icons?

Dan

On Sun, Oct 19, 2014 at 10:17 PM, Emmanuele Bassi eba...@gmail.com wrote:
 hi;

 gnome-common is just a build-time requirement for a bunch of modules
 loosely tied to GNOME; it's a collection of autotool macros that cut
 down the maintenance burden, similar to the X.org macros module[1].

 ciao,
  Emmanuele.

 [1] http://cgit.freedesktop.org/xorg/util/macros


 On 19 October 2014 03:42, Daniel Kasak d.j.kasak...@gmail.com wrote:
 Thanks for the response. I just attempted to build adwaita-icon-theme, and
 it wants me to install gnome-common. I wonder if this is *really* necessary,
 but anyway I'll persist ( when I get a full dev environment going on Windows
 ).

 Dan

 On Sat, Oct 18, 2014 at 10:45 PM, Kalev Lember kalevlem...@gmail.com
 wrote:

 On 10/18/2014 01:25 PM, Daniel Kasak wrote:
  Why are some icons not being rendered? Is this a packaging issue? I see
  the same issue in the gtk demo apps. Also note that there is an image in 
  the
  combo box that's also not being rendered. I'm hoping this is just a case 
  of
  chucking a png file or 2 in the correct place now :)
 
  Some screenshots of Linux vs Windows:
  http://tesla.duckdns.org/downloads/gtk_linux.png
  http://tesla.duckdns.org/downloads/gtk_windows.png

 Looking at the screenshots, it looks like the Windows packaging is
 missing all the standard icons that would normally come from
 adwaita-icon-theme. Try including that in the builds and see if it fixes
 the icon issue?

 --
 Hope this helps,
 Kalev
 ___
 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




 --
 http://www.bassi.io
 [@] ebassi [@gmail.com]
___
gtk-list mailing list
gtk-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-list


GtkSettings

2015-05-19 Thread Daniel Kasak
Hi all.

I'm still battling with my Windows build :/ I've been posting in the
gtk list ... basically I have some major issues with rendering icons
from icon themes, for some reason. It used to work ... now I'm getting
lots of 'broken' type images.

Anyway, to help debug, I'm looking for a way to get hold of the GtkSettings:
https://developer.gnome.org/gtk3/stable/GtkSettings.html#gtk-settings-get-default

Is this covered by the bindings? Gtk3::settings_get_default() doesn't
seem to work, nor does any other similar attempt.

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


Re: Gtk-3.14.3 on Windows: icon rendering issues

2015-05-19 Thread Daniel Kasak
OK I think I can see what's going on here ... the old method of
generating icons via names like 'gtk-new' has been removed. G ...
reminds me of how much I hate PHP every time I'm forced to return to
it ( eg suggested 'best practices' are removed, leaving large chunks
of otherwise well-written code broken ). I assume I've only hit this
on Windows because I'm using the very latest versions of everything on
Windows, and my Linux boxen haven't quite caught up yet.

I've gotten hold of the GtkSettings thing and verified that it is in
fact picking up settings from my settings.ini, so at least this side
of things seems OK.

The icon theme packages are installing into:

$PREFIX/share/icons/$ICON_THEME_NAME

 ... instead of:

$PREFIX/usr/share/icons/$ICON_THEME_NAME

 ... which the spec suggests ... so I have to set the XDG_DATA_DIRS
environment variable to include this path. No idea why the icon themes
are ending up in this location.

Thanks to all those who responded and pointed my in the right
direction. I predict I will return in 6 months with the exact same
problem :P

Dan

On Wed, May 20, 2015 at 10:32 AM, Daniel Kasak d.j.kasak...@gmail.com wrote:
 Can you please explain this further? I had assumed this was the
 correct way to ask for the 'new' icon, from whatever icon theme was
 selected. If I have to change my behaviour, I'm quite willing to do
 that. I'm still confused as to why this would work on Linux and OSX,
 but not Windows, when all had the same themes installed.

 Also I'm not convinced this build is working correctly WRT selecting
 icon themes - as noted, changing the theme in my settings.ini has no
 effect on icons that do get rendered ( and there aren't many of them
 ).

 Dan

 On Wed, May 20, 2015 at 10:04 AM, Emmanuele Bassi eba...@gmail.com wrote:
 Hi;

 Do not use gtk-new and other stock button names: use the correctly named
 icons from the theme.

 Ciao,
  Emmanuele.


 On Tuesday, May 19, 2015, Daniel Kasak d.j.kasak...@gmail.com wrote:

 Here's a screenshot, showing *some* icons rendering ( no idea which
 icon theme they come from ), and some *not* rendering:

 http://tesla.duckdns.org/images/windows_7_gtk3.png

 I'm using code like:

 my $icon   = Gtk3::Image-new_from_icon_name( 'gtk-new', 'button' );

  ... to render the icons. Note the missing images in the buttons in
 the header bar. It works fine on Linux and OSX.

 Dan

 On Wed, May 20, 2015 at 7:16 AM, Daniel Kasak d.j.kasak...@gmail.com
 wrote:
  On Wed, May 20, 2015 at 12:08 AM, LRN lrn1...@gmail.com wrote:
  On 19.05.2015 15:44, Daniel Kasak wrote:
  On Tue, May 19, 2015 at 9:45 PM, LRN wrote:
  On 19.05.2015 14:44, LRN wrote:
  On 19.05.2015 14:34, Daniel Kasak wrote:
  On Sun, Oct 19, 2014 at 10:17 PM, Emmanuele Bassi wrote:
  On 19 October 2014 03:42, Daniel Kasak wrote:
  On Sat, Oct 18, 2014 at 10:45 PM, Kalev Lember wrote:
  On 10/18/2014 01:25 PM, Daniel Kasak wrote:
  Why are some icons not being rendered? Is this a packaging
  issue? I see
  the same issue in the gtk demo apps. Also note that there is an
  image in the
  combo box that's also not being rendered. I'm hoping this is
  just a case of
  chucking a png file or 2 in the correct place now :)
 
  Some screenshots of Linux vs Windows:
  http://tesla.duckdns.org/downloads/gtk_linux.png
  http://tesla.duckdns.org/downloads/gtk_windows.png
 
  Looking at the screenshots, it looks like the Windows packaging
  is
  missing all the standard icons that would normally come from
  adwaita-icon-theme. Try including that in the builds and see if
  it fixes
  the icon issue?
 
  Thanks for the response. I just attempted to build
  adwaita-icon-theme, and
  it wants me to install gnome-common. I wonder if this is *really*
  necessary,
  but anyway I'll persist ( when I get a full dev environment going
  on Windows
  ).
 
  gnome-common is just a build-time requirement for a bunch of
  modules
  loosely tied to GNOME; it's a collection of autotool macros that
  cut
  down the maintenance burden, similar to the X.org macros
  module[1].
 
  [1] http://cgit.freedesktop.org/xorg/util/macros
  I'm back with exactly the same issue :(
 
  I'm doing another full windows build ( the previous one was flaky
  WRT
  rendering pixbufs, so I thought I'd try a full rebuild ).
  Previously,
  adding the adwaita-icon-theme package fixed the issue, and I saw
  the
  default Adwaita icons. Now, this doesn't seem to help. I've set
  GTK_DEBUG=icontheme and seen a LOT of messages about icons in the
  Adwaita directory, which would seem to suggest gtk is traversing
  the
  directory.
 
  Is there a definitive list of things that need to be set up to tell
  gtk3 where to look for icons?
 
 
  Did you run
  prefix/bin/gtk-update-icon-cache-3.0 -f -t
  prefix/share/icons/hicolor
  after installing Adwaita?
 
  Unrelated: do edit prefix/etc/gtk-3.0/settings.ini and at the very
  least set
 
  [Settings]
  gtk-xft-antialias=1
 
  Related: also, did you run
  prefix/bin/gdk-pixbuf-query

Re: Gtk-3.14.3 on Windows: icon rendering issues

2015-05-19 Thread Daniel Kasak
Can you please explain this further? I had assumed this was the
correct way to ask for the 'new' icon, from whatever icon theme was
selected. If I have to change my behaviour, I'm quite willing to do
that. I'm still confused as to why this would work on Linux and OSX,
but not Windows, when all had the same themes installed.

Also I'm not convinced this build is working correctly WRT selecting
icon themes - as noted, changing the theme in my settings.ini has no
effect on icons that do get rendered ( and there aren't many of them
).

Dan

On Wed, May 20, 2015 at 10:04 AM, Emmanuele Bassi eba...@gmail.com wrote:
 Hi;

 Do not use gtk-new and other stock button names: use the correctly named
 icons from the theme.

 Ciao,
  Emmanuele.


 On Tuesday, May 19, 2015, Daniel Kasak d.j.kasak...@gmail.com wrote:

 Here's a screenshot, showing *some* icons rendering ( no idea which
 icon theme they come from ), and some *not* rendering:

 http://tesla.duckdns.org/images/windows_7_gtk3.png

 I'm using code like:

 my $icon   = Gtk3::Image-new_from_icon_name( 'gtk-new', 'button' );

  ... to render the icons. Note the missing images in the buttons in
 the header bar. It works fine on Linux and OSX.

 Dan

 On Wed, May 20, 2015 at 7:16 AM, Daniel Kasak d.j.kasak...@gmail.com
 wrote:
  On Wed, May 20, 2015 at 12:08 AM, LRN lrn1...@gmail.com wrote:
  On 19.05.2015 15:44, Daniel Kasak wrote:
  On Tue, May 19, 2015 at 9:45 PM, LRN wrote:
  On 19.05.2015 14:44, LRN wrote:
  On 19.05.2015 14:34, Daniel Kasak wrote:
  On Sun, Oct 19, 2014 at 10:17 PM, Emmanuele Bassi wrote:
  On 19 October 2014 03:42, Daniel Kasak wrote:
  On Sat, Oct 18, 2014 at 10:45 PM, Kalev Lember wrote:
  On 10/18/2014 01:25 PM, Daniel Kasak wrote:
  Why are some icons not being rendered? Is this a packaging
  issue? I see
  the same issue in the gtk demo apps. Also note that there is an
  image in the
  combo box that's also not being rendered. I'm hoping this is
  just a case of
  chucking a png file or 2 in the correct place now :)
 
  Some screenshots of Linux vs Windows:
  http://tesla.duckdns.org/downloads/gtk_linux.png
  http://tesla.duckdns.org/downloads/gtk_windows.png
 
  Looking at the screenshots, it looks like the Windows packaging
  is
  missing all the standard icons that would normally come from
  adwaita-icon-theme. Try including that in the builds and see if
  it fixes
  the icon issue?
 
  Thanks for the response. I just attempted to build
  adwaita-icon-theme, and
  it wants me to install gnome-common. I wonder if this is *really*
  necessary,
  but anyway I'll persist ( when I get a full dev environment going
  on Windows
  ).
 
  gnome-common is just a build-time requirement for a bunch of
  modules
  loosely tied to GNOME; it's a collection of autotool macros that
  cut
  down the maintenance burden, similar to the X.org macros
  module[1].
 
  [1] http://cgit.freedesktop.org/xorg/util/macros
  I'm back with exactly the same issue :(
 
  I'm doing another full windows build ( the previous one was flaky
  WRT
  rendering pixbufs, so I thought I'd try a full rebuild ).
  Previously,
  adding the adwaita-icon-theme package fixed the issue, and I saw
  the
  default Adwaita icons. Now, this doesn't seem to help. I've set
  GTK_DEBUG=icontheme and seen a LOT of messages about icons in the
  Adwaita directory, which would seem to suggest gtk is traversing
  the
  directory.
 
  Is there a definitive list of things that need to be set up to tell
  gtk3 where to look for icons?
 
 
  Did you run
  prefix/bin/gtk-update-icon-cache-3.0 -f -t
  prefix/share/icons/hicolor
  after installing Adwaita?
 
  Unrelated: do edit prefix/etc/gtk-3.0/settings.ini and at the very
  least set
 
  [Settings]
  gtk-xft-antialias=1
 
  Related: also, did you run
  prefix/bin/gdk-pixbuf-query-loaders.exe 
  prefix/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
  after installing librsvg?
 
  Yes I've scripted the initial setup:
 
  bin\pango-querymodules.exe  etc\pango\pango.modules
  bin\gdk-pixbuf-query-loaders.exe 
  lib\gdk-pixbuf-2.0\2.10.0\loaders.cache
  bin\gtk-query-immodules-3.0.exe  lib\gtk-3.0\3.0.0\immodules.cache
  bin\gtk-update-icon-cache.exe -f -t share\icons\hicolor
  bin\gtk-update-icon-cache.exe -f -t share\icons\Adwaita
  bin\gtk-update-icon-cache.exe -f -t share\icons\Faenza-Fresh
 
  I've tried setting in prefix/etc/gtk-3.0/settings.ini:
 
  [Settings]
  gtk-icon-theme-name = Adwaita
  gtk-xft-antialias = 1
 
   ... or:
 
  [Settings]
  gtk-icon-theme-name = Faenza-Fresh
  gtk-xft-antialias = 1
 
   ... but neither affect how things look.
  [...]
  look for cache in c:\jewelkit\c\share\icons
  [...]
 
  Um...just to make things clear: is your prefix = c:\jewelkit\c? Is
  libgtk-3-0.dll located in c:\jewelkit\c\bin?
 
  Yes, and yes.
 
  Dan
 ___
 gtk-list mailing list
 gtk-list@gnome.org
 https://mail.gnome.org/mailman/listinfo/gtk-list



 --
 https://www.bassi.io
 [@] ebassi [@gmail.com

Re: Gtk-3.14.3 on Windows: icon rendering issues

2015-05-19 Thread Daniel Kasak
Thanks for the responses.

Yes I've scripted the initial setup:

bin\pango-querymodules.exe  etc\pango\pango.modules
bin\gdk-pixbuf-query-loaders.exe  lib\gdk-pixbuf-2.0\2.10.0\loaders.cache
bin\gtk-query-immodules-3.0.exe  lib\gtk-3.0\3.0.0\immodules.cache
bin\gtk-update-icon-cache.exe -f -t share\icons\hicolor
bin\gtk-update-icon-cache.exe -f -t share\icons\Adwaita
bin\gtk-update-icon-cache.exe -f -t share\icons\Faenza-Fresh

I've tried setting in prefix/etc/gtk-3.0/settings.ini:

[Settings]
gtk-icon-theme-name = Adwaita
gtk-xft-antialias = 1

 ... or:

[Settings]
gtk-icon-theme-name = Faenza-Fresh
gtk-xft-antialias = 1

 ... but neither affect how things look. Interestingly, when I set the
icon theme to Faenza-Fresh and set GTK_DEBUG=icontheme, the debug
messages still refer to Adwaita:

scanning resources /org/gtk/libgtk/icons/scalable/stock/navigation
scanning resources /org/gtk/libgtk/icons/scalable/stock/net
scanning resources /org/gtk/libgtk/icons/scalable/stock/object
scanning resources /org/gtk/libgtk/icons/scalable/stock/table
scanning resources /org/gtk/libgtk/icons/scalable/stock/text
scanning resources /org/gtk/libgtk/icons/symbolic/apps
look for cache in c:\jewelkit\c\share\icons
look for cache in c:\jewelkit\c\share\icons
Current icon themes Adwaita hicolor
lookup name: view-refresh
theme_lookup_icon dir c:\jewelkit\c\share\icons\Adwaita\8x8/emblems
get_icon_suffix (cached) 0
theme_lookup_icon dir c:\jewelkit\c\share\icons\Adwaita\8x8/emblems
get_icon_suffix (cached) 0
theme_lookup_icon dir c:\jewelkit\c\share\icons\Adwaita\16x16/actions
get_icon_suffix (cached) 4
theme_lookup_icon dir c:\jewelkit\c\share\icons\Adwaita\16x16/actions
get_icon_suffix (cached) 4
theme_lookup_icon dir c:\jewelkit\c\share\icons\Adwaita\16x16/apps
get_icon_suffix (cached) 0
theme_lookup_icon dir c:\jewelkit\c\share\icons\Adwaita\16x16/apps
get_icon_suffix (cached) 0
theme_lookup_icon dir c:\jewelkit\c\share\icons\Adwaita\16x16/categories

Why does it say:

   Current icon themes Adwaita hicolor

Where is Faenza-Fresh? Is there an environment variable I can use to
override either the theme name, or preferably the theme *path* for an
application?

Dan

On Tue, May 19, 2015 at 9:45 PM, LRN lrn1...@gmail.com wrote:
 On 19.05.2015 14:44, LRN wrote:
 On 19.05.2015 14:34, Daniel Kasak wrote:
 On Sun, Oct 19, 2014 at 10:17 PM, Emmanuele Bassi wrote:
 On 19 October 2014 03:42, Daniel Kasak wrote:
 On Sat, Oct 18, 2014 at 10:45 PM, Kalev Lember wrote:
 On 10/18/2014 01:25 PM, Daniel Kasak wrote:
 Why are some icons not being rendered? Is this a packaging issue? I see
 the same issue in the gtk demo apps. Also note that there is an image 
 in the
 combo box that's also not being rendered. I'm hoping this is just a 
 case of
 chucking a png file or 2 in the correct place now :)

 Some screenshots of Linux vs Windows:
 http://tesla.duckdns.org/downloads/gtk_linux.png
 http://tesla.duckdns.org/downloads/gtk_windows.png

 Looking at the screenshots, it looks like the Windows packaging is
 missing all the standard icons that would normally come from
 adwaita-icon-theme. Try including that in the builds and see if it fixes
 the icon issue?

 Thanks for the response. I just attempted to build adwaita-icon-theme, and
 it wants me to install gnome-common. I wonder if this is *really* 
 necessary,
 but anyway I'll persist ( when I get a full dev environment going on 
 Windows
 ).

 gnome-common is just a build-time requirement for a bunch of modules
 loosely tied to GNOME; it's a collection of autotool macros that cut
 down the maintenance burden, similar to the X.org macros module[1].

 [1] http://cgit.freedesktop.org/xorg/util/macros
 I'm back with exactly the same issue :(

 I'm doing another full windows build ( the previous one was flaky WRT
 rendering pixbufs, so I thought I'd try a full rebuild ). Previously,
 adding the adwaita-icon-theme package fixed the issue, and I saw the
 default Adwaita icons. Now, this doesn't seem to help. I've set
 GTK_DEBUG=icontheme and seen a LOT of messages about icons in the
 Adwaita directory, which would seem to suggest gtk is traversing the
 directory.

 Is there a definitive list of things that need to be set up to tell
 gtk3 where to look for icons?


 Did you run
 prefix/bin/gtk-update-icon-cache-3.0 -f -t prefix/share/icons/hicolor
 after installing Adwaita?

 Unrelated: do edit prefix/etc/gtk-3.0/settings.ini and at the very least 
 set

 [Settings]
 gtk-xft-antialias=1

 Related: also, did you run
 prefix/bin/gdk-pixbuf-query-loaders.exe 
 prefix/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
 after installing librsvg?

 --
 O ascii ribbon - stop html email! - www.asciiribbon.org

 ___
 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


Re: Gtk-3.14.3 on Windows: icon rendering issues

2015-05-19 Thread Daniel Kasak
On Wed, May 20, 2015 at 12:08 AM, LRN lrn1...@gmail.com wrote:
 On 19.05.2015 15:44, Daniel Kasak wrote:
 On Tue, May 19, 2015 at 9:45 PM, LRN wrote:
 On 19.05.2015 14:44, LRN wrote:
 On 19.05.2015 14:34, Daniel Kasak wrote:
 On Sun, Oct 19, 2014 at 10:17 PM, Emmanuele Bassi wrote:
 On 19 October 2014 03:42, Daniel Kasak wrote:
 On Sat, Oct 18, 2014 at 10:45 PM, Kalev Lember wrote:
 On 10/18/2014 01:25 PM, Daniel Kasak wrote:
 Why are some icons not being rendered? Is this a packaging issue? I 
 see
 the same issue in the gtk demo apps. Also note that there is an image 
 in the
 combo box that's also not being rendered. I'm hoping this is just a 
 case of
 chucking a png file or 2 in the correct place now :)

 Some screenshots of Linux vs Windows:
 http://tesla.duckdns.org/downloads/gtk_linux.png
 http://tesla.duckdns.org/downloads/gtk_windows.png

 Looking at the screenshots, it looks like the Windows packaging is
 missing all the standard icons that would normally come from
 adwaita-icon-theme. Try including that in the builds and see if it 
 fixes
 the icon issue?

 Thanks for the response. I just attempted to build adwaita-icon-theme, 
 and
 it wants me to install gnome-common. I wonder if this is *really* 
 necessary,
 but anyway I'll persist ( when I get a full dev environment going on 
 Windows
 ).

 gnome-common is just a build-time requirement for a bunch of modules
 loosely tied to GNOME; it's a collection of autotool macros that cut
 down the maintenance burden, similar to the X.org macros module[1].

 [1] http://cgit.freedesktop.org/xorg/util/macros
 I'm back with exactly the same issue :(

 I'm doing another full windows build ( the previous one was flaky WRT
 rendering pixbufs, so I thought I'd try a full rebuild ). Previously,
 adding the adwaita-icon-theme package fixed the issue, and I saw the
 default Adwaita icons. Now, this doesn't seem to help. I've set
 GTK_DEBUG=icontheme and seen a LOT of messages about icons in the
 Adwaita directory, which would seem to suggest gtk is traversing the
 directory.

 Is there a definitive list of things that need to be set up to tell
 gtk3 where to look for icons?


 Did you run
 prefix/bin/gtk-update-icon-cache-3.0 -f -t prefix/share/icons/hicolor
 after installing Adwaita?

 Unrelated: do edit prefix/etc/gtk-3.0/settings.ini and at the very least 
 set

 [Settings]
 gtk-xft-antialias=1

 Related: also, did you run
 prefix/bin/gdk-pixbuf-query-loaders.exe 
 prefix/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
 after installing librsvg?

 Yes I've scripted the initial setup:

 bin\pango-querymodules.exe  etc\pango\pango.modules
 bin\gdk-pixbuf-query-loaders.exe  lib\gdk-pixbuf-2.0\2.10.0\loaders.cache
 bin\gtk-query-immodules-3.0.exe  lib\gtk-3.0\3.0.0\immodules.cache
 bin\gtk-update-icon-cache.exe -f -t share\icons\hicolor
 bin\gtk-update-icon-cache.exe -f -t share\icons\Adwaita
 bin\gtk-update-icon-cache.exe -f -t share\icons\Faenza-Fresh

 I've tried setting in prefix/etc/gtk-3.0/settings.ini:

 [Settings]
 gtk-icon-theme-name = Adwaita
 gtk-xft-antialias = 1

  ... or:

 [Settings]
 gtk-icon-theme-name = Faenza-Fresh
 gtk-xft-antialias = 1

  ... but neither affect how things look.
 [...]
 look for cache in c:\jewelkit\c\share\icons
 [...]

 Um...just to make things clear: is your prefix = c:\jewelkit\c? Is
 libgtk-3-0.dll located in c:\jewelkit\c\bin?

Yes, and yes.

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


Re: Gtk-3.14.3 on Windows: icon rendering issues

2015-05-19 Thread Daniel Kasak
Here's a screenshot, showing *some* icons rendering ( no idea which
icon theme they come from ), and some *not* rendering:

http://tesla.duckdns.org/images/windows_7_gtk3.png

I'm using code like:

my $icon   = Gtk3::Image-new_from_icon_name( 'gtk-new', 'button' );

 ... to render the icons. Note the missing images in the buttons in
the header bar. It works fine on Linux and OSX.

Dan

On Wed, May 20, 2015 at 7:16 AM, Daniel Kasak d.j.kasak...@gmail.com wrote:
 On Wed, May 20, 2015 at 12:08 AM, LRN lrn1...@gmail.com wrote:
 On 19.05.2015 15:44, Daniel Kasak wrote:
 On Tue, May 19, 2015 at 9:45 PM, LRN wrote:
 On 19.05.2015 14:44, LRN wrote:
 On 19.05.2015 14:34, Daniel Kasak wrote:
 On Sun, Oct 19, 2014 at 10:17 PM, Emmanuele Bassi wrote:
 On 19 October 2014 03:42, Daniel Kasak wrote:
 On Sat, Oct 18, 2014 at 10:45 PM, Kalev Lember wrote:
 On 10/18/2014 01:25 PM, Daniel Kasak wrote:
 Why are some icons not being rendered? Is this a packaging issue? I 
 see
 the same issue in the gtk demo apps. Also note that there is an 
 image in the
 combo box that's also not being rendered. I'm hoping this is just a 
 case of
 chucking a png file or 2 in the correct place now :)

 Some screenshots of Linux vs Windows:
 http://tesla.duckdns.org/downloads/gtk_linux.png
 http://tesla.duckdns.org/downloads/gtk_windows.png

 Looking at the screenshots, it looks like the Windows packaging is
 missing all the standard icons that would normally come from
 adwaita-icon-theme. Try including that in the builds and see if it 
 fixes
 the icon issue?

 Thanks for the response. I just attempted to build adwaita-icon-theme, 
 and
 it wants me to install gnome-common. I wonder if this is *really* 
 necessary,
 but anyway I'll persist ( when I get a full dev environment going on 
 Windows
 ).

 gnome-common is just a build-time requirement for a bunch of modules
 loosely tied to GNOME; it's a collection of autotool macros that cut
 down the maintenance burden, similar to the X.org macros module[1].

 [1] http://cgit.freedesktop.org/xorg/util/macros
 I'm back with exactly the same issue :(

 I'm doing another full windows build ( the previous one was flaky WRT
 rendering pixbufs, so I thought I'd try a full rebuild ). Previously,
 adding the adwaita-icon-theme package fixed the issue, and I saw the
 default Adwaita icons. Now, this doesn't seem to help. I've set
 GTK_DEBUG=icontheme and seen a LOT of messages about icons in the
 Adwaita directory, which would seem to suggest gtk is traversing the
 directory.

 Is there a definitive list of things that need to be set up to tell
 gtk3 where to look for icons?


 Did you run
 prefix/bin/gtk-update-icon-cache-3.0 -f -t prefix/share/icons/hicolor
 after installing Adwaita?

 Unrelated: do edit prefix/etc/gtk-3.0/settings.ini and at the very 
 least set

 [Settings]
 gtk-xft-antialias=1

 Related: also, did you run
 prefix/bin/gdk-pixbuf-query-loaders.exe 
 prefix/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
 after installing librsvg?

 Yes I've scripted the initial setup:

 bin\pango-querymodules.exe  etc\pango\pango.modules
 bin\gdk-pixbuf-query-loaders.exe  lib\gdk-pixbuf-2.0\2.10.0\loaders.cache
 bin\gtk-query-immodules-3.0.exe  lib\gtk-3.0\3.0.0\immodules.cache
 bin\gtk-update-icon-cache.exe -f -t share\icons\hicolor
 bin\gtk-update-icon-cache.exe -f -t share\icons\Adwaita
 bin\gtk-update-icon-cache.exe -f -t share\icons\Faenza-Fresh

 I've tried setting in prefix/etc/gtk-3.0/settings.ini:

 [Settings]
 gtk-icon-theme-name = Adwaita
 gtk-xft-antialias = 1

  ... or:

 [Settings]
 gtk-icon-theme-name = Faenza-Fresh
 gtk-xft-antialias = 1

  ... but neither affect how things look.
 [...]
 look for cache in c:\jewelkit\c\share\icons
 [...]

 Um...just to make things clear: is your prefix = c:\jewelkit\c? Is
 libgtk-3-0.dll located in c:\jewelkit\c\bin?

 Yes, and yes.

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


Re: Glib-Object-Introspection on Windows

2015-05-17 Thread Daniel Kasak
Thanks a LOT for the quick response Torsten. My Windows VM is sitting
@ home, waiting for me to try out your patch. I tried connecting from
work, but my connection isn't fast enough to make it feasible :/

Dan

On Mon, May 18, 2015 at 3:56 AM, Torsten Schoenfeld kaffeeti...@gmx.de wrote:
 On 17.05.2015 15:34, Daniel Kasak wrote:
 dlltool --def Introspection.def --output-exp dll.exp
 [ LD blib\arch\auto\Glib\Object\Introspection\Introspection.xs.dll ]
 GObjectIntrospection.o:GObjectIntrospection.c:(.text+0x4a80): undefined 
 referenc
 e to `SvGVariant'
 GObjectIntrospection.o:GObjectIntrospection.c:(.text+0x6bed): undefined 
 referenc
 e to `newSVGVariant_noinc'
 GObjectIntrospection.o:GObjectIntrospection.c:(.text+0x70d1): undefined 
 referenc
 e to `newSVGVariant'

 Sounds like I forgot to add the GVariant converters to the win32 linker
 export list.  Try with this commit:
 https://git.gnome.org/browse/perl-Glib/commit/?id=f4d391727c0ad56a31b5fab916691960deed36b9.
 ___
 gtk-perl-list mailing list
 gtk-perl-list@gnome.org
 https://mail.gnome.org/mailman/listinfo/gtk-perl-list
___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-perl-list


Glib-Object-Introspection on Windows

2015-05-17 Thread Daniel Kasak
Hi all.

I'm trying to build GIO-0.029 on Windows. I've previously been able to
build version 0.025 like this from a cmd.exe shell:

set CC=gcc
set GI_TYPELIB_PATH=c:\jewelkit\c\lib\girepository-1.0
Makefile.PL
dmake
dmake test
dmake install

With version 0.029, I get:

C:\gtk3_build\source\Glib-Object-Introspection-0.029dmake
cp lib/Glib/Object/Introspection.pm blib\lib\Glib\Object/Introspection.pm
cp build/IFiles.pm blib\arch/Glib\Object\Introspection/Install/Files.pm
Running Mkbootstrap for Glib::Object::Introspection ()
C:\jewelkit\perl\bin\perl.exe -MExtUtils::Command -e chmod -- 644 Introspecti
on.bs
[ XS GObjectIntrospection.xs ]
[ CC GObjectIntrospection.c ]
C:\jewelkit\perl\bin\perl.exe -MExtUtils::Mksymlists \
 -e Mksymlists('NAME'=\Glib::Object::Introspection\, 'DLBASE' = 'Intros
pection', 'DL_FUNCS' = {  }, 'FUNCLIST' = [], 'IMPORTS' = {  }, 'DL_VARS' =
[]);
dlltool --def Introspection.def --output-exp dll.exp
[ LD blib\arch\auto\Glib\Object\Introspection\Introspection.xs.dll ]
GObjectIntrospection.o:GObjectIntrospection.c:(.text+0x4a80): undefined referenc
e to `SvGVariant'
GObjectIntrospection.o:GObjectIntrospection.c:(.text+0x6bed): undefined referenc
e to `newSVGVariant_noinc'
GObjectIntrospection.o:GObjectIntrospection.c:(.text+0x70d1): undefined referenc
e to `newSVGVariant'
C:/jewelkit/c/bin/../lib/gcc/i686-w64-mingw32/4.8.3/../../../../i686-w64-mingw32
/bin/ld.exe: GObjectIntrospection.o: bad reloc address 0x124 in section `.rdata'

collect2.exe: error: ld returned 1 exit status
dmake:  Error code 129, while making 'blib\arch\auto\Glib\Object\Introspection\I
ntrospection.xs.dll'

C:\gtk3_build\source\Glib-Object-Introspection-0.029

Does anyone know what the problem is?

It's taken over a day to get to this point ... and there's a new
Windows release coming very soon after this is fixed ... :)

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


Recommended way of building on OSX

2015-03-14 Thread Daniel Kasak
Hi all.

I've successfully ( largely ) built on OSX using jhbuild, and
compiling a local perl. This works pretty well, as far as I can tell,
though I'm testing using vnc tunnelled through ssh and going half-way
around the world, as I don't have an OSX box myself ... so it's kinda
hard to tell how things *really* work.

Anyway, I had to do a fair bit of hacking to get icons and themes to
display properly. I'm wondering if other methods ( MacPorts, homegrown
scripts, whatever ) are any better at getting a 'vanilla' setup that
actually works, and would also work nicely with a locally built perl.
Lastly, I'd like to be able to distribute all this 'somehow', though I
have no idea of packaging on OSX.

Does anyone have any pointers?

Thanks :)

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


Re: Gtk3::Gdk::EventKey mappings

2015-03-06 Thread Daniel Kasak
Thanks :) That pointed me in the right direction.

Dan

On Tue, Mar 3, 2015 at 7:14 PM, Terence Ferraro terencejferr...@gmail.com
wrote:

 I previously used the global snooper in Gtk2, but due to removed
 functionality, I added some code myself into Gtk3.pm to essentially provide
 the same functionality.

 It looks like I locally define near the beginning of Gtk3.pm:

 my $key_snooper_subroutine;

 With a subroutine further below:

 sub Gtk3::key_snooper_install
 {
 my ($gtk,$sub) = @_;
 $key_snooper_subroutine = $sub;
 }

 Then I call in the application initialization directly:
 Gtk3-key_snooper_install(\key_hook);

 I've also got a modified Gtk3::Window::new function that includes:
 if(defined($key_snooper_subroutine)) {
 $window-signal_connect(key_press_event = $key_snooper_subroutine); }

 Among other things that are processed within the sub, I also save the last
 key data, for processing of delayed or redirected events, etc:

 sub key_hook
 {
 my ($widget,$event,$data) = @_;
 # ...stuff... $main::global_last_key_state = $state;
 $main::global_last_key_keyval = $event-keyval; $main::global_last_key_type
 = $event-type; }

 In any case, one of the things I think you're looking for is the state
 mask, e.g. I check for: if($state =~ /shift-mask/) { ... }

 And I think your L key should just be: Gtk3::Gdk::KEY_L or Gtk3::Gdk::KEY_l

 Here's a snippet I use to ensure a given field can only accept numbers and
 decimals:

 if($event-keyval != Gtk3::Gdk::KEY_BackSpace  $event-keyval !=
 Gtk3::Gdk::KEY_0  $event-keyval != Gtk3::Gdk::KEY_1  $event-keyval !=
 Gtk3::Gdk::KEY_2  $event-keyval != Gtk3::Gdk::KEY_3  $event-keyval !=
 Gtk3::Gdk::KEY_4  $event-keyval != Gtk3::Gdk::KEY_5  $event-keyval !=
 Gtk3::Gdk::KEY_6  $event-keyval != Gtk3::Gdk::KEY_7  $event-keyval !=
 Gtk3::Gdk::KEY_8  $event-keyval != Gtk3::Gdk::KEY_9  $event-keyval !=
 Gtk3::Gdk::KEY_Tab  $event-keyval != Gtk3::Gdk::KEY_Left 
 $event-keyval != Gtk3::Gdk::KEY_Right  $event-keyval !=
 Gtk3::Gdk::KEY_period  $event-keyval != Gtk3::Gdk::KEY_KP_0 
 $event-keyval != Gtk3::Gdk::KEY_KP_1  $event-keyval !=
 Gtk3::Gdk::KEY_KP_2  $event-keyval != Gtk3::Gdk::KEY_KP_3 
 $event-keyval != Gtk3::Gdk::KEY_KP_4  $event-keyval !=
 Gtk3::Gdk::KEY_KP_5  $event-keyval != Gtk3::Gdk::KEY_KP_6 
 $event-keyval != Gtk3::Gdk::KEY_KP_7  $event-keyval !=
 Gtk3::Gdk::KEY_KP_8  $event-keyval != Gtk3::Gdk::KEY_KP_9) { return(1); }

 Hope this helps!


 *Terence J. Ferraro*

 On Tue, Mar 3, 2015 at 2:54 AM, Daniel Kasak d.j.kasak...@gmail.com
 wrote:

 Greetings.

 I'm trying to capture key press events like 'CTRL L'. I've found I can
 connect to the key-press-event of each window, and that method receives the
 window that intercepted the keypress, and a Gtk3::Gdk::EventKey. Where do I
 decode this? Data::Dumper says it's:

 $VAR1 = bless( do{\(my $o = 82035488)}, 'Gtk3::Gdk::EventKey' );

 Is there a nice mapping document or something? Or do I just use these
 constants, eg 82035488?

 Thanks :)

 Dan



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



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


unicode in a liststore

2015-03-06 Thread Daniel Kasak
Hi all.

I'm battling unicode issues on multiple fronts :/ 1 front is in unixODBC,
but that's another story.

If I can actually get valid unicode out of a database, I'm *still* having
issues pushing it into a liststore. Things get corrupted. I've modified
liststore.pl from https://github.com/dave-theunsub/gtk3-perl-demos and
uploaded the changed version to:

http://tesla.duckdns.org/downloads/unicode_in_liststore.pl

Near the top, I've appended another row for the liststore, with the unicode
string:

Gestión

This doesn't get rendered properly for me. Is there something special I'm
supposed to do for unicode in Gtk3?

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


  1   2   3   4   >