Re: ANNOUNCE: Phasing out GTK mailing lists and move to Discord
Is the subject line of this thread a freudian slip? We are definitely moving toward discord, from the complaints! On 03/21/2019 09:33 AM, Emmanuele Bassi via gtk-app-devel-list wrote: > On Thu, 21 Mar 2019 at 02:28, Matthew A. Postiff via gtk-app-devel-list < > gtk-app-devel-list@gnome.org> wrote: > > >> Is it easy in discourse to turn on email, either daily digests or >> "live"? Is there an rss feed that I can subscribe to? A quick howto >> would be great. >> > > There is a link on how to use email with Discourse in the original email. I'm just a lurker here following GTK+ out of personal interest, and the traditional mailing list format fit that perfectly. Discourse not so much. After you mentioned mailing list mode in Discourse, I tried enabling mailing list mode on another discourse board that I occasionally visit. The results were not encouraging, unfortunately. Discourse does not offer any kind of granularity when in mailing list mode; you get everything on every sub forum across the entire Discourse instance. The only way to get granularity is to manually set email notifications on particular topics, or automatic on topics one has participated in. From what I read the Discourse developers acknowledge that the mailing list mode isn't really that great and never will be as there's just not a 1:1 mapping of how Discourse handles things with email. Sadly for me, Discourse has all the same limitations and problems as any other web forum I've used. An awkward interface requiring logging in, a lack of threaded messages (at least I can't see anything like threads in Discourse), and yet another web site to have to visit. Thanks for all your work on GTK+, Mr Bassi. And to all the rest of the GTK+ developers. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Header bar: Keyboard accessibility?
On 06/23/2017 12:35 PM, Yuri Khan wrote: > On Sat, Jun 24, 2017 at 1:21 AM, Michael Torrie wrote: > >>> I’m on 3.18, and here’s my test application/mockup: >>> >>> http://yurikhan.github.io/images/20170623-gtk-header-bar.png >> >> Oh I see. Yes that's different. The application menu usually refers (at >> least in my mind) to the now ubiquitous hamburger menu that all Gnome >> apps seem to sport. > > In *your* *mind*? Application menu is an official term. The menu that > is assigned via gtk_application_set_app_menu. You're right, and this does seem like a pretty serious oversight. I see that gedit did not have (at least on my version of gnome) an application menu at all. gnome-calculator does, though, and it's definitely not keyboard accessible, which is a very strange design choice, if it's not a bug. > What you are describing is called the “gear menu”. The only > application I have seen so far where it was activated with F10 is > Gitg. And Gedit tries to do that too, unsuccessfully. I've looked at a few Gnome 3 apps just now and F10 was able to open the gear menu for all of those, including Gedit. I'm not using Gnome 3 as a desktop environment. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Header bar: Keyboard accessibility?
On 06/23/2017 11:15 AM, Yuri Khan wrote: > What GTK3 version are you on? Could you make a screenshot so I could > see we’re talking about the same thing? Gtk 3.20 here. > > I’m on 3.18, and here’s my test application/mockup: > > http://yurikhan.github.io/images/20170623-gtk-header-bar.png Oh I see. Yes that's different. The application menu usually refers (at least in my mind) to the now ubiquitous hamburger menu that all Gnome apps seem to sport. I guess what you're trying to trigger is what we used to call the window menu? In the old days before client-side decorations, alt-space would trigger that menu. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Header bar: Keyboard accessibility?
On 06/22/2017 12:03 PM, Yuri Khan wrote: > And now for the title question. In this latter scenario, how does the > user access the application menu without having to use a pointing > device? Is every application supposed to implement that? As a > developer, how would I go about that? As a user, what do I say in the > bug report when an application neglects this? All the Gnome 3 apps that use a header bar that I have at my disposal let me open the application menu with F10. Even when I run the app under the most primitive window manager out there, TWM. Are they doing something different than your app? ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Cross platform development
On 03/18/2017 10:07 AM, Michael Torrie wrote: > He wants to put just the GTK3 dependencies in a tree > somewhere. To do that simply, he could unpack the GTK3 (and glib2) > binary pacman packages if they could be located. Got it. I think they can be downloaded individually here: https://sourceforge.net/projects/msys2/files/REPOS/MINGW/x86_64/ or https://sourceforge.net/projects/msys2/files/REPOS/MINGW/i686/ ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Cross platform development
On 03/18/2017 09:16 AM, pelzflorian (Florian Pelz) wrote: > MSYS2 ships with the pacman package manager. After you have followed the > instructions on the website, launch the MSYS2 shell from the MSYS2 > folder and then this command installs everything you need to run gedit > into a filesystem tree inside your msys2 folder. But the OP already has an MSYS2 installation that has more than just GTK3 in it. He wants to put just the GTK3 dependencies in a tree somewhere. To do that simply, he could unpack the GTK3 (and glib2) binary pacman packages if they could be located. > > $ pacman -Syu --needed base-devel git > mingw-w64-x86_64-binutils mingw-w64-x86_64-gcc > mingw-w64-x86_64-pkg-config mingw-w64-x86_64-gtk3 > mingw-w64-x86_64-gedit > > gedit ships this filesystem tree from msys2 but removes some files > needed only for building. It is somewhat large but a third of gedit’s > size is due to shipping python. Where can this gedit package be downloaded and inspected by itself? Sounds like a good place to start. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Cross platform development
On 03/18/2017 07:37 AM, Dirk Gottschalk via gtk-app-devel-list wrote: > The only chance is, to grab the DLLs from MinGW via objdump ore some > similar, like recommended and pack them into the applications working > directory, because Windows searches DLLs in its System, System32 > subfolders and in the working directory of the app. This is tested. I > only want to copy just the needed files, not the complete DLL set Mingw > has on my systems, these are real much. If you could find the msys2 binary packages, you could just grab the ones you need and unzip them into your app's custom tree. I'm not sure where to get them, though. msys2's web site is very sparse and only shows the installers and the git source repos. If I can find them I'll post here. As for Windows searching DLLs, if I'm not mistaken, Windows always looks first in the same directory as the .exe file. After that it searches its system folders. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Cross platform development
On 03/17/2017 04:02 PM, Dirk Gottschalk via gtk-app-devel-list wrote: > 1. Which DLLs do i have to copy from the bin directory of MinGW for my > GTK+-Application. I don't want to install MinGW on all Workstations > where the app should rum. AFAIK it is enough to copy the DLLs into the > applications working directory. But which are this? I think you need more than just the DLLs. GTK needs a bunch of resources like pixmaps and image loaders. These can be placed in standard directories relative to the DLL files. Basically look at the files provided by the mingw gtk3 package. You'll need a similar layout with at least lib/ and share/. Something like this, taken from my older Redhat EL 7 installation. I think it still is the same layout as 3.20 or 3.22 toplevel/ exe, dlls etc/ gtk-3.0/ gtk.immodules im-multipress.conf lib/ gtk-3.0/3.0.0/immodules/ im-*.dll share/ glib-2.0/schemas/ *.xml locale/ stuff themes/Default/ stuff I think some programs stick their binary and libraries in a bin folder, and GTK can still find it's files. It's more typical for windows apps to put the EXE in the toplevel folder though. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: GTK3 Glade and rendering in Windows/Linux]
On 01/31/2017 05:54 AM, Happy wrote: > > Thanks for the note. Hope the following links work. As you can see the > windows are much different in size as well as the spacing. > > Ubuntu: > https://drive.google.com/file/d/0BxjwKUaYdW_zYnUydWExX2NNdE0/view?usp=s > haring > > Windows: > https://drive.google.com/file/d/0BxjwKUaYdW_zeFhZdFYtelViUGM/view?usp=s > haring > > Glade.glade file: > https://drive.google.com/file/d/0BxjwKUaYdW_zYWY4UnZweDhRbGc/view?usp=s > haring > > Thanks The differences are due to different themes used. If you used the same theme between Windows and Linux, the output should look near identical. But if you want it to look somewhat native on Windows, stick with the default Windows-ish theme there. The Windows UI look and feel has gotten rather big and spaced out in recent years, so maybe the theme is just reflecting this. Does your GTK+ GUI look very different than native Win32 apps? There's no reason I can think of to expect or want things to look pixel per pixel identical between different operating systems and desktop environments, though like I said you can do that by manually picking the same theme as you use on the other platform. GTK's layouts are flexible and can adapt and adjust to many different sizes and spacings. Just a note that your Windows example appears to be scaled by Windows because of the UI DPI setting; you can turn that off by right-clicking on the executable and going to properties, compatibility and disabling the scaling option. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: The Big Gtk limitations: a reliable GUI builder
On 11/29/2016 04:28 PM, pozzugno wrote: > First of all, I'm using Glade 3.20.0 for Windows, installed through > Msys2 project. I don't know if Glade is more stable under Linux OS. In my opinion, GTK is definitely more stable under Linux than Windows. he truth is, 90% of GTK developers (or more) are working on the primary Linux X11 and Wayland backends. The Windows backend does see work from time to time, but from what I can tell it lags somewhat. However I can confirm your margin issues are definitely bugs: https://bugzilla.gnome.org/show_bug.cgi?id=744095 https://bugzilla.gnome.org/show_bug.cgi?id=741270 I guess the problem really is that the property name for the margins has changed from left and right to start and end, which is what the initial renderer is expecting. But somehow one part of glade hasn't caught up to the other part. I don't know when you can expect this bug to be fixed. Volunteer developers don't always fix bugs. I don't think your workflow is wrong, though I can't speak to the treeview thing. Glade 3.x does seem buggy, especially compared to Glade-3 for GTK2 which I never had any problems with. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: GTK+ 2 and prelight
On 11/15/2016 08:10 AM, Gabriele Greco wrote: > It's a functional behaviour, not only aesthetics since a toggle button in > prelight state can be both active or not, but you can't see its state until > you move the mouse pointer... That seems to depend on the theme. I use a modified ClearLooks theme and you can always see the state even when pre-lit. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: SpinButton: how to avoid calling signal handler when set_value()
On 11/02/2016 05:19 PM, pozzugno wrote: > It seems pyGObject implementation gives only two "handler block" > functions: handler_block(), that needs the handler_id that I don't have; > handler_block_by_func() that needs the callback to block (the same > problem of your solution, because I have different callbacks). Usually when you connect a signal, the return value from the connect call is the handler_id. Can you save this value somewhere for future use? ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Farewell
Ahh I see there are other more recent posts that I had not read yet. My apologies. I see that he acknowledged finally that the conclusion people arrived at before (that argv[] isn't populated by default when using assembly on Windows) was correct. That's progress! ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Farewell
On 05/09/2016 09:24 AM, Ardhan Madras wrote: > Its been long time since I've posted to gtk-app-devel-list, this is the > best joke ever! > I'd eat my cheap keyboard for other post like this. Indeed. Kudos to the devs and other list posters who patiently tried to help the OP solve what was clearly not a GTK+ issue, something he could have found out right away by making a simple non-GTK+ app that tried to access the argv array. Sad that he refused to listen. He complained that he didn't get any support, but when people offered it, he rejected it, claiming that they were too ignorant to be helpful. I am somewhat nterested to hear how his project is fairing now that he's presumably moved to a different toolkit, while using assembly language. I wonder if he'd be willing to humbly apologize to the list when he finds out his issue persists and that is has nothing to do with GTK+! You can't expect argv array to be populated in assembly on Windows if you don't make the right calls to populate it! ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: GTK+ accessibility
On 07/16/2015 01:39 AM, Miroslav Rajcic wrote: > On 15.7.2015. 14:12, Emmanuele Bassi wrote: >> you probably want to contact the gnome-accessibility team, on >> gnome-accessibility-l...@gnome.org. > > Will do as suggested, thanks. F10 seems to focus on the menu on GTK apps. That could be a good workaround in the meantime. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Misconduct of GTK+/glib Bugtracker Admins
On 06/04/2015 01:11 PM, IgnorantGuru wrote: > All that needs to be done to fix it is add the traditional > location used for fuse mounts to the heuristics - a 5 minute job. Have you submitted a patch then? I have a hard time seeing how any of the devs would refuse a well-written patch that fixes this bug. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: How to make a GtkButton respond to a key press
On 03/06/2015 08:23 AM, Michael Cronenworth wrote: > On 03/06/2015 08:52 AM, Michael Torrie wrote: >> No, this is not quite what I am asking for. Capturing keyboard events >> is fine, but I need the button to click visually, for feedback purposes. >> Just like what happens if you define the control key shortcut and press >> that. >> >> So the question is either, how can I get GtkButton to respond to a >> non-modifier hotkey, or how can I programmatically get GtkButton to >> visually depress and release? > > You can call g_signal_emit_by_name() for the GtkButton "activate" signal to > get the > visual animation of a button press and release. Ahh. Yes this is what I want mostly. Is there any way to get it to animate down and hold there, say when a person is holding down the key? ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: How to make a GtkButton respond to a key press
On 03/05/2015 09:31 PM, Jim Charlton wrote: > I presume you have a callback function connected to the button press > event. Just create code to intercept the keyboard event and go to a > callback function that sees what key was pressed and then calls the same > function that would have been called had the button been pressed. > > The first example I found from Google was > http://stackoverflow.com/questions/10134956/in-simple-gtk-key-press-event-example-gdk-shift-mask-seems-to-be-ignored > > You can see the code you need to intercept the keyboard event. > > I do exactly this sort of thing in programs with the user being able to > hit a select keyboard key or click the button (although I am using gtkmm3). No, this is not quite what I am asking for. Capturing keyboard events is fine, but I need the button to click visually, for feedback purposes. Just like what happens if you define the control key shortcut and press that. So the question is either, how can I get GtkButton to respond to a non-modifier hotkey, or how can I programmatically get GtkButton to visually depress and release? ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
How to make a GtkButton respond to a key press
Maybe I'm just not reading right, but I cannot figure out how to make a GtkButton respond to a single key press. For example, if I made a simple calculator like the one that comes with Gnome, how can I make it so when I press '1' on my keyboard, the 1 button presses. I know how to make shortcuts with a control key by just putting in an & in the label. But not just a bare key press. Also is it possible to programmatically depress and then release a GtkButton, simulating a click? I'd like to do this to generate some user feedback when the keyboard is used, while allowing one to still click with a mouse (or finger or whatever) on the GtkButton. Pointing me at the right docs would be appreciated. Gtk3 is fine. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: GTK+_failed installation
On 01/05/2015 03:28 AM, Nabil Ferguen wrote: > Dear Team GTK, > > I would like to install gtk+ (for OOF2D) on ubunto 12.04, and I have > successfully installed all packages (pango, glib, gdk-pixbuf, atk) but > the compiler fails and sends an error message linked to the atspi-2 > package (requires version > = 2.11.2). I have looked on the web in > order to find this package but it seems that it is obsolete. How I can > fix > this problem. GTK is a base part of the Ubuntu 12.04 system. The default GUI interface (Gnome 2) depends on it. Do not replace (overwrite) this version of GTK. If you're trying to install GTK3, you will have to compile the entire stack from source and install it to an *alternate* location on your system (say /opt). The following site describes the build process: https://developer.gnome.org/gtk3/stable/gtk-building.html Even still, GTK 3 might depend on libraries that simply aren't available on 12.04, since it's so old. 12.04 is a long-term support release, but that doesn't mean it has the latest software libraries in it. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: final gtk+maverick battles
On 02/17/2014 05:05 AM, 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) connection (if you are out and about and have no > way of plugging into ethernet): With my eye on the 14.04 prize, I > checked "unsupported" and "pre-release" packages in Update Manager, so > it went ahead and installed newer linux-firmware, which screwed up my > wifi connection. Luckily, I was still near an ethernet port, and > downgraded. Again, just a caveat/caution for anyone who might try to > draw from this experience. Years ago I was trying to install software that required a newer libc than I had, so I naively tried to uninstall glibc. (Redhat 5.1 I think.) Needless to say that didn't work too well and I had reinstall. Also I had a friend running Gentoo who decided she didn't want python, so she tried to uninstall it. Needless to say, she too reinstalled. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: final gtk+maverick battles
On 02/16/2014 04:30 AM, Bric wrote: > Nonetheless, I run ./configure in gtk+ git, and I am still getting unmet > dependencies: > > configure: error: Package requirements (glib-2.0 >= 2.39.5atk >= > 2.7.5pango >= 1.32.4cairo >= 1.12.0 cairo-gobject >= 1.12.0 > gdk-pixbuf-2.0 >= 2.27.1) were not met: > > Requested 'glib-2.0 >= 2.39.5' but version of GLib is 2.32.4 > Requested 'atk >= 2.7.5' but version of Atk is 2.4.0 > Requested 'pango >= 1.32.4' but version of Pango is 1.30.0 > Requested 'gdk-pixbuf-2.0 >= 2.27.1' but version of GdkPixbuf is 2.26.1 > > > > So, this is no longer an ancient system. What do I do? (Aside from > "trashing" this new one with local builds, as I did the old one?) Never upgrade system versions of glib and gtk+ in place unless you really know what you're doing. Instead if you need newer versions, compile them to their own prefix. You can set the PKG_CONFIG_PATH variable to point to that prefix and ./configure will see them. Also you can use jhbuild (google for it) to build the latest versions of gtk+ to its own prefix (say /opt/gtk3). If you dislike Unity, you can install the mate-desktop, which is a continuation of the old gnome2 desktop that you are used to. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Delay time to spawn new threads?
On 11/27/2013 12:59 PM, David Buchan wrote: > Hi Michael, > > My 32-bit, GTK+2 version does > > // Secure glib > if (!g_thread_supported ()) { > g_thread_init (NULL); > } > > at the beginning, and then the thread is spawned via: > > on_button1_clicked (GtkButton *button1, MyData *data) > { > GThread *thread; > GError *error = NULL; > > thread = g_thread_create ((GThreadFunc) my_function, data, FALSE, &error); > if (! thread) { > g_print ("Error: Unable to create new thread for my_function() in > on_button1_clicked().%s\n", error->message); > exit (EXIT_FAILURE); > } > > My 64-bit, GTK+3 versions does not do the g_thread_init() call. > > It spawns a new thread via: > > int > on_button1_clicked (GtkButton *button1, MyData *data) > { > GThread *thread; > > thread = g_thread_new ("my_function", (GThreadFunc) my_function, data); > if (! thread) { > fprintf (stderr, "Error: Unable to create new thread for my_function() > in on_button1_clicked().\n"); > exit (EXIT_FAILURE); > } > > These threads do nothing with the GUI. It occurs to me that the problem could just be that standard out is buffered, so you don't see anything until the buffer is flushed. Maybe you can try to flush standard out after the printf (or g_print). ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Delay time to spawn new threads?
On 11/27/2013 08:29 AM, David Buchan wrote: > I have written a program which spawns a new thread when the user > clicks a button. The new thread does something noticeable immediately > after starting, so I know when the thread has begun. What I mean is, > if I run that piece of code that is executed as a new thread, but as > a stand-alone program, it does it's thing immediately. > > However, when I have it run as a new thread when the user clicks a > button, it takes about 1.5 seconds before it does its thing. > > > I've done this with g_thread_create() and g_thread_new() with > identical results. Is it normal for there to be a 1.5 sec delay, or > have I bumbled something? Did you initialize the thread subsystem before using threads? Did you use the proper semiphores around GUI calls, or better yet use g_idle_add to schedule GUI updates in the main thread? http://www.gtk.org/api/2.6/gdk/gdk-Threads.html http://blog.borovsak.si/2009/06/multi-threaded-gtk-applications.html etc ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Updating GUI during long operation
On 04/25/2013 08:04 PM, Kip Warner wrote: > Hey Chris. Your message was not very useful again, but thanks anyways. > As you realized after, the problem may be too many graphical related > events through the main loop. I will try adjusting the animation's > framerate and seeing if I can get the worker thread to give a breather > to the main thread which seems to be working when using an idle_add() > callback to trigger an event flush. As both Chris and Colomban have state, triggering an event flush isn't going to help. If the events are already getting filed up, trying to flush them isn't going to work. You have to figure out why the events are piling up. Because they're going to keep piling up no matter how often you try to pump the event loop. Something I do for animations is have a timeout callback that updates the GtkDrawingArea with the latest buffer, rather than updating the drawing area whenever something is drawn. Sounds like you're trying to re-invent the wheel here as well. From what you say (when you're not berating people for being unhelpful), you've implemented your own throbber widget. Perhaps you should either use a Gtk throbber, or study the throbber widget code and implement something along the same lines with your own graphic. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: parsing bibtex using gscanner
On 02/18/2013 11:15 AM, Rudra Banerjee wrote: > On Mon, 2013-02-18 at 19:02 +0100, David Nečas wrote: >> The best approach to parse a grammar is, you know, using a parser. > So anything better then bison? You can write your own parser if you want. Maybe a recursive-descent parser. You will want to study up on parsers. There are different kinds of parsers (recursive-descent, table-driven which bison is) for different kinds of grammars. You might not want to use a grammar at all. Why not use a dedicated bibtex-parsing library: https://www.google.com/search?q=bibtex+c+library ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: GUI freezes waiting for callback function to return
On 12/15/2012 11:08 AM, Mateusz Marzantowicz wrote: > Very valuable articles and blog posts. > > Now I know that threading in GUI apps (using GTK+) is much harder then I > originally thought it is. Although my use case is very simple I must > employ complicated threading machinery. I'm playing with > consumer/producer pattern and separate worker thread and I hope it > doesn't blow up in my face. I've also found application that works > similarly to my own - baobab (disk usage analyzer). You should be fine so long as nothing in your thread calls the GUI calls directly. Using a queue and the pattern you described is pretty standard procedure for multi-threaded, or multi-process programming in general. And as the other poster said, use asynchronous I/O whenever possible so you don't always need threads. You say you have enjoyed complicated threading machinery before. MFC certainly never supported GUI calls from threads. I remember having to do queues and all kinds of other things to get get my threads to play nice on Win32. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: GTK+3 fonts
On 10/21/2012 01:58 PM, Roger Davis wrote: > % fc-match Sans > DejaVuSans.ttf: "DejaVu Sans" "Book" > > And if I put them back, things are restored as before: > > % fc-match Sans > Vera.ttf: "Bitstream Vera Sans" "Roman" > > Can anyone explain how this works? Is there some complicated font > parameter examination taking place here, or is it as simple, at least in > some cases, as a single defined fallback font for everything when a > specified font cannot be located? Curiously, this test returns the same > fallback font: > > % fc-match yuk-yuk > Vera.ttf: "Bitstream Vera Sans" "Roman" > > I suppose what I would like to do on my Mac is have it use DejaVu Sans to > satisfy a Sans request (because DejaVu has the UTF-8 characters I need and > Vera does not), but without having to delete the Vera fonts from my > system, which might break God-knows-what-all. Is there a way to do this? All of this is specified in the fontconfig configs. On linux, this is normally in /etc/fonts/conf*. I don't know where they are on macports, but probably in a similar path, maybe /opt/etc/fonts. These config files specify the logic fontconfig should use in searching for a font which is rendered via freetype. Substitutions and fallback fonts are all specified here. This way if someone just requests "sans" or "roman," they get a suitable font, if installed, or the fallback font. Also fontconfig specifies what to do at smaller font sizes, how to do hinting, etc. It's possible that the hinting is changing as the font get smaller. Maybe on macports they default to having more and more hinting at smaller sizes for legibility, whereas on CentOS they don't turn on as much hinting (I turn it off completely on my Fedora machines). ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: GTK+3 fonts
On 10/21/2012 04:16 AM, Roger Davis wrote: > Any explanation for these mysteries, or any pointers to some decent > documentation on Gnome 2/3 font configuration and installation? If you are using Gtk+3 with the native/quartz backend, then the fonts it uses are coming from the native OS X font system. If you are using the X11 backend, then the fonts come from where ever freetype is configured to pull them from, which on OS X could be somewhere in the macports install directory, and maybe from the OS X system font directory. Most fonts on OS X are *.otf, not *.ttf, which could be why you can't find them with a search. As for font rendering differences, if you are using the quartz backend, then it's likely that the font rendering is being done by OS X and quartz, not freetype. So any differences are a result of their algorithms (which do no font hinting whatsoever). ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Best way to busy-wait in Python 3 / Gtk+ 3?
On 10/10/2012 06:17 AM, Filip Lamparski wrote: > Thanks, your method works. However, it still takes the program quite a bit > to load up, and my problem is that I want display the window as soon as > possible. If that helps, here is how the program loads up: > Script starts > The window is constructed > Window events are connected to their handlers > window.show_all() > When the window is ready, TED Talks are loaded and processed. > Then, widgets for the talks are created. In the widget's constructor, I > call GdkPixbuf.Pixbuf.new_from_stream_async. > > Problem: The window does not show up when loading the images (something > that I hoped _async would make possible). Hmm the point of async is to load things in the background. So somewhere something is missing. You'll have to post some small code example I think. Preferably a complete snippet that replicates the problem (show a single window, do a single image load or something). ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Best way to busy-wait in Python 3 / Gtk+ 3?
On 10/07/2012 08:41 PM, Simon Feltman wrote: > On Sun, Oct 7, 2012 at 12:29 PM, Filip Lamparski > wrote: >> On 7 October 2012 12:58, wrote: >> >>> To have the load in another process, use a pipe to send worker results >>> back to the main process, and add the pipe to your gtk main loop as an >>> event source. >>> >> >> Is there any way I could do that? I looked at GLib's main loop and Gtk's >> main loop, but can't seem to find it. > > Is the idea to have a first pass downloading image files in a separate > process and then use a thread to load them into memory? I don't know > much about GStreamer but it seems like it might be helpful technology > in this realm. > > For completeness, you can use pythons multiprocessing module along > with GLib's io watch: > > parent, child = multiprocessing.Pipe() > GLib.io_add_watch(parent, GLib.IOCondition.IN, event_callback) > process = multiprocessing.Process(target=worker_func, args=(child,)) > process.start() Maybe the best way is to avoid processes or threads altogether. Since downloading this thumbnail is io-bound, not cpu-bound, once you send off your request, just use io watches to trigger the main loop when something has come in. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: gtk apps on iOS/Android?
On 09/09/2012 11:40 PM, Tristan Van Berkom wrote: > interesting, wouldnt the quartz backend for osx build for iOS ? > > not exactly sure but I think the NSView and highlevel cocoa stuff > is built upon the same low level windowing apis that are available > on osx... I'm sure it could be ported of course. But there's really no point. Apple is unlikely to allow a GTK+ app in the app store anyway, as they require apps to use the native UI toolkit as part of their brand image. As well, porting an app to mobile platforms is more than just simply recompiling. The UI principles on a phone or tablet are different than a desktop (despite Unity and Gnome 3's belief to the contrary). Even with GTK+ supporting touch and other mobile things, it's the widget layout that is going to be different. So an application's UI really needs to be redesigned from scratch on the mobile anyway. GTK+ could be ported to Android of course, but again, but that would require considerable effort. Laying aside Java for a moment, Android apps are built and run very differently than desktop apps. The application life cycle is quite different. There is/was an attempt to "port" Qt to iOS, but it wouldn't have been a real port. Rather it would be a thin layer over cocoa, using the underlying Cocoa UI widgets, file APIs, and network APIs. I am not involved with either iOS or Android development, so I stand corrected if my thinking is in error. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: gtk apps on iOS/Android?
On 09/07/2012 07:40 AM, Allin Cottrell wrote: > I'm contemplating trying to produce a version of my gtk app > for tablet use. Can anyone point me to relevant resources or > examples? At this point I'm totally clueless about porting to > tablets (though I'm able to build my app for OS X OK), and I > haven't found googling to be very useful. Basically you'll want to get a book on developing android apps, download the sdk, and go to town. All in Java of course. And using the Android UI toolkit. GTK+ is not available on Android or iOS, nor will it likely ever be. Use the native toolkits. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: gtk+ 2.24 installation problems
On 03/03/2012 08:10 AM, Roger Davis wrote: > Sleeping on things overnight I'm thinking the best option may be to > go back to the default configure options, let all the new packages > dump their stuff in /usr/local, and adjust my environment as > necessary to pick up those libraries, etc., in advance of the > CentOS-included ones, which would include adjusting PKG_CONFIG_PATH > as you've advised. Hopefully if I do this then the pkg-config call > that's used to set my compile flags and library directories will get > me all the right stuff? Yes this is the way to go. Never overwrite your system packages. Even though GTK+ is supposed to be binary compatible between minor versions, you could and probably would break things. Even if you didn't, the next time you do a yum update, if there are any GTK+ updates, they will overwrite your custom changes. So yes. When installing GTK+ from source, always install to a non-system prefix (/usr/local, or /opt) and use environment variables to build against it and run programs. A bit of a pain, true, but less pain than breaking your system, like the other poster on this list did when he removed GTK2 in an attempt to get GTK3 to compile and install on his ubuntu box! Completely broke his OS and he will probably have to re-install. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: porting Xlib/Motif apps to GTK+
On 02/29/2012 02:50 AM, Bernhard Schuster wrote: > If your application license is either GPL or LPGL you are also > allowed to link statically (afaik), so you can deploy a gtk2 and a > gtk3 version. Edit ... so you can deploy a shared and statically > linked application binary. Just to be clear, if you use and ship GTK as a shared library, the library remains LPGL, but your app can be licensed however you want it to be without worries of a license conflict. If you use GTK in a statically-linked manner, that might cause some licensing restrictions. However I don't think GTK+ will even function properly when statically-linked to your program. This is especially true on Windows. Products like VMWare's VMPlayer and Desktop ship with their own versions of GTK+ libraries, in case the system libraries are inadequate or incompatible. This works pretty well. The entire GTK+ runtime is well under 8 MB compressed, depending on how much you remove (image loaders, etc). I'm not sure how they figure out compatibility, but launcher wrappers can easily set linker environment variables to force their shipped versions of certain shared libraries to load. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: [win32]g_iochannel and USB
On 02/22/2012 06:35 AM, Manuel Ferrero wrote: > I read the thread, now I know I have to link against the right version > of msvcrt.dll. > But I'm compiling with MinGW and according what Tor Lillqvist said in > that thread it should work. > I don't specify any path in my IDE, I just choose the MinGW gcc as a > compiler, so I assume I'm using the right DLL. How can I be sure? > > Still, I can't manage to create a giochannel with the handle I get from > the USB DLL CP210x_Open function. Perhaps you need to use this tool on your exe to find out just what dlls it is pulling in: http://www.dependencywalker.com/ I have a strong hunch that the dll providing CP210x_Open is compiled against a much newer version of msvcrt than GTK is. Unfortunately that is a problem because I'm not sure that mingw works with newer versions of msvcrt, and you'd have to rebuild GTK probably as well. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: "HELP/About" was :: [Re: suggestions on user config?]
On 02/19/2012 02:25 PM, Gary Kline wrote: > i've been looking for code to learn from. i spotted this botton > layout from the game 'Iagno' but could only find part of its source. > lucky for me that i know c++. be nice if there were some macro like > "GTK_BUTTONBOX_LEFT"! GtkButtonBox is just a special type of layout widget that keeps the buttons all the same size. You can adjust it to put all the buttons to the right, left, center, or evenly across the dialog box. Or you can use a regular hbox, set the padding and margins the way you want, and use gtk_box_pack_start() to put them towards the left, and gtk_box_pack_end() to put them towards the right. And if set the HOMOGENEOUS property, they will all be the same size. I suggest you run glade-3 and just play with the layouts to get a feel for how you can use layouts to accomplish what you want. You can drag and drop the layouts, put layouts in layouts, and drop buttons and things in to see how they space out, etc. http://www.micahcarrick.com/gtk-glade-tutorial-part-1.html, particularly part 7 that talks about packing and layout. You might even want to use glade to develop your GUIs and then use GtkBuilder to build them in your program without using code (it is easier once you figure out how it works). Building GUIs with code is still okay, but for large programs it's just too much of a pain! ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: "HELP/About" was :: [Re: suggestions on user config?]
On 02/19/2012 06:38 AM, Tadej Borovšak wrote: > Hi > >>the dialoh has a "Close" button in the lower right. In the >>lower left are two buttons. one is labeled "Credits"; next >>to it is a button labeled "License" that displays the GNU >>copyright. can somebody clue me in on how to add the two >>buttons s on the lower left? > > I don't have GNOME installed here, but my guess would be that you're > looking at the stock GtkAboutDialog, which is part of the GTK+. The GtkAboutDialog class is based on GtkDialog, which defines a GtkHButtonBox container, which you can add your own buttons to with a call to gtk_dialog_add_button() or gtk_dialog_add_buttons() ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: looking for a program....
On 02/16/2012 12:50 PM, Gary Kline wrote: >> I'm quite sure that what you're looking for is for some screen reader & >> speech synthesis solution, like Orca [1], isn't it? >> If not, or Orca doesn't fit your needs, you can deal with speech-dispatcher >> in a easy way from your application. Controlling what to say, pitch, rate, >> language, etc. Orca is not what you are looking for. Orca is a screen reader to assist the blind and seeing-impaired. It is not there to act as a voice for a person who cannot speak, though I suppose it could be used as such, but that is not its primary purpose. > i spent the entire day looking for what WAS in ubuntu 10.04 > and 10.10, but must have changed with 11.*. it has a config > panel when the program began that let you set things such as > you mention: pitch, rate, volume, ... but this program is no > longer available. > > I installed a bunch of what i thought might be helpful > tools, and now when i run VBC, I get the following > warnings: The warnings are probably harmless to your VBC program, though they indicate something isn't quite right with the screen reader stuff installed. Hopefully others can shed light on how to fix these messages that will probably come up when trying to run any GTK program. You might try logging out and back in, or rebooting. It could be that the daemons required to implement the screen reader just aren't loaded yet. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: no "File", "Edit, "Help" strings in upper left
On 01/29/2012 06:33 PM, Gary Kline wrote: > Do you really mean that is your coming appa you will have no > "File, Edit, Whatever, Help" bars? Or am i misunderstanding > the name of menubar? i like at least File because it > usually gives a way of quitting the app? What he means is that more and more apps are choosing other ways to present the user with options. Like context-sensitive toolbars. Or recently Mark Shuttleworth of Ubuntu demonstrated a system that you could type or speak and it would search for commands in the app (really a fancy way of searching a menu so menus are still relevant). In my little app I shared with you I chose not to have a menubar because it wouldn't have served any purpose. The current feature set is entirely reached via the UI in the main window. To close an app you could set up a shortcut key, usually Ctrl-Q, or sometimes Ctrl-W (window close) to terminate your app. Or let someone just hit the (X) button. Either way, very few people probably use File->Quit to quit. I know I don't. I use Ctrl-Q or Ctrl-W most of the time. Or close the window with the decoration. Menus do have their place of course. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: no "File", "Edit, "Help" strings in upper left
On 01/29/2012 01:41 PM, Gary Kline wrote: > Nada. but it compiles with my gcc string and works as it is coded on > debian linux; on my sub-laptop. but ubuntu: nope. i added gtk-demo > and rebuilt. typing > > $ gtk-demo > > pops up a rectangle with a bunch of items, but the GTK+ Code Demos lacks > the menubar ... I think in Ubuntu's Unity desktop the menubar is grabbed out of the window and placed at the top of the screen. I could be wrong, though. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: need help in looping many times...
On 01/24/2012 07:27 AM, John Coppens wrote: > Wouldn't it be easier to simply add an editor window to your program? > Use for example, the GtkTextView widget. You won't have to spawn > external editors, and always have the text available. > You can even implement cut/copy/paste, re-use recent text, etc. > > Also, you launch the reproduction as a thread, and permit editing while > permitting edition. Thread or process, it doesn't matter. GTK's g_spawn_async can do the job. As for the first, as Gary explained to me, whatever editor he uses has to be able to expand abbreviations. He can only type slowly, and automatic abbreviations can speed up his typing dramatically. He already has a nice system in vim that works for him, so he wanted to use that here. GtkTextView does not have completion capabilities. However GtkSourceView does. I've written a demo program for Gary that does use GtkSourceCompletion to do the abbreviations. Another option is to embed a vim widget (Pida embeds gvim somehow) somehow, if he's got to remain with vim. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: need help in looping many times...
On 01/23/2012 08:49 PM, Michael Torrie wrote: > On 01/23/2012 07:17 PM, Gary Kline wrote: >> vbc.tgz is enclosed; find someplace to save it, untar and make the >> 'vbc' binary. > > Unfortunately the attachment seems to have been filtered out by the > mailing list. Can you post it on our web site somewhere perhaps and > post a link here? Meant to say, post it on your web site. Or if it's a single file, you can post the code somewhere like http://pastie.org/ and send us the link. If it's a single source code file that would work. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: need help in looping many times...
On 01/23/2012 07:17 PM, Gary Kline wrote: > vbc.tgz is enclosed; find someplace to save it, untar and make the > 'vbc' binary. Unfortunately the attachment seems to have been filtered out by the mailing list. Can you post it on our web site somewhere perhaps and post a link here? ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Are there such tings like custom signals?
On 01/23/2012 02:18 AM, Manuel Ferrero wrote: > Il 20/01/2012 18.08, Jack ha scritto: > >> However, that is separate from knowing that the button has been pushed, >> so you can then start the communications. For this, is there any reason >> to use a custom signal? Wouldn't it be easier to catch the standard >> signal emitted when a button is pushed, by attaching a call-back routine? > > Infact there is no need for a custom signal once you know about GIOChannel. > But my question was intended for general cases. If I need to trigger a > complicated task when a button is pushed I'll write a callback to manage > the standard signal in which I'll start my $COMPLEX_PROCESS then return. > The question was about how to write $COMPLEX_PROCESS: it doesn't involve > GUI so it doesn't have any standard signal, but I'd like to have the > signal-callback paradigm and I was wondering if GTK gives me some tool > or if I have to rely on an external infrastructure for it. GTK indeed gives you a tool for generating your own signals. You can then catch them normally. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: discoveries! gtk DOES dim... how can i infinite-loop?
On 01/21/2012 09:49 PM, Gary Kline wrote: > this sound very much worth looking into and i will ... just > as soon as i figure out what is causing my gtk app to dim. I did give you the key to keeping GTK from dimming in my other post. It's pretty easy to iterate the main loop while you are looping in your own while loop. Anyway my code is complete and, except for saving the text and abbreviations to disk, it does everything you want with no need to try to drive gvim or anything. You could add the save to disk stuff quite quickly (even having to learn python!) And of course my secret wish is for you to learn python as you really will be able to code up these sorts of things 2-3 times faster than C. It's really quite something. My error rate per lines of code drops by a factor of 2 more compared to C. I would like some feedback on its operation. I want to know if the mechanism for doing abbreviations is as usable as your gvim method. The tarball I posted is already out of date. use the git repository url I posted instead. (git clone http://www.torriefamily.org/~torriem/tts_assist.git). cheers, Michael ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Are there such tings like custom signals?
On 01/20/2012 06:42 AM, Manuel Ferrero wrote: > I was wondering if there is some custom signal I can use to keep the > same event-driven philosophy to exchange messages between process. Of course. Though the other poster's idea of using gio channels is a good one. But yes you can create custom signals and emit them. http://developer.gnome.org/gtk/stable/gtk-Signals.html http://stackoverflow.com/questions/1557025/create-and-emit-gtk-signal ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: discoveries! gtk DOES dim... how can i infinite-loop?
On 01/19/2012 01:58 AM, Gary Kline wrote: > > i've spent the last many days tryoing [on ubuntu] anf tonight on my > EEE-900A netbook [debian]. both dim when i go into a recursive > loop. > > 1. edit with gvim > 2. have espeak voice gvim when it is written > 3 goto 1; > > tonight i did everything absolutedly write in chercking various > things, but the app still dimd if i have the function call itselg. > > i should have asked this list whether there there is a gtk call > that let's things go into either an infinite loop, or, would a > for() loop work for 300-500 loops? I already gave you the answer to this. While you are looping in your callback you have to iterate the GTK main loop: while (some long-running thing) { while (gtk_events_pending ()) { gtk_main_iteration (); } //do something } ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: discoveries! gtk DOES dim... how can i infinite-loop?
On 01/19/2012 09:05 PM, Michael Torrie wrote: > You will need to install pygtk2 and gtksourceview2. On Fedora those are > the exact package names. Apparently on Ubuntu, the packages are: python-gtk2 python-gtksourceview2 ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: discoveries! gtk DOES dim... how can i infinite-loop?
Gary, based on conversations in the past about what you are trying to do, I whipped up a little program that just might approach what you are trying to do. If I understand you correctly, you wish to do the following: - type text in an editor where abbreviations are expanded (by macros in gvim or some other mechanism in another editor) to full words or phrases, so that you can compose text faster, even with disabilities. - speak the written text with espeak the text - save what was spoken so you can load it back up and re-speak it, or edit it and speak it again. Seems like the big requirement is the ability to use abbreviations. I'm not clear on how gvim does it for you, but the GtkSourceView2 widget (not part of GTK, but all distros have it and it's fully integrated with GTK) supports what are called "Completions." They are intended for use with programming, but they also can function as an abbreviation mechanism. As you type, when an abbreviation is detected it can pop up a suggestion that pressing enter will accept, or keep typing and the suggestion will change or go away. Multiple suggestions can be made as well. So, here's my program. It's written in Python, since python is one of the absolute best languages for rapid prototyping. This app did not take much time to write, and it gave me a chance to refresh my skills and learn how to use some more advanced GTK widgets like the TreeView. Anyway, my program does not save what was spoken to disk, though that can be added very easily. It does save what was spoken during one session of running the program. As well, currently abbreviations are hard-coded in completion.py, but again that could be saved to disk easily. There's already a dialog for editing the abbreviations within the program. I believe it does most of what you require, and could be expanded very rapidly. It is written in Python, but now that the prototype is made, it could be converted to C easily, though there is no advantage in doing that really. The GUI itself was made in Glade-3, so the actual widgets and the magic behind the TreeView is hidden somewhat. Glade has the advantage of making it very easy to rapidly develop the GUI. Anyway, the source code is here: git repo: http://www.torriefamily.org/~torriem/tts_assist.git tarball: http://www.torriefamily.org/~torriem/tts_assist.tar.gz You will need to install pygtk2 and gtksourceview2. On Fedora those are the exact package names. I think it would be fun to develop this further (perhaps porting to GTK3), but I thought I'd post what I had. If it's not useful, that's fine. Python makes coding fun and very fast! Michael ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: is thaere a way to exit(1)?
On 01/17/2012 03:35 PM, Gary Kline wrote: > well, it =is= busy. it's looping endlessly; but then i > limited it to 5 loops with a for-loop. same. (i thought my > programming skills were better that having to use the > debugger, but may have to.) before, i am going to scp > everything over to my eee-900a that runs debian. see if it > runs there. i hope i don't see smoke rising from the > netbook :-) I think the problem is you are approaching your problem from a traditional, procedural point of view. That isn't going to work in event-driven apps, which is what GTK apps are. If in your code you are looping endlessly, you are preventing GTK from handling events. This means that no X11 events (mouse, keyboard, etc) are processed. Your window manager detects this and makes your app turn gray which signifies to the user that the app is hung (not responding to input). If you need to do a long-running task in GTK, either spawn a thread to do the work, allowing control of the main thread to return to GTK's main loop, or during your loop you have to iterate the GTK main event loop by doing something like this in your code: while (gtk_events_pending ()) { gtk_main_iteration (); } In general, in a callback you must return control to GTK asap for the GUI to keep running. Hope this helps. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: GTK app with scrolled window crashing trying to show a widget inside
On 12/30/2011 05:52 AM, David Nečas wrote: > On Fri, Dec 30, 2011 at 01:28:32PM +0100, Moritz Renftle wrote: >> i want to make one of those widgets visible from >> another thread > > Use glib.idle_add() in that other thread to subsequently execute the > actual Gtk+ code in the thread running the Gtk+ main loop. http://unpythonic.blogspot.com/2007/08/using-threads-in-pygtk.html It used to be that threading issues came up every week on the list. As David says, the recommended way is using idle_add. However if you use gdk locks appropriately, on Linux you can call Gtk calls directly from threaded code. http://www.pardon-sleeuwaegen.be/antoon/python/page0.html But since this won't work so well on Windows, the idle_add() technique is recommended as it is most safe and most portable. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: no joy...
On 12/22/2011 03:46 PM, Gary Kline wrote: > abbrevs. iFWIW, my last brain op messed up my entire rt > side and because my left hand wasn't that good, i type only > around 20wpm. by learning only 130 or abbrvs, you can gain > roughly 30%. so imagine some poor kid [[[ OR woman--or, > for that matter, anybody who has a driving goal to learn and > to *communicate*]]]:: there are roughly 100million with some > kind of physical disability. I now understand why you want to use something like gvim. I presume your abbreviation system is done through .vimrc macros? Please tell me more how you accomplish this. > typing on an editor like vi/gvim that has builtin > abbreviations means fewer keystrokes. > that's what gvim does. my default filename is 'talk.[N].txt. > after i've typed "[qesc]:x[enter]" espeak -f reads > it and opens "talk.[N+1]txt" and wait for keybd input. > > but say that somebody want to hear what i said several > minutes before. i heave to search all my *txt files to find > the one he wants. thed display button will bring up 500, 500 > windows. i need buttons on the popped window. or window. > One window: buttons like [prev], [nrxt], [speak] [qauit > window]. Hmm. This is going to be very hard to do with GTK+ (or any other UI toolkit for that matter). You are trying to drive a full blown graphical app in its own right with your graphical app. You could re-implement the abbreviations things you use in vim with a standard TextView editor widget in GTK+. You could do this two ways. Either intercept keystrokes and fill in the full word (easy to do in TextView), or just keep everything abbreviated and then expand the abbreviations when sending the output to espeak. Or you could try to implement your needs as native vim code. Use Gvim's facilities rather than try to hack your own in GTK+ and try to get them to work with Gvim. I'm coming back to my original suggestion. Instead of running gvim, could you just run straight vim in a VTE GTK+ widget? I presume your abbreviations are all defined in .vimrc. This way it at least integrate with your GTK+ code. That's really the only way you're going to get it to work even close to the way you describe. I might hack together something here over the holidays. It will be in python, but maybe it will help. You might want to try a bit of python. There are way less non-alphanumeric characters than in C, so it would be easier for you to type. Structure is done with spaces instead of curly braces. >> Okay so you are trying to come up with a graphical program whereby you >> can type something (say in a text box) and have espeak speak it so that >> others can hear and understand you? Do I have this right? > > > i think so; it isn't rocket science ... i'll send you the > code with the gcc line if you 'd like. Feel free to post GTK+ code here to this list and we can look it over a bit. I'm starting to get a feel for what you are trying to accomplish. I am glad you remain able to communicate fairly well through the written word. Michael ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: no joy...
On 12/22/2011 12:14 PM, Steve . wrote: > What is the preferred method to inject mouse and keyboard events to > another application? Probably that is platform-dependent. In Linux, I only know of the XTEST framework. It's not really part of GTK that I know of. I'm no expert. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: no joy...
On 12/22/2011 01:58 PM, Gary Kline wrote: > i am reallty not doing anything that arcane. the nutshell > of it is that in > > "while (!done loop)" > > gvim [ or another editor that can use abbreviations ] > creates a series of text files. 1 to some N. what it > written to each file is then read aloud via espeak -f; > this application is an attempt to help those who are speech > impaired or mute and have a small laptop. i have been > smallish gadgets that lack a keyboard. Okay that explains things a little bit better. Why are you involving a text editor like gvim or kate? Shouldn't you just either write the text you want to speak to a file and the espeak that? Or use a pipe to send espeak text? Or maybe use some kind of speaking api (maybe espeak has an api)? If I wanted to espeak something I would use fopen to write the text to a temporary file, then spawn espeak -f to read that. Or most probably I'd use popen() and send espeak the text through a pipe. That's more basic Linux programming than GTK programming of course. > my app is not targeted at people who would use the device > that has a touchscreen [plus hard drive + batteries]. I' > tried one of these things in 2003 and a later model in '09. > my disability is fairly pronounced, but i could barely lift > this box. i believe you could even play games on it. > for me, the screen was not that easy to press. i prefer an > actual keyboard. > if i'm talking to people or a person i am hard to understand > without a few weeks of getting used to my speech patterns; Well you are understandable now in e-mail, and what you are trying to do is becoming more clear. > with a shell script that i put together in 20 minutes, i > could type onto my EEE-900A and the computer would be my > voice. i have been in touch with the people who are > developing the "$100 laptop" that is being used globally. > they said: sure, create a gui app that can be used by the > physically disabled or deaf. Okay so you are trying to come up with a graphical program whereby you can type something (say in a text box) and have espeak speak it so that others can hear and understand you? Do I have this right? > > this morning, i got gvim to spawn a Konsole; espeak echos > what i typed. but while the display button (with other > buttons) can find something i typed earlier, there is no > way to close the display window. i need some means of > putting buttons on the display window. Hmm. Maybe you should post your code so that others can see what it does so far. > in my 11.10 ubunto, the makefile for one zetcode did not > build the top menu bar. the two buttons below were there. > either i'm missing some gtk package, or something else is > broken. [?] I'm not familiar with zetcode. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: no joy...
On 12/22/2011 11:22 AM, Michael Torrie wrote: > On 12/22/2011 01:03 AM, Gary Kline wrote: >> you're right. i do not want to type anything into the text file. >> instead, i want to fork gvim and use thaat to type into. it >> seems likely to work if i can have buttons in the textfile. Hmm so reading "gvim" instead of "vim" this time. It is possible to swallow an entire X window app into a widget in GTK+. This is done through the GtkSocket widget. However you can't really drive the app with keystrokes and things. To do that you need to use "XTEST" which is not going to be easy for you. Probably better to use regular "vim" and stick it in a VTE widget. Here's a python example of using vte: http://files.earobinson.org/programs/terminal.0.1.0.1844.tar.gz It's very simple. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: no joy...
Let's keep the e-mails on the list, please. You can CC both me and the list if you'd like, but replying just to the list is sufficient and I will see it as will any number of other people that want to help. On 12/22/2011 01:03 AM, Gary Kline wrote: >>> and fopen some file and display the text in the buffer. The >>> question remains: how? what am i missing to display some >>> miscellaneous words in the text window? > > > you're right. i do not want to type anything into the text file. > instead, i want to fork gvim and use thaat to type into. it > seems likely to work if i can have buttons in the textfile. Buttons in the textfile? I know you don't want to type anything in a text file. What in the example I showed you was typing in a text file? Not quite sure what you are trying to do with vim, but if I understand it at all, what you are describing is not using fopen (as you stated before). popen maybe. If you'd clearly communicate what you are trying to do that would help greatly. Since you don't seem to understand GTK+ that well, perhaps you should communicate your needs without using GTK+ terms and objects. In other words, instead of trying to describe how you would do it with your understanding of GTK+, just describe what you want in overall, non-GTK+ terms. So with that in mind what I understand you need is to be able to interactively run vim, be able to send vim keystrokes, and display it's output in a window. Is this correct? If not, then nothing I say will be of any help to you in this e-mail. My gut feeling is that you are barking up the wrong tree. What you are trying to do is possible in plain GTK+ but it's not a matter of simply writing text to a TextView. You need to implement a Linux PTY (pseudo terminal) that vim can run in, and then implement some form of terminal emulation. If you want to run an external command like vim (which requires a PTY) and drive it from GTK+, you really ought to look at the "vte" widget (http://developer.gnome.org/vte/). This implements a complete terminal emulator and PTY handling in a GTK+ widget. You can use it to run vim (directly), and send it keystrokes and have it displayed in a window. You can use the vte_feed_child() method call to feed vim keystrokes. The output of course is automatically displayed in the window. > two things: the zetcode examples`seem to work better in the windows > world than in linux. i have already tried some of their examples. I highly doubt that the examples work better in windows than Linux. You've tried the examples and what happened? > also, i am getting closer to doing what i am trying t o do. how > close? dunno. Since I don't really know what you are trying to do I'll take your word for it. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: no joy...
On 12/20/2011 03:52 PM, Gary Kline wrote: > > thanks to those who have tried to help, mostly off-list. i can't > believe how hard this is. Well it isn't that hard. Reading over the last two weeks of list posts, it's very unclear what you are trying to do. > and fopen some file and display the text in the buffer. The > question remains: how? what am i missing to display some > miscellaneous words in the text window? The TextView widget is a MVC widget. It consists of a view and a buffer component. After creating the TextView you have to ask it for it's buffer, which you can then use to add or remove text using an iterator (standard fare for container data structures). Here's a complete example, even with style tags. You can of course not use style tags at all and this example becomes a lot simpler. http://zetcode.com/tutorials/gtktutorial/gtktextview/ I found this with just a couple of seconds of google searching. "gtk textview example." Note how easy it is to set the text in the widget: buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(view)); gtk_text_buffer_get_iter_at_offset(buffer, &iter, 0); gtk_text_buffer_insert(buffer, &iter, "Plain text\n", -1); gtk_text_buffer_insert(buffer, &iter, "More text\n", -1); As the Mr Morris said, refer to the API docs. I have no idea what last parameter does. You'll have to refer to the docs to find that out. >From your other e-mails, it's not clear that you understand how GUI apis work, how widgets are placed in a UI in a hierarchy and so forth. For example, the vbox hbox problem you were having is basic GUI stuff and is explained quite well in the official GTK tutorial. You'll want to go over the tutorial I think. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: How to "extend" a widget?
On 12/16/2011 05:24 PM, jjacky wrote: > > Thanks, I do need to do some more reading on the gobject docs, great > stuff there. > > What I'm looking for is inheritance, and I see how it could be done yes. > However, that would require the original widget to be done using virtual > public methods, and I'm afraid this isn't the case unfortunately... Hmm, yes. That's what I read in Mr. Nečas's post. Unfortunate. Though as he said if only you are going to be using this new widget you can just make new static methods and use them instead. Polymorphism only comes into play when you want to call the base class method on your derived class. In other words unless you're interacting with existing code (binary or source) that is expecting the GtkCalendar class objects, you can call gtk_mycalendar_*() methods instead of gtk_calendar_*() methods. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: How to "extend" a widget?
On 12/16/2011 04:47 PM, David Nečas wrote: > I wish it was so. What invariably happens in practice is this: Thanks you. Tis unfortunate that things are this way. That said I've heard of problems in other languages where well-meaning developers marked classes as "final." Makes me like Python all the more. Anyway I don't know enough about Gtk to know if the OP can and should inherit from GtkCalender. I wonder if GTK+3 has made things better or worse in this dept. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: How to "extend" a widget?
On 12/16/2011 02:52 PM, jjacky wrote: > And while GTK is oriented-object, it is written in C and, AFAIK, there > are no such things as classes in C? As always, read the docs. Here is the documentation describing how to create new GObjects, and inherit from existing ones, implement virtual methods, etc. So if you find that you really do need to make your own subclass of the GtkCalendar you can easily do it, though as the other poster talks about, a composite widget might be the ticket too. Just remember how relationships in OOP work: The "is a" relationship means inheritance. the "has a" relationship means composite widgets. If your widget simply has a calender, then the composite widget is the way to go. If it actually is a calendar, albeit a special one, inheritance is the way to go. http://developer.gnome.org/gobject/stable/ The GOB thing I was referring to earlier: http://www.jirka.org/gob.html a specific example of using gob to extend GtkButton: http://www.jirka.org/gtk-button-count.gob.html The GOB examples you should be able to compile to straight C and use that boilerplate to implement your own pure-C extension of GtkCalendar. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: How to "extend" a widget?
On 12/16/2011 03:03 PM, Michael Cronenworth wrote: > Widgets are not plugins. They are whole objects. There is no extensible > feature to them. Just for your information, here's a couple of examples of extending GtkButton using inheritance and the GObject Builder tool: http://www.jirka.org/gtk-button-count.gob.html http://www.jirka.org/my-person.gob.html Converting the gob code to C and you should see how to do it in straight C. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: How to "extend" a widget?
On 12/16/2011 03:03 PM, Michael Cronenworth wrote: > jacky wrote: >> What I was looking into would be more taking an existing widget, and >> modifying it a little, as in changing its behavior on some aspect, or >> adding a feature, something like that. >> >> My question is: what would be the best/standard/recommanded way to do >> such a thing? > > Widgets are not plugins. They are whole objects. There is no extensible > feature to them. Not true. You can inherit from like you would any other class. And override virtual methods, add you own. If this were not possible GTK would have been abandoned as a serious platform long ago. > You will have two choices: > > 1. Copy an entire GTK widget and give it a unique name. > Example: GtkButton becomes GtkMyButton You really could Create a GtkMyButton by inheriting from GtkButton and adding your own code. However, just as in C++, the ability to override specific methods depends on whether they were made as virtual or static methods. static methods can't be overridden, but you could just shadow them with your own methods and use them instead. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: How to "extend" a widget?
On 12/16/2011 02:52 PM, jjacky wrote: > Thanks. I will have a look into Vala, although for projects I have > planned, I really want/need to be using C. Precisely. Vala makes the C Gobjects. You could use Vala to construct a class with a bunch of empty methods and then use the generated C code and fill in your code, abandoning the vala as a scaffold. > And while GTK is oriented-object, it is written in C and, AFAIK, there > are no such things as classes in C? "Classes" and other Object-oriented things are merely syntactic sugar in any language. GTK is certainly object-oriented through and through with all the classic aspects of Polymorphism, inheritance, and encapsulation. > I believe the way to create a widget based on/extending another one is > how I have done so far (based on the docs /tutorials I read), only I'm > not sure how to properly do things like "overriding" functions to change > behaviors or add features. Overriding methods is done through the GOBject's vtable. Virtual methods (as in C++) are dispatched through a function table. In the raw C code of GTK objects, this is a special struct. At least the way it used to work in GTK (my knowledge is a bit rusty) was that one struct contained the object's data, and this other stuct (sometimes called a 'klass' struct), contained the vtable. Any call to a virtual method would, using the object struct pointer itself, look up the klass structure, and look up the method to call (classic polymorphism). > > If Vala allows to do that easily and does produce C code though, I might > try and see how it does/what code it produces, but I'm not sure learning > a new language is something I wanna get into right now... Sure. as I said in my e-mail GTK developers used to use a tool called gob to create GObject-based classes, but that also has a pseudo-language. That said, working with GOBjects in C requires a lot of boilerplate code (to implement the object-orientedness), so using Vala or GOB (whatever the latest incarnation is), seems like a good idea to me, specially if you want to make your own classes and inherit, etc. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: How to "extend" a widget?
On 12/16/2011 11:05 AM, Michael Torrie wrote: > As I think about it, my knowledge of extending GTK really is out of date. So I'm not at all sure how to do in C anymore. But Vala still just might be the ticket. Emitted Vala code is supped to be directly usable from a C program. I know the LXDE folk are now using Vala to work on and extend their old C code. You can ask on the Vala list for more informatin. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: How to "extend" a widget?
On 12/16/2011 08:16 AM, jacky wrote: > As I said, I'm not sure this is the right way to do such a thing, so I > would appreciate any help/information on how one would do this > properly. Since GTK is object oriented, you could just create a new class that inherits from GtkCalender. However this is C we're using, so it's not quite as simple as in C++, Java, or Python. If I recall correctly, you'll end up with 3 files. 2 .C files and 1 .H One C file will contain the klass and vtable initialization stuff, one .C file of your implementation, and one .H file with your public interfaces, cast macros, and so forth. At one time GTK people were using a tool called "gob" to compile a single file of some object-oriented C-like syntax into these files. Seems to me, though, that you'd be well-served in doing this in Vala. Vala itself defines a C-like (more C#-like) language that compiles into C and GObject code. You can take the output of Vala and use it in your normal C development. In fact the job you describe is just what Vala was originally designed for, though Vala has gone far beyond just being a GObject compiler. Michael. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: gtk and linux
On 11/03/2011 02:07 AM, Craig wrote: > Is there a list of linux "flavors" like Ubuntu, KDE, Red Hat... that > include or don't include gtk? And, let's say that a type of linux > doesn't include gtk, how difficult is it for an average computer user to > install gtk (on a scale of 1 to 10)? Programs like VMWare ship their own GTK+ libraries that they use if they can't detect the appropriate libraries on the system. You might consider doing that as well if this is a concern to you. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Memory leaks
On 02/10/2011 12:19 AM, Costin Chirvasuta wrote: > I find not cleaning up explicitly quite ugly. I shudder at the thought > and maybe I'm not the only one. Not only that, but cleaning up > explicitly is obviously useful for some people. I guess we're at an impasse then. The discussion has now moved from the definition of "leak" to some personal idea of what "beauty" is. I know that the standard glibc library does static allocations on program load that I don't free, and don't think that glibc frees them either. That in no way impacts the "beauty" or elegance of my code. Back to the original discussion, I'm sure if someone wanted to make some patches to make GTK+ pure reentrant, actual GTK+ developers would probably take a look, and benchmarks could be made. There are a few corner cases where a reentrant GTK would be very useful, such as in a plugin system, or maybe integration with other toolkits like Qt. Or it might turn out the most elegant solution is to use separate processes and bridge them using some form of IPC and shared memory. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Memory leaks
On 02/09/2011 06:08 PM, Costin Chirvasuta wrote: > Tip: (regarding whether or not that link is relevant) Intelligence > means analogy. Being able to make connections. If you understood my > meaning and thought it wrong you should have said "You analogy is > incorrect". Not point out that you didn't find one. Why? Your link is simply not relevant to the discussion at hand. I thought I implied that your analogy was incorrect by stating that. I'm sorry you were not able to "make [that connection]." Your analogy is incorrect, I say. One last time for luck: Having a "gtk_cleanup()" has absolutely nothing to do with efficient use of memory. Whether gtk_cleanup() existed or not would have zero impact on the memory usage of your GTK program. Your program will still consume the same amount of RAM, allocated by one-time initializations of the library instance. Thus the argument as to whether GTK+ should be made fully reentrant is completely orthogonal to a pontification on efficient use of RAM. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Memory leaks
On 02/09/2011 02:29 PM, John Emmas wrote: > But my original example looked like this:- > > > Gtk::Main *app = new Gtk::Main (&argc, &argv); > > delete app; Change it to this and then look at memory use: for (;;) { Gtk::Main *app = new Gtk::Main (&argc, &argv); delete app; } If memory usage grows then GTK leaks. If it doesn't, there is no leak. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Memory leaks
On 02/09/2011 05:34 PM, Costin Chirvasuta wrote: > How times have changed: > http://www.folklore.org/StoryView.py?story=Were_Not_Hackers!.txt Nothing to do with the issue at hand. Nothing at all. The issue is whether a library intended for one-time loading should clean up after itself. Whether we're talking 64 KB or 4 GB, cleaning up every one-time allocation is still a waste of time. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Memory leaks
On 02/09/2011 05:05 PM, Jeff Clough wrote: > And the fact that so many shared library hackers have this view is the > reason modern desktops need to ship with four gigs of RAM minimum and > still can't stay up for more than a week. Rubbish. What an absurd and fallacious argument. Whether GTK+ "leaks" (by your definition) or not, your program, while running, is still going to need the same amount of RAM whether it cleans up initial allocations on program end or not. So except in the case where you want to continually load and unload GTK+'s shared libraries, deleting these initializations on exit is a waste of time. And GTK+ is not designed to be unloaded (I don't know of very many UI libraries that are), I don't see what the problem is. Whether you have a very small amount of RAM or a lot does not matter in the least. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Memory leaks
On 02/09/2011 04:39 PM, Bill C wrote: > My experience with valgrind and GTK is that it is easy to fix leaks. > > Simply look for leaked memory that you allocated. Then determine where > you should have released it. If it was not allocated by you its not > your problem so ignore it. Right. And if your memory use isn't growing without bound over time then it's not leaking. Whether GTK+ frees it's own allocations or not, your program's memory use is going to be the same. > Works for me, but I rely on minimal third party software and compile > everything with debug enabled. Dont see any sign of leakage problems in > GTK, but I dont claim to use all its features; only the ones I need for > my GUI code. > > From time to time I use valgrind to check for leaks with GTK2+ programs > written in C and it is clear that there are no leaks. Have not tried > GTK3. Have not tried the C++ wrappers. I would bet that Qt "leaks" in a similar manner to GTK+. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Window move at menubar in Gnome
On 07/05/2010 01:53 PM, Andreas Volz wrote: >> since I installed Ubuntu 10.04 I noticed that I could move windows >> while dragging the menubar in Gnome. I like this feature. But I don't >> use Gnome, but Enlightenment 17. I would like to implement support for >> this feature in E17, but I don't know which calls are behind this on X >> level. I tried to find some documentation about it, but failed. Before >> I start to dig into Gtk+ code I hope someone on this list could answer >> this question. > > Please ignore this question. It was a theme problem. I solved it. Which theme? None of the themes I use ona regular basis seem to support this operation. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: how to make my window stays on top when I'm playing fullscreen game?
On 04/14/2010 09:47 AM, Todong Ma wrote: > Sorry,my english is poor... > > I mean I want to popup a window which is created by my own program while > other applications are running at fullscreen mode. On Linux, some Window managers may not allow this. I recall that one of the "features" advertised in Gnome a few versions back was that popups would no longer steal focus from other apps. This was billed as a security feature, which I really liked as I accidentally did type a password in an IM window that popped up once while trying to ssh to another machine. If you want to post notifications, perhaps you can work with the fairly standard (on Gnome and KDE desktops) notification framework that recent distros come with. I think it's called libnotify. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: how to make my window stays on top when I'm playing fullscreen game?
On 04/13/2010 07:40 AM, Todong Ma wrote: > I want to write a program which can stays on top after it ran when I'm > playing fullscreen game. > (I mean when I'm playing the fullscreen game,I can still see that popup > window) By popup window are you talking about a modal dialog that is created by your own app? Or are you talking about popup windows from other apps that pop up while your app, running full screen and always on top, is running? ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Application termination at some point
ds.sun...@gmail.com wrote: > I learned to generate the core dump file of the test application when it > crashes... and using the gdb debugger i got the following bt... > > Could you please tell me where might be the problem? I'm afraid no one is going to be able to tell you where the problem might be. All you've given us is a stack trace. To solve the problem we'd have to debug the program for you. Since you've not provided the source code, that's something only you can do. Debugging code on Linux is done in much the same way as on Windows, although there are powerful tools on linux like Valgrind. Core dumps are useful, but it's also helpful to run the program in a debugger from the beginning. On my machine, ddd and kdbg are two debugger interfaces that work well for me. All we can do is give you tips on what we'd do or look at, which has been done. If you can create a small program (say 50 lines or less) that exhibits this problem, we can probably help more directly. The fact that the abort is occurring in a GTK call deep in the system is usually indicative of something not quite being right in your code before you call gtk_main. IE the code where you set up your windows and widgets. Or it could be in a callback for an event. In another e-mail I see evidence that you are using pthreads. Are you following the threading guidelines for GTK? If you are calling gtk calls from other threads are you using the proper locks? ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Regarding newer version of GTK php software
bhagyashri wrote: > I have used your GTK+ version for desktop application of PHP. Here you are > using PHP version 5.1.4.Is there any provision to do serial communication in > GTK+ with PHP 5.1.4? > > I have dll file for serial communication but it is working on PHP 5.2.0 or > higher. > > So please help me in this matter. This question does not have much to do with GTK itself, so you won't find any answers on this list. You'll have to ask this question of the PHP folks on one of the PHP lists. But if you do find information on PHP and serial communications maybe the PHP-GTK community can help you integrate them. My guess, though, is that you're unlikely to find anything useful anywhere. PHP is simply the wrong language for this kind of stuff. PHP is intended for generating HTML web pages and as such has no intrinsic low-level stuff, except what is hacked in crudely through extensions, such as your DLL. Python or Perl would be much more appropriate choices for a GTK application that needs serial port access. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Deadlock/Freeze
Michael Torrie wrote: > Matteo Landi wrote: >> From the FAQ entry [1] it seems I need to enter/leave threads inside each >> timeout callback. Could the procedure described be a valid solution >> for my problem? > > Yes I believe you need to call enter/leave around calls to any gtk or > gdk call inside the callback. Not sure if this has to be done in the main thread or just the callbacks, though... ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Deadlock/Freeze
Matteo Landi wrote: > From the FAQ entry [1] it seems I need to enter/leave threads inside each > timeout callback. Could the procedure described be a valid solution > for my problem? Yes I believe you need to call enter/leave around calls to any gtk or gdk call inside the callback. You might also consider the g_idle_add pattern and have threads use this mechanisms to run callbacks in the main GUI thread, avoiding the locking issues entirely and also making your program more cross-platform. http://irrepupavel.com/documents/gtk/gtk_threads.html explains this pattern somewhat. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Regarding example code (was Why is ChangeValue reentrant)
Michael Cronenworth wrote: > $ rpm -q gtk2 > gtk2-2.16.5-1.fc11.x86_64 Yup, that's it. 2.16 is the latest stable GTK+ available (2.18 isn't quite released yet) ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Regarding example code (was Why is ChangeValue reentrant)
Boggess Rod wrote: >> In cases like this, you probably have to hack around the problem/bug. >> IE solve your use case in a different way. > > Already have. Instead of using the response from gtk_dialog_run, I > gtk_widget_show_all the dialog window and return TRUE from the > change-value callback of hscale. Then I decide on the action within the > clicked callback of the Ok and Cancel buttons. It means manually adding > the buttons, but that's not a big deal. > > Thanks. The code in bug.c runs fine for me. OK allows the change, Cancel prevents the change. I'm on Fedora 11 with GTK 2.18 I think. That said, if this example is in anyway how your program expects to work, I highly recommend you take a different approach to the UI. It's a very unnatural way of working with a GUI element. Personally if I had to click OK or Cancel after each single movement of a slider I'd be driven crazy (you mentioned multiple sliders too!). If I needed to change the value from 1 to 20, for example, I have to click OK 20 times! I didn't learn much in my UI class, but I'm pretty sure there has to be a better way. Now I don't know what you are trying to accomplish, but if I were writing a program that needed to verify that a user really wanted to change a value, I'd do it *after* the value had been changed. On other words, I'd let the user change the sliders to his hearts content and then, depending on the scenario, either have a "revert" button that undid everything and canceled the operation, or have an "apply" button that would make the changes active (either for the slider itself or for the dialog box as a whole). If necessary I'd have the UI highlight which UI elements had been changed (in case the user accidentally changed a slider or something). In other words, there has to be a better way! ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Regarding example code (was Why is ChangeValue reentrant)
Boggess Rod wrote: > It should be attached to one of the messages I posted on this thread. > If you're interested, here's another copy of it. Will take a brief look at it. > I have NOT tested this on a newer version of Gtk (can't). I'm hoping > someone else out there will be kind enough to test this on newer > software and alternate hardware. I'm just a contractor working for a > company that resells process automation hardware with our software on > it. The computer doesn't belong to us, so even if my contractor was ok > with me spending time working on this more, it's not their computer, > either. Too much red-tape to upgrade from Gtk 2.6. Gotcha. If it is a bug in GTK 2.6 on HPUX, then there's not chance of fixing it either way, since you can't change GTK on the client machine. In cases like this, you probably have to hack around the problem/bug. IE solve your use case in a different way. > If you're kind enough to run this, let me know what you find out, would > you? I'd appreciate it. Will do ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Regarding example code (was Why is ChangeValue reentrant)
Boggess Rod wrote: > Sorry, I did post a small example that demonstrates the unusual (buggy?) > behavior in a follow-up post. The more I dug into it, the weirder it > became, and the more convinced I am that it's a bug in Gtk. Or at > least, a bug in the HPUX implementation of it. I'm waiting about a week > to see if I hear back from anyone on the list that they can reproduce > the problem in their environment. Did you post this code somewhere? Also did you try a newer version of GTK just as a sanity check? ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Can't quite get my head around this, can anyone help?
Boggess Rod wrote: > BTDT. Won't work because by then, the user-value I'm trying not to > loose would already be lost. Guess I don't understand the problem, then, as I don't see why this would be if you kept track of it in an external variable between callbacks. Maybe a very small, self-contained example would be appropriate. > I would have thought this was a somewhat popular function, especially > when processing records from a database. But I don't seem to know what > to search for. I can seem to find one single example anywhere that > makes use of the change-value signal. How would it be used in a database-driven app? Not having written any, it's not something I'm familiar with. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Can't quite get my head around this, can anyone help?
Boggess Rod wrote: > I guess I wasn't clear. The messagebox is working fine. It returns > whether the user clicked Ok or Cancel. I'm calling the > gtk_dialog_run(...) from within the callback of the > on_hscale_valuechanged(...) (or _changevalue) event handler. It's the > hscale's event handler that I can't get to work. > > The valuechanged signal is only raised after the hscale value has been > changed. That's too late, because if the form contains unsaved changes, > clicking message box's cancel button should prevent the hscale from > changing on the parent form. Interesting. I have no idea what would work in this case. I wonder if you could just punt and set the scale value back to the original value that it had before the valuechanged signal was emitted. Would be a bit of a hacks since you'd have to keep track of the value in an external variable. But maybe a bit of visual feedback (the scale moving and then going back) might be good from a usability standpoint. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Can't quite get my head around this, can anyone help?
Michael Torrie wrote: > Well inside a callback you can return TRUE which stops signal > propagation right here. Or FALSE, which lets it continue. So you could > do it two ways. One would be to to display a GtkDialog, and use > gtk_dialog_run() from within your callback [1]. The other would be to > create new gtk main loop instance from within your callback to allow > another window to be displayed and run, and then based have that > window's event callbacks set a flag and end the main loop, which you can > then use in the original callback to end the propagation. Forgot the references. [1] http://library.gnome.org/devel/gtk/stable/GtkDialog.html#gtk-dialog-run Also the glib main loop documentation is here: http://library.gnome.org/devel/glib/stable/glib-The-Main-Event-Loop.html specifically, g_main_loop_new() ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Can't quite get my head around this, can anyone help?
Boggess Rod wrote: > Can someone point me to some example code in Gtk that intercepts a > signal, prompts the user, and either continues or aborts the signal, > depending on user response? A button wouldn't do this, but I'm sure > there are other widgets that would. I've Googled everything I can think > of, but I either receive an overwhelming, unapplicable list of results > or none. Well inside a callback you can return TRUE which stops signal propagation right here. Or FALSE, which lets it continue. So you could do it two ways. One would be to to display a GtkDialog, and use gtk_dialog_run() from within your callback [1]. The other would be to create new gtk main loop instance from within your callback to allow another window to be displayed and run, and then based have that window's event callbacks set a flag and end the main loop, which you can then use in the original callback to end the propagation. Not example code, but if I understand what you're asking for, it's relatively doable. Why wouldn't a button be be able to do this? ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Makeing librsvg work (bizp2.dll missing)
David Nečas wrote: > No amount of talking about how your vastly superior approach is better > [for you] will make these use cases disappear (and I suppose there are > many people in a situation similar to mine). So please stop that you > are not constructive. This tone is uncalled for. David, you've made a lot of very good posts over the years and I've come to respect what you say. Sadly this time you've chosen to use some unfortunately phrasing in regards to my post. I never said nor implied that I or my methods were superior. Perhaps my light-hearted way of putting things was taken by you to imply smug superiority, but that's simply not correct, and certainly, to use your own words, "not constructive." But I give the benefit of the doubt and make a few clarifications: 1. Qt is Qt and GTK+ is GTK+, not Gtk+ (more noodles for the alphabet soup! :). 2. Bundling GTK+ with your app is not an unnecessary hardship for the developer since one has to build against a GTK+ environment anyway that one had to assemble. (This is one of the main points in my post that you assumed was merely a demonstration of superiority.) Syncing the app's runtime environment is relatively simple compared to development. 3. Bundling third-party libraries with an app is the way things work in Windows. Whether the app uses Python, Gtk, GTK+, Java, VB, or recent MSVCRT runtimes, for example. Maybe Windows 7 will improve things. 4. If you and other GTK+ app developer want to develop a standard among yourselves, you may. The end user problems you will cause in doing so have been spelled out clearly and distinctly in this thread by others. If the end user's experience is really your number one priority as a developer, then I hope you can see why Tor and others are correct when they strongly recommend against a common runtime install, and why there will never be an official shared runtime. But what you do is your own business. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Makeing librsvg work (bizp2.dll missing)
Hartmut Goebel wrote: > Please note: Your arguments are sheer technical ones. You are ignoring > the "marking" side. But for me, your arguments simply do not count, > since I simply want to *use* GTK for my application. Currently this is > very, very tremulous (again see my other postings these weeks). I do not > want to build up a large infrastructure just to maintain the toolkit. I > want to improve my application! This pain has grown that big, that I > thing about moving to QT instead. What is the "marking[sic]" side? Do you mean "marketing?" If so then there aren't really any marketing cases for an official system-wide runtime installation. Even for Visual Basic apps the recommended course is to bundle the runtime with your app (in the app's folder), since there are now so many versions floating around. Also I believe MS even recommends you ship the version of msvcrt you are using with your app rather than rely on a system-wide one, as a new version of the runtime ships with every version of visual studio. I think your points about keeping dependencies, such as zlib, up to date is well-taken, but the rest of your points seem to be about getting Tor to do your work for you. I have produced several programs on win32 (never did installer in these cases though; just zipped up the app folder with GTK inside it). It's not that big of a deal. I just built up my cross-development environment with the zip files that Tor provides out of the goodness of his heart--now SuSE and Fedora both ship fairly complete cross versions of GTK+. After compiling, I copied all the necessary DLLs to the app folder, added the share and etc folders, and I was done. There wasn't any large infrastructure to maintain, other than keeping the dlls up to date, but a simple script does that by copying the dlls from my cross environment. Even after following this entire thread I'm still unsure of why you are in such pain! I'm not sure how you think QuickTime is going to help you, but if you're thinking of using the Qt GUI toolkit, I think you'll find that Qt solves none of these issues either. As far as the issue that this thread is debating, Qt, like GTK+, recommends that you ship the Qt DLLs and supporting files in your app's own folder--there is no official Qt runtime installer. The Qt runtime is about the same size as GTK+'s. I've also built one fair sized Qt program that I support on Windows. Like with my GTK apps, after building in the cross environment, I have a simple shell script that copies the Qt DLLs and supporting files to the app folder and I'm away. In one projects I've also uses nsis to make a nice installer for my app and it's DLL dependencies. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Virtual drag drop using gtk api's
rajat mahajan wrote: > The link i have provided is on windows. I need the same on Linux I don't know anything about it, really. Here is a link on the freedesktop specification that might give you some idea. Then again it might not. Basically there's nothing in the drag and drop raw protocol to prohibit this from working, but it's a matter of what the drop target expects (which you have no control over). http://www.freedesktop.org/wiki/Specifications/XDS ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Makeing librsvg work (bizp2.dll missing)
Freddie Unpenstein wrote: > That sounds straight forward enough. And a hell of a lot better than the > current situation. I just checked the latest pidgin installer and indeed they do operate this way. However their GTK runtime just uses the major version number, so it installs to C:\Program Files\Common Files\GTK\2.0 for all versions of 2.x. At first glance this would seem to be okay as GTK is supposed to be ABI compatible across backwards from newer 2.x versions to older ones. In practice there can be issues though. In past years, Gaim and Gimp for windows actually had different versions of GTK that they needed, and with this common scheme there ended up being conflicts. IE Gaim would run but Gimp wouldn't. In linux we could solve this by having versions stored with their full version number, and symlinking the latest one to 2.0 for programs that don't need to know or care. But in Windows you can't symlink. So if you choose to go this route, be aware that your GTK runtime could cause Pidgin (or other programs using a common GTK runtime) problems and vice versa. Hence the conventional wisdom to just bundle the runtime with each app. And actually issues like theming and OS integration shouldn't be a problem as on Windows there ought to only be one theme for the app: the Windows look and feel. Users shouldn't know that the app is GTK-based; it should just appear to them to be a windows app. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Virtual drag drop using gtk api's
Is this on Solaris? Linux? X11? Framebuffer? OS X? ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Makeing librsvg work (bizp2.dll missing)
Freddie Unpenstein wrote: > Not everyone is free from the space issue. Some people using > ultra-small laptops can be running a full desktop version of > software, but still have sub-desktop resources. > > What I don't understand, is why GTK+ doesn't come with its own > installer that lets the user choose, application- or system- wide... > I for one would much prefer all my GTK+ applications to look the same > as they do on Linux. Having a global GTK+ install would help there. > I understand that's not the Windows Way, but it's supposed to be, if > you listen to the Microsoft propaganda... Well I think it's clear that without a system-wide packaging system and a mechanism for keeping the system-wide packages up to date (they are third-party on windows after all), it does not make any sense to have system-wide GTK libraries installed to anywhere in C:\Windows\ system folder. I think that violates Microsoft's (recent) guidelines anyway on what should be in system32. If you are hell-bent on a system-wide GTK, then you need to do it the way that Gaim for win32 used to. They would install GTK to C:\Program Files\Common Files\GTK\%version%. Then their own app would go to C:\Program Files\Gaim. The magic is in the startup shortcut (or batch file). All they have to do is start Gaim inside the GTK folder (optionally add the application's bin folder to PATH). Hence this scheme supports multiple versions of GTK also by just adjusting which folder the app actually started in, if that makes sense. It seemed to work pretty well. I'm not sure if they still do this though. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Stop alt-spacebar window menu
Michael Torrie wrote: > So it looks like it is certainly possible to take alt-spacebar away from > the window manager. Just now I noticed that VirtualBox's virtual > machine windows do this very thing. In fact alt-clicking to drag/resize > is eaten by virtualbox as well. So there must be a way to do what you > want. I suppose the open source VirtualBox source code may shed light > on this. I should add that this behavior seems to be true on Gnome when the pointer grab is turned *off*. In other words I haven't captured the keyboard and mouse into the virtual machine window yet alt-spacebar, alt-click, etc, are all not passed to the window manager. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Stop alt-spacebar window menu
Bill Farmer wrote: > Thanks for all the help. I've put it in the too hard box for the moment, > but will come back to it later... So it looks like it is certainly possible to take alt-spacebar away from the window manager. Just now I noticed that VirtualBox's virtual machine windows do this very thing. In fact alt-clicking to drag/resize is eaten by virtualbox as well. So there must be a way to do what you want. I suppose the open source VirtualBox source code may shed light on this. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: "portable" applications
John Zavgren wrote: > My intuition tells me that there must be a better way to build an > application that will run on more than one Linux machine. > > Is there a simple way to statically link the esoteric aspects of my GUI You can use the "ldd" command to see what your binary is linking to. The biggest problem you will run into is that your version of GTK may be newer than the version of GTK on the machines you are trying to target. For example RHEL 5 probably is about a year or more behind Ubuntu in terms of GTK version. That said, GTK is supposed to be ABI stable for the entire 2.x series. In other words as long as you don't use an API that was introduced along the line, it should run fine with older libraries. In practice it may not always work. What most companies do that distribute GTK-based software is to ship the GTK runtime libraries with their app and using a script fall back to them (using the LD_LIBRARY_PATH environment variable) when the system GTK will not suffice. However to make that work well you have to make sure you're not trying to link against a version of GLIBC that is newer than the target OS. I think, however, that your best bet is to give your coworkers the tarball and have them do a "./configure ; make ; make install". With source code available, that is the easiest, best, and most portable way. So to summarize, the things you have to worry about are: - target GLIBC version - target GTK2 version - target architecture (32-bit vs 64-bit) ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: How to set a window filled the whole screen when we start the window?
donglongchao wrote: > Thank you very much.That is just what I need. > I am not very familiar with the API manual. I always program with a web browser open showing the API docs. Although they often lack documentation and examples (they are generated from the source code), they at least document the API calls and parameters, the various enumerations, structures, etc. Invaluable, although a bit hard to search. Fortunately google helps out there. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: slowness in getting events
Efraim Yawitz wrote: > Hi, > > I am trying to port a Windows application to Linux with GTK+ and an > important part of the GUI is a grid displaying a hex dump of memory which > must be constantly updated. > > I am implementing this using a gtk_drawing_area You might want to implement this hex dump display as a GtkTreeView widget, which does lend itself better to displaying tabular data. The MVC mechanism by which the TreeView works means that the view automatically updates itself as the model (your hex data) changes and emits signals. You an even have multiple views of the same data if you need it. There are also a number of custom widgets that implement spreadsheet-style grids you can search for. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Problem with gtkbuilder & mingw cross (not the signal problem)
John Stebbins wrote: > Tor Lillqvist wrote: >> (Adding gtk-app-devel-list back as Cc. Please let's keep this >> discussion on the list.) >> > Oops, didn't notice that reply went direct to you instead of to the list. >> Why make it harder for yourself, why not use a shared library (dll) >> build of gtk+ like everyone else? >> >> --tml >> > Short answer, I don't know what I'm doing ;-) . > I saw that cross development environment announced on freshmeat, and on > a whim I decided to try porting my application to windows. It looked > like a nice self contained set of tools that could get me there. I > didn't explicitly ask for it to build static. From the package's > "feature" list, "creates libraries to be linked statically, no DLL hell". The last time I build a cross-compiler from scratch and build the GTK stack for it, it created all dlls. I guess that was my own setup though. I use only Tor's official zip files if I do that now. As far as I know, GTK simply cannot run statically linked, especially on win32. Basically all kinds of paths are keyed off of the main gtk dll's path. In other words, if you put the gtk dll in a folder named bin, it will automatically check in ../etc/ for stuff like the gtkrc file, ../lib/gtk-2.0 for things like theme engines. This makes it easy to bundle the runtime up with your EXE on windows. In short, GTK just isn't designed to be a statically-build system. Additionally if you did so, your resulting executable has to be licensed to users under the terms of the LGPL, something that is not always desirable. It's not hard to add the official gtk win32 binaries, libraries, and include files to your cross-compiler's environment. On my machine I have /opt/mingw/i386-pc-mingw32 and inside there are bin, include, and lib directories. I just unzip the zip files inside that folder, and things normally go into the right places. The only catch is dealing with pkg-config. you have to set the PKG_CONFIG_PATH variable to point to /opt/mingw/i386-pc-mingw32/lib/pkgconfig, but also you ahve to modify all the .pc files for GTK to have the linux paths on your machine (paths to the mingw areas). ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list