It could be a problem with the double buffering.
gtk_widget_set_double_buffered()
Try to set that to false and see if that makes any difference. This is on
Linux? Usually you don't need this function any more and it is deprecated but
it can sometimes still be useful. I know to get gnuplot pict
You can create your own widgets to look and work like you want with GTK+. There
is a good example on the gtkmm tutorial which is worth looking at if you are
interested in doing this. It also shows a little on how you can use CSS to set
some properties on your new widget.
https://developer.gnom
My guess is that it has something to do with how GTK is drawing. Look at the
double buffered reference.
https://developer.gnome.org/gtk3/stable/GtkWidget.html#gtk-widget-set-double-buffered
For drawing transparent backgrounds GTK changed something in the drawing code
in 3.10. When I was usi
Hi Roger,
Would this be similar to using a GtkLayout and a GtkDrawingArea? If you add a
drawing area to a layout you get draw scrolling and the layout can update the
part of the drawing area shown on the screen even though the drawing might be
on a larger area.
Eric
-Original Mes
I like the gtk_dialog_get_action_area() function. It makes it easy to set
something like the border width of the container.
action_area=gtk_dialog_get_action_area(GTK_DIALOG(dialog));
gtk_container_set_border_width(GTK_CONTAINER(action_area), 20);
Maybe no big deal and can be done
Hi Emmanuele,
I see the style property "action-area-border" in the documentation for the
Dialog. Still learning how to use CSS effectively and am using GTK3.18
currently which has a different CSS syntax than the newer GTK versions. Figure
I will still use a few deprecated functions so I do
Hi Roger,
A little while back I was testing something similar with
g_spawn_async_with_pipes(). It is neither mission-critical or meticulous but
something I was just testing for the possible use with gnuplot. There is a
driver.c and a worker.c program. The driver spawns the worker and sets up
In GTK3 you would have everything that you need. The
gtk_text_iter_forward_search() function can use
GTK_TEXT_SEARCH_CASE_INSENSITIVE. I don't see that in GTK2.
Another thought. The GTK Source View can find words and highlight them for you.
You might want to check that out also. It has some s
Hi Roger,
I put together a test example of GSubprocess. It starts Gnuplot, sets up the
pipes and callbacks, and then when Gnuplot is done it opens the graph in an
image widget. The GSubprocess will take care of the file descripters for you.
Also, if I run valgrind with multiple plots being c
I worked on this a little more and tried to make it UTF-8 compliant.
Highlighted the text also. It should still be efficient since it is only doing
a single pass over each char. I am sure there are things that I haven't
considered but it does a little more than the first try at it.
https://
Hi Norbert,
I hit the reply instead of reply all on the first send. Try again.
There is some information about printing at
https://developer.gnome.org/gtkmm-tutorial/stable/chapter-printing.html.en
It is in C++ but the C++ tutorial is very good. Sometimes I go there to figure
out how to do
I didn't get to the paper size setup there. Just tried to make sense out of
getting text to print on multiple pages as simply as possible. I don't have a
printer that I can test with either so I am no help there.
Printing is difficult. You can draw easy enough on a drawing area but then to
Hi Jeff,
For this you need the private data of the entry completion to get it to work.
That means looking around the GTK source and seeing how you might put something
together. Of course, it is not recommended to use something that can be changed
at anytime by the GTK developers. So... I gave i
David,
I asked a question about this on the gtk-devel-list
https://mail.gnome.org/archives/gtk-devel-list/2017-January/msg00018.html
last month. A lot I didn't know about this. For UTF-8 it is a bit complicated
even for English. For GTK's case in-sensitive search they use a casefold
function
Hi David,
I tried out gtkedit and it compiled and worked fine. Did a few searches and
it found the words.
When I compiled I got a few warnings like the following.
gtk_common_dlg.c: In function ‘err_dialog’:
gtk_common_dlg.c:8:9: warning: format not a string literal and no format
arg
Hi John,
Give this a try. It might be close to what you are after.
Eric
#!/usr/bin/python
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk, Gdk
class MainWindow(Gtk.Window):
def __init__(self):
Gtk.Window.__init__(self, title="Menu Popup")
If the default progress bar in GTK isn't what you are looking for then you can
always make your own. You can design it how you want easy enough with a drawing
area. With GTK3 you have OpenGL, Cairo, gradients, tensor-product patch meshes,
etc. to draw with. You even have a frame clock for smo
Hi Ruben,
Consider using a drawing area and GTK3. There are more drawing and graphical
capabilities in GTK3. Going forward to GTK4 I expect even more drawing
capabilities since every computer sold these days has a gpu and the software
can take advantage of that.
With a drawing area you get b
Hi Mike,
Have you looked at using a thread pool?
https://developer.gnome.org/glib/stable/glib-Thread-Pools.html
If you have a folder full of files that you want to transcode you can set up
your thread pool to cycle through them.
Eric
___
gtk-app
The layout is similar to a drawing area. Set up your "draw" callback and draw
what you like. You can put your pictures in there also and be able to scroll
them easily.
/*
gcc -Wall layout1.c -o layout1 `pkg-config --cflags --libs gtk+-3.0`
Tested on Ubuntu16.04 and GTK3.18
*/
#incl
Hi Chris,
Try getting the font height and base the textview height on that. If you use
the font ascent you might have to pad it a little but it should give you a
consistent value to size your textviews with based on font size.
Eric
/*
gcc -Wall textview_height1.c -o textview_height1 `p
Some follow up on this. If you are starting a separate process to run your
transcoding you need to use an async version of your run_cmd(). Otherwise the
program will wait until the function returns and bind up the main glib thread
if the function takes a while. This might be the easiest way t
Hi Marcin,
One approach is to use a GtkOverlay. Draw the shape on the top and then save
the coordinates of the shape if it is what you want. Then you can draw the
saved shapes on the lower drawing area.
https://github.com/cecashon/OrderedSetVelociRaptor/blob/master/Misc/cairo_drawings/draw_re
Hi David,
Not sure about this one. I tested some code out to see if I could figure it
out. Had the same problem that you had with the "changed" signal not being
blocked. If I change the rate of the file monitor and try to spool out the
events, I can block the "changed" signal. Not something
Hi Thomas,
You can try getting the private toggle button in the combo box. This isn't a
solution using the given GTK api but if you want to inspect the how to get the
"focus-in-event" to work with a combo box, this might be helpful. You are
working in C right?
Eric
/*
gcc -Wall combo_f
Thomas,
Your original question looked easy. Connect the "focus-in-event" to the combo
box and everything will work fine. The "focus-in-event" works with other
widgets. So I tried it out. Couldn't get it to work. Tried changing some combo
box functions around and still couldn't get it to work.
Hi Nicola,
The "set-focus-child" on the container fires for the "focus-in-event" and
"focus-out-event". I forgot about those container functions though. You can get
the toggle button pointer from the container and set up your "focus-in-event".
That way there is no ugly business of using a priv
Another thing to give a try is just to set a boolean in the "set-focus-child"
callback. Not sure if this will always work. I think that it should.
I don't know the best workaround for the "focus-in-event" in a combo box. It
isn't obvious how to connect that signal for the combobox.
Eric
gbo
Hi Ruben,
I think what you are looking for is a C variadic function. Something that works
like g_object_set() with a Null terminated list of arguments.
Using dynamic glib containers might be a better choice. It is simpler to just
pass a single pointer with your user_data to functions which i
Hi Fujiwara,
The GtkBox is going to use the background window for it's color. The box just
does the layout. If you create a header bar from a box you will have to draw on
the background where your header bar is going to be. This can get a little
tricky to get the measurements that you need. A
I suspect
set_titlebar(header);
is causing the problem. If you remove that, then you will have a box that you
place in the main window. If it is a header bar box it will be below the
titlebar. The box itself is just doing the layout so it uses the window behind
it. You can draw on the win
Well I made a mess of that. I haven't worked with Vala and thought that looked
like C#. I have some time on the weekend so I will have to take a look at Vala
and run your code so I understand it better.
I can get the theme color with gtk_widget_get_style_context() if I have a
GtkHeaderBar. If
I gave it another try and "header" gtk_style_context_add_class() is
transparent. I can use "menu" and that returns a darker color that is used on
the title bar.
It is C again. I did get foo.vala output to foo.c. Too much stuff.
Eric
/*
gcc -Wall box1.c -o box1 `pkg-config --cflags --libs
If I use
gtk_style_context_add_class(context, "header");
The background drawn to the event box window is transparent on my computer. I
just used "menu" to test a different color from the theme but there are many
that you can test. The style classes are at the bottom of the documentation
page
Hi Richard,
It looks like how you add containers makes a difference in this case. Also the
window placement might have to be adjusted after the window is shown. Here is a
try at it.
Eric
//gcc -Wall adj1.c -o adj1 `pkg-config --cflags --libs gtk+-3.0`
//Tested on Ubuntu16.04 and GTK3.18
#in
Hi Rob,
The trick here is to use gtk_tree_model_filter_convert_iter_to_child_iter().
That will get the iter that you need. It will work the same on both GTK2 and
GTK3. You have to be a little careful with gtk_tree_model_foreach(). It is easy
to add nodes and then the function will check ever
Hi Augusto,
This doesn't use glade but it might help out. You can add a label and button to
a box and add it to the notebook tab. In the button "clicked" callback you can
us the notebook pointer if you need that variable. If you want to be able to
really customize the look and size of the bu
Hi infirit,
Give the hexpand a try and see if that works. It works for me on Python3.5 and
GTK3.18
Eric
...
halign=Gtk.Align.CENTER,
hexpand=True)
..
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.or
Hi Ruben,
I am sure you can do that with GTK and GStreamer. That way the code would be
portable across platforms.
I don't have any examples of using GStreamer to get video from an ip camera. I
have some test code that will show the video from the local webcam.
https://github.com/cecashon/Or
What version of GTK are you using?
It does work on my computer. The label expands and shrinks as the window
expands and shrinks and the label stops expanding at 012345678901234567... I
take that to be 20 chars if you start at 0 and include the three dots. The
tooltip shows the full string.
Hi Doug,
You can try using the "insert-text" callback to set your italics on the
inserted text. This is what I came up with to test. The signal is connected
after so that the update occurs first. Careful about not changing the location
iter also since there is a warning in the documentation
Here are a few things that might improve the above code a little. Use
gtk_button_set_focus_on_click(GTK_BUTTON(toggle1), FALSE);
instead of a grab. Also the global gboolean can be eliminated if you pass the
toggle button pointer to the "insert-text" callback. Then you can just use
if(gtk_tog
Another option is to look at the properties of the tags to get the information
that you need. This might work better than saving globals and matching pointers.
Eric
...
GSList *tlist=NULL;
GSList *next=NULL;
tlist=gtk_text_iter_get_tags(&start);
if(tlist!=NULL)
{
xt(p);
}while(next!=NULL);
}
else g_print("No Tag\n");
if(tlist!=NULL) g_slist_free(tlist);
...
-----Original Message-----
From: Eric Cashon via gtk-app-devel-list
To: dougm
Cc: gtk-app-devel-list
Sent: Tue, Jun 20, 2017 4:48 pm
Subject: Re: turn on italics
Hi Ruben,
You might consider allowing the gauge to expand with the window size. This
makes the gauge a lot more flexible. When drawing a gauge it is useful to get a
general coordinate drawing on screen that you can check your gauge drawing
with. Both cartesian coordinates and radial coordin
Hi Mike,
What part of the combo box are you trying to disable? If you want to filter
rows or columns you can set up a tree model filter to do so. Maybe something
like the following?
Eric
/*
gcc -Wall combo_filter1.c -o combo_filter1 `pkg-config --cflags --libs
gtk+-3.0`
Tested
Add an extra column to your list and use that to set your "sensitive" property
for the row.
Eric
/*
gcc -Wall combo_filter2.c -o combo_filter2 `pkg-config --cflags --libs
gtk+-3.0`
Tested on GTK3.18 and Ubuntu16.04
*/
#include
static void combo2_changed(GtkComboBox *combo2, gpoint
Hi Lihao,
If you set the socket color you will be OK. You won't have to worry about the
transparency of the plug, in that case.
For setting the transparency for the different windows you can try setting the
window, socket and plug widgets with the following. It worked on GTK3.18.
Couldn't g
It looks like both the plug and socket draw to the same window. That would mean
that you would have to draw your window background in both the plug and socket
"draw" callback functions. There is a plug2.c and socket2.c in the following
folder that sets the transparency on the different window
Hi Alex,
The OpenCV window_gtk.cpp isn't so simple. A lot of tough concepts there. For
example the code is written for compiling with both GTK2 and GTK3, makes use of
threads, creates a custom GTK widget, uses GTK OpenGL if it can, etc.
The GTK functions can only be called on the "main" thr
Hi Ferdinand,
You can also try putting the pixbuf in an image widget and that into an event
box.
Eric
//gcc -Wall right_click1.c -o right_click1 `pkg-config --cflags --libs gtk+-3.0`
#include
static GdkPixbuf* draw_a_pixbuf()
{
cairo_surface_t *surface=cairo_image_surface_create(CAIR
Hi Doug,
I made a bit of a pointer mess there. Not the best of answers or way to go
about iterating through a list. Looking at some GTK code, this is better done
with a for loop. As usual, you don't want to move the pointer you get from
gtk_text_iter_get_tags() and then free it. This will
Have you tried gtk_text_buffer_insert_with_tags_by_name() to insert text with a
tag at an iter?
What tag combo do you use to get the cursor to bounce around? If I test having
two indent tags on the same line, the first one applied wins out. This is what
I tested with.
Eric
/*
gcc -Wall mo
Hi Nicola,
This isn't pretty but it works.
There is a good read about the spin button at
https://blog.gtk.org/author/ebassi/
with Tim Bader on April 25, 2017. I don't know if you have seen that. My first
try was just to get the GdkWindow of the spin button but that gave me the main
window.
Hi Doug,
I would consider it a usability bug but not necessarily a textview widget bug.
If you add text, that doesn't have an indent tag, to the start of the line then
it doesn't get indented. I suppose you could check the whole line for an indent
tag but that would go against performance.
Hi Mike,
A GtkAssistant or even a GtkNotebook might work for your program. What database
are you using? There is an easy example of connecting to and getting data from
sqlite at
https://github.com/cecashon/OrderedSetVelociRaptor/blob/master/simple_sqlite_viewer.c
that might be helpful. You
Hi Ruben,
You can give the following a try and see if it helps. Basically you don't want
to bind up the "main" thread with a long running function and freeze your UI.
Eric
/*
gcc -Wall firmware1.c -o firmware1 `pkg-config --cflags --libs gtk+-3.0`
Tested on Ubuntu16.04 and GTK3.18
*/
#i
Could you use a GtkListBox? With a list box you can add a widget to the row and
connect the "enter-notify-event" and "leave-notify-event" signals. There is
example code for a list box at
https://blog.gtk.org/2017/06/01/drag-and-drop-in-lists-revisited/
It is drag and drop but you could chang
With a treeview you can try measuring your rows and figure out where your
cursor is in your treeview. Try the following out and see if it is of any help.
Eric
/*
With Ubuntu16.04 and GTK3.18.
gcc -Wall tree_row1.c -o tree_row1 `pkg-config --cflags --libs gtk+-3.0`
*/
#include
static
Hi Lars,
There are a few things that you can try to see if you can get the combo box to
format how you want it. The first is to create the combo with
gtk_combo_box_new_with_model(). That way you can setup your cell renderer and
be able to set properties of how the combo box is going to be rend
Hi Attila,
You have a print dialog and click on "Print to File" to save the contents to a
PDF file and that file is not being formatted correctly and isn't the same as
what is in the print preview?
I tried a small test program. It prints well to PDF with the extra lines. Does
this program
Hi Attila,
I don't know the internals of how Pango deals with the different fonts for
putting them on a layout. I have bumped into utf8_casefold() and
utf8_normalize() before so I know fonts can get complicated. Maybe someone with
more knowledge than I have about this can help. The first thi
Here is something else that might help. Try a monospace font to test with. If
you use a monospace font then your spacing should be kept correct. If I draw a
grid around the characters, monospace will hold the spacing to the 28x32 grid.
Eric
...
new_font = Pango.FontDescription("Monospace 20"
OK, you got me on the PDF. I don't know about that. I think a monospace font
will help though because they are easier to keep track of rows and columns
since all the characters are in the same sized rectangle. The Marburg font is
also in a constant sized rectangle. I don't know how to put to
Hi Attila,
The text buffer does return the correct number of chars with spaces. If I get a
char count on the lines with or without numbers it returns the correct number.
When I export to PDF the layout is the same as the print preview. When I test
with pdftotext then, as you say, it doesn't m
Hi Thomas,
What language are you using?
I think that the best tutorial for GTK+ right now is the gtkmm tutorial. They
have a section on printing.
https://developer.gnome.org/gtkmm-tutorial/stable/chapter-printing.html.en
If you aren't programming in C++ the tutorial still is a good resource
This is similar but just using GTK. You get the iters for the start and end of
the range that you want to tag and apply the tag to it.
Eric
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk
class TextBox(Gtk.TextView):
def __init__(self):
Gtk.TextView.__ini
Hi Franco,
I see "margin-left" is deprecated since version 3.12.
This might work. If you set the container margin of the grid and then
individually place your widgets in the locations that you want them,,,
hopefully no warnings. I don't get any warnings on GTK3.18. Will something like
this
Hi Sébastien,
If I try some test code... it should work. The code uses a grid instead of a
fixed container. Is this similar to what you have tried?
Eric
/*
gcc -Wall buttons1.c -o buttons1 `pkg-config --cflags --libs gtk+-3.0`
Tested with GTK3.18 on Ubuntu16.04
*/
#include
static void
Hi Sébastien,
An out of sync reply. I must have accidently deleted your last response after I
read it. Also I didn't notice there were two mailing lists referenced. Probably
just need the app dev list.
It looks like it is a bug that has been recently introduced. If I test, test.c
with thre
Thanks Matthias. I probably should have checked bugzilla first. Just rebuilt
GTK to version 3.22.26 and it works fine. There is no click through after
closing the expander.
Eric
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
h
Hi Richard,
This sounds similar to the problem Dino Aljević had in "Scrolled TreeView and
size allocation warnings" in this list in September?
I can get the warning
"(treeview4:3830): Gtk-WARNING **: Allocating size to GtkWindow 0x843e188
without calling gtk_widget_get_preferred_width/heigh
I found this bug for the scrollbar warning.
https://bugzilla.gnome.org/show_bug.cgi?id=769566
I don't know about the critical warning that you have or have a solution
figured out. I am not much help there.
Eric
___
gtk-app-devel-list mailing lis
Hi Kian,
Have you tried a GtkListBox for this? You can probably setup a scrolling window
in a row in a listbox.
https://blog.gtk.org/2017/06/01/drag-and-drop-in-lists-revisited/
Eric
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
ht
Hi Kian,
A list box is more flexible for allowing different widgets but the performance
might not be so good if you have a lot of rows. Don't have the numbers to show
that though.
You can put your individual widgets into a scrolled window if you want. The
scroll bars will show if the conte
Hi Phil,
You should be able to resize columns if you want. If you have set sizes of text
to display in the tree view and want to allocate sizes you can do that.
Eric
/*
Tested with Ubuntu16.04 and GTK3.18.
gcc -Wall tree_column1.c -o tree_column1 `pkg-config --cflags --libs
gtk+-3.
Try switching the sizing to what is needed. Something like
...
gint combo_id=gtk_combo_box_get_active(combo);
if(combo_id==0)
{
g_print("%i\n", gtk_tree_view_column_get_width(column2));
gtk_tree_view_column_set_sizing(GTK_TREE_VIEW_COLUMN(column2),
GTK_TREE_VIEW_COL
Hi Roger,
Not sure about your builder question and setting the width and height of the
drawing area there. For drawing lines though it looks like you are trying to
get the width and height of the GtkWindow instead of the drawing area. The
drawing area widget is passed to your "draw" callback
Hi Roger,
I spend a bit of time drawing with cairo and GTK. If I get a drawing to work
out then maybe merge it into a widget for reuse. Sort of a bunch of rough
drafts in
https://github.com/cecashon/OrderedSetVelociRaptor/tree/master/Misc/cairo_drawings
and then one back in Misc is some
Hi Kian
For effeciency, use one of the default cursors.
https://developer.gnome.org/gdk3/stable/gdk3-Cursors.html
If you want, you can try creating your own cursor with animation and using
that. I got this working on my netbook which isn't a very high powered computer
by todays standards
Hi Mike,
It looks like the new rows height isn't getting added to the adjustment. If the
height of the new row gets added to the upper value of the adjustment then the
last row of the list box can be shown when added. This is what I came up with
to test it out. Is this similar to what you ar
"
Is the issue that the widget is not yet drawn, so it size is not settled yet?
Total guesses: What about using g_signal_connect_after on size-allocate? Or
connecting to map-event signal on that widget? Or spinning on
gtk_events_pending() until all are done, then scroll down?
"
Hi Matthew
G
Hi Yannick,
You have some options here. You can set a priority with
https://developer.gnome.org/gtk3/stable/GtkStyleContext.html#gtk-style-context-add-provider
with CSS.
If you want to just stick with drawing in C, connect your "draw" handler for
the window. If you need a pixbuf you can use
There is a basic setup for the Gtk Application in Python here
https://developer.gnome.org/gnome-devel-demos/stable/hello-world.py.html.en
For C you can check
https://github.com/cecashon/OrderedSetVelociRaptor/blob/master/Misc/Csamples/gtk_app1.c
which has a menu but doesn't use builder wit
"1. It uses "QMenu" (from Gtk or Gio?) to build a menu structure. I would
prefere this way instead of an XML string. It should be possible
in Python, too? Gtk.Menu or Gio.Menu?"
My understanding of this is that the GMenu is used with the GtkApplication and
a GtkMenu is used with the "regular"
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 if
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.
Thanks Reuben,
An easy enough explanation.
Eric
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/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
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
__
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 gboolea
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 if
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 m
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 in
Give this a try. It creates a surface, draws on it and then returns the surface
so that it can be put in an image widget.
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk, Gdk
import cairo
class MainWindow(Gtk.Window):
def __init__(self):
Gtk.Window.__init
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.
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
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
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)
{
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`
1 - 100 of 110 matches
Mail list logo