Re: Native Gtk2-Perl apps on Mac OS X

2008-11-09 Thread ofey aikon
 Forgive me if someone's already posted about doing this: having installed
 the GTK+ package from Imendio (gtk-osx.org) on my Macbook I found installing
 the Gtk2-Perl mods pretty easy.

I installed the GTK+ package from Imendio. However, Cairo compilation
fails with the following error.

[snip]

/usr/bin/gcc-4.0 -c  -I. -Ibuild
-I/Library/Frameworks/Cairo.framework/Headers
-I/usr/local/include/freetype2 -I/usr/local/include
-I/opt/local/include/cairo -I/opt/local/include -I/opt/local/include
-fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -pipe
-Wdeclaration-after-statement -I/opt/local/include -O3
-DVERSION=\1.060\ -DXS_VERSION=\1.060\
-I/opt/local/lib/perl5/5.8.8/darwin-2level/CORE   CairoFt.c
CairoFt.c: In function 'XS_Cairo__FtFontFace_create':
CairoFt.c:30: error: 'FT_Face' undeclared (first use in this function)
CairoFt.c:30: error: (Each undeclared identifier is reported only once
CairoFt.c:30: error: for each function it appears in.)
CairoFt.c:30: error: parse error before 'face'
CairoFt.c:34: error: 'face' undeclared (first use in this function)
CairoFt.xs:17: warning: assignment makes pointer from integer without a cast
make: *** [CairoFt.o] Error 1

[/snap]

My guess is this has something to do with freetype. Is that correct?
Is there a way I can compile Cairo without freetype?

Regards,

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


Re: Gtk2 perl graph saving

2006-06-25 Thread ofey aikon
On 6/24/06, Subhrangshu Supakar [EMAIL PROTECTED] wrote:
  I am a newbie to Gtk2 perl, Iam not being able to save a graph generated by
 Gtk2::Ex::Graph::GD.

I can tell you how to save the image that is being generated.

The $graph-get_image($data) actually gives you a Gtk2::EventBox with
a Gtk2::Image inside it. I took this approach because I wanted the
graph to respond to 'events' (mouse movements etc) and the Gtk2::Image
itself did not do that.

I think what you can do is as follows.

$graph = Gtk2::Ex::Graph::GD(...);

# Get the Gtk2::Eventbox out
my $eventbox= $graph-get_image($data);

# Now pull the Gtk2::Image from inside the $eventbox.
my $image = $graph-get_child;

# Now I pull the Gtk2::Gdk::Pixbuf from inside the Gtk2::Image
my $pixbuf = $image-get_pixbuf();

# Now I can write that pixbuf to a file
$pixbuf-save($filename, 'jpeg', quality = '100');

But of course, all this just helps you to save the image alone. Once
you revive the image, you will lose the hotspots in the graph etc.

What are you trying to achieve ? If you can give more insight into
your problem, may be I can help more. Please send me an email off this
list.

Regards,

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


What happened to our mail archives ?

2006-06-20 Thread ofey aikon
The main page http://mail.gnome.org/archives/gtk-perl-list/index.html
does not show the previous months any more.

If I type the path explicitly
http://mail.gnome.org/archives/gtk-perl-list/2005-June/thread.html
that does take me to that particular month. But the main page has no
links to that month.

Regards,

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


TreeModelFilter issues

2006-06-02 Thread ofey aikon

In the following code, I have a simple list with a checkbox and a text
field. The text field is being filtered using a TreeModelFilter (type
in something into the Entry and press search)

My trouble is with check-marking a particular row after any kind of
filtering has been applied. Before filtering, the check-marking works
fine. After filtering, clicking on the check-box doesn't put a
tick-mark into the particular check-box on that row. Sometimes it puts
a checkmark on another row.

My guess is that since the TreeModelFilter is hiding rows, the
clicking of check-box is probably being captured by a hidden row. Some
kinda mis-alignment like that.

But isn't that a bug ? May be the bug is not in perl bindings but in
the gtk code. Any comments ?

I am running
Glib 1.103
Gtk2 1.102
Glib built for 2.9.5, running with 2.10.2
Gtk2 built for 2.8.16, running with 2.8.17

Thanks,

_Ofey


tree-search.pl
Description: Perl program
___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-perl-list


Re: Which version of what for Win32 at the moment?

2006-03-29 Thread ofey aikon
On 3/20/06, Daniel Kasak [EMAIL PROTECTED] wrote:
  I'm preparing to do an install for a customer on a Windows system.
  ActiveState Perl 5.8.8 is out. Will this work with the latest Gtk2-Perl
  bindings available for Windows ( Gtk2-1080.ppd )? Or should I use
  ActiveState Perl 5.8.7?

 Never mind. 5.8.8 doesn't work with this version of Gtk2 on Windows
 either. Back to 5.8.7.

(my hard-drive crashed and that gave me an opportunity to try this out)

The following combination works fine for me.

perl, v5.8.8 built for MSWin32-x86-multi-thread
Glib 1.100, Gtk2 1.100
Glib built for 2.6.6, running with 2.8.5
Gtk2 built for 2.6.10, running with 2.8.9

Regards,

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


Re: Issues with iconview

2006-02-03 Thread ofey aikon
On 1/30/06, muppet [EMAIL PROTECTED] wrote:
 IconView is a natively-scrollable widget.  As such, it typically
 takes as much space as it is given, and appears to request only some
 minimal amount.  You're adding the IconView to a box and then adding
 the box to a ScrolledWindow with a viewport.  Is that really what you
 want?  If this works correctly, it will cause the labels to scroll
 with the IconView, which tends to be rather disorienting.

That actually is the behaviour that I am seeking. I am trying to cook
up a photo manager app and I want the right side pane in that to
behave like what picasa does. Right side pane will show each
photogroup with a header-label and a list of thumbnails under them. I
want all of these sets to be in a scrolledwindow and when I scroll,
the label along with the thumbnails should scroll to show the next
photogroup. I am using iconview for the thumbnail set.

 If that layout is really what you want, you can get the viewport to
 behave as expected by giving a size request to the icon view (e.g.,
 $iconview-set_size_request (100, 400)), but this then requires you
 to come up with some numbers.

