Re: Use Xcode to run Gtk code instead of terminal

2018-07-20 Thread Eric Cashon via gtk-app-devel-list
Hi Evan, I am unfamiliar with Xcode but if you can compile the code at the command line and have pkg-config working then check where the include files are that you need and add them to your Xcode development environment. Try pkg-config --cflags --libs gtk+-3.0 at the command line for your

Re: Using SVG for icons (and scaling)

2018-07-18 Thread infirit via gtk-app-devel-list
Op 18-07-18 om 02:32 schreef Benjamin Summerton via gtk-app-devel-list: > How do I use an SVG as an Icon where I can scale it based on the DPI? As Luca suggested the easiest is to use an icon name and it will handle it for you. There is possibly another option by using cairo surfaces which I had

Re: Using SVG for icons (and scaling)

2018-07-18 Thread Luca Bacci via gtk-app-devel-list
SVG are supported in Gtk (and Glade) Support for image formats is modularized in form of plugins, you just need to get the plugin for SVG. In many distros you have to install 'librsvg' to get the SVG loader. As for scaling goes, GtkImage can scale images only when using icon-name source and not

Re: Does 'left-gravity' for text_mark work in windows to preserve selection bounds? (gtk2)

2018-07-17 Thread David C. Rankin
instance of the running/cached version instead of re-reading the new executable. Regardless, it isn't a gtk issue. -- David C. Rankin, J.D.,P.E. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinf

Re: clear() on TreeView causes select-events

2018-07-15 Thread c.buhtz--- via gtk-app-devel-list
Dear Reuben, thanks for your answer. > And after you study the MVC pattern, you will see why the whole > Treeview stack works the way it does. Google MVC and Gtk MVC. It is > worthwhile reading if you plan on constructing treeviews. It may not > make sense immediately, but eventually you may see

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

2018-07-14 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

Re: GtkTreeView: how to get the cell with current focus?

2018-07-12 Thread Reuben Rissler
I do this all the time in Python with: def key_tree_tab(self, treeview, event): keyname = Gdk.keyval_name(event.keyval) path, col = treeview.get_cursor() # only visible columns!! columns = [c for c in treeview.get_columns() if c.get_visible()] colnum =

Re: GtkTreeView: how to get the cell with current focus?

2018-07-12 Thread Lars Paulsen
Hi All, I did some further tests and the addresses returned in focus_column are the same as the columns I created with "gtk_tree_view_column_new();". Well, it's quite obvious but somehow I expected that there is some API function which returns an index for a column. Anyway, I will continue by

Re: clear() on TreeView causes select-events

2018-07-09 Thread Reuben Rissler
I have had very similar experiences with liststore.clear() in Python3.5 and Mint 18. To work around this I do: store = treeview.get_model() #may not be necessary in your code treeview.set_model(None) store.clear() store.append('my string or etc') treeview.set_model(store) This works.

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

2018-07-07 Thread Eduardo M KALINOWSKI
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 and > its children displayed, and extra item

Re: clear() on TreeView causes select-events

2018-07-06 Thread c.buhtz--- via gtk-app-devel-list
Dear Reuben, thanks for your hint. On 2018-07-03 21:19 Reuben Rissler wrote: > I have had very similar experiences with liststore.clear() in > Python3.5 and Mint 18. To work around this I do: > > store = treeview.get_model() #may not be necessary in your code > treeview.set_model(None) >

Re: Updating displayed spinbutton value from a text file

2018-07-05 Thread Allin Cottrell
On Wed, 4 Jul 2018, Roger Matthews via gtk-app-devel-list wrote: I'm using gtk+3.10 on Ubuntu 14.04 and am writing an application in C, with the user interface constructed with a builder.ui file. I am using spinbuttons to create and change Cairo drawings of some mathematical functions.

Re: Simple GTK3 application in Nim?

2018-07-04 Thread Lucky B.C via gtk-app-devel-list
Nice job, sorry I don't use the Nim programming language. On Wed, Jul 4, 2018 at 1:12 AM, Matic Kukovec via gtk-app-devel-list < gtk-app-devel-list@gnome.org> wrote: > Found the problem. > To solve it the Nim application needs to load it's shared libraries with > dlopen(RTLD_GLOBAL). > >

Re: clear() on TreeView causes select-events

2018-07-03 Thread Reuben Rissler
On 07/03/2018 05:30 PM, c.buhtz--- via gtk-app-devel-list wrote: Hello I observer an interesting behavior (PyGObject, Gtk3.0, Python3.6, Debian unstable with XFCE desktop): An item (row) in a TreeView is selected (highlighted). Then calling .clear() on the TreeView causes an select-event for

