Re: GTK+ 2.0/3.0 Windows runtimes

2018-10-23 Thread Dov Grobgeld via gtk-app-devel-list
John, I am maintaining several gtk2 applications for windows that I'm cross compiling from Linux. I'm using Fedora for the cross compilation and the way I'm working is as follows: - Install the necessary mingw64 packages through dnf - Install mingw32-nsis for the generation of a windows

Re: Combined search and combobox?

2018-07-28 Thread Dov Grobgeld via gtk-devel-list
Indeed, you were right regarding gtk_comb_box_set_entry_text_column(). For the record, below find a translation into C of your python program. Here are some enhancements that I thought of, though I highly doubt that they will be adapted because they are too specialized. - Turn it into a

Re: Combined search and combobox?

2018-07-27 Thread Dov Grobgeld via gtk-devel-list
() with gtk_combo_box_new_with_entry(). I'm still trying to figure out what went wrong. Regards, Dov On Fri, Jul 27, 2018 at 2:25 PM Reuben Rissler wrote: > On 07/27/2018 12:15 AM, Dov Grobgeld wrote: > > Thanks. This is exactly what I was looking for! I didn't realize that a >

Re: Combined search and combobox?

2018-07-26 Thread Dov Grobgeld via gtk-devel-list
. Is there a GNOME guide line about this? Regards, Dov On Thu, Jul 26, 2018 at 8:38 PM Reuben Rissler wrote: > On 07/26/2018 07:36 AM, Dov Grobgeld via gtk-devel-list wrote: > > Is there a widget that combines a searchbox with a combobox? > > A use case would be to search for a fon

Combined search and combobox?

2018-07-26 Thread Dov Grobgeld via gtk-devel-list
Is there a widget that combines a searchbox with a combobox? A use case would be to search for a fontname in a very long font list. I would like to be able to type a search string, and have the opened combobox display only entries that match the typed string. A plus would be if it is possible to

Re: IDE to develop app with GTK3 on windows using MSYS2

2018-05-07 Thread Dov Grobgeld
Why don't you cross compile from Linux to Windows? I have for years maintained several gtk based applications, including the building of installers for windows through make-nsis, and done everything from Linux. Regards, Dov On Mon, May 7, 2018 at 10:30 AM, arkkimede wrote:

Re: pango-view --backend=cairo doesn't use fontconfig - why not?

2018-04-25 Thread Dov Grobgeld
I don't know what you are trying to achieve, but perhaps https://github.com/dov/paps can be of help? It uses both cairo, pango, and fontconfig (since that is what pango uses by default). Regards, Dov On Wed, Apr 25, 2018 at 5:27 PM, wrote: > > pango-view --backend=cairo

Re: double_buffered and scrolled_window

2018-04-16 Thread Dov Grobgeld
, 2018 at 12:41 PM, Emmanuele Bassi <eba...@gmail.com> wrote: > On 16 April 2018 at 10:19, Dov Grobgeld <dov.grobg...@gmail.com> wrote: > >> Hi all, >> >> After lots of years I finally got around to porting my widget >> GtkImageViewer to gtk3. After doing lots

Fwd: double_buffered and scrolled_window

2018-04-16 Thread Dov Grobgeld
Hi all, After lots of years I finally got around to porting my widget GtkImageViewer to gtk3. After doing lots of reading of man pages, did I realize that i can turn off double buffering. I did it, and everything worked fine, except for one artefact. Once I turned it off, the scrolled bars of the

double_buffered and scrolled_window

2018-04-07 Thread Dov Grobgeld
Hi all, After lots of years I finally got around to porting my widget GtkImageViewer to gtk3. After doing lots of reading of man pages, did I realize that i can turn off double buffering. I did it, and everything worked fine, except for one artefact. Once I turned it off, the scrolled bars of the

Re: Scaling an image with Gtk2::Gdk::Pixbuf->scale

2017-10-26 Thread Dov Grobgeld
Try creating a new (empty) image of the required size and then use cairo to fill it with the desired contents. The following link may help you (though it is in C and not perl, but the API is the same): https://gist.github.com/bert/985903 Regards, Dov On Thu, Oct 26, 2017 at 11:18 AM, Les Trol

Re: Pango pipe stdin and stdout

2017-06-04 Thread Dov Grobgeld
Please check out paps which was written for that exact purpose. It can be installed through dnf on Fedora/Centos and probably by apt-get on Debian (like) systems. You can find the sources in my github repo at: https://github.com/dov/paps Regards, Dov On Sat, Jun 3, 2017 at 4:43 PM, Adam Dyson