Is there anyway to turn off the native scrolling ? If
$iconview-set_size_request is the only way to go, any tricks on how I
can figure out the correct values of size , for example by knowing the
size and count of the thumbnails ?

Thanks,

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


Issues with iconview

2006-01-29 Thread ofey aikon
I am encountering a strange problem with the iconview widget. Attached
are two scripts to demonstrate the case.

In the first one, I am creating a pixbuf from a stock_icon and adding
it to an iconview and then adding it to a scrolledwindow. Everything
works as expected here.

In the second one, everything is same except that I create the pixbuf
from a jpeg file. This time the scrolledwindow doesn't behave quite
well. I don't see the scrollbars. When I expand the window and reduce
it, the label Two starts hiding the iconview area.

I have fooled around with the VBox packing flags ('expand', 'fill') to no avail.

Any help will be appreciated.

I am running
Glib 1.103
Gtk2 1.102
Glib built for 2.8.6, running with 2.8.6
Gtk2 built for 2.8.9, running with 2.8.10

Regards,

_Ofey.


version.pl
Description: Perl program
___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-perl-list


Re: Issues with iconview

2006-01-29 Thread ofey aikon
Sorry.. attached the wrong file before :)

On 1/29/06, ofey aikon [EMAIL PROTECTED] wrote:
 I am encountering a strange problem with the iconview widget. Attached
 are two scripts to demonstrate the case.

 In the first one, I am creating a pixbuf from a stock_icon and adding
 it to an iconview and then adding it to a scrolledwindow. Everything
 works as expected here.

 In the second one, everything is same except that I create the pixbuf
 from a jpeg file. This time the scrolledwindow doesn't behave quite
 well. I don't see the scrollbars. When I expand the window and reduce
 it, the label Two starts hiding the iconview area.

 I have fooled around with the VBox packing flags ('expand', 'fill') to no 
 avail.

 Any help will be appreciated.

 I am running
 Glib 1.103
 Gtk2 1.102
 Glib built for 2.8.6, running with 2.8.6
 Gtk2 built for 2.8.9, running with 2.8.10

 Regards,

 _Ofey.





iconviewtest.tar.gz
Description: GNU Zip compressed data
___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-perl-list


Re: Gtk2 1.103 (stable)

2006-01-20 Thread ofey aikon
The win32 ppms at http://gtk2-perl.sourceforge.net/win32/ppm/ have not
been updated since Gtk2-1.100 (15 Sep 2005).

Any volunteers to help us, the poor win32 folks, out ?

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


Announcing Gtk2::Ex::GraphViz - 0.01

2005-10-29 Thread ofey aikon
Gtk2::Ex::GraphViz is a Gtk2 wrapper to the GraphViz.pm module.

GraphViz package can be used to produce good-looking network graphs.
Wrapping with Gtk2 allows those graph images to respond to events such
as mouse-over, clicked etc.

By implementing callbacks to the respective signals, you can create
fairly interactive network graphs. For example, when the user
double-clicks a node, you can open up a widget that contains
information on that node.

use GraphViz;
use Gtk2::Ex::GraphViz;

# First do all the work in GraphViz.pm
my $g = GraphViz-new;
$g-add_node('London', shape = 'box', fillcolor ='lightblue',
style ='filled',);
$g-add_node('Paris', label = 'City of\nlurve', );
$g-add_edge('London' = 'Paris');

# Now the actual Gtk2::Ex::GraphViz portion takes over
my $graphviz = Gtk2::Ex::GraphViz-new($g);
$graphviz-signal_connect ('mouse-enter-node' =
  sub {
my ($self, $x, $y, $nodename) = @_;
my $nodetitle = $graphviz-{svgdata}-{g}-{g}-{$nodename}-{title};
print Node : $nodetitle : $x, $y\n;
  }
);

TODO:
This is just an alpha release. Only mouse-enter, mouse-exit events are
implemented. I plan to implement clicked events soon. Also performance
kinda sucks on low end machines. I'll throw in a better search
algorithm to improve the performance.

And, by the way, its LGPL.

Feedback / Suggestions welcome.

Regards,

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


Re: Announcing Gtk2::Ex::GraphViz - 0.01

2005-10-29 Thread ofey aikon
The package is available in CPAN.
http://search.cpan.org/~ofeyaikon/Gtk2-Ex-GraphViz-0.01/

The source can also be found at
http://cvs.sourceforge.net/viewcvs.py/gtk2-perl-ex/Gtk2-Ex/GraphViz/

On 10/29/05, ofey aikon [EMAIL PROTECTED] wrote:
 Gtk2::Ex::GraphViz is a Gtk2 wrapper to the GraphViz.pm module.

 GraphViz package can be used to produce good-looking network graphs.
 Wrapping with Gtk2 allows those graph images to respond to events such
 as mouse-over, clicked etc.

 By implementing callbacks to the respective signals, you can create
 fairly interactive network graphs. For example, when the user
 double-clicks a node, you can open up a widget that contains
 information on that node.

 use GraphViz;
 use Gtk2::Ex::GraphViz;

 # First do all the work in GraphViz.pm
 my $g = GraphViz-new;
 $g-add_node('London', shape = 'box', fillcolor ='lightblue',
 style ='filled',);
 $g-add_node('Paris', label = 'City of\nlurve', );
 $g-add_edge('London' = 'Paris');

 # Now the actual Gtk2::Ex::GraphViz portion takes over
 my $graphviz = Gtk2::Ex::GraphViz-new($g);
 $graphviz-signal_connect ('mouse-enter-node' =
   sub {
 my ($self, $x, $y, $nodename) = @_;
 my $nodetitle = $graphviz-{svgdata}-{g}-{g}-{$nodename}-{title};
 print Node : $nodetitle : $x, $y\n;
   }
 );

 TODO:
 This is just an alpha release. Only mouse-enter, mouse-exit events are
 implemented. I plan to implement clicked events soon. Also performance
 kinda sucks on low end machines. I'll throw in a better search
 algorithm to improve the performance.

 And, by the way, its LGPL.

 Feedback / Suggestions welcome.

 Regards,

 _Ofey.

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


