Re: Setting the scroll position of a GtkTextView in GtkScrolledWindow after render

2019-04-08 Thread Stefan Salewski
On Mon, 2019-04-08 at 13:07 +, Andri Möll via gtk-app-devel-list wrote: > I can't figure out if it's me or something's amiss. I'm trying to > set > the scroll position after rendering a GtkTextView May that be still this old bug: https://picheta.me/articles/2013/08/gtk-plus--a-method-to-guar

Re: Reduce the size of a GtkScale indicator

2018-03-30 Thread Stefan Salewski
On Fri, 2018-03-30 at 22:25 +0200, Stefan Salewski wrote: > You may even name your widgets and then can set > CSS properties of single widgets. Like this: import gintro/[gtk, glib, gobject, gio] proc appActivate(app: Application) = let window = newApplicationWindow(app) let

Re: Reduce the size of a GtkScale indicator

2018-03-30 Thread Stefan Salewski
On Fri, 2018-03-30 at 21:01 +0200, Stefan Salewski wrote: > I have the impression there is no CSS property to make GtkScale > slider > smaller. Finally I have a working solution. The trick is, that we have to set margin also. Margin is negative in default, which does not work with tiny

Re: Reduce the size of a GtkScale indicator

2018-03-30 Thread Stefan Salewski
On Thu, 2018-03-29 at 21:50 +0200, Bas Wassink wrote: > I kinda figured I had to go the CSS route, I have the impression there is no CSS property to make GtkScale slider smaller. I did a few tests yesterday, without a result. But I have to admit that for my screen it is already small. Maybe Mr Bas

Re: Reduce the size of a GtkScale indicator

2018-03-29 Thread Stefan Salewski
On Thu, 2018-03-29 at 18:02 +0200, Bas Wassink wrote: > Any hints? https://developer.gnome.org/gtk3/stable/chap-css-overview.html grep -A100 GtkScale ~/.config/gtk-3.0/gtk-default.css Well, I do provide a colored label example at https://github.com/StefanSalewski/gintro Starting from that one,

Re: background color for GtkTreeView

2018-03-10 Thread Stefan Salewski
On Sat, 2018-03-10 at 14:26 +0100, codemusi...@gmail.com wrote: > Hi there, > > I'm trying to change the background-color of a GtkTreeView by adding > a > css provider with the following style set: > > treeview { background-color: #fffae1; } > > Unfortunately this has the effect that the row

Re: centered and right justified label in the same line.

2018-02-26 Thread Stefan Salewski
On Mon, 2018-02-26 at 09:16 +0100, Wojciech Puchar wrote: > How to do this in GTK 2. whatever i try i'm getting first label > centered > relative to space remaining after second label not to whole hbox. how > to > do this properly? > > That may be not that easy. Maybe try a hbox, which again c

Re: hints when keeping mouse cursor over widget

2018-02-23 Thread Stefan Salewski
On Fri, 2018-02-23 at 14:17 +0100, Wojciech Puchar wrote: > Gimp can do this so GTK can do this but i cannot find how. > > > How to turn off text hints (help) when mouse pointer hovers over the > widget? > See https://developer.gnome.org/gtk3/stable/GtkWidget.html#gtk-widget-set-tooltip-text

Re: gtkdialog maximum size

2017-09-13 Thread Stefan Salewski
On Wed, 2017-09-13 at 10:34 +, Rúben Rodrigues wrote: > Why are you saying that using a scrolled window with parts invisible > is  > not user frindly? Because the user has to scroll :-) Of course having a scrolled window with active scrollbars can be necessary -- when there is really more con

Re: gtkdialog maximum size

2017-09-13 Thread Stefan Salewski
On Wed, 2017-09-13 at 10:59 +0100, Emmanuele Bassi wrote: > Why are you using a GtkDialog? You should be using a GtkWindow for a > complex UI. > > Additionally, the size of a top-level is given by its contents, > unless > you specify a size yourself. If your UI is too big, you'll have to > arrange