Re: Re-drawing GtkDrawingArea surface on motion-notify-event

2017-03-20 Thread Dov Grobgeld
The key is to not draw directly, but to invalidate one or more rectangles needed to for changing the image from the old to the new one. I worked on this problem some years ago and I think my solution is very relevant to your question. See the gtk3 branch at: https://github.com/dov/dovtk-lasso .

Re: GLib Library License

2016-07-26 Thread Dov Grobgeld
icate, validating a license or if > you install license keys to validate against, like Docs to Go use a second > apk Docs to Go Premium Key to enable paid legitimate applications to run. > > El 26 jul. 2016 12:35 a. m., "Dov Grobgeld" <dov.grobg...@gmail.com> > escribió:

Re: GLib Library License

2016-07-25 Thread Dov Grobgeld
As is explained in the article, a package rebuilt by the user will not be signed with the same digital key as the original play store distributed package. Due to the isolation of packages by android, this user built package will not have access the same areas on the file system as the original

Re: GLib Library License

2016-07-24 Thread Dov Grobgeld
Here is a blog entry discussing the problem of using glib on android that might be relevant: http://blog.xebia.com/the-lgpl-on-android/ On Sun, Jul 24, 2016 at 9:48 AM, pelzflorian (Florian Pelz) < pelzflor...@pelzflorian.de> wrote: > On 07/24/2016 08:26 AM, pelzflorian (Florian Pelz)

Re: GLib Library License

2016-07-19 Thread Dov Grobgeld
GLib is licensed under LGPL which allows linking with non-LGPL code. But you still have to provide access for the end user to update the LGPL code that your application uses. In theory this means either providing your proprietary code as object files or in practice, linking to the LGPL code

Re: Re[4]: Compiling for Windows [Was: argv revisited]

2016-05-05 Thread Dov Grobgeld
Note that if you are using fedora (and possibly other Linux distributions) it comes with lots of win32 packages precompiled. E.g. all you need to do to get gtk2 and its dependencies is to do: dnf install mingw32-gtk2 You can then compile your gtk programs for windows through cross compilation

Re: Compiling for Windows [Was: argv revisited]

2016-05-03 Thread Dov Grobgeld
Another equivalent scons-based way of compiling for windows with gcc is shown in my program giv. See: https://github.com/dov/giv/blob/master/SConstruct SCons uses the Sconstruct files to do the cross-compilation and also calls out to nsis to create a windows installer. The complete gtk run time

Pango modules Hebrew heurisics

2015-08-29 Thread Dov Grobgeld
While playing around with pango rendering did I notice a regression in the placement of Hebrew diacritics marks for fonts that lack a GPOS table. In my old Hebrew pango module, I had added some heuristics for how to do such placement, and the result was quite acceptable for most fonts. From what I

New version of paps with cairo backend

2015-08-17 Thread Dov Grobgeld
After more than a decade I have finally converted my text to postscript converter paps, to use cairo for its postscript rendering. In addition I have added a pdf and svg output option. Please check out the new version and let me know of any problems. The new version is available at:

Re: Directional Images

2013-10-16 Thread Dov Grobgeld
No, I don't think it is universally reasonable. Because in general an icon may have a style that is broken when the image is flipped. Imagine e.g. if the buttons in some style contains arrows that were drawn with an elliptical pen slanted at 45 degrees to the right. In such a case the left and the

Setting styles in Gtk 3.0

2013-10-10 Thread Dov Grobgeld
Hi, Has something changed with the setting of styles in Gtk3, or is there some environment setting that inhibits the setting of the style? Consider the following python program: #!/usr/bin/python from gi.repository import Gtk Gtk.rc_parse_string( style normal { font_name =serif 30 } widget

Re: Setting styles in Gtk 3.0

2013-10-10 Thread Dov Grobgeld
. ​Regards, Dov ​ On Thu, Oct 10, 2013 at 4:16 PM, Paul Davis p...@linuxaudiosystems.comwrote: On Thu, Oct 10, 2013 at 4:05 AM, Dov Grobgeld dov.grobg...@gmail.comwrote: Hi, Has something changed with the setting of styles in Gtk3, or is there some environment setting that inhibits the setting

Re: Setting styles in Gtk 3.0