Re: Threads and Gtk2

2005-10-19 Thread ofey aikon
On 10/19/05, Javier Godinez [EMAIL PROTECTED] wrote:
 Even when the variable is shared, I get the same behavior:

  my $keep_running : shared = 1;


You need to ...

use threads::shared;
...(code)..
my $keep_running : shared = 1;
...(code)..

That should work.

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


Re: Threads and Gtk2

2005-10-19 Thread ofey aikon
#!/usr/bin/perl -w

use Gtk2 '-init';
use strict;
use threads;
use threads::shared;

my $keep_running : shared = 1;
my $thr1 = threads-new(
sub {
   while ($keep_running == 1 ) {
   print Hello\n;
   sleep(1);
   }
});

sub button_callback {
   $keep_running = 0;
   $thr1-join;
   Gtk2-main_quit;
}


my $window = Gtk2::Window-new;
my $button = Gtk2::Button-new (Quit!);
$button-signal_connect (clicked = \button_callback);

$window-add($button);
$window- show_all;
Gtk2-main;
___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-perl-list


Re: Stocks don't seem

2005-10-14 Thread ofey aikon
 I started gtk-demo: in Stock Icons And Items the stocks seem, but in the
 window ow Button Widgets don't...

May be it is your gtk theme that's hiding the stock icons.

Regards,

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


Gtk2::Ex::Graph::GD 0.04 is now available

2005-10-13 Thread ofey aikon
Gtk2::Ex::Graph::GD is a thin wrapper around the good-looking
GD::Graph module. Wrapping using Gtk2 allows the GD::Graph object to
respond to events such as mouse movements and button clicks.

You can define callback functions to be called when the user clicks on
the bars in the graph or on mouse-overs.

Changes since 0.01
- right-click menu to switch the graph style (bars, line, pie etc)
- mouse-over tooltip for line and linespoints charts
- added call-backs for 'mouse-over' and 'clicked'
(So when the user clicks on a bar on the graph, you can open up your
own custom data widget)
- fixed a bug with mouse-over
- fixed a bug with lines legend

Available at
http://search.cpan.org/~ofeyaikon/Gtk2-Ex-Graph-GD-0.04/

Comments / Feedback welcome.

Regards,

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


Re: Patch for Gtk2::Ex::Dialogs (for win32)

2005-10-02 Thread ofey aikon
On 9/28/05, Kevin C. Krinke [EMAIL PROTECTED] wrote:
 If you can find the time to create a patch that bumps the version,
 removes the Gnome2::VFS stuff and uses File::Type instead I would be
 very pleased.

I am attaching two patches.

patch1 removes Gnome2::VFS dependency and uses File::Type instead.
Works for me on win32.

patch2 fixes another bug related to abs_path. The demo.pl currently
throws a non-fatal error related to relative path of filename. This
patch should take care of that.

I can commit these if no one has objections.


patch1.dat
Description: audio/unknown


patch2.dat
Description: audio/unknown
___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-perl-list


ANNOUNCE: Gtk2::Ex::DateRange

2005-09-30 Thread ofey aikon
Gtk2::Ex::DateRange is a simple special purpose widget for specifying
a range of dates. (For example, [after '1965-03-12' and on or before
'1989-02-14']).

I wanted something more than just two plain old Gtk2::Entries for this
purpose. So I wrote a little high level widget with 'usability' as the
foremost criterion.

I found myself using this in more than a couple of places in my data
analysis app. So, I thought it could even be CPAN worthy. And so here
it is

http://search.cpan.org/~ofeyaikon/Gtk2-Ex-DateRange/
Also http://cvs.sourceforge.net/viewcvs.py/gtk2-perl-ex/Gtk2-Ex/

May be later I'll add some logic to check the validity of dates
entered. For example a model like [before '1965-03-12' and after
'1989-02-14'] doesn't quite make sense. Where as [before '1965-03-12'
or after '1989-02-14'] makes sense.

Regards,

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


Re: ANNOUCE: Zim

2005-09-29 Thread ofey aikon
 Zim is a WYSIWYG text editor written in Gtk2-Perl.
Looks nifty. I got it running on my debian box smoothly.

Couldn't get it to work on win32. Issue is File::MimeInfo I guess. So
does File::MimeInfo work on win32 without cygwin ? (You have mentioned
the same package in the other email thread).
http://mail.gnome.org/archives/gtk-perl-list/2005-September/msg00174.html

I am new to that package, but this link suggests otherwise.
http://dev.catalyst.perl.org/ticket/26

We can take this discussion outside the list if it is just specific to
File::MimeInfo.

On 9/28/05, Jaap Karssenberg [EMAIL PROTECTED] wrote:
 (( I see some CPAN distributions append an extra 'X' to the namespace
 for extensions, like for example the MasonX namespace. I suppose you
 like Gtk2::Ex better then Gtk2X:: - fine with me. ))

Yeah. Folks here came to a consensus on that namespace.
http://mail.gnome.org/archives/gtk-perl-list/2004-June/msg00165.html

Regards,

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


Re: Patch for Gtk2::Ex::Dialogs (for win32)

2005-09-22 Thread ofey aikon
On 9/22/05, muppet [EMAIL PROTECTED] wrote:
 our $HAVE_VFS = eval use Gnome2::VFS; 1;

Thanks !

_Ofey.


diff.dat
Description: Binary data
___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-perl-list


Re: Ordering windows on the desktop

2005-09-15 Thread ofey aikon
 Buggy window manager?  The taskbar hint really is just a hint; it
 relies on the window manager paying attention to conventions.

Indeed...
http://bugzilla.gnome.org/show_bug.cgi?id=106249

Thanks,

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


Re: Ordering windows on the desktop

2005-09-14 Thread ofey aikon
 try without this line:
 $childwindow-set_type_hint('GDK_WINDOW_TYPE_HINT_DOCK');

That helps. This must be one of those win32 window manager quirks.

I do have another related question. I do not want the childwindow to
be seen on the taskbar. I set the following.

$childwindow-set_skip_taskbar_hint(TRUE);
$childwindow-set_skip_pager_hint(TRUE);

But it still can be seen in the alt-tab list for switching windows. Is
there any way I can get rid of it from that list too.