Re: Simple GTK3 application in Nim?

2018-07-03 Thread Matic Kukovec via gtk-app-devel-list
Found the problem. To solve it the Nim application needs to load it's shared libraries with dlopen(RTLD_GLOBAL). Regards, Matic From: gtk-app-devel-list on behalf of Matic Kukovec via gtk-app-devel-list Sent: Thursday, June 28, 2018 8:34 PM To:

Re: Unable to capture mouse events of GtkGLArea

2018-07-02 Thread Jim Charlton via gtk-app-devel-list
Joe: I program in Gtkmm so my advice may not be applicable but... What I do to get a png file of an image is to 1. Get a pointer to the cairo context (cr) from what is passed to the on_draw() callback from your image widget. 2. in the callback, execute cr->pop_group_to_source(); 3. create a

Re: Unable to capture mouse events of GtkGLArea

2018-07-02 Thread Chris Moller
Some years ago, I used GtkGlArea in C with: GtkWidget *gl_area = gtk_gl_area_new (); gtk_widget_add_events (gl_area, GDK_BUTTON_PRESS_MASK); g_signal_connect (gl_area, "button-press-event",     G_CALLBACK (button_press), molecule);

Re: Unable to capture mouse events of GtkGLArea

2018-07-02 Thread Johannes Bauer
On 02.07.2018 22:11, Johannes Bauer wrote: > I'm writing a small toy application that uses OpenGL. Actually > converting it from GLUT to GTK/GL. I'm using a glade 3.22.1 generated UI > with Gtk 3.22.30 from Python3. So that you can see what I'm doing (wrong), here's the full source code of my

Re: GtkTextBuffer : Applying tags to newly input text

2018-06-23 Thread Gary Kramlich
I already have html parsing working into a Pango subset. The issue I have right now is 100% related to the clipboard usage only. Right now I'm parsing HTML on the text_insert, but i really only need to do it on paste. Likewise for copy I need to parse the buffer and put html back onto the

Re: GtkTextBuffer : Applying tags to newly input text

2018-06-22 Thread Eric Cashon via gtk-app-devel-list
With the text buffer and tag table you can get the text with pango attributes or even rebuild pango markup for print output. This allows the pango markup to be parsed into and then to be extracted from the text buffer without loss(Easier said than done). You only need one text buffer to

Re: GtkTextBuffer : Applying tags to newly input text

2018-06-21 Thread Gary Kramlich
The formats I need to handle are HTML and Markdown, while I could convert them to Pango markup, it seems redundant to do so. That said, I was looking to be able to copy HTML back out from a buffer that's handling HTML (by parsing it on insert). I should note, as I haven't already, that my use

Re: GtkTextBuffer : Applying tags to newly input text

2018-06-21 Thread Eric Cashon via gtk-app-devel-list
The textview understands Pango markup. Maybe something to give a try. There are a lot of text formats and you might have to do some text parsing depending on the format. If it is possible to use gtk_text_buffer_insert_markup(), this can save a lot of time dealing with text tags especially

Re: question about gtk_dialog (gtk2)

2018-06-21 Thread Emmanuele Bassi via gtk-app-devel-list
You haven't specified which windowing system you're using. If it's X11, then the position of a window is always the remit of the window manager; the position set is a hint, which is taken into account by the window manager itself, alongside the "this is a dialog" hint that GtkDialog sets.

Re: question about gtk_dialog (gtk2)

2018-06-21 Thread Matthew A. Postiff via gtk-app-devel-list
Hi, I am learning about this, but have not totally figured it out. When I make a new assistant window, it appears in the upper left of the screen. Not at (0,0) but nearby.   assistant = gtk_assistant_new();   gtk_window_set_transient_for(GTK_WINDOW(assistant), transient_parent);  

Re: question about gtk_dialog (gtk2)

2018-06-21 Thread Wojciech Puchar
nobody have idea? On 2018.06.15 13:43, Wojciech Puchar wrote: how to make dialogs appear on center of screen not on left corner. tried multiple things no results. For normal windows gtk_window_set_position works for dialog it doesn't below is example routine to ask a yes/no question from

Re: GtkTextBuffer : Applying tags to newly input text

2018-06-20 Thread Gary Kramlich
Hi Eric, I meant to respond sooner but I've been busy. This worked like a charm!! Thank you very much. Not sure how I overloaded `gtk_text_iter_backward_chars` but yeah that made things way easier. A followup I've been struggling with though is how to avoid applying this formatting when rich