2013-10-10 Thread Dov Grobgeld
Actually I wanted to use this for changing the rendering of a specific widget based on certain events, and not for theming. E.g. if you want to create a quick and dirty simulation of a traffic light without using images or cairo. You can have e.g. three EventBoxes for the three traffic lights and

Re: Output Widgets

2013-10-07 Thread Dov Grobgeld
Please define what you mean with an output widget. All widgets are output widgets in a sense, but e.g. GtkLabel is an output label for text messages (and images). On Mon, Oct 7, 2013 at 12:44 PM, Mahesh Chaudhari mahesh.chaudh...@ymail.com wrote: Are there any output widgets available with

Re: Mouse events on a Cairo Context

2013-07-01 Thread Dov Grobgeld
There is another solution that I have used extensively, which is to draw the cairo commands twice. Once for the actual drawing, and once again in an offline image (called label image), with the following differences: 1. Use solid colors corresponding to labels of the different graphical

Re: Fulscreen mode

2013-06-16 Thread Dov Grobgeld
You just need to use gtk_widget_hide() on the widget and it and its child widgets will not be shown. On Sun, Jun 16, 2013 at 4:28 AM, John Coppens j...@jcoppens.com wrote: Hi... I created a program with three elements in an HBox (gtk2): two treeviews and a GtkGlExt drawing area. I'd like to

Ported the dovtk-lasso example to gtk3

2013-05-03 Thread Dov Grobgeld
W ​ith a few years delay, I finally got around to porting the dovtk-lasso example to gtk3. It is available from: ​https://github.com/dov/dovtk-lasso/tree/gtk3 ​The included test-dovtk-lasso program draws some graphics and then allows creating and moving a semi-transparent ​caliper measuring tool

Copy full path when hovering over a file?

2012-07-02 Thread Dov Grobgeld
Is there any keybinding that allows copying into the clip-board the full path of a filename that you hover over in the file chooser dialog? E.g. when looking at the Recent file menu, there is a tooltip popup of the full path of a file. Is it possible to copy the contents of this tooltip so that

Re: future of development for the desktop

2012-05-25 Thread Dov Grobgeld
There is nothing in the article that sais that you cannot use another toolchain to compile programs for Windows 8, like gcc, but I'm skeptical whether that will still be possible. I'm used to compiling my free gtk+ software for windows XP, and Windows7 with a cross compiler under Linux. Will that

Re: pango or any other way to format text

2012-05-14 Thread Dov Grobgeld
See http://developer.gnome.org/pango/stable/PangoMarkupFormat.html for the syntax for subscripts and superscripts. Regards, Dov On Mon, May 14, 2012 at 3:38 PM, David Nečas y...@physics.muni.cz wrote: On Mon, May 14, 2012 at 08:20:26PM +0800, Rudra Banerjee wrote: Can anybody please take

Re: GtkButton bg color

2012-04-30 Thread Dov Grobgeld
The following, though a bit old and referring to perl, might still help: http://gtk2-perl.sourceforge.net/doc/yapc-2004-perl-gtk2/slides.html Regards, Dov On Sun, Apr 29, 2012 at 20:41, Steve iteratio...@gmail.com wrote: I'm using linux. I've tried dozens of different methods and a few

Re: GtkTextView and bidi text

2012-04-24 Thread Dov Grobgeld
. But it is much better than the being blindfolded. ;-) Regards, Dov On Tue, Apr 24, 2012 at 23:36, Ferdinand Ramirez ramirez.ferdin...@yahoo.com wrote: --- On Mon, 4/23/12, Dov Grobgeld dov.grobg...@gmail.com wrote: Lots of years ago we spoke about having a direction override as a paragraph attribute

Re: GtkTextView and bidi text

2012-04-23 Thread Dov Grobgeld
Indeed there is no higher level override determine the text direction. You have to change the buffer contents to get what you want. The easiest way of doing this is by inserting the character zero-width character LRM (U+200E) before your first RTL character. Lots of years ago we spoke about

Re: porting Xlib/Motif apps to GTK+

2012-02-29 Thread Dov Grobgeld
On Wed, Feb 29, 2012 at 01:17, Roger Davis r...@soest.hawaii.edu wrote: [stuff deleted] Does Cairo have a way of mimicking an X11 XOR-op GC for doing low-overhead ephemeral drawing ops of rubberband-lines, etc.? I have over the years been intrigued of how to do flicker free rubberband

Re: Goo::Canvas versus Gnome2::Canvas