Re: Show dialog after hide another

2017-09-09 Thread Stefan Salewski
On Fri, 2017-09-08 at 11:11 +, Rúben Rodrigues wrote: > Please!! > > Help.. Well, I guess what you want is displaying a message dialog without prior user actions. Maybe you can emit a signal to do that? I don't know, have never needed that. Maybe you can just modify your first dialog, displ

Re: Multi page widgets in Gtk

2017-09-03 Thread Stefan Salewski
On Sun, 2017-09-03 at 13:42 +0100, Mike Martin wrote: > For one of my apps I want to setup a multi page widget with next  > previous > navigation. Have you tried https://developer.gnome.org/gtk3/stable/GtkAssistant.html ___ gtk-app-devel-list mailing li

Re: Preferred height/width error message

2017-07-23 Thread Stefan Salewski
On Sun, 2017-07-23 at 17:46 +0100, Mike Martin wrote: > Gtk version 3.22 I see a similar message for evince pdf viewer whenever I use it since some months. But I have no idea for the reason unfortunately (evince:5623): Gtk-WARNING **: Allocating size to EvSidebar 0x12dd6c0 without calling gtk_wid

Re: Close button in GtkNotebook

2017-05-29 Thread Stefan Salewski
On Sun, 2017-05-28 at 16:08 -0300, Augusto Fraga Giachero wrote: > I've been playing with Glade and GtkNotebook for while, and I > couldn't > figure a way to enable the close button on the tabs I guess what you want is what gedit does with the tabs? The gedit code has been modified a few times in

Re: Input event reduction

2017-03-30 Thread Stefan Salewski
On Thu, 2017-03-30 at 10:21 +0100, Emmanuele Bassi wrote: > g_idle_add() or, better yet, g_main_context_invoke(). Thanks. While I can remember have read your explanations somewhere already, I really missed that g_main_context_invoke() function. ___ gtk-a

Re: Input event reduction

2017-03-30 Thread Stefan Salewski
On Thu, 2017-03-30 at 11:10 +0200, Nicola Fontana wrote: >  > > As said you can leverage the main loop and unroll yours, e.g.: > > gboolean my_idle_callback() > { > gint n; > for (n = 0; n < 100; ++n) { > ... > } > return FALSE; > } > > should become: > > gboolean my_unr

Re: Input event reduction

2017-03-30 Thread Stefan Salewski
On Thu, 2017-03-30 at 09:38 +0200, Stefan Salewski wrote: > Currently I wonder if the call of gtk3.mainIteration() inside the > idle > function is possible and if it would help updating the display. In my > first draft of the Nim toy chess I used something like this > > while

Re: Input event reduction

2017-03-30 Thread Stefan Salewski
On Wed, 2017-03-29 at 23:26 +0200, Nicola Fontana wrote: >  > > idle functions do *not* run in the background so if you don't > release the CPU you will experience what you described. > > AFAIK all the GMainLoop code is single-threaded hence, as a > consequence, you will block the UI whenever the

Re: Input event reduction

2017-03-29 Thread Stefan Salewski
On Wed, 2017-03-29 at 16:47 +0200, Stefan Salewski wrote: > On Wed, 2017-03-29 at 09:42 +0200, Stefan Salewski wrote: > > > > It is still the old problem: > > Well, after some thinking I have the feeling that it may work with > only > an idle function, so no separate

Re: Input event reduction

2017-03-29 Thread Stefan Salewski
On Wed, 2017-03-29 at 09:42 +0200, Stefan Salewski wrote: > It is still the old problem: Well, after some thinking I have the feeling that it may work with only an idle function, so no separate thread and message passing is necessary: The callback set a flag indicating that there is work to

Re: SpinButton size

2017-03-29 Thread Stefan Salewski
On Mon, 2017-03-27 at 14:23 +, Rúben Rodrigues wrote: > hi guysm > > it's possible to change size of spinbuttons? In touchscreen mode  > spinbutton are still small.. We can change it's size with css > provider? > >  That may be possible... I found some example code in gedit C sources for ch

