Problem with GtkClist

2008-05-19 Thread Cyril Dupuit
Hello, I am using a modified GtkClist widget in my Windows application. All works fine with gtk+-2.10.13 but with gtk+-2.12.9, I have the following message : GLib-GObject-CRITICAL **: g_value_get_pointer: assertion `G_VALUE_HOLDS_POINTER (value)' failed when I add this widget to a scrolled wi

How to make gtktextview automatically scroll to cursor?

2008-05-19 Thread Till Harbaum / Lists
Hi, i have simple problem but hakf an hour of googling didn't give me an answer: How do i make an editable gtktextview inside a scrolledwindow to automatically scroll to the cursor position? This must be a very basic issue and i am sure it is answered in various simple examples. But i just don'

Re: Problem with GtkClist

2008-05-19 Thread Cyril Dupuit
Cyril Dupuit a écrit : > Hello, > > I am using a modified GtkClist widget in my Windows application. > > All works fine with gtk+-2.10.13 but with gtk+-2.12.9, I have the > following message : > GLib-GObject-CRITICAL **: g_value_get_pointer: assertion > `G_VALUE_HOLDS_POINTER (value)' failed > >

Re: How to make gtktextview automatically scroll to cursor?

2008-05-19 Thread zz
On Monday 19 May 2008 13:23:39 Till Harbaum / Lists wrote: > Hi, > > i have simple problem but hakf an hour of googling didn't give me an answer: > > How do i make an editable gtktextview inside a scrolledwindow to automatically > scroll to the cursor position? > > This must be a very basic iss

Re: How to make gtktextview automatically scroll to cursor?

2008-05-19 Thread jcupitt
2008/5/19 Till Harbaum / Lists <[EMAIL PROTECTED]>: > How do i make an editable gtktextview inside a scrolledwindow to automatically > scroll to the cursor position? Something like (untested): gtk_text_view_scroll_to_mark( text_view, gtk_text_buffer_get_insert( text_buffer ), 0.0, TRUE,

Re: How to make gtktextview automatically scroll to cursor?

2008-05-19 Thread zz
On Monday 19 May 2008 14:41:57 [EMAIL PROTECTED] wrote: > On Monday 19 May 2008 13:23:39 Till Harbaum / Lists wrote: > > Hi, > > > > i have simple problem but hakf an hour of googling didn't give me an answer: > > > > How do i make an editable gtktextview inside a scrolledwindow to > > automatic

How to move and resize a gtk window in the same main loop iteration?

2008-05-19 Thread Zhe Su
Hi, I'm writing an application which needs to implement window resize drag feature. Because of some reason, gtk_window_begin_resize_drag doesn't fit this purpose. So I decide to emulate it by using gtk_widget_set_size_request() and gtk_window_move(). Dragging right and bottom border is just ok, b

Re: How to move and resize a gtk window in the same main loop iteration?

2008-05-19 Thread Zhe Su
I just found function gtk_container_set_resize_mode() which can set a container to resize immediately. But GTK_RESIZE_IMMEDIATELY is marked as deprecated. Is it the right function to achieve my goal? Why to deprecate the immediately option? Regards James Su On Mon, May 19, 2008 at 11:39 PM, Zhe S

Re: How to move and resize a gtk window in the same main loop iteration?

2008-05-19 Thread Zhe Su
Hmm, there is a gdk_window_move_resize() and a private gtk_window_move_resize(). I'm wondering why gtk_window_move_resize() is private. Regards James Su On Tue, May 20, 2008 at 12:28 AM, Zhe Su <[EMAIL PROTECTED]> wrote: > I just found function gtk_container_set_resize_mode() which can set a > c

Re: How to make gtktextview automatically scroll to cursor?

2008-05-19 Thread Till Harbaum / Lists
Hi, coincidentally that's also a thing a needed for my program (a geocaching application for hildon/maemo named goxview). And thanks for that routine, it works perfectly! Still no hint for the textview. I really can't believe that there's nothing like this in any tutorial. But all tutorials dea

Re: How to make gtktextview automatically scroll to cursor?

2008-05-19 Thread Till Harbaum / Lists
Hi, to answer my own question (i had a look at the maemopad editor source code to get my answer): Never use "gtk_scrolled_window_add_with_viewport" to put the textview into the scrolled window. Instead use "gtk_container_add" as the textview can be placed directly in the scrolled window. And in

How to move, resize and redraw a window at the same time?

2008-05-19 Thread Zhe Su
Hi, I just found that gdk_window_move_resize() can move and resize a gdk window at the same time to avoid flick. However I found that it's still not possible to redraw the window immediately after move and resize. I tried following code: gdk_window_move_resize(window_->window, x, y, width, heig

Re: How to move, resize and redraw a window at the same time?

2008-05-19 Thread Zhe Su
Thanks a lot. On Tue, May 20, 2008 at 11:52 AM, Havoc Pennington <[EMAIL PROTECTED]> wrote: > Hi, > > 2008/5/19 Zhe Su <[EMAIL PROTECTED]>: > > So I'm wondering is there and method to move, resize and redraw a > window > > at the same time to avoid flick? > > The underlying X window system does