Re: GtkTextBuffer : Applying tags to newly input text

2018-06-13 Thread Eric Cashon via gtk-app-devel-list
Hi Gary, Test setting up your callback with g_signal_connect_after. Then the location iter should be at the end of the insert. Then the tag can be applied to the inserted text. Eric //gcc -Wall highlight1.c -o highlight1 `pkg-config --cflags --libs gtk+-3.0` #include static

Re: GtkTextBuffer : Applying tags to newly input text

2018-06-13 Thread Gary Kramlich
I'm not sure I'm following your question unless you're trying to point out that they're applied to GtkTextIter's that are invalidated once the text is changed. That said, something is happening internally in the `_gtk_text_btree` functions that implements the behavior I'm trying to reproduce. If

Re: GtkTextBuffer : Applying tags to newly input text

2018-06-13 Thread Karan Ahuja
What are tags applied to ? In the apply tag function - what are the tags applied to. On 13 Jun 2018 12:34, "Gary Kramlich" wrote: > > Hi all, > > I'm working on a GtkTextBuffer subclass that needs to apply tags to to > newly inserted text. I've tried all sort of tricks to make this happen >

Re: Link Gtk.ListStore to the real data

2018-06-05 Thread Lucky B.C
Well, what you want is a way to catch/handle the data that always changes and you want to show it on screen in anytime, right? There's no good solutions for that, I mean you must make an algorithm to do that by yourself. Why? Don't always lets Gtk or QT or something else stores our data because

Re: This takes 30 secs to render

2018-06-05 Thread Lucky B.C
Hi, Another way to render the image better than cairo did, using OpenGL Area. You could find an example about it in gtk-demo. On Fri, Jun 1, 2018 at 6:45 AM, Tarie Nosworthy via gtk-app-devel-list < gtk-app-devel-list@gnome.org> wrote: > > > Is there any way to make this better? The image

Re: Undefined reference to g_file_load_bytes()

2018-06-04 Thread pspgen
Al right, despite that it still shows the same version it seems to actually be for real updated. Thanks a lot! Also my Glade and perhaps the entire gtk changed, one thing I noticed is that dialog windows use the native windows graphical environment, which I don't really like, nor expected.

Re: Undefined reference to g_file_load_bytes()

2018-06-04 Thread pspgen
I updated with pacboy update now. Everything is up to date. But still pkg-config --modversion glib-2.0 returns 2.52.3 and if I try to reinstall gtk with pacman -S mingw-w64-x86_64-gtk3, it says it is up to date. - Mail.BG: Безплатен e-mail адрес.

Re: Undefined reference to g_file_load_bytes()

2018-06-04 Thread Greg King
On 2018-06-01 1:10 PM, pspgen wrote: - Цитат от Emmanuele Bassi, на 01.06.2018 в 11:20 - Hi; g_file_load_bytes() is available since GLib 2.56: https://developer.gnome.org/gio/stable/GFile.html#g-file-load-bytes So, you'll need to make sure that the version of GLib provided by

Re: How to get a directory from the user

2018-06-04 Thread Richard Shann
On Mon, 2018-06-04 at 13:24 +0100, Emmanuele Bassi wrote: > > > On 4 June 2018 at 13:06, Richard Shann > wrote: > > Hi, > > > > I have seen GtkFileChooser for getting a file from the user, but > > how to > > get a directory (folder)? > > > > You can use GtkFileChooser with 

Re: How to get a directory from the user

2018-06-04 Thread Phil Wolff
void gtk_file_chooser_set_action (GtkFileChooser *chooser, GtkFileChooserAction action); set action to FILE_CHOOSER_ACTION_SELECT_FOLDER On 06/04/2018 05:06, Richard Shann wrote: Hi, I have seen GtkFileChooser for getting a file from the user, but how to get a directory (folder)? Richard

Re: How to get a directory from the user

2018-06-04 Thread Bas Wassink
On 2018-06-04 14:06, Richard Shann wrote: Hi, I have seen GtkFileChooser for getting a file from the user, but how to get a directory (folder)? Richard Shann Use gtk_file_chooser_set_action(chooser, GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER);

Re: How to get a directory from the user

2018-06-04 Thread Emmanuele Bassi
On 4 June 2018 at 13:06, Richard Shann wrote: > Hi, > > I have seen GtkFileChooser for getting a file from the user, but how to > get a directory (folder)? > > You can use GtkFileChooser with GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER as the action: -

Re: Link Gtk.ListStore to the real data