Input event reduction

2017-03-29 Thread Stefan Salewski
Well, I think I have asked this already some years ago at gtk-list. (And I spent some hours experimenting with stuff like event_pending() and such, without success.) It is still the old problem: We have input events, for example keystrokes, and a function that can only process a few events per sec

Re: Re-drawing GtkDrawingArea surface on motion-notify-event

2017-03-22 Thread Stefan Salewski
On Sun, 2017-03-19 at 22:12 +, Marcin Kolny wrote: > I'd like to write very simple application for drawing lines. You can restrict all drawing operations to a rectangle enclosing your line. For each move with button pressed, fill that rectangle with background color and then draw the line with

Re: How to change GTK+3 label color dynamically

2017-03-16 Thread Stefan Salewski
On Thu, 2017-03-16 at 09:55 +, Rúben Rodrigues wrote: > Hi, > > THanks. This is dynamically? I need in c language if possible :S > > Thanks Yes. The example https://github.com/ngtk3/nim-gtk3/blob/master/test/colors.nim is dynamically, I used it to generate some color schemes. Entered color

Re: How to change GTK+3 label color dynamically

2017-03-16 Thread Stefan Salewski
On Wed, 2017-03-15 at 15:11 +, Rúben Rodrigues wrote: > Hi, > > Now i need to change GtkLabel color dinamically, so i thing that i > can't  > use Css to do this.. I do this in Gtk2: > > gtk_widget_modify_fg(GTK_WIDGET(gtk_builder_get_object(builder,"label > ")),GTK_STATE_NORMAL,  > &white); >

Re: Homogeneous table

2017-03-10 Thread Stefan Salewski
On Fri, 2017-03-10 at 10:32 +, Rúben Rodrigues wrote: > HI, > > Thanks for your reply. NExt i will change to gtk3, but i think that i > need to change many things.. It could be simple to make a homogeneous > table and hide images, unfortunately not.. I don't know exactly what you desire, but

Re: Gtk+ progress bar color

2017-03-08 Thread Stefan Salewski
On Wed, 2017-03-08 at 15:23 +, Emmanuele Bassi wrote: > Sorry, we haven't yet found the way to write a `gtk_do_what_i_mean()` > function. > > > But we have to tell them: We should not > > do that, it may be possible with CSS... So we have no Kids in GTK > for > > more than 10 years now, so so

Re: Gtk+ progress bar color

2017-03-08 Thread Stefan Salewski
On Wed, 2017-03-08 at 15:00 +, Rúben Rodrigues wrote: > Thanks for your help... Yes i don't understand why gtk doesn't aloow > us  > to do some "basic" things.. Well, the GTK senior developers will say that such "color hacks" are ugly and do not fit theming well. That may be true. But the Prob

Re: Gtk+ progress bar color

2017-03-08 Thread Stefan Salewski
On Wed, 2017-03-08 at 15:52 +0100, Stefan Salewski wrote: > On Wed, 2017-03-08 at 14:18 +, Rúben Rodrigues wrote: > > > > I asked to the Google before, but he don't give me nothing about > > this  > > :-). PRELIGHT doesn't work too.. > >  Well, t

Re: Gtk+ progress bar color

2017-03-08 Thread Stefan Salewski
On Wed, 2017-03-08 at 14:18 +, Rúben Rodrigues wrote: > I asked to the Google before, but he don't give me nothing about > this  > :-). PRELIGHT doesn't work too.. Yes, you are right. I just took this example: https://www.spinics.net/lists/gtk/msg00686.html //gcc -o simple t.c `pkg-config -

Re: Gtk+ progress bar color

2017-03-08 Thread Stefan Salewski
On Wed, 2017-03-08 at 13:30 +, Rúben Rodrigues wrote: > Yes, doesn't work for me..  Because: > > gtk_widget_modify_bg(GTK_WIDGET(gtk_builder_get_object(builder,"Menu_ > Birds_ProgressBr")),GTK_STATE_NORMAL,  > &red); > > This changed background color, and this > >   > gtk_widget_modify_fg(GT