2012-02-16 Thread Dov Grobgeld
I've used both from perl, and I would say, use Goo::Canvas for a few reasons. One, is that it has less dependencies, GnomeCanvas depends, as it name says, on some Gnome libraries, where as Goo::Canvas does not. A second difference is that the Cairo support of Goo::Canvas is superior to the

Re: Announce: glib-jsonrpc

2012-01-04 Thread Dov Grobgeld
Thanks for your comments. Though I am agreeing with most of them, I am unlikely to implement them on my own, as I am mostly interested in remote controlling my own applications in situations where I am in control of both the server and the client. (I have just implemented such control in my image

Announce: glib-jsonrpc

2011-12-26 Thread Dov Grobgeld
I created jsonrpc client/server (http://json-rpc.org/) library through glib/gio for remote controlling my application. It is available at: https://github.com/dov/glib-jsonrpc Comments and contributions are welcome. Regards, Dov ___ gtk-devel-list

Re: Announce: glib-jsonrpc

2011-12-26 Thread Dov Grobgeld
to school. It's not up on a public git repo right now but it's a tad more feature complete than yours. I was working on supporting all encodings when I last left off. On Tue, 2011-12-27 at 06:52 +0200, Dov Grobgeld wrote: I created jsonrpc client/server (http://json-rpc.org/) library through glib

Re: Announce: glib-jsonrpc

2011-12-26 Thread Dov Grobgeld
On Tue, 2011-12-27 at 09:30 +0200, Dov Grobgeld wrote: It would be nice to compare and perhaps merge the two projects. Any chance of you putting it up on a git repo? Regarding async commands, my glib server does support it through the glib_jsonrcp_register_async_command(). There is an example

Re: gio, GSocketService, and connection hangup

2011-11-21 Thread Dov Grobgeld
connections arriving from a a non loop-back host. Dov On Sun, Nov 20, 2011 at 20:45, Dov Grobgeld dov.grobg...@gmail.com wrote: I'm working on a jsonrpc server interface for glib and gio. I based my interaction with gio on the gio/tests/echo-server.c example and everything is working fine as long

gio, GSocketService, and connection hangup

2011-11-20 Thread Dov Grobgeld
I'm working on a jsonrpc server interface for glib and gio. I based my interaction with gio on the gio/tests/echo-server.c example and everything is working fine as long as the handler() - the function connected to by the run signal - is sending back the response to client. But I got stuck on how

Re: Simple Html-View widget

2011-09-11 Thread Dov Grobgeld
Just use gtk_label_set_markup(). Regards, Dov On Sat, Sep 10, 2011 at 20:35, Craig craigbakal...@verizon.net wrote: Hi, I am not expert on this issue, but isn't Pango the way to go. I think you should look up the Pango functions or how gtk deals with the Pango thing. Craig Bakalian

Re: preventing wrapping on certain words only

2011-05-09 Thread Dov Grobgeld
Couldn't this be done by changing all spaces to NO-BREAK SPACE (U+00A0) in the section that should not be wrapped? But perhaps, you still have the problem of hyphenation. Does pango honor ZERO WIDTH NO-BREAK SPACE (U+FEFF)? Could you sandwich that between all characters of the section to prevent

Re: Please don't drop support for Curve

2011-05-04 Thread Dov Grobgeld
I suggest that you learn how to create your own widget. A widget like GtkCurve is very easy to develop by subclassing one of the canvas widgets, e.g. GooCanvas. Or do it directly through Cairo on a GtkDrawingArea. This is described here: http://live.gnome.org/Vala/CustomWidgetSamples Regards,

Re: GTK+INSTALLATION IN WINDOWS

2011-05-01 Thread Dov Grobgeld
One way of doing this is as follows: - Cross compile for windows from Linux. E.g. on Fedora, this may be done by installing the mingw32* packages. - Install the cross compiled makensis package to create an installer for Windows under Linux. - Run the installer under Windows

Re: Program Files folder

2011-04-21 Thread Dov Grobgeld
There is no such thing as default folder under Linux/Unix. The user might want to install an application in her home directory, or in /opt, or in /usr/bin depending on permissions or the visibility of the application. Perhaps you meant to ask if it is possible to know where the application was run

Re: Loading postscript file

2010-12-26 Thread Dov Grobgeld
As far as I know (but perhaps someone else knows better) the only freely available postscript interpreter is ghostscript (which is used by gv). Ghostscript is distributed under the GPL license which prevents Gtk, which is distributed under the LGPL, to depend on it. The easiest way round this is

Re: g_signal_new

2010-12-01 Thread Dov Grobgeld
Hi Emmanual, (Please ask questions like this to the gtk-list and not only directly to me. I'm taking the freedom to CC the list for my reply. Hope it's ok with you.) Here are five different ways that you use to pass more than one value in a signal callback. 1. Use g_object_set_data() to

Re: Visual Keyboard

2010-11-25 Thread Dov Grobgeld
Would the following work? - Create a keyboard widget with GtkButtons representing the normal keys and GtkToggleButtons for Shift, Control, Alt, etc. - Overwrite the button-press-event of each GtkButton to prevent button press events with from stealing the keyboard focus. - In the

Re: GTK Error handling..

2010-11-24 Thread Dov Grobgeld
If all you want is a popup, then you might as well create a new process instead of a new thread. There is no advantage of using a thread as it does not seem like you want to pass any info between the window and the monitoring loop. Further, the way you described it, if more than one event occurs,

Re: large performance difference between gtktextview and gtksourceview

2010-11-05 Thread Dov Grobgeld
Last time I checked (which was a long time ago) gtksourceview did not support BiDi and possibly other i18n issues. But this per se is no explanation for it being slower. And yes, performance can always be improved. Regards, Dov On Thu, Nov 4, 2010 at 18:12, Olivier Sessink

Re: gtk 2 or 3

2010-11-04 Thread Dov Grobgeld
For an example of how to do it without having a secondary thread do any gtk commands, see my example program in: http://www.mail-archive.com/gtk-app-devel-list@gnome.org/msg14213.html Basically the work thread, that is taking a long time doing its thing, requests the gui thread to update the GUI

Re: ImageView

2010-11-03 Thread Dov Grobgeld
I solved the same problem by writing my own image viewer widget. See: http://giv.sourceforge.net/gtk-image-viewer/ It provides the functions: void gtk_image_viewer_canv_coord_to_img_coord(GtkImageViewer * self, double cx,

Re: Indic scripts are talking more vertical space than latin character

2010-10-26 Thread Dov Grobgeld
You don't have to use the output of PangoLayout as is, but you can iterate over it a line at a time and then overwrite the line spacing. Dov On Tue, Oct 26, 2010 at 16:04, shiplu shiplu@gmail.com wrote: So you suggest to find a font which is designed well? I need a set of fonts. I'll give

Re: Creating own stock image library

2010-10-10 Thread Dov Grobgeld
I use gdk-pixbuf-csource in my build system to generate c-files from my icons that I then insert into the source list of programs. Let me know if you need more examples. Regards, Dov On Sun, Oct 10, 2010 at 17:46, Arne Pagel a...@pagelnet.de wrote: Hello, I created some special icons for my

Re: Spinning the main loop

2010-09-15 Thread Dov Grobgeld
For an example of how to use an additional thread and have it communicate with the mainloop thread see my example at: http://www.mail-archive.com/gtk-app-devel-l...@gnome.org/msg14213.html This is the correct way of doing anything time consuming without interrupting the gui flow. There is no

Re: Spinning the main loop

2010-09-15 Thread Dov Grobgeld
produced by it events during my heavy calculations in the first place ? Thanks, Sergei. --- On Wed, 9/15/10, Dov Grobgeld dov.grobg...@gmail.com wrote: From: Dov Grobgeld dov.grobg...@gmail.com Subject: Re: Spinning the main loop To: Sergei Steshenko sergst...@yahoo.com Cc: gtk-perl

Re: Spinning the main loop

2010-09-15 Thread Dov Grobgeld
/10, Dov Grobgeld dov.grobg...@gmail.com wrote: From: Dov Grobgeld dov.grobg...@gmail.com Subject: Re: Spinning the main loop To: Sergei Steshenko sergst...@yahoo.com Cc: gtk-perl-list@gnome.org, Emmanuele Bassi eba...@gmail.com Date: Wednesday, September 15, 2010, 7:13 AM Here are a couple

Re: Linking the buttons to gtk app

2010-08-29 Thread Dov Grobgeld
I might be missing something but it seems like this is a Linux kernel question and doesn't have much to do with Gtk. Unless I'm missing something you need to write a device driver for your kernel than makes your hardware buttons appear as keyboard key-presses, e.g. F1-F10, and then use standard

Re: porting gdk - cairo

2010-08-20 Thread Dov Grobgeld
. //== // test-gtk-lasso.c - This example is in the public domain // // Dov Grobgeld dov.grobg...@gmail.com // Mon Aug 16 09:09:56 2010 //-- #include stdlib.h #include gtk

Re: cairo drawing commands to gdk_invalidate_region

2010-08-18 Thread Dov Grobgeld
or the actual drawing. This can be used to avoid drawing gradients and other expensive drawing operations during mask creation. In any case, thanks for your input. Dov On Wed, Aug 18, 2010 at 14:47, Paul Davis p...@linuxaudiosystems.comwrote: On Tue, Aug 17, 2010 at 4:22 PM, Dov Grobgeld dov.grobg

Re: porting gdk - cairo

2010-08-17 Thread Dov Grobgeld
I don't know if you noticed it in another thread, but I created a working example of the approach that I described in my earlier email. See: http://github.com/dov/dovtk-lasso See the program test-dovtk-lasso.c for an example of how to use it. Please let me know if you need more explanations.

Re: Signal handling questions

2010-08-17 Thread Dov Grobgeld
); do_my_overlay_drawing (widget); return TRUE; } else return FALSE; On Tue, Aug 17, 2010 at 1:51 AM, Dov Grobgeld dov.grobg...@gmail.com wrote: While playing around with a general system for doing polygon overlays (e.g. for rectangle or line selection) I got stuck on the following

cairo drawing commands to gdk_invalidate_region

2010-08-17 Thread Dov Grobgeld
Assume I have a routine: int draw(cairo_t *cr) used to draw an overlay in a GdkWindow. In order to minimize redrawing, I would like to get the minimal (up to some accuracy to be determined) set of GdkRegion's that encompasses all the drawing of draw(). I thought of doing this by creating a

Re: cairo drawing commands to gdk_invalidate_region

2010-08-17 Thread Dov Grobgeld
for each motion event is too slow. Dov On Tue, Aug 17, 2010 at 11:14, Claudio Saavedra csaave...@gnome.org wrote: On Tue, 2010-08-17 at 10:35 +0300, Dov Grobgeld wrote: Assume I have a routine: int draw(cairo_t *cr) used to draw an overlay in a GdkWindow. In order to minimize

Re: Signal handling questions

2010-08-17 Thread Dov Grobgeld
an earlier call. I will try using a generic handler and will see if it works better. On Tue, Aug 17, 2010 at 10:04, Dov Grobgeld dov.grobg...@gmail.com wrote: Great! I just had to block myself when calling the other expose handler as follows: : g_signal_handler_block(widget, selfp

Re: cairo drawing commands to gdk_invalidate_region

2010-08-17 Thread Dov Grobgeld
How is update() supposed to know what region to invalidate? By a list of GdkRegions as a parameters? The dual functionality of draw is just a way of automizing this. Dov On Tue, Aug 17, 2010 at 18:50, Paul Davis p...@linuxaudiosystems.comwrote: On Tue, Aug 17, 2010 at 9:11 AM, Dov Grobgeld

Re: cairo drawing commands to gdk_invalidate_region

2010-08-17 Thread Dov Grobgeld
-17 at 10:35 +0300, Dov Grobgeld wrote: Assume I have a routine: int draw(cairo_t *cr) used to draw an overlay in a GdkWindow. In order to minimize redrawing, I would like to get the minimal (up to some accuracy to be determined) set of GdkRegion's that encompasses all

Re: disabling GTK+ features to shrink GTK+

2010-08-16 Thread Dov Grobgeld
Even if you link statically, there are dynamic modules in gtk that are pulled in at run time. Also, remember that linking statically has license implications, as you in such a case are forced to release your source code under the LGPL. Regards, Dov On Tue, Jun 15, 2010 at 10:19, Steve Frécinaux

Signal handling questions

2010-08-16 Thread Dov Grobgeld
While playing around with a general system for doing polygon overlays (e.g. for rectangle or line selection) I got stuck on the following problem. Assume that I have a widget A that has an expose handler exp_A(). Now assume that I would temporarily like to draw an overlay on A from the code in

Re: porting gdk - cairo

2010-08-10 Thread Dov Grobgeld
The following solution does the job though it causes flickering. - If there is a previous backing store (see below) then restore it to the underlying image. - Define the rectangle to draw by the button-press and the motion-notify-events. - Copy the four edges of below the rectangle

Re: text on a curved baseline?

2010-07-15 Thread Dov Grobgeld
What do you mean with drawing text? Through the text property of the label widget? Then the answer is indeed no. But you can always create a drawing area and draw whatever you want with cairo in the expose event. You will then have no problem drawing in a circle as you can loop over each

Re: Grid Based Canvas

2010-05-25 Thread Dov Grobgeld
Why don't you just draw a grid with lines on the canvas, and then whenever you select a square you create a canvas rectangle item and put it in the grid between the grid lines? When you unselect, you just destroy the canvas item. You will still need 2 items, which might still be too much...

Re: How can i create a alpha channel GdkPixbuf from a GdkPixmap and a GdkBitmap?

2010-05-10 Thread Dov Grobgeld
Just loop over the bitmap bit by bit and modify the alpha channel of the corresponding pixbuf pixel to 0. Or did I miss something? Regards, Dov On Mon, May 10, 2010 at 08:52, Lothar Scholz llot...@web.de wrote: Hello gtk-list, I have a programmatically created and drawn clipmask and the

Re: How to apply a theme to a perl gtk program

2010-04-12 Thread Dov Grobgeld
Search for Styles in: http://gtk2-perl.sourceforge.net/doc/yapc-2004-perl-gtk2/slides.html Regards, Dov 2010/4/12 Xi Yang jianding...@msn.com In platforms running in Gnome desktop, a perl Gtk program will have the native look, using the theme currently used by Gnome. However, while the

Re: GtkPlot

2010-04-05 Thread Dov Grobgeld
Attached below is a simple example. Something that you should keep in mind is that gtkplot expects you to keep the data around as long as the plot is displayed, i.e. it accepts a pointer to the data, but it does not copy it. Presumably for perfomance reasons. Regards, Dov #include gtk/gtk.h

Re: Widget for drawing plot

2010-03-18 Thread Dov Grobgeld
I've been using GtkPlot for real time plots for a number of years. It basically does the job, though its feature set is quite limited. In case you will be using PyGtk then there is no doubt that you should be using MatPlotLib which has vastly more options. I have often wished that there was a C

Use space for PageDown in TextView

2010-02-17 Thread Dov Grobgeld
Hi, I'm trying to write a simple text reading application with the TextView widget. As I am only doing reading I would like to rebind the space bar to do page down. But I can't get it to work. Here's what I did (in Python): # The following code is taken from #

Re: Image manipulation and Scaling

2010-02-02 Thread Dov Grobgeld
On 02/03/2010 12:02 PM, Dov Grobgeld wrote: Even if your image has more than eight bits you can always convert it to 8-bit according to a user setting defining the grey level max and min to be used for the convertion (known as window and level in the medical image community). That's exactly how I

Re: GtkTextView scroll preservation

2010-01-16 Thread Dov Grobgeld
, Jan 15, 2010 at 13:34, John Stowers john.stowers.li...@gmail.comwrote: On Fri, 2010-01-15 at 10:30 +0200, Dov Grobgeld wrote: I'm using a GtkTextView to display various texts that are changing but have the same length. The problem is that I would like to preserve the scroll position when

GtkTextView scroll preservation

2010-01-15 Thread Dov Grobgeld
I'm using a GtkTextView to display various texts that are changing but have the same length. The problem is that I would like to preserve the scroll position when changing the text, but so far I haven't managed to do that. Here is a test program: #include gtk/gtk.h GtkWidget *tv, *sw; /** *

Re: GtkTextView scroll preservation

2010-01-15 Thread Dov Grobgeld
Thanks. Here's how I interpreted your idea. But unfortunately it still doesn't work. //== // scroll-test.c - Test scrolling // // compile with: gcc -o scroll-test scroll-test.c `pkg-config --cflags --libs gtk+-2.0`

Re: about main event loop

2010-01-13 Thread Dov Grobgeld
(G_OBJECT (window), delete_event, G_CALLBACK (gtk_main_quit), NULL); gtk_container_set_border_width (GTK_CONTAINER (window), 10); gtk_widget_show (window); gtk_main (); return (0); } Regards, Zhang 2010/1/12 Dov Grobgeld dov.grobg...@gmail.com No, you don't

Re: about main event loop

2010-01-12 Thread Dov Grobgeld
No, you don't create threads to handle events. Instead you connect to callbacks through g_signal_connect(). But in order to get an intelligent reply from this list, you should provide a complete compilable program that exhibit the problem that you experience. Regards, Dov On Tue, Jan 12, 2010

Re: A simple compass widget

2010-01-11 Thread Dov Grobgeld
Thanks. Here are a few comments: - The gtk... namespace for widgets is reserved for the gtk toolkit itself, and should not be used for 3rd party widgets. (Yes, I have done the same mistake myself with my GtkImageViewer widget, but I promise that I will not repeat it!) - The

Re: A simple compass widget

2010-01-11 Thread Dov Grobgeld
Interesting. I didn't know about it. The disadvantage as I see it though, is the fact that it seems to be one shot. I.e. you do it once and you then start to edit the code. And if you want to add another property or signal, you have to do it manually in the source code. Unless gobject-gen parses

Re: simple compass widget available

2010-01-09 Thread Dov Grobgeld
A small note on the lack of a gtk repository. I think that gtk is heavily loosing out on not having a repository of widgets. The last few years I have written a lot of gtk code and since several years, I am wrapping everything into widgets. Were there a repository I would probably have uploaded a

What are eggs?

2010-01-01 Thread Dov Grobgeld
While trying to make a up a family for a new widget, I got reminded of seeing the term egg over the years in relation to gtk, but I never really understood what it means, who came up with the concept, and how it is supposed to be used? My guess is that it is related to real eggs that are abiding

Re: how to set language for non-unicode text

2009-12-28 Thread Dov Grobgeld
No, don't use gtk-i18n-list and don't cross post. gtk-app-devel-list is just fine. Gtk works only with unicode in utf8 encoding internally, so if you want a different format on the disk you will have to convert your text on input and output. Regards, Dov On Mon, Dec 28, 2009 at 19:59, Han

Re: Can't stop button from expanding

2009-12-27 Thread Dov Grobgeld
Create a hbox that you insert in the hierarchy between the page and the button. When resizing the hbox will be resized, but not the button that is inside it: : /* Notebook Page */ GtkWidget *page; page = gtk_vbox_new(FALSE,0); GtkWidget *hbox =

GtkToolItem custom widget - hybrid of GtkRadioToolButton and GtkMenuToolButton

2009-12-26 Thread Dov Grobgeld
Hello, I'm working on a space challenged device (Nokia N900) and in order to save space I would like to create a hybrid of a GtkToolbar (that will be shown at the bottom of the screen, and hidden when not in use) with the following properties: - There should be several GtkRadioToolButton

Re: Distribution

2009-12-09 Thread Dov Grobgeld
Regarding distribution from your resources, it may not be clear what it means in case you are using a site like sourceforge to make your download available. What if your distribution site disappears within three years of someone acquiring your program? Your email might also disappear. Or your

Re: Execute associated image viewer or media player on button click

2009-12-08 Thread Dov Grobgeld
You don't say under what system you need this. On windows you would simply do: system(foo.png) and you would call the viewer associated with .png files. (This works for url's as well as just running it through system, runs the prefered user browser). On Linux there is no such system