2018-06-02 Thread '-'
Swap items in your data_list in response to rows-reordered signal on the model? As for data_list, in your example you have multiple sources but the data_list is only one, so working on it makes sense. Could you try applying these suggestions to your example so we can see what doesn't work? On

Re: Link Gtk.ListStore to the real data

2018-06-02 Thread c.buhtz
On 2018-06-02 20:07 '-' wrote: > Can you make the data_list a field on your class? It's a list > with indices, right? Then, on the iter you get from your selection, > use gtk_tree_model_get_path and gtk_tree_path_get_indices. Finally > get the item from your data_list by that index. You mean e.

Re: Link Gtk.ListStore to the real data

2018-06-02 Thread Eric Cashon via gtk-app-devel-list
Try a relational database. Sqlite is an easy one to use. It can sort and save data to multiple tables. Use the list model and treeview to retrieve and view the data. That way the columns can be set up dynamically along with the renderer. Use SQL to update the database. Eric

Re: Link Gtk.ListStore to the real data

2018-06-02 Thread '-'
Hello. Can you make the data_list a field on your class? It's a list with indices, right? Then, on the iter you get from your selection, use gtk_tree_model_get_path and gtk_tree_path_get_indices. Finally get the item from your data_list by that index. On June 2, 2018 3:09:25 PM GMT+03:00,

Re: Link Gtk.ListStore to the real data

2018-06-02 Thread c.buhtz
Does no one has an idea? Am I the only one facing such problems? https://stackoverflow.com/q/50643938/4865723 On 2018-05-31 23:59 wrote: > I am looking for an elegant and pythonic way to connect the model of a > Gtk.ListStore (the content container for a Gtk.TreeView) to the real > data. > >

Re: PyGObject: pep8 konform

2018-06-01 Thread James Cameron
Code that uses PyGObject can't be PEP8 conformant without generating version warnings. My practice is to minimise E402 by moving imports, then add .flake8 file with; [flake8] # E402 module level import not at top of file # gi.require_version() is required before later imports ignore = E402 --

Re: This takes 30 secs to render

2018-06-01 Thread Eric Cashon via gtk-app-devel-list
The other way to go about it is to just use cairo. I don't think that it will give a speed improvement but it might be worth a try. I figure you are trying to scale the png first and then draw it in a widget. Once the image is sized it shouldn't be a problem to draw quickly. Eric //gcc

Re: Undefined reference to g_file_load_bytes()

2018-06-01 Thread pspgen
- Цитат от Emmanuele Bassi (eba...@gmail.com), на 01.06.2018 в 11:20 - Hi; g_file_load_bytes() is available since GLib 2.56: https://developer.gnome.org/gio/stable/GFile.html#g-file-load-bytes so you'll need to make sure that the version of GLib provided by MSYS2 is new enough

Re: PyGObject: pep8 konform

2018-06-01 Thread Gergely Polonkai
My take would be to ignore this specific line with a magic comment. Or, if you really donʼt want to d that, a from importlib import import_module # isnʼt that line wonderful? Gtk = import_module('gi.repository.Gtk') might do the trick. (Note that I wrote it without having Python at hand; maybe

Re: Link Gtk.ListStore to the real data

2018-06-01 Thread c . buhtz
I opened a question on StackOverflow about this and created a (not so) minimal working example for it there. https://stackoverflow.com/q/50643938/4865723 ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org

Re: Undefined reference to g_file_load_bytes()

2018-06-01 Thread Emmanuele Bassi
Hi; g_file_load_bytes() is available since GLib 2.56: https://developer.gnome.org/gio/stable/GFile.html#g-file-load-bytes so you'll need to make sure that the version of GLib provided by MSYS2 is new enough if you want to use that method. Ciao, Emmanuele. On 1 June 2018 at 01:21, PC

Re: guchar * sometimes a utf8, sometimes utf16?

2018-06-01 Thread Emmanuele Bassi
Hi; this mailing list is not for the GTK port of WebKit; you should ask on: https://lists.webkit.org/mailman/listinfo/webkit-gtk Ciao, Emmanuele. On 31 May 2018 at 23:04, Leo Ufimtsev wrote: > Hello guys, > > The following method: > guchar * webkit_web_resource_get_data_finish(..) > >

Re: Can a GtkApplicationWindow have both a menubar AND a toolbar?

2018-06-01 Thread c . buhtz
Please show us a minimal working example. Give us code to show us what you have tried so far. And doesn't it had to be a GtkApplicationWindow? Why not using a simpler GtkWindow? ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org