I cannot use window type of 'popup' due to a lot of other reasons.
(Grabbing focus etc).

Regards,

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


Re: Long running DBI queries (gtk2 , threads) : Gtk2-Ex-Threads-DBI

2005-09-03 Thread ofey aikon
The module is now available for download at CPAN

http://search.cpan.org/~ofeyaikon/Gtk2-Ex-Threads-DBI-0.01/

It is LGPL for your pleasure.

Code also in sourceforge at 
http://cvs.sourceforge.net/viewcvs.py/gtk2-perl-ex/Gtk2-Ex/

Patches are welcome as always.

Regards,

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


Re: Long running DBI queries (gtk2 , threads)

2005-09-02 Thread ofey aikon
On 9/1/05, A. Pagaltzis [EMAIL PROTECTED] wrote:
 This seems like bad API design. Instead of requiring the
 programmer to make up a name to refer to the information, return
 an object from the register call that encapsulates all the
 necessary information.
 
 my $threaded_query = $mythread-register_sql( \call_sql, \call_back );
 
 $threaded_query-execute( @some_params );

That looks better. Thanks !

On 9/1/05, muppet [EMAIL PROTECTED] wrote:
 Lowercase package names are typically reserved for pragmatic
 modules.  Please call it Gtk2::Ex::Threads::DBI.

That was my original intention. Then I encountered this whole
discussion of Thread.pm (old) vs threads.pm (ithreads). And since I
was using ithreads, I went for the lowercase name. I still like the
upper case name and so I'll revert to calling it
CGtk2::Ex::Threads::DBI

 Would it be a little simpler to have Gtk2::Ex::DBI, and have that
 implemented with threads on win32 and whatever works best on linux
 (with the implemention completely hidden, of course)?

I think this approach will work on linux too. I'll be testing it on
linux to see how it goes.

On 9/1/05, Daniel Kasak [EMAIL PROTECTED] wrote:
 Oy!
 Gtk2::Ex::DBI is mine, and I will defend it if necessary :)

I'll respect your territory :) Since you are using Gtk2::Ex::DBI for
writing lot of high level widgets, I don't want to intrude into that
namespace with this infrastructural code.

Also, I think this approach can be extended to other jobs like (long
file read, read from socket or whatever). So I emphasize on 'Threads'
first and 'DBI' only later. May be later on we'll have
Gtk2::Ex::Threads::* modules.

Regards,

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


Long running DBI queries (gtk2 , threads)

2005-09-01 Thread ofey aikon
I want to have my perl-gtk app query a database using DBI and display
the query results.  Some of the queries can take minutes to run and a
naive implementation would mean all GUI interaction was blocked until
the $dbh-execute returned.

This seems to be a fairly common problem.
http://mail.gnome.org/archives/gtk-perl-list/2004-November/msg00055.html
http://mail.gnome.org/archives/gtk-perl-list/2005-August/msg00140.html

In my case, I've cooked up a solution using ithreads. It worked fine 
for me (on win32). So I decided to abstract away all the thread
related code into a separate package so that the main code will remain
fairly clean (no thread related code in the main)

Attached is the new (beta) package. MyThread.pm. An example is also attached.

# - #
USAGE:
# - #

The usage is fairly straightforward.

Use the Cregister_sql to register a sql to be executed and a
call_back to be called post-execution. You get to refer to this thing
by a name so that you can call it later.

$mythread-register_sql('some name', \call_sql, \call_back);

Later on, this registered sql can be triggered by calling 
$mythread-execute('some name',[list of parameters]);

$dbh and $sth cannot be 'shared' between threads. So I have to shuttle
parameters and resultset between threads to get this thing going. Of
course, I am using CStorable qw(freeze thaw) to exchange data
structures.

sub call_sql {
my ($dbh, $sqlparams) = @_;
my $params = thaw $sqlparams; # Don't forget to thaw
my $sth = $dbh-prepare(qq{
# my complicated long query that takes a long time to 
complete
select a.field2, b.field2 from table1 a, table2 b where 
a.field1 = b.field1
and a.field2 like ?
});
$sth-execute('%'.$params-[0].'%');

# We HAVE TO load all required data into an array and send it 
back
# Main thread does not have access to the $dbh and $sth...
# Atleast I haven't figured out a way to 'share' these handles
my @result_array;
while (my @ary = $sth-fetchrow_array()) {
push @result_array, [EMAIL PROTECTED];
}
return [EMAIL PROTECTED];
}

The C@result_array that was created cannot be meddled with from the
main thread. Instead, you'll get a frozen version of that through the
call_back function.

sub call_back {
my ($result_array) = shift;
@{$slist-{data}} = ();
foreach my $x (thaw $result_array) { # Don't forget to thaw 
once more
push @{$slist-{data}}, @$x;
}
}

# - #

This stuff works for me in my toy app on win32. If any one sees
pitfalls with this approach please do let me know. Like I said before,
I am still a newbie on threads(gtk2-perl). This is a problem which I
'have to' solve in my app and the approach seems good enough according
to me.

I can't use pipes because they don't behave quite well on win32. Also,
spawning off a new process to do dbi query may be ugly.

If no one sees issues with this approach, I'll load this into cpan
under the name

Gtk2::Ex::threads::DBI

Regards,

_Ofey.


MyThreadDBI.pm
Description: Binary data


mythread-usage.pl
Description: Binary data
___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-perl-list


/examples/thread_usage.pl

2005-08-30 Thread ofey aikon
I found some more time to tinker with threads...

I started playing with the /examples/thread_usage.pl in cvs. Works fine
on linux but not quite on win32. I had to patch it as following to make
it work on win32.

Can some one tell me the story behind this ? 

C:\GNU\GTK-Perl-Source\Gtk2-1.061\examplesdiff thread_usage.pl thread_usage.orig.pl
15d14
 Gtk2::Gdk::Threads-enter;

Regards,

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


Re: /examples/thread_usage.pl

2005-08-30 Thread ofey aikon
 No idea why you'd need it on windows, but it causes the main window never to
 show up on linux.  This makes sense, because enter and leave are supposed to
 be used by the worker threads, not the main thread.

