Re: Closing XTerm causes the GTK app to exit, inspite of disown/nohup on its PID - why?
Wild guess; use strace to look for a signal at the time the window is closed, and add code to replace the handler for the signal. For instance, to handle Ctrl+C gracefully in Python that uses GTK, some of my code does this; GLib.unix_signal_add(GLib.PRIORITY_DEFAULT, signal.SIGINT, callback) -- James Cameron http://quozl.netrek.org/ ___ gtk-list mailing list gtk-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-list
Re: XTestFakeKeyEvent GDK-equivalent
For quick hacks or testing apps, I use xdotool. I've no idea if it works with Wayland though. -- James Cameron http://quozl.netrek.org/ ___ gtk-list mailing list gtk-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-list
Re: trouble with g_stat
On Sun, Jun 03, 2018 at 10:27:48PM -0400, GaryW wrote: > My use of g_stat causes a segfault, but regular stat works ok. I’m using > mingw64 on Win10 under msys2. > [...] > > GString *fspec; > > GStatBuf *stBuf; > > //fspec->str tested to hold the correct file spec… > > if(g_stat(fspec->str,stBuf)<0){… [9476 Segmentation fault] stBuf is an uninitialised pointer. g_stat will try to write to the address; undefined behaviour results. Try allocating some memory of the right size, and assign that address to the pointer before calling g_stat? -- James Cameron http://quozl.netrek.org/ ___ gtk-list mailing list gtk-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-list
Re: Is it possible to catch ALT+TAB and do nothing
On Mon, May 07, 2018 at 05:03:40PM -0500, Igor Korot wrote: > James, > > On Mon, May 7, 2018 at 4:46 PM, James Cameron wrote: > > On Mon, May 07, 2018 at 04:27:57PM -0500, Igor Korot wrote: > >> Paul et al, > >> Any idea how to configure FVWM to not to give focus to xterm if one > >> specific window is displayed? > > > > You might ask on an fvwm mailing list, but fvwm does have a > > NeverFocus method that can be applied to an application such as xterm. > > Yes, just subscribed to their forum and will ask that question. > > > > http://www.fvwm.org/documentation/manpages/fvwm.html > > > > But that would just fix your problem for xterm; to enforce focus for a > > lock screen, there's more to do. Have a look at the code for other > > lock screens to find out what that is. > > We do not provide any external application where the user can interact > with the keyboard/focus handling > in order to try and guess the information that should be secured. > Only the xterm is a concern. If this is an embedded system or kiosk application, replace xterm with something of your own making that uses libvte as a widget. That way you can assert full control over when the widget is visible. I've found VTE acceptable for most use cases I've thrown at it. Though I still use xterm when I can. > [...] -- James Cameron http://quozl.netrek.org/ ___ gtk-list mailing list gtk-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-list
Re: Is it possible to catch ALT+TAB and do nothing
On Mon, May 07, 2018 at 04:27:57PM -0500, Igor Korot wrote: > Paul et al, > Any idea how to configure FVWM to not to give focus to xterm if one > specific window is displayed? You might ask on an fvwm mailing list, but fvwm does have a NeverFocus method that can be applied to an application such as xterm. http://www.fvwm.org/documentation/manpages/fvwm.html But that would just fix your problem for xterm; to enforce focus for a lock screen, there's more to do. Have a look at the code for other lock screens to find out what that is. Briefly, make a global mouse and keyboard grab, subscribe to window visibility events, and when they occur raise the window above whatever was stacked on top of it. You could also adjust xterm sources to ask for focus skip; bit 0 of _WIN_HINTS property. > > I tried: > > [code] > Key Tab A M WindowList("!xterm") > [/code] > > but it doesn't work. > > Thank you. > > > On Mon, May 7, 2018 at 12:44 PM, Paul Davis > wrote: > > the window manager can intervene to catch more or less any key combinations > > the user has told it to be interested in. if the user told it use Alt-Tab > > for focus switching, it will catch that. you can't stop it. > > > > On Mon, May 7, 2018 at 12:52 PM, Igor Korot wrote: > >> > >> Hi, Paul, > >> > >> On Mon, May 7, 2018 at 11:42 AM, Paul Davis > >> wrote: > >> > If there is a window manager (and there just about always is), you can't > >> > stop it from doing what it is configured to do. You're just an > >> > application, > >> > and it takes higher priority managing window events than you. > >> > >> Yes, we are using FVWM as WM. > >> I got a suggestion to write a function for this WM to stop the > >> Terminal to appear > >> when our Lock Screen is active, but here no one is familiar enough with > >> this WM > >> to write such a function. > >> > >> And I guess a different route is just not possible. > >> > >> And I would also guess that even if I put the "stay on top" flag, > >> pressing the ALT+TAB will > >> definitely switch the focus. Am I correct? > >> > >> Thank you. > >> > >> > > >> > On Mon, May 7, 2018 at 12:01 PM, Igor Korot wrote: > >> >> > >> >> Hi, ALL, > >> >> Is it possible to catch the ALT+TAB when one particular window is > >> >> displayed and do nothing, i.e. not switch to a different window? > >> >> > >> >> We have a program which displays a full sized window without the > >> >> title. Its role is to Lock screen" - user should not be able to do > >> >> anything until (s)he supplies password and hit the "Authenticate" > >> >> button. > >> >> problem is that t is possible to hit "ALT+TAB" and switch the focus to > >> >> the window below it (such as Terminal) and type something. > >> >> > >> >> We also can't use the lock screen window because of some other issues. > >> >> > >> >> So is it possible to catch ALT+TAB and do nothing for one specific > >> >> window? > >> >> > >> >> On the side note - is there a better list (with more traffic) where I > >> >> can post question like this? Or this list is still good and > >> >> operational? > >> >> > >> >> Thank you. > >> >> ___ > >> >> gtk-list mailing list > >> >> gtk-list@gnome.org > >> >> https://mail.gnome.org/mailman/listinfo/gtk-list > >> > > >> > > > > > > ___ > gtk-list mailing list > gtk-list@gnome.org > https://mail.gnome.org/mailman/listinfo/gtk-list -- James Cameron http://quozl.netrek.org/ ___ gtk-list mailing list gtk-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-list
Re: enchant and gtk
When trying to build myself, make freezes at "Scanning dependencies of target WebCore" Any help would be appreciated! On Jul 31, 2015 4:39 PM, "James Stortz" wrote: > Hey all! > > Does anybody have a copy of webkitgtk compiled without enchant, (via the > cmake flag, DENABLE_SPELLCHECK=OFF)? > > or would anybody be willing to compile one for me? I'm on a laptop with a > single-core and 1.9Gb RAM, so I did start the compile process, but it's > just a little long! > > Is there anything else in the GNOME 3 environment that won't launch > without libenchant, besides the gnome browser? > > I noticed the "welcome" app that lets you choose your > launguage/keyboard/wifi settings won't launch, nor the system settings. I > didn't know if that was due to webkitgtk as well. > > Thanks & Regards, > James > ___ gtk-list mailing list gtk-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-list
enchant and gtk
Hey all! Does anybody have a copy of webkitgtk compiled without enchant, (via the cmake flag, DENABLE_SPELLCHECK=OFF)? or would anybody be willing to compile one for me? I'm on a laptop with a single-core and 1.9Gb RAM, so I did start the compile process, but it's just a little long! Is there anything else in the GNOME 3 environment that won't launch without libenchant, besides the gnome browser? I noticed the "welcome" app that lets you choose your launguage/keyboard/wifi settings won't launch, nor the system settings. I didn't know if that was due to webkitgtk as well. Thanks & Regards, James ___ gtk-list mailing list gtk-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-list
GtkWidget focus line color
I am creating a GTK3 theme and want to have all indicator focus lines a particular color in all states. At the moment the focus lines uses the color of the widget state it is on... for example: .button { -GtkWidget-focus-padding: 2; -GtkWidget-focus-line-pattern: "\0\0"; padding: 1px; border-width: 1px; border-style: solid; border-color: @theme_base_color; border-bottom-color: @gradient_from_color; background-image: -gtk-gradient(linear, left top, left bottom, from (@gradient_from_color), to (@gradient_to_color)); color: @theme_fg_color; } .button:hover { border-color: @insensitive_color; background-image: none; background-color: @theme_selected_bg_color; color: @theme_selected_fg_color; } When the mouse hovers over a button the focus line color changes from @theme_fg_color; to @theme_selected_fg_color but I might want it to stay @theme_fg_color (or perhaps another color set globally). In GTK2 I achieved this using the pixmap engine and an png image: image { function= FOCUS recolorable = TRUE file= "Others/focus.png" border = { 1, 1, 1, 1 } stretch = TRUE } I am not using any GTK3 engine and had hoped something like this would have worked (it doesn't). *:focus { color: @theme_fg_color; } I am looking for something like an option "-GtkWidget-focus-line-color" which doesn't exist or someone who knows how I might achieve this. I don't mind if I have to use an image and have actually been trying to use border-images and such but haven't been successful. Thanks James ___ gtk-list mailing list gtk-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-list
In-App Analytics
Does anyone know of a library for in-app analytics for GTK apps? On mobile platforms it's pretty popular to have analytics where, like on the web, anonymous usage stats can be collected. This really helps developers understand how their app is being used, what features are or aren't used, etc. Regards, Cassidy James ___ gtk-list mailing list gtk-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-list
Question about a Gtk-WARNING message when running gedit
Hi gtk-list: I recently built and installed GTK+ version 3.6.4. This ended up 'breaking' my old RHEL system supplied version of gedit (version 2.16.0). So I went ahead and built and installed gedit version 3.2.6. This version works, but I get the following Gtk-WARNING every time I run gedit: (gedit:9928): Gtk-WARNING **: Theme parsing error: :5:10: Not using units is deprecated. Assuming 'px'. It appears to me that this may be caused by a call to a GTK+ function somewhere in the gedit source code using a deprecated call format. However, I don't know what to look for in the gedit source code. What GTK+ function would such a WARNING be associated with? Or is this caused by some other problem? Jim Tilton ____ Dr. James C. TiltonVoice: 301-286-9510 NASA Goddard Space Flight Center FAX: 301-286-1776 Mail Code 606.3E-Mail: james.c.til...@nasa.gov<mailto:james.c.til...@nasa.gov> (Computational & Information Sciences and Technology Office) Greenbelt, MD 20771 URLs: http://ipp.gsfc.nasa.gov/ft_tech_rhseg.shtm, http://science.gsfc.nasa.gov/606.3/TILTON/ and https://powellcenter.usgs.gov/globalcroplandwater/. ___ gtk-list mailing list gtk-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-list
Re: OT: tcl/tk GUI app
Georgios Petasis wrote: if {$dir ne ""} { # your action here... } Georgios Petasis Thank you ... at least with that, so far I can display the selected directory in the main window ... that is more than I had. (for those not interested ... you may easily stop reading here ... thank you) What is the action, you ask? (1) enter a search string (exact match, but not case sensitive) (2) select a starting directory (3) search recursively from there (3.1) search first for a list of files ending in *.odt (3.2) search each file on the list (found in 3.1) for the string (3.2.1) make a list of matches (3.2.2) display the match list in a scroll box ... or some variation of that. I have odt2txt (downloaded and running), and I have a couple of (BASH) shell scripts that complete the set. I put all three in /usr/bin. The set works like this ... (1) in a terminal window (1.1) cd to /desired/path (1.2) enter the following: searchODT string [string [string ... [string]]] (1.2.1) that is, at least 1 and up to 9 space separated arguments (hard coded arbitrary limit) (1.3) searchODT sorts out the string, combining all arguments into one string (1.4) searchODT calls depthODT, which generates the list (file) of *.odt files (1.3.1) search is recursive beginning at the 'pwd' where the original searchODT command was issued (1.4) searchODT then calls odt2txt for each entry in the list (file) (1.4.1) the output from odt2txt is grep'd for the string(s) (grep -i) (1.4.2) matches are put into another file for display (1.4.2.1) it is possible to use: more, soffice, kwrite (and I am sure others) for the display. Other than argument count, there is basically no error checking at the moment. (scripts available, if interested) The original project was to done to help my spouse, because dolphin (file manager) doesn't seem to be able to search inside OOo documents? And the current version functions well enough. But I though I might be able to use this opportunity to learn some more tcl/tk. Thank you for your help Regards Fred James ___ gtk-list mailing list gtk-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-list
OT: tcl/tk GUI app
All My apologies for being somewhat off topic (OT), but I don't know where else to turn (your pointers in that arena would be appreciated as well). I am trying to learn some GUI programming and what is readily available to me is tck/tk, and I have a (very) little experience with it. I want to open a dialog to choose a directory, and then put that choice into a variable to be used by another action. So far I can only get the dialog set dir [tk_chooseDirectory -initialdir ~ -title "Choose a directory"] which works fine in and of itself, of course, but I haven't been able to use the result for anything as yet. Any help you may be able to offer would be appreciated. Thank you Regards Fred James ___ gtk-list mailing list gtk-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-list
Re: Can't use lpr in printing
Fabrice DELENTE wrote: Hello. In Evince, I can only print to a file, not directly to lpr (which is set up correctly on my machine and prints ok). What can be the cause? Thanks. Fabrice DELENTE I cannot remember why I don't use 'evince' (2.20.0) but I can print from it ... the printers simply appear in the printer dialog box for selection. Can you supply more detail/error message/something? Regards Fred James ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
Change in FileChooser behavior
Hello List, I recently upgraded GTK+ version 2.24.7 and discovered that the behavior of the FileChooser has changed. This change makes FileChooser very inconvenient to use. Previously, the file selection dialog would automatically show the files in the current working directory. Now, the file selection dialog automatically lists "Recently Used" files, and there is no option to select the current working directory. Apparently I am setting up my FileChooser incorrectly. How to I set up FileChooser so that it provides me with an option to look in the current working directory? I see that there is a member function "add_shortcut_folder" that I could use to add the current working directory as a shortcut folder (but then I would have to mess around with C's getcwd() function). But I didn't need to explicitly set the current previously. Is it a requirement that I explicitly set it now? If so, why was this change made? It seems this should be a simple thing. What am I missing? Thanks. Jim Tilton ____ Dr. James C. TiltonVoice: 301-286-9510 NASA Goddard Space Flight Center FAX: 301-286-1776 Mail Code 606.3E-Mail: james.c.til...@nasa.gov<mailto:james.c.til...@nasa.gov> (Computational & Information Sciences and Technology Office) Greenbelt, MD 20771 URLs: http://ipp.gsfc.nasa.gov/ft_tech_rhseg.shtm and http://science.gsfc.nasa.gov/606.3/TILTON/ ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
slightly OT: install IITM multi-lingual editor
OT: install IITM multi-lingual editor on Linux (developed using the GTK tool kit and so the GTK library is required for running the editor. The current implementation has been tried only under RedHat 6.2 and RedHat 7.2.) $ uname -a Linux localhost 2.6.22.19-desktop-2mdv #1 SMP Mon May 5 20:55:05 EDT 2008 i686 Intel(R) Pentium(R) 4 CPU 1.70GHz GNU/Linux Install went without error, but upon trying to run the application, while I got the expected window (and the GUI appears to respond properly...at least superficially, as I haven't tried to do anything as yet) I also got the following error messages in the terminal window (CLI) ... $ ./iitmeditor Gtk-WARNING **: Failed to load module "libgail.so": libgail.so: cannot open shared object file: No such file or directory Gtk-WARNING **: Failed to load module "libatk-bridge.so": libatk-bridge.so: cannot open shared object file: No such file or directory ** WARNING **: Couldn't find pixmap file: new.xpm ** WARNING **: Couldn't find pixmap file: open.xpm ** WARNING **: Couldn't find pixmap file: save.xpm More detail upon request, of course ... any help or pointers would greatly be appreciated ... Thank you Regards Fred James ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
Re: Check if dbus program is running
Kevin Anthony wrote: Hello What would be the best way, in C, to check if a dbus program was running, before i ran a dbus command against it? Lost me ... at the system level, ps -ef (or some similar call) piped to grep dbus ps -ef | grep dbus | grep -v grep will probably show several hits ... anywhere near what you are talking about? Regards Fred James [fredjame@localhost ~]$ ps -ef | grep dbus | grep -v grep 145631 1 0 01:10 ?00:00:00 dbus-daemon --system fredjame 7403 1 0 07:52 ?00:00:00 /usr/bin/dbus-launch --exit-with-session --sh-syntax fredjame 7404 1 0 07:52 ?00:00:00 /usr/bin/dbus-daemon --fork --print-pid 4 --print-address 8 --session [fredjame@localhost ~]$ ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
Re: gnomedesktop.org?
I assume you mean gnomedesktop.org - looks like it got the registration updated (check "whois gnomedesktop.org") by a "Luke Stroven" yesterday. I don't know him, but he seems to be the legit owner (http://stroven.org/about.php). Perhaps it's just a glitch by the Registrar? I'd give it a day or two before people flood him with email. Ed James gnome-fan On Mon, Mar 22, 2010 at 5:51 AM, Petr Tomasek wrote: > > High! > > Anyone knows, what happend to the gnomedekstop.org site? > > Thx! > > -- > Petr Tomasek <http://www.etf.cuni.cz/~tomasek> > Jabber: but...@jabbim.cz > SIP: but...@ekiga.net > ___ > gtk-list mailing list > gtk-list@gnome.org > http://mail.gnome.org/mailman/listinfo/gtk-list > ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
Re: GTK+ 2.18.8 released
Is there a reason why the unfocused selection color changed back to blue instead of the reddish highlight which was made so one could see which was currently selected and which is selected in the background? On Tue, Mar 16, 2010 at 11:11 AM, Matthias Clasen wrote: > GTK+ 2.18.8 is now available for download at: > > ftp://ftp.gtk.org/pub/gtk/2.18/ > http://download.gnome.org/sources/gtk+/2.18/ > > 3dd7617b780df872a335def5d342ec65ee132ceab710fe5d676e253dcc7e7177 gtk > +-2.18.8.tar.bz2 > f0a48691644163667fac89298b52fb3f954c52d945995f6d745db8ff0148d4b5 gtk > +-2.18.8.tar.gz > > This is a bug fix release in the stable 2.18 series. > > > > GTK+ is a multi-platform toolkit for creating graphical user > interfaces. Offering a complete set of widgets, GTK+ is suitable for > projects ranging from small one-off tools to complete application > suites. > > GTK+ has been designed from the ground up to support a range of > languages, not only C/C++. Using GTK+ from languages such as Perl and > Python (especially in combination with the Glade GUI builder) provides > an effective method of rapid application development. > > GTK+ is free software and part of the GNU Project. However, the > licensing terms for GTK+, the GNU LGPL, allow it to be used by all > developers, including those developing proprietary software, without > any license fees or royalties. > > > Where to get more information about GTK+ > > > Information about GTK+ including links to documentation can be > found at: > > http://www.gtk.org/ > > An installation guide for GTK+ 2.x is found at: > > http://developer.gnome.org/doc/API/2.0/gtk/gtk-building.html > > Common questions: > > http://developer.gnome.org/doc/API/2.0/gtk/gtk-question-index.html > http://www.gtk.org/faq/ > > > Contributing > > > GTK+ is a large project and relies on voluntary contributions. > We are actively searching for new contributors in various areas > and invite everyone to help project development. > If you are willing to participate, please subscribe to the project > mailing lists to offer your help and read over our list of vacant > project tasks: > http://live.gnome.org/GtkTasks > > > Overview of Changes from GTK+ 2.18.7 to 2.18.8 > == > > * Bugs fixed: > 612066 empathy hangs when clicked on information about contact... > 569042 gailbooleancell does not seem to attend to changes... > 609650 GtkPlug Embedded signal is not emitted when plug/socket... > 609744 crash at parse_data_for_row_pseudocolor > 609952 destroying a notebook window when the last tab got dragged... > 610141 gtk_assistant_get_nth_page() function fails to deliver... > 610184 gtk_assistant_set_current_page() segfaults... > 610381 More space between toolbar icon and label > 610632 gtk_info_bar_set_default_response problem > 611686 focus_in/focus_out in gailtreeview.c should return FALSE... > 612119 Do not scroll when middle pasting > 612308 GTK+ Build error: redefinition of 'struct IPrintDialogCallback' > 612346 gdk_window_set_icon_name doesn't work > 612505 Entry layout not updated when underlying buffer changes > 598881 Unimplemented GdkWindowImplIface methods crash gimp on OSX > > * Updated translations: > Bengali India > Low German > Oriya > Polish > > Thanks to our contributors: > Tor Lillqvist > Carlos Garcia Campos > Tadej Borovšak > Li Yuan > Joanmarie Diggs > Michael Natterer > Ignacio Casal Quinteiro > Christian Dywan > Tristan Van Berkom > Kristian Rietveld > > > March 15, 2010 > Matthias Clasen > > > ___ > gtk-list mailing list > gtk-list@gnome.org > http://mail.gnome.org/mailman/listinfo/gtk-list > ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
Re: Remarks on gtk docs
Joost, and others, I tried learning to use gtk, gdk, cairo, pango, etc several years ago and was frustrated by the difficulty in getting good docs, sample code, etc. Even worse was finding that "constant change" meant me having to rewrite code fairly often. Note that I'm an "old guy" who has written code for a living since I was a "young guy". But this has been the most difficult venue in which I've tried to work. I feel and share your pain in producing something of quality and lasting value. I know it can be done, but I pretty much work alone, and it's not easy. I switched to writing my own set of "widgets" in C++ which more or less look and act somewhat like Java's AWT, but nowhere near as powerful yet. I've got simple projects like a telnet client working, but I feel like I'm mining gold with a fork. My one big question to this list is (and no disrespect is meant), is there a elist similar to this one dedicated to Xlib programming? This list does have many very talented people, some of whom I'm in awe of. But I'm veering into a different direction and just need pointer towards that direction. adTHANKSvance, Ed James On Wed, Feb 17, 2010 at 7:06 AM, Joost <1...@depikt.net> wrote: ... > own use. Working on my pygtk alternative depikt i learned that the promise > of easy interfacing with other languages (than C) is not empty. Then there > is gdk.Pixbuf and the integration of the well-designed pango and cairo. The > latter must have been a bit painful for the authors of the > gimp-tk - many thanks for that ! And thanks for the introduction to > widget construction. ...But the way thereto is nearly not documented... ... > During 3 years the documentation of gtk and gtk itself has never ceased to > cause this kind of pain. It is my fourth GUI-builder - and what is in the > tutorial ... ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
Re: Not getting which mouse button is pressed on button-press-event
Robert, You are right - I've been buried for days in X Windows code (not GTK+) and my mindset was in the wrong place for this list. My bad. Ed James On Wed, Jan 13, 2010 at 4:39 PM, Robert Pearce wrote: > Hi Ed, ... > But as I understand it, none of this is relevant to GTK, which just > passes through what the back-end produces. ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
Re: Not getting which mouse button is pressed on button-press-event
Just tried it and verified most of the answer, via something I'm playing with; UINT ejEventManager::getButton () { return currEvent.xbutton.button; } 1 == Left mouse button 2 == Right mouse button 4 == scroll up 5 == scroll down Wasn't able to emulate middle button on my 2-button mouse (project for another day, perhaps). Can't verify 6,7, but perhaps it's time for me to buy a better mouse. I wonder, though, if this might be useful with a joystick (left, right). Ed James On Wed, Jan 13, 2010 at 2:13 PM, Tadej Borovšak wrote: > Hello. > > You can get the mouse button pressed by looking at event->button > field. 1 means left button, 2 middle button (which can usually be > emulated by pressing right and left button at once on 2-button mouse), > 3 right button. I think 4-7 mean wheel movement (check API docs for > that, I'm not 100% sure). > > Tadej > > -- > Tadej Borovšak > tadeboro.blogspot.com > tadeb...@gmail.com > tadej.borov...@gmail.com > ___ > gtk-list mailing list > gtk-list@gnome.org > http://mail.gnome.org/mailman/listinfo/gtk-list > ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
Re: OT comprehending large application (was What, in detail, the GDK do)
One way might be to write a "real" application (even if it's just a "Hello World" display) and "drill down" through the source code to see how this seemingly small amount of code works at lower and lower levels. While this sounds easy, it's quite a learning experience, and IMHO is well worth the time spent. Ed James On Tue, Dec 29, 2009 at 8:44 AM, Patrick wrote: ... > a case of sticking to a small section? Could any pros out there explain how > you tackle this monumental task? ... ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
Re: What, in detail, the GDK do?
A good book on programming for the X Window System is "Xlib Programming Manual" by Adrian Nye (O'Reilly & Associates, Inc"). I've been using it to try building my own object-oriented "toolkit" using C++. My stuff will never be "production quality", but it really helps understand what is happening at low levels. Ed James 2009/12/28 David Nečas : ... > I'm afraid to understand what Gdk does cannot be understood without > understading the basic X window system concepts. Because essentially ... ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
Re: Memory problem
Guessing here...try adding gtk_style_unref(new_style); before the "return TRUE" line. Ed James On Wed, Mar 4, 2009 at 4:23 PM, maeda wrote: > Hi Folks > > I have a function which is eating up lots of memory. The function is > listed below and is called every 1 second with the same > > GtkWidget *widget > > being passed to it each time. > What do I need to do to stop it eating up memory. All I want the > function to do is set the colours of itself and its parent(if it has one). > Any help greatly appreciated. > > > > int SetWidgetColour(GtkWidget *widget, int bordersize, int red, > int green, int blue) > { > GtkStyle *new_style; > GdkColor color; > > color.red = red; > color.green = green; > color.blue = blue; > > gdk_color_alloc(gdk_colormap_get_system(), &color); > new_style = gtk_style_copy(gtk_widget_get_default_style()); > new_style->bg[GTK_STATE_NORMAL] = color; > new_style->bg[GTK_STATE_PRELIGHT] = color; > new_style->bg[GTK_STATE_ACTIVE] = color; > gtk_style_detach (widget->style); > gtk_widget_set_style(GTK_WIDGET(widget), new_style); > > return TRUE; > } > > -- > Atsushi Maeda > > 2-10-22 Mukaibara Asao-ku > Kawasaki-shi Kanagawa-ken > 215-0007 JAPAN > > Mail1: ma...@claire.co.jp > Mail2: assio.maeda...@docomo.ne.jp > Phone: +81-80-5532-0156 > > ___ > gtk-list mailing list > gtk-list@gnome.org > http://mail.gnome.org/mailman/listinfo/gtk-list > ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
Re: Memory problem
Don't know if this will solve your problem but I found: "gdk_color_alloc is deprecated and should not be used in newly-written code. Use gdk_colormap_alloc_color() instead." My guess is that gdk_color_alloc allocates memory which isn't being freed up and thus accumulates, but I didn't dig very deep. This might also happen with the newer function. Ed James On Wed, Mar 4, 2009 at 4:23 PM, maeda wrote: > Hi Folks > > I have a function which is eating up lots of memory. The function is > listed below and is called every 1 second with the same > > GtkWidget *widget > > being passed to it each time. > What do I need to do to stop it eating up memory. All I want the > function to do is set the colours of itself and its parent(if it has one). > Any help greatly appreciated. > > > > int SetWidgetColour(GtkWidget *widget, int bordersize, int red, > int green, int blue) > { > GtkStyle *new_style; > GdkColor color; > > color.red = red; > color.green = green; > color.blue = blue; > > gdk_color_alloc(gdk_colormap_get_system(), &color); > new_style = gtk_style_copy(gtk_widget_get_default_style()); > new_style->bg[GTK_STATE_NORMAL] = color; > new_style->bg[GTK_STATE_PRELIGHT] = color; > new_style->bg[GTK_STATE_ACTIVE] = color; > gtk_style_detach (widget->style); > gtk_widget_set_style(GTK_WIDGET(widget), new_style); > > return TRUE; > } > > -- > Atsushi Maeda > > 2-10-22 Mukaibara Asao-ku > Kawasaki-shi Kanagawa-ken > 215-0007 JAPAN > > Mail1: ma...@claire.co.jp > Mail2: assio.maeda...@docomo.ne.jp > Phone: +81-80-5532-0156 > > ___ > gtk-list mailing list > gtk-list@gnome.org > http://mail.gnome.org/mailman/listinfo/gtk-list > ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
Gio (?) filemonitor/inotify problem (really annoying)
I am using Gnome 2.24.1 with GTK+ 2.14.4 / GLib 2.18.2. Ever since ive updated to gnome 2.24, Nautilus fails to monitor directory changes (file creation and deletion) but only after some time (after 20 minutes or so). I only noticed this on the desktop folder initially which is why I posted a bug to nautilus (http://bugzilla.gnome.org/show_bug.cgi?id=557550), however I realised after that this is actually happening to ALL folders, its just that i dont often keep a nautilus folder view open long enough for it to happen. After some digging through the nautilus source, I could not find any reason as to why it would happen since the changes to the file monitor code is minor compared to 2.22. So before I pursue any further I would like to find more information as to why this is happening as it is most likely a gio issue rather than a nautilus issue. My current setup is a aufs overlayed live filesystem on a slackware core, with self built gnome (ive been building gnome since 2.18 with no issues so far). I have considered the possibility of it being a kernel/aufs problem, but I have tried my older setup of a 2.6.26.6 kernel and an older version of aufs (both of which I used back in gnome 2.22) to no avail as well as mailing the aufs developer who could not see any problems with aufs that could cause this. It appears that this is definetely not a kernel issue. I am using self built vanilla 2.6.27.4 kernel (SMP 4KSTACKS), dbus 1.2.3, hal 0.5.11, gamin 1.9, GTK+ 2.14.4, GLib 2.18.2. The reason this issue is really annoying is that theres nothing I can do to track down the problem; no crashes, no logs, no warnings, nothing... it just silently screws up and it ALWAYS happens, the only thing that varies is the amount of time it takes before the problem appears (sometimes it will work for an hour before breaking). Therefore, as a last resort, ive come here to ask if anyone has any other ideas at all that I can try to get to the bottom of this very wierd and annoying issue. ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
Re: gtk_widget_destroy memory leak
Perhaps Question 1.5 in http://www.gtk.org/api/2.6/gtk/gtk-question-index.html might help? Ed J. 2008/9/11 Guoling Gao <[EMAIL PROTECTED]> > Hi, > I see memory usage is biger and biger during the same code running: > int main(int argc, char* argv[]) > { > gtk_init(&argc, &argv); > > GtkWidget* window; > > while (TRUE) > { > window = gtk_window_new(GTK_WINDOW_TOPLEVEL); > gtk_widget_set_app_paintable(window, TRUE); > gtk_window_set_resizable(GTK_WINDOW(window), FALSE); > gtk_window_set_keep_above(GTK_WINDOW(window), TRUE); > gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER); > gtk_widget_set_size_request(window, 200, 200); > gtk_widget_realize(window); > > gtk_widget_destroy(window); > } > > gtk_main(); > return 0; > } > > If there are bugs in gtk_widget_destroy? It sames that the memory is not > freed. > Wants help. > > ___ > gtk-list mailing list > gtk-list@gnome.org > http://mail.gnome.org/mailman/listinfo/gtk-list > > ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
Building GLIB 2.12
Hi, I'm new to this. Can someone tell me why when I build GLIB 2.12, it creates libraries of version 2.0?!? When building using ./configure --prefix=/opt/gtk2 GLIB builds fine, but then checking the lib directory inside the prefix reveals the following files have been created: gio libglib-2.0.la libgmodule-2.0.so.0 libgthread-2.0.la glib-2.0 libglib-2.0.so libgmodule-2.0.so.0.1600.0 libgthread-2.0.so libgio-2.0.lalibglib-2.0.so.0 libgobject-2.0.la libgthread-2.0.so.0 libgio-2.0.solibglib-2.0.so.0.1600.0 libgobject-2.0.so libgthread-2.0.so.0.1600.0 libgio-2.0.so.0 libgmodule-2.0.lalibgobject-2.0.so.0 pkgconfig libgio-2.0.so.0.0.0 libgmodule-2.0.solibgobject-2.0.so.0.1600.0 Now, correct me if I'm wrong, but shouldnt the version numbers be 2.1.2, not 2.0? Or am I missing something obvious? James Bray -- View this message in context: http://www.nabble.com/Building-GLIB-2.12-tp18525331p18525331.html Sent from the Gtk+ - General mailing list archive at Nabble.com. ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
Re: g_main_loop
Just a guess, but I'd try putting a function in Thread 1 that emits the signal, but call that function from Thread 2. This way, Thread 2 controls when the signal is emitted, but the signal is still handled by Thread 1. Never actually tried this myself, though, so I don't know for sure if one thread can call a function in another thread. Ed James 2008/7/15 HASWANI HARISH-VCKR47 <[EMAIL PROTECTED]>: > Hi All, > > I am a beginner to gtk APIs. > My query is : > - In Thread T1 I am calling g_main_loop() > - In Thread T2 I am emitting a signal through > g_signal_emit_by_name(G_OBJECT, signal-name); > > I saw that signal handler is running in Thread2 context. I want that it > should run in Thread 1 context. How I can achieve this? > > > > ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
glib-2.12.12 build problem - gparamspecs.c
I'm trying to build a version of glib and gtk to match a gtkmm version on a different system. The target system is using the Mips-pro version 7.4.4m. When I run ./configure on glib-2.12.12 and or glib-2.12.13 I get the following error when it tries to build gparamspecs.c: make[3]: Entering directory `/vobs/local/src/irix_build/glib-2.12.12/gobject' source='gparamspecs.c' object='gparamspecs.lo' libtool=yes \ depfile='.deps/gparamspecs.Plo' tmpdepfile='.deps/gparamspecs.TPlo' \ depmode=sgi /bin/sh ../depcomp \ /bin/sh ../libtool --mode=compile cc -DHAVE_CONFIG_H -I. -I. -I.. -DG_LOG_DOMAIN=\"GLib-GObject\" -I.. -I../glib -I.. -DG_DISABLE_CAST_CHECKS -DG_DISABLE_DEPRECATED -DGOBJECT_COMPILATION -DG_DISABLE_CONST_RETURNS -I/vobs/local/irix/include -I/usr/local/include -D_REENTRANT -I/usr/local/include -c -o gparamspecs.lo `test -f 'gparamspecs.c' || echo './'`gparamspecs.c cc -DHAVE_CONFIG_H -I. -I. -I.. "-DG_LOG_DOMAIN=\"GLib-GObject\"" -I.. -I../glib -I.. -DG_DISABLE_CAST_CHECKS -DG_DISABLE_DEPRECATED -DGOBJECT_COMPILATION -DG_DISABLE_CONST_RETURNS -I/vobs/local/irix/include -I/usr/local/include -D_REENTRANT -I/usr/local/include -c gparamspecs.c -Wp,-MDupdate,.deps/gparamspecs.TPlo -DPIC -o .libs/gparamspecs.o cc-1028 cc: ERROR File = gparamspecs.c, Line = 1478 The expression used must have a constant value. value_type, /* value_type */ ^ 1 error detected in the compilation of "gparamspecs.c". I also tried to compile glib-2.12.0 and got a bunch of errors in different files. Any suggestions? Thanks Jim ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
Re: The application nautilus has quit unexpectedly.
I reinstalled atk and that fixed it. yeehaa. You are indeed skilled in your profession! Thanks for all your help. Now, sit up straight '-) (I saw your website pic...) Bye, Jim On 8/23/07, james pruett <[EMAIL PROTECTED]> wrote: > > I had mistakenly copied some stuff into /usr/lib so I probably corrupted > libglade. > Should I reinstall libglade and atk? > Thanks for your continued help. > > > On 8/23/07, Ritesh Khadgaray <[EMAIL PROTECTED]> wrote: > > > > Hello > > > > > ImportError: /usr/lib/libglade-2.0.so.0: undefined symbol: > > > atk_relation_set_add_relation_by_type > > > > It seems from the new log messages, you atk library installation is > > corrupted. > > > > Did you install a custom set og gtk/gnome library on system ? > > > > On Wed, 2007-08-22 at 08:02 -0600, james pruett wrote: > > > I did the rpm -e and yum install. > > > I still don't see the toolbar at top and bottom. > > > Attached is a new log file. > > > Thanks for continued help. > > > -jim > > > > > > > > > > > > On 8/21/07, Ritesh Khadgaray <[EMAIL PROTECTED]> wrote: > > > > Hello > > > > > > > > On Tue, 2007-08-21 at 13:21 -0600, james pruett wrote: > > > > > see attachment for entire log.txt-- > > > > > SESSION_MANAGER=local/localhost.localdomain:/tmp/.ICE-unix/2381 > > > > > manager.c/1131: mount_all: mounting /dev/hdc1 > > > > > mount: can't find /dev/hdc1 in /etc/fstab or /etc/mtab > > > > > manager.c/1131: mount_all: mounting /dev/sda1 > > > > > manager.c/923: Mounted: /org/freedesktop/Hal/devices/volume_label_ > > > > > Error: permissions error in pam_timestamp_check > > > > > > > > > > (gnome-panel:2437): GConf-WARNING **: Directory > > > > > `\xd8\u000dI\u0008s/panel/applets/battstat_applet' was not being > > > > > monitored by GConfClient 0x8404120 > > > > > Traceback (most recent call last): > > > > > File "/usr/bin/rhn-applet-gui", line 30, in ? > > > > > import rhn_applet > > > > > File "/usr/share/rhn/rhn_applet/rhn_applet.py", line 13, in ? > > > > > import gnome.ui > > > > > ImportError: /usr/lib/libgtk-x11-2.0.so.0: undefined symbol: > > > > > gdk_pixbuf_save_to_buffer > > > > > > > > > > ** (nautilus:2439): WARNING **: > > > > > /usr/lib/nautilus/extensions-1.0/libnautilus-themus.so: undefined > > > > > symbol: gdk_pixbuf_new_from_file_at_size > > > > > > > > You seem to have a corrupted gtk installation. Please re-install the > > > > same > > > > > > > > $ rpm -qa|grep gtk2 > > > > $ rpm -e --nodeps package_list > > > > $ yum install package_list > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On 8/21/07, Ritesh Khadgaray <[EMAIL PROTECTED] > wrote: > > > > > > > > > > > > On Tue, 2007-08-21 at 12:18 -0600, james pruett wrote: > > > > > > > The application "gnome-panel has quit unexpectedly. > > > > > > > > > > > > > > [EMAIL PROTECTED] ~]# gnome-session > > > > > > > SESSION_MANGER=local/localhost.localdomain:/tmp/.ICE-unix/2381 > > > > > > > manager.c/1131: mount_all: mounting /dev/hdc1 > > > > > > > mount: can't find /dev/hdc1 in /etc/fstab or /etc/mtab > > > > > > > manager.c/1131: mount_all: mounting /dev/dsa1 > > > > > > > manager.c/923: Mounted: > > /org/freedesktop/Hal/devices/volume_label_ > > > > > > > Error: permissions error in pam_timestamp_check > > > > > > > > > > > > > > ** (eggcups:2441): CRITICAL **: couldn't connect to session > > bus: > > > > > > > Unsable to determine the address of the message bus > > > > > > > > > > > > > > (gnome-panel:2431): GConf-WARNING **: Directory `0 > > > > > > ...? Is this all > > > > > > > > > > > > > > > > > > rerun gnome-session command as shown below. Provide log.txt > > > > > > > > > > > > dbus-launch --exi
Re: The application nautilus has quit unexpectedly.
I had mistakenly copied some stuff into /usr/lib so I probably corrupted libglade. Should I reinstall libglade and atk? Thanks for your continued help. On 8/23/07, Ritesh Khadgaray <[EMAIL PROTECTED]> wrote: > > Hello > > > ImportError: /usr/lib/libglade-2.0.so.0: undefined symbol: > > atk_relation_set_add_relation_by_type > > It seems from the new log messages, you atk library installation is > corrupted. > > Did you install a custom set og gtk/gnome library on system ? > > On Wed, 2007-08-22 at 08:02 -0600, james pruett wrote: > > I did the rpm -e and yum install. > > I still don't see the toolbar at top and bottom. > > Attached is a new log file. > > Thanks for continued help. > > -jim > > > > > > > > On 8/21/07, Ritesh Khadgaray <[EMAIL PROTECTED]> wrote: > > > Hello > > > > > > On Tue, 2007-08-21 at 13:21 -0600, james pruett wrote: > > > > see attachment for entire log.txt-- > > > > SESSION_MANAGER=local/localhost.localdomain:/tmp/.ICE-unix/2381 > > > > manager.c/1131: mount_all: mounting /dev/hdc1 > > > > mount: can't find /dev/hdc1 in /etc/fstab or /etc/mtab > > > > manager.c/1131: mount_all: mounting /dev/sda1 > > > > manager.c/923: Mounted: /org/freedesktop/Hal/devices/volume_label_ > > > > Error: permissions error in pam_timestamp_check > > > > > > > > (gnome-panel:2437): GConf-WARNING **: Directory > > > > `\xd8\u000dI\u0008s/panel/applets/battstat_applet' was not being > > > > monitored by GConfClient 0x8404120 > > > > Traceback (most recent call last): > > > > File "/usr/bin/rhn-applet-gui", line 30, in ? > > > > import rhn_applet > > > > File "/usr/share/rhn/rhn_applet/rhn_applet.py", line 13, in ? > > > > import gnome.ui > > > > ImportError: /usr/lib/libgtk-x11-2.0.so.0: undefined symbol: > > > > gdk_pixbuf_save_to_buffer > > > > > > > > ** (nautilus:2439): WARNING **: > > > > /usr/lib/nautilus/extensions-1.0/libnautilus-themus.so: undefined > > > > symbol: gdk_pixbuf_new_from_file_at_size > > > > > > You seem to have a corrupted gtk installation. Please re-install the > > > same > > > > > > $ rpm -qa|grep gtk2 > > > $ rpm -e --nodeps package_list > > > $ yum install package_list > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On 8/21/07, Ritesh Khadgaray <[EMAIL PROTECTED]> wrote: > > > > > > > > > > On Tue, 2007-08-21 at 12:18 -0600, james pruett wrote: > > > > > > The application "gnome-panel has quit unexpectedly. > > > > > > > > > > > > [EMAIL PROTECTED] ~]# gnome-session > > > > > > SESSION_MANGER=local/localhost.localdomain:/tmp/.ICE-unix/2381 > > > > > > manager.c/1131: mount_all: mounting /dev/hdc1 > > > > > > mount: can't find /dev/hdc1 in /etc/fstab or /etc/mtab > > > > > > manager.c/1131: mount_all: mounting /dev/dsa1 > > > > > > manager.c/923: Mounted: > /org/freedesktop/Hal/devices/volume_label_ > > > > > > Error: permissions error in pam_timestamp_check > > > > > > > > > > > > ** (eggcups:2441): CRITICAL **: couldn't connect to session bus: > > > > > > Unsable to determine the address of the message bus > > > > > > > > > > > > (gnome-panel:2431): GConf-WARNING **: Directory `0 > > > > > ...? Is this all > > > > > > > > > > > > > > > rerun gnome-session command as shown below. Provide log.txt > > > > > > > > > > dbus-launch --exit-with-session gnome-session 2>&1 | tee > /tmp/log.txt > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On 8/21/07, Ritesh Khadgaray <[EMAIL PROTECTED]> wrote: > > > > > > Hello > > > > > > > > > > > > On login screen select "Failsafe" from "session" and > login. > > > > > > This > > > > > > should bring up a single terminal window. > > > > > > > > > > > > Run gnome-session
Re: The application nautilus has quit unexpectedly.
I did the rpm -e and yum install. I still don't see the toolbar at top and bottom. Attached is a new log file. Thanks for continued help. -jim On 8/21/07, Ritesh Khadgaray <[EMAIL PROTECTED]> wrote: > Hello > > On Tue, 2007-08-21 at 13:21 -0600, james pruett wrote: > > see attachment for entire log.txt-- > > SESSION_MANAGER=local/localhost.localdomain:/tmp/.ICE-unix/2381 > > manager.c/1131: mount_all: mounting /dev/hdc1 > > mount: can't find /dev/hdc1 in /etc/fstab or /etc/mtab > > manager.c/1131: mount_all: mounting /dev/sda1 > > manager.c/923: Mounted: /org/freedesktop/Hal/devices/volume_label_ > > Error: permissions error in pam_timestamp_check > > > > (gnome-panel:2437): GConf-WARNING **: Directory > > `\xd8\u000dI\u0008s/panel/applets/battstat_applet' was not being > > monitored by GConfClient 0x8404120 > > Traceback (most recent call last): > > File "/usr/bin/rhn-applet-gui", line 30, in ? > > import rhn_applet > > File "/usr/share/rhn/rhn_applet/rhn_applet.py", line 13, in ? > > import gnome.ui > > ImportError: /usr/lib/libgtk-x11-2.0.so.0: undefined symbol: > > gdk_pixbuf_save_to_buffer > > > > ** (nautilus:2439): WARNING **: > > /usr/lib/nautilus/extensions-1.0/libnautilus-themus.so: undefined > > symbol: gdk_pixbuf_new_from_file_at_size > > You seem to have a corrupted gtk installation. Please re-install the > same > > $ rpm -qa|grep gtk2 > $ rpm -e --nodeps package_list > $ yum install package_list > > > > > > > > > > > > > > On 8/21/07, Ritesh Khadgaray <[EMAIL PROTECTED]> wrote: > > > > > > On Tue, 2007-08-21 at 12:18 -0600, james pruett wrote: > > > > The application "gnome-panel has quit unexpectedly. > > > > > > > > [EMAIL PROTECTED] ~]# gnome-session > > > > SESSION_MANGER=local/localhost.localdomain:/tmp/.ICE-unix/2381 > > > > manager.c/1131: mount_all: mounting /dev/hdc1 > > > > mount: can't find /dev/hdc1 in /etc/fstab or /etc/mtab > > > > manager.c/1131: mount_all: mounting /dev/dsa1 > > > > manager.c/923: Mounted: /org/freedesktop/Hal/devices/volume_label_ > > > > Error: permissions error in pam_timestamp_check > > > > > > > > ** (eggcups:2441): CRITICAL **: couldn't connect to session bus: > > > > Unsable to determine the address of the message bus > > > > > > > > (gnome-panel:2431): GConf-WARNING **: Directory `0 > > > ...? Is this all > > > > > > > > > rerun gnome-session command as shown below. Provide log.txt > > > > > > dbus-launch --exit-with-session gnome-session 2>&1 | tee /tmp/log.txt > > > > > > > > > > > > > > > > > > > > > > On 8/21/07, Ritesh Khadgaray <[EMAIL PROTECTED]> wrote: > > > > Hello > > > > > > > > On login screen select "Failsafe" from "session" and login. > > > > This > > > > should bring up a single terminal window. > > > > > > > > Run gnome-session from the terminal window, and report back > > > > any > > > > message seen on the terminal window. > > > > > > > > > > > > On Tue, 2007-08-21 at 08:08 -0600, james pruett wrote: > > > > > cat ~/.xsessions-errors > > > > > file not found. > > > > > > > > > > > > > > > > > > > > On 8/21/07, Ritesh Khadgaray <[EMAIL PROTECTED]> wrote: > > > > > Hello > > > > > > > > > > > > > > > On Mon, 2007-08-20 at 07:46 -0600, james pruett > > > > wrote: > > > > > > Hi kind souls. > > > > > > > > > > > > I lost my panels somehow. > > > > > > > > > > > > Fedora Core4 > > > > > > The application nautilus has quit unexpectedly. > > > > > > The application gnome-panel has quit unexpectedly. > > > > > > Ive detected a panel already running, and will now > > > >
Re: The application nautilus has quit unexpectedly.
see attachment for entire log.txt-- SESSION_MANAGER=local/localhost.localdomain:/tmp/.ICE-unix/2381 manager.c/1131: mount_all: mounting /dev/hdc1 mount: can't find /dev/hdc1 in /etc/fstab or /etc/mtab manager.c/1131: mount_all: mounting /dev/sda1 manager.c/923: Mounted: /org/freedesktop/Hal/devices/volume_label_ Error: permissions error in pam_timestamp_check (gnome-panel:2437): GConf-WARNING **: Directory `\xd8\u000dI\u0008s/panel/applets/battstat_applet' was not being monitored by GConfClient 0x8404120 Traceback (most recent call last): File "/usr/bin/rhn-applet-gui", line 30, in ? import rhn_applet File "/usr/share/rhn/rhn_applet/rhn_applet.py", line 13, in ? import gnome.ui ImportError: /usr/lib/libgtk-x11-2.0.so.0: undefined symbol: gdk_pixbuf_save_to_buffer ** (nautilus:2439): WARNING **: /usr/lib/nautilus/extensions-1.0/libnautilus-themus.so: undefined symbol: gdk_pixbuf_new_from_file_at_size On 8/21/07, Ritesh Khadgaray <[EMAIL PROTECTED]> wrote: > > On Tue, 2007-08-21 at 12:18 -0600, james pruett wrote: > > The application "gnome-panel has quit unexpectedly. > > > > [EMAIL PROTECTED] ~]# gnome-session > > SESSION_MANGER=local/localhost.localdomain:/tmp/.ICE-unix/2381 > > manager.c/1131: mount_all: mounting /dev/hdc1 > > mount: can't find /dev/hdc1 in /etc/fstab or /etc/mtab > > manager.c/1131: mount_all: mounting /dev/dsa1 > > manager.c/923: Mounted: /org/freedesktop/Hal/devices/volume_label_ > > Error: permissions error in pam_timestamp_check > > > > ** (eggcups:2441): CRITICAL **: couldn't connect to session bus: > > Unsable to determine the address of the message bus > > > > (gnome-panel:2431): GConf-WARNING **: Directory `0 > ...? Is this all > > > rerun gnome-session command as shown below. Provide log.txt > > dbus-launch --exit-with-session gnome-session 2>&1 | tee /tmp/log.txt > > > > > > > > > > On 8/21/07, Ritesh Khadgaray <[EMAIL PROTECTED]> wrote: > > Hello > > > > On login screen select "Failsafe" from "session" and login. > > This > > should bring up a single terminal window. > > > > Run gnome-session from the terminal window, and report back > > any > > message seen on the terminal window. > > > > > > On Tue, 2007-08-21 at 08:08 -0600, james pruett wrote: > > > cat ~/.xsessions-errors > > > file not found. > > > > > > > > > > > > On 8/21/07, Ritesh Khadgaray <[EMAIL PROTECTED]> wrote: > > > Hello > > > > > > > > > On Mon, 2007-08-20 at 07:46 -0600, james pruett > > wrote: > > > > Hi kind souls. > > > > > > > > I lost my panels somehow. > > > > > > > > Fedora Core4 > > > > The application nautilus has quit unexpectedly. > > > > The application gnome-panel has quit unexpectedly. > > > > Ive detected a panel already running, and will now > > exit. > > > > > > > > Its been like this a month or so, so I dont recall > > what > > > might have > > > > caused it. > > > > I am more interested in fixing it. > > > > > > > Any messages listed under ~/.xsession-errors ? > > > > > > > Any help appreciated. > > > > -jim > > > > > > > > > > > > > > > > ___ > > > > gtk-list mailing list > > > > gtk-list@gnome.org > > > > http://mail.gnome.org/mailman/listinfo/gtk-list > > > -- > > > Ritesh Khadgaray > > > ॐ मणि पद्मे हूँ > > > Desktop LinuX N Stuff > > > Ph: +919970164885 > > > Eat Right, Exercise, Die Anyway. > > > > > > > > -- > > Ritesh Khadgaray > > ॐ मणि पद्मे हूँ > > Desktop LinuX N Stuff > > P
Re: The application nautilus has quit unexpectedly.
The application "gnome-panel has quit unexpectedly. [EMAIL PROTECTED] ~]# gnome-session SESSION_MANGER=local/localhost.localdomain:/tmp/.ICE-unix/2381 manager.c/1131: mount_all: mounting /dev/hdc1 mount: can't find /dev/hdc1 in /etc/fstab or /etc/mtab manager.c/1131: mount_all: mounting /dev/dsa1 manager.c/923: Mounted: /org/freedesktop/Hal/devices/volume_label_ Error: permissions error in pam_timestamp_check ** (eggcups:2441): CRITICAL **: couldn't connect to session bus: Unsable to determine the address of the message bus (gnome-panel:2431): GConf-WARNING **: Directory `0 On 8/21/07, Ritesh Khadgaray <[EMAIL PROTECTED]> wrote: > > Hello > > On login screen select "Failsafe" from "session" and login. This > should bring up a single terminal window. > > Run gnome-session from the terminal window, and report back any > message seen on the terminal window. > > > On Tue, 2007-08-21 at 08:08 -0600, james pruett wrote: > > cat ~/.xsessions-errors > > file not found. > > > > > > > > On 8/21/07, Ritesh Khadgaray <[EMAIL PROTECTED]> wrote: > > Hello > > > > > > On Mon, 2007-08-20 at 07:46 -0600, james pruett wrote: > > > Hi kind souls. > > > > > > I lost my panels somehow. > > > > > > Fedora Core4 > > > The application nautilus has quit unexpectedly. > > > The application gnome-panel has quit unexpectedly. > > > Ive detected a panel already running, and will now exit. > > > > > > Its been like this a month or so, so I dont recall what > > might have > > > caused it. > > > I am more interested in fixing it. > > > > > Any messages listed under ~/.xsession-errors ? > > > > > Any help appreciated. > > > -jim > > > > > > > > > > > > ___ > > > gtk-list mailing list > > > gtk-list@gnome.org > > > http://mail.gnome.org/mailman/listinfo/gtk-list > > -- > > Ritesh Khadgaray > > ॐ मणि पद्मे हूँ > > Desktop LinuX N Stuff > > Ph: +919970164885 > > Eat Right, Exercise, Die Anyway. > > > > > -- > Ritesh Khadgaray > ॐ मणि पद्मे हूँ > Desktop LinuX N Stuff > Ph: +919970164885 > Eat Right, Exercise, Die Anyway. > > ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
Re: The application nautilus has quit unexpectedly.
cat ~/.xsessions-errors file not found. On 8/21/07, Ritesh Khadgaray <[EMAIL PROTECTED]> wrote: Hello On Mon, 2007-08-20 at 07:46 -0600, james pruett wrote: Hi kind souls. I lost my panels somehow. Fedora Core4 The application nautilus has quit unexpectedly. The application gnome-panel has quit unexpectedly. Ive detected a panel already running, and will now exit. Its been like this a month or so, so I dont recall what might have caused it. I am more interested in fixing it. Any messages listed under ~/.xsession-errors ? Any help appreciated. -jim ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
The application nautilus has quit unexpectedly.
Hi kind souls. I lost my panels somehow. Fedora Core4 The application nautilus has quit unexpectedly. The application gnome-panel has quit unexpectedly. Ive detected a panel already running, and will now exit. Its been like this a month or so, so I dont recall what might have caused it. I am more interested in fixing it. Any help appreciated. -jim ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
undefined symbol: gdk_pixbuf_new_from_file_at_size
Hi, I accidentally broke my lib directory. Heres how I stupidly did it. $cp /opt/lib/gps/* /usr/lib/. Is there an easy way to fix it? It manifests itself like this: $gedit (gedit:7001): GnomeUI-WARNING **: While connecting to session manager: Authentication Rejected, reason: None of the authentication protocols specified are supported and host-based authentication failed. gedit: symbol lookup error: gedit: undefined symbol: gdk_pixbuf_new_from_file_at_size Thanks for any help jim pruett http://.www.gpscruise.com ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
Using gdk_pixbuf_xlib_get_from_drawable()
Hello, I have a problem using the function from the subject. I think I'm just missing something about how the function works. Here is the code (it's just a short program to test the function): ### BEGIN CODE ### #include #include #include static void screenshot (GtkWidget *widget) { GdkPixbuf *image; XWindowAttributes wa; Window win; win = GDK_WINDOW_XID (widget->window); XGetWindowAttributes (GDK_DISPLAY(), win, &wa); image = gdk_pixbuf_xlib_get_from_drawable (NULL, win, 0, NULL, 0, 0, 0, 0, wa.width, wa.height); gdk_pixbuf_save (image, "test.png", "png", NULL, NULL); } int main (int argc, char *argv[]) { GtkWidget *window, *button; gtk_init (&argc, &argv); window = gtk_window_new (GTK_WINDOW_TOPLEVEL); button = gtk_button_new_with_label ("Hello"); g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (screenshot), NULL); gtk_container_add (GTK_CONTAINER (window), button); gtk_widget_show_all (window); gtk_main (); return 0; } ### END CODE ### It is crashing in the .._from_drawable() function as you can see here: Program received signal SIGSEGV, Segmentation fault. 0x004943dd in XGetWindowAttributes () from /usr/lib/libX11.so.6 (gdb) where #0 0x004943dd in XGetWindowAttributes () from /usr/lib/libX11.so.6 #1 0x004651d9 in gdk_pixbuf_xlib_get_from_drawable () from /usr/lib/libgdk_pixbuf_xlib-2.0.so.0 #2 0x080488ab in screenshot (widget=0x9caed68) at test.c:36 I am compiling with: gcc -Wall -g test.c -o exe `pkg-config --cflags --libs gtk+-2.0 gdk-pixbuf-xlib-2.0` Thank you for any help you can give me! - Andrew ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
Re: Re: Editable Label Widget
Ok, GtkTextView would work if I had only one of these. However, I have possibly hundreds of these in one application. That is just way too much overhead. On Thu, 17 May 2007 08:19:32 +0200 Hans Oesterholt-Dijkema wrote: What about GtkTextView? If it is in 'disabled' state, it will by default grey out (and look much like a label). If you enable it, you can edit text with it. This widget will also resize on editing though, but you can wrap words and add a scrolled window. --Hans ANDREW JAMES KRAUSE schreef: > My problem with using a GtkEntry is that I need the label to be > multi-lined. I don't want to use GtkCellView because, when I edit > the text, it will resize the widget. It is possible to have hundreds > of these widgets in a column, so that would be a rendering mess. > > I had originally used the idea of switching between a GtkLabel and > GtkEntry. There are a few problems with this. First, you still have the > resizing issues. The user can't see the whole text when it is in a > GtkEntry, so it will be difficult to edit longer texts. Also, you have to > keep two widgets around, which takes more memory. > > I had created a very bad implementation of the GtkEditableLabel > widget that just resets the text on user input, but this is obviously > not the optimal solution. Plus, I am looking at creating something > that would be more versitile, and not depend directly on my > specific application. > > Anyway, I'm leaning toward just creating a new widget so that I > don't have to deal with the selection info. This will allow me to reuse > some of the EelEditableLabel code. (BTW ... hello Ana!) > > > On Wed, 16 May 2007 14:39:19 -0700 Ana wrote: > > I think making the GtkEntry look like a label is a good idea, but > might > be more work than you'd expect. It seems that whenever you mess > with a > widget's appearance you have to worry about interfering with > themes. > Who knows what other issues there might be. > > Another > idea might be to make a composite object, which subclasses from > a > container (GtkBox), and works sort of like a modal editor. (hehe. > I'm > a vi user.) You display either a GtkLabel or a GtkEntry depending > on the > "mode." > > - Ana > > > On Wed, May 16, 2007 at > 07:00:10PM +0200, Hans Oesterholt-Dijkema wrote: > > Why not use a > GtkEntry and make it look like a GtkLabel? > > You could also have a look > at GtkCellView. > > > > > > > ___ > gtk-list mailing list > gtk-list@gnome.org > http://mail.gnome.org/mailman/listinfo/gtk-list > --- Andrew Krause [EMAIL PROTECTED] www.andrewkrause.net ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
Re: Re: Editable Label Widget
My problem with using a GtkEntry is that I need the label to be multi-lined. I don't want to use GtkCellView because, when I edit the text, it will resize the widget. It is possible to have hundreds of these widgets in a column, so that would be a rendering mess. I had originally used the idea of switching between a GtkLabel and GtkEntry. There are a few problems with this. First, you still have the resizing issues. The user can't see the whole text when it is in a GtkEntry, so it will be difficult to edit longer texts. Also, you have to keep two widgets around, which takes more memory. I had created a very bad implementation of the GtkEditableLabel widget that just resets the text on user input, but this is obviously not the optimal solution. Plus, I am looking at creating something that would be more versitile, and not depend directly on my specific application. Anyway, I'm leaning toward just creating a new widget so that I don't have to deal with the selection info. This will allow me to reuse some of the EelEditableLabel code. (BTW ... hello Ana!) On Wed, 16 May 2007 14:39:19 -0700 Ana wrote: I think making the GtkEntry look like a label is a good idea, but might be more work than you'd expect. It seems that whenever you mess with a widget's appearance you have to worry about interfering with themes. Who knows what other issues there might be. Another idea might be to make a composite object, which subclasses from a container (GtkBox), and works sort of like a modal editor. (hehe. I'm a vi user.) You display either a GtkLabel or a GtkEntry depending on the "mode." - Ana On Wed, May 16, 2007 at 07:00:10PM +0200, Hans Oesterholt-Dijkema wrote: > Why not use a GtkEntry and make it look like a GtkLabel? > You could also have a look at GtkCellView. ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
Editable Label Widget
Hello All, I have an interest invested in an editable label widget because of an application I am working on. Because of this, I decided to work on the widget myself since the project seems to have been dropped from the list of priorities. On Bugzilla, there is an implementation that was written in 2005, but it is not acceptable because it uses more than the available signal padding slots from GtkLabel. It is quite obvious that the way to go is to use the GtkEditable interface in a new widget called something like GtkEditableLabel. However, there are two different approaches that I've come up with. One way to implement this widget would be to derive it from GtkLabel. This would allow the widget to inherit all of the code from GtkLabel, but may cause problems because of hidden data and the fact that GtkLabel already handles selections in a different way. The other option is to do what EelEditableLabel did and just derive from GtkMisc. This would add a little extra baggage because of reimplementing a few of the same features. However, I think this may be the better way to go in terms of API and speed of the widget. Does anyone have any thoughts on this issue, in one direction or the other? --- Andrew Krause ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
Release of Foundations of GTK Development
Hello, My name is Andrew Krause, and I am the author of a new book about GTK+ entitled "Foundations of GTK+ Development". I know for many new GTK+ developers, it is difficult to learn the toolkit because there aren't too many tutorials available. Therefore, I decided to write this book, which covers almost every widget available in the release of 2.10. Some of the topics include: * Basic widgets such as labels, buttons, dialogs, entries, etc. * A large portion of GLib including files, pipes, and dynamic modules. * Two chapters dedicated to the GtkTreeView and GtkTextView widgets. * Menus, toolbars, pop-up menus, Glade, and libglade. * How to create your own widgets and interfaces. * Widgets introduced in GTK+ 2.10 such as printing and status icon. I also setup a web site to accompany the book, which is found at http://www.gtkbook.com/. If anyone picks up the book, I would love to hear what you think about it! --- Andrew Krause ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
RE: How do you develop you GTK code?
I have responsed to some this before, but here goes. 1. Use Glade to create and maintain the XML GUI interface descriptions. 2. Use libglade to parse and create the interface at run-time and you take care of writing/maintaining your event handlers and other such stuff. This process keeps the GTK Gui stuff cleanly interfaced to and separated from the rest of the code (the really difficult parts of a project)which you or someone else MUST write and maintain. This formula is almost bullet proof when jumping from Windows to Linux or back. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tristan Van Berkom Sent: Saturday, April 14, 2007 9:58 AM To: Richard Boaz Cc: GTK dev list Subject: Re: How do you develop you GTK code? On Sat, 2007-04-14 at 15:00 +0200, Richard Boaz wrote: > Hi, > > > Like the others posting so far, I do not use any IDE to program my gtk > + app. I had a quick look once upon a time, but quickly determined > that if you want or require to change the code that is automatically > generated, you might as well just write your own instead of trying to > get in the deep-end of someone else's ideas about how this should be > done. Right, first of all I dont think its correct to suppose that generated code is anyone's idea of "how it should be done", generated code is a mechanical spew of "code that works" and should NEVER be used as an example or reference implementation. My opinions about glade are biased because I maintain glade, but my opinion anyway: glade is not an IDE, its a user interface designer - adding application data and modeling of that data is not a desirable thing, you want to keep your user interface in one corner and your data in another - not mix them up in one big pot of spaghetti code. If you have concerns about dynamic portions of your interface, I agree they should mostly be done by hand, but wait - glade can still help you here, say you have a hbox with a label and an entry as was previously described, you can always put one instance of that in your glade file and loop like so: for (i to ... dataentries) { xml = glade_xml_new (..."dataentryitem"...); widget = glade_xml_get_widget (xml, "dataentryitem"); /* ... pack into your program somewhere by hand ... */ g_object_unref (xml); } This might or might not make sence depending on the application, but it does have the advantage of keeping your UI dynamic, if you need to add an item/label/separator or whatever to that subhierarchy than you dont need to edit or compile code to update your interface. I also believe that following a template design might be good for a dumb little CLI wrapper in a GUI - but if you are really developing an industry grade application then please use your brain and understand the code - using libglade for your interface is a good thing because it defers all the repetitive rigid GUI building code to a library that takes care of it for you - it also allows you to use YOUR OWN design that is appropriate for your own application, either by loading dialogs on the fly or at initialization time - keeping pointers around for the widgets that you need referenced by name, or by using lookup_widget() types of paradigms - point being - you are the author of your application and the sources are in your hands, you should be able to organize your code in a way that suits the application at hand. For a good reference implementation - I've repeatedly been pointing people in the direction of the DevHelp sources, since IMO they use a sound OO design and a very practical use of libglade (its also very simple code to understand). Just my 2 cents, cheers, -Tristan ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
spinner widget
I've been working on a spinner widget that is basically just the spinner portion of a spinbutton. Although the spinbutton handles numbers fairly cleanly, it doesn't seem to work well when trying to use it for other purposes. Although you can use the signals to have it display text (like the days of the week example), it does not handle user typing in a value well. Also, since there is no way to change how it looks, it always appears as an entry that the user can type in. My solution to this is a stand-alone spinner widget. The spinner will just appear as a pair of arrows and hold a double value and the developer could use that value to control a plain label, image, or anything else. The spinner as I have written it derives from GtkRange and has "wrap" and "snap_to_ticks" properties (the same as the spinbutton). Thoughts? ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
RE: Glade vs Hand code
I recommend letting Glade generate the xml file then use libglade to parse it. Code the stubs you referenced in Glade. Keeps Glade and your code clean with each other. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andrew Cowie Sent: Wednesday, March 21, 2007 2:09 AM To: gtk-list@gnome.org Subject: Re: Glade vs Hand code On Tue, 2007-03-20 at 19:32 +0100, David Nečas (Yeti) wrote: > So, an opposite opinion: > simple-minded, static interface => glade is good complex, dynamic, > data-driven => glade is an obstacle I would agree with David here. I find that I've been through a few iterations of "like Glade, hate Glade". At first, I thought it was brilliant. Certainly the fact that you can easily set tons of properties, etc, was just the cat's meow. Then, as I started building up more complex and especially dynamic user interface elements, I found Glade was getting in the way. Too much trouble. One big pain is naming the widgets in Glade and then ensuring that the widgets you lookup code side match. Really messes you over when you do refactorings (which, working in java-gnome as I do, is something one does A LOT via the wonders of Eclipse et al) [at that point, however, I'd actually settled on some programming conventions whereby it is transparent whether an application window is code derived or glade derived. The wonders of subclassing. So, now, it doesn't really make any difference which I do] So then in a new application I decided "well, forget Glade" and started doing everything programmatically. And then I realized that I was having to deal with coming up with variable names for each and every bloody Label, and that was a real pain in the ass. So the conclusion I settled on was to use Glade for as much scaffolding as possible, thus saving the object pressure of proxies being created for not much at all, but not to try and do anything even remotely complicated in Glade, preferring to hand off and switch to code at that point. And, no doubt, I'll be of a different opinion next month. :-) AfC Sydney -- Andrew Frederick Cowie Chairman Operational Dynamics Consulting Group http://www.operationaldynamics.com/ Management Consultants specializing in strategy, organizational architecture, procedures to survive change, and performance hardening for the people and systems behind the mission critical enterprise. Worldwide: Sydney+61 2 9977 6866 New York +1 646 472 5054 Toronto +1 647 477 5603 London+44 207 1019201 ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
make install fails on Mac OS X
Hi, I've very nearly managed to compile gtk-2.10.3 on Mac OS X 10.4. "make" succeeds, but "make install" fails here: make install-data-hook /bin/sh ../../mkinstalldirs /Users/jgrg/dist/otterlace.app/Contents/Resources/etc/gtk-2.0 ../../gtk/gtk-query-immodules-2.0 > /Users/jgrg/dist/otterlace.app/Contents/Resources/etc/gtk-2.0/gtk.immodules Cannot load module /Users/jgrg/dist/otterlace.app/Contents/Resources/lib/gtk-2.0/2.10.0/immodules/im-am-et.so: dlopen(/Users/jgrg/dist/otterlace.app/Contents/Resources/lib/gtk-2.0/2.10.0/immodules/im-am-et.so, 10): Symbol not found: __cg_TIFFWriteDirectory Referenced from: /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO Expected in: /Users/jgrg/dist/otterlace.app/Contents/Resources/lib/libTIFF.dylib (This is followed by a number of other failures, all the same cause.) I gues that it is confusing libTIFF.dylib: /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib with my libtiff: /Users/jgrg/dist/otterlace.app/Contents/Resources/lib/libtiff.dylib on the Mac's case-insensitve HFS+ filesystem. Can anyone suggest a work-around? Thanks, James ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
GDK Events
Just a quick question ... there are a ton of event types like GDK_CLIENT_EVENT which corresponds to GtkWidget's client-event. I was able to find matching signals for most of the event types, but I can't find them for the following: GDK_DRAG_ENTER GDK_DRAG_LEAVE GDK_DRAG_MOTION GDK_DRAG_STATUS GDK_DROP_START GDK_DROP_FINISHED GDK_SETTING GDK_OWNER_CHANGE Are there associated signals, or do they all just use the _event_ signal? Thanks! --- Andrew Krause ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
treeview drag icon appears black using gtk 2.8.18
Hi all, I have recently upgraded from gtk 2.4 to 2.8.18 on Win32 and have noticed that the treeview drag icon now appears to use a black background colour. This makes the icon undeadable as it rendered as black text on a black background. Are there any new style properties or other changes in 2.8 in this area? Thanks, JC ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
A problem with FontDialog and FontButton
Hi, iwant to know if a gtk font dialog can return the full pach of a selected font ex: C:\WINDOWS\Fonts\Arial.ttf if not : *** can i use a file selection dlg that return the full path *** how to set a file filter only for ex:*.ttf Regards. _ MSN Messenger : discutez en direct avec vos amis ! http://www.msn.fr/msger/default.asp ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
Understand RadioButtons
Hi, this the matter: i have a GtkEntry set to editable(FALSE) and i want it to be set to TRUE when an user select a radiobutton i've tried with radio_button_toggled , radio_button_change_ group , radio_button_activate without result, What's the signals for the radiobutton to make my entry editable for example , thanks. _ MSN Messenger : discutez en direct avec vos amis ! http://www.msn.fr/msger/default.asp ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
problem with gtk_list_store_set
Hello , i got a little problem with this fuction , when i try to add a new item to the list , it erase the last one , in final i got one item in my list , and i want 5 items for example , this a piece of the code: if(gtk_spin_button_get_value(GTK_SPIN_BUTTON(moy))>9.26) { strcpy(success,"Successed") ; pass=TRUE; } else { strcpy(success,"Dismissed"); pass=FALSE; } gtk_list_store_set(store,&iter, STUDENT_COLUMN,gtk_entry_get_text(GTK_ENTRY(name)) , MOY_COLUMN,gtk_spin_button_get_value(GTK_SPIN_BUTTON(moy)), PASS_COLUMN,pass, MENTION_COLUMN,success, -1); Please help _ Testez Windows Llive Mail Beta ! http://www.msn.fr/newhotmail/Default.asp?Ath=f ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
Fwd: Re: lost files
--- Begin Message --- I tried that. After installing GTK, I tried launching the program, and it came up with the same error message, that it could not find those files. I looked for the files in the installed GTK program, and could not locate them james >>> Xyber Blue <[EMAIL PROTECTED]> 12/07/05 8:51 PM >>> Those are the static libraries for gtk and glib. You can find these files on /usr/lib directory since linux distros bundled already these packages and that if you installed the gtk. You can create these files by downloading the gtk source at www.gtk.org On 12/8/05, James Borrone <[EMAIL PROTECTED]> wrote: > > I am trying to determine how to find the following files, they are not > presently on my machine and ws wondering if they are downloadable. > > libgdk.a > libglib.a > libgmodule.a > libgtk.a > > I am not a programmer, and have very limited knowledge of the UNIX/LINUX > environment,, so basically if your mom wold not understand what you are > writing neither would I. I am just trying to get a program to work, and > it needs to find these files. > > Thanks > > James Borrone > ___ > gtk-list mailing list > gtk-list@gnome.org > http://mail.gnome.org/mailman/listinfo/gtk-list > --- End Message --- ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
lost files
I am trying to determine how to find the following files, they are not presently on my machine and ws wondering if they are downloadable. libgdk.a libglib.a libgmodule.a libgtk.a I am not a programmer, and have very limited knowledge of the UNIX/LINUX environment,, so basically if your mom wold not understand what you are writing neither would I. I am just trying to get a program to work, and it needs to find these files. Thanks James Borrone ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
GTK File Chooser: Managing files via tags
Hey, This is a concept I thought of this afternoon, it's a slightly different way of managing files, and one that I think could be quite popular. This isnt a replacement for a directory tree, but more something that can be implemented at a software level and complement it quite nicely. If anyone here has used del.icio.us, flickr or technorati in the past, you would know how it arranges things, via tags. Each item has a range of one word tags. I considered using this approach for files this afternoon, and quickly created this mockup in glade. https://iphitus.no-ip.org/images/gtktag.png You save a file. You type in tags when saving the file. Those tags are available in the side pane along with bookmarks. You click a tag, the file chooser lists all items that are tagged with that. The tags of all the files could be stored in some sort of file in the user's home directory. By having tags like that, implemented in the GTK file chooser, they would become immediately accessable to every GTK app out there that uses it. Gimp, Gaim, Abiword, Firefox, Gnumeric, etc. Think of how much more effective a way of managing files it would be. You'd no longer be searching for a file, or wondering where you saved it, so long as you tagged it right, you'd be fine, hit the tag, pick the file. Is anyone else interested in this idea and possibly implementing it? James Rayner -- iphitus - www.iphitus.tk ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
Re: Plotting, text drawing, etc.
On Mon, 7 Feb 2005, Ben Johnson wrote: > On Mon, Feb 07, 2005 at 07:28:12PM -0800, James Frye wrote: > > Ali, > > > > Thanks. I'll have a look for future reference, but I figured out a quick > > & dirty hack that does what I need. I have the GTK menu program start > > gnuplot as a pipe, then re-parent gnuplot's plot window into a GTK widget. > > So I stuff gnuplot commands & data into the pipe, and the resulting plot > > shows up where I want it. > > > > Constructive laziness :-) > > That sounds like a perfect solution to me. I'd been reading about the > OLE-like Gnome stuff and how it's really so incredibly easy to embed > features of one program in another. I think this is extremely cool and > I would love to read more about what you did, and see a brief example if > you don't mind sharing. :) Thanks. Ben, It's not really OLE, but XWindow reparenting, which was around long before :-) I could put the whole thing somewhere if people are interested, otherwise here's a quick outline. You need a package named "gnuplot_i" (written by N. Devillard). It's a few hundred lines of C code that handles all the details of running gnuplot in a pipe, and encapsulates gnuplot commands for e.g. an xy plot into a function call. I've improved on it a little, since I've used it regularly for doing simple plots within a program. but the original should work. Do the necessary gnuplot_i setup, giving it a unique title: sprintf (cmd, "-geometry 800x600 -title '%s%d'", argv [0], getpid ()); h1 = gnuplot_init (cmd); and use GTK to make your GUI. Create your plotting area as a socket, set its size, add it to the gui, and eventually call gtk_main (). sock = gtk_socket_new (); gtk_widget_set_size_request (GTK_WIDGET (sock), 600, 300); gtk_box_pack_start (GTK_BOX (main_vbox), sock, TRUE, TRUE, 0); In your "redraw" function (the one that actually does plotting, create your plot from data, and call one of the gnuplot_i functions to draw it. This will pop up an X window. Now you need a function that uses XQueryTree and XFetchName to scan the window list for the gnuplot window (which will have the unique name you created). This returns an X Window ID. Then you just call gtk_socket_steal and the plot window gets sucked into the GUI app. Note that you do the search only once, and (at least on my system) have to sleep for a bit before looking for the new window. So the code looks like this: ...make plot... if (first) { sleep (1); xid = GetXWinID (title); } if (xid != 0) gtk_socket_steal (GTK_SOCKET (sock), xid); first = FALSE; ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
Re: Plotting, text drawing, etc.
Ali, Thanks. I'll have a look for future reference, but I figured out a quick & dirty hack that does what I need. I have the GTK menu program start gnuplot as a pipe, then re-parent gnuplot's plot window into a GTK widget. So I stuff gnuplot commands & data into the pipe, and the resulting plot shows up where I want it. Constructive laziness :-) James On Mon, 7 Feb 2005, J. Ali Harlow wrote: > On 07/02/05 04:46:50, James Frye wrote: > > Ok, dumb question #2. Is there a package that will let me do basic > > plotting within a GTK window? I found one called GtkPlot, but it > > only seems to link with GTK 1.x, and I can't find any documentation > > at all for it. > > GtkExtra - http://gtkextra.sourceforge.net/ > > As far as I know, the Gtk+ 2.x version (gtkextra-2) still hasn't been > released so you need to build from cvs, which is a bit of a pain, but > it does work. > > Cheers, > > Ali. > ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
Plotting, text drawing, etc.
Ok, dumb question #2. Is there a package that will let me do basic plotting within a GTK window? I found one called GtkPlot, but it only seems to link with GTK 1.x, and I can't find any documentation at all for it. If not, where can I look for information on doing graphics text? I have a lot of miscellaneous routines around that I could adapt, except that I can't figure out how to draw text at a specific size & angle, as would be needed for e.g. axis labels. Thanks, James ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
Re: How to static link a program?
Thanks, everyone who replied to my question. I'll save some bandwidth by not replying to each individually. Looks like some of the suggestions will get me on track - assuming, of course, that I get an answer to my next dumb question :-) James ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
How to static link a program?
Hi, OK, this is probably a dumb question, but I can't find the answer. How can I statically link a Gtk program? That is, I've written a program that uses Gtk graphics (and the GtkGL extension widget to allow OpenGl). It works fine on my personal Linux boxes, where I have control and can install the shared libs. Now I want to run it on our Linux cluster (and other people may want to run it on their machines). I have no root access there, and very little say in what gets installed. So how can I statically link my program (or at least the GtkGl library part of it) so that the executable will run on any system? There doesn't seem to be a make or configure option to even make static libs... Thanks, James ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
Re: another GtkToggleButton signal question
On Sun, 2004-11-21 at 19:49 -0700, Neil Zanella wrote: > Hello, > > Can I also rely on the fact that if a GtkToggleButton is active then a > function call > to set its active state to TRUE is not going to trigger a signal. In > general, is it true > that signal handlers are invoked when properties are CHANGED BY A FUNCTION > OR USER ACTION, and not when a function causes the given property to remain > the same? > In particular, if a toggle button state is true, then setting it to > true via a function > does not generate a signal. Is this concept true for GTK signals in general? It depends entirely on the signal and property in question. For signals in GTK+ itself, generally yes (I don't know of a counter-example within libgdk/libgdk-pixbuf/libgtk offhand). Outside of GTK+ it depends entirely on the code given. GObject's "notify" signal, for example, is always emitted when set_property() is called (so "toggled" will only be fired when the "active" property has changed, whereas "notify::active" will be fired anytime someone calls 'g_object_set (button, "active", someval, NULL);' -- Peace, Jim Cape http://esco.mine.nu http://ignore-your.tv "If even one reporter had stood up during a pre-Iraq Bush press conference last year and shouted, `Bullshit!' it might have made a difference." -- Matt Taibbi, New York Press signature.asc Description: This is a digitally signed message part ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: GtkToggleButton signals question
On Sun, 2004-11-21 at 19:27 -0700, Neil Zanella wrote: > Hello, > > I would like to know whether the following behavior is reliable, since > it is not documented > in the API reference: > > When I press a GtkToggleButton (suppose the button goes from being > pressed out to > pressed in), I notice that the "toggled" signal is emitted _AFTER_ the > button becomes > pressed in, not before. > > Can I rely on this behavior? Probably yes, because the "toggled" signal is emitted from the "clicked" handler inside of gtktogglebutton.c, though why do you *need* to rely on this behavior? > Also, how is the "toggled" signal different from the "clicked" signal > pertaining to the > GtkButton widget from which GtkToggleButton inherits? "toggled" is emitted whenever the "active" property changes (which may happen as a result of user interaction or calls to gtk_toggle_button_set_active/g_object_set), whereas "clicked" is only emitted when the user actually clicks on a button (or, I think, uses mnemonic shortcuts). -- Peace, Jim Cape http://esco.mine.nu http://ignore-your.tv "If even one reporter had stood up during a pre-Iraq Bush press conference last year and shouted, `Bullshit!' it might have made a difference." -- Matt Taibbi, New York Press signature.asc Description: This is a digitally signed message part ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: How can I save a PNG file from a GdkPixbuf
On Sun, 2004-10-24 at 16:15 -0400, Jack Chen wrote: > Hi, dear list members, > > I have a problem that I hope someone can help me with. I would like to > save a GdkPixbuf to a PNG file using either > > gdk_pixbuf_savev (GdkPixbuf *pixbuf, > const char *filename, > const char *type, > char **option_keys, > char **option_values, > GError **error); > > or > > gdk_pixbuf_save (GdkPixbuf *pixbuf, > const char *filename, > const char *type, > GError **error, > ...); > > The problem is I don't know what those 'option...s' are for, and if I > leave them all as NULL, the program can compile, but will crash after > starting. I think the problem is I don't know what 'options' to specify > for the PNG format. I can save a JEPG file no problem because there's a > sample source code in the GdkPixbuf's reference, but there's no example > for PNG. > > I will really appreciate it if someone can help me out with this > problem. > > Thank you. > > Jack The options are for passing metadata to the png module to use when saving. You should be able to call gdk_pixbuf_save() with a NULL "..." without it crashing (the savev requires an strv array, though the first element in the array can be NULL) e.g.: char *keys[1] = { NULL }; char *vals[1] = { NULL }; gdk_pixbuf_savev (pixbuf, "some-filename.png", "image/png", keys, values, NULL); or gdk_pixbuf_save (pixbuf, "some-filename.png", "image/png", NULL, NULL); -- Peace, Jim Cape http://esco.mine.nu http://ignore-your.tv "If even one reporter had stood up during a pre-Iraq Bush press conference last year and shouted, `Bullshit!' it might have made a difference." -- Matt Taibbi, New York Press signature.asc Description: This is a digitally signed message part ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: Pango wont compile
Patrik Jansson wrote: Do you know how to do that, when installing from port? Im not that familiar with special case compiling. Yes, you need to define the LDFLAGS env variable before running the install command, i.e. bash syntax: export LDFLAGS=-lpthread or you can just do this: bash$ LDFLAGS=-lpthread James Thanks! -Patrik - Original Message - From: "James Williamson" <[EMAIL PROTECTED]> To: "Patrik Jansson" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Wednesday, October 13, 2004 5:37 PM Subject: Re: Pango wont compile Hi Patrik, It's because you need to link against the thread library, you should really be seeing a -lthread switch. James Im having problems with Pango and also problems on where I should turn myself to get some help with this. Pangos own website doesnt say much but it directs me to gtk and hopefully there is someone here who might help me out. Running FreeBSD and trying to install pango from port but it fails saying this: cc -O -pipe -Wall -o .libs/pango-querymodules querymodules.o -L/usr/local/lib -L/usr/X11R6/lib ./.libs/libpangox-1.0.so ./.libs/libpangoxft-1.0.so /usr/ports/x11-toolkits/pango/work/pango-1.4.0/pango/.libs/libpangoft2-1.0.s o -lXft /usr/X11R6/lib/libXrender.so /usr/X11R6/lib/libX11.so /usr/X11R6/lib/libXau.so /usr/X11R6/lib/libXdmcp.so ./.libs/libpangoft2-1.0.so /usr/ports/x11-toolkits/pango/work/pango-1.4.0/pango/.libs/libpango-1.0.so -lfontconfig -lfreetype -lz ./.libs/libpango-1.0.so -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -liconv -Wl,--rpath -Wl,/usr/X11R6/lib /usr/X11R6/lib/libX11.so: undefined reference to `pthread_cond_signal' /usr/X11R6/lib/libX11.so: undefined reference to `pthread_cond_broadcast' /usr/X11R6/lib/libX11.so: undefined reference to `pthread_cond_init' /usr/X11R6/lib/libX11.so: undefined reference to `getpwuid_r' /usr/X11R6/lib/libX11.so: undefined reference to `pthread_mutex_unlock' /usr/X11R6/lib/libX11.so: undefined reference to `getpwnam_r' /usr/X11R6/lib/libX11.so: undefined reference to `pthread_self' /usr/X11R6/lib/libX11.so: undefined reference to `pthread_mutex_destroy' /usr/X11R6/lib/libX11.so: undefined reference to `pthread_mutex_lock' /usr/X11R6/lib/libX11.so: undefined reference to `pthread_cond_wait' /usr/X11R6/lib/libX11.so: undefined reference to `pthread_cond_destroy' /usr/X11R6/lib/libX11.so: undefined reference to `pthread_mutex_init' gmake[4]: *** [pango-querymodules] Error 1 gmake[4]: Leaving directory `/usr/ports/x11-toolkits/pango/work/pango-1.4.0/pango' gmake[3]: *** [all-recursive] Error 1 gmake[3]: Leaving directory `/usr/ports/x11-toolkits/pango/work/pango-1.4.0/pango' gmake[2]: *** [all] Error 2 gmake[2]: Leaving directory `/usr/ports/x11-toolkits/pango/work/pango-1.4.0/pango' gmake[1]: *** [all-recursive] Error 1 gmake[1]: Leaving directory `/usr/ports/x11-toolkits/pango/work/pango-1.4.0' gmake: *** [all] Error 2 *** Error code 2 Stop in /usr/ports/x11-toolkits/pango. *** Error code 1 Stop in /usr/ports/net/ethereal. What might be the problem here? And how do I solve it? If im in the complete wrong place, is there someone who knows another mailing-list which maybe could help me out? Best Regards, Patrik Jansson ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list -- James Williamson Name On The Net Ltd web: http://www.nameonthe.net email: [EMAIL PROTECTED] phone: +44 (0)870 1657215 ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list -- James Williamson Name On The Net Ltd web: http://www.nameonthe.net email: [EMAIL PROTECTED] phone: +44 (0)870 1657215 ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: Pango wont compile
Hi Patrik, It's because you need to link against the thread library, you should really be seeing a -lthread switch. James Im having problems with Pango and also problems on where I should turn myself to get some help with this. Pangos own website doesnt say much but it directs me to gtk and hopefully there is someone here who might help me out. Running FreeBSD and trying to install pango from port but it fails saying this: cc -O -pipe -Wall -o .libs/pango-querymodules querymodules.o -L/usr/local/lib -L/usr/X11R6/lib ./.libs/libpangox-1.0.so ./.libs/libpangoxft-1.0.so /usr/ports/x11-toolkits/pango/work/pango-1.4.0/pango/.libs/libpangoft2-1.0.so -lXft /usr/X11R6/lib/libXrender.so /usr/X11R6/lib/libX11.so /usr/X11R6/lib/libXau.so /usr/X11R6/lib/libXdmcp.so ./.libs/libpangoft2-1.0.so /usr/ports/x11-toolkits/pango/work/pango-1.4.0/pango/.libs/libpango-1.0.so -lfontconfig -lfreetype -lz ./.libs/libpango-1.0.so -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -liconv -Wl,--rpath -Wl,/usr/X11R6/lib /usr/X11R6/lib/libX11.so: undefined reference to `pthread_cond_signal' /usr/X11R6/lib/libX11.so: undefined reference to `pthread_cond_broadcast' /usr/X11R6/lib/libX11.so: undefined reference to `pthread_cond_init' /usr/X11R6/lib/libX11.so: undefined reference to `getpwuid_r' /usr/X11R6/lib/libX11.so: undefined reference to `pthread_mutex_unlock' /usr/X11R6/lib/libX11.so: undefined reference to `getpwnam_r' /usr/X11R6/lib/libX11.so: undefined reference to `pthread_self' /usr/X11R6/lib/libX11.so: undefined reference to `pthread_mutex_destroy' /usr/X11R6/lib/libX11.so: undefined reference to `pthread_mutex_lock' /usr/X11R6/lib/libX11.so: undefined reference to `pthread_cond_wait' /usr/X11R6/lib/libX11.so: undefined reference to `pthread_cond_destroy' /usr/X11R6/lib/libX11.so: undefined reference to `pthread_mutex_init' gmake[4]: *** [pango-querymodules] Error 1 gmake[4]: Leaving directory `/usr/ports/x11-toolkits/pango/work/pango-1.4.0/pango' gmake[3]: *** [all-recursive] Error 1 gmake[3]: Leaving directory `/usr/ports/x11-toolkits/pango/work/pango-1.4.0/pango' gmake[2]: *** [all] Error 2 gmake[2]: Leaving directory `/usr/ports/x11-toolkits/pango/work/pango-1.4.0/pango' gmake[1]: *** [all-recursive] Error 1 gmake[1]: Leaving directory `/usr/ports/x11-toolkits/pango/work/pango-1.4.0' gmake: *** [all] Error 2 *** Error code 2 Stop in /usr/ports/x11-toolkits/pango. *** Error code 1 Stop in /usr/ports/net/ethereal. What might be the problem here? And how do I solve it? If im in the complete wrong place, is there someone who knows another mailing-list which maybe could help me out? Best Regards, Patrik Jansson ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list -- James Williamson Name On The Net Ltd web: http://www.nameonthe.net email: [EMAIL PROTECTED] phone: +44 (0)870 1657215 ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: gtk+-2.4.10 and Pango 1.2.0/1.4.0
But how do you gt Pango to build with the Xft backend? Any hints about what Pango is looking for? I have been looking at Pango configure scripts and don't see its test for the Xft backend. Consequently, Pango is not building the pangoxft lib. Thanks. Jim Hi, Sakari Aaltonen writes: > './configure' for gtk+-2.4.10 fails (on a Linux machine), complaining > > configure: error: Pango 1.2.0 and Xft backend is required for x11 target Pango has multiple backends and GTK+ on X11 depends on the PangoXft backend being available. It won't be sufficient to have Pango installed, you need Pango built with the Xft backend. You can check for it using pkg-config: pkg-config --modversion pangoxft As long as this does not return 1.4.0 or larger you don't need to attempt to configure GTK+. Sven __ Switch to Netscape Internet Service. As low as $9.95 a month -- Sign up today at http://isp.netscape.com/register Netscape. Just the Net You Need. New! Netscape Toolbar for Internet Explorer Search from anywhere on the Web and block those annoying pop-ups. Download now at http://channels.netscape.com/ns/search/install.jsp ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: g_value_new Macro?
On 27/08/04 10:56, Ryan McDougall wrote: I spotted where the docs say it must be zero init'd, but I can't see in the source *why* thats needed. I guess so you don't call init on a value that has already been init'd without calling reset first. Well, the code in g_value_init() is checking whether the type field of the GValue is zeroed out. It is right there in the code. Perhaps its my ignorance of GValue, why is memory allocation GValue's problem, thus necessitating an unset function. Shouldn't I dealloc my own pointers? A GValue can be used to hold an arbitrary value, including things like strings and GObjects. In the case of a string, the GValue holds an allocated string so not calling g_value_unset() will lead to the string being leaked. In the case of a GObject, you will get a reference leak. Tommi mentioned this in his reply to you. If the GValue is allocated on the stack, you only need to g_value_unset() it. If you've allocated it on the heap, you will need to free the GValue itself. For some internal code, I prefer to pass a heap allocated GValue pointer to some unnecessary copies of stack alloc'd GValues, so I use it outside of the tutorial (which can be changed). Basically I don't see any reason *not* to add it once the g_new0 bug is fixed. When passing a GValue into a function you call, you'd usually pass it as "&value". Note that this won't work if you want the value to last longer than the scope you defined it in. In practice, this isn't a problem for the existing use cases (also, GValue isn't really that good a choice for long term storage). [also note that doing a straight copy of a GValue is an error in most cases. If you unset one copy, it will invalidate the other]. James. -- Email: [EMAIL PROTECTED] WWW: http://www.jamesh.id.au/ ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Maintaining socket connections
Folks, I'm working on a pair of processes, one multithreaded and one single-threaded. The multithreaded process monitors incoming data on a TCP socket and a UDP socket, captures the data as it comes in and cleans it up, then writes it through another TCP socket to the second process. I am running into problems with that socket just closing off intermittently. Both processes are still running, but the data stops flowing. No errog log output to indicate that the socket is broken, nothing. It just stops working. The receiving process tries to read the socket and gets nothing, and the sending process stops writing packets because the socket is no longer writable. I've got code in place that is supposed to close the socket and reconnect, but it doesn't seem that it ever gets triggered. On the receiving end, I'm just using vanilla socket code; on the multithreaded side, I'm using gnet and giochannels. This code originally connected through a UNIX socket but I'm trying to make it network-capable. The UNIX socket version would stay up for literally MONTHS at a time. I MUST have that level of stability. Am I wasting my time? Is glib and giochannels not capable of providing that? Can anyone point me to an app that successfully uses them to maintain a *constant* connection, with automatic reconnection if the connection is somehow lost? thanks, Jim ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: How would I use casting ?
On Wed, 2004-07-14 at 17:32 +0530, Dipak G Patil wrote: > > I asked just you because, you have said following method is not best > way but neither told why nor suggested best way. And obviously such > statement would make anybody confused. > So I thought I would better clear the conversion of GdkWindow to > GtkWidget and vice versa which was my basic question. > And I am reading docs, tutorials and examples and I thing anybody gets > queries while learning anything right ? And while learning anything if > anybody confuses you then better way is solve the confusion from the > creater. Don't take a lot of this personally, many people on these lists are subscribed to dozens of lists generating hundreds (if not thousands) of total mails a day. GIMPNet (IRC) is a better means to ask multiple small questions, and irc://irc.gnome.org/#gtk+ irc://irc.gnome.org/#gnome-love are good channels for GTK+/GNOME development help, respectively. Typically it takes a few minutes for someone to notice your question and reply (assuming someone on IRC knows the answer), since most of us are doing other things as well. The de-facto standing policies are "just ask", and private messages (/msg) are generally reserved for legitimate private conversations. (IOW, just show up and ask, then hang around for a while, if someone knows the answer they'll reply, and there's rarely a need to move discussion to a private chat.) Also, I've found that existing real-world app source that does what you want (or something similar) is often more helpful than the examples provided in the docs--assuming your app is license-compatible with the code you're reading, of course. -- Peace, Jim Cape http://esco.mine.nu http://ignore-your.tv "If even one reporter had stood up during a pre-Iraq Bush press conference last year and shouted, `Bullshit!' it might have made a difference." -- Matt Taibbi, New York Press signature.asc Description: This is a digitally signed message part ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
scroll bars and sorted tree views
I'm having trouble getting the vertical scroll bar of a sorted tree view to clamp to the top while adding new data. When the slider is at the top I want the slider to stay at the top after the new data is added. When the slider is not at the top, it should stay where it is after the new data is added. (Basically I want it to act like Mozilla Mail sorted by descending date.) I've tried playing with the "changed" and "value-changed" callbacks of the adjustment, but I haven't gotten anything to work properly. Any advice? James Below is the code that I used to emulate adding dynamic data to the tree view. #include struct info { GtkTreeStore *store; int val; }; gboolean addval( gpointer data ) { struct info *i = (struct info *)data; GtkTreeIter iter; gtk_tree_store_append( i->store, &iter, NULL ); gtk_tree_store_set( i->store, &iter, 0, i->val, -1 ); if( i->val < 50 ) { i->val += 1; return TRUE; } return FALSE; } int main( int argc, char **argv ) { GtkWidget *window; GtkScrolledWindow *scroll; GtkTreeStore *store; GtkTreeView *view; struct info i; gtk_init( &argc, &argv ); window = gtk_window_new( GTK_WINDOW_TOPLEVEL ); g_signal_connect( G_OBJECT(window), "delete_event", G_CALLBACK(gtk_main_quit), NULL ); scroll = GTK_SCROLLED_WINDOW( gtk_scrolled_window_new(NULL, NULL) ); store = gtk_tree_store_new( 1, G_TYPE_INT ); view = gtk_tree_view_new_with_model(store); gtk_tree_view_insert_column_with_attributes( view, 0, "Value", gtk_cell_renderer_text_new(), "text", 0, NULL ); gtk_tree_sortable_set_sort_column_id( store, 0, GTK_SORT_DESCENDING ); gtk_container_add( scroll, view ); gtk_container_add( window, scroll ); i.store = store; i.val = 0; gtk_timeout_add( 2000, addval, &i ); gtk_widget_show_all( window ); gtk_main(); return 0; } ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: using properties in gobject instance_init
On Thu, 2004-07-08 at 16:42 -0400, Steve Feehan wrote: > I hope this is the correct forum for this question... > > For example, the object is created: > > g_object_new(FOO_TYPE, "name", "Steve", NULL); > > In the instance_init function for type Foo I would like to use > this property. But it appears that the set_property function > is called after instance_init. > > Is this correct? If so, how can I use properties when > constructing the object? > > Thanks. The order of functions called when creating a GObject is: base_init() [called once] class_init() [called once per class/subclass] constructor() +- In this func must chain to parent first, to actually allocate the object. That calls +-> instance_init() +-> set_property() for G_PARAM_CONSTRUCT properties. +- Then your constructor code, which comes after the chain-to-parent call. set_property() for non-CONSTRUCT properties. So the easiest way is to have your properties declared as G_PARAM_CONSTRUCT properties, and create the things which use those properties in the my_obj_constructor() function. James M. Cape signature.asc Description: This is a digitally signed message part ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: TreeView cell editing
I'm actually using the standard CellRendererText, but I would like my application to have a bit more controll over the gtk_entry while the cell is being edited. I can't seem to find any methods of any object that will return the gtk_entry so I can connect to some of its signals. It appears that your example is from a custom renderer. I wouldn't expect to have to subclass the renderer in order to do this. Any thoughts? James Igor Gorbounov wrote: James Pelletier wrote: Is there a way to programatically determine if a cell in a tree view is currently being edited or to get the text from the entry field used for editing? More importantly, is there a way to force a cell that is currently being edited to end editing? [...] Well, may it won't help (because I've done this on C++ in gtkmm), but I've used the focus_out event for gtk_entry in a cell renderer to end the editing when user changes focus while editing: bool Combo_CellRenderer::on_focus_out(GdkEventFocus* event, Gtk::Entry* entry, Glib::ustring path) { if (!entry->is_focus()) on_edited(entry, path); return false; } Igor Gorbounov ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: TreeView cell editing
Thanks! I was hoping for a cleaner solution, but I can at least use this as a work-around for now! James Dmitry M. Shatrov wrote: James Pelletier wrote: More importantly, is there a way to force a cell that is currently being edited to end editing? You can do it by moving cursor to another cell without editing it (and, maybe, moving the cursor back to the origin figured out with gtk_tree_view_get_cursor). It works for me. if ( gtk_tree_view_get_model (GTK_TREE_VIEW (tree)) != NULL) { GtkTreePath *path = gtk_tree_path_new_first (); gtk_tree_view_set_cursor (GTK_TREE_VIEW (tree), path, NULL, FALSE); gtk_tree_path_free (path); } ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
TreeView cell editing
Is there a way to programatically determine if a cell in a tree view is currently being edited or to get the text from the entry field used for editing? More importantly, is there a way to force a cell that is currently being edited to end editing? I can't find anything in the tree view or tree store documentation that would allow me to do this, and I can't seem to search the mailing list archives to see if there is a way to do this. Thanks, James ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: Finding out the signal detail from a handler
On Sun, 2004-06-27 at 12:44 +0200, Daniel Brockman wrote: > Hi folks, > > I've been looking through the GSignal documentation and source in vain > for a way to find out what detail a signal was emitted with within a > signal handler that was connected without a detail. > > For example, let's say I want to connect a handler to the "notify" > signal, and perform different actions depending on which property was > changed. Alternatively, let's say I want to print the name of the > property that was changed. > > The reason I want to do this is in fact to avoid having to create lots > of small signal handlers to do similar tasks. > > Is this at all possible? If it isn't, could it and should it be? For the exact case of GObject::notify, you can use the GParamSpec* argument in the signal prototype to get that info... I *think* most other detailed signals somehow or other include the detail as an argument somewhere. -- Peace, Jim Cape http://ignore-your.tv "We still name our military helicopter gunships after victims of genocide. Nobody bats an eyelash about that: Blackhawk. Apache. And Comanche. If the Luftwaffe named its military helicopters Jew and Gypsy, I suppose people would notice." -- Noam Chomsky, "Propaganda and the Public Mind" signature.asc Description: This is a digitally signed message part ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: Is there a way to access to the GtkFileChooser's file list ??
On Thu, 2004-05-27 at 14:24 +0200, [EMAIL PROTECTED] wrote: > Thanks for your fast answer. > > Ok, I will report a bug on Gtk+ for this... But, are you sure there is no way > to put a signal and a callback on the file list ? For instance, can we have > the "button-press-event" signal on this widget ? > > I tried to do what you told me on my treeview to set up the DnD. However, it > doesn't work. Is what I wrote correct ? > > > static GtkTargetEntry target_source[] = { > { "treeviewdnd", GTK_TARGET_SAME_WIDGET, 0 } > }; > > static GtkTargetEntry target_destination[] = { > { "treeviewdnd", GTK_TARGET_SAME_WIDGET, 1 }, > { "text/x-uri-list", GTK_TARGET_SAME_APP, 2 } > }; > > . > . > . > > gtk_tree_view_enable_model_drag_source(GTK_TREE_VIEW(pTreeView), > GDK_BUTTON1_MASK, target_source, sizeof(target_source) / > sizeof(GtkTargetEntry), GDK_ACTION_MOVE); > > gtk_tree_view_enable_model_drag_dest(GTK_TREE_VIEW(pTreeView), > target_destination, sizeof(target_destination) / sizeof(GtkTargetEntry), > GDK_ACTION_MOVE); > > > The other target is for an intern Dnd. > > Did I write/understand it wrong ? If so, please tell me what I should write > and what you mean by "just add the "text/x-uri-list" target to your > TreeView". > > Thanks for advance ! > > Simon. Sorry, I wasn't very clear. What I meant was "it should work so that all you have to do is add 'text/x-uri'list" to your TreeView, but it doesn't work that way now and will require a patch to GTK+ to do so." Since you're apparently familiar with TreeView DnD (I'm not), I was suggesting you just dive into the GTK+ source and add the appropriate drag targets to the GtkFileChooser widgets yourself (attaching the resulting diff to a bug in bugzilla so it won't get lost). Since all the GtkFileChooser* widgets use the same code (in gtkfilechooserdefault.c) to draw the list in the chooser widget, it should be a trivial patch to write. And, I should probably also apologize if that sounds presumptuous, it just seems like something best done at the GTK+ level, and F/OSS makes doing that easy :-). -- Peace, Jim Cape http://ignore-your.tv "We still name our military helicopter gunships after victims of genocide. Nobody bats an eyelash about that: Blackhawk. Apache. And Comanche. If the Luftwaffe named its military helicopters Jew and Gypsy, I suppose people would notice." -- Noam Chomsky, "Propaganda and the Public Mind" signature.asc Description: This is a digitally signed message part ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
RE: Gtk command line console widget
Mariano, You are absolutely right. Thanx -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mariano Suárez-Alvarez Sent: Wednesday, May 26, 2004 2:49 PM To: Russell Shaw Cc: '[EMAIL PROTECTED]' Subject: Re: Gtk command line console widget ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
RE: Gtk command line console widget
I have a command language processor module (sort of like a script language parser) that queries a data base. I want a command line input window (like a DOS/Unix console window). I want to control where to put it, how it looks (ie fonts, background etc.) and process the user input. I was hoping there was a widget with these attributes. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Russell Shaw Sent: Wednesday, May 26, 2004 9:00 AM Cc: '[EMAIL PROTECTED]' Subject: Re: Gtk command line console widget MAIDA, JAMES C. (JIM) (JSC-SF) (NASA) wrote: > I am looking for a command line console for gtk. To do what commands? An xterm clone as a widget that can be embedded into a gtk app? > Something that will work on both Linux and Windows. > At the very least, I would like to have a text input window (not just > a single line). I am very pleased with gtk so far. It is conceptually > and implementation-wise much cleaner than MFC etc. > Jim Maida ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: Is there a way to access to the GtkFileChooser's file list ??
On Wed, 2004-05-26 at 20:52 +0200, [EMAIL PROTECTED] wrote: > Hi ! > > Iâm a newbie and I really need your help ! Iâm currently using a GtkFileChooser > for an application Iâm programming and I need something I canât happen to find > anywhere. Iâd like to access to the file list field. Indeed, Iâd like to > implement a drag&drop between the treeview which contains the file list and > another treeview so I can add easily a file in my treeview. > > I know itâs possible to access to the file list in a GtkFileSelection by using > the field file_list. However, is it possible to do the same thing with a > GtkFileChooser ? If so, could you guys tell me how ? > > Thanks so much for advance ! I really need this information, so please help > m ! > > Simon. There currently is no way to do what you want, though that functionality arguably belongs in FileChooser (so you don't need to bother with DnD for the file-chooser, just add the "text/x-uri-list" target to your TreeView). I'd recommend filing a bug on GTK+ for this (if you write a patch to implement this, attach it to the bug, then drop a mail here it has a good chance of getting into the next release). The relevant file in the GTK+ source tree is: gtk/gtkfilechooserdefault.c -- Peace, Jim Cape http://ignore-your.tv "We still name our military helicopter gunships after victims of genocide. Nobody bats an eyelash about that: Blackhawk. Apache. And Comanche. If the Luftwaffe named its military helicopters Jew and Gypsy, I suppose people would notice." -- Noam Chomsky, "Propaganda and the Public Mind" signature.asc Description: This is a digitally signed message part ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Gtk command line console widget
I am looking for a command line console for gtk. Something that will work on both Linux and Windows. At the very least, I would like to have a text input window (not just a single line). I am very pleased with gtk so far. It is conceptually and implementation-wise much cleaner than MFC etc. Jim Maida ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: GDK event types and g_signal_connect()
On Fri, 2004-04-23 at 20:16 -0700, Antonia Kieranov Titlis wrote: > Hi all, > > I want to ask something. If I want to use event > handling for the handling in GTK, what should I use? > g_signal_connect()? I heard that I can use gdk event > types for that. what's the difference between > g_signal_connect() and GDK event types? > > Thanks, Kieran http://docs.linux.cz/gtk-faq/x515.html -- Peace, Jim Cape http://ignore-your.tv "We still name our military helicopter gunships after victims of genocide. Nobody bats an eyelash about that: Blackhawk. Apache. And Comanche. If the Luftwaffe named its military helicopters Jew and Gypsy, I suppose people would notice." -- Noam Chomsky, "Propaganda and the Public Mind" signature.asc Description: This is a digitally signed message part
GTK make problem
Hello, I'm trying to install GTK 2.2.4 on Solaris 8 (Sparc). I've installed all of the pre-requisites. When I perform a "make", I get this fatal error. Any ideas?? . . . gcc -DHAVE_CONFIG_H -I. -I. -I.. -DG_LOG_DOMAIN=\"GdkPixbuf\" -I.. -I.. -I../gdk-pixbuf -I../gdk-pixbuf -DGTK_SYSCONFDIR=\"/usr/local/etc\" -DGTK_VERSION=\"2.2.4\" -DGTK_BINARY_VERSION=\"2.2.0\" -DG_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DPREFIX=\"/usr/local\" -DG_DISABLE_CAST_CHECKS -threads -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include/libpng12 -DGDK_PIXBUF_ENABLE_BACKEND -DPIXBUF_LIBDIR=\"/usr/local/lib/gtk-2.0/2.2.0/loaders\" -DBUILT_MODULES_DIR=\"./.libs\" -g -O2 -Wall -c io-jpeg.c -fPIC -DPIC -o .libs/io-jpeg.o In file included from gdk-pixbuf-i18n.h:4, from gdk-pixbuf-private.h:32, from io-jpeg.c:36: ../config.h:144:1: warning: "HAVE_STDLIB_H" redefined In file included from /usr/include/jpeglib.h:24, from io-jpeg.c:35: /usr/include/jconfig.h:12:1: warning: this is the location of the previous definition /bin/bash ../libtool --mode=link gcc -g -O2 -Wall -o libpixbufloader-jpeg.la -rpath /usr/local/lib/gtk-2.0/2.2.0/loaders -avoid-version -module io-jpeg.lo -ljpeg libgdk_pixbuf-2.0.la -L/usr/local/lib -lgmodule-2.0 -ldl -lgobject-2.0 -lglib-2.0 -lm-lm gcc -shared -Wl,-h -Wl,libpixbufloader-jpeg.so -o .libs/libpixbufloader-jpeg.so .libs/io-jpeg.o -R/export/home/jdm/software/gtk+-2.2.4/gdk-pixbuf/.libs -R/usr/local/lib -R/usr/local/lib -L/usr/local/lib -ljpeg ./.libs/libgdk_pixbuf-2.0.so /usr/local/lib/libgmodule-2.0.so -ldl /usr/local/lib/libgobject-2.0.so /usr/local/lib/libglib-2.0.so -lm -lc Text relocation remains referenced against symbol offset in file jinit_memory_mgr0x9c /usr/lib/libjpeg.a(jdapimin.o) jinit_memory_mgr0x98 /usr/lib/libjpeg.a(jcapimin.o) jpeg_idct_4x4 0x260 /usr/lib/libjpeg.a(jddctmgr.o) jpeg_idct_4x4 0x268 /usr/lib/libjpeg.a(jddctmgr.o) jpeg_natural_order 0x6a0 /usr/lib/libjpeg.a(jcphuff.o) jpeg_natural_order 0xd38 /usr/lib/libjpeg.a(jdmarker.o) jpeg_natural_order 0xa90 /usr/lib/libjpeg.a(jcphuff.o) jpeg_natural_order 0x9c0 /usr/lib/libjpeg.a(jdhuff.o) jpeg_natural_order 0x138 /usr/lib/libjpeg.a(jcmarker.o) jpeg_natural_order 0x9b8 /usr/lib/libjpeg.a(jdhuff.o) jpeg_natural_order 0xa98 /usr/lib/libjpeg.a(jcphuff.o) . . . . 0x7ac /usr/lib/libjpeg.a(jccolor.o) 0x7a8 /usr/lib/libjpeg.a(jccolor.o) 0x7a4 /usr/lib/libjpeg.a(jccolor.o) 0x7a0 /usr/lib/libjpeg.a(jccolor.o) 0x79c /usr/lib/libjpeg.a(jccolor.o) 0x798 /usr/lib/libjpeg.a(jccolor.o) ld: fatal: relocations remain against allocatable but non-writable sections collect2: ld returned 1 exit status *** Error code 1 make: Fatal error: Command failed for target `libpixbufloader-jpeg.la' Current working directory /export/home/jdm/software/gtk+-2.2.4/gdk-pixbuf *** Error code 1 make: Fatal error: Command failed for target `all-recursive' Current working directory /export/home/jdm/software/gtk+-2.2.4/gdk-pixbuf *** Error code 1 make: Fatal error: Command failed for target `all-recursive' Current working directory /export/home/jdm/software/gtk+-2.2.4 *** Error code 1 make: Fatal error: Command failed for target `all-recursive-am' __ Do you Yahoo!? Yahoo! Photos: High-quality 4x6 digital prints for 25¢ http://photos.yahoo.com/ph/print_splash ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
SpinButton question
I'm writing an application that has a SpinButton widget in it. The SpinButton will have a very large range of values and I want to disable the ability to right-click on an arrow to max or bottom out the value (or at least treat it as a single step or page). I've tried blocking right-clicks through the button press callback, but that also disables the default standard context menu for the text area as well. Also, since the SpinButton doesn't tell me where the arrows are located within the widget, I can't tell where in the widget the click occurred to see whether the right-click should be ignored. Since I can "disable" page-up and page-down functionality by setting the paging size equal to the step size, I would think that I should be able to disable the maximize and minimize functionality as well. Any suggestions? Thanks, James ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: GtkComboBox :-)
On Wed, 2004-02-11 at 06:52 +0100, Stephane Wirtel wrote: > Hi Jim, > > Excuse me, but do you have a small example ? i am looking for it in the > source code and in the api reference, to understand the mechanism, but i > don't find. > > And i don't know how to implement a GtkComboBox with GtkCellLayout. > In the source code of gtkcombobox.c, i can see gtk_combo_box_cell_layout_* > but none examples. > > If you can help me, of course. GtkCellLayout is a particular API that different widgets and objects can implement. GtkComboBox implements the GtkCellLayout interface for you, meaning you can call gtk_cell_layout_* functions and pass a GtkComboBox as the cell_layout argument. So, for a combo box with a "pixbuf"/"text" row: lstore = gtk_list_store_new (2, GDK_TYPE_PIXBUF, G_TYPE_STRING); combo = gtk_combo_box_new_with_model (lstore); pcell = gtk_cell_renderer_pixbuf_new (); gtk_cell_layout_pack_start (combo, pcell, FALSE); gtk_cell_layout_add_attribute (combo, pcell, "pixbuf", 0); tcell = gtk_cell_renderer_text_new (); gtk_cell_layout_pack_start (combo, tcell, TRUE); gtk_cell_layout_add_attribute (combo, tcell, "text", 1); -- Peace, Jim Cape http://ignore-your.tv Everyone has their own Truth, but there is only one Honesty. ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: GtkComboBox :-)
On Tue, 2004-02-10 at 21:19 +0100, Stephane Wirtel wrote: > Hi all, > > I want to know if there is a way to show many columns of a GtkTreeModel > with a GtkComboBox ? > > I think no, but i am not sure. > > > Thanks > > matrixise > > Stephane GtkComboBox supports the GtkCellLayout interface, so you can pack cells ala GtkTreeViewColumn using it: http://developer.gnome.org/doc/API/2.0/gtk/GtkCellLayout.html -- Peace, Jim Cape http://ignore-your.tv Everyone has their own Truth, but there is only one Honesty. ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: UTF-8' to 'ISO-8859-1' is not supported
On Thu, 2004-01-01 at 17:01 +0530, ramprasad wrote: > Hi All, > > I Have cross compiled the GTK 2.2.4 for arm, when ever i run some > application i am getting following error. Can anybody tell me what is > missing in my tool chain or in my compilation. > > > "(calendar:1270): Gdk-WARNING **: Error converting from UTF-8 to STRING: > Conversion from character set 'UTF-8' to 'ISO-8859-1' is not supported" > > > Thanks in advance, > Ramprasad It sounds like the system's iconv does not support that conversion. GNU- libc systems should have /usr/lib/gconv/ISO8859_1.so and a line in /usr/lib/gconv/gconv-modules which reads something like: "module INTERNALISO-8859-1//ISO8859-1 1" "INTERNAL" is an alias for UTF-8. Please note that gconv-modules should not be edited, it is part of glibc -- so if you're using a glibc-based system, this is either a bug in the package or the installation. I'm not sure how exactly how the ARM arch operates, though. Perhaps this is an 'optimization' bug to save space by not including the ISO-8859-1 - > UTF-8 converter? The simplest solution is to set the default locale to use UTF-8, so no conversions are performed between the system and GTK+ (which uses UTF-8 internally) -- though some things like IRC and Mozilla may break w/o an ISO-8859-1 -> UTF-8 converter. The proper solution is to both set the default locale encoding to UTF-8 and install the proper converter. -- Peace, Jim Cape http://ignore-your.tv "It is literally true that, like Christianity, Socialism has conquered the world by defeating itself." -- Alexander Berkman, ABC of Anarchism signature.asc Description: This is a digitally signed message part
Re: more on g_strconcat problem
On Wed, 2003-11-26 at 23:30, Carl B. Constantine wrote: > Ok, I've definately nailed the problem down to an issue with the check > button in my data entry box. But it still doesn't make sense. consider > the following code: [snip] > sql = g_strconcat("insert into customers (id_req) values('", toggleTest, "')",0L); [snip] I'm not really informed on whether NULL is ever != 0, but have you tried terminating the string with NULL instead of "0L"? -- Peace, Jim Cape http://ignore-your.tv "It is literally true that, like Christianity, Socialism has conquered the world by defeating itself." -- Alexander Berkman, ABC of Anarchism signature.asc Description: This is a digitally signed message part
Re: Fw: Re: how to convert chinsese-character to utf8?
On Wed, 2003-09-24 at 17:55, yangxiaoli wrote: > I use g_convert(string, -1, "UTF-8", "CP950", NULL, NULL, &error) to convert but get > the message: > Conversion from character set 'CP950' to 'UTF-8' is not supported. Hmm. According to my /usr/lib/gconv/gconv-modules file, cp950 is an alias for big5, try using big5 instead (your iconv may not have that alias set)... -- Peace, Jim Cape http://ignore-your.tv "It is literally true that, like Christianity, Socialism has conquered the world by defeating itself." -- Alexander Berkman, ABC of Anarchism signature.asc Description: This is a digitally signed message part
Re: how to convert chinsese-character to utf8?
On Wed, 2003-09-24 at 02:51, yangxiaoli wrote: > I use function g_locale_to_utf8() and g_convert() to convert Chinese-character to > utf8,but got error message: Invalid byte sequence in conversion input. How to > convert it to utf8? You should call g_convert, with the src_encoding properly set to the same type as the chinese character to convert. Known chinese encodings are: (Simplified): EUC-CN, GBK, GB18030, ISO-2022-CN (Traditional): BIG5, BIG5HKSCS, EUC-TW So, if the character is encoded in BIG5, the proper call is: gchar* dest = g_convert (big5_str, -1, "BIG5", "UTF-8", NULL, NULL, NULL); If the source string is in another encoding, then you can replace "BIG5" with the other encoding's name. (the last 3 arguments are for bytes_read, bytes_written, and an optional error-code/msg return.) -- Peace, Jim Cape http://ignore-your.tv "It is literally true that, like Christianity, Socialism has conquered the world by defeating itself." -- Alexander Berkman, ABC of Anarchism signature.asc Description: This is a digitally signed message part
Re: substitute for GtkCList ???
On Thu, 2003-07-31 at 14:12, Flavio Alberto Lopes Soares wrote: > Hello all, > > I'm developing an application (using Glade) that uses GtkCList in Gtk1.2, but now > I'm starting to change this > application to Gtk2.0 and I'm using GLADE-2 to make your interface, but in my old > app I use GtkCList, and > now I don't know what can substitute GtkCList in Gtk2.0 (and in Glade-2); > > Thanks for any help GtkTreeView is the Model-View-Controller replacement for GtkCList: http://developer.gnome.org/doc/API/2.0/gtk/TreeWidgetObjects.html -- Peace, Jim Cape http://ignore-your.tv "It is literally true that, like Christianity, Socialism has conquered the world by defeating itself." -- Alexander Berkman, ABC of Anarchism signature.asc Description: This is a digitally signed message part
gdk_window_get_parent assertion failed sometimes.
I had reported this issue on bugzilla, the id is 115432. When I close some kinds of window, gtk will go into a dead loop and report the following error again and again: (gtk-demo:30093): Gdk-CRITICAL **: file gdkwindow.c: line 526 (gdk_window_get_parent): assertion `GDK_IS_WINDOW (window)' failed You may try to run gtk-demo, open Text Widget, then close the Text Widget window, this error will be occurred. This problem is appeared in gtk+2.2.2. ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: Can I make a IM Module resident?
Hi, Sorry to bother you again. Does it mean, if I create an instance of this type within my immodule, then my module will never be unloaded? Because im_module_exit will never be called if there is an instance living, but the instance must be destroyed within im_module_exit. Looks like a black hole :-) Regards James Su Owen Taylor wrote: On Sun, 2003-03-30 at 21:32, James Su wrote: Hi, I tried to use g_type_module_register_type () to register my class. This time, the application is never crashed, but the IM module is never unloaded. What's the matter with it? As long as there is an instance of a type, the module implementing that type won't be unloaded. Maybe that is your problem. Regards, Owen Owen Taylor wrote: On Fri, 2003-03-28 at 03:31, James Su wrote: Oh, I see. But the interface of this function is different with the static one, could you please give me some hint on how to use it? The GTypeInfo parameter is replaced by a GTypePlugin pointer. Could you please tell me how can I convert a GTypeInfo into GTypePlugin? The idea of GTypePlugin is that you provide information to GObject as to how to load your type when necessary. However, you don't need to provide your own GTypePlugin or use g_type_register_dynamic() directly... what the GTypeModule parameter passed to your init() is is basically an implementation of GTypePlugin that is already set up to for you use. Just use g_type_module_register_type() rather than g_type_register_static(). There are multiple examples of this in the provided input modules, or for more examples, you can look at the theme engines in the gtk-engines/ modules. (They generally register two types .. one GtkStyle type and one GtkRcStyle type.) ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: Maybe a bug of gtk/gdk ?
Hi, Sorry, I'm using gtk+2.2.1. I'll check GTK+ HEAD later. But I wonder if this fix will be merged into 2.2 series? Regards James Su Sven Neumann wrote: Hi, James Su <[EMAIL PROTECTED]> writes: when I call gtk_init (argc, argv) with argc == 0, the program crashed at gdk_parse_args () in gdk.c. I digged into the source code and found that there are possiblly some bugs in gdk_arg_context_parse, which does not check if argc <= 0. I don't know should we treat it as a bug, or just restrict argc > 0 in the documentation and force application send a valid data to gtk_init? IIRC, this has been fixed quite some time ago. Did you check GTK+ HEAD and look into Bugzilla? Salut, Sven ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Maybe a bug of gtk/gdk ?
Hi, when I call gtk_init (argc, argv) with argc == 0, the program crashed at gdk_parse_args () in gdk.c. I digged into the source code and found that there are possiblly some bugs in gdk_arg_context_parse, which does not check if argc <= 0. I don't know should we treat it as a bug, or just restrict argc > 0 in the documentation and force application send a valid data to gtk_init? Regards James Su ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: Can I make a IM Module resident?
Hi, I tried to use g_type_module_register_type () to register my class. This time, the application is never crashed, but the IM module is never unloaded. What's the matter with it? Regards James Su Owen Taylor wrote: On Fri, 2003-03-28 at 03:31, James Su wrote: Oh, I see. But the interface of this function is different with the static one, could you please give me some hint on how to use it? The GTypeInfo parameter is replaced by a GTypePlugin pointer. Could you please tell me how can I convert a GTypeInfo into GTypePlugin? The idea of GTypePlugin is that you provide information to GObject as to how to load your type when necessary. However, you don't need to provide your own GTypePlugin or use g_type_register_dynamic() directly... what the GTypeModule parameter passed to your init() is is basically an implementation of GTypePlugin that is already set up to for you use. Just use g_type_module_register_type() rather than g_type_register_static(). There are multiple examples of this in the provided input modules, or for more examples, you can look at the theme engines in the gtk-engines/ modules. (They generally register two types .. one GtkStyle type and one GtkRcStyle type.) Regards, Owen Regards James Su Sven Neumann wrote: Hi, James Su <[EMAIL PROTECTED]> writes: Then, how can I use my own class within a IM module? There is no type register function like g_type_register_dynamic. I'm pretty sure there is exactly this function. But don't take my word that this is the right way to do this, I'm more or less only guessing here. ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: Can I make a IM Module resident?
Hi, The class I registered is not the im module class, it's another class defined by myself. The im class is registered by g_type_module_register_type(). Regards James Su Sven Neumann wrote: Hi, James Su <[EMAIL PROTECTED]> writes: Recently, I'm developing a IM Module for gtk+-2.x, but I met a problem. Because I registered a new class within my IM Module by g_type_register_static, then when I open a input context the second time, the application crashed. The error message shows can not register a type which already registered. In order to solve this problem, I realized that I must make my IM module resident in the memory to prevent my class being registered twice. you should do what the other input modules do and use g_type_module_register_type() instead of g_type_register_static(). Salut, Sven ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: Can I make a IM Module resident?
Oh, I see. But the interface of this function is different with the static one, could you please give me some hint on how to use it? The GTypeInfo parameter is replaced by a GTypePlugin pointer. Could you please tell me how can I convert a GTypeInfo into GTypePlugin? Regards James Su Sven Neumann wrote: Hi, James Su <[EMAIL PROTECTED]> writes: Then, how can I use my own class within a IM module? There is no type register function like g_type_register_dynamic. I'm pretty sure there is exactly this function. But don't take my word that this is the right way to do this, I'm more or less only guessing here. Salut, Sven ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: Can I make a IM Module resident?
Then, how can I use my own class within a IM module? There is no type register function like g_type_register_dynamic. Regards James Su Sven Neumann wrote: Hi, James Su <[EMAIL PROTECTED]> writes: The class I registered is not the im module class, it's another class defined by myself. The im class is registered by g_type_module_register_type(). uh, oh, how is that supposed to work? A dynamic module can not register a static type. What if the module gets unloaded? You should however be able to register more than one type from your module. Salut, Sven ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: Can I make a IM Module resident?
Yes, I had tried it. But the application is crashed when the IM Module is loaded the third time. Regards James Su James Durie wrote: On Thu, 2003-03-27 at 12:32, James Su wrote: Hi, The class I registered is not the im module class, it's another class defined by myself. The im class is registered by g_type_module_register_type(). Regards James Su Couldn't you do a g_type_from_name first for your static type and only try to register it if it hasn't already been registered? James ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: Can I make a IM Module resident?
On Thu, 2003-03-27 at 12:32, James Su wrote: > Hi, > > The class I registered is not the im module class, it's another class > defined by myself. The im class is registered by > g_type_module_register_type(). > > Regards > James Su Couldn't you do a g_type_from_name first for your static type and only try to register it if it hasn't already been registered? James -- James Durie Phone: +44 20 7749 7904 Anvil Software LimitedFax:+44 20 7749 7916 46-48 Rivington Streete-mail: [EMAIL PROTECTED] London EC2A 3QP ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list