Re: Howto make a gtkbutton send a changed signal?

2009-12-01 Thread Dov Grobgeld
I don't really understand what you mean with emiting a changed event. You mean that someone is doing something like: gtk_label_set_text(GTK_LABEL(gtk_container_get_child(GTK_CONTAINER(my_button)), new text) or something simar (e.g. changing the image shown on the

Re: Self destructing dialog question

2009-11-25 Thread Dov Grobgeld
25, 2009 at 08:41:58AM +0200, Dov Grobgeld wrote: Assume I have a program with a widget MyApp that has a member called my_dialog that is created to catch its destruction as follows: if (!priv-my_dialog) { priv-my_dialog = my_dialog_new(); g_signal_connect(priv-my_dialog, delete

Self destructing dialog question

2009-11-24 Thread Dov Grobgeld
I have a small problem that's been bothering me for a while and I have yet to find an elegant solution to it. The problem is related to the notification of the destruction of a dialog window. Assume I have a program with a widget MyApp that has a member called my_dialog that is created to catch

Re: get text under cursor

2009-11-23 Thread Dov Grobgeld
That is not a gtk question. You better check with a firefox related forum. Regards, Dov On Tue, Nov 24, 2009 at 06:16, Ken Perl kenp...@gmail.com wrote: Hello, What's the API of GTK to get the text under the cursor when mouse moves over and stay on a word on a webpage of firefox? -- perl

Re: Capture console app output into texview?

2009-11-20 Thread Dov Grobgeld
//== // stdout-to-textview.c // // An example how to place stdout from a an external process // into a text view buffer by running the process in a separate // thread. // // This program is released under the LGPL v3.0. // // Dov Grobgeld dov.grobg...@gmail.com // Fri Nov 20 09:22:39 2009

  1   2   3   >