Why not use libcurl? You can get much more info about your
connection.
libcurl even provides examples for how to use libcurl with a Gtk+ app.
Although I must admit their example should work fine for simple things
becareful not to abuse what the example demonstrates (the use of
Let me sum up:
* In the beginning of each button click callback you call a
function to make the buttons insensitive (even the clicked one?
protection is needed here also),
I just kept a list of all the buttons that mattered, and insensitised them all
rather indiscriminantly (even the
My name is Dirk, I'm writing a control programm for a 1m telescope
in Germany. The current status of the device is periodically
displayed in GTK using a thread.
Does it NEED to use a thread? How do you get the information, and how long
does it take to process an update?
The only times I've
gnome-volume-manager uses this hack:
http://cvs.gnome.org/..
hope it helps
So do I...
But even if it doesn't, it's already answered one different problem I was going
to ask about. ;)
Fredderic
___
Join Excite! - http://www.excite.com
The
I'm wondering if anyone could give me pointers on placing some text in the
clipboard, without it vanishing as soon as the program closes.
I write these two little test applications to see if I could put some text into
the clipboard, and then read it back out again...
// test program to
I've got a small problem with frames. I made a screenshot to
illustrate my problem at http://[snip]. Indeed you can see that the
frame borders are too close to the application border (about 1 pixel).
Have you considered using tooltips to hide the long descriptions? Or perhaps
even those
1) I am using the combobox in my application now i want the
functionality that whenever user types in the combobox the
selection changes in the list
Someone else will undoubtedly answer this far better than I can...
But be aware that there are several signals associated with selecting
You can always write UTF-8 characters expanded with escapes
\xe2\x84\xa6 (this is Ohm sign which is different from capital
Omega \xce\xa9, BTW) if you don't want to use UTF-8 directly,
which is no problem nowadays.
One trick I use to avoid ending up with a long illegible string of ugly
What I want to do is put user selected text onto the (a?)
system-wide clipboard. How to do this using GTK+? BTW, I come from
Windows world.
Both Windows and Linux have GUI-wide (NOT system-wide) clipboards. In Windows,
seperating the System from the GUI is almost impossible. But good old
bunch of OHM and OMEGA signs, subtle differences in characters.
Of course, the reason why they have different code points is not
that they might look different (this is just a coincidence, caused
by Pango rendering them from different typefaces). The reason the
separate ohm sign exists is
The short of it is that in both Linux and Windows, there is no
system-wide clipboard (there's no clipboard in the Windows
console-level step-by-step boot before the GUI starts). However,
there is a lovely clipboard mechanism provided by the X GUI, and
supported by GTK+. You can find
Is there a way I can make my application be just a popup menu? I
mean, when the user opens it, there is no window, it automatically
pops up a menu right where the mouse pointer is. Is that possible?
Why not? I wrote a console utility that uses GTK to rip text out of the
clipboard (I still
I am new to gtk, and trying my hand at writing a mp3player, I
am working on the point of the player that when one song is done
playing it will load and play the next song. How do I run a test
function every couple milli seconds to check to see if it is still
playing or not? is
I'm currently coding a small application. I want the main
window to remember its size and position every time it is
started.
I believe that's the job of the window manager...
That's why you can set a couple different names for your window.
I believed this, too. But it isn't done
how i can use g_io_channel to make a simple echo-server?
libgnet comes with a simple example which does exactly that.
Which reminds me... Does anyone know the differences between gnet and
gnetwork? Which is the more GNOME sanctioned of the two?
Fredderic
Greetings people of the list...
I was wondering if anyone knows how I could draw a horizontal red line across a
GtkTextView buffer.
I could probably throw in a GtkHSeperator widget, or something, but it's not a
red line.
I could throw in an image which is a red line, but how would I get it
I'm making a small drawing program with GTK, and I'm having an
issue that's also in the scribble example tutorial (using this as
an example because people would likely know what I'm talking about
that way). Anyways, the issue that I'm having is that the program
doesn't receive mouse movement
I was wondering if anyone knows how I could draw a horizontal
red line across a GtkTextView buffer.
I could probably throw in a GtkHSeperator widget, or something,
but it's not a red line.
Well, you can always use your own widget, which can be whatever
you wish, for instance a red
I'm just wondering if anyone can shed some light on a small question I've been
asking myself for quite a while...
When manually building a window (or part thereof), with all its containers and
widgets, I generally create the window, then create and add the containers and
widgets as I go
I've looked through the GTK2 API, and I've poked around in this forum, but I'll
be stuffed if I can find a way to figure out aproximately how much memory the
text in a GtkTextBuffer is taking up.
I'm storing a log file, and it's almost all ASCII, so the byte and character
counts should be
Greetings again... Geeze I'm asking a lot today. ;)
Back onto the GtkTextViews... After the wonderful responces from my query re:
drawing a line across a text view, I now have a reasonably simple piece of code
to do it automagically, except that it only supports one line per GtkTreeView
at
I've gone looking through the API, and I'll be stuffed if I can figure
something out...
As I understand it, you're supposed to load the icons into GdkPixbuf's, store
them in a GSList, and then feed that list to the
gtk_window_set_default_icon_list() function. But what then?
Does the
Question 1. Is it possible to have an image (Jpeg) displayed and
have a drawing area overlayed on top but still be able to view the
image below it. If a drawing area is not allowed, is it possible to
put something that resembles a drawing area over an image where the
x/y coordinates from the
garray = g_array_new (FALSE, FALSE, sizeof (Machine));
for (i = 1; i 1; i++){
Machine *newMach = machine_new(i,trd11,d11,joe);
g_array_append_val (garray, newMach);
Two problems here: You pass a *pointer* to Machine, not
a Machine, so a pointer is stored into garray. And newMach
I sucessfully loaded a image using pixbufs, but now i face the
difiiculty of loading multiple images in a window and those images
are transparent one. so each must be visible.
You mean all overlapping each other? You can only display a single flat
image (animations not counted). So if
I would support the inclusion of Code generation
in GLADE UI Editor. It is a welcome feature, for those
who would like it. If its not to be in the main tree
atleast put the code into a plugin thats enabled
at default, and users can turn it off, if they prefer.
Personally, I don't think code
Answers to comments from several people here... No particular order.
The freedom of designing a GUI without using a GUI while doing so?
What else? Writing C programs without using a C compiler during
development?
What, you saying you can't? I've built some moderately complicated 3D models
I was wondering whether or not it is possible to display a .jpeg,
.png or .bmp in the drawing area and then be able to draw lines
over this image. If this is possible, what functions can I use in
order to get the image from file and then be able to display the
image in thebrdrawing area.
I have written a program pretty much by re-adjusting the scribble
example from the GTK Tutorial, instead of creating my own PixMap in
the configure_event I called the following function which creates a
pixmap from file:
pixbuf = gdk_pixbuf_new_from_file(filename,NULL);
There's yor
Anyone know how to use a GtkSizeGroup in glade2? I can't see it
anywhere in the tool palette.
I don't believe you can do this using Glade - you have to use a
mixture of Glade for the basic widgets and then code to setup the
GtkSizeGroup.
I was afraid you'd say that. heh
Think I'll
As I understand it string = g_strdup_printf(... produces a copy and
points string towards that copy, the adress of the copy is then
passed on by g_signal_connect as the data pointer, hence freeing
string destroys the string and should not be done (and doing it
produces random output in the
I was wondering how it is possible to sense when a widget is
closed by the user and send change a specific variable as a
result.
Either connect to destroy signal, or use g_object_weak_ref().
The handler can change a global variable.
If you store the pointer to the window in a global
I'm beginning to learn and use GTK+. Here is the steps that I
believe are needed to build an GTK+ application:
1. Initialize the library.
Generally happens in main...
2. Create widgets and set attributes.
3. Register callback routines.
Those two go together... Either load a glade UI and
I have found the g_open function. But I think it just open the
file and is there some fucntions for write/read operation?
No, because there isn't any reason not to use the normal write()
system call (Unix) / function (Win32).
I must say, I wouldn't mind some of the more common functions
It is the trade-off of the policy that the selected item is under
the pointer in the just shown popup, period. I think it is
generally good, but this is an example of where it shows its
drawbacks. However, for the sake of UI consistency, I believe it
should _not_ be changed. I.e. it be under
Hi,I'm wanting to load two images and fade between them much like
the ImageMagick command:
composite --dissolve 100 image1.jpg image2.jpg output.jpg
However I'm wanting to display the image as it dissolves from one
image to the other - so it will apear as if one image is dissolving
into
I've made some progress on my program and now i would like to check
formemory leaks. Do you recommend any way or program in special for
doing this?
Something I've sometimes found useful, was to write a little chunk of code that
throws up a small window that holds a list view, into which I
i've had several problems with X freezing up because of some
misbehaviour from some graphical app. The keyboard is locked so
it's hopeless to try CTRL+ALT+BKSP
Not wrong there... Not even switching consoles is possible time times...
When the system locks up, is the computer still alive?
This message is a couple days old... I'm suprised there isn't a reply yet,
that I can see anyhow (hopefully I'm not missing messages).
I'm new to GTK and am having problems that I don't understand ...
thanks in advance to anyone who can take a look ...I'm trying to
use a GTKTable (created
I've managed to trash X while playing with widgets that use grabs...
Maybe a stupid question, but have you tried Ctrl-Alt-KP_Divide to
ungrab or the more brutal Ctrl-Alt-KP_Multiply to kill the naughty
client? (if you have these enabled)
Here's probably an even more stupid question. They
Original message written by someone, somewhen...
I wish it was possible to control tooltips position (they are
always at the bottom of the widget an I cannot visually tie them
to the appropriate `area') and use marked up text, like bold and
stuff.
The tooltips code is really quite straight
Going back to your original point, it is definitely not a
busy wait.
I just rolled together a quick test... A GTK main loop running two sources.
First an event source created using g_timeout_add() that prints the current
count each second, and halting the program (via gtk_main_quit() )
Add a unix signal number in the signal handler, and suck it out
again in a custom event source's prepare method. The prepare
method can return -1 for its timeout contribution, and true/false
if there's something in the queue.
So... poll *will* exit because of the signal... but will it
Hello all, I am using the probress bar to show the progress of some
event. Initially i have some text in theprogress bar. After the
event is complete, i change the text on the progress bar.. But it
is not getting changed... But once i minimise the window and then
maximise it, the text on the
I don't think it is supposed to work like this. I mean, two
overlapping widgets in a fixed. But maybe I am off. (BTW:
I tested your code under Gnu/Linux, a fairly recent Ubuntu.
Samebehaviour: the DrawingArea covers up the button).
What I don't understand, is why the widgets aren't just
Ages ago, someone who's name I forgot to copy'n'paste said:
call gtk_widget_show_all on that particular window.
Calling **show_all is equivalent to saying
I am done adding widgets.
This reminded me of something... Normally, I use gtk_widget_show_all() on the
main window once it's fully
On Sun, Oct 01, 2006 at 06:24:05AM -0400, Freddie Unpenstein wrote:
Normally, I use gtk_widget_show_all() on the main window once it's
fully constructed, to bring everything to life. But how does that
work, if you want to leave a widget or two hidden?
See gtk_widget_set_no_show_all
When creating a GtkImage from a stock icon, you need to tell it the size of the
image to create, as one of the GTK_ICON_SIZE_* constants.
What I want is to find out programatically, how large those sizes are in pixels.
The reason: I've got a function which takes either a stock icon id, or a
Just some musings... I suspect this has been discussed before, though I
couldn't find anything in a cursory glance through the search engine. (But
then I'm notoriously hopeless with search engines)
Next thing is, that GLib memory subsystem don't really free memory
on g_free(), but do
Someone said some stuff...
GTK+ does not work like, say, KDE or windows. You have to drag
when you have finished your multiple selection without clicking
again (keep your finger on the mouse button). If you click again,
as you say your multiple selection will have gone.
Does GtkTreeView
Greetings peoples of the gtk-app-devel list...
I have an application that creates a small borderless window containing an
always below icon, with the taskbar and pager skip hints turned on so it
doesn't show anywhere except where it's put on the desktop.
I'd like it to occasionally appear in
I have an application that creates a small borderless window
containing an always below icon, with the taskbar and pager skip
hints turned on so it doesn't show anywhere except where it's put
on the desktop.
The urgency hint works just fine as long as the window is listed in
the taskbar,
On Mon 10/23, James Scott Jr [EMAIL PROTECTED] wrote:
I am about to write the socket module of a program that follows the
gnu standard structure for a daemon. I am using glib wherever
possible and have a question concerning the use of linux signals.
Basically, I have blocked all signals on
On Fri 10/27, David [EMAIL PROTECTED] wrote:
would it really improve anything? if people complain
about embossed labels without trying the non-embossed
look, does it tell anything (beside the fact they don't
care that much)? see
http://kf.fyz.fce.vutbr.cz/~yeti/tmp/gtk-no-emboss.png
I
On Sun 11/26, [EMAIL PROTECTED] [EMAIL PROTECTED]
I am about to start a new app, and would like to improve my
programming style. I have been using global variables to pass data
from popup windows back to a main window. I have seen discussion
about using g_object_set_data, but have not
On Thu 12/14, Liam R E Quin [EMAIL PROTECTED] wrote:
On Fri, 2006-15-12 at 09:28 +0530, Preeti Joshi wrote:
Does GTK have a bug that doesn't free the memory used by a window
(say dialog) even after it has been destroyed?
It's often simpler to keep dialogues around and hide/show them.
On Sun 12/17, David [EMAIL PROTECTED] wrote:
Are there no comparison operations other than g_string_equal in
order to facilitate the sorting of GList objects that contain
GStrings?
Any C stringcomparison function is usable on gstring-str. Yes,
you have to write the one-line wrapper
A point I miss in the tutorial is to mention the G_DEFINE_TYPE()-like
macros which should be prefered over manually defining a _get_type()
function whenever possible.
I never did get that G_DEFINE_TYPE() stuff at all... It'd be good to see some
clear documentation on it.
Fredderic
A point I miss in the tutorial is to mention the
G_DEFINE_TYPE()-like macros which should be prefered over
manually defining a _get_type() function whenever possible.
I never did get that G_DEFINE_TYPE() stuff at all... It'd be
good to see some clear documentation on it.
The
Especially since glade is pushing the use of libglade as THE
way to incorporate glade-produced layouts into applications,
libglade should be packaged so as to encourage just that. Not
make it hard for application developers to figure out how to use
it. In any case, this is more an issue
This message appears to have been cross-posted from gtk-devel-list, so I guess
I'd better cross-post it back again. Anyhow...
The rectangle drawing code is from cairo snippets. My first
idea was to put a balloon, but I don't know how to draw it quickly
yet since I've just started learning
hi.sorry i sent an incomplete message.it was an error.well, am
trying to build a gui that will interact with ARtoolkit which also
uses C as language and contain OpenGl libraries as well.i`ve manage
to copy some of the header files (e.g callback.h, interface.h,etc)
Are you trying to embed GTK
Some thoughts about some of the alternative widget sets presented, and how I
personally view them as applying to GTK... Most of this I've been mulling over
on and off for a while, in one form or another. So I've decided to take this
opportunity (since I didn't know most of these toolkits
From: Kevin DeKorte
I'd like to create a panel that slides out of the way, little
animation kinda thing and I had something working but gtk really
didn't slide it out of the way it just showing the first and then
the last. Now I understand that due to performance that not every
panel change
GTK provides the facility to have a GtkNotebook without tabs. But as far as I
can tell, it doesn't provide the facility to have tabs without the notebook
pages. It seems somehow strange to me, and causes people to hack together
their own button bars that function vaguely like Notebook tabs
From: Thomas Dybdahl Ahle [EMAIL PROTECTED]
søn, 31 08 2008 kl. 05:23 -0400, skrev Freddie Unpenstein:
GTK provides the facility to have a GtkNotebook without tabs. But as
far as I can tell, it doesn't provide the facility to have tabs
without the notebook pages. It seems somehow strange
From: Rorschach, on 17/11/2008 03:54 :
I wanna write a little battery-indicator in C with GTK. It's already working
nicly in the console and I know how to write a trayicon with gtk but what
I don't know is: how can I show the current capacity of the battery? I mean
shall I do 100 pictures
This is a side-topic, raised by developments in handling DBus, but something I
feel is worth asking... Is there any mechanism for making working with
asynchronous stuff easier?
Quite often I've had a situation where I've needed to collect several pieces of
information from various
From: Stefan Kost , 22/02/2009 21:59:
I'm running my program with --g-fatal-warnings at the end of the command
line. I don't know whether that flag does anything in PyGTK, though.
That flag work on Glib level and makes warnings fatal to be able to get a
backtrace in gdb. For refcounts that
You can use a few tricks to help manage these one-shot constructs...
One that I used quite a while ago, was a wrapper around a simple array that
stores array size and free functions for each member, so a simple free
function can rip through and clear everything out. It's good as long as you're
I'm Iooking for the current gtk/gio/gnome best practice for working with
CD/DVD's... In particular, figuring out how much stuff I can cram onto one, and
then cramming it on.
There's a whole bunch of different disk sizes, formats, filesystem options,
filesystem limitations, etc., and I need to
Howdy folks... I'm stuck trying to find a non-horribly-hackish way to do
something... So here goes...
I have a ListStore containing records (rows) of the usual kinda thing, date,
description, a few other fields.
Selecting a row in the TreeView, brings up a dialog with that records details,
From: Michael Torrie, Date: 31/07/2009 02:49, Wrote:
If you are hell-bent on a system-wide GTK, then you need to do it the
way that Gaim for win32 used to. They would install GTK to C:\Program
Files\Common Files\GTK\%version%. Then their own app would go to
C:\Program Files\Gaim. The magic is
From: dev...@iamaquatics.org, Date: 25/08/2009 16:50, Wrote:
The eventual goal is to create a program to log incidents at an
aquatic facility. As of right now, I am just trying to write some
small simple things to stretch out my [programming] legs.
The goal is to connect to the database and
Using Python and PyGTK I've got a GtkMenu with various GtkCheckMenuItems
in it. When the user clicks one of the checkboxes the menu closes. I'd
like for the user to be able to check a series of checkboxes without the
menu closing each time.
I looked into this myself a while back, and gave up.
Or are you saying the libraries (gtk/mpfr/stdc) I'm using may be caching
the locale and may not heed my changes?
Since Gtk+ does not have any mechanism to rebuild the UI when a locale
category changes, either you implement such mechanism or, more often,
put up with it and accept the locale
From: dhk, Date: 20/04/2010 09:46:
On 04/19/2010 01:34 PM, Nicolas Soubeiran wrote:
When creating your model set a specific column with a boolean property.
gtk_list_store_new(N_COLUMN, G_TYPE_STRING, G_TYPE_BOOLEAN);
Then in the treeview create a column using
From: Carlos Pereira [jose.carlos.pere...@ist.utl.pt], Date: 10/02/2011 09:10:
something), but aside from that it's a pure waste of CPU cycles.
I am sorry, I totally disagree.
I can only see two cases. Either fixing these hundreds and hundreds of
mem leaks is easy or difficult.
In the first
78 matches
Mail list logo