Re: Why is it impossible to move a window programmatically in GTK+ (C/C++)

2018-05-30 Thread Emmanuele Bassi
On 30 May 2018 at 18:33, Tarie Nosworthy via gtk-app-devel-list < gtk-app-devel-list@gnome.org> wrote: > I am writing an app in GTK+, and I wanted to center a splash screen. > Coming from a Windows background, where SetWindowPos does the job, I found > out the X Window Manager always ignores

Re: Why is it impossible to move a window programmatically in GTK+ (C/C++)

2018-05-30 Thread Liam R E Quin
On Wed, 2018-05-30 at 13:33 -0400, Tarie Nosworthy via gtk-app-devel- list wrote: > I am writing an app in GTK+, and I wanted to center a splash screen. Note, users get irritated by splash screens they can't move. You *can* make a window that's centered and immovable, e.g. gimp does it, so you

Re: The best way to draw a GL texture from a different process

2018-05-25 Thread Emmanuele Bassi
On 25 May 2018 at 10:23, Jiří Janoušek wrote: > Hello, > > My app consists of the main process, where the GTK+ main loop and widgetry > live, and the GPU process, which does OpenGL kung-fu and provides GL > texture and dirty/invalidated rectangles as a result. I have

Re: gtk_init_with_args behavior

2018-05-23 Thread Lucky B.C
You should make another version for only Windows, I think that it's better! On Mon, May 21, 2018 at 6:21 PM, Allin Cottrell wrote: > On Mon, 21 May 2018, tito-wolit wrote: > > On 21/05/2018 01:27, Allin Cottrell wrote: >> >>> >>> gtk_init_with_args is still useful in my case:

Re: gtk_init_with_args behavior

2018-05-21 Thread Allin Cottrell
On Mon, 21 May 2018, tito-wolit wrote: On 21/05/2018 01:27, Allin Cottrell wrote: gtk_init_with_args is still useful in my case: it automatically screens out any command-line arguments that are just option flags or parameters, via the GOptionEntry mechanism, leaving only a filename argument

Re: gtk_init_with_args behavior

2018-05-21 Thread tito-wolit
On 21/05/2018 01:27, Allin Cottrell wrote: On Sun, 20 May 2018, Miroslav Rajcic wrote: I've been doing it exactly like that in my own program, first getting the UTF-16 from Windows API, then converting to UTF-8 using g_utf16_to_utf8. Thanks, I've now been able to confirm for myself that

Re: gtk_init_with_args behavior

2018-05-20 Thread Allin Cottrell
On Sun, 20 May 2018, Miroslav Rajcic wrote: I've been doing it exactly like that in my own program, first getting the UTF-16 from Windows API, then converting to UTF-8 using g_utf16_to_utf8. Thanks, I've now been able to confirm for myself that that works fine. IMO, hooking this with

Re: gtk_init_with_args behavior

2018-05-20 Thread Miroslav Rajcic
I've been doing it exactly like that in my own program, first getting the UTF-16 from Windows API, then converting to UTF-8 using g_utf16_to_utf8. IMO, hooking this with gtk_init_with_args is not needed, GTK can use the standard args of the program, passed via "main()" function parameters,

Re: gtk_init_with_args behavior

2018-05-20 Thread Lucky B.C
Well converting from UTF-16 to UTF-8, if you think it must be done. On Sat, May 19, 2018 at 10:41 PM, Allin Cottrell wrote: > On Sat, 19 May 2018, Miroslav Rajcic wrote: > > Hi Allin, >> >> on Windows, it is advisable to use an API to get the command line >> parameters as

Re: gtk_init_with_args behavior

2018-05-19 Thread Allin Cottrell
On Sat, 19 May 2018, Miroslav Rajcic wrote: Hi Allin, on Windows, it is advisable to use an API to get the command line parameters as UTF-16, so you don't lose the letters "foreign" to your code page. See "CommandLineToArgvW" for more info: Thanks, Miroslav, that sounds like what I need.

Re: gtk_init_with_args behavior

2018-05-18 Thread Miroslav Rajcic
Hi Allin, on Windows, it is advisable to use an API to get the command line parameters as UTF-16,  so you don't lose the letters "foreign" to your code page. See "CommandLineToArgvW" for more info: https://msdn.microsoft.com/en-us/library/windows/desktop/bb776391(v=vs.85).aspx Regards,  

Re: GtkSourceView Gutter Example?

2018-05-18 Thread pspgen
Your only mistake is that you missed to explicitly point the width of the renderer: gtk_source_gutter_renderer_set_size(renderer, 20); It is stated in the reference page that you must do that. - П.П. Виж как една учителка по китайски реши да си направи