Without that extra line, the UI responsiveness is zero. The window
shows up but I see the hour glass and the program just hangs.

I'm a thread(gtk2-perl) newbie and hence the cluelessness.

Thanks,

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


Re: imagmap

2005-08-27 Thread ofey aikon
  Is there a way to create a clickable imagemap in GTK+
  (preferably without Gnome so it can run on Windows as well)

 If you have many or non-rectangular clickable areas, you will use
 only a single EventBox covering the entire image, and then you
 must bust out the math and manually check whether the X/Y
 coordinates of the click fell into a clickable area.

The following recipe may be of use...  Does what is described above.

http://live.gnome.org/GTK2_2dPerl_2fRecipes#head-57cc99de5899b7363abb59f9c4978e4d35cb0fc6

Works on win32 too.

Regards,

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


Re: Using Gtk2::Helper-add_watch() or Glib::IO-add_watch

2005-08-23 Thread ofey aikon
 That's quite possible.  Win32 is infamous for its rather broken
 pipes.  One aspect of that is that pipes and network sockets behave
 differently wrt select(), mostly in that pipes tend to be broken
 while sockets work. 

Well, after spending a bit more time on this, I concluded that using
pipes on win32 is definitely impossible. So I decided to model the
functionality that I need using threads instead. I have re-written the
FAQ example to use threads instead of pipes. The inspiration of course
was from muppet's code at
http://mail.gnome.org/archives/gtk-perl-list/2003-November/msg00028.html

I am attaching the code. If no one sees issues with it, I can add this
as a recipe.

Regards,

_Ofey.


thread-file-reader.pl
Description: Binary data
___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-perl-list


Using Gtk2::Helper-add_watch() or Glib::IO-add_watch

2005-08-17 Thread ofey aikon
I am trying to build the functionality where my app issues an sql
statement and constantly updates a progressbar (or some other form of
feedback) while the sql is being executed by the database.

I know this has been discussed here before and one of the solutions
was to fork the sql execution into a separate thread using
Gtk2::Helper-add_watch() or Glib::IO-add_watch.

Unfortunately, the docs for these APIs didn't help me too much. Google
search didn't return much either. Any good samaritan here willing to
share some code snippets on how to achieve this ;) ?

I promise to add a recipe for this once I figure it out with a lil'
help from you folks.

Thanks,

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


Re: Using Gtk2::Helper-add_watch() or Glib::IO-add_watch

2005-08-17 Thread ofey aikon
  
 http://live.gnome.org/GTK2_2dPerl_2fFrequentlyAskedQuestions#head-3b88c68683fd189b09455a462d5e41669b7b1142

Thanks ! 

The FAQ however has some minor syntax errors. I found it being discussed here
http://mail.gnome.org/archives/gtk-perl-list/2005-March/msg00107.html

I tried the code that muppet has posted in that thread. Somehow that
quite doesn't work for me either . I'm on windoze XP. I am wondering
if it has anything to do with the fact that I'm on win32.

The behaviour I notice is as follows. My textview buffer doesn't get
anything written into it. My command prompt gets filled with
reading... read messages (with no sleep in between) and it seems to
be in an infinite loop. (no stopping after 9 seconds).

Am I missing something here ? Does this have to do with buffering
related to open(FILEHANDLE, EXPR).

Here is the code that I'm running

#!/usr/bin/perl -w
use strict;
use Gtk2 -init;
my $window = Gtk2::Window-new;
my $scroll = Gtk2::ScrolledWindow-new;
my $textview = Gtk2::TextView-new;
my $buffer = $textview-get_buffer;
$window-add ($scroll);
$scroll-add ($textview);
$window-show_all;
$window-signal_connect (destroy = sub { Gtk2-main_quit });

open(IN, q^perl -e '$|++; for $i (0..9) { $sum+= $i; print Line $i:
sum = $sum\n; sleep 1;}'|^)
or die Failed running perl subprocess\n;

Glib::IO-add_watch ( fileno(IN), ['in', 'hup'], sub {
my ($fileno, $condition) = @_;
if ($condition eq 'hup') {
warn done\n;
close IN;
return 0;  # uninstall
}
warn reading...\n;
my $line;
sysread IN, $line, 1024;
warn read $line\n;
$buffer-insert($buffer-get_end_iter, $line);
return 1;
});

Gtk2-main;

Thanks,

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


Re: set tooltip on treeview cell/row?

2005-07-25 Thread ofey aikon
On 7/24/05, ofey aikon [EMAIL PROTECTED] wrote:
   I want to display a tooltip if the mouse hovers over a treeview cell?
   any ideas? There is no treecolumn attribute to get a tooltip string from
   a column.
 
 There is no shortcut to achieve this, but I think its possible.

I don't think I described it clearly enough yesterday. Anyway, here is
some sample code to show what I mean. (attached)

Regards,

_Ofey.


popup-tree.pl
Description: Binary data
___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-perl-list


Re: widget for directory view

2005-07-24 Thread ofey aikon
On 7/24/05, Gábor Szabó [EMAIL PROTECTED] wrote:
 Now my main question is how do I code it if I cannot read the whole
 directory tree into memory at once.
 I'd like to have expanding mark [+] or whatever I get on every directory
 that has subdirectories. So when I show the first directory list I need to 
 read
 the next level as well but I cannot read more. (it might be very deep
 and reading
 each directory takes a long time, it is over the net)

 the tree. Is there an example of such code ?

Take a look at these two threads. 

http://mail.gnome.org/archives/gtk-perl-list/2005-June/msg00088.html
http://mail.gnome.org/archives/gtk-perl-list/2005-July/msg8.html

They are similar what you are looking for. 

Regards,

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


Re: set tooltip on treeview cell/row?

2005-07-24 Thread ofey aikon
  I want to display a tooltip if the mouse hovers over a treeview cell?
  any ideas? There is no treecolumn attribute to get a tooltip string from
  a column.

There is no shortcut to achieve this, but I think its possible.