Re: Gtk+ progress bar color

2017-03-08 Thread Stefan Salewski
On Wed, 2017-03-08 at 12:29 +, Rúben Rodrigues wrote: > Hi, > > Thanks. Yes i want to change in gtk 2.x and change it in my app > only.  > There's no way in proprieties? Do the ordinary GTK2 functions not work for your case? Like gtk_widget_modify_fg() and gtk_widget_modify_bg() https://dev

Re: Gtk+ progress bar color

2017-03-07 Thread Stefan Salewski
On Tue, 2017-03-07 at 15:43 +, Rúben Rodrigues wrote: > > > > Hi guys, > > > > How can i change progress bar color? > > > > Thanks > > > > For GTK 3.20 and above you can do it, using CSS. I did a similar fix for scrollbar width for my 27 inch 4 display. I think I wrote how I did it here

They broke the CSS custom color settings in 3.20

2016-11-12 Thread Stefan Salewski
You may know the Nim editor from https://github.com/ngtk3/NEd Getting tooltips with white background for a dark gtksourceview color scheme was already one of the harder task for GTK 3.18 -- but somehow I managed it. Recently I got GTK 3.20 and had to notice that setting background for tooltip doe

Re: Getting focus

2016-08-23 Thread Stefan Salewski
On Tue, 2016-08-23 at 00:38 +0200, rastersoft wrote: > It's not a problem of being early: I even tried to put a 1-second timer > to call to grab_focus(), but didn't work. > > In fact, the first time I create the window it works fine, but seems to > fail when I hide it and show it again. So it may

Re: Getting focus

2016-08-22 Thread Stefan Salewski
On Sun, 2016-08-21 at 21:56 +0200, rastersoft wrote: > I tried to > call "grab_focus" on the "map" callback... but doesn't work. The map signal may be too early. Maybe g_signal_connect_after() may work. After map signal map_event is emmited, maybe you can use that one. Or try the draw signal, I

Re: ‘gtk_widget_override_background_color’ is deprecated

2016-08-18 Thread Stefan Salewski
On Thu, 2016-08-18 at 22:21 +0200, rastersoft wrote: > Hi all: > > Gtk.Widget.override_background is deprecated. How should I replace it? I > read something about CSS, but not sure how to do it... > Yes, the effort is large unfortunately. Maybe you can continue using the deprecated functions.

Re: Nim GTK3 editor

2016-07-10 Thread Stefan Salewski
On Sun, 2016-07-10 at 15:54 +0200, Stefan Salewski wrote: > Maybe another one, but less important: I am using GSettings -- for > testing if the editor would work fine on a  fresh install, I would > like > to reset all modifications done by my program. OK, that was not too diff

Nim GTK3 editor

2016-07-10 Thread Stefan Salewski
Yesterday I pushed my Nim editor to github, see http://ssalewski.de/tmp/NEd.png https://github.com/ngtk3/NEd http://forum.nim-lang.org/t/2198 Lets try an easy question: I am using the font chooser button, which has default text (none) and later shows the name of the last opened file. For my use

Re: Application.activate not emitted when opening files.

