Re: Key press synthesis (for WebKitGTK)

2018-11-24 Thread Gergely Polonkai
On Sat, Nov 24, 2018 at 09:59:00AM +0100, Pierre Neidhardt wrote: > Hi Gergely, > > > So if you change your handler’s return type from `void` to `gboolean` > > and return `FALSE` if the lisp thingy doesn’t understand your key, it > > will be automatically propagated to the next handler (which, hop

Re: Issue using the "gtk_widget_get_allocated_height" instruction

2018-11-24 Thread Luca Bacci via gtk-app-devel-list
If you really need, you can fake it by adding a menuitem with empty text and setting it to invisible with gtk_widget_set_visible(menuitem, false); Il giorno sab 24 nov 2018 alle ore 15:59 Luca Bacci ha scritto: > Probably it's a consequence of this work for porting GtkMenuBar to use css > gadget

Re: Issue using the "gtk_widget_get_allocated_height" instruction

2018-11-24 Thread Luca Bacci via gtk-app-devel-list
Probably it's a consequence of this work for porting GtkMenuBar to use css gadgets internally: https://gitlab.gnome.org/GNOME/gtk/commit/700286c6 You should be able to get the appropriate size if you add menu items to the bar, i.e. as long as the menubar is not empty you get the appropriate height

Re: Key press synthesis (for WebKitGTK)

2018-11-24 Thread Pierre Neidhardt
Hi Gergely, > So if you change your handler’s return type from `void` to `gboolean` > and return `FALSE` if the lisp thingy doesn’t understand your key, it > will be automatically propagated to the next handler (which, hopefully, > will insert your "a" key. Thanks for the tip. Indeed, I had miss

Re: Key press synthesis (for WebKitGTK)

2018-11-23 Thread Gergely Polonkai
Hello, from the manual (https://developer.gnome.org/gtk3/stable/GtkWidget.html#GtkWidget-key-press-event), the signature of key-press-event handlers is: ``` gboolean user_function (GtkWidget *widget, GdkEvent *event, gpointer user_data) ``` From the same manual:

Re: How to make text in rendered PDF pages selectable?

2018-11-19 Thread Germán Poo-Caamaño
On Mon, 2018-11-19 at 16:39 +0100, Радомир Хаџић via gtk-app-devel-list wrote: > Hello. > > I'm using Poppler to render PDF page onto GtkDrawingArea surface. > Everything renders correctly so far, but I can't figure out how to > make text selectable. For example, a user may wish to select some >

RE: Working with embedded images with GResource, GdkPixbuf and GtkWidget

2018-11-11 Thread Alessandro Francesconi
It works! I didn’t know about gdk_pixbuf_new_from_resource() thank you. Ale From: infirit Sent: Sunday, November 11, 2018 11:11:53 PM To: Alessandro Francesconi; gtk-app-devel-list@gnome.org Subject: Re: Working with embedded images with GResource

Re: Working with embedded images with GResource, GdkPixbuf and GtkWidget

2018-11-11 Thread infirit via gtk-app-devel-list
Op 11-11-18 om 18:23 schreef Alessandro Francesconi: I can’t really understand how Pixbuf expects from the GResource data… also i read in the docs that “gdk_pixbuf_new_from_inline has been deprecated since version 2.32 and should not be used in newly-written code. Use GResource instead.”… so w

RE: Working with embedded images with GResource, GdkPixbuf and GtkWidget

2018-11-11 Thread Alessandro Francesconi
From: Joël Krähemann Sent: Sunday, November 11, 2018 8:29:37 PM To: misterbi...@hotmail.it Cc: gtk-app-devel-. Subject: Re: Working with embedded images with GResource, GdkPixbuf and GtkWidget Hi, First you create a GdkPixbuf: https://developer.gnome.org/gdk

Re: Working with embedded images with GResource, GdkPixbuf and GtkWidget

2018-11-11 Thread Joël Krähemann via gtk-app-devel-list
Hi, First you create a GdkPixbuf: https://developer.gnome.org/gdk-pixbuf/stable/gdk-pixbuf-Image-Data-in-Memory.html#gdk-pixbuf-new-from-data then set the property of about dialog: https://developer.gnome.org/gtk2/stable/GtkAboutDialog.html#GtkAboutDialog--logo g_object_set(your_about_dialog,

Re: GTK+ doesn't track motion of DND file from desktop

2018-11-06 Thread Zdravetz via gtk-app-devel-list
I am indeed using GTK+ 3.22.30 But what i forgot to mention is that I am also running on Windows. - П.П. Искаш бизнесът ти да е и онлайн? Лесно е! Направи си сайт. В СуперХостинг.БГ пазят място за него! Виж повече на www.superhosting.bg. https://www.super

Re: Detect dark or light theme from an application

2018-11-06 Thread Emmanuele Bassi via gtk-app-devel-list
On Wed, 7 Nov 2018 at 00:48, Yuri Khan via gtk-app-devel-list < gtk-app-devel-list@gnome.org> wrote: > Hello everybody, > > I know in the GTK+3 theming engine a theme can define a light variant > and a dark variant. Is it possible, in an application, to know which > variant is currently used, and/

Re: GTK+ doesn't track motion of DND file from desktop

2018-11-06 Thread Edscott Wilson via gtk-app-devel-list
Check the version with which you gtk desktop and applications are compiled with. DnD worked quite erratically for me in 3.22, and seems to be more or less stable in 3.24, but applications compiled with 2.24 which used to work fine with those from 3.18 now will ignore drops from 3.24 apps. In the gt

Re: Segmentation fault when passing Poppler objects

2018-11-06 Thread Emmanuele Bassi via gtk-app-devel-list
On Tue, 6 Nov 2018 at 09:55, Радомир Хаџић via gtk-app-devel-list < gtk-app-devel-list@gnome.org> wrote: > Hi. I get segmentation fault if I try to access a Poppler object whose > pointer is passed through g_signal_connect. There is no such problem > with normal pointers, though. This: > void

Re: GtkTreeRowReference and Drag-and-Drop

2018-11-01 Thread Mitko Haralanov via gtk-app-devel-list
reeview in my application, which has drag-and-drop > enabled to allow re-ordering of the rows. To support tree model updates > while the user is performing dnd operations, I also have > GtkTreeRowReferences for each row in the model (the model will not have too > many rows). > > However,

Re: GTK+ 2.0/3.0 Windows runtimes

2018-10-23 Thread John Mills
Thank you David. > The procedure was: on Linux development machine, unzip the gtk Windows bundle > in a directory > with the C source, set up a Makefile with the appropriate CFLAGS and LDFLAGS, > 'make mingw' > and deploy the EXE. This procedure suited my development style. > That is the 's

Re: GTK+ 2.0/3.0 Windows runtimes

2018-10-23 Thread David C. Rankin
On 10/23/2018 02:16 AM, John Mills wrote: > I have been developing a C-language GTK+ 2.0 application for MS Windows 10 > using mingw > cross-compilation on Linux, and deploying it by installing the Windows GTK+ > 2.0 runtime > bundle on the Windows machine. > http://ftp.gnome.org/pub/gnome/bina

Re: GTK+ 2.0/3.0 Windows runtimes

2018-10-23 Thread John Mills
Hello Thank you for your explanations Dov and Emmanuele. My program is fairly simple - it samples colour from an image and builds a greyscale matrix, which is viewed on a GtkImage with a GtkEventBox for rubberbanding/cropping and a GtkPrintOperation for hard copy output. It's a custom applica

Re: GTK+ 2.0/3.0 Windows runtimes

2018-10-23 Thread Emmanuele Bassi via gtk-app-devel-list
Hi; On Tue, 23 Oct 2018 at 08:26, John Mills wrote: > Hello list > > If this question should be raised on another list, please let me know. > > I have been developing a C-language GTK+ 2.0 application for MS Windows 10 > using mingw > cross-compilation on Linux, and deploying it by installing th

Re: GTK+ 2.0/3.0 Windows runtimes

2018-10-23 Thread Dov Grobgeld via gtk-app-devel-list
John, I am maintaining several gtk2 applications for windows that I'm cross compiling from Linux. I'm using Fedora for the cross compilation and the way I'm working is as follows: - Install the necessary mingw64 packages through dnf - Install mingw32-nsis for the generation of a windows Ins

Re: GtkSourceMap selector not updating

2018-10-07 Thread Zdravetz via gtk-app-devel-list
Fixed it. The minimap should be initialized within the "activate" signal when working with GApplication. - П.П. Искаш сайт? Направи си, лесно е! Отиди на www.superhosting.bg и избери най-доброто име за него с домейн .COM само за 9,75 лв. Започни сега! ht

Re: State actions and Glade

2018-10-05 Thread Mitko Haralanov via gtk-app-devel-list
Thanks for the example. I played a bit more with Glade and I found that if the action is described as a detailed action, i.e. "win.radio-action(0)", then the application acts as if I haven't define such an action. It appears as if the buildable is using the entire string as the action name and fai

Re: State actions and Glade

2018-10-05 Thread Eric Cashon via gtk-app-devel-list
I don't know if this is of any help. Another try at it. This one uses a GtkApplication. Setup an action on the button along with the standard "clicked" callback. A menu in there also. Eric //gcc -Wall toolbar2.c -o toolbar2 `pkg-config --cflags --libs gtk+-3.0` #include static void quit_p

Re: That reminds me -- is there a signal that can be used when mouse over mainwin titlebar?

2018-10-04 Thread Germán Poo-Caamaño
On Wed, 2018-09-26 at 18:52 -0500, David C. Rankin wrote: > All, > > Thanks to the other "is there a signal?" question, that reminded me I > have been looking for a signal (or way) to detect when the user has > the mouse over the titlebar of the main window in an editor where I > would like to ac

Re: State actions and Glade

2018-10-04 Thread Eric Cashon via gtk-app-devel-list
"I am not sure what you mean" I don't have a good answer for this. I see that GtkRadioToolButton is in the list of Known Implementations for GtkActionable but doesn't use the GAction interface directly. https://developer.gnome.org/gtk3/stable/GtkActionable.html#gtk-actionable-set-detailed-act

Re: State actions and Glade

2018-10-04 Thread Mitko Haralanov via gtk-app-devel-list
Hi, Thank you for your reply. I am not sure what you mean by "GtkToolbar doesn't implement the GAction interface". In Glade, I can define the specify the "Action Name" for each individual widget in the Toolbar. Those action names get automatically linked to the actions that I've defined in the my

Re: State actions and Glade

2018-10-02 Thread Eric Cashon via gtk-app-devel-list
Hi Mitko, The GtkToolbar doesn't implement the GAction interface so you are out of luck there. You can use gtk_toggle_tool_button_get_active() to get the state of one of the GtkRadioToolButton's in the toolbar. Eric //gcc -Wall toolbar1.c -o toolbar1 `pkg-config --cflags --libs gtk+-3.0`

Re: State actions and Glade

2018-10-02 Thread Mitko Haralanov via gtk-app-devel-list
Can someone please help me with some pointer? Thank you. On Tue, Sep 18, 2018 at 9:35 AM Mitko Haralanov wrote: > I am trying to write an application using Glade where the tool bar > contains a set of radio tool buttons. Those radio tool buttons should not > perform an action when activated but

Re: Wayland Window Positioning

2018-10-02 Thread Emmanuele Bassi via gtk-app-devel-list
You probably want to ask on gtk-devel-list and gnome-shell-list. Wayland interfaces need to be implemented by the compositor, and typically not piecemeal. That KDE interface seems to be a private interface shared between Plasma and kwin, like the gtk_shell interface is a private interface between

Re: How can I change the font of a text field using non-deprecated way?

2018-10-02 Thread Yuri Khan via gtk-app-devel-list
On Sat, Sep 22, 2018 at 3:11 PM Радомир Хаџић via gtk-app-devel-list wrote: > I'm trying to make a small application in C using GTK+3 (the latest > stable). The application is going to have a text field implemented using > GtkTextView where a user can write text. I also font a user to be able to

Re: GTK3 + gnuplot

2018-10-02 Thread Yuri Khan via gtk-app-devel-list
On Wed, Sep 19, 2018 at 12:19 AM Allin Cottrell wrote: > > The question now is: "How to embed a gnuplot graphic in gtk3? > > Could you say, please, where to find a simple example, just to undestand > > how it is possible to do that? > > Get gnuplot to produce a PNG file, load the PNG into a GdkPi

Re: Cancel a Drag & Drop for some specific items in a Gtk.TreeView

2018-10-02 Thread Yuri Khan via gtk-app-devel-list
On Tue, Sep 11, 2018 at 4:27 AM c.buhtz--- via gtk-app-devel-list wrote: > I have a Gtk.TreeView here. Most but not all of the items should be > able to be dragged & dropped. For example the first item should not be > able to be dragged & dropped but it should be selectable. > > How can I realize

Re: Howto register/unregister words completion provider on buffer change in textview?

2018-09-30 Thread David C. Rankin
On 09/16/2018 03:53 AM, David C. Rankin wrote: > On 09/16/2018 03:21 AM, David C. Rankin wrote: >> Each treemodel entry has a struct containing a pointer to its >> GtkSourceCompletionWords provider. > > Uugh... > > That should read the editor instance struct associated with the sourceview has >

Re: is there a signal for typing at bottom of window?

2018-09-27 Thread Eric Cashon via gtk-app-devel-list
You might be able to fiddle around with the newlines at the end of the buffer to get something to work with the textview. Eric //gcc -Wall text_space1.c -o text_space1 `pkg-config --cflags --libs gtk+-3.0` #include static void value_changed(GtkAdjustment *v_adjust, GtkWidget **widgets)   {

Re: is there a signal for typing at bottom of window?

2018-09-27 Thread Doug McCasland
t; > gtk_text_view_scroll_to_iter(..., 0.0, TRUE, 1.0, 0.5) > >> > > > >> > > so I have that to use. > >> > > > >> > > > >> > > On Tue, Sep 25, 2018 at 2:34 PM wrote: > >> > > > >> > > > > >>

Re: is there a signal for typing at bottom of window?

2018-09-26 Thread Doug McCasland
; > > > there is a better solution for this. > > > > > > > > static void value_changed(GtkAdjustment *v_adjust, gpointer textview) > > > > { > > > > static gint s_line=0; > > > > GtkTextIter iter; > > > >

Re: g_log_set_fatal_mask () does not appear to be present

2018-09-26 Thread Richard Shann
> Date: Sun, 09 Sep 2018 20:21:54 +0100 > From: Richard Shann > To: gtk-app-devel-list@gnome.org > Subject: g_log_set_fatal_mask () does not appear to be present > Message-ID: <1536520914.1394.1.ca...@rshann.plus.com> > Content-Type: text/plain; charset="UTF-8" > > I used to call  > g_log_set_fa

Re: is there a signal for typing at bottom of window?

2018-09-25 Thread Joël Krähemann via gtk-app-devel-list
=0; > > > GtkTextIter iter; > > > GtkTextBuffer > > > *buffer=gtk_text_view_get_buffer(GTK_TEXT_VIEW(textview)); > > > GtkTextMark *mark=gtk_text_buffer_get_mark(buffer, "insert"); > > > gtk_text_buffer_get_iter_at_mark(buffer, &iter,

Re: is there a signal for typing at bottom of window?

2018-09-25 Thread Joël Krähemann via gtk-app-devel-list
k_text_buffer_get_mark(buffer, "insert"); > > gtk_text_buffer_get_iter_at_mark(buffer, &iter, mark); > > gint line=gtk_text_iter_get_line(&iter); > > if(s_line!=line) > > { > > g_print("Scroll Line\n&quo

Re: is there a signal for typing at bottom of window?

2018-09-25 Thread Doug McCasland
et_line(&iter); > if(s_line!=line) > { > g_print("Scroll Line\n"); > s_line=line; > } > } > > Eric > > > -Original Message- > From: Doug McCasland > To: cecashon > Sent: Tue, Sep 25, 2018

Re: is there a signal for typing at bottom of window?

2018-09-25 Thread Eric Cashon via gtk-app-devel-list
Hi Doug, Try getting the vertical adjustment of the scrolled window and connect to "value-changed". See if that will work. Something like ... static void value_changed(GtkAdjustment *v_adjust, gpointer user_data)   {   } ... GtkWidget *scroll=gtk_scrolled_window_new(NULL, NULL); GtkAdjustment

Re: How can I change the font of a text field using non-deprecated way?

2018-09-23 Thread Eric Cashon via gtk-app-devel-list
Hi Radomir, The function gtk_widget_override_font() is deprecated but as far as I know it still works fine in GTK3. With the Pango font description and the textview you should be able to set everything up without getting any deprecated warnings. It doesn't set the textview widget itself to

Re: GTK3 + gnuplot

2018-09-18 Thread Eric Cashon via gtk-app-devel-list
Hi Arkkimede, With gnuplot you can output to a file and then open the file with GTK+. https://gitlab.com/cecashon/OrderedSetVelociRaptor/blob/master/Misc/Pipes/gnuplot5.c At one time gnuplot could directly write to GTK but that was a possible security problem so it no longer works to do this.

Re: GTK3 + gnuplot

2018-09-18 Thread Allin Cottrell
On Tue, 18 Sep 2018, arkkimede via gtk-app-devel-list wrote: The question now is: "How to embed a gnuplot graphic in gtk3? Could you say, please, where to find a simple example, just to undestand how it is possible to do that? Get gnuplot to produce a PNG file, load the PNG into a GdkPixbuf, t

Re: GTK3 + gnuplot

2018-09-18 Thread Chris Moller
That would be awkward in gnuplot--you'd have to create the plot and then load it as a pixmap or some such.  But there's a utility call plplot that's designed to be embedded in other applications and it might work better. https://tschoonj.github.io/blog/2015/07/05/embedding-plplot-in-gtk-drawin

Re: Any way to access treeview in GtkFileChooser?

2018-09-17 Thread Emmanuele Bassi via gtk-app-devel-list
17/18, Emmanuele Bassi wrote: > > Subject: Re: Any way to access treeview in GtkFileChooser? > To: marcoricci2...@yahoo.com > Cc: "gtk-app-devel-list list" > Date: Monday, September 17, 2018, 9:31 AM > > No, and it's never a good idea > to do so. > > Ca

Re: Any way to access treeview in GtkFileChooser?

2018-09-17 Thread Chris Moller
. Thanks, marco On Mon, 9/17/18, Emmanuele Bassi wrote: Subject: Re: Any way to access treeview in GtkFileChooser? To: marcoricci2...@yahoo.com Cc: "gtk-app-devel-list list" Date: Monday, September 17, 2018, 9:31 AM No, and it

Re: Any way to access treeview in GtkFileChooser?

2018-09-17 Thread Marco Ricci via gtk-app-devel-list
I want to modify the column headers to be consistent with the style/theme of the rest of the application I am working on. Thanks, marco On Mon, 9/17/18, Emmanuele Bassi wrote: Subject: Re: Any way to access treeview in GtkFileChooser? To

Re: Any way to access treeview in GtkFileChooser?

2018-09-17 Thread Emmanuele Bassi via gtk-app-devel-list
No, and it's never a good idea to do so. Care to tell use what are you trying to achieve? Ciao, Emmanuele. On Mon, 17 Sep 2018 at 15:25, Marco Ricci via gtk-app-devel-list < gtk-app-devel-list@gnome.org> wrote: > I want to get a handle to the GtkTreeView object that lists the files in > GtkFi

Re: How to get GtkNotebook tab padding?

2018-09-16 Thread David C. Rankin
On 09/12/2018 01:58 PM, Game On via gtk-app-devel-list wrote: > Hi,What's the correct way to get the tab padding of a GtkNotebook widget?  > It's easy enough to set them, but I'm not sure how to get those values back? > My custom gtk.css file with:notebook tab {    padding: 20px 20px 20px 20px; >

Re: Howto register/unregister words completion provider on buffer change in textview?

2018-09-16 Thread David C. Rankin
On 09/16/2018 03:21 AM, David C. Rankin wrote: > Each treemodel entry has a struct containing a pointer to its > GtkSourceCompletionWords provider. Uugh... That should read the editor instance struct associated with the sourceview has a pointer to its GtkSourceCompletionWords provider. (the tre

Re: PyGObject: ask for system/theme colors

2018-09-15 Thread infirit via gtk-app-devel-list
Op 14-09-18 om 23:19 schreef c.buhtz--- via gtk-app-devel-list: > I don't want to use colors defined by myself e.g. with RGB-values. > I want to use colors from the system (Windows, Linux, ...) and/or the > theme. > > For example I need the background color of a highlighted menu or list > item. > >

Re: Own drag icon with same color and font settings as the default drag icon in a Gtk.TreeView

2018-09-15 Thread infirit via gtk-app-devel-list
Op 15-09-18 om 14:13 schreef infirit: > You use the Gtk.render_* range of functions. There is one for for every > type of content you will want to render onto a cairo surface. > > If you want to render text put it in a Pango.Layout and use > Gtk.render_layout(). Below is a modified version based o

Re: Own drag icon with same color and font settings as the default drag icon in a Gtk.TreeView

2018-09-15 Thread infirit via gtk-app-devel-list
Op 15-09-18 om 00:24 schreef c.buhtz--- via gtk-app-devel-list: > I want the same (background-color, font-face, font-size, font-color) > but with a shorter string (only the second of three columns). You use the Gtk.render_* range of functions. There is one for for every type of content you will wa

Re: Cancel a Drag & Drop for some specific items in a Gtk.TreeView

2018-09-11 Thread c.buhtz--- via gtk-app-devel-list
On 2018-09-11 13:50 Yuri Khan wrote: > Reading the “GtkTreeView drag-and-drop”[1] page, I get the impression > that you’d need to implement a wrapper around GtkTreeStore, or > possibly a class derived from GtkTreeStore, that also overrides the > row_draggable method so that it returns False for no

Re: "draw" icon with string

2018-09-10 Thread c.buhtz--- via gtk-app-devel-list
t;Cairo") > >     cr.set_source_rgb(0.0, 0.0, 0.0) >     cr.set_line_width(1) >     cr.rectangle(200/2-width/2, 200/2 - height/2, width, height) >     cr.stroke() > >     return surface > > win = MainWindow() > win.connect("delete-ev

Re: "draw" icon with string

2018-09-10 Thread Chris Moller
Have you seen the recent post from Eric Cashon?   I think it's a similar example but in Python.  Sorry, but I've never used Pycairo. On 10/09/18 16:53, c.buhtz--- via gtk-app-devel-list wrote: Thanks Chris for your example code. But I am not able to map your C code to Pycairo. Even the doc of

Re: "draw" icon with string

2018-09-10 Thread c.buhtz--- via gtk-app-devel-list
Thanks Chris for your example code. But I am not able to map your C code to Pycairo. Even the doc of Pycairo is not helpfull. No examples, no class trees. I still don't know how to draw text to a cairo surface. It is also unclear to me which surface I should use. On 2018-09-09 18:22 Chris Moller

Re: "draw" icon with string

2018-09-10 Thread Eric Cashon via gtk-app-devel-list
e()     return surface win = MainWindow() win.connect("delete-event", Gtk.main_quit) win.show_all() Gtk.main()    -Original Message- From: c.buhtz--- via gtk-app-devel-list To: c.buhtz--- via gtk-app-devel-list Cc: c.buhtz Sent: Sun, Sep 9, 2018 2:14 pm Subject: Re

Re: "draw" icon with string

2018-09-09 Thread Chris Moller
Here's a sample I came across some time ago.. Basically, you need to do all the drawing using cairo primitives. /*     Test drawing on a toggle button.     gcc -Wall cairobutton.c -o cairobutton `pkg-config --cflags --libs gtk+-3.0`     C. Eric Cashon */ #include gboolean draw_button1 (G

Re: "draw" icon with string

2018-09-09 Thread c.buhtz--- via gtk-app-devel-list
On 2018-09-09 23:01 "c.buhtz--- via gtk-app-devel-list" wrote: > It is unclear to me how to create a cairo.Surface instance. > And I can not see any text/string drawing methods in the surface class. _

Re: "draw" icon with string

2018-09-09 Thread c.buhtz--- via gtk-app-devel-list
On 2018-09-04 00:26 Emmanuele Bassi wrote: > this means you need to create a Cairo > surface and render on it using the Cairo API. It is unclear to me how to create a cairo.Surface instance. Also help(cairo.Surface)

Re: PyGObject: modify drag icon in TreeView

2018-09-09 Thread c.buhtz--- via gtk-app-devel-list
There is a problem with documentation. https://gitlab.gnome.org/GNOME/pygobject/issues/251 The answer can be found here. https://stackoverflow.com/a/52248549/4865723 ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/

Re: Introspection data generation error in evince (autotools vs meson)

2018-09-07 Thread Emmanuele Bassi via gtk-app-devel-list
Just as a follow up to this for the archives, since it has been fixed in Evince[0]: - the issue is caused by a double declaration of `GType ev_document_model_get_type (void)`—one by the G_DECLARE_FINAL_TYPE at line 33, and one explicit at line 57. This confuses the g-ir-scanner parser, and would

Re: GTK window winthout main iterator

2018-09-04 Thread James Cameron
Add your logic to a function given to glib_idle_add(), and to trigger new drawings call queue_draw and then return from your function. GTK+ will call your draw signal handler. As soon as GTK+ is idle again, your function will be called again. It isn't the usual way of doing things, but it will w

Re: GTK window winthout main iterator

2018-09-04 Thread Reuben Rissler
Forgive me for second guessing you, but are you definite that that your loop is better/easier to maintain than a Gtk main loop? So far, if I was tempted to implement my own main loop, it wasn't because the Gtk main loop was inferior, but because I was looking at it the wrong way. Definitely ch

Re: "draw" icon with string

2018-09-03 Thread Emmanuele Bassi via gtk-app-devel-list
On Tue, 4 Sep 2018 at 00:09, c.buhtz--- via gtk-app-devel-list < gtk-app-devel-list@gnome.org> wrote: > Dear Emmanuele, > > you describe how to set a drag icon. I know how to do this. > https://stackoverflow.com/q/51975256/4865723 > > But the question is how do I create my icon? > That's what I w

Re: "draw" icon with string

2018-09-03 Thread c.buhtz--- via gtk-app-devel-list
Dear Emmanuele, you describe how to set a drag icon. I know how to do this. https://stackoverflow.com/q/51975256/4865723 But the question is how do I create my icon? e.g. TreeView create it's own one, too. It is based on the row content. I can I do the same? e.g. I only want the content of the s

Re: ComboBox: selecting items with children, Gtk2 vs Gtk3

2018-09-02 Thread Eduardo M KALINOWSKI
On 07-07-2018 11:00, Eduardo M KALINOWSKI wrote: > On 05-07-2018 11:02, Eduardo M KALINOWSKI wrote: >> Consider the sample attached: it builds a tree model with an item that >> has child items, and uses that model in a ComboBox. >> >> When compiled with Gtk2, when the item with children is selected

Re: "draw" icon with string

2018-09-01 Thread Emmanuele Bassi via gtk-app-devel-list
On Sun, 2 Sep 2018 at 02:02, Chris Moller wrote: > You probably can't do that--GTK has gotten just about impossible to > customise--but if you can do it at all, you'll probably have to use CSS. > Please, avoid this kind of unhelpful reply in the future. Ciao, Emmanuele. On 01/09/18 17:20, c.b

Re: "draw" icon with string

2018-09-01 Thread Emmanuele Bassi via gtk-app-devel-list
On Sat, 1 Sep 2018 at 22:20, c.buhtz--- via gtk-app-devel-list < gtk-app-devel-list@gnome.org> wrote: > I want to use my own drag-icon in a Gtk.TreeView where this is set as > an instance of GdkPixbuf.Pixbuf. > > I can I create/draw a pixbuf and create Text, background and border > color in it? >

Re: "draw" icon with string

2018-09-01 Thread Chris Moller
You probably can't do that--GTK has gotten just about impossible to customise--but if you can do it at all, you'll probably have to use CSS. On 01/09/18 17:20, c.buhtz--- via gtk-app-devel-list wrote: I want to use my own drag-icon in a Gtk.TreeView where this is set as an instance of GdkPixbuf

Re: Appending to treestore - how to set selection on new entry?

2018-08-28 Thread David C. Rankin
On 08/28/2018 04:24 PM, infirit wrote: > Next is to get the selection from your view with > gtk_tree_view_get_selection and call gtk_tree_selection_select_iter with > the toplevel iter from earlier. It should now have selected the newly > added row. > > ~infirit Yes, thank you, that is what I did

Re: Appending to treestore - how to set selection on new entry?

2018-08-28 Thread infirit via gtk-app-devel-list
Op 27-08-18 om 08:24 schreef David C. Rankin: > When I add a new file (entry) to the treestore/treemodel, how do I adjust > the selection so that the new entry is selected? (or how do I get a treepath > or iter from the new entry to allow me to set the selection?) The treestore > holds the name o

Re: PyGObject: modify drag icon in TreeView

2018-08-28 Thread c.buhtz--- via gtk-app-devel-list
On 2018-08-22 23:17 wrote: > I opened a stackoverflow question with a MWE for this > > https://stackoverflow.com/q/51975256/4865723 There is still no answer. Does anyone of you have a hint where I could ask such questions, too? ___ gtk-app-devel-list m

Re: Appending to treestore - how to set selection on new entry?

2018-08-28 Thread David C. Rankin
On 08/27/2018 01:24 AM, David C. Rankin wrote: > "How do I use the pointer stored in column 2 of the model to set the > selection on that treeview entry?" > > (the full source of the interface is https://github.com/drankinatty/gtkate > which is just a concept at the moment, the project will prov

Re: PyGObject: modify drag icon in TreeView

2018-08-22 Thread c.buhtz--- via gtk-app-devel-list
I opened a stackoverflow question with a MWE for this https://stackoverflow.com/q/51975256/4865723 On 2018-08-14 00:02 "c.buhtz--- via gtk-app-devel-list" wrote: > I want to use the "drag-begin" event to show an individual drag-icon. >

Re: Copywrite protection and source-code distribution

2018-08-20 Thread Ruben Safir
Well Roger what does your software do? Lets see if it is worth copying first, and if so then I might copy it and distribute it for free. On Thu, Aug 02, 2018 at 01:04:05PM +0700, Lucky B.C via gtk-app-devel-list wrote: > In my view, you can choose donation or ads! > > On Thu, Aug 2, 2018, 08:

Re: PyGObject: modify drag icon in TreeView

2018-08-16 Thread c.buhtz--- via gtk-app-devel-list
I can not find a "drag-begin" example on the internet. On 2018-08-14 00:02 "c.buhtz--- via gtk-app-devel-list" wrote: > I want to use the "drag-begin" event to show an individual drag-icon. > > > But it

Re: return value from expose event / draw signal of GtkDrawingArea

2018-08-14 Thread Luca Bacci via gtk-app-devel-list
All right, I missed that! Thank you! Luca 2018-08-14 18:56 GMT+02:00 Emmanuele Bassi : > Hi; > > On Tue, 14 Aug 2018 at 17:30, Luca Bacci via gtk-app-devel-list < > gtk-app-devel-list@gnome.org> wrote: > >> Hi, does anyone know what meaning has the return value from expose event >> handler (for g

Re: return value from expose event / draw signal of GtkDrawingArea

2018-08-14 Thread Emmanuele Bassi via gtk-app-devel-list
Hi; On Tue, 14 Aug 2018 at 17:30, Luca Bacci via gtk-app-devel-list < gtk-app-devel-list@gnome.org> wrote: > Hi, does anyone know what meaning has the return value from expose event > handler (for gtk2) and draw signal (for gtk3) of GtkDrawingArea? > > When one should return TRUE, and when FALSE?

Re: PyGObject: FileChooserDialog and transient parent

2018-08-12 Thread Emmanuele Bassi via gtk-app-devel-list
Hi; On Sun, 12 Aug 2018 at 12:33, c.buhtz--- via gtk-app-devel-list < gtk-app-devel-list@gnome.org> wrote: > Below you see a minimal working example using Gtk.FileChooserNative as > a file-open dialog. While running with Python 3.6.6 I recieve > this warning message > > "GtkDialog mapped without

Re: gtk windows question

2018-08-06 Thread Bill Kelly
Hi, Wojciech Puchar wrote: > How to (if it is possible) actually FORCE some font size when windows > user sets "change the size of text, apps and other items". We ran into this recently. Setting the following environment variable provides some control over the font scaling: GDK_WIN32_FONT_RES

Re: Copywrite protection and source-code distribution

2018-08-03 Thread David C. Rankin
On 07/31/2018 08:41 AM, Roger Matthews via gtk-app-devel-list wrote: > I have developed an application using GTK+3.10. What copy-write protection > can you (GTK+) provide for me. I have been told that copywrite is free and > automatic and that to protect the software from piracy I need sufficient

Re: Copywrite protection and source-code distribution

2018-08-02 Thread Yuri Khan via gtk-app-devel-list
inclined, as long as you keep it possible for the end user to re-link your application with a modified version of GTK+. And finally, get a real lawyer. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Re: gdk_screen_get_width/height

2018-08-02 Thread Emmanuele Bassi via gtk-app-devel-list
Use the GdkMonitor API; GdkScreen is an X11-ism, and a single screen can cover multiple outputs. https://developer.gnome.org/gdk3/stable/GdkMonitor.html Ciao, Emmanuele. On Thu, 2 Aug 2018 at 14:58, Wojciech Puchar wrote: > > > On 2018.08.02 15:55, Wojciech Puchar wrote: > > how to get wid

Re: gdk_screen_get_width/height

2018-08-02 Thread Wojciech Puchar
On 2018.08.02 15:55, Wojciech Puchar wrote: how to get width/height of smallest available display - in case of multiple monitors are attached? or to be more exact - how to enumerate screens. all i need is to get resolution of smallest attached monitor. _

Re: Copywrite protection and source-code distribution

2018-08-02 Thread Colomban Wendling
I am not a lawyer, but… Le 31/07/2018 à 15:41, Roger Matthews via gtk-app-devel-list a écrit : > I have developed an application using GTK+3.10. What copy-write > protection can you (GTK+) provide for me. GTK+ doesn't "provide copyright protection" for software using it, and no library does. GTK

Re: Copywrite protection and source-code distribution

2018-08-01 Thread Lucky B.C via gtk-app-devel-list
In my view, you can choose donation or ads! On Thu, Aug 2, 2018, 08:31 Roger Matthews via gtk-app-devel-list < gtk-app-devel-list@gnome.org> wrote: > I have developed an application using GTK+3.10. What copy-write protection > can you (GTK+) provide for me. I have been told that copywrite is free

Re: Can you specify the No. of chars before SourceView Completion window is displayed?

2018-07-29 Thread David C. Rankin
On 07/28/2018 03:35 AM, David C. Rankin wrote: > All, > > I have implemented word completion with GtkSourceView, but I cannot find a > simple way to prevent the provider and proposals from popping up until 3 (or > more) characters are typed? Is there an easier way to adjust this rather than > co

Re: Can you specify the No. of chars before SourceView Completion window is displayed?

2018-07-28 Thread David C. Rankin
On 07/28/2018 08:12 AM, John Coppens wrote: > David, is 'set_minimum_key_length' what you are looking for? Oh, no, no, no, not entry-completion, *word-completion* in a text editor window. (which explains why it was no where to be found in the gtkSourceView code :) -- David C. Rankin, J.D.,P.E. _

Re: How to scroll to a specific line

2018-07-28 Thread David C. Rankin
On 07/28/2018 08:29 AM, John Coppens wrote: > On Sat, 28 Jul 2018 07:42:16 -0400 > Reuben Rissler wrote: > >>> Thanks for the suggestion. Believe it or not, I had just arrived at >>> that same solution! I first tried to use GLib.timeout_add(), and >>> that worked too, if the time was larger than

Re: Can you specify the No. of chars before SourceView Completion window is displayed?

2018-07-28 Thread David C. Rankin
On 07/28/2018 08:12 AM, John Coppens wrote: > On Sat, 28 Jul 2018 03:35:02 -0500 > "David C. Rankin" wrote: > >> All, >> >> I have implemented word completion with GtkSourceView, but I cannot >> find a simple way to prevent the provider and proposals from popping >> up until 3 (or more) charact

Re: [PyGObject] Drag & Drop in a TreeView

2018-07-28 Thread c.buhtz--- via gtk-app-devel-list
Dear Colomban, thanks for your great hint. > You get inserted/deleted signals for moved rows so you can know > when and how things changed if needed This signals are also emited when I manually insert and delete data in the model. How do I know if a insert/delete signal was caused by a drag and

Re: How to scroll to a specific line

2018-07-28 Thread John Coppens
On Sat, 28 Jul 2018 07:42:16 -0400 Reuben Rissler wrote: > > Thanks for the suggestion. Believe it or not, I had just arrived at > > that same solution! I first tried to use GLib.timeout_add(), and > > that worked too, if the time was larger than 300 - 400 ms, which is > > on the verge of annoyin

Re: Can you specify the No. of chars before SourceView Completion window is displayed?

2018-07-28 Thread John Coppens
On Sat, 28 Jul 2018 03:35:02 -0500 "David C. Rankin" wrote: > All, > > I have implemented word completion with GtkSourceView, but I cannot > find a simple way to prevent the provider and proposals from popping > up until 3 (or more) characters are typed? Is there an easier way to > adjust this

Re: How to scroll to a specific line

2018-07-28 Thread Reuben Rissler
Thanks for the suggestion. Believe it or not, I had just arrived at that same solution! I first tried to use GLib.timeout_add(), and that worked too, if the time was larger than 300 - 400 ms, which is on the verge of annoying. I then tried idle_add(), and I guess that makes the 300-400ms 'built

Re: [PyGObject] Drag & Drop in a TreeView

2018-07-28 Thread Reuben Rissler
If it's only for reordering the elements in the tree view, you can use the built-in Gtk.TreeView.set_reorderable() method [1], and you're all set. You get inserted/deleted signals for moved rows so you can know when and how things changed if needed, and the underlying model is also changing ac

Re: [PyGObject] Drag & Drop in a TreeView

2018-07-28 Thread Colomban Wendling
Le 27/07/2018 à 23:05, c.buhtz--- via gtk-app-devel-list a écrit : > Dear Reuben > > On 2018-07-23 08:03 Reuben Rissler wrote: >> This is how I have done it in the past. Note, I do not proclaim >> spectacular or Pythonic code, and would humbly accept any corrections >> and/or better ways to acc

Re: How to scroll to a specific line

2018-07-27 Thread John Coppens
On Fri, 27 Jul 2018 07:32:13 -0400 Reuben Rissler wrote: > I have also seen place_cursor_onscreen() work well. Now the thing is, > none of this will work until the Gtk.SourceView has properly been > rendered. This means doing something like: > >         self.source_buffer.set_text("my text")

<    1   2   3   4   5   6   7   8   9   10   >