# Trap the treeview motion-notify-event. This will tell you when 
# there is a mouse-over on a cell
$tree_view-signal_connect('motion-notify-event' =
  sub {
my ($self, $event) = @_;
my ($path, $column, $cell_x, $cell_y) = $self-get_path_at_pos
($event-x, $event-y);

# Now you know the path and the column to the cell.
# Lookup an external datastructure where you have already
# stored your tooltip text.
my $tooltip_text = $tooltip_hash-{$path}-{$column};

# Now we'll create a fake (or handmade) tooltip
# Please read
http://live.gnome.org/GTK2_2dPerl_2fRecipes#head-57cc99de5899b7363abb59f9c4978e4d35cb0fc6
# That recipe will show you how to build your own tooltip window

..
  }
}


I am doing something similar in Gtk2::Ex::TreeMaker
http://cvs.sourceforge.net/viewcvs.py/gtk2-perl-ex/Gtk2-Ex/TreeMaker/lib/Gtk2/Ex/TreeMaker.pm?rev=1.21view=log

My need was to change the cursor based on a setting called
'hyperlinked' which is populated at a cell level in the treeview. In
the code look at the section that says
   # If the cell is hyperlinked, then change the mouse pointer to 
something else
# This will give a visual feedback to the user that he should click
on the cell

Its a bit convoluted but it worked for me. I think it'll work for you too.

Regards,

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


Re: Working with an image from an http request

2005-06-23 Thread ofey aikon
Also documented here...

http://live.gnome.org/GTK2_2dPerl_2fRecipes#head-f684ca9e629855a45a836e171c2108c084253e67

Regards,

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


Re: any Perl bindings for gtk+extra?

2005-05-19 Thread ofey aikon
 Is there any Perl bindings to the GtkExtra Widget Set
 at  http://gtkextra.sourceforge.net/

AFAIK, No ! 

I am glad to see that finally they made a release (05/17/2005) after
such a long time (4 years).

Are you looking for any widget in particular ? Our own muppet has
created an alpha release for GtkSheet bindings.
http://mail.gnome.org/archives/gtk-perl-list/2005-February/msg00137.html
I am not aware of any other widget that is bound to gtk2-perl.

Regards,

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


Re: Gtk2::Ex::Datasheet::DBI-0.2 is out

2005-05-19 Thread ofey aikon
 I've just finished the 2nd version of Gtk2::Ex::Datasheet::DBI.

I guess this won't run quite on win32. 'cos you are using
Gtk2::Ex::Dialogs::(ChoosePreviewFile) which requires Gnome::VFS which
requires the gnome-vfs-2.0. And I don't know how/where to get that
library compiled for M$ machines. Aaah the win32 blues :(

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


Gtk2-Ex-Graph-GD-0.02 is not available

2005-05-18 Thread ofey aikon
Gtk2::Ex::Graph::GD is a simple wrapper around the good-looking
GD::Graph module. Wrapping using Gtk2 allows the GD::Graph object to
respond to events such as mouse movements.

The only additional functionality as of now is the mouse-over tooltip
on the bar graph.
Also, you can right-click and change the graph-type.

I'll add some basic stuff like legend-placements, legend-hiding,
tooltip on lines, support mixed graph types etc soon. I'll resist hard
to prevent over-engineering :)

The code is in sourceforge at
http://cvs.sourceforge.net/viewcvs.py/gtk2-perl-ex/Gtk2-Ex/Graph/GD/

You should also be able to pickup this release from CPAN
http://search.cpan.org/~ofeyaikon/ once its indexed (in a few hours).

Feedback is welcome.

Regards,

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


Re: Different graphing options

2005-05-16 Thread ofey aikon
 I am looking for excel-like charts for a business application.
 Therefore no immediate need for math functions etc. One functionality
 I would love is a 'tool-tip' that would pop-up with the value of the
 data-point when the user moves the mouse on a data point (like excel).
 Other than that, pretty much some bars, lines, pies etc.

I satisfied my requirements by writing a thin wrapper on GD::Graph.
Added the mouse-over tool-tip capability. I may add a right-click menu
to change the chart type from 'bars' to 'pie' etc.

I'm considering releasing it as Gtk2::Ex::Graph::GD. (assuming at some
point some one may want to write Gtk2::Ex::Graph::GnuPlot etc)

If no one has objections to that namespace, I'll get the code into
gtk2-perl-ex.sourceforge.net

Regards,

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


Re: Programatically edit on TreeView?

2005-05-13 Thread ofey aikon
 if i'd want to start editing after i click on a Button. How do i do that ?

Use gtk_tree_view_set_cursor (path, column, true) to set the cursor on
the cell that you need to edit.

Then activate the window that the treeview is in.
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: Programmatically popup a tooltip

2005-05-13 Thread ofey aikon
 Hrm.  Try gtk-app-devel-list.  Certainly someone there has solved to this
 problem already.

Googling gave me this thread... Not too helpful for me though.

http://mail.gnome.org/archives/gtk-app-devel-list/2004-May/msg00201.html
___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-perl-list


Re: Programmatically popup a tooltip

2005-05-13 Thread ofey aikon
 This doesn't seem very satisfactory, but despite a
 good amount of searching I can't see how widgets and tooltips
 interface with each other, so there seems not to be any easier
 approach.

I tried a ugly hack like this...

my $TOOLTIP = Gtk2::Window-new('toplevel');
$TOOLTIP-set_decorated(0);
$TOOLTIP-set_type_hint('GDK_WINDOW_TYPE_HINT_DOCK'); # I don't if
this is the best hint
$TOOLTIP-add(Gtk2::Label-new('hello world'));
$TOOLTIP-set_default_size(100, 10);
$TOOLTIP-set_position('mouse');
$TOOLTIP-modify_bg ('normal', Gtk2::Gdk::Color-parse('yellow'));


my $image = Gtk2::Image-new_from_pixbuf (loaded from a png)
my $ebox = Gtk2::EventBox-new;
$ebox-add ($image);
$ebox-add_events (['pointer-motion-mask', 'pointer-motion-hint-mask']);
$ebox-signal_connect ('motion-notify-event' = 
sub {
my ($widget, $event) = @_;
my ($x, $y) = ($event-x, $event-y);
if ($x  10  $x  100  $y  10  $y  100) {
$TOOLTIP-show_all;
} else {
$TOOLTIP-hide;
}
}
);


