Re: gtk applicaion runtime insertion of widget

2014-06-08 Thread Chris Angelico
On Mon, Jun 9, 2014 at 12:59 AM, shiv garg wrote: > I am developing a gtk application in which I need to insert n no of widgets > at runtime.. > Say a number n that is scanned from user then I need to insert n rows each > containing a button and a checkbox You can do exactly what you do on star

Re: Need help with gtk_tree_view_set_cursor

2014-04-01 Thread Chris Angelico
On Wed, Apr 2, 2014 at 7:53 AM, aullidolu...@gmail.com wrote: > The strings "0" to "9" are displayed as expected on the treeview. The idea > is if I hit GDK_KEY_Up (since there's no upper level) should select the > last one; my function moveItemUP, does work in someway, because instead of > select

Re: Drawing bit mapped image in drawing area

2014-03-27 Thread Chris Angelico
On Fri, Mar 28, 2014 at 1:10 AM, Ken Bass wrote: > The image is a captured video frame that can be in one of several formats > (eg, yuv420, rgb8/24/32, jpeg/mjpeg). That is, I can provide it in any of > those formats. It is in memory - not a file. And it would need be updated > periodically, and q

Re: Redistribution of GTK DLLs

2014-03-07 Thread Chris Angelico
On Sat, Mar 8, 2014 at 12:55 PM, Chris Angelico wrote: > 1) My script will have a one-command action which will, after > confirmation, download eighteen separate DLLs from my web site. With a little more dependency-chasing that's become twenty DLLs, but the concept is materially unch

Re: Redistribution of GTK DLLs

2014-03-07 Thread Chris Angelico
On Fri, Mar 7, 2014 at 2:18 AM, Lucas Levrel wrote: > Le 5 mars 2014, Chris Angelico a écrit : > > >> The sources to all of GTK? I don't know, I haven't looked; but since >> I'm not actually compiling GTK myself, I'd need to figure out exactly >>

Re: GTK signals question.

2014-03-05 Thread Chris Angelico
On Thu, Mar 6, 2014 at 6:27 AM, Chris Moller wrote: > On 03/05/14 13:52, Chris Angelico wrote: >> >> Is there a reason you're trying to write high-level code in C? > > > Habit, mostly. I've been coding in C since the early 80s and I can do it in > my sleep.

Re: GTK signals question.

2014-03-05 Thread Chris Angelico
On Thu, Mar 6, 2014 at 5:43 AM, Chris Moller wrote: > gcc supports nested functions as an extension to standard C. I tend to use > them a lot because they operate within the stack frame of the enclosing > function, thereby minimising the amount of information you have to pass. > This is especiall

Re: GTK signals question.

2014-03-05 Thread Chris Angelico
On Thu, Mar 6, 2014 at 1:44 AM, Chris Moller wrote: > I was actually writing that testcase when I found a correlation: I'm using > gcc and my callbacks were nested functions. Pull the callbacks out and make > them normal, top-level, functions, and it all works even without no blocking > of any ki

Re: Redistribution of GTK DLLs

2014-03-05 Thread Chris Angelico
On Wed, Mar 5, 2014 at 10:18 PM, Lucas Levrel wrote: > En date de : Mer 5.3.14, Chris Angelico a écrit : > >> The very easiest solution for my users would be for me to >> distribute a .ZIP file of eighteen DLLs, which my app can fetch and >> deploy. But that would requi

Re: GTK signals question.

2014-03-04 Thread Chris Angelico
On Wed, Mar 5, 2014 at 6:29 PM, Tristan Van Berkom wrote: > Interesting, if I were you I would try to share the same adjustment > between all of your views. > > I.e. I would keep the adjustment in the finest grained unit of each > unit you want to display, and have your spin buttons format the val

Re: Redistribution of GTK DLLs

2014-03-04 Thread Chris Angelico
On Wed, Mar 5, 2014 at 6:19 PM, Tristan Van Berkom wrote: > Since these particular LGPL sources are already made available by > other parties (i.e. GTK+ & friends by GNOME etc) - I believe > that you do not need to host these files directly - but must somehow > at least link to these sources when

Re: GTK signals question.

2014-03-04 Thread Chris Angelico
On Wed, Mar 5, 2014 at 6:20 PM, Chris Moller wrote: > No, they're not the same value. They're all for setting an angle, in > radians, pi-radians, and degrees, and I want the user to be able to set the > angle in any unit and have the equivalent angle in the other units show up > in the other spin

Re: GTK signals question.