2016-06-16 Thread Stefan Salewski
On Thu, 2016-06-16 at 20:12 +0200, Stefan Salewski wrote: > I will see if I can find some C code for testing... Well, looking at the C code of example10 is already enough: gtk+-3.20.1/examples/application10 exampleapp.c static void example_app_activate (GApplication *app) {   ExampleAppWin

Re: Application.activate not emitted when opening files.

2016-06-16 Thread Stefan Salewski
On Thu, 2016-06-16 at 14:44 -0300, Victor Aurélio Santos wrote: > > You may follow the example https://developer.gnome.org/gtk3/stable/ > ch01s04.html#id-1.2.3.12.5 > Look at application code, I think it's very like the example you give > me. > > > This way you are not concerned with signals that

Re: Application.activate not emitted when opening files.

2016-06-16 Thread Stefan Salewski
On Wed, 2016-06-15 at 12:42 -0300, Victor Aurélio Santos wrote: > where should i do application's > basic things like creating windows, setting-up basic things etc... You may follow the example https://developer.gnome.org/gtk3/stable/ch01s04.html#id-1.2.3.12.5 This way you are not concerned with

Re: GTK3 bindings for Nim language available

2016-04-22 Thread Stefan Salewski
On Mon, 2015-03-30 at 14:50 +0200, Stefan Salewski wrote: > We have some basic Nim GTK3 bindings available now, see > > https://github.com/StefanSalewski?tab=repositories Bindings for GTK 3.20 are available now, I created a new top level directory at github for the ten module

Re: How does one get the screen coordinates of the workspace?

2015-12-29 Thread Stefan Salewski
On Tue, 2015-12-29 at 17:26 -0500, Rick Berger wrote: > I'm looking for to get the screen coordinates, height and width of the > workspace on Ubuntu's desktop. The only way I see to doing this, is in > starting the app: maximize its window; get the workspace info from its > window's coordinates and

Re: set custom entry background?

2015-11-16 Thread Stefan Salewski
On Sun, 2015-11-15 at 19:30 -0500, Allin Cottrell wrote: > But how can I "undo" this? (I mean, make it so that the background > color for the selected state reverts to what it was before I messed > with it, for subsequent selections.) That's trivial with the old > APIs but I have no idea how it

Re: set custom entry background?

2015-11-15 Thread Stefan Salewski
On Sun, 2015-11-15 at 14:32 -0500, Allin Cottrell wrote: > I'm trying to set a custom background for a GtkEntry I think you have to use CSS -- unfortunately that is some work and I can not provide an example yet. See https://developer.gnome.org/gtk3/stable/GtkWidget.html#gtk-widget-overri de-back

Re: GtkComboBox signals

2015-10-28 Thread Stefan Salewski
On Sun, 2015-10-25 at 18:35 +0100, Pekka Riikonen wrote: > second one with "changed" signal on the combobox isn't because the > signal > is emitted also when typing into the entry. It effectively becomes > impossible to determine whether item was typed in or selected from the > list. OK, no ans

Re: TypeError in GtkWindow

2015-10-09 Thread Stefan Salewski
On Thu, 2015-10-08 at 22:05 -0300, Germán Racca wrote: > About "coor.run()", I have followed the exact steps in the official > PyGObject tutorial: > > https://python-gtk-3-tutorial.readthedocs.org/en/latest/dialogs.html#c > ustom-dialogs Good to know :-) Well, I do not know much about Python.

Re: Filechooserbuttons and gtk_widget_set_sensitive

2015-10-08 Thread Stefan Salewski
On Thu, 2015-10-08 at 14:04 +1030, Roger Matthews wrote: > To someone willing to help, Of course the file chooser example from the book of Andrew Krause does not really open a file. What should it open? A Video, a picture, a text? It shows you how you can get a file path, if I remember correctly.

Re: TypeError in GtkWindow

2015-10-08 Thread Stefan Salewski
On Thu, 2015-10-08 at 17:09 -0300, Germán Racca wrote: > --> 134 coor = Coor2MASS(self) I do not use Python, but that line seems to make no sense. Self is class TitleBar: but later you call resp = coor.run(). So I guess for coor you want something like a dialog, so you have to create it. _

Re: gtk_text_buffer_delete ?

2015-10-08 Thread Stefan Salewski
On Thu, 2015-10-08 at 10:30 +0200, Pierre Wieser wrote: > Oop's. Sorry ! I've clicked on the bad button !! Yes, it is sad that this trivial task is so hard, and that no one can really help. I was hoping that it could be possible to simple block input when buffer has a maximum length, but I got th

Re: gtk_text_buffer_delete ?

2015-10-07 Thread Stefan Salewski
On Wed, 2015-10-07 at 13:14 +0200, Pierre Wieser wrote: > I so connected to the 'changed' signal of the GtkTextBuffer, Maybe try connecting to insert-text signal -- changed signal may be emitted again when you delete. See http://stackoverflow.com/questions/2791035/how-do-i-set-buffer-limit-for -g

Re: gtk_text_buffer_delete ?

2015-10-07 Thread Stefan Salewski
On Wed, 2015-10-07 at 13:14 +0200, Pierre Wieser wrote: > Hello, > > On the application I'm currently working on [1], I want limit the size > of the > text entered in a GtkTextBuffer to those saved in the DBMS, so 4096 > chars. Seen that: http://www.gtkforums.com/viewtopic.php?t=1012 Very simi

Re: GTK3 on Windows 8.1: Touch Events Problem

2015-09-26 Thread Stefan Salewski
On Sat, 2015-09-26 at 19:15 +0100, Emmanuele Bassi wrote: > Hi; > > GTK 3.6 is not the latest version for Windows. We don't provide > binary > packages any more, but you can use the MSYS2 project to get a build > of the > latest stable version of GTK - one that is not hopelessly out of date > like

Re: A simple choice dialog won't work...

2015-05-07 Thread Stefan Salewski
On Thu, 2015-05-07 at 16:02 +0100, Richard Shann wrote: > After experimenting with a different bit of code, I think I've found > the > cause of the problem: doing the widget destroy by responding to the > "response" signal seems to be ruining the return value. That is interesting. Indeed I had a f

Re: A simple choice dialog won't work...

2015-05-07 Thread Stefan Salewski
On Thu, 2015-05-07 at 13:02 +0100, Richard Shann wrote: >From https://developer.gnome.org/gtk3/stable/GtkDialog.html GTK_RESPONSE_REJECT Generic response id, not used by GTK+ dialogs GTK_RESPONSE_ACCEPT Generic response id, not used by GTK+ dialogs Maybe try GTK_RESPONSE_OK and GTK_RESPONSE_CAN

Re: Help spinbuttons, Paulo Silva

2015-04-09 Thread Stefan Salewski
On Thu, 2015-04-09 at 23:17 +0930, Roger Matthews wrote: > Hi Paulo, or anybody else interested in helping, > I've read chapter 2 of Foundations of GTK+ Development concerning > signals and callback functions as suggested (see below) but am still > getting this error: Hello, I think you used wron

Re: gtk_widget_queue_draw_area much slower in gtk3 than gtk3

2015-03-30 Thread Stefan Salewski
On Mon, 2015-03-30 at 13:22 +0100, Emmanuele Bassi wrote: > * use the event history for the devices you're interested in > * disable motion event compression on the GdkWindow that you're using > to detect events, and build up the positions you will then draw > > Other painting applications opted

GTK3 bindings for Nim language available

2015-03-30 Thread Stefan Salewski
We have some basic Nim GTK3 bindings available now, see https://github.com/StefanSalewski?tab=repositories Of course this note is only for smart people interested in Nim language (http://nim-lang.org/) and GTK3 development. The bindings are not really high level -- there is no Nim Garbage-Collec

Re: gtk_widget_queue_draw_area much slower in gtk3 than gtk3

2015-03-30 Thread Stefan Salewski
On Sun, 2015-03-29 at 22:16 -0700, dmg wrote: > Hi there, > > I am one of the developers of xournal. Hello, if I understand correctly, your problem is, that shapes drawn on screen are not smooth. I can remember a related thread, see https://mail.gnome.org/archives/gtk-list/2014-August/thread.h

Re: Label with fixed size

2014-08-28 Thread Stefan Salewski
On Thu, 2014-08-28 at 18:14 +0200, rastersoft wrote: > Hi all: > > I need to create a label with a fixed size in pixels, and if the text is > too large, elipsize it. Is it possible? I tried nearly all kind of ways > and tricks (even capturing the size-allocate signal and adjust there the > maxi

Re: GTK application scene drawing

2014-08-03 Thread Stefan Salewski
On Sun, 2014-08-03 at 16:13 +0200, Stefan Salewski wrote: > A similar very basic "library" in C should be available somewhere OK -- found it. It was this thread https://mail.gnome.org/archives/gtk-app-devel-list/2014-June/msg00011.html and this was a reply mentioning the l

Re: GTK application scene drawing

2014-08-03 Thread Stefan Salewski
On Sun, 2014-08-03 at 11:20 +0530, Gurjot Singh Bhatti wrote: > > Your project looks nice. Is it open-source? Sure. It started as a proof of concept, to test my user interface ideas, and how fine Ruby, Cairo and GTK works together. Generally I am satisfied, but in the last years I have done mos

Re: GTK application scene drawing

2014-08-02 Thread Stefan Salewski
On Sun, 2014-08-03 at 00:21 +0530, Gurjot Singh Bhatti wrote: > This may have been asked many times already Yes, in the last years a have found a few similar questions with google, in most cases not with VERY helpful replies. I myself have used cairo with a GTK drawing area for my schematics tool

Re: GtkGrid sets no expand with homogeneous

2014-04-02 Thread Stefan Salewski
On Wed, 2014-04-02 at 19:40 +0900, Takao Fujiwara wrote: > I'd like to port GtkTable to GtkGrid but my cells show big widths. Have you considered this: https://developer.gnome.org/gtk3/stable/GtkGrid.html Description GtkGrid is a container which arranges its child widgets in rows and columns. It

Re: Re:Help replacing GtkDrawingArea with GtkLayout

2014-03-03 Thread Stefan Salewski
On Mon, 2014-03-03 at 15:17 +, Richard Shann wrote: > gtk_widget_show_all (window); > > GdkWindow *win = gtk_widget_get_window(layout); > g_print("win is %p initial mask 0x%x\n", win, > gdk_window_get_events (win)); > gdk_window_set_events (win, gdk_window_get_events (win) | >

Re: Re:Help replacing GtkDrawingArea with GtkLayout

2014-03-03 Thread Stefan Salewski
On Mon, 2014-03-03 at 15:17 +, Richard Shann wrote: > I have constructed the following minimal example, Yes indeed, https://developer.gnome.org/gtk3/stable/GtkWidget.html#gtk-widget-set-events >This function must be called while a widget is unrealized. __

Re: Mouse events on a Cairo Context

2013-07-01 Thread Stefan Salewski
On Mon, 2013-07-01 at 17:42 +0200, Borja Mon Serrano wrote: > > The problem with (4) is drag&drop. I think it could be very difficult to > deal with it, so I'm going to try the third solution, with goocanvasmm. Do > you know any example of use of goocanvasmm? > Yes, drag&drop may be not very ea

Re: Hiding scrollbars for GtkScrolledWindow

2013-06-09 Thread Stefan Salewski
when I have more time. Best regards Stefan Salewski ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Re: Hiding scrollbars for GtkScrolledWindow

2013-06-07 Thread Stefan Salewski
On Fri, 2013-06-07 at 19:05 +0200, Felix Möller wrote: > Sorry for being unprecise. > GTK3 in combination with C. > > If I set the scrollbars' policy to never, the scrollbar is not > displayed, but the window is not as small as it should be, but as big as > its content. I want it to have the same

Re: Hiding scrollbars for GtkScrolledWindow

2013-06-07 Thread Stefan Salewski
On Fri, 2013-06-07 at 10:13 +0200, Felix Möller wrote: > Hey there, > I'm trying to use a GtkScrolledWindow with the capability of scrolling, > but not displaying scroll bars GTK3 or GTK2? Called from C or Python? This may help: https://developer.gnome.org/gtk3/stable/GtkScrolledWindow.html#gtk-

Re: Handle "Enter" pressing at GtkEntry

2012-10-03 Thread Stefan Salewski
On Wed, 2012-10-03 at 20:18 +0200, David Nečas wrote: > On Wed, Oct 03, 2012 at 09:42:24AM -0500, Yury Alyaev wrote: > > What is the right way to catch "Enter" pressing at the end of the > > text input to GtkEntry. The obvious way is conecting the callback to > > the "activate" signal, but for some

Re: learning GtkLayout, drawing a widget on it.

2012-08-20 Thread Stefan Salewski
On Mon, 2012-08-20 at 03:09 +0200, ben wrote: > Hello list, > > It may be a basic and common question, but i dare to ask... > > I began to write a custom widget, subclassing GtkDrawingArea, An alternative approach may be to just use a GTK drawing area with cairo drawing operations as I did http

Re: GtkDrawingArea size

2012-03-07 Thread Stefan Salewski
On Wed, 2012-03-07 at 09:44 -0900, Christopher Howard wrote: X > > Bump. > > I'm trying to look through some other projects to see how this is done, > but I would appreciate it if anyone happens to know of the top of their > head. I guess you can have a drawingarea of fixed size if you put it in

Arrow speed (tic rate) of scrollbar widgets

2012-03-02 Thread Stefan Salewski
widget (the second from top on the right) the slider moves soft but slow. I know I can use middle or right mouse button for larger steps, but I want a faster smooth scroll. ( I guess what I need is a higher event rate, the default seems to be limited to 10 per second.) Best regards Stefan

Re: TreeView tooltip use immediate control

2012-02-04 Thread Stefan Salewski
On Sat, 2012-02-04 at 00:01 +0100, David Nečas wrote: > On Fri, Feb 03, 2012 at 11:36:13PM +0100, Stefan Salewski wrote: > > How can I immediately activate or deactivate tooltips for all TreeView > > widgets on user action, i.e. menu operation. > > You can enable/disable a

Re: TreeView tooltip use immediate control

2012-02-03 Thread Stefan Salewski
On Sat, 2012-02-04 at 00:01 +0100, David Nečas wrote: > On Fri, Feb 03, 2012 at 11:36:13PM +0100, Stefan Salewski wrote: > > How can I immediately activate or deactivate tooltips for all TreeView > > widgets on user action, i.e. menu operation. > > You can enable/disable a

TreeView tooltip use immediate control

2012-02-03 Thread Stefan Salewski
emit an event myself, when user wants to toggle tooltip display? I have no idea currently. Thanks, Stefan Salewski ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Re: GTK+ TreeView: Different CellRenderers on the same Column

2011-10-17 Thread Stefan Salewski
tion of > Geany's stash editor [2], [3]. > Thanks, that sound very promising and not too difficult. I was aware that I can pack multiple renderer in the same tree view column, but I was not aware that I can hide them totally using a cell_data_func. Be

GTK+ TreeView: Different CellRenderers on the same Column

2011-10-17 Thread Stefan Salewski
difficult to use the above solution.) Is there a better solution or even an example available? Best Regards, Stefan Salewski ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Re: Cairo, Gtk+, Gdk & GdkPixbuf -- making a pixel-based backing store for vector graphics

2011-06-14 Thread Stefan Salewski
On Tue, 2011-06-14 at 14:30 -0600, James Tappin wrote: > I would like to be able to make a code that draws some (possibly very > complex) vector graphics, A better place for asking may be the cairo mailing list? At least there was some discussion about such tasks in the past. One recommended way

Re: Window styles

2011-05-26 Thread Stefan Salewski
On Thu, 2011-05-26 at 18:14 +0100, John Emmas wrote: > Using gtk_window_new() will create a window which the user can re-size > and maximize. I don't want my user to be able to perform these > actions. In my old Win32 days I'd achieve it by creating a window, > then removing the styles WS_THICKFR

How to avoid POINTER_MOTION events for not active windows?

2011-03-10 Thread Stefan Salewski
motion events whenever the mouse pointer is over/in my drawing area, even when the window containing that drawing area is not active. This was surprising for me. I want events only when the window is the active one. What is the correct method to achieve that behavior? Thanks, Stefan Salewski