Two things that I absolutely hate about this are.

1. I don't like the location where the pop-up shows up. ('mouse') . I
wish that could be better.

2. Since this is another window altogether, it'll show up on my win32
taskbar (I guess same for other OS too). That's ugly for such an
insignificant tooltip popup window :)

Regards,

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


Re: Different graphing options

2005-05-09 Thread ofey aikon
Well, that was lot of information and it took me a while to digest it all.

 Narrow the scope a bit; what's more important?

I am looking for excel-like charts for a business application.
Therefore no immediate need for math functions etc. One functionality
I would love is a 'tool-tip' that would pop-up with the value of the
data-point when the user moves the mouse on a data point (like excel).
Other than that, pretty much some bars, lines, pies etc.

Speed is definitely a concern 'cos I want to generate the graphs
dynamically based on the user selection of data-points (data selection
will be done using TreeView or something). Quality is not that big a
concern b'cos my idea of the graph is to just to give a quick visual
cue to the user.

 Just for the record, gnuplot works very well on win32 (IMO, anyway)

Yes ! Gnuplot indeed seems to work fine on win32. I've been playing
with it for a couple of days. I haven't done any heavy lifting yet but
so far it seems pretty good.

 Chart::Graph::Gnuplot (part of Chart::Graph)

I downloaded this module and played with it. Needs some polishing to
run on win32. I looked at the source code and my guess is that it can
be easily patched to work on win32.

 it looks like the gtkextra-2.0 API is a little more binding-friendly,
 but i'm a little unnerved that they don't appear to have released out
 of cvs.

On a slight offnote, I've seen that they've recently patched the
gtksheet. I guess development is not as dead as I thought to be in
that part of the world. But still their release cycle seems mysterious
to me too.

 There's also Ploticus 

I'm yet to play with Ploticus. But it may actually fit my needs from
what I read on their site. I guess Grace and jpgraph may meet similar
needs too. If I go that route, I just have to decide which one is
cleaner to wrap in perl and pipe to Gtk2.

To summarize, I haven't yet decided which path to take. 

Regards,

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


Re: L10n in Gtk2-perl with Locale::Maketext::Lexicon

2005-05-07 Thread ofey aikon
 we should put it somewhere in the wiki:

You can add it to the 'recipes' page.
http://live.gnome.org/GTK2_2dPerl_2fRecipes

The general pattern I've been following is to write a 'problem' and
'solution' section.  Then I add relevant portions of the code in the
'solution' section with explanations. And then link the whole thing to
the source archived email thread which contains the entire code.

Regards,

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


Different graphing options

2005-05-05 Thread ofey aikon
I want to do some pretty graphs in Gtk2 using my dataset. I guess my
options are the following.

1. Wrap gnuplot.
 - Rich in functionality. May be too heavy to wrap. Don't know how
well it works on win32.

2. Use gtkplot in the gtkextra+ project.
 - No perl bindings AFAIK.

3. Stream an image using GD::Graph.
 - Works on win32 too. 

I like option 3 because I think its pretty easy to achieve. Any
thoughts / experiences on how others in here may have solved the
problem ?

Regards,

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


Re: How about a 'recipes' page in the wiki ?

2005-04-27 Thread ofey aikon
  Or ::Cookbook, as a collection of recipes would customarily be
  called. :-)
 
 actually i wouldn't necessarily expect the recipes/cookbook style stuff to be
 runnable scripts anyway. they should be stripped down to only the relevant
 portion of code with lots of discussion and comments. if someone out there has

How about collecting all examples into a package called
Gtk2::Ex::Cookbook. But still maintain the wiki with relevant snippets
of code but point to the actual working examples in the package (/cvs)

My rationale is that typically beginners (from my own experience)
prefer functioning code than snippets/pseudo-code just 'cos its easy
to play around with working code than snippets.

At the sametime, the wiki will serve as a reference point or entry
point and its easy to find through google.

Just my 2 cents :)

Regards,

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


find-as-u-type on a simple::list

2005-04-27 Thread ofey aikon
Uh! I couldn't resist sending this one out :) My own little
'find-as-you-type' searchbox for a Gtk2::Ex::Simple::List [ Type
something in the textbox on top ]

If a perl wizard here with plenty of free time in hand is interested
in optimizing it just for fun, I sure will enjoy the learning
experience :)

Enjoy,

Ofey


find-as-u-type.pl
Description: Binary data
___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-perl-list


Re: How about a 'recipes' page in the wiki ?

2005-04-26 Thread ofey aikon
 My snippets collection is organized into catagories like:
 font/fun/  glade/  objects/
 Gtk1/  gnome/  packing/  progressbar/

My original intention was to maintain stuff in the wiki. Easy to
update and easy to enter new examples. But looks like you have a whole
lotta stuff in your collection, may be maintaining them as a package
would be better.

There is already an examples folder in the main project repository.
One of the experts here will have to answer whether adding to that
will be a good idea or not.

If that is an issue, then the next option is to use Gabor's subversion
:) or may be something in sourceforge.

Whatever it may be, it'll be a great idea to get your collection out
in the open.

Regards,

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


Re: Installation problems on windows

2005-04-24 Thread ofey aikon
I want to clean up the Win32 installation instructions from the wiki
FAQ. I assume the latest instructions are as follows.

--
For ActiveState users

  * I assume you already have ActiveState Perl installed on your system. 
  If not, download and install ActiveState Perl from
http://activestate.com/Products/ActivePerl/

  * Next you need to install the GTK+ 2.x.x runtime environment. The
latest version can be downloaded from
http://gimp-win.sourceforge.net/stable.html

  * Ensure that the INSTALL_PATH\GTK\2.0\bin directory is in your
PATH after this installation.
  
  * Next you need to install the Win32 binary packages for gtk2-perl.
Download and install the latest version of Gtk2.ppd and Glib.ppd from
http://gtk2-perl.sourceforge.net/win32/ppm/
  (Another way to install these ppds is as follows
  C:\Temp ppm install http://gtk2-perl.sourceforge.net/win32/ppm/Gtk2.ppd
  C:\Temp ppm install http://gtk2-perl.sourceforge.net/win32/ppm/Glib.ppd
  )
  
 Your system should be ready to roll !
