Re: gtk-perl makes ASCII world domination one step closer
- From: muppet <scott asofyet org>
- To: gtk2-perl List <gtk-perl-list gnome org>
- Subject: Re: gtk-perl makes ASCII world domination one step closer
- Date: Tue, 19 Feb 2008 08:34:57 -0500
I think you meant to reply to the list, not to me. I couldn't answer
the win32 question.
On Feb 19, 2008, at 3:33 AM, nadim khemir wrote:
On Tuesday 19 February 2008 04.08.54 you wrote:
But in the end, it was actually quite snappy and interesting. The
Dilbert picture was worth the installation work. ;-)
I'll make a proper module and upload it. That should fix the
dependencies
problem.
It seems we do not have a namespace for GTK applications. Shall I
call it
App::gpad or App::GTK::gpad so other can find the applications we
write?
We use Gtk2::Ex for pure-perl add-on modules. Apps go in the most
appropriate namespace for what each app does.
Can anyone test this on Win32 and, if possible, create an exe
through par so
it's easier to distribute (I have fix a windows box someday).
Some technical questions:
how do I intercept a the closing of a widget (the gpad widget in
this case)
and present a "modified, do you want to save: yes no cancel" dialog?
Gdk represents a window manager kill as "delete-event", Return a true
value from your handler to stop propagation.
# warning, untested code typed straight into an email
$window->signal_connect (delete_event => sub {
my ($win, $event) = @_;
my $answer = 0;
if (document_is_dirty ($win)) {
my $dlg = Gtk2::MessageDialog->new ($win, [], 'question',
'yes-no',
"Are you sure you want
to quit?");
$answer = ('yes' eq $dlg->run);
$dlg->destroy;
}
return $answer;
});
You get bonus points for the minimal extra work to use "Quit" and
"Don't Quit" for the buttons instead of "Yes" and "No".
I use $drawing_area->set_size_request, that sets a minimum size but
I want to
set the size when the window opens then it's up to the user to set
size.
gtk_widget_set_size_request() effectively sets the widget's minimum
size, as you have observed. The fix is to use
gtk_window_set_default_size() on the toplevel, and do NOT set the size
request on the drawing area widget.
$toplevel_window->set_default_size ($width_pixels, $height_pixels);
I was thinking of allowing the user to split the drawing area
vertically and
horizontally (many times if necessary) and be able to drag drop
between the
different areas. Do anyone see a problem or like the idea? my base
idea was
to present the stencil in a different view instead-for/or the
context menu
That's a common thing i've seen in other apps. Sounds nice.
last but not least, shall it be added to applications list on the
gtk-perl web
site?
Create a description page to which we can link, and we'd be happy to.
You know, what does the app do, what does it look like, what do you
need --- more than just a tarball in a directory. ;-)
--
One, two, free, four, five, six, sebben, eight, nine, ten, elebben,
twull, fourteen, sickteen, sebbenteen, eightteen, elebbenteen,
fiffeen, elebbenteen!
-- Zella, aged three, counting to twenty.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]