Hi
Maybe someone should extend the API docs or add a FAQ:
gtk_widget_grab_focus( GTK_BIN(combo)-child );
Jan-Marek
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Hi
I would like to write a command line application that outputs the
current workspace (under GNOME, I had someting in WindowMaker, but this
does not work in GNOME). I have tried the following:
...
All workspace stuff depends on the window manager, so I guess for GNOME
you have to check the
Hi
The signal handler for a button in my main window launches a file
chooser dialog, then processes the selected files.
I try to hide the dialog during processing with 'gtk_widget_hide
(dialog);' but this does not take effect until the signal handler exits.
Is there a way to hide the dialog
Hi Emmanuel
For me it works as expected. I just added a gtk_main(), a gtk_init(...)
and a print()-callback and it works (on Debian Sarge gtk+ 2.6.4)
For gtk_menu_popup I used ..., 0, gtk_get_current_event_time());
Maybe something else is wrong in your code?
Jan-Marek
Hi
snip a lot of code
You're misunderstanding the _emit_ functions. They are supposed to be used
inside GObjects to run their attached signal handlers.
So a soluting would be:
gboolean your_old_code(...)
{
return FALSE; // destroy
return TRUE; // do not destroy
}
gboolean
Is there any reason that windows created by GtkHandleBox aren't transient
by default? This is the behaviour I would expect.
Different people expect different behaviour...
Is there a simple way to make them transient?
I think a GtkHandleBox has its own GdkWindow, so just use
How to avoid this? maybe i could delete the keys' event from the
events queue? Any help?
Actually I did a workaround for this problem:
...
The problem actually is that I cant call set_events on a widget which
is already realized, and I am get a lot of warnings indeed.
So, my problem is
FYI - I just came up with the this example to illustrate a way to change
the colors in a loop - it doesn't represent the solution!
Algo is still:
r = max, g = 0, b = 0
r = max , g = max, b = 0
r = 0, g = max, b = 0
r = 0, g = max, b = max
r = 0, g = 0, b = max
r = max, g = 0, b = max
back to step
Please start a new thread next time.
1) There is a way to set the root of the tree?
Maybe
gtk_tree_store_append( store, new_row, NULL );
2) There is a way to select when a node will be a leaf or a node?
?
There are no leafs - a leaf is a node without children:
gtk_tree_model_iter_has_child
Thanks Jan-Marek and everyone else who replied. The
suggestions have been really helpful. I'm making some
progress. But I didn't know I had to deal with
hue/saturation/intensity stuff for this.
I searched but couldn't find any documentation for
gtk_hsv_to_rgb()?? One website (pretty old
Ok ok! However it doesn't work on my situation. What I am trying to do
is something similar a bookmark. Then it has a root folder: Bookmark
(that cotain all the folders and url's); and it has the url's (that
are the 'leafs'). One requirement is I may move the folders and url's.
So I need a
Hi
I need to create 100 little squares and each of them
has to be a different color. They can't just be a
random color: they have to follow the colors of the
standard color spectrum/palette. For example, the
first one is dark blue, then lighter blue, ... ,
green, ... , red.
Std. color
Hi Yury
Yury Aliaev wrote:
2) When pressing the left mouse button and moving the cursor vertically
the selection in GtkCList follow the cursor. In GtkTreeView -- not. How
can I obtain in GtkTreeView the same behavior as in GtkCList?
Not the same problem, but you may be able to adapt my
Hi Egon
This is a hack, but I it should work:
static void combo_toggle_func( GtkToggleButton
*togglebutton, gpointer user_data )
{
// Do your menu stuff
}
static void scan_children( GtkWidget *w, gpointer data )
{
if( GTK_IS_TOGGLE_BUTTON( w ) ) {
Hi
Look for the subject Which signal is emitted when the arrow in
GtkComboBoxEntry() is pressed? (21. Nov)
Jan-Marek
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list
Hi
GtkWindow *my_app ...
GtkWindow *my_about ...
gtk_window_set_transient_for( my_about, my_app );
gtk_window_set_position( my_about, GTK_WIN_POS_CENTER_ON_PARENT );
HTH
Jan-Marek
___
gtk-list mailing list
[EMAIL PROTECTED]
Just checked the source for 2.4.13 and 2.5.5. Both use a
GtkToggleButton...
Check the following scan function - should print a list of found object
types:
static void scan_children( GtkWidget *w, gpointer data )
{
g_print( %s\n, G_OBJECT_TYPE_NAME( w ) );
}
For me it finds:
Hi
The idea is to emulate the mouse behaviour. If you have a large list you
can scroll with the mouse, without selecting an item. Same with the
cursor: you scroll the list (change focus) and then select an item (press
space).
To move the selection with the focus:
gtk_clist_set_selection_mode(
I checked my program with 2.5.5.
And had a look at the ComboBox code: the toggle button is created when
setting the style, so I think the box must be (at least) realized, maybe
even shown.
HTH
Jan-Marek
___
gtk-list mailing list
[EMAIL PROTECTED]
Hi
I added a patch for a popup event to my first reply. I wanted to file a
bug report, but didn't really come up with a good case.
There was a similar request a few days ago: Accessing GtkComboBoxEntry's
toggle button.
The patch is very simple - just two gtk_signal_emit, a return value to
Hi
Try
gdk_threads_enter()
// do your gdk / gtk calls
// Process pending events of the main loop
while( gtk_events_pending() )
gtk_main_iteration();
gdk_threads_leave()
If you still get Xlib async errors, there are some more unprotected gtk /
gdk calls or you found a real bug... If
Gtk isn't thread safe, but thread aware: See Gdk Docs - Threads.
Basically you have to use
gdk_threads_init()
...
gdk_threads_enter()
gtk_main()
gdk_threads_leave()
...
Before every call from a thread to Gdk / Gtk+ you have to get the Gdk lock
via gdk_threads_enter()
HTH
Jan-Marek
Hi
GtkEntry *entry = GTK_BIN(my_gtk_combo_box_entry)-child;
GtkEntryCompletition *completion = gtk_entry_completion_new ();
gtk_entry_set_completion (GTK_ENTRY (entry), completion);
See the GtkEntryCompletition API.
HTH
Jan-Marek
___
gtk-list mailing
There is a Win32 port of devhelp in cygnome2 - maybe worth looking at
http://cygnome2.sourceforge.net/
HTH
Jan-Marek
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list
Hi
From the Glib docs: Note that timeout functions may be delayed, due to
the processing of other event sources. Thus they should not be relied on
for precise timing. After each call to the timeout function, the time of
the next timeout is recalculated based on the current time and the given
Hi
I don't think it's possible to hide just the close button. At the end all
depends on the window manager. Anyway connecting to the delete-event is
the right way.
There is however:
gtk_window_set_decorated ()
and
gdk_window_set_decorations ()
HTH
Jan-Marek
Yes
My normal template looks like this:
/* This is my licence text (GPL / LGPL / whatever)
**/
#ifndef __MY_HEADER_H__
#define __MY_HEADER_H__
#include glib.h
// To allow usage of c by c++
G_BEGIN_DECLS
void CloseTheApp ();
G_END_DECLS
#endif // __MY_HEADER_H__
HTH
Jan-Marek
Hi
There is neither a way in the deprecated GtkCombo nor a way in the current
GtkComboBox - if you meant to set the the maximum allowed length of the
contents of the widget use:
gtk_entry_set_max_length
via
GTK_COMBO(widget)-entry
or
GTK_BIN(GTK_COMBO_BOX(widget))-child
Jan-Marek
Does gtk_widget_realize() help?
Jan-Marek
k
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list
Any reason not to g_signal_connect_after the childs size-allocate signal
and continue your stuff?
Jan-Marek
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list
Hi
1. clicked callback:
void user_function( GtkButton *button, gpointer user_data );
for yor example:
void user_function( GtkButton *button, struct args *p );
2. You can't pass local variables:
struct args *p = g_malloc( sizeof( *p ) );
p-numdice = 1;
p-sides = 10;
Hi
Most event handlers return a gboolean.
From the Docs:
Returns : TRUE to stop other handlers from being invoked for the event.
FALSE to propagate the event further.
HTH
Jan-Marek
___
gtk-list mailing list
[EMAIL PROTECTED]
GtkIconTheme was introduced in Gtk+ 2.4 (if you look at the function
descriptions of the Gtk+ docs, you can find a 'Since 2.4').
New features are introduced in new minor versions, revisions (micro
versions) are for bug fixes.
Maybe it's possible to substitute GtkIconTheme by creating new stock
These errors normally come from old X versions (usually also missing
xrender). Seems that the Xft backend wasn't build by Pango, so check your
Pango config / install.
Jan-Marek
___
gtk-list mailing list
[EMAIL PROTECTED]
Hi
Just two ideas: Have you tried to connect a handler to the clicked /
button-press-event of my_column-button or replace the header using
gtk_tree_view_column_set_widget()?
HTH
Jan-Marek
___
gtk-list mailing list
[EMAIL PROTECTED]
Quoting the GDK Docs:
gdk_draw_drawable
(GdkDrawable *drawable, GdkGC *gc, GdkDrawable *src, ...)
src :
the source GdkDrawable, which may be the same as drawable
Jan-Marek
___
gtk-list mailing list
[EMAIL PROTECTED]
Hi
From my first impression I think you can simply use a GtkDrawingArea and
GdkPixmap(s).
Look at GDK Docs - Drawing Primitives, if you want to move from X to GDK.
1) Stick with Xlib primitives for displaying ants ? OK, but I can't see
which kind of widget that will allow
me to use XLib
Hi
Putting a GtkLabel inside a GtkDrawingArea doesn't make sense to me...
If you want to draw text look at pango:
Pango docs - Basic Pango Interfaces - Layout Objects - PangoLayout.
GDK docs - Drawing Primitives - gdk_draw_layout
HTH
Jan-Marek
___
There has been a thread like this just a few days ago in gtk-app-devel
(Releasing software with a GTK front end)
Search the archive
Jan-Marek
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list
Hi xiangbing
I'm not sure what your problem is.
UTF-8 is the encoding, so you don't need to look for it - str(n)cmp
should be sufficient to compare them (that's why it's called Unicode ;-).
If you want to convert text from / to any encoding -- UTF-8 you have
store the previous encoding.
If you
Untested, but an other idea:
// Maybe not needed
gtk_text_buffer_get_end_iter( buffer, iter );
gtk_text_buffer_place_cursor( buffer, iter );
// Ok - get insert mark
mark = gtk_text_buffer_get_insert( buffer );
// Move insert into the bottom right
gtk_text_view_scroll_to_mark( view, mark, 0.0,
Well. I understand. But is the return value of my_idle function the only
mechanism to stop calling it? Can I set some timer to call idle function one
time per call_period?
g_timeout_add
Just to understand what I am doing: The gdk_draw function used instead of
gtk_* because the drawing area
Hi
If you want to use static images and want to move them, look at the
gdk-pixbuf API. For an examples see the gtk+ source (demos/gtk-demo).
GtkImage should be used for static images, GtkDrawingArea for dynamic ones
(like your movie).
There isn't enought code to say what's wrong. If you code is
Hi
I have also tried this:
GtkWidget* textWindow = gtk_text_view_new();
GtkWidget* scrolledTextWindow = gtk_scrolled_window_new(NULL, NULL);
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledTextWindow),
GTK_POLICY_NEVER,
Hi
To set a background image use: gdk_window_set_back_pixmap
At
ftp://ftp.gnome.org/pub/gnome/sources/gdk-pixbuf
you can find the old pixbuf code for gtk+ v1.2.
This can handle image loading, drawing, scaling etc.
Take a look at the API at http://developer.gnome.org/doc/API/gdk-pixbuf/
Hi
Normally render and xft are included in the XFree distribution. I'm
not sure but I think you need at least XFree / Xorg = 4.3.
So look for an X update, which should solve your problems (at least when
you use Gtk+ on Linux). And remember to install the corresponding
development packages.
HTH
Hi
GtkItemFactory has been deprecated in favour of GtkUIManager.
Seems to be a Gtk+ error. I'm not sure how to fix it properly.
In gtk_item_factory.c:329 we add the menu root, without a path,
which fails as an accel path, when we have a menu with an activate
signal.
Please file a bug report.
Hi
Please post the error message...
Where did you install glib to?
Is there an old version installed?
Maybe you need to set the PKG_CONFIG_PATH, like
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig?
Jan-Marek
___
gtk-list mailing list
[EMAIL
Hi Zbigniew
It's not clear, what you want to do. I guess it's the common problem to
keep the GUI up to date from a complex callback.
1. If you are using Gtk+ = 2.x use g_idle_* or g_timeout_*.
2. Neither idle nor timeout uses threads. They attach their funtions
to the main loop. When
Hi Ian
Have you really rendered the font? I just checked with my application and
everything works as expected when changing the font via font name. (Gtk+
2.4.1 et al).
I'm using the following code:
desc = pango_font_description_from_string(font_str);
if (desc != NULL) {
old_desc =
Hi
I'm not sure, what you intend to do. Scaling can be done via pixbufs i.e.
gdk_pixbuf_new_from_file - gdk_pixbuf_scale - gtk_image_new_from_pixbuf
HTH
Jan-Marek
___
gtk-list mailing list
[EMAIL PROTECTED]
On Sun, 2004-05-02 at 05:09, Jan-Marek Glogowski wrote:
Hi
1. You have a memory leak: The string from gtk_tree_path_to_string must be
g_free()'d.
No, he did that with:
gtk_tree_path_free (path);
From the GTK+ docs:
gchar* gtk_tree_path_to_string (GtkTreePath *path);
Generates
Hi
For some reason you don't seem to have a valid libgdk-x11, which should
have been installed with gtk.
objdump -T /usr/lib/libgdk-*.so | grep gdk_threads_lock
should show a Base entry for gdk_threads_lock like:
0006655c gDO .bss 0004 Basegdk_threads_lock
It's also
Hi
If you just want to start processes, and are using glib 2.x look at
g_spawn_* (docs: GLib Utilities - Spawning Processes)
HTH
Jan-Marek
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list
Hi
Internally the GtkComboBox created with gtk_combo_box_new_text() uses a
GtkListStore as it's TreeModel. Just call gtk_combo_box_get_model() to
get it.
I would like to loop around all items in the combo.
model = gtk_combo_box_get_model( combo );
if( ! gtk_tree_model_get_iter_first( model,
Hi
I want to create a shaped window from a pango rendered text line.
How can I create a bitmap for this line from the pixmap, which I can pass
to gdk_window_shape_combine_mask ?
Thanks
Jan-Marek
___
gtk-list mailing list
[EMAIL PROTECTED]
Hi Filipe
What is the best (i.e. fastest) way to clear GtkText? For the moment I
am using
gtk_text_set_point(GTK_TEXT(widget), 0);
gtk_text_forward_delete(GTK_TEXT(widget), (guint)
gtk_text_get_length(GTK_TEXT(widget)));
This seems to be ok (I don't know an
Hi Jordi
I don't see how the progress bar grows. Only I see, first an empty value and
then the full value. What I must do to update the value of the progress bar
and see how it grows with every record ??
The code is ok I think.
The question is how did you create your progress bar ?
There
Hi Miguel
typedef struct{
GtkWidget *item_code;
gchar *query;
} data_gtk;
gint
intro_data_1(GtkWidget *box, gchar *query , gchar *item){
GtkWidget *botton;
GtkTooltips *label;
data_gtk_1 enters;
enters is freed at the end of the funtion (local var).
Use something like
Hi Castelo
How I want to grab data from clist(when clicked on it)
and display it into gtkentry.. anyone.. any idea?
Do you want to display data, which is connected to the cell objects or the
text of the item? Here comes the code for the text:
Somewhere where you construct your dialog
Hi Rolf
[schnipp]
anywhere on the net, as to how to solve it I would like to be able to read
and write individual pixel colour values to and from an image file on linux.
[schnapp]
I'm not sure what / how you want to manipulate an image. Do you want to
use a script to automate things? Do you
Hi John
1. Positioning of windows
I use gdk_window_get_root_origin() and gtk_widget_set_uposition().
Works
2. Show / Hide a window on the same virtual desktop
Good question, but I can't help :-(
I started to connect nearly every signal to a funtion to gain knowledge
about the order
50 fonts.
Thanks
Jan-Marek Glogowski
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list
63 matches
Mail list logo