--
___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-perl-list


Re: Problems with GtkPaned

2005-04-01 Thread ofey aikon
   3.) This one is for Win32 only, probably gtk bug:
 When dragging the GtkPaned handle to resize panes, screen where handle
   passed is not redrawn (ends garbled).
  The same code works fine on Linux (FC3).
 
  This works for me. Are you using the windows-alike theme engine? I've
  had some drawing problems with that in the past. Try using the default
  theme and see if the problem goes.
 
 I've tried switching theme to all other types, but the garbage on the screen
 still appears (Win32 only).

I have the same issue on Win32. You may be encountering the bug
http://bugzilla.gnome.org/show_bug.cgi?id=144269

I don't know anything more about the status of the bug itself other
than what is shown in bugzilla.

Regards,

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


UI for scheduling events (appointments)

2005-03-16 Thread ofey aikon
One of the apps that I am writing requires a UI to specify a recurring
set of 'events' (events in the calendar sense). Like a meeting
appointment for example, on all mondays and thursdays for the next 3
months. Kinda like Evolution/Outlook meeting schedule.

Ripping anything from Evolution may be too heavy weight for me. So I
am thinking of writing a gtk2-perl widget to meet this need. I googled
around a bit and finally decided to choose Flavio's
DateTime::Event::ICal as the backend spec. So my aim is now to write a
UI for the DateTime::Event::ICal module.

Since there is quite a bit of UI design involved, I am considering
using glade and Gtk2::GladeXML. But I am wondering what is a clean
approach to package the xml file in the module. For example, if I want
to generate a cpan dist, is it normal to package a glade xml file
along ? Or would you recommend writing widget packing perl code
instead of gladexml ?

Here is a sample (hollow) screenshot from my widget
http://www.flickr.com/photos/[EMAIL PROTECTED]/6709345/

I am considering the name Gtk2::Ex::ICal for this module.

Design suggestions / naming suggestions are welcome. If there is prior
art that I could use, that'll be great too.

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


Gtk2::Ex::RecordsFilter - 0.03

2005-03-01 Thread ofey aikon
Gtk2::Ex::RecordsFilter is a high level widget to browse reasonably
large amounts of relational data and select a subset of records. This
widget is inspired by the song browser of iTunes/Rhythmbox. I believe
that this widget can be used in other areas too. For example, in a
business application. (May be alongside the Gtk2::Ex::TreeMaker.)

The source code is available from cpan.
http://search.cpan.org/~ofeyaikon/Gtk2-Ex-RecordsFilter-0.03/

I have added an example to the examples folder. The non-trivial case
is one in which a child node has two parent nodes. Without clicking
anywhere else, click on the Knockin' on heaven's door in the 'Song'
window and then add that to selection to see what I mean.

Also browsable at sourceforge
http://cvs.sourceforge.net/viewcvs.py/gtk2-perl-ex/Gtk2-Ex/RecordsFilter/
(Or using anonymous checkout. I'm having sourceforge upload issues and
can't create a release tar.gz :( )

Details on the widget including a screenshot can be found at:
http://ofey.blogspot.com/2005/02/gtk2exrecordsfilter.html
---
Changes in version 0.03
---
* Fixed packaging issues
* Added Column Headers
* Modified the dataset to use a songlist instead
* Removed horizontal scrollers. Use HPaned instead. Makes it look
better with long strings for records.


If you have comments regarding the usability of the widget etc, please
keep them coming :)

Thanks,

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


Gtk2::Ex::TreeMaker - 0.04 is now available !

2005-02-01 Thread ofey aikon
The version 0.04 can be downloaded from
http://sourceforge.net/project/showfiles.php?group_id=121463package_id=142803

INTRODUCTION:
Gtk2::Ex::TreeMaker is my humble attempt to create a generic high-level widget 
using the
Gtk2::TreeView. This widget was written with typical business applications in 
mind.

Typically in business applications, users like to view data in a spreadsheet 
kind of display.
(Columns represent timeline(typically) and rows represent measures like
sales/inventory/blah/blah). But, the data itself may be stored internally as 
relational records.

This widget will accept a relational feed of records and automatically convert 
it into a
hierarchical treeview using the Gtk2::TreeView. The process involves invoking 
some recursive
functions to build a TreeModel and populate it. Also, since the spreadsheet 
itself can be rather
long horizontally, the widget also has a IFreezePane capability.

For example, here is some sales info (stored internally in a relational 
database)
   -
   Region, City, Product, Date, Quantity
   -
   Texas, Dallas, Fruits, Dec-2003, 300
   Texas, Dallas, Veggies, Jan-2004, 120
   Texas, Austin, Fruits, Nov-2003, 310
   Texas, Austin, Veggies, Feb-2004, 20
   -

This widget can present the same data in a hierarchical(/spreadsheet) kinda 
display as shown
below.
   --
   Prod / Date   Nov-2003  Dec-2003  Jan-2004  Feb-2004 
   --
   Texas
  Dallas
Fruits  300 
Veggies   120 
  Austin
Fruits310
Veggies 20
   --
   
CHANGES:
 - This is the first serious release.
 - Resolved packaging issues. (META.yml, MANIFEST)
 - Now you can specify attributes to each record. Such as editable, underline 
etc. (Check out the
examples folder)
 
TODO:
 - Build the tree using a custom implementation of Gtk2::TreeStore (perhaps!)

Any feedback will be wonderful :)

Thanks,

_Ofey.



__ 
Do you Yahoo!? 
Yahoo! Mail - Helps protect you from nasty viruses. 
http://promotions.yahoo.com/new_mail
___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-perl-list


win32 binaries for GTK+

2004-06-05 Thread ofey aikon
Where can I download win32 binaries for GTK+ ? I had
downloaded one of the earlier versions from
http://www.dropline.net/gtk/ .But in that site, Todd
now suggests to download from Tor's site instead, at
http://www.gimp.org/win32 . I have been trying to
access the second link above for the past few days
unsuccesfully.
Is this the correct link for the win32 binaries ?

Thanks,

_ofey




__
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list