Re: Gdk-WARNING **: gdkwindow-win32.c:1834: SetWindowLongPtr failed: Invalid window handle.

2018-05-17 Thread Nicola Fontana
Il Wed, 16 May 2018 02:40:44 + songqing shan scrisse: > Hello, > > > I am learning GTK and developing a small application, which uses gtktextview > widget. > > In my application, I compile it well. When running it, clicking the texview > and "Gdk-WARNING **:

Re: PyGObject Maybe bug with alternate row colors in a Gt.TreeView

2018-05-16 Thread Reuben Rissler
On 05/16/2018 01:51 PM, Eric Cashon via gtk-app-devel-list wrote: The following gives an error if I use "cell-background" which is stated in the documentation. Maybe just a typo someplace but "cell_background" seems to work fine for binding the color column to the cell-background property.

Re: PyGObject Maybe bug with alternate row colors in a Gt.TreeView

2018-05-16 Thread Eric Cashon via gtk-app-devel-list
I took a look at the stackoverflow discussion about this and there is some sample code there to change colors of individual records in the treeview list. You can no longer do even and odd colors in CSS but being able to connect a cell renderer property to a column value can be very useful.

Re: gtk_init() command-line args

2018-05-16 Thread rbd
Hi Michael, Thanks very much for the reference! Looks like all of the arguments of interest to gtk begin with '--', so anything beginning with only a single '-' ought to be safe from gtk_init() harvesting. Roger On Wed, 16 May 2018, Michael Gratton wrote: On Wed, May 16, 2018 at 7:34 AM,

Re: gtk_init() command-line args

2018-05-15 Thread Michael Gratton
On Wed, May 16, 2018 at 7:34 AM, rbd wrote: Can someone point me to an official gtk3 documentation source which clearly lists all of the command-line arguments parsed and then stripped from argv[] by gtk_init()? The "Running and debugging GTK+ Applications" document is

Re: PyGObject Maybe bug with alternate row colors in a Gt.TreeView

2018-05-15 Thread Emmanuele Bassi
On Tue, 15 May 2018 at 21:19, wrote: > Thank you for the link. > > On 2018-05-15 15:01 Emmanuele Bassi wrote: > > - the CSS "regions" were problematic for the whole theming system, > > so they were removed before we made the CSS selectors stable > > -

Re: PyGObject Maybe bug with alternate row colors in a Gt.TreeView

2018-05-15 Thread c.buhtz
Thank you for the link. On 2018-05-15 15:01 Emmanuele Bassi wrote: > - the CSS "regions" were problematic for the whole theming system, > so they were removed before we made the CSS selectors stable > - GtkTreeView does not use widgets, so CSS selectors do not > typically

Re: PyGObject Maybe bug with alternate row colors in a Gt.TreeView

2018-05-15 Thread Emmanuele Bassi
Hi; On 11 May 2018 at 21:57, wrote: > Please see this StackOverflow question. > https://stackoverflow.com/q/50281987/4865723 > > Is there an official bug about setup alternate (even & odd) row colors > with CSS in a Gtk.TreeView? > No, not any more. > Can someone give a

Re: PyGObject Maybe bug with alternate row colors in a Gt.TreeView

2018-05-15 Thread c.buhtz
Does know one of you have an idea about it or more detailed informations. I also don't know if it is a bug or if I am doing something wrong. My problem is I don't know to much about CSS. On 2018-05-11 22:57 wrote: > Please see this StackOverflow question. >

Re: IDE to develop app with GTK3 on windows using MSYS2

2018-05-14 Thread arkkimede
I agree with you!. I started to work in 1991 where my terminal was a VT100 with green phosphors with input only the keyboard and OS unix. No graphics, no windows, no mouse. I worked for several years in this condition using only vi (not vim) and little bash scripts to compile the source code. Now,

Re: IDE to develop app with GTK3 on windows using MSYS2

2018-05-14 Thread Lucky B.C
Hi, I only use *vim* + *cmake* + *git* for developing my open source projects. There's no reason for me to use IDEs, why? My laptop is not strong enough run any IDE. Tips: + *CMake* is a great idea to help us compiling C source files in any platform. + *Git* is a version control system. + *Vim*

Re: PyGObject: cell_data_func or own Renderer for date column?

2018-05-11 Thread c.buhtz
>     do_render(self, cr, widget, bg_area, cell_area, flags): >     # implement your own rendering here How do I "render"? I have no idea about it. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org