2014-03-04 Thread Chris Angelico
On Wed, Mar 5, 2014 at 5:43 PM, Chris Moller wrote: > I'm writing an app, that among a lot of other stuff, has three mutually > interacting spinbuttuns, i.e., if I increment spinbutton A, its callback > then updates values in B and C. B and then would try to update A, and C, > etc., resulting in

Re: Redistribution of GTK DLLs

2014-03-04 Thread Chris Angelico
On Wed, Mar 5, 2014 at 12:27 PM, Daniel Kasak wrote: > If you're in doubt, I think the best way to do this is to distribute things > separately. Just make an installer / updater for the GTK libs ( that would > be handy, by the way ... oh and if you build some Windows themes, *please* > distribute

Redistribution of GTK DLLs

2014-03-04 Thread Chris Angelico
I have a Pike GTK app that works on Windows and Linux (and theoretically other platforms but I haven't tested it). The Windows version of Pike distributes GTK DLLs for 2.12.11, which has some flaws compared to 2.24.10 which I use elsewhere. So it would be convenient for my users if I could have a s

Re: final gtk+maverick battles

2014-02-17 Thread Chris Angelico
On Mon, Feb 17, 2014 at 11:05 PM, Bric wrote: > FWIF: with this drive to keep upgrading, I just lost a critical hour of > sleep (I start new class material today and needed to be rested) because I > messed up the one and only thing you should NEVER mess up in your system: > network (wifi) connect

Re: final gtk+maverick battles

2014-02-16 Thread Chris Angelico
On Sun, Feb 16, 2014 at 10:30 PM, Bric wrote: > ("Unity" completely and majorly sucks, by the way. And the upgrade has > wiped out major settings, like /etc/bash.bashrc (!??), gnome panels, and > lots more!) Unrelated to your main issues, but I'll put in a plug for Xfce. When Ubuntu went to Unit

Re: final gtk+maverick battles

2014-02-14 Thread Chris Angelico
Incidentally: On Sat, Feb 15, 2014 at 7:45 AM, Bric wrote: > It's rather bewildering that the "make" interpreter can't print out more > specifics about the breakage... Makefiles are notorious for being hard to debug, partly because they're often generated by a script. It's almost never worth the

Re: final gtk+maverick battles

2014-02-14 Thread Chris Angelico
On Sat, Feb 15, 2014 at 7:45 AM, Bric wrote: > But are we certain at this point that my latest compile failure is caused by > an old package(s)? Easiest way to find out is probably to spin yourself up a newer OS (Ubuntu 12.04 LTS "Precise" or 13.10 "Saucy", or maybe Debian Wheezy, which is what I

Re: final gtk+maverick battles

2014-02-14 Thread Chris Angelico
On Sat, Feb 15, 2014 at 4:52 AM, Bric wrote: >> GTK on MacOSX requires a few dependencies to build and those script >> download them all and build them with clang default compiler without too >> many issues. >> >> https://wiki.gnome.org/action/show//Projects/GTK+/OSX/Building > > > Sorry, you lost

Re: How to start a filemanager in Gtk2 "the proper way"

2014-02-08 Thread Chris Angelico
On Sat, Feb 8, 2014 at 7:47 PM, Emmanuele Bassi wrote: > to be fair, xdg-utils *should* be installed by default in any new > installation *and* when upgrading; I'd consider it a bug in the Debian > update process if it didn't. that's the whole point of the xdg-utils > tools, really: provide a stab

Re: How to start a filemanager in Gtk2 "the proper way"

2014-02-08 Thread Chris Angelico
On Sat, Feb 8, 2014 at 7:33 PM, Emmanuele Bassi wrote: > on Linux you can use the `xdg-open` command[1] (it should be available > on any reasonably modern distribution as part of the cross-desktop > utilities[0]). you can use xdg-open to open any file or URI you pass > to it with the correct appli

Re: How to start a filemanager in Gtk2 "the proper way"

2014-02-07 Thread Chris Angelico
On Sat, Feb 8, 2014 at 9:39 AM, wrote: > Is there any "proper way" to do this or do I have use #ifdef syntax to > check for the system? > > #ifdef __unix__ > //my start code > #elif __WIN32__ > // start windows code here > #else > // fallback code..? > #endif > > > If there is no conv

Re: Using a TextView as a sort of "Hbox with wrapping"

2014-01-27 Thread Chris Angelico
On Tue, Jan 28, 2014 at 3:19 AM, Tristan Van Berkom wrote: > No, GtkToolbar != GtkToolPalette, they are separate things. > > The GtkToolPalette is what we use in Glade to show all the > widget icons for example - there is a demo of it if you run > gtk-demo you should be able to see it in action, a

Re: Using a TextView as a sort of "Hbox with wrapping"

2014-01-27 Thread Chris Angelico
On Tue, Jan 28, 2014 at 3:00 AM, Tristan Van Berkom wrote: > Sorry I did not take into account that you were working with the > GTK+2 library and not GTK+3. Ah, I should have mentioned, sorry. There has been talk of supporting GTK3 in Pike, but I won't move to it till I can confidently expect tha

Re: Using a TextView as a sort of "Hbox with wrapping"

2014-01-27 Thread Chris Angelico
On Tue, Jan 28, 2014 at 1:30 AM, Tristan Van Berkom wrote: > You can get the behavior you are looking for with EggWrapBox: > https://git.gnome.org/browse/libegg/tree/libegg/wrapbox > > Just copy the eggwrapbox.[ch] and compile it as a part of your > code (or compile a libegg separately and link

Re: Using a TextView as a sort of "Hbox with wrapping"

2014-01-26 Thread Chris Angelico
On Mon, Jan 27, 2014 at 3:43 AM, James Tappin wrote: > If I interpret what you are trying to do correctly (not necessarily a > given), then I would have thought that GtkScrolledWindow (possibly in > conjunction with GtkViewport) would be the tool for the job. Not scrolling, wrapping. The window

Using a TextView as a sort of "Hbox with wrapping"

2014-01-26 Thread Chris Angelico
My application has a status bar which can have an arbitrary number of items added to it. Currently, I use an Hbox with no padding, which works fine as long as there aren't too many statusbar elements added; but if there are a lot, the tail starts wagging the dog, in that the size of the window beco

Re: snowloadcount wizard gui in qt, qt for android then in gtkmm(gtk3)

2014-01-24 Thread Chris Angelico
On Sat, Jan 25, 2014 at 6:57 AM, David Marceau wrote: > C++ with gtkmm is straightforward and no qtcreator/gui builder > necessary. Just coding it by hand gives exact results. > ... > I am going to rewrite the same app in golang with the go-gtk binding. I > can foresee it will be the most enjoyab

Re: Best practice query: Entry field "user's done editing"

2014-01-12 Thread Chris Angelico
On Fri, Dec 27, 2013 at 8:24 AM, Christoph Schmeding wrote: > We have the same need in our application, i.e. we don't want to "validate" or > "commit" on every "change" in the entry. > > We also have hooked validation on the "focus-out", and additionally on > "activate", which is emitted when th

Re: Best practice query: Entry field "user's done editing" handling?

2013-12-24 Thread Chris Angelico
On Tue, Dec 24, 2013 at 9:14 PM, Nicola Fontana wrote: > Il Mon, 23 Dec 2013 22:19:28 -0800 "A. Walton" scrisse: > >> Frankly I don't see what's wrong with making it instant apply from the >> description. Connect to the GtkEditable::changed signal, throw in a short >> timeout that gets reset any

Re: Best practice query: Entry field "user's done editing" handling?

2013-12-23 Thread Chris Angelico
On Mon, Dec 23, 2013 at 11:25 PM, Tristan Van Berkom wrote: > We don't want to be chasing down scenarios where this could possibly > break, so the best thing we can do is commit everything immediately > (you could have an asynchronous layer in your data model which handles > this, if performance o

Best practice query: Entry field "user's done editing" handling?

2013-12-16 Thread Chris Angelico
not save every time a 'changed' signal comes through, as that would be hopelessly inefficient most of the time. What's best practice here? Chris Angelico ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Re: freely re sizable GtkTreeView columns

2013-12-09 Thread Chris Angelico
On Mon, Dec 9, 2013 at 9:43 PM, Max Linke wrote: > pack option was the right hint. I just saw that the expanding option is > hidden there in glade. After setting expand to yes for the > ScrolledWindow everything works like I expect it to. > > Thanks for the quick help Excellent! Glad to be of ser

Re: freely re sizable GtkTreeView columns

2013-12-09 Thread Chris Angelico
On Mon, Dec 9, 2013 at 7:45 PM, Max Linke wrote: > Thanks that fixed it. So far Gtk looks nice and easier then I > expected :) I quite like GTK, too. Most of my GUI work is in Pike, which is semantically similar to Python (which I think is what you're using?). GTK does a fine job of everything I

Re: Still confused on new thread starting idle functions to update UI.

2013-12-04 Thread Chris Angelico
On Thu, Dec 5, 2013 at 4:16 AM, Chris Vine wrote: > On Thu, 5 Dec 2013 03:06:59 +1100 > Chris Angelico wrote: >> See how much effort goes into >> making sure everything's thread-safe? [None], because this >> isn't even threaded - though it will happily ha

Re: Still confused on new thread starting idle functions to update UI.

2013-12-04 Thread Chris Angelico
On Thu, Dec 5, 2013 at 2:56 AM, David Buchan wrote: > PS. Socket programming is great fun! ( > http://pdbuchan.com/rawsock/rawsock.html ) Absolutely! I don't usually use raw sockets though - I tend to use TCP primarily, and sometimes UDP or ICMP, but not raw. TCP sockets equal MUD connections, wo

Re: Still confused on new thread starting idle functions to update UI.

2013-12-04 Thread Chris Angelico
On Thu, Dec 5, 2013 at 2:56 AM, David Buchan wrote: > Making the pointer to textview global would indeed simplify things > enormously. I guess I avoid global variables like the plague, having been > told to for years. Also wanted to make the idle function generic. Yeah, lots of people have been t

Re: Still confused on new thread starting idle functions to update UI.

2013-12-04 Thread Chris Angelico
On Thu, Dec 5, 2013 at 2:18 AM, David Buchan wrote: > What I mean is, is it kosher to have: > > msgdatas msgdata; // I'd pass &msgdata as arg. to g_idle_add() I suppose. No, it's most definitely not, unless you can guarantee that (a) the function that called this will still be running when the i

Re: Still confused on new thread starting idle functions to update UI.

2013-12-04 Thread Chris Angelico
On Thu, Dec 5, 2013 at 2:00 AM, David Buchan wrote: > > Things I've learned yesterday are: > > 1. strdup() (I've never seen or used it before) > 2. what the heck heap and stack mean (still more to learn there) > 3. a more general and flexible solution is probably to use asynchronous > message que

Re: Still confused on new thread starting idle functions to update UI.

2013-12-04 Thread Chris Angelico
On Wed, Dec 4, 2013 at 9:28 PM, Chris Vine wrote: > Otherwise, have you considered perhaps using something like the python > bindings for GTK+? These have a binding for g_idle_add() and handle > all the memory allocation for you. I recommend using the > gobject-introspection binding for GTK+-3 r

Re: Still confused on new thread starting idle functions to update UI.

2013-12-04 Thread Chris Angelico
On Wed, Dec 4, 2013 at 2:59 PM, David Buchan wrote: > // Allocate memory on the heap, not stack. > msgdata = (msgdatas *) malloc (1 * sizeof (msgdatas)); > msgdata->textview = (int *) malloc (1 * sizeof (int)); > message = (char *) malloc (1024); The only blocks of memory that need to be

Re: key values on key pressed

2013-11-22 Thread Chris Angelico
On Sat, Nov 23, 2013 at 2:39 AM, Sergei Kolomeeyets wrote: > The question about the > possible meaning of GDK_KP_Enter, for instance, drivers me up the wall > really. I'm actually able to guess the meaning of "Enter" and "GDK",,, But > what does that KP mean? Keypad. That would be the enter key o

Re: ScrolledWindow, DrawingArea, and setting step-increment

2013-11-14 Thread Chris Angelico
On Wed, Nov 13, 2013 at 7:56 PM, Gabriele Greco wrote: >> in Gypsum has barely started and I already have 50K lines; my RosMud >> session currently has 300K lines of scrollback; and I've noted as an >> unsolvable RosMud bug that it's unacceptably slow adding the >> 16,777,216th line to the buffer

Re: ScrolledWindow, DrawingArea, and setting step-increment

2013-11-12 Thread Chris Angelico
On Wed, Nov 13, 2013 at 4:44 AM, Gabriele Greco wrote: > I suggest you to use GtkTextView for your text output, thank to GtkTextTag > it's flexible enough to do everything a mud client needs, also blinking > text, it scrolls at line boundaries and let you keep thousands of lines of > textbuffer wi

ScrolledWindow, DrawingArea, and setting step-increment

2013-11-11 Thread Chris Angelico
m at least passably fluent in Perl, C, C++, and Python, among others, and will be happy to figure out code in a language I'm not familiar with) that forces the increments? I've been searching on Google and have come up with a few bits and bobs, but most work with DrawingArea seems to be pixel-based, not line-based, so there's no problem with scrolling by pixels. Thanks in advance! Chris Angelico ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list