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: The Future?
On 03/09/2019 11:29 PM, Miroslav Rajcic wrote: > IMO, it seems that GTK does not have a coherent strategy when it comes > to toolkit features and a cross-platform usage (i.e. lowering the effort > needed to develop for all major OSes). Nowadays it is mostly focused on > adding shiny things as support for shaders, animated transitions, GL > rendering. Have you seen Qt lately? Remember that GTK is a massive undertaking, carried by a relatively few number of mostly volunteer developers. GTK does have coherent strategies and goals, but maybe they aren't quite in line with what you think they should be. Among those goals are the development of the Gnome desktop environment and the development of graphical Linux (and to a lesser extent, Unix) applications. I suspect that if GTK future development wasn't including shaders, animated transitions, and GL rendering, folks would complain that it's lagging behind Qt which is highly focused on these things now, and has been since Qt 4 days. Qt is a commercial system, increasingly focused on mobile space, as well as maintaining the traditional cross-platform GUI widget framework. >From what I gather from your post, you likely aren't going to be happy with the way Qt is going anymore than you appear to be with GTK. Qt's future and strategy is clearly declarative, responsive GUI layout (like HTML and CSS), and heavy use of Javascript glue to animate it and bind it all together, OpenGL (or Vulkan) for rendering, with your preferred programming language only needed to do the back-end heavy lifting and OS-specific interaction. On the plus side, language bindings become incredibly thin and easy, consisting mainly of a wrapper around the QObject class (that's all that's required for QtQuick). Anyway, it's not a zero sum game. Qt being chosen by some does not diminish GTK, or vice versa. Nor should GTK simply follow Qt. From what Mr. Bassi has said, it sounds like GTK 4 will bring some impressive features and capabilities. ___ gtk-list mailing list gtk-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-list
Re: Past and future evolution of Gtk+
On 09/18/2017 09:03 AM, Carsten Mattner wrote: > Qt5 and GTK3 both seem to be very hard to write a Hello World > X11 or Wayland window that uses less than 25MB to 30MB. > This is something that can quickly become a problem and > deal breaker if you want to run more than a few GUI applications. Hardly. People run a full Gnome (or Mate) desktop all the time with lots of GTK apps running. Similar for KDE and Qt apps. You can't measure memory usage like that. What Linux reports as the memory used includes mapped files like shared libraries. This isn't real memory use in the sense you are thinking. I can assure you that ten hello world programs do not consume 300 MB of real memeory in total. ___ gtk-list mailing list gtk-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-list
Re: Past and future evolution of Gtk+
On 09/18/2017 07:39 AM, Carsten Mattner wrote: > Ian, Qt and FLTK have GUI builders and FLTK generates code, not markup. > Qt is used heavily with the declarative variant QML in entertainment > systems of cars and such. If QML is something that works for you > and the licensing is compatible, then consider a lunch break checking > it out. Like Gtk, Qt can also work directly with an XML interface definition file. In Gtk, you can use the GtkBuilder class to parse a glade UI file (which is XML), and generate the in-memory objects for that UI, and interact with it just as if you had created it manually with gtk_*_new() calls. Likewise, Qt has something similar. The equivalent to Glade is called Qt Designer (often /usr/bin/designer or /usr/bin/designer-qt5). It creates .ui files that are XML similar to how Glade does it. Qt has a component called uic which translates the XML files into C++ code. But you can do it dynamically at runtime, similar to GtkBuilder. The class is called QuiLoader. Mind you Qt is a competitor for Gtk+ only if you don't want to code in C. ___ gtk-list mailing list gtk-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-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 <torr...@gmail.com> 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-compiling GTK+, missing icons
On 05/29/2017 03:24 AM, Gerardo Ballabio wrote: > Yes, I managed to build self-contained Windows executables (using GTK+ > 2) that don't need any additional resources to be installed. Just download > the file and run it. I tested with Windows XP and 7, but I expect them > to work on newer Windows versions too. For example see here: > http://www.nongnu.org/galois/#download Very interesting. How did you do this? So far as I know GTK isn't even designed to work in a statically-linked scenario. ___ gtk-list mailing list gtk-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-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: Glade architecture change
On 03/03/2017 07:16 AM, LRN wrote: > Does this make sense? Was this already considered during previous Glade > rewrites? If yes, why was it discarded? Thoughts? I'm not sure GTK+'s architecture would even allow glade to operate in a manner like you suggest. Besides that, Glade's instability doesn't seem to have anything to do with how the preview process displays the actual widgets. > P.S. This proposal was not well-received on #gtk+, so there's that. How was it presented and why was it not well received? ___ gtk-list mailing list gtk-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-list
Re: Come up with layout like QT in new version
On 03/03/2017 02:53 AM, feyyaz özdemir wrote: > Hello i want to use GTK yy while using c language programming > language python programming language but if I have layout like QT, Is there a question you wish to ask? Unless you ask an understandable question, you will not get a reasonable reply. Guessing (which is always dangerous), I would say you are asking if you can lay out widgets in GTK+ in a similar manner to how you do it in Qt. And the answer to that is, yes. GTK's widget layout facilities are very flexible and very powerful, and very similar to Qt's layouts. Primarily you pack widgets into GtkBox containers, which can resize and adjust automatically. The GtkBox container is analogous to the QBoxLayout container. Qt has the concept of spacers (QtSpacerItem), which don't exist as separate widgets in GTK+, but you can get the same effect in GTK+ by using the expand and fill flags when packing the widgets into the box. ___ gtk-list mailing list gtk-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-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: CSS to look more like Gtk+ 2
On 12/19/2016 07:39 AM, Nicolas George wrote: > Sorry, despite mostly lurking, I have been around longer than you, and > you are wrong: Gtk+ exists because of Gimp, not Gnome. > > And the policy turned sour about the same time the Gnome developers > overflowed the original Gimp developers. Like you I've been around lurking since the early Gimp days. I used one of the very first releases of GTK outside of Gimp. I know that several current Gnome developers who are heavily involved in GTK+ development were in fact heavily involved with Gimp development back in the day, some 20 years ago. ___ gtk-list mailing list gtk-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-list
Re: CSS to look more like Gtk+ 2
On 12/11/2016 09:15 AM, Nicolas George wrote: > My searches on the web did not produce anything. I found a GTK3 theme that does a reasonable job of emulating ClearLooks. I can't remember where I found it, but I modified it some time ago (colors mainly) and made it be a GTK3 companion to my preferred ClearLooks-Inverted GTK2 theme I was using. It's not perfect (scroll bars are still not right), but it looks much better. > Side question: is it possible to disable client-side decoration with > CSS? PCMan (who has sparred with GTK developers before over this) maintains a module that you can use on top of GTK (it's a library preload) that disables CSD and it has been updated to work with at least GTK 3.20. See https://github.com/PCMan/gtk3-nocsd I thought about rolling his module into a patch for GTK itself and then just build my own GTK3 libraries since I'll never be interested in using CSD, but GTK changes enough that it's not worth the effort. It would be great if there was just an environment variable that I could set to disable or enable the CSD stuff. There used to be such an environment variable if I recall correctly. ___ gtk-list mailing list gtk-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-list
Re: gtk_file_chooser_dialog_new and gtk_file_chooser_native_new very slow on a Windows 10 64-bit PC
On 12/08/2016 10:24 AM, Ian Puleston wrote: > Yep, this was it. I disabled the floppy drive in the BIOS as the poster > there said he did, and the problem went away - now the file chooser dialogs > open immediately. Also the first two paragraphs there almost exactly mirror > the OS and hardware upgrades that I've done on my PC, including switching to > SSDs, if that might be relevant. So we know the cause of the problem, which is a timeout having to do with enumerating a non-existent floppy device. But the question is, why does GTK exhibit this problem but other windows programs or frameworks typically don't? Clearly GTK could be smarter about it and work properly without having to disable anything in the computer's firmware. So I would argue that GTK in fact has a bug in it. We can swear it's not GTK's problem because it's Windows' fault. Or the BIOS. But that doesn't change the fact that GTK has the problem and other apps simply don't. Probably a low priority, but there must exist a method that will get GTK the information it wants without hitting this call that is causing the timeout. ___ gtk-list mailing list gtk-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-list
Re: Can we install a gtk program without root privileges?
On 12/01/2016 08:49 AM, Stefan Salewski wrote: > My Nim editor https://github.com/ngtk3/NEd can be launced from the > directory with the binary by typing > > ./ned file.nim > > For testing that is fine. But to make it work from an arbitrary > directory something like > > # And for making gsettings available system wide one method is, as root > # https://developer.gnome.org/gio/stable/glib-compile-schemas.html > # echo $XDG_DATA_DIRS > # /usr/share/gnome:/usr/local/share:/usr/share:/usr/share/gdm > # cd /usr/local/share/glib-2.0/schemas > # cp org.gtk.ned.gschema.xml . > # glib-compile-schemas . > # > > # as root > cp nimdark1.xml /usr/share/gtksourceview-3.0/styles/ > cp nim.lang /usr/share/gtksourceview-3.0/language-specs/ > > is necessary as described in the doc. That is fine for myself, but I > can understand that other people fear to damage their system when doing > root actions. > > Problem seems to be the gsettings path and additional the gtksourceview > directories. May there exist a way to make it work at least on Linux > without root privileges? According to the gtksourceview docs you can use a local directory for the specs and styles: $HOME/.local/share/gtksourceview-3.0/ Presumably on Unix machines. I would hazard a guess that there is also probably an environment variable that gtksourceview could look at to specify a custom directory so you could make up your own search path. On Windows, if GTK still behaves as it used to, you can place everything relative to the GTK dlls' path. So you'd end up with a folder with your EXE in it, along with the DLLs, and then the lib and share folders inside of that folder, where you'd place things that'd normally be in /usr. ___ gtk-list mailing list gtk-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-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: 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: GTK 3.22 Breaking My Eclipse IDE
On 10/12/2016 09:19 AM, Markus Walther wrote: > Upgrading to GTK 3.22 broke the Preferences window in my Eclipse IDE. It > has also caused strange positioning of the Eclipse splash-screen at startup > and gives a lot of GTK warnings in the console (see attachment). > > Buttons and text inside the Preferences get cut off. This is also the case > for many if not all other 'sub-windows' of Eclipse. > > Reverting back to 3.20.9 has now worked for me to get rid of said issues. > > Can anyone make sense of these Warning & Critical messages that I get? > > Tested on: > Arch Linux > Eclipse Neon & Neon.1 (eclipse-java-4.6.0-1) > The following GTK packages: > 3.22.1+8+ge11df6c-2 > 3.22.1-1 > 3.22.0+29+gfa23641-1 > 3.22.0+21+gad32a48-1 > 3.22.0-1 > > With Adwaita & Numix themes These are all theme (CSS) errors. Apparently theming is expecting slightly different CSS from what it was using in 3.20 and 3.22 (again). However, I thought that Adwaita was GTK's default theme and ships with GTK. If so, are you sure you're running the GTK 3.22 version of this theme? ___ gtk-list mailing list gtk-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-list
Re: Gnome with high resolution display (4k, 27 inch)
On 09/23/2016 05:30 AM, Andrea Giammarchi wrote: > Thanks for sharing your findings, I've updated archibold.io page with this > info. > > Not sure we should file a bug in tweak tool project, I'll try to > investigate how/where but hopefully they are reading this ML too. I've always wondered why we have to bother with HiDPI stuff at all. Seems kind of backwards to me to just scale things (pixels really) by an arbitrary factor. Why can't things be simply defined in terms of pixel-independent units? That way they'd look good regardless of the DPI. Don't get me wrong I'm sure a high-resolution display looks quite lovely with the Gnome HiDPI stuff turned on. But it would also look lovely if the GUI itself could simply scale to adapt to any resolution. Hopefully someone can enlighten me as to why after years of hearing about the promise of vector graphics allowing arbitrary and beautiful scaling of our user interfaces, we are stuck with this HiDPI kludge and apps that still think in pixels. And is this likely to ever change? ___ gtk-list mailing list gtk-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-list
Re: Gramps 3.4.9 problem with ubuntu 16.04, which may be related to GTK 2.24.30
On 06/29/2016 12:48 PM, Enno Borgsteede wrote: > I know how to compile a GTK version myself, and it's no big issue to add > log statements either, but I don't want to replace the system GTK+ > version 2, because many other applications still depend on it, and I > don't want to corrupt my whole system. So, what I like to know is how I > can push Python to work with a hacked GTK+ version 2 that sits in my > home folder. You can use the LD_LIBRARY_PATH environment variable to have Linux load your custom debugging GTK libraries. No need to overwrite the system libraries. ___ gtk-list mailing list gtk-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-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/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
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: 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 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: 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: GTK+3 win32/64 build environment
On 04/13/2013 07:37 PM, tarn...@tarnyko.net wrote: As a majority of you told me it was so easy and effective to cross-compile from Linux, rather than doing it navitely on Windows, I finally felt like trying it. Well, after some hacking... you were right ^^. I extracted my GTK+3 buildenv on my favorite Linux distro, installed some packages, adapted some scripts, hacked around 2-3 specific problems, and it ran just fine. Now I've got a complete GTK+3 Win32 bundle, generated from Linux. So now we have two fast-identical buildenvs, one for Windows and one for Linux. Just a drawback : like I previously said, cross-compiling GTK+3 from Linux requires to build the stack twice. It's no big deal, just that the Linux buildenv has more specific scripts -I'm currently rewriting them. I will upload all scripts to Git as soon as I get my account approved. Thanks a lot for your advices. Thanks for doing all this hard work. We'll all benefit from in. Question for you and for other windows GTK developers. Is it desirable to continue to compile against msvcrt.dll instead of a more recent, VS-compatible version? Is the issue simply one of licensing for the dll itself (IE distributing it to Linux environments to compile against is not permitted)? Of course this problem of incompatible msvcrt dlls goes well beyond GTK. All windows projects have to deal with this issue. A distribution of Python might be compiled with VS 2008, and the developer writing C api python modules might be using VS 2009. Maybe there's not a good solution in general. ___ gtk-devel-list mailing list gtk-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-devel-list
Re: Is GTK+ a cross-platform toolkit ?
On 03/04/2013 06:03 PM, tarn...@tarnyko.net wrote: (We're speaking policy here, but to support my point in technical terms : - my reusable GTK+3 build environment : http://www.tarnyko.net/repo/gtk3_build_system/ ; - sample bundle I have produced : http://www.tarnyko.net/en/?q=node/20) So an officially-produced (or sanctioned) .zip file of GTK3 binaries would be useful. However, a runtime installer would not be. On Windows you should always ship the GTK binaries with your own executable. In fact that's how the DLLs are designed to work on the Windows build of GTK. Put the DLLs in the directory as your binary, and put all the support directories underneath this directory (lib, share, etc). Years ago there were gtk runtime installers out and abotu and it was a right mess. Some apps would find it and run, others wouldn't. A new app would want to install a new runtime, and it would clobber the existing install, breaking existing apps. The maintainer at the time rightly refused to get involved with this runtime installer nonsense, and continued to provide official zip files, which were very much appreciated. Unfortunately, he had to move on and apply his time to other efforts in his life. ___ gtk-devel-list mailing list gtk-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-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: Permission to use the icon
On 01/28/2013 08:24 AM, Evgeny wrote: Hello We work on Windows Package Manager ( http://code.google.com/p/windows-package-manager/) released under GNU GPL license. It helps to find and install software, keep a system up-to-date and uninstall it if no longer necessary. I'd like to ask for permission to copy the 'GTK+' icon (gtk+-3.4.0/demos/gtk-demo/gtk-logo-48.png) to Npackd web server and use it for 'GTK+' package identifying icon. As far as I can tell all the icons are licensed under the GPLv2 (the license is unmodified, so the phrase, or later version should still apply). At least according to this non-canonical source: http://commons.wikimedia.org/wiki/GNOME_Desktop_icons ___ gtk-list mailing list gtk-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-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: Bug 687752 - work with theme authors
On 11/11/2012 10:17 AM, Benjamin Otte wrote: GTK 3 at this point really is just the GNOME toolkit. There is absolutely zero involvement from anyone else. Neither XFCE nor LXDE nor Windows or OS X developers take any interest in pushing the toolkit forward - apart from occasional bug reports and patches. All features are prototyped, coded and maintained by GNOME developers. So in its current state I would call GTK a part of GNOME. It's worth pointing out that this was basically the same situation with GTK 2. My comments have nothing to do with themes, but more to do with GTK fulfilling my needs as a GTK app developer (not a Gnome developer), and a response to the idea that GTK is the Gnome ToolKit now. GTK2 had a workable Windows port at least, which I did use. And on OS X at least there was X11. And it could be ported with minimal effort to most modern Unix systems with an X server. I understand the lack of contributions to drive GTK forward on these fronts, and that is unfortunate, but certainly not the fault of the core developers. Even more unfortunate, though, is that because of the tightening of coupling between GTK and Gnome, you're heading towards dropping support non-Linux systems entirely in GTK. And even on linux, Gnome itself (the perception is GTK is being drug along too), is being coupled closely to components like systemd, udev, and other things which are nice, but desktop distro-specific (Fedora mainly). An embedded linux board running some minimal distro wouldn't have those. And I think this integration is partly what is causing push-back by the other distro makers and users. If, for example, a light-weight rescue distro wants to have a widget toolkit on which to make apps, what do you recommend? Part of what made GTK2 so wonderful is that it was easy to use PyGTK and hack together a light-weight, standalone app that did something useful. I'm only a casual developer, and I love using GTK (2), because it is just portable enough for my needs. Much of what I would do in the future I could see targeting small pseudo-embedded computers. Say ARM with a touch screen (no I don't want to run android), perhaps running only an X server, with no udev, no systemd, and a single app. GTK3, with support for touch and multitouch would seem to be a good candidate for targeting a GUI to such an environment, if it were light and platform-independent like GTK2 (read: not tied to Gnome). I don't need or wnt Gnome's many layers. And if GTK3 can't fill my needs, that's okay; there are options, though none as nice as GTK's api. ___ gtk-list mailing list gtk-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-list
Re: Bug 687752 - work with theme authors
Interesting... Even this mailing list has been changed to Gnome List, instead of GTK List. On 11/30/2012 10:08 PM, Sergei Steshenko wrote: FLTK ( www.fltk.org ) ? There are also Perl bindings - if one wants quick GUI development: http://search.cpan.org/dist/FLTK/ Drifting further off-topic here, I realize. Perl is not a language I turn to for any purpose, really. I've looked at many of the GTK alternatives before, and none of them really appeal to me. At this point, there really is only one alternative to GTK, and that's Qt. I wonder what firefox and libreoffice will do in the future. Both of them are definitely not Gnome apps. Both of them largely implement their own widgets, using part of GTK for look, and function (event loop and such), so porting to another toolkit may be possible. Whether or not Gnome developers feel that Firefox is relevant, it is probably the most-used linux app out there, and if you count Google Chrome, which is also GTK-based, there is a lot of usage here, and the desktop environment itself doesn't matter so much. ___ gtk-list mailing list gtk-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-list
Re: This issues on compiling GTK+ from source and using GTK+ 3.x, GTK+ 2.x, and GTK+ 1.2 on one computer.
On 11/01/2012 04:57 AM, onetmt wrote: So, as you can see, apt-get can let them coexist (all in all, apt has the power of super-cow, hasn't it?); no need to recompile everything from scratch. Off topic, but this ability to get different versions of a library to coexist peacefully has absolutely nothing to do with apt-get, or even the debian packaging system. ___ gtk-list mailing list gtk-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-list
Re: This issues on compiling GTK+ from source and using GTK+ 3.x, GTK+ 2.x, and GTK+ 1.2 on one computer.
On 11/01/2012 05:54 AM, Hongyi Zhao wrote: On 11/01/2012 06:57 AM, onetmt wrote: on my system (Debian Sid): I use Debian Squeeze 6.0.6, which is the stable distribution, not the testing one used by you. The reason that I don't use the Debian Sid/testing is that the virtualbox within Debian testing currently will not let me run the Win 7 smoothly on my pc, I don't know the reason;-( Unless you have some moral or philosophical reason for sticking with the GPL version of VirtualBox that comes in the Debian repositories, just install the non-GPL version from virtualbox.org. It will run just fine on Debian Sid. In my case, the Debian Squeeze/stable, I only have the GTK+ 2.x from the repository, unless I use the mixed repository from stable and testing. But, according to my experience, use a mixed repository is dangerous, it will bring more and more packages dependence issues with cann't be solved easily. So, in my case, if I want to use GTK+ 3.x, the best way should be compile it manually. In my experience, compiling GTK+ manually is never the best way, unless you are fully versed with proper use of pkg-config, and how to properly set PKG_CONFIG_PATH before compiling GTK+3 apps and then LD_LIBRARY_PATH before running your GTK+3 apps. Note that if you use jhbuild it defaults to putting things in /opt, which will require the use of the variables I mentioned. If you compile by hand to the normal /usr locations, then you can just compile and run as if GTK+3 was shipped with the distro. ___ gtk-list mailing list gtk-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-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: 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: 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 matka.pooha...@gmail.com wrote: On 7 October 2012 12:58, jcup...@gmail.com 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: next steps for touch support in GTK+
On 08/04/2012 07:41 AM, Emmanuele Bassi wrote: and yet another case of i'm so nervous and irritated by criticism of our design decisions that i'll resort to calling people stupid ... design has nothing to do with it, sorry to disappoint the conspiracy theorists. just another case of somebody is wrong on the Internet that I should know better not to reply to. Just recently there was a discussion on this list about ways to better communicate between GTK+ devs and others including GTK+ users in order to attract potential contributors and keep GTK+ users in the loop as to the future of GTK+. For this reason I'm gratified to see this thread hit the devel list. It's interesting to be updated on the direction GTK+ is heading. That said, if the GTK+ developers cannot accept criticism of design decisions (you don't have to explain every little thing of course), or at least tolerate them (not the same as ignoring btw), then I fear we have the same problem that we had before, which is the perception that GTK+ developers are doing their own thing and not listening to the users. Maybe the only GTK+ users that matter are the Gnome developers, I don't know. But certainly at least two GTK+ users on this list have expressed the legitimate concern that the GtkSwitch widget has usability issues, which seems fair. They are definitely not wrong on the Internet. Doesn't mean they are right and that GTK+ should change direction, but reacting the way you did doesn't reflect well on the GTK+ developers. A more proper way to react may have been I can see your point, but current UI direction and usability research disagrees with you or we've received very positive feedback regarding this widget from GTK+ users and feel like this is the right direction to go. Agree to disagree, etc. Instead we're left wondering if GTK+ is just doing things because they're cool (IE Apple does it). ___ gtk-devel-list mailing list gtk-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-devel-list
Re: Fully winding down my involvement in GTK+
On 07/22/2012 04:20 AM, John Emmas wrote: That's been my experience anyway. With no facts stated to support your response, it is merely your opinion. My opinion is also just an opinion, however I believe the points in support of my opinion are factual and logical (which you haven't refuted). Calling for a forum because it makes you feel warm and fuzzy is nice but it doesn't prove anything. I'm not opposed to a forum provided that it a) has a full threaded structure like e-mail has, and b) has a good gateway for e-mail or nntp. In general I mean. ___ gtk-devel-list mailing list gtk-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-devel-list
Re: Fully winding down my involvement in GTK+
On 07/21/2012 07:44 AM, John Emmas wrote: Perhaps an answer would be to play down the mailing lists and IRC (for users) and encourage more use of the GTK+ forum. The great advantages of forums are:- My vote is e-mail or nntp instead of forums. 1) They keep a reasonably ordered record of discussions. Sure, but e-mail lists or nntp can do this as well, and are, in my opinion, more easily searched by google, provided the list archive is public, which almost all listservs can do. 2) Users only see the discussions they want to subscribe to. I'm not sure such fine-grained control is that useful to the community that GTK devs might be wanting to reach. Splitting the lists by purpose (devel vs application development) seems good enough. 3) Users feel more connected to the product than they do with a mailing list. Only in your opinion. 4) Developers can dip into discussions as and when it's convenient for them. This is the beauty of using e-mailing lists or newsgroups and a real e-mail client like Thunderbird or any traditional client. Threaded views allow this much more easily than forums. No need to bump a topic just to keep it in sight. Web forums tend to lose participation in topics quickly if other topics are also popular and bump them off. 5) Some users can be 'Power Users' who help the others (thereby reducing time pressures on the actual devs). Sure, but on forums I do frequent, I just find the colored badges annoying because they don't really relate to the person's knowledge levels necessarily. On the list we already can tell quickly (after a week or two) who knows what they are talking about and who have good answers to questions. At least it is very apparent on other lists I'm on. Some of those things are theoretically possible with a mailing list - but forums definitely handle them better. I'm sure there are lots of other things that would help too. We just need to start thinking them up! I can't think of anything a forum can do better than lists myself. I consider web-based forums to be the scourge of the internet. What I definitely do not need is another web forum to have to follow. The fact that RSS feed aggregators even exist would seem to me to be proof of the inadequacies of web-based solutions. E-mail lists or newsgroups work excellently well for the following reasons: 1. Everything is in one place as far as I'm concerned. I simply fire up Thunderbird and the mailing lists from the dozen or so lists I follow are all there in their own neat little folders which I can open up and browse very quickly without having to go to a url, possibly remember usernames and passwords, etc. Perhaps those that prefer forums need simply to be introduced to IMAP folders and automatic mail filters which are brain-dead simple to set up (Gmail can do them with just a single click, filter messages from this list). 2. E-mail clients are way faster than forums. Except for the D language forum, every forum I have ever used was frustratingly slow. 3. E-mail has a threaded structure that few forums have. Forums tend to be pretty much be linear, which only works well for a conversation between two people. In real life, conversation between many people often involves branches or threads of discussion. Indeed in thunderbird I can watch parts of a thread work out, and ignore other parts. For example, on the python list, any branch of a thread that involves certain people who are known trolls is almost certainly not worth even going down. However other branches of the same thread from other respected people are going to be insightful and informative so I will read those. Almost all forums have no similar structure. Even worse most forum affectionados stare at me blankly when I talk about threaded topics. They don't even realize what they are. I kind of blame google for this and their conversation view of e-mail which fails horribly for the kind of needs that have been mentioned by the parent and grandparent posters. 4. More usernames and passwords required to participate, and often even to search. With e-mail, posting a message is normally just a matter of sending from a registered e-mail address. Spam can be a problem, sure. But forum spam gets bad too. 5. E-mail just works better on handheld devices. I don't want to have to mess with the mobile web browser for dozens of forums, or worse an app for each forum that is really just a mobile browser. Tapatalk makes life a bit easier for mobile users, but still that's a proprietary solution. 6. I'd rather use my e-mail client's editor than some tiny html editor widget. I hate forums so much that I once wrote a python app that would scrape a web forum and offer it as an nntp source. Forums, since they lack the true threaded structure I mentioned, don't map especially well to e-mail or nntp unfortunately, so I abandoned the project. Just my thoughts. ___ gtk-devel-list
Re: Fully winding down my involvement in GTK+
On 07/19/2012 06:54 AM, Kristian Rietveld wrote: Also, I struggle to identify with the community these days -- that is, I do not agree how GTK+ is being developed. Discussions appear to mainly happen on IRC, which I can impossibly follow, contrary to on the mailing list; Now that you mention this, I have noticed practically no traffic on any of the devel lists in the last few years. I am probably not alone in thinking GTK development had stalled (though GTK 3 is obvious evidence to the contrary!). Does not give a good message to potential GTK users who want to check things out. The non-devel lists do have a fair amount of traffic, but it is now somewhat rare to have core GTK developers participate like they used to in the old days. I agree heartily that the mailing list is a much better place for tracking development. IRC is too instantaneous (time zones preclude participation often), and IRC logs are extremely tedious and difficult to follow as they lack the structure that e-mail has. As a lurker who would like to follow gtk development, if the developers would return to the list I think it would be of great benefit to potential contributors like me (though maybe the potential is too small to even consider). Certainly as long as GTK development discussions primarily take place on IRC I will be unable to follow and even consider contributing in any way, even a tiny way. ___ gtk-devel-list mailing list gtk-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-devel-list
Re: Using the Look of GTK+ in FLTK
On 06/12/2012 07:47 PM, Torsten Giebl wrote: I am thinking about the idea of giving FLTK ( http://www.fltk.org ), a GUI toolkit, the same Look as the installed GTK+ toolkit with its current used theme/style. The idea would be to use all the functions of the current theme/style, whatever the term is in GTK+ and blit them to a Gdk PixBuf, which i can then use in my FLTK code. The goal is to make FLTK look like as integrated, as GTK+ and QT already are, on the Linux Desktop today. What would be the easiest way, to achieve that ? I have no idea either, but I would start with looking at the code that Qt uses to interact with the GTK theme API. ___ gtk-list mailing list gtk-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-list
Re: the start-up process of gtk+ app
On 04/12/2012 08:50 PM, wrote: I konw we first need to initialize via gtk_init(),then create a window via gtk_window_new. But now,I want to know the process of the initialization ,the create of window ,etc. And eventually ,to understanding the gtk+ 3 how to call the x11 backend and display the gtk+ 3 application. Your best bet is to open the code and take a look for yourself. Another thing you should do is build GTK from source with full debugging enabled, then run your gtk app in a debugger (like ddd) and trace the execution into GTK. If you build GTK from source you'll be able to step into GTK code and see what's going on. ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
Re: Can GTK run without a C main function?
On 03/23/2012 10:23 AM, Patrick wrote: Hi Everyone Please forgive this strange post, I am not a professional programmer but I am trying something a bit difficult. I like Lua but I have fallen in love with Ada now. Looking at Ada Lovelace's wikipedia page, she is portrayed as a fairly attractive woman, so I don't blame you. :) Lua's library support is not great but the language really shines when used with C libraries. I would like to use Ada in a similar way and ignore all the Ada libraries, including the GTK binding. I am presently trying to compile a mixed c ada application. The program calls C GTK in a non main c function. The main function is on the Ada side. Is this permissible? Does GTK depend on a C entry point? So far as I know, gtk wants to be initialized with gtk_init(). Then you have to start up the GTK main loop with gtk_main(). You can do this from anywhere, not just main. Unfortunately, calling gtk_main does not return until a call to gtk_quit(). So you could say that gtk_main is the C entry point. If you are okay with GTK being in control, and calling back into your ada functions, then it should work fine. And really in event-driven programming, you react to events anyway. You don't program procedurally. If you have an Ada loop you have to run, either to poll something or to do a long-running calculation or process, you could do it in another thread I, and call g_idle_add to do things in the main GTK GUI thread. ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
Re: Can GTK run without a C main function?
On 03/24/2012 04:31 PM, Michael Torrie wrote: I am presently trying to compile a mixed c ada application. The program calls C GTK in a non main c function. The main function is on the Ada side. Is this permissible? Does GTK depend on a C entry point? You can also set up GTK using pure ada. Then C functions should be able to call into it using C GTK calls and it should work fine. http://libre.adacore.com/libre/tools/gtkada/ ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-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: how to install GTK+3.2.0 correctly
On 02/22/2012 07:38 PM, wrote: Recently I install GTK+3.2.0 according the GTK+3.2.0 installation guide in ubuntu 11.04. When I finished the install and reboot the computer, I found that system interface has changed and file can't open by mouse. And I think the question is GTK 2.x and GTK+3 in the same process is not support. When I uninstall GTK 2.x, a new question is coming.The GNome is can't work normally and I can't enter the system interface. So how I should do next? Here My GNome version is 2.32.1.If I should first put the GNome upgraded to 3.2. I very much look forward to someone can help me,and to express my heartfelt thanks. While your GTK 2.x installation can probably be fixed, it will require some terminal work using text mode or KDE or some other desktop. And it will take some effort, especially if you don't well understand your distro's package manager. Probably, you will just want to re-install the OS and chalk it up as a lesson never to remove system components or replace them unless you really know what you are doing. If you want to play with GTK 3 on your Gnome2 box, build it with jhbuild. This will put everything GTK needs (dependencies, etc) in /opt, where it won't conflict at all. Though you do have to play with LD_LIBRARY_PATH and PKG_CONFIG_PATH once you get everything built. http://live.gnome.org/Jhbuild ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-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: how to run GIMP in firefox 10.0.2
On 02/28/2012 12:11 AM, wrote: Recently I install GTK+3.2.3 in my ubuntu 11.04 and I want to run GIMP(its version is 2.6.11) in the firefox. Unfortunately,I cannot implement it. (The GNome version is 2.32.1). I built the GTK+3.2.3 with --enable-x11-backend --enable-broadway-backend and enabled the network.websocket.enabled and network.websocket.override-security-block. When I input GDK_BACKEND=broadway GIMP , the GIMP can work but not in the firefox 10.0.2. I think I must make some mistakes in somewhere ,just I can find it .So I hope someone can help me.Thank you. Does Gimp even use GTK 3 or is it still GTK 2? Where did you install your custom GTK 3 libraries to? Are you sure GIMP is using your new libraries? You probably need to use the LD_LIBRARY_PATH environment variable to point gimp at your custom libraries. ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
Re: how to run GIMP in firefox 10.0.2
On 02/28/2012 08:17 AM, wrote: I use GTK+3.2.3 and install GTK+ in /opt/gtk and LD_LIBRARY=/opt/gtk/lib. All variables be setted. Just what I said ,I feel all works was be done. Whether I need to link browser with apps by setting some variable?? No I'm afraid not. Gimp 2.6.11 is not a GTK 3 app. You can verify this with ldd /usr/bin/gimp and you'll see that it links against GTK 2 libraries. You can try downloading the 2.7.x edition which I think can use GTK 3 ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
Re: how to run GIMP in firefox 10.0.2
On 02/28/2012 05:57 PM, wrote: I ldd the GIMP 2.6.11,and it linked GTK 3 libraries. Of coure , I will download the 2.7.x and try it. Where do you see GTK 3 libraries? This is the result I ldd: zhl@zhl-Inspiron-620s:~$ ldd /usr/bin/gimp libgtk-x11-2.0.so.0 = /usr/lib/libgtk-x11-2.0.so.0 (0x005f8000) libgdk-x11-2.0.so.0 = /usr/lib/libgdk-x11-2.0.so.0 (0x00115000) ^^^ These shared libraries from from GTK+ 2.x. You need to download the gtk3-port from GIMP's source repository (I think it's git) and give it a shot. As the other poster said, it's buggy and still under development. ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-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: how to install GTK+3.2.0 correctly
On 02/22/2012 08:36 PM, wrote: Recently I install GTK+3.2.0 according the GTK+3.2.0 installation guide in ubuntu 11.04. When I finished the install and reboot the computer, I found that system interface has changed and file can't open by mouse. And I think the question is GTK 2.x and GTK+3 in the same process is not support. When I uninstall GTK 2.x, a new question is coming.The GNome is can't work normally and I can't enter the system interface. So how I should do next? Here My GNome version is 2.32.1.If I should first put the GNome upgraded to 3.2. I very much look forward to someone can help me,and to express my heartfelt thanks. Gtk 3.2, if compiled by hand, should install to a non-system location such as /usr/local. If that is the case it will not conflict with the system GTK. I am unfamiliar with the installation guide in Ubuntu 11.04 so I cannot say whether GTK 3.2 interfered with GTK 2. I don't think it should have. Rebooting is entirely unnecessary after an installation, by the way. Curse Microsoft for instilling this urge in all of us. Your mistake was in removing GTK 2. I don't think the package manager should have let you do that, so you probably forced it to uninstall, correct? You _could_ install Gnome 3.2 form source using jhbuild, but I recommend that you re-install GTK 2 anyway. You will have to use the text-mode login to do this with aptitude. If you cannot get that, you will have to re-install Ubuntu. Removing system packages will break a lot of things, as you have learned! Years ago I wanted to get StarOffice running on my linux machine, but it required a newer version of Glibc, which is of course *the* core system library. As you can imagine, trying to upgrade it broke everything. Had to re-install because no commands would work. And I had a friend that removed Python from her gentoo box. Haha that broke everything too. Fun times. ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-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: 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: 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 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: 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: Compiling GTK program for Mac on Linux
On 01/26/2012 06:27 PM, Paul Davis wrote: On Thu, Jan 26, 2012 at 7:58 PM, Paul Miller miller...@gmail.com wrote: Can anyone give my some information on how I would compile a GTK program for Mac on Linux? you almost certainly cannot do this. Back in the 10.3 PPC days I had a full, working cross-compiler setup on Linux. I wasn't using GTK at the time, but I could emit full Qt-based app bundles. Was pretty slick. After 10.4 came out and fat binaries, I couldn't get things working. And now they've switched compilers, so it's looking less and less likely. ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-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: 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: 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: 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?
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: 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?
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: 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: RFC: new features
On 01/14/2012 10:26 AM, Stefan Sauer wrote: I agree that showing the tips as a startup dialog is somewhat annoying. On the other hand it would be useful to have a way to tell users about neat tricks and stuff and is not totally obvious. Sure, all of this can be documented in the manual, but apparently those are read even less often. Not sure if info bars that auto-hide after a while are better ... As for manuals and help files go, I'm not sure what is cause and what is effect. And of course there is something to be said for making features of programs easily accessible. I conceded that some use this tips feature, as another poster indicated. It might be worth gathering real use statistics on it if I were an app developer. Currently I can't think of any big-name, and well-used programs like Photoshop or MS Office that do this anymore, though they were very common a few years back. Seemed to me like it was a passing fad and Linux apps were late to the party! Not sure about info bars either, but they might be less intrusive and maybe people would actually read them. ___ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list
Re: RFC: new features
On 01/13/2012 12:52 AM, Stefan Sauer wrote: TIP-DIALOG I've seen several implementations in aps (e.g. gimp has one). I did one for buzztard. It shows a random message from the tips list. I don't know of anyone who actually finds such a dialog useful to be honest. Many users I know sigh when they see that dialog when running an app for the first time, check never show this again and get their work done. In my opinion (only worth half a penny) such a feature is a waste of code in an app, and probably not worth the effort to implement in GTK. ___ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list
Re: gtk3 replacement for gdk_pixmap_foreign_new
On 01/05/2012 12:57 AM, Mario Kemper wrote: Can't you use gdk_pixbuf_get_from_window() if you want to capture the contents of external windows? More details can be found here: http://developer.gnome.org/gtk3/stable/ch25s02.html#id1616337 That could work if you called gdk_window_foreign_new() on it to get the GdkWindow pointer for it first. Failing that, I think LiVES will have to resort to some X calls to do it. ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
Re: gtk3 replacement for gdk_pixmap_foreign_new
On 01/04/2012 05:40 PM, Michael Torrie wrote: On 12/30/2011 02:56 PM, salsaman wrote: I would like to know what cairo function is the equivalent of gdk_pixmap_foreign_new(). I cannot seem to find any reference to this anywhere. Actually does this function replace it? cairo_xlib_surface_create_for_bitmap() http://cairographics.org/manual/cairo-XLib-Surfaces.html Thought it requires more information than the gdk call, it does create a Cairo surface for a native X11 pixmap, which if I read the GDK manually correctly, that is what the deprecated call does. I found this function by searching Google for cairo surface native X11 pixmap ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-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...
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/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 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 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 file 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/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 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: How to extend a widget?
On 12/16/2011 11:05 AM, Michael Torrie wrote: stuff 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 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 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 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 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 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: Did GTK+ had an embedded version?
On 12/01/2011 05:03 AM, Clemens Eisserer wrote: Hi, There was a version once targeted at DirectFB, but as far as I know its no longer maintained. It turns out that running a tiny X server is just as fast and light as doing DirectFB. I believe what used to be called the kDrive X server is now in the standard Freedesktop X server package (not sure what they call it these days). GTK's main competitor Qt still maintains a framebuffer version if you are determined to stick with the direct framebuffer. ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
Re: GTK+ on Mac OS X status
On Nov 23, 2011 1:12 AM, Gour g...@atmarama.net wrote: Does wxWidgets do more in regard to the 'behaviour's mentioned above? You'll want to ask the wx developers about that. They have their own mailing lists and forums I'm sure. I'd like to avoid pointer debugging and have statically compiled language. Not sure what you mean about a statically compiled language. In any case take a look at gtkmm sample code before casting judgement here. I think you'll find that template based automatic reference counting makes things really nice. And when used properly c++'s guaranteed destruction pointer problems are really not a major part of debugging. Anyway. I've enjoyed using gtk with c c++ and python. I've only developed for Linux and Windows though. ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list