Re: PyGObject: Which types accepted in a Gtk.ListStore

2018-05-11 Thread c.buhtz
> However, if I remember correctly, in the bindings several native > python types like int, float and str are mapped to GObject types > automatically. What exactly is "mapped" to GObject here? ___ gtk-app-devel-list mailing list

Re: gtk_file_chooser_dialog in windows - hot to enable network places

2018-05-11 Thread Luca Bacci
Anyway GtkFileChooser uses GIO and GVFS , which supports many protocols , including SMB. It's very likely that GtkFileChooser is able to browse network shares on Windows. Do you use MSYS2 or vcpkg? 2018-05-11

Re: gtk_file_chooser_dialog in windows - hot to enable network places

2018-05-11 Thread Luca Bacci
Maybe you can try GtkFileChooserNative You should be able to select network locations with that. Luca 2018-05-11 13:16 GMT+02:00 Wojciech Puchar : > nobody program for windows? > > > > >

Re: PyGObject: cell_data_func or own Renderer for date column?

2018-05-11 Thread infirit
Op 10-05-18 om 00:06 schreef c.bu...@posteo.jp: > I want to have a date column in a Gtk.ListView. The field in the model > is a real "datetime.date". Based on that the content of the column > could display this: > > "2018-05-07" > "2 days ago" > "this week" > "7th May" > "7. Mai '18"

Re: PyGObject: Which types accepted in a Gtk.ListStore

2018-05-11 Thread infirit
Op 09-05-18 om 23:50 schreef c.bu...@posteo.jp: > From the api-reference here > > > it is unclear for me what types are accepted for the columns. > The parameter "*column_types" is not explained. > Quoting from the

Re: PyGObject: Spinner as content of a TreeView cell

2018-05-09 Thread c.buhtz
On 2018-05-09 22:52 wrote: > Does anyone see a way to draw/insert a Gtk.Spinner (or any other > Gtk.Widget) in a cell of a Gtk.TreeView? Oh, there is a CellRendererSpinner for it! :) An example can be found here

Re: [PyGObject] TreeView: Empty integer field or right aligned string

2018-05-09 Thread Luca Bacci
in python you can do def cell_data_func(self, tree_column, cell, tree_model, iter, data): if tree_column is self.col_a: # code else if tree_column is self.col_b: # code see How do I check if two variables reference the same object in Python?

Re: [PyGObject] TreeView: Empty integer field or right aligned string

2018-05-08 Thread c.buhtz
On 2018-05-08 14:20 Luca Bacci wrote: >- Use Cell Data Func for ultimate flexibility That is the signature Gtk.TreeCellDataFunc(tree_column, cell, tree_model, iter, data) But how do I know which cell (row and column) is affected? I can extrat the row with

Re: [PyGObject] TreeView: Empty integer field or right aligned string

2018-05-08 Thread Luca Bacci
To have empty int cells, you can either - use strings, instead of ints, in ListStore as you said - make place for a third value in ListStore, of type bool, and control the "visible" property of the first Cell Renderer with it (see code below) - Use Cell Data Func for ultimate

Re: [PyGObject] TreeView: Empty integer field or right aligned string

2018-05-08 Thread Luca Bacci
Hello! You can achieve what you want with the "xalign" property of CellRenderers col_b = Gtk.TreeViewColumn('str', Gtk.CellRendererText(xalign=1), text=1) xalign takes a value between 0 and 1. xalign=0 -> left-justified xalign=1 ->

Re: IDE to develop app with GTK3 on windows using MSYS2

2018-05-07 Thread Matthew A. Postiff
Have you tried https://www.kdevelop.org/? I have been using it lately and like it for code editing and compilation both on Linux and Windows. It provides more info about the source code than emacs tags does. I haven't gotten the hang of debugging with KDevelop, so I still debug in

Re: IDE to develop app with GTK3 on windows using MSYS2

2018-05-07 Thread Nicola Fontana
Il Mon, 7 May 2018 09:30:13 +0200 arkkimede scrisse: > ... > Now I would migrate on WIndows 10 by means of MSYS2. > > There is an IDE (better if open source) that I can use instean to follow to > use vi? > ... Hi, it seems to me a step backward: nothing can beat a

Re: IDE to develop app with GTK3 on windows using MSYS2

2018-05-07 Thread Dov Grobgeld
Why don't you cross compile from Linux to Windows? I have for years maintained several gtk based applications, including the building of installers for windows through make-nsis, and done everything from Linux. Regards, Dov On Mon, May 7, 2018 at 10:30 AM, arkkimede wrote:

Re: IDE to develop app with GTK3 on windows using MSYS2

2018-05-07 Thread Igor Chetverovod
For GTK app development I am using Qt Creator (community edition) for Linux and Win.   Also it has vi mode. Отправлено с моего смартфона BlackBerry 10.   Исходное сообщение   От: arkkimede Отправлено: понедельник, 7 мая 2018 г., 10:30 Кому: gtk-app-devel-list list Тема: IDE to develop app with

Re: GtkRevealer glitches the text view drawing

2018-05-04 Thread Nicola Fontana
Il Fri, 4 May 2018 14:19:42 +0300 Marius Gedminas scrisse: > ... > I've checked https://gitlab.gnome.org/GNOME/gtk/issues briefly but > couldn't find an existing bug, so perhaps nobody has reported it > upstream. Hi, I think this bus is #710888 [1] that is already fixed in

Re: GtkRevealer glitches the text view drawing

2018-05-04 Thread pspgen
True that it worths trying queueing a resize. That's why I tried this before and unfortunatelly didn't fix it. In fact, I queued draw too. What I will try now is hide the widget and then show it - П.П. Искаш да разшириш бизнеса си и онлайн? Лесно е! Направи си

Re: GtkRevealer glitches the text view drawing

2018-05-04 Thread infirit
Op 04-05-18 om 14:55 schreef psp...@mail.bg: > Right now, what I can do is come up with a way to avoid this. I have seen strange things with the GtkInfoBar as well. After hiding and showing it ended up with a negative size which the rest of my app didn't like very much. I worked around it by

Re: GtkRevealer glitches the text view drawing

2018-05-04 Thread Marius Gedminas
On Fri, May 04, 2018 at 09:25:44AM -, psp...@mail.bg wrote: > During the development of my program I came across one drawing glitch that > I was unable to solve. I am using GtkRevealer to show and hide a GtkInfoBar > above another box holding a scrolled window with a GtkTextView (actually >

Re: ANNOUNCE: Completion of migration to GitLab for GTK

2018-05-03 Thread Emmanuele Bassi
Hi all; the migration is now complete, and you should find all the open issues on GitLab: https://gitlab.gnome.org/GNOME/gtk/issues Thanks for your patience. Ciao, Emmanuele. On 1 May 2018 at 09:24, Emmanuele Bassi wrote: > Hi all; > > in the past few months we've

Re: Need help in GTK3 Draw event

2018-04-30 Thread Marius Gedminas
On Thu, Apr 26, 2018 at 10:53:00AM +0530, Dhrubajyoti Doley wrote: > I am developing an application where I have to show/draw whitespaces, tabs > and enter. Perhaps GtkSourceView could be useful here? It can already draw whitespace (and a lot of other things).

Re: Need help in GTK3 Draw event

2018-04-28 Thread Eric Cashon via gtk-app-devel-list
Hi Dhrubajyoti, The textview widget has text tags built in that you can use to draw rectangles around text. If you want to draw a rectangle to block out text you can match the background and foreground colors. This code works on Ubuntu16.04, GTK3.18 and Python2.7. Give it a try and see

Re: Using Gtk.Builder to create a menubar.

2018-04-27 Thread Luca Bacci
Yes, actions get a prefix depending on where you put them. Every "action container" has a prefix. In your case you add_action() to GtkApplicationWindow and its prefix is "win" I used your code to create an answer to my StackOverflow question > https://stackoverflow.com/a/50051155/4865723 >

Re: Using Gtk.Builder to create a menubar.

2018-04-27 Thread Marius Gedminas
On Thu, Apr 26, 2018 at 09:46:57PM +0200, c.bu...@posteo.jp wrote: > Thank you very much. Your example works for me but I don't understand > why. ;) > > > win.bar > > > action_bar = Gio.SimpleAction.new('bar', None) > > The name of the action in the XML and the code is

Re: Using Gtk.Builder to create a menubar.

2018-04-26 Thread c.buhtz
On 2018-04-26 18:10 Luca Bacci wrote: > Hi, I did test it out, here's a working version: I used your code to create an answer to my StackOverflow question https://stackoverflow.com/a/50051155/4865723 ___ gtk-app-devel-list

Re: Using Gtk.Builder to create a menubar.

2018-04-26 Thread c.buhtz
Thank you very much. Your example works for me but I don't understand why. ;) > win.bar > action_bar = Gio.SimpleAction.new('bar', None) The name of the action in the XML and the code is different. Why? What is the system behind it?

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