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 pointer to a Cairo pattern Cairo::RefPtr
pattern_;

4 execute pattern_ = get_source();

5. Execute the following code.

    Cairo::Format format = Cairo::FORMAT_RGB24;
    Cairo::RefPtr image_surf_ptr =
Cairo::ImageSurface::create(format, width, height);
    Cairo::RefPtr< Cairo::Context > image_context_ptr_ =
Cairo::Context::create (image_surf_ptr);
    image_context_ptr_->set_source_rgb(0.9, 0.9, 0.9);
    image_context_ptr_->paint();
    image_context_ptr_->set_source(pattern_);
    image_context_ptr_->paint();
    image_surf_ptr->write_to_png("test.png");

I am not sure that the center two lines are necessary.  And you have to
get the height and width of your image to use in line 2.
But maybe this will give you some ideas.

For capturing events, I enclose my image area in a Gtk::EventBox and set
events on the eventbox
add_events(Gdk::EXPOSURE_MASK|
     Gdk::BUTTON_PRESS_MASK|
     Gdk::BUTTON_RELEASE_MASK|
     Gdk::POINTER_MOTION_MASK|
     Gdk::POINTER_MOTION_HINT_MASK|
     Gdk::ENTER_NOTIFY_MASK|
     Gdk::LEAVE_NOTIFY_MASK);
Then you can intercept events on that box and what it contains.

Hope this helps.
jim...


On 07/02/2018 01:11 PM, Johannes Bauer wrote:
> Hey list,
>
> 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.
>
> I'm having two issues: The more pressing one is that I cannot seem to
> figure out how to capute mouse events on my GtkGLArea. I've tried a
> bunch of different settings, enabled all events, played with can
> focus/can default/receives default and hooked button-press-event,
> drag-begin, enter-notify-event, event, key-press-event,
> motion-notify-event, etc -- none of which fire. They seem to be caught
> by the main window (I testwise hooked those for the main window). But I
> want to receive coordinates relative to the GL drawing area (obviously),
> but don't know what I'm doing wrong. The hierarchy is GtkWindow ->
> GtkBox -> GTKGLArea (if that matters). Any advice on how to set this up?
>
> Another question related to the GtkGLArea is that I would like to create
> a pixmap copy of a rendered image (to be able to save it as PNG, for
> example) -- is that at all possible?
>
> And thirdly (and completely independent), is it possible to have the
> rendered text of a GtkScale use markup? I want to show
> "10%.1f", but it only shows up as literal text, not
> interpreting the markup.
>
> Thanks for helping out!
> All the best,
> Joe
> ___
> gtk-app-devel-list mailing list
> gtk-app-devel-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Re: Glade crash

2017-03-09 Thread Jim Charlton

Pozz:

I see what you mean.  I observe exactly what you observe (glade-3.20 on 
Ubuntu-16.10).  I do note that if you add data back to the fan_store 
columns... then all three of the TreeViews come back as expected.


I have to admit that I am not an expert on glade use.  I was doing some 
debugging on earlier versions of glade when I saw your posting and 
thought that I would see if I could be of help.  But this is indeed 
strange and somewhat above my ability to debug.  Sorry.  If I do get 
some time... I will have another look but... it is a complicated GUI and 
one would have to pare it down to a much simpler case in order to get a 
better idea of why this is happening.


jim...


On 2017-03-06 01:39 AM, Pozz Pozz wrote:

Hello jim,

I tried with a virtual machine of Ubuntu (downloaded from osboxes.org 
<http://osboxes.org/>). It's Ubuntu 16.10. I installed Glade 3.20. The 
first[1] is the screenshot after opening the original .glade file. It 
seems ok (note the presence of one data row in fans_store ListStore 
and the rendering of three TreeView at the top).


After deleting the data row, Glade under Ubuntu doesn't crash. However 
there's a problem in the rendering. Now the three TreeView at the top 
aren't shown anymore. Take a look at this screenshot[2].


After the same operation, Glade 3.20 under Windows (installed through 
msys2) crashes.


[1] 
https://drive.google.com/file/d/0B1s7dNPGsJ3CYlRvNTltbU1NWDA/view?usp=sharing 
<https://drive.google.com/file/d/0B1s7dNPGsJ3CYlRvNTltbU1NWDA/view?usp=sharing>
[2] 
https://drive.google.com/file/d/0B1s7dNPGsJ3CZWdCZkR2R1pEUEU/view?usp=sharing 
<https://drive.google.com/file/d/0B1s7dNPGsJ3CZWdCZkR2R1pEUEU/view?usp=sharing>


2017-03-03 17:23 GMT+01:00 Jim Charlton <j...@jimc.falchion.com 
<mailto:j...@jimc.falchion.com>>:


I have no problem opening this file and deleting rows in the fan
store.  I am using glade-3.20 on Ubuntu-16.10 with gtk-3.20.

Notably, this file opens but does not display its contents
correctly when I try to open it with glade-3.19 on Ubuntu-16.04
with gtk-3.18 (although it does not crash).  So I assume you are
using glade-3.20 on Windows.  Based on my observations, I don't
think the problem is with glade unless you have a variant that is
different from mine (I tried both a version compiled from sources
and the version that comes from the Ubuntu repositories).

jim...



On 2017-03-03 05:20 AM, Pozz Pozz wrote:

Hello Dan,

you can download the glade file from this link

<https://drive.google.com/file/d/0B1s7dNPGsJ3CZllrOUVwNWw4TWM/view?usp=sharing

<https://drive.google.com/file/d/0B1s7dNPGsJ3CZllrOUVwNWw4TWM/view?usp=sharing>>
(

https://drive.google.com/file/d/0B1s7dNPGsJ3CZllrOUVwNWw4TWM/view?usp=sharing

<https://drive.google.com/file/d/0B1s7dNPGsJ3CZllrOUVwNWw4TWM/view?usp=sharing>


).


2017-03-03 4:10 GMT+01:00 Daniel Kasak <d.j.kasak...@gmail.com
<mailto:d.j.kasak...@gmail.com>>:

There is no attachment. Try sharing it a different way -
pastebin or
something.

Dan

On Wed, Mar 1, 2017 at 5:18 AM, pozzugno
<pozzu...@gmail.com <mailto:pozzu...@gmail.com>> wrote:

Most probably this isn't the most appropriate mailing
list, because I
think my issue is related to Glade (and not Gtk
libraries).

Attached is one of my graphical interface, designed
with Glade.
Unfortunately when Glade opens this file, it seems it
is very unstable if I
try to change something.

For example, let's try to delete the row in the
fans_store GtkListStore
object. Glade 3.20 will crash (at least in Windows).

Do you understand why? I tried many things, even
editing manually the
.glade file with a text-editor. Many times, Glade wil
crash during opening
the edited file.


___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
<mailto:gtk-app-devel-list@gnome.org>
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
<https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list>


___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org <mailto:gtk-app-devel-list@gnome.org>
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
<https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list>


___
gtk-app-devel-li

Re: Glade crash

2017-03-05 Thread Jim Charlton
I have no problem opening this file and deleting rows in the fan store.  
I am using glade-3.20 on Ubuntu-16.10 with gtk-3.20.


Notably, this file opens but does not display its contents correctly 
when I try to open it with glade-3.19 on Ubuntu-16.04 with gtk-3.18 
(although it does not crash).  So I assume you are using glade-3.20 on 
Windows.  Based on my observations, I don't think the problem is with 
glade unless you have a variant that is different from mine (I tried 
both a version compiled from sources and the version that comes from the 
Ubuntu repositories).


jim...



On 2017-03-03 05:20 AM, Pozz Pozz wrote:

Hello Dan,

you can download the glade file from this link

(
https://drive.google.com/file/d/0B1s7dNPGsJ3CZllrOUVwNWw4TWM/view?usp=sharing
).


2017-03-03 4:10 GMT+01:00 Daniel Kasak :


There is no attachment. Try sharing it a different way - pastebin or
something.

Dan

On Wed, Mar 1, 2017 at 5:18 AM, pozzugno  wrote:


Most probably this isn't the most appropriate mailing list, because I
think my issue is related to Glade (and not Gtk libraries).

Attached is one of my graphical interface, designed with Glade.
Unfortunately when Glade opens this file, it seems it is very unstable if I
try to change something.

For example, let's try to delete the row in the fans_store GtkListStore
object. Glade 3.20 will crash (at least in Windows).

Do you understand why? I tried many things, even editing manually the
.glade file with a text-editor. Many times, Glade wil crash during opening
the edited file.


___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list




___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: gtk3 and fork/exec of non-gtk child

2017-01-14 Thread Jim Charlton

On 2017-01-14 01:51 PM, Eric Cashon via gtk-app-devel-list wrote:
  
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 some 
communication. You just need to set the location path of the worker in 
driver.c. Sort of simple but I had some trouble figuring out how some of this 
worked so... it might be helpful.

https://github.com/cecashon/OrderedSetVelociRaptor/tree/master/Misc/Pipes

I haven't used GSubprocess and don't know of a short starter there.

Eric

  



___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


I too have used g_spawn_async_with_pipes() and GIOChannel's to spawn 
child processes that monitor USB temperature probes and pipe the data 
back to a main program.  For me it was important that the children were 
asynchronous and independent.  The child processes have no GUI or direct 
user interaction (except through the main program).  I have no problem 
spawning multiple child processes (for multiple probes) and can easily 
stop them at will by sending them a signal along the pipe to close them 
down.  The code is very similar to Eric's, albeit buried in a much 
larger program.


I haven't used GSubprocess either but in looking at it, it looks pretty 
interesting.


jim...

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: deprecated gtk_cairo_create

2017-01-06 Thread Jim Charlton
1/Mod-Plotmm), the plot window 
consists of a composite of DrawingArea's for axes, tic-marks, axis 
labels and the main canvas where curves and symbols etc. can be drawn.  
All drawing is done using the cairo context available in the on_draw() 
functions of the various components.  Each component can be redrawn 
individually and it is not necessary to redraw axes and tic-marks when 
redrawing the curve.  On the other hand, all components are redrawn 
automatically if the window is resized, for example.


The code in that repository is very difficult to follow, a legacy of 
Andy Thaller's original code (and my editing!).  Currently, the small 
test program in main.cc even contains a create_cairo_context() call 
(which leads to the deprecated C code in Gtk3)  but the main libraries 
for the plotting contain no such calls. At some point I will update the 
repository to remove the deprecated call from main.cc.


As an aside, I sympathize with Sergey, as I too find it a bit awkward to 
confine drawing/rendering to the on_draw() event calls of the various 
drawing areas.


jim...   Jim Charlton







2016-12-30 18:15 GMT+03:00 Sergei Kolomeeyets <kolomeey...@gmail.com>:

Hi, Emmanuele
thanks for not leaving me alone with my first attemts to navigate through
'uncharted' water of GTK+3.
You have touched several interesting points. Could we discuss it briefly?


You wrote:

Drawing *on widgets* outside of their rendering cycle is not possible in
GTK+ 3.x.

Was it possible in GTK2? I thought that it is the rule for all widgets
except Drawing Area. The latter gives more freedom and poses more
responsibility on the developer (in terms of event handling). This is a
paraphrase of documentation. But anyway I do not need that type of drawing.
I need the maximal speed, therefore - and to be on a safe side - I follow
only standard approaches. I want to draw in the standard rendering cycle. I
try to write an oscilloscope (more precise it is written with GTK2 but works
not stable with a very strange slow down happend somewhere in expose_event
callback function). I've spent a lot of time with 'perf' and 'gdb' with no
results and idea on how to fix that slow down except the migration to GTK3.


If you want to draw something off screen and then composite it inside your
widget,

What do you mean by "off screen" term? If, for instance, I have a convenient
widget (with a known and predefined image) and want to draw something new
above it, then this term is more or less clear for me. But Drawing Area has
no predefined widget image. When should I use
gdk_window_create_similar_surface (window, CAIRO_CONTENT_COLOR_ALPHA, width,
height) while dealing with Drawing Area? And how to compose it with that of
has been drown within a standart virtual draw-function "inside my widget" to
get a consistent image? Is there a special function or it will happen
automatically at the end of "on draw" function?


but you really need to look at the documentation when it comes to signal
handlers.

Yes. Thanks. I've got it :-) It looks like (and you wrote it clearly for me)
I need to do nothing to create a cairo context because (in my very simple
case) GTK will do 'everything' instead of me and then grandmotherly 'put'
the right pointer into the second parameter of a draw event virtual
function. (So I can just happily use it inside that function.) That sounds
wise (any window has its cairo context automatically) and I beginning to
love GTK+3, (if I understood the state of the matter right, of course).

Best regards,
Sergey


2016-12-30 15:47 GMT+03:00 Emmanuele Bassi <eba...@gmail.com>:

Hi;

On 30 December 2016 at 11:38, Sergei Kolomeeyets <kolomeey...@gmail.com>
wrote:

Hi, Emmanuele
thanks a lot for your prompt response! Yes It looks I need to go back to
profound manual's reading... :-(
I have not understood almost nothing

You can ignore the offscreen rendering with an intermediate surface,
since you clearly don't need it; but you really need to look at the
documentation when it comes to signal handlers: the compiler cannot do
type checks for you, there.


(except I used an old version of gtk3 and a wrong callback for the draw
event). My Goodness! Why such a dramatic changes?

"Dramatic"? The rendering model is simpler and gives you all you need
without having to call intermediate functions.

As for your other email:


Is there any working and simple example with DrawingArea? If any could
you please give me the reference to it?

Using GtkDrawingArea does not require any special example. Add it to a
container and set the area to expand both horizontally and vertically,
so that it occupies all the available space given to it by the parent;
then connect to the "draw" signal (with the correct signature) and
render your content using the Cairo context given to you.


You know, in GTK2 it was one of the poorest - in terms of documentation
- widget.

Because it doesn't do anything. :-)

It's literall

Re: deprecated gtk_cairo_create

2016-12-30 Thread Jim Charlton

On 2016-12-30 05:45 AM, Colomban Wendling wrote:

Hi,

Le 30/12/2016 à 12:20, Sergei Kolomeeyets a écrit :

Hi, everyone
[…]

{draw_callback}

gboolean draw_callback(GtkWidget *area, GdkEventExpose *event, GArray
*ptLinePoints) {

That's not the right signature for the GtkWidget::draw signal: it takes
a cairo_t* as the second parameter, not a GdkEventExpose like did
::expose.  And here you have your Cairo context :)

See
https://developer.gnome.org/gtk3/stable/GtkWidget.html#GtkWidget-draw [1]

Also, read
https://developer.gnome.org/gtk3/stable/ch26s02.html#id-1.6.3.4.11, and
more generally
https://developer.gnome.org/gtk3/stable/gtk-migrating-2-to-3.html

So basically you don't need gdk_cairo_create() at all.  If you want to
draw outside of the ::draw() handler and paint the cached thing then,
use a cairo_surface_t as the offscreen surface, and paint it then.

Hope this helps.

Cheers,
Colomban

[1] which says "CairoContext", but that's a weird lie on the API… not
sure why, maybe the GType has this name so introspection is confused.
Anyway, it's cairo_t.
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


If one does want to draw into a cairo_surface_t, one can create a cairo 
context for drawing? E.g.


cairo_t   *
cairo_create (/|cairo_surface_t 
 
*target|/);


That use of cairo_create() is not deprecated... (I assume).

https://developer.gnome.org/gtk3/stable/ch01s05.html

jim...




___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Re: Debugging propagated events

2016-11-28 Thread Jim Charlton
In Gtkmm (C++) you can overload the on_draw() function with your own.  
This might give you a foothold in the on_draw() routine that is called 
after a redraw event occurs.  I guess in GTK you would have to connect a 
callback function to the "draw" signal.  Might help.??


jim...


On 2016-11-28 04:50 PM, zahlenm...@gmx.de wrote:

This was one of the first things I did. Debug compilation option, debug
CFLAGS, no stripping - without a change. The backtrace only shows 3
lines, my draw function and two from libc.
The faulty address is not null. But the segfault happens after the
return where all local variables are no longer in scope, and the
addresses of the widget and the cairo context are valid.

On 11/29/16 00:44, Alfonso Arbona Gimeno wrote:

Hi,

Why don't you link against the debug version of the library so that it
shows you the complete stack?
It will give you some extra clues on why the segfault is happening.

Regards,
Alfonso Arbona

On November 29, 2016 6:17:05 AM GMT+09:00, zahlenm...@gmx.de wrote:

 For a custom widget I have a draw function. I do some drawing there and
 when I am finished I return FALSE to let the parent draw. Immediately
 after the return statement I get a segfault. gdb's backtrace only shows
 my draw function and an address I cannot associate to any object.
 Are there some general tricks how to debug such errors?

 Kind regards
 

 gtk-app-devel-list mailing list
 gtk-app-devel-list@gnome.org
 https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list



___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Empty Space in Dialog Box

2016-06-06 Thread Jim Charlton

On 16-06-06 05:05 PM, Rena wrote:

On Mon, Jun 6, 2016 at 7:23 AM, Kamalpreet Grewal 
wrote:


I am developing a dialog box. I have added a treeview and two buttons in
it.

Adding the treeview to the scrolled window using:
_mainBox.pack_start(_scrolledWindow, Gtk::PACK_EXPAND_WIDGET);
where _mainBox is a Gtk::VBox.

The problem is I am getting empty space above the treeview. Why is it
so? As per the packing option used, the treeview should expand to fill
the widget space available to it.

Please help me fix this issue.

--
Kamalpreet Kaur Grewal
Blog: http://kamalpreetgrewal.com/
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list



It's hard to say without seeing more of the code. I will note that
Gtk::VBox is deprecated (use Gtk::Box and specify an orientation) and
Gtk::Box::pack_start() expects four parameters (box, expand, fill,
padding), unless Gtk::PACK_EXPAND_WINDOW is some macro that expands to
multiple values.

I agree.  Give more detail. Are you using Gtk::Dialog or 
Gtk::MessageDialog?  Are you packing into the content area or the action 
area?  What scrolled window are you referring to?

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Gtk+ newb: Some basic infos

2016-04-15 Thread Jim Charlton
I found that "Programming with gtkmm 3" (see 
https://developer.gnome.org/gtkmm-tutorial/stable/) to be very helpful.


jim...

On 16-04-14 01:58 PM, Peter Wiehe wrote:

Hello,

I want to program C++ applications with a GUI, but I am new to Gtk+ and gtkmm 
programming.


1.) What are the really important differences between Gtk+ 2 and 3?

2.) Can you recommend a really good paper book? (There seem to be a ton of Gtk+ 
2 books but not a single one about Gtk+ 3.)




Kind regards and happy coding

Peter Wiehe
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: example in the gtkmm 3 docs is not working

2016-03-25 Thread Jim Charlton

Replace "auto" with "Glib::RefPtr".

Then it works...

jim...

On 16-03-25 08:20 PM, Peter Wiehe wrote:

Hello!


The example in the gtkmm 3 docs is not working:


https://developer.gnome.org/gtkmm-tutorial/stable/sec-basics-simple-example.html


g++ says:

'app' does not name a type


I use:

Ubuntu 15.10

g++ (Ubuntu 5.2.1-22ubuntu2) 5.2.1 20151010


I downloaded and installed gtkmm and prerequisites today via

"apt-get install libgtkmm-3.0-dev"


Is it a mistake in the example or what can I do to solve this?


Greetings

Peter
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


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

2015-12-29 Thread Jim Charlton
I use gtkmm and get screen size before opening the application window in 
order to make sure it fits on the display.  the equivalent gtk/gdk calls 
(I think)  use gtk_window_get_screen() to get the gdk window from 
the gtk window.  Then from the gdk window I use gdk_window_get_height() 
to get the height, and then gtk_window_resize() to resize the original 
gtk window to fit.


It has been a while since I looked at the code... but I think that was it.

jim...

On 15-12-29 02:26 PM, 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 dimensions; then un-maximize its window. I 
believe these can be done with GDK.


Is there better way to do this?

Rick
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: gtk_text_buffer_delete ?

2015-10-07 Thread Jim Charlton

On 15-10-07 04:14 AM, 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.

I so connected to the 'changed' signal of the GtkTextBuffer, and the handler
is :

static void
on_notes_changed( GtkTextBuffer *buffer, void *empty )
{
static const gchar *thisfn = "my_utils_on_notes_changed";
static const gint MAX_LENGTH = 4096;
static gboolean in = FALSE;
gint count;
GtkTextIter start, end;

/* prevent an infinite recursion */
if( !in ){
count = gtk_text_buffer_get_char_count( buffer );
if( count >= MAX_LENGTH ){
/*
 * this code works, but emit the following Gtk-Warning:
 *
 * Invalid text buffer iterator: either the iterator is
 * uninitialized, or the characters/pixbufs/widgets in 
the
 * buffer have been modified since the iterator was 
created.
 * You must use marks, character numbers, or line 
numbers to
 * preserve a position across buffer modifications.
 * You can apply tags and insert marks without 
invalidating
 * your iterators, but any mutation that affects 
'indexable'
 * buffer contents (contents that can be referred to by 
character
 * offset) will invalidate all outstanding iterators
 */
gtk_text_buffer_get_iter_at_offset( buffer, , 
MAX_LENGTH-1 );
/*gtk_text_iter_backward_char(  );*/
/*gtk_text_buffer_get_iter_at_offset( buffer, , 
count );*/
gtk_text_buffer_get_end_iter( buffer,  );
/*gtk_text_iter_backward_char(  );*/
in = TRUE;
g_debug( "%s: count=%d, start=%d, end=%d",
thisfn, count, gtk_text_iter_get_offset( 
 ), gtk_text_iter_get_offset(  ));
gtk_text_buffer_delete( buffer, ,  );
in = FALSE;
}
}
}

As stated in the comment, the code works (the size if actually limited to 4095 
chars),
but each execution of gtk_text_buffer_delete() triggers the well-known warning
"Invalid text buffer iterator".

I am a bit stucked here, because I do not understand why this happens, as the 
buffer
is not modified between taking the iters and deleting the content...

Can anyone help me in this matter ?

Thanks in advance.
Regards
Pierre
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
I do not have an answer to the problem as stated, but I have written 
code that achieves the overall purpose of pruning the text buffer.

I work in Gtkmm rather than in GTK3.  Here is a snippet of code.
*
start = tb1_ptr->begin();
end = tb1_ptr->end();
if (end.get_offset() > 254) end.set_offset(254);
text = tb1_ptr->get_text(start, end, FALSE);

where
tb1_ptr = Gtk::TextBuffer::create();
Gtk::TextIter start;
Gtk::TextIter end;
Glib::ustring text;

In your case, rather than using gtk_text_buffer_delete, you would use
gtk_text_iter_get_offset (/|const GtkTextIter 
 *iter|/);

and
gtk_text_iter_set_offset (/|GtkTextIter 
 *iter|/, 
/|gint 
 
char_offset|/);


to limit the text buffer to your desired length.

Hope this helps...   Jim...




text = tb1_ptr->get_text(start, end, FALSE);
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Using fork() in a GTK C/Vala application

2015-09-01 Thread Jim Charlton

On 15-09-01 07:27 AM, rastersoft wrote:

In fact, I'm already using pipes and more; I can just replace the Thread
call with a fork() and everything will work fine. The only idea I see I
can use is to physically separate both process in different binaries and
use named pipes...

On 01/09/15 16:05, Chris Vine wrote:

On Tue, 1 Sep 2015 15:33:19 +0200
rastersoft  wrote:

Thanks for your answer. Unfortunately, I'm running out of options:
currently I'm using threads, but there is a nasty bug that makes my
program crash sometimes. It is very subtle, because it hapens usually
after being running for two-three days. It is a double free. I tried
with Valgrind, but when I use it, the error doesn't trigger, which
makes me suspect it is a race condition between both threads
(valgrind ensures that only one thread runs each time). I checked all
the code, and isolated everything as much as I could, and adding as
many locks as I could imagine, trying to remove that bug, but its
imposible, so I decided to separate the code in two independent
processes to be able to use valgrind and finally find what is
happening. But as you say, it seems I'll have to do something else...

Can you fork() before you launch any new threads or call any gio/gtk+
functions, and then perhaps communicate using pipes?  That should be
safe.

Chris
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

I have had similar problems and ended up using 
g_spawn_async_with_pipes() with a separate binary.  This works well for 
me as I often need to launch several instances of this "thread".


jim...
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Scrolling a Cairo drawing-area or Gtk layout

2015-07-27 Thread Jim Charlton
I did some testing of the code and also found that getting scroll bars 
to appear was not so easy.  The only way that I could get them to appear 
was to modify the code with a container layout of:

layout2-viewport-scrolled window-window2.

Here is the section of the code that I altered.
*
 window2 =
gtk_window_new(GTK_WINDOW_TOPLEVEL);

  layout2 =
gtk_layout_new(NULL, NULL);

GtkWidget *sw = gtk_scrolled_window_new (NULL, NULL);
GtkWidget *viewport = gtk_viewport_new (NULL,NULL);

gtk_scrolled_window_set_policy (sw, GTK_POLICY_ALWAYS, GTK_POLICY_ALWAYS);
gtk_widget_set_size_request (layout2, 800, 600);

g_signal_connect(G_OBJECT(layout2), draw,
G_CALLBACK(on_draw_event), NULL);


g_signal_connect(G_OBJECT(layout2), destroy,
G_CALLBACK(gtk_widget_destroy), NULL);


gtk_window_set_default_size(GTK_WINDOW(window2), 600, 400);


gtk_window_set_title(GTK_WINDOW(window2), Graph);

gtk_container_add(GTK_CONTAINER (viewport), layout2);
gtk_container_add(GTK_CONTAINER (sw), viewport);

gtk_container_add(GTK_CONTAINER (window2), sw);


gtk_widget_show_all(window2);

***

I am using GTK3 and the documentation says that specifically including 
the viewport is not needed as it *should* be included automatically when 
it is needed.  But that was not my experience in this case.


I also agree with Damien that the goal of the code is unclear. You 
cannot scroll to a part of the plot that is not drawn.  In the code 
above, you can only scroll around within the dimensions of layout2.  Is 
that what you wanted?


jim charlton

On 15-07-27 01:10 AM, Damien Caliste wrote:

Hello,

Le 21/07/2015, Roger Matthews roger.matth...@hotmail.com a écrit :

which results from a simple straight line equation, and*/ /* that
extends beyond the bounds of the window.

Reading your code quickly, it seems to me that, you're drawing indeed
the line outside the drawing area, *but* the drawing area has the size
of your window, so GTK is not displaying any scrollbars.

In my opinion, you should :
- in main, declare your drawing area to a fixed size (let say
   1200×1200) and declare your window size at 600×400 as you're doing ;
- in the drawing method (do_drawing()), don't use the window size, but
   the drawing size as bounds from your drwaing commands. It's useless
   to draw lines or whatever outside the cairo drawing area, they will
   be cropped anyway. So don't reach for the top level there, use the
   size of the widget itself.

As a schemme :
- your implementation : |#|
- the way to do it : |##|
   - # means GTK scrollview, - means drawing area
   - call cairo drawing primitives in the coordinates of the drawing area
 (-), but not outside.

Damien.
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Re: detaching a notebook tab

2015-07-06 Thread Jim Charlton
It works fine for me on gtk3.  I am running on linux and the version of 
gtk3 is the most recent in the repository, I believe (3.10.8-0ubuntu1.5).
Depends: libgtk-3-common (= 3.10.8), libatk-bridge2.0-0 (= 2.5.3), 
libatk1.0-0 (= 2.7.5), libc6 (= 2.14), libcairo-gobject2 (= 1.10.0),
 libcairo2 (= 1.13.0~20140204), libcolord1 (= 0.1.10), 
libcups2 (= 1.6.2), libfontconfig1 (= 2.9.0), libgdk-pixbuf2.0-0 (=
 2.27.1), libglib2.0-0 (= 2.39.4), libpango-1.0-0 (= 1.32.4), 
libpangocairo-1.0-0 (= 1.32.4), libpangoft2-1.0-0 (= 1.32.4),
 libwayland-client0 (= 1.3.92), libwayland-cursor0 (= 1.2.0), 
libx11-6 (= 2:1.4.99.1), libxcomposite1 (= 1:0.3-1), libxcursor1
 ( 1.1.2), libxdamage1 (= 1:1.1), libxext6, libxfixes3, 
libxi6 (= 2:1.2.99.4), libxinerama1, libxkbcommon0 (= 0.2.0-0ubuntu3~),

 libxrandr2 (= 2:1.2.99.3), shared-mime-info

I saw your other message ... but I just used the code from your first 
message and got the libs and cflags from `pkg-config gtk+-3.0 --libs` 
`pkg-config gtk+-3.0 --cflags`.


jim...


On 15-07-06 08:36 AM, Allin Cottrell wrote:

Hello all,

My app has a collection of objects which can be viewed either 
individually or in a tabbed viewer based on GtkNotebook. When objects 
are being viewed in the latter way, the user is supposed to be able to 
drag an object out of the tabbed viewer, with the effect of giving it 
its own window.


This works fine with gtk 2.24.28, but I'm getting a segfault with the 
same code on gtk 3.16.4. This looks like a gtk bug, but maybe I'm 
doing something wrong and before I file a report I'd be grateful if 
anyone could take a look at minimal test case below.


The idea is to start the program, switch to the second page in the 
notebook, and try dragging the tab onto the root window. With gtk3

I get a crash, preceded by the message

Gtk-CRITICAL **: gtk_widget_get_frame_clock: assertion 'GTK_IS_WIDGET 
(widget)' failed


Here's the minimal code:

#include gtk/gtk.h

/* Minimal test case for dragging a tab out of a
   notebook onto the root window

   Allin Cottrell cottr...@wfu.edu, 2015-07-06
*/

static GtkNotebook *detach_tab_callback (GtkNotebook *book,
 GtkWidget *page,
 gint x, gint y,
 gpointer data)
{
GtkWidget *window;
gint pgnum;

g_object_ref(page);
pgnum = gtk_notebook_page_num(GTK_NOTEBOOK(book), page);
gtk_notebook_remove_page(GTK_NOTEBOOK(book), pgnum);

window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_container_add(GTK_CONTAINER(window), page);
g_object_unref(page);

gtk_widget_show_all(window);

/* return NULL since we're not adding the detached
   tab to another GtkNotebook */

return NULL;
}

int main (int argc, char **argv)
{
GtkWidget *window, *notebook, *child;

gtk_init(argc, argv);

window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
g_signal_connect(G_OBJECT(window), destroy,
 gtk_main_quit, NULL);

notebook = gtk_notebook_new();
g_signal_connect(G_OBJECT(notebook), create-window,
 G_CALLBACK(detach_tab_callback), NULL);

child = gtk_label_new(Content of first page);
gtk_widget_set_size_request(child, -1, 100);
gtk_notebook_append_page(GTK_NOTEBOOK(notebook), child, NULL);

child = gtk_label_new(Content of second page);
gtk_widget_set_size_request(child, -1, 100);
gtk_notebook_append_page(GTK_NOTEBOOK(notebook), child, NULL);
gtk_notebook_set_tab_detachable(GTK_NOTEBOOK(notebook),
child, TRUE);

gtk_container_add(GTK_CONTAINER(window), notebook);
gtk_widget_show_all(window);

gtk_main();

return 0;
}



___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: How can I retrieve gtk style context information from textview widget class without a textview widget?

2015-06-12 Thread Jim Charlton

On 15-06-12 05:04 AM, Friedrich Beckmann wrote:

Hi,

I would like to use the style information from the textview widget in another 
context. I want
to retrieve the text foreground color and the background color as it would be 
used in a textview widget
and use this style information for rendering inside a drawing area. I figured 
out that I can modify the
style by adding a style class with gtk_style_context_add_class (), but the 
textview background
color seems to be specific to the textview widget.

In the adwaita scheme css:

GtkTextView {
   background-color: #f6f6f6; }
   GtkTextView:backdrop {
 background-color: #f6f6f6; }

Is there a way to retrieve this information of the background-color similar to 
the class mechanism?
I would need the same style context as if I was in a textview widget.

Friedrich




___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
I don't have a complete solution for you, but you can get the background 
color from gtk_style_context_get_background_color().

For example...

GtkWidget *win = NULL;
GdkRGBA color1;
GdkRGBA color2;

GtkStyleContext *context1;

...
...
gtk_widget_show_all (win);

context1 = gtk_widget_get_style_context (win);
gtk_style_context_get_background_color(context1, GTK_STATE_NORMAL, color1);
printf(%f\n%f\n%f\n, ( color1.red ), ( color1.green), ( color1.blue));

The colors are decimal numbers between 0.0 and 1.0.  To change the 
background color...


color2.red = 1.0;
color2.green = 0.1;
color2.blue = 0.1;
color2.alpha = 1.0;

gtk_widget_override_background_color (win, GTK_STATE_NORMAL, color2);

jim...

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Gtk3 MacOS (OSX) context menu issues

2015-03-20 Thread Jim Charlton

On 15-03-20 10:07 AM, Roger Davis wrote:


Hi Jim  Konstantin,

I can now add another data point on this topic. My boss bought me a 
nice new iMac 27 Retina which arrived a couple days ago (yayy 
boss!!), so I decided to do my first ever X11-free quartz-only gtk3 
MacPorts install (agh gtk3-on-quartz!!). I am now seeing your menu 
insensitivity bug, another bug as well, and all my hard-won tweaks to 
get gtk3 looking nice re: font and theme issues under XQuartz have 
gone down the toilet and I'm back at square one. On to the details ...


(1) I had a bit of installation difficulty with MacPorts. For my previous
XQuartz gtk3 installs I always just did

port install gtk3

but to do this quartz-only install I followed some other instructions 
and did


port install cairo +quartz -x11
port install pango +quartz -x11
port install gtk3 +quartz -x11

The last command failed because it dragged in the gtk2 port which 
wanted a

pango with X11, so I started over:

port install cairo +quartz
port install pango +quartz
port install gtk3 +quartz -x11

That worked.

(2) My gtk3 app runs basically OK (and is not starting X11), but now 
shows

the message

*** WARNING: Method userSpaceScaleFactor in class NSView is deprecated on
10.7 and later. It should not be used in new applications. Use
convertRectToBacking: instead.

every time I start it. Naturally, my own code knows 
userSpaceScaleFactor from nothing, so it must be getting called 
somewhere within gtk3/whatever. There are other reports of this on the 
web (some of which state that it has led to fatal errors!!) but I have 
not yet seen any detailed explanation. Obviously it still afflicts gtk 
3.14.9 and friends on quartz-only.


(3) Now, the context menu issue ... I am basically seeing the same 
problem you are (although I have *never* seen it under my XQuartz 
installs), but have some additional observations to add.


First, my popup menus (both those which I directly display within my 
own code as well as those displayed indirectly by GtkComboBoxText 
widgets) initially display with a transparent 6-ish-pixel-wide border 
the first time they are shown, but on subsequent displays show no 
border at all (but still suffer from the insensitivity bug). Weird.


Second, I can avoid triggering the bug if I initiate the menu display 
with a quick click-and-release. If on the other hand I trigger the 
menu with a depress-only mouse event, I see the bug as you have 
described. On my own direct popups, the menu displays to the lower 
right of the mouse cursor position. If I depress-only and move the 
mouse directly to the lower right the items are sensitive until I move 
the mouse out of the menu, but if I first move the mouse to the upper 
left and then into the menu, the items are never sensitive.


Jim, I don't see how this could have anything to do with X11 because 
(1) the latter is not running on my quartz-only install where the bug 
appears, and (2) the bug *never* appears on my XQuartz platforms.


Hope this helps,

Roger

Jim Charlton wrote:


I certainly should have mentioned that my observations were made under
the MAC OS X 10.10 (Yosemite) operating system.  I too have not been
able to observe this problem under Linux (Ubuntu).  As Konstantin has
pointed out, it does not seem possible to add a margin to the popup
menuitem box in Linux to test if the problem would arise.  I will try to
determine if the problem arises in the XQuartz X11 libraries or in the
GTK3 libraries.  But the incorrect motion event data seems to point to
the X11 libraries on the MAC.

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Roger:

I can confirm that I see exactly the same thing that you do. Holding 
down the right mouse button while moving the mouse gives the effect that 
you see.  On checking which widget is under the cursor at each motion 
event... I find that not releasing the right button changes what is 
initially reported to be under the cursor (from GtkMenu to GtkMenuItem).


I used rather loose language when I referred to the XQuartz server. I am 
also actually using the Gtk3 + quartz and so am using the MAC quartz 
graphics library not the Xserver.  A colleague here has suggested that 
it probably is not an incorrect event being sent from quartz as I 
imagined.  It may be linked to either the handling of enter events, or 
perhaps the setting of event masks for the various widgets.  I will 
continue to work my way through the code (gtkmenu.c) to see if I can 
figure it out.


jim...   Jim Charlton


___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Fwd: Gtk3 MacOS (OSX) context menu issues

2015-03-19 Thread Jim Charlton

On 15-03-19 12:13 AM, Konstantin Dmitriev wrote:

2015-03-19 13:05 GMT+06:00 Konstantin Dmitriev ksee.zelga...@gmail.com:

Hello!

2015-03-15 22:32 GMT+06:00 Konstantin Dmitriev ksee.zelga...@gmail.com:

Hello, Jim!

2015-03-15 21:25 GMT+06:00 Jim Charlton char...@gmail.com:

With the default MacPorts installation of gtk3, one can set XDG_CONFIG_HOME
to /opt/local/share/themes/Default and then include the gtk.css file with
.window-frame,
.window-frame:backdrop {
   box-shadow: none;
   margin: 0;}

in it, in /opt/local/share/themes/Default/gtk-3.0/gtk.css

and the margins will disappear on the popup menu boxes avoiding the
selection problem.  No need to install an alternate theme.
Please excuse the errors in the previous posting.

Thank you very much for providing the workaround! This solves the
problem for my situation, because I can provide modified theme with
the distributive of our software.

Just a wild guess:
It would be interesting to create a custom theme with the following css options:
.window-frame,
.window-frame:backdrop {
   box-shadow: 0 0 10px rgba(0,0,0,0.5)
   margin: 15;
}
...and test it in some other OS (Linux and Windows). Maybe the problem
of insensitive menu will appear there as well!

I have been trying to reproduce the same behaviour on my Linux
workstation, but no luck. I can enable the shadow around the context
menu, but the semi-transparent border isn't appears. Probably this
feature doesn't supported by X11 backend. So I can't debug this issue
in Linux.

I think at this point we can submit a bugreport to GTK bugtracker -
https://bugzilla.gnome.org/index.cgi

I guess this would be a better link for bugtracker -
https://bugzilla.gnome.org/page.cgi?id=browse.htmlproduct=gtk%2B
^_^

Best Regards,
Konstantin
I certainly should have mentioned that my observations were made under 
the MAC OS X 10.10 (Yosemite) operating system.  I too have not been 
able to observe this problem under Linux (Ubuntu).  As Konstantin has 
pointed out, it does not seem possible to add a margin to the popup 
menuitem box in Linux to test if the problem would arise.  I will try to 
determine if the problem arises in the XQuartz X11 libraries or in the 
GTK3 libraries.  But the incorrect motion event data seems to point to 
the X11 libraries on the MAC.


Jim Charlton
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Fwd: Fwd: Gtk3 MacOS (OSX) context menu issues

2015-03-18 Thread Jim Charlton

On 15-03-15 10:56 AM, Konstantin Dmitriev wrote:

Sorry, forgot to forward my previous message into mailing list. ^__^


-- Forwarded message --
From: Konstantin Dmitriev ksee.zelga...@gmail.com
Date: 2015-03-15 22:32 GMT+06:00
Subject: Re: Fwd: Gtk3 MacOS (OSX) context menu issues
To: Jim Charlton char...@gmail.com


Hello, Jim!

2015-03-15 21:25 GMT+06:00 Jim Charlton char...@gmail.com:

With the default MacPorts installation of gtk3, one can set XDG_CONFIG_HOME
to /opt/local/share/themes/Default and then include the gtk.css file with
.window-frame,
.window-frame:backdrop {
   box-shadow: none;
   margin: 0;}

in it, in /opt/local/share/themes/Default/gtk-3.0/gtk.css

and the margins will disappear on the popup menu boxes avoiding the
selection problem.  No need to install an alternate theme.
Please excuse the errors in the previous posting.

Thank you very much for providing the workaround! This solves the
problem for my situation, because I can provide modified theme with
the distributive of our software.

Just a wild guess:
It would be interesting to create a custom theme with the following css options:
.window-frame,
.window-frame:backdrop {
   box-shadow: 0 0 10px rgba(0,0,0,0.5)
   margin: 15;
}
...and test it in some other OS (Linux and Windows). Maybe the problem
of insensitive menu will appear there as well!

Best Regards,
K.
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
I have further investigated the problem with insensitivity in context 
menus.  This involved some debugging of the gtkmenu.c code in the gtk3 
libraries.  Here are my findings thus far.  If anyone has a suggestion 
where to go next, please let me know.  I don't mind working on this but 
I am sort of at a dead end.


At line 3569 in gtkmenu.c

  menu_item = gtk_get_event_widget ((GdkEvent*) event);
  parent = gtk_widget_get_parent (menu_item);
  if (!GTK_IS_MENU_ITEM (menu_item) ||
  !GTK_IS_MENU (parent))
return FALSE;

Replace with
  menu_item = gtk_get_event_widget ((GdkEvent*) event);
  printf(The name of the widget is %s\n, gtk_widget_get_name(menu_item);
  parent = gtk_widget_get_parent (menu_item);
  if (!GTK_IS_MENU_ITEM (menu_item) ||
  !GTK_IS_MENU (parent))
return FALSE;

make and make install the gtk3 libs.

Run gtk3-demo.  Right click in the lower right panel to bring up the 
context menu.  Carefully move the mouse cursor into the menu.  Note that 
the name of the widget under the cursor that is being returned by the 
motion event is a GtkMenu, not a GtkMenuItem.  Now move the mouse out of 
the popup window.  The name of the widget under the cursor is now 
GtkTextView.  Move the cursor back into the popup menu and the widget 
under the cursor is now reported as GtkMenuItem and one can select the 
Select All item by passing over it.  Now move the cursor very 
carefully into the 6 pixel margin and then back into the menu popup.  
One can now see that the widget under the cursor is again reported 
(incorrectly??) to be GtkMenu instead of GtkMenuItem and the 
GTK_IS_MENU_ITEM test fails and one cannot select the Select All item.


As I pointed out earlier, the problem of insensitive menu items in 
context menus can be avoided by removing the margin from the popup. But 
this is just a workaround.  The real question remains.  Why does the 
motion event report the wrong widget type under the cursor in certain 
circumstances?


jim...  Jim Charlton
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: borderless MacOS menus (was 'Gtk3 MacOS (OSX) context menu issues')

2015-03-16 Thread Jim Charlton

On 15-03-15 08:24 PM, Jim Charlton wrote:

On 15-03-15 01:49 PM, Roger Davis wrote:


Thanks for the suggestion, Jim, but no luck so far in getting any 
change to my menu borders via


.window-frame, .window-frame:backdrop {
  box-shadow: 6px 6px;
  margin: 6px;
}

which I added to a new $XDG_CONFIG_HOME/gtk-3.0/gtk.css file. This 
file is definitely being parsed at app startup time, because if I change


.window-frame, .window-frame:backdrop {

to instead read

* {

I get the most hideous GUI imaginable, i.e., big ugly shadow borders 
around almost everything *except* my menus, which are still 
completely borderless! It just seems like my system is flat-out never 
drawing any menu borders no matter what.


Roger


On Sun, 15 Mar 2015, Jim Charlton wrote:

My experience has been that I can set the XDG_CONFIG_HOME 
environment variable to the path to the gtk-3.0 directory (eg. 
/opt/local/share/themes/Default) and then put both the gtk.css and 
the settings.ini file in the 
/opt/local/share/themes/Default/gtk-3.0/ directory. When a gtk3 
application is run, both files will be processed.  You can put css 
into the gtk.css file and it seems to override the in-line 
(compiled?) theme data.  If you do figure out how to put shadowed 
margins on the menus, let us know if it brings back the item 
selection problem.



If you just want to put a border on the menubar you can try adding

.menubar {
  border-width: 6px;
  background-color: red;
  border-color: black;
  border-style: solid;
}

to the gtk.css file.  This will give a red background and a wide, 
black border to the menubar.  Or apply the same configuration to 
.menuitem to give background color and borders to all menu items in 
the menubar and in the dropdown menu boxes.


I am not quite sure how you could make it shadowed.

jim...  Jim Charlton
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Ahhh...  you can get shadowed borders by adding something like

.menubar {
  border-width: 1px;
  box-shadow:  inset 0 0 10px #00;|
border-style: solid;
}

You can experiment with various box-shadow parameters.

jim...

|
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Fwd: Gtk3 MacOS (OSX) context menu issues

2015-03-15 Thread Jim Charlton
With the default MacPorts installation of gtk3, one can set 
XDG_CONFIG_HOME to /opt/local/share/themes/Default and then include the 
gtk.css file with

.window-frame,
.window-frame:backdrop {
  box-shadow: none;
  margin: 0;}

in it, in /opt/local/share/themes/Default/gtk-3.0/gtk.css

and the margins will disappear on the popup menu boxes avoiding the 
selection problem.  No need to install an alternate theme.

Please excuse the errors in the previous posting.

jim...  Jim Charlton


On 15-03-14 10:02 PM, Jim Charlton wrote:
To answer part of my own question I am using my own gtk3 theme 
rather than the compiled Adwaita theme that comes with Gtk3.  I set 
the environment variable XDG_CONFIG_HOME (export 
XDG_CONFIG_HOME=/opt/local/share/themes/Adwaita/gtk-3.0), edited 
/opt/local/share/themes/Adwaita/gtk-3.0/gtk.css to @import 
url(gtk-main.css); and then edit 
/opt/local/share/themes/Adwaita/gtk-3.0/gtk-main.css to customize the 
theme. (careful... your theme directory may be elsewhere, depending on 
how you installed Gtk3).


To cure the context menu problem, I eliminated the margin on popup 
windows by adding


|.window-frame,
.window-frame:backdrop {
  box-shadow: none;
  margin: 0;}

to the end of the gtk.css file.  Without the margin box the selection 
problem seems to go away.


This is not a cure... but perhaps a useful work-around!  The 
inspiration for this idea comes from 
https://forum.xfce.org/viewtopic.php?pid=36005.


jim...   Jim Charlton
|




On 15-03-14 09:11 PM, Jim Charlton wrote:

A further note on the context menu issues

If one runs gtk3-demo and right clicks in the open pane on the lower 
right a context menu opens.  If one carefully slides the cursor 
pointer into the list and down the list the Select All will not 
highlight.  If you slide the cursor out of the box, being sure to go 
outside of the margin around the box, and then renter the box, the 
item will highlight.  But if you then carefully place the pointer 
into the margin area of the box and back into the box, the item 
ceases to be sensitive.


Is this possibly related to a patch introduced in April of last year...

https://mail.gnome.org/archives/commits-list/2014-April/msg01392.html ??

Or is there a way to change the css margin of popups to see if that 
will cure the problem... ??  H...?


jim...  Jim Charlton




On 15-03-14 09:25 AM, Konstantin Dmitriev wrote:

Hello, Jim!

2015-03-14 21:50 GMT+06:00 Jim Charlton char...@gmail.com:

Hi Konstantin:

I wrote to the list earlier to say that I could reproduce the 
problem that
you have identified.  I am using MAC Yosemite 10.10 in a VirtualBox 
VM.


To investigate further, I created a new Yosemite VM and installed 
MacPorts,

Xcode, Xcode tools, and then ran port install gtk3 +quartz and port
install gtkmm3 +quartz.  After this, running the gtk3-demo program 
showed

the same problem that you encountered.

When I look at your YouTube video of the gtk3-demo program, I see 
that you

have a different theme than the default compiled Adwaita theme.  I was
wondering exactly how you installed the dark theme that you were 
using?

The dark theme is enabled if you set the GTK_THEME environment
variable in the following way:
GTK_THEME=Adwaita:dark

I have been using gtk3 and gtkmm3 to create software for a coffee 
roasting
company.  I note that in my software, I have exactly the same 
problem that

you have found.  I just never noticed it before! :-)

I am not an expert on the Gtk3 and Gtkmm3 libraries.  But maybe if 
we keep

working on it, a solution will appear.

Yes, I am not a gtk3 expert a well, but I hope that this issue will
get resolved. At least I hope to attract attention of GTK developers.
^__^


It would be good to verify that this
problem occurs on a real MAC and not just on a virtual machine.

I have one report from the user who have experienced the same issue on
the real (non-virtual) machine -
http://www.synfig.org/issues/thebuggenie/synfig/issues/810
But it's better to double-check, of course. I haven't got confirmation
from the bugreporter that the issue is the same...

Also, I can provide the dmg package with the compiled binary, so
anyone can test if the issue happens on the real Mac as well -
http://sourceforge.net/projects/synfig/files/releases/1.0-RC1/osx/synfigstudio-1.0-rc1.dmg/download 



BTW, is it OK to forward this message to gtk-app mailing list, maybe
it will be interesting to others?

Best Regards,
Konstantin


On 15-03-05 09:17 AM, Konstantin Dmitriev wrote:

2015-03-03 15:01 GMT+06:00 Vest . vest...@gmail.com:

Hello Konstantin,

I apologize that I probably cannot help you, but I am curious. Do 
you

have
this issue, if you run a simple demo, where GtkMenu is used?
Because it seems that when you move the mouse outside of the menu's
boundaries, something inside the widget is cleared and the menu
receives
mouse events again.

Kind regards,
Vest

Hello, Vest!

Thank you for responding!
I have tested the gtk3-demo and (surprise

Re: borderless MacOS menus (was 'Gtk3 MacOS (OSX) context menu issues')

2015-03-15 Thread Jim Charlton

On 15-03-15 10:40 AM, Roger Davis wrote:


Hi all,

Thanks to Jim Charlton for the nice fix (or workaround) on the context 
menu problem! I've had a MacOS menu problem for some time which may be 
related to this, but as it's a bit off-topic re: the context menu 
thread I've started a new thread here.


My MacOS gtk3 menus have no borders whatsoever, a rather annoying 
graphics glitch. This includes menus built-in to gtk3 widgets (e.g., 
made from gtk_combo_box_text_new()) as well as those made directly by 
me via gtk_menu_new(). The same menus look fine under CentOS.


I'm using a perhaps unusual gtk3 setup under MacOS (although it does 
seem like many folks' MacOS gtk3 installs are unique). I am running 
the XQuartz backend with a very minimal gnome environment. I set 
XDG_CONFIG_HOME to reference my own private settings.ini file with the 
contents


[Settings]
gtk-application-prefer-dark-theme = false
gtk-theme-name = Adwaita
gtk-icon-theme-name = Adwaita
gtk-font-name = Cantarell 12

This at least solved a recent font problem of mine (see the Feb. 2015 
'gtk3 (GtkTextView) and MacOS' thread), so it seems to be doing 
something useful, and my shadowless menu issue pre-dates use of this 
file so it's not the source of the current problem. However, I'm not 
sure how to make any use of Jim's shadow-removing workaround to *add* 
shadows to my menus, since:


(1) It seems that shadowed menus are supposed to be default bahavior, 
but I'm not getting shadows despite having done nothing to disable them.


(2) My /opt/local/share/themes/Adwaita/gtk-3.0/gtk.css contains only 
the comment line


/* Adwaita is the default theme of GTK+ 3, this file is not used */

implying there's nothing I can add there that will make the slightest 
bit of difference anyway.


Of course, probably I should just be grateful that I don't suffer from 
the MacOS context menu sensitivity problem and leave well enough alone!


Does anyone have any ideas? Thanks!

Roger Davis
Univ. of Hawaii


From: Jim Charlton char...@gmail.com
To: gtk-app-devel-list@gnome.org
Subject: Re: Fwd: Gtk3 MacOS (OSX) context menu issues

To answer part of my own question I am using my own gtk3 theme
rather than the compiled Adwaita theme that comes with Gtk3.  I set the
environment variable XDG_CONFIG_HOME (export
XDG_CONFIG_HOME=/opt/local/share/themes/Adwaita/gtk-3.0), edited
/opt/local/share/themes/Adwaita/gtk-3.0/gtk.css to @import
url(gtk-main.css); and then edit
/opt/local/share/themes/Adwaita/gtk-3.0/gtk-main.css to customize the
theme. (careful... your theme directory may be elsewhere, depending on
how you installed Gtk3).

To cure the context menu problem, I eliminated the margin on popup
windows by adding

|.window-frame,
.window-frame:backdrop {
  box-shadow: none;
  margin: 0;}

to the end of the gtk.css file.  Without the margin box the selection 
problem seems to go away.


This is not a cure... but perhaps a useful work-around!  The 
inspiration for this idea comes from 
https://forum.xfce.org/viewtopic.php?pid=36005.



HI Roger:

My experience has been that I can set the XDG_CONFIG_HOME environment 
variable to the path to the gtk-3.0 directory (eg. 
/opt/local/share/themes/Default) and then put both the gtk.css and the 
settings.ini file in the /opt/local/share/themes/Default/gtk-3.0/ 
directory.  When a gtk3 application is run, both files will be 
processed.  You can put css into the gtk.css file and it seems to 
override the in-line (compiled?) theme data.  If you do figure out how 
to put shadowed margins on the menus, let us know if it brings back the 
item selection problem.


jim...   Jim Charlton
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: borderless MacOS menus (was 'Gtk3 MacOS (OSX) context menu issues')

2015-03-15 Thread Jim Charlton

On 15-03-15 01:49 PM, Roger Davis wrote:


Thanks for the suggestion, Jim, but no luck so far in getting any 
change to my menu borders via


.window-frame, .window-frame:backdrop {
  box-shadow: 6px 6px;
  margin: 6px;
}

which I added to a new $XDG_CONFIG_HOME/gtk-3.0/gtk.css file. This 
file is definitely being parsed at app startup time, because if I change


.window-frame, .window-frame:backdrop {

to instead read

* {

I get the most hideous GUI imaginable, i.e., big ugly shadow borders 
around almost everything *except* my menus, which are still completely 
borderless! It just seems like my system is flat-out never drawing any 
menu borders no matter what.


Roger


On Sun, 15 Mar 2015, Jim Charlton wrote:

My experience has been that I can set the XDG_CONFIG_HOME environment 
variable to the path to the gtk-3.0 directory (eg. 
/opt/local/share/themes/Default) and then put both the gtk.css and 
the settings.ini file in the /opt/local/share/themes/Default/gtk-3.0/ 
directory. When a gtk3 application is run, both files will be 
processed.  You can put css into the gtk.css file and it seems to 
override the in-line (compiled?) theme data.  If you do figure out 
how to put shadowed margins on the menus, let us know if it brings 
back the item selection problem.



If you just want to put a border on the menubar you can try adding

.menubar {
  border-width: 6px;
  background-color: red;
  border-color: black;
  border-style: solid;
}

to the gtk.css file.  This will give a red background and a wide, black 
border to the menubar.  Or apply the same configuration to .menuitem to 
give background color and borders to all menu items in the menubar and 
in the dropdown menu boxes.


I am not quite sure how you could make it shadowed.

jim...  Jim Charlton
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Fwd: Gtk3 MacOS (OSX) context menu issues

2015-03-14 Thread Jim Charlton
To answer part of my own question I am using my own gtk3 theme 
rather than the compiled Adwaita theme that comes with Gtk3.  I set the 
environment variable XDG_CONFIG_HOME (export 
XDG_CONFIG_HOME=/opt/local/share/themes/Adwaita/gtk-3.0), edited 
/opt/local/share/themes/Adwaita/gtk-3.0/gtk.css to @import 
url(gtk-main.css); and then edit 
/opt/local/share/themes/Adwaita/gtk-3.0/gtk-main.css to customize the 
theme. (careful... your theme directory may be elsewhere, depending on 
how you installed Gtk3).


To cure the context menu problem, I eliminated the margin on popup 
windows by adding


|.window-frame,
.window-frame:backdrop {
  box-shadow: none;
  margin: 0;}

to the end of the gtk.css file.  Without the margin box the selection problem 
seems to go away.

This is not a cure... but perhaps a useful work-around!  The inspiration for 
this idea comes from https://forum.xfce.org/viewtopic.php?pid=36005.

jim...   Jim Charlton
|




On 15-03-14 09:11 PM, Jim Charlton wrote:

A further note on the context menu issues

If one runs gtk3-demo and right clicks in the open pane on the lower 
right a context menu opens.  If one carefully slides the cursor 
pointer into the list and down the list the Select All will not 
highlight.  If you slide the cursor out of the box, being sure to go 
outside of the margin around the box, and then renter the box, the 
item will highlight.  But if you then carefully place the pointer into 
the margin area of the box and back into the box, the item ceases to 
be sensitive.


Is this possibly related to a patch introduced in April of last year...

https://mail.gnome.org/archives/commits-list/2014-April/msg01392.html ??

Or is there a way to change the css margin of popups to see if that 
will cure the problem... ??  H...?


jim...  Jim Charlton




On 15-03-14 09:25 AM, Konstantin Dmitriev wrote:

Hello, Jim!

2015-03-14 21:50 GMT+06:00 Jim Charlton char...@gmail.com:

Hi Konstantin:

I wrote to the list earlier to say that I could reproduce the 
problem that

you have identified.  I am using MAC Yosemite 10.10 in a VirtualBox VM.

To investigate further, I created a new Yosemite VM and installed 
MacPorts,

Xcode, Xcode tools, and then ran port install gtk3 +quartz and port
install gtkmm3 +quartz.  After this, running the gtk3-demo program 
showed

the same problem that you encountered.

When I look at your YouTube video of the gtk3-demo program, I see 
that you

have a different theme than the default compiled Adwaita theme.  I was
wondering exactly how you installed the dark theme that you were using?

The dark theme is enabled if you set the GTK_THEME environment
variable in the following way:
GTK_THEME=Adwaita:dark

I have been using gtk3 and gtkmm3 to create software for a coffee 
roasting
company.  I note that in my software, I have exactly the same 
problem that

you have found.  I just never noticed it before! :-)

I am not an expert on the Gtk3 and Gtkmm3 libraries.  But maybe if 
we keep

working on it, a solution will appear.

Yes, I am not a gtk3 expert a well, but I hope that this issue will
get resolved. At least I hope to attract attention of GTK developers.
^__^


It would be good to verify that this
problem occurs on a real MAC and not just on a virtual machine.

I have one report from the user who have experienced the same issue on
the real (non-virtual) machine -
http://www.synfig.org/issues/thebuggenie/synfig/issues/810
But it's better to double-check, of course. I haven't got confirmation
from the bugreporter that the issue is the same...

Also, I can provide the dmg package with the compiled binary, so
anyone can test if the issue happens on the real Mac as well -
http://sourceforge.net/projects/synfig/files/releases/1.0-RC1/osx/synfigstudio-1.0-rc1.dmg/download 



BTW, is it OK to forward this message to gtk-app mailing list, maybe
it will be interesting to others?

Best Regards,
Konstantin


On 15-03-05 09:17 AM, Konstantin Dmitriev wrote:

2015-03-03 15:01 GMT+06:00 Vest . vest...@gmail.com:

Hello Konstantin,

I apologize that I probably cannot help you, but I am curious. Do you
have
this issue, if you run a simple demo, where GtkMenu is used?
Because it seems that when you move the mouse outside of the menu's
boundaries, something inside the widget is cleared and the menu
receives
mouse events again.

Kind regards,
Vest

Hello, Vest!

Thank you for responding!
I have tested the gtk3-demo and (surprise!) the issue seems to be
100%-reproducible there. Here I have recorded a video -
http://youtu.be/X_xAHhQN_lY
Have tested this with GTK 3.14.8 and 3.14.9. Also tested on 32bit and
64bit. Issue persists.

I have tried to build with X11 backend and issue doesn't happen. So,
it seems to be Quartz-only.

I can provide a bash script that I use to unwrap all environment
(creates MacPorts installation from scratch in the custom location and
builds our application - Synfig Studio).

Any help/advice is appreciated.

Best Regards,
Konstantin

Re: Fwd: Gtk3 MacOS (OSX) context menu issues

2015-03-14 Thread Jim Charlton

A further note on the context menu issues

If one runs gtk3-demo and right clicks in the open pane on the lower 
right a context menu opens.  If one carefully slides the cursor pointer 
into the list and down the list the Select All will not highlight.  If 
you slide the cursor out of the box, being sure to go outside of the 
margin around the box, and then renter the box, the item will 
highlight.  But if you then carefully place the pointer into the margin 
area of the box and back into the box, the item ceases to be sensitive.


Is this possibly related to a patch introduced in April of last year...

https://mail.gnome.org/archives/commits-list/2014-April/msg01392.html ??

Or is there a way to change the css margin of popups to see if that will 
cure the problem... ??  H...?


jim...  Jim Charlton




On 15-03-14 09:25 AM, Konstantin Dmitriev wrote:

Hello, Jim!

2015-03-14 21:50 GMT+06:00 Jim Charlton char...@gmail.com:

Hi Konstantin:

I wrote to the list earlier to say that I could reproduce the problem that
you have identified.  I am using MAC Yosemite 10.10 in a VirtualBox VM.

To investigate further, I created a new Yosemite VM and installed MacPorts,
Xcode, Xcode tools, and then ran port install gtk3 +quartz and port
install gtkmm3 +quartz.  After this, running the gtk3-demo program showed
the same problem that you encountered.

When I look at your YouTube video of the gtk3-demo program, I see that you
have a different theme than the default compiled Adwaita theme.  I was
wondering exactly how you installed the dark theme that you were using?

The dark theme is enabled if you set the GTK_THEME environment
variable in the following way:
GTK_THEME=Adwaita:dark


I have been using gtk3 and gtkmm3 to create software for a coffee roasting
company.  I note that in my software, I have exactly the same problem that
you have found.  I just never noticed it before! :-)

I am not an expert on the Gtk3 and Gtkmm3 libraries.  But maybe if we keep
working on it, a solution will appear.

Yes, I am not a gtk3 expert a well, but I hope that this issue will
get resolved. At least I hope to attract attention of GTK developers.
^__^


It would be good to verify that this
problem occurs on a real MAC and not just on a virtual machine.

I have one report from the user who have experienced the same issue on
the real (non-virtual) machine -
http://www.synfig.org/issues/thebuggenie/synfig/issues/810
But it's better to double-check, of course. I haven't got confirmation
from the bugreporter that the issue is the same...

Also, I can provide the dmg package with the compiled binary, so
anyone can test if the issue happens on the real Mac as well -
http://sourceforge.net/projects/synfig/files/releases/1.0-RC1/osx/synfigstudio-1.0-rc1.dmg/download

BTW, is it OK to forward this message to gtk-app mailing list, maybe
it will be interesting to others?

Best Regards,
Konstantin


On 15-03-05 09:17 AM, Konstantin Dmitriev wrote:

2015-03-03 15:01 GMT+06:00 Vest . vest...@gmail.com:

Hello Konstantin,

I apologize that I probably cannot help you, but I am curious. Do you
have
this issue, if you run a simple demo, where GtkMenu is used?
Because it seems that when you move the mouse outside of the menu's
boundaries, something inside the widget is cleared and the menu
receives
mouse events again.

Kind regards,
Vest

Hello, Vest!

Thank you for responding!
I have tested the gtk3-demo and (surprise!) the issue seems to be
100%-reproducible there. Here I have recorded a video -
http://youtu.be/X_xAHhQN_lY
Have tested this with GTK 3.14.8 and 3.14.9. Also tested on 32bit and
64bit. Issue persists.

I have tried to build with X11 backend and issue doesn't happen. So,
it seems to be Quartz-only.

I can provide a bash script that I use to unwrap all environment
(creates MacPorts installation from scratch in the custom location and
builds our application - Synfig Studio).

Any help/advice is appreciated.

Best Regards,
Konstantin.


On Sat, Feb 28, 2015 at 12:59 PM, Konstantin Dmitriev
ksee.zelga...@gmail.com wrote:

Hello!

My name is Konstantin Dmitriev, I am a maintainer of Synfig Studio
open-source animation software.

Recently we have ported our software from Gtk2 to Gtk3. Unfortunately,
after that we have encountered issues with context menus on OSX - the
context menus are become insensitive sometimes. This happens randomly,
but quite often.

I have recorded a video to illustrate the problem -
http://www.youtube.com/watch?v=Cscz45WeFEs

I am stuck with this issue and don't know how to solve it. Any help,
hints, suggestions are highly appreciated.

Some information about the build environment:
Gtk version 3.14.8, everything built through MacPorts environment.
Gtk backend type: XQuartz.

I will be happy to provide any additional information.
Thank you!

Konstantin.

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel

Re: Gtk3 MacOS (OSX) context menu issues

2015-03-14 Thread Jim Charlton

I forwarded to the list.

Thanks for the response.

jim...


On 15-03-14 09:07 AM, Jim Charlton wrote:



Hi Konstantin:

I wrote to the list earlier to say that I could reproduce the problem
that you have identified.  I am using MAC Yosemite 10.10 in a 
VirtualBox VM.


To investigate further, I created a new Yosemite VM and installed
MacPorts, Xcode, Xcode tools, and then ran port install gtk3 +quartz
and port install gtkmm3 +quartz.  After this, running the gtk3-demo
program showed the same problem that you encountered.

When I look at your YouTube video of the gtk3-demo program, I see that
you have a different theme than the default compiled Adwaita theme.  I
was wondering exactly how you installed the dark theme that you were 
using?


I have been using gtk3 and gtkmm3 to create software for a coffee
roasting company.  I note that in my software, I have exactly the same
problem that you have found.  I just never noticed it before! :-)

I am not an expert on the Gtk3 and Gtkmm3 libraries.  But maybe if we
keep working on it, a solution will appear.  It would be good to verify
that this problem occurs on a real MAC and not just on a virtual 
machine.


Cheers...

jim...   Jim Charlton,


On 15-03-05 09:17 AM, Konstantin Dmitriev wrote:

2015-03-03 15:01 GMT+06:00 Vest . vest...@gmail.com:

Hello Konstantin,

I apologize that I probably cannot help you, but I am curious. Do 
you have

this issue, if you run a simple demo, where GtkMenu is used?
Because it seems that when you move the mouse outside of the menu's
boundaries, something inside the widget is cleared and the menu 
receives

mouse events again.

Kind regards,
Vest

Hello, Vest!

Thank you for responding!
I have tested the gtk3-demo and (surprise!) the issue seems to be
100%-reproducible there. Here I have recorded a video -
http://youtu.be/X_xAHhQN_lY
Have tested this with GTK 3.14.8 and 3.14.9. Also tested on 32bit and
64bit. Issue persists.

I have tried to build with X11 backend and issue doesn't happen. So,
it seems to be Quartz-only.

I can provide a bash script that I use to unwrap all environment
(creates MacPorts installation from scratch in the custom location and
builds our application - Synfig Studio).

Any help/advice is appreciated.

Best Regards,
Konstantin.


On Sat, Feb 28, 2015 at 12:59 PM, Konstantin Dmitriev
ksee.zelga...@gmail.com wrote:

Hello!

My name is Konstantin Dmitriev, I am a maintainer of Synfig Studio
open-source animation software.

Recently we have ported our software from Gtk2 to Gtk3. Unfortunately,
after that we have encountered issues with context menus on OSX - the
context menus are become insensitive sometimes. This happens randomly,
but quite often.

I have recorded a video to illustrate the problem -
http://www.youtube.com/watch?v=Cscz45WeFEs

I am stuck with this issue and don't know how to solve it. Any help,
hints, suggestions are highly appreciated.

Some information about the build environment:
Gtk version 3.14.8, everything built through MacPorts environment.
Gtk backend type: XQuartz.

I will be happy to provide any additional information.
Thank you!

Konstantin.
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list



___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list






___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Gtk3 MacOS (OSX) context menu issues

2015-03-14 Thread Jim Charlton



Hi Konstantin:

I wrote to the list earlier to say that I could reproduce the problem
that you have identified.  I am using MAC Yosemite 10.10 in a VirtualBox VM.

To investigate further, I created a new Yosemite VM and installed
MacPorts, Xcode, Xcode tools, and then ran port install gtk3 +quartz
and port install gtkmm3 +quartz.  After this, running the gtk3-demo
program showed the same problem that you encountered.

When I look at your YouTube video of the gtk3-demo program, I see that
you have a different theme than the default compiled Adwaita theme.  I
was wondering exactly how you installed the dark theme that you were using?

I have been using gtk3 and gtkmm3 to create software for a coffee
roasting company.  I note that in my software, I have exactly the same
problem that you have found.  I just never noticed it before! :-)

I am not an expert on the Gtk3 and Gtkmm3 libraries.  But maybe if we
keep working on it, a solution will appear.  It would be good to verify
that this problem occurs on a real MAC and not just on a virtual machine.

Cheers...

jim...   Jim Charlton,


On 15-03-05 09:17 AM, Konstantin Dmitriev wrote:

2015-03-03 15:01 GMT+06:00 Vest . vest...@gmail.com:

Hello Konstantin,

I apologize that I probably cannot help you, but I am curious. Do you have
this issue, if you run a simple demo, where GtkMenu is used?
Because it seems that when you move the mouse outside of the menu's
boundaries, something inside the widget is cleared and the menu receives
mouse events again.

Kind regards,
Vest

Hello, Vest!

Thank you for responding!
I have tested the gtk3-demo and (surprise!) the issue seems to be
100%-reproducible there. Here I have recorded a video -
http://youtu.be/X_xAHhQN_lY
Have tested this with GTK 3.14.8 and 3.14.9. Also tested on 32bit and
64bit. Issue persists.

I have tried to build with X11 backend and issue doesn't happen. So,
it seems to be Quartz-only.

I can provide a bash script that I use to unwrap all environment
(creates MacPorts installation from scratch in the custom location and
builds our application - Synfig Studio).

Any help/advice is appreciated.

Best Regards,
Konstantin.


On Sat, Feb 28, 2015 at 12:59 PM, Konstantin Dmitriev
ksee.zelga...@gmail.com wrote:

Hello!

My name is Konstantin Dmitriev, I am a maintainer of Synfig Studio
open-source animation software.

Recently we have ported our software from Gtk2 to Gtk3. Unfortunately,
after that we have encountered issues with context menus on OSX - the
context menus are become insensitive sometimes. This happens randomly,
but quite often.

I have recorded a video to illustrate the problem -
http://www.youtube.com/watch?v=Cscz45WeFEs

I am stuck with this issue and don't know how to solve it. Any help,
hints, suggestions are highly appreciated.

Some information about the build environment:
Gtk version 3.14.8, everything built through MacPorts environment.
Gtk backend type: XQuartz.

I will be happy to provide any additional information.
Thank you!

Konstantin.
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list



___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list




___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Gtk3 MacOS (OSX) context menu issues

2015-03-10 Thread Jim Charlton
Just to keep the ball rolling on this...  I tested the gtk3-demo code on 
a jhbuild of gtk+-3.14.5 on a MAC Yosemite 10.10 (virtual machine).  I 
get the same result as Konstantin.  I am compiling with XQuartz.


Funny enough, I had a similar problem with an earlier version of gtk-3 
(3.10.7).  In that case, GtkButtons that were in a window that also 
contained gtkEntry boxes would not respond to cursor unless the cursor 
was moved out ot the window first... or one of the entry boxes was first 
clicked.  But the binary of the compiled code ran fine when it was 
installed (with the gtk libraries on another machine.  Go figure...??  
Certainly something strange going on.


jim...   Jim Charlton




On 15-03-05 09:17 AM, Konstantin Dmitriev wrote:

2015-03-03 15:01 GMT+06:00 Vest . vest...@gmail.com:

Hello Konstantin,

I apologize that I probably cannot help you, but I am curious. Do you have
this issue, if you run a simple demo, where GtkMenu is used?
Because it seems that when you move the mouse outside of the menu's
boundaries, something inside the widget is cleared and the menu receives
mouse events again.

Kind regards,
Vest

Hello, Vest!

Thank you for responding!
I have tested the gtk3-demo and (surprise!) the issue seems to be
100%-reproducible there. Here I have recorded a video -
http://youtu.be/X_xAHhQN_lY
Have tested this with GTK 3.14.8 and 3.14.9. Also tested on 32bit and
64bit. Issue persists.

I have tried to build with X11 backend and issue doesn't happen. So,
it seems to be Quartz-only.

I can provide a bash script that I use to unwrap all environment
(creates MacPorts installation from scratch in the custom location and
builds our application - Synfig Studio).

Any help/advice is appreciated.

Best Regards,
Konstantin.


On Sat, Feb 28, 2015 at 12:59 PM, Konstantin Dmitriev
ksee.zelga...@gmail.com wrote:

Hello!

My name is Konstantin Dmitriev, I am a maintainer of Synfig Studio
open-source animation software.

Recently we have ported our software from Gtk2 to Gtk3. Unfortunately,
after that we have encountered issues with context menus on OSX - the
context menus are become insensitive sometimes. This happens randomly,
but quite often.

I have recorded a video to illustrate the problem -
http://www.youtube.com/watch?v=Cscz45WeFEs

I am stuck with this issue and don't know how to solve it. Any help,
hints, suggestions are highly appreciated.

Some information about the build environment:
Gtk version 3.14.8, everything built through MacPorts environment.
Gtk backend type: XQuartz.

I will be happy to provide any additional information.
Thank you!

Konstantin.
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list



___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: How to make a GtkButton respond to a key press

2015-03-06 Thread Jim Charlton

On 15-03-06 06:52 AM, Michael Torrie wrote:

On 03/05/2015 09:31 PM, Jim Charlton wrote:

I presume you have a callback function connected to the button press
event.  Just create code to intercept the keyboard event and go to a
callback function that sees what key was pressed and then calls the same
function that would have been called had the button been pressed.

The first example I found from Google was
http://stackoverflow.com/questions/10134956/in-simple-gtk-key-press-event-example-gdk-shift-mask-seems-to-be-ignored

You can see the code you need to intercept the keyboard event.

I do exactly this sort of thing in programs with the user being able to
hit a select keyboard key or click the button (although I am using gtkmm3).

No, this is not quite what I am asking for.  Capturing keyboard events
is fine, but I need the button to click visually, for feedback purposes.
  Just like what happens if you define the control key shortcut and press
that.

So the question is either, how can I get GtkButton to respond to a
non-modifier hotkey, or how can I programmatically get GtkButton to
visually depress and release?
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Ah.  I see.  Sorry that I misunderstood.  In my case, I just use the 
button set_sensitive() method to deactivate the button until I am ready 
to reactivate it.  This greys out the button.  I suppose that you could 
use this with a short delay to flash the button.  Or you could just 
flash the button background color.


It seems like gtk just changes/flashes the background color of the 
button when you click it, but I am not sure exactly which method it uses 
to do that.


jim...
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: How to make a GtkButton respond to a key press

2015-03-05 Thread Jim Charlton

On 15-03-05 07:58 PM, Michael Torrie wrote:

Maybe I'm just not reading right, but I cannot figure out how to make a
GtkButton respond to a single key press.  For example, if I made a
simple calculator like the one that comes with Gnome, how can I make it
so when I press '1' on my keyboard, the 1 button presses.  I know how to
make shortcuts with a control key by just putting in an  in the label.
  But not just a bare key press.  Also is it possible to programmatically
depress and then release a GtkButton, simulating a click?  I'd like to
do this to generate some user feedback when the keyboard is used, while
allowing one to still click with a mouse (or finger or whatever) on the
GtkButton.

Pointing me at the right docs would be appreciated.  Gtk3 is fine.
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
I presume you have a callback function connected to the button press 
event.  Just create code to intercept the keyboard event and go to a 
callback function that sees what key was pressed and then calls the same 
function that would have been called had the button been pressed.


The first example I found from Google was
http://stackoverflow.com/questions/10134956/in-simple-gtk-key-press-event-example-gdk-shift-mask-seems-to-be-ignored

You can see the code you need to intercept the keyboard event.

I do exactly this sort of thing in programs with the user being able to 
hit a select keyboard key or click the button (although I am using gtkmm3).


jim...   Jim Charlton
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: gtk3 (GtkTextView) and MacOS

2015-02-27 Thread Jim Charlton

Roger:

I tried your font changing solution to alter the font for my gtk3 
application.  I was unable to change the font by putting gtk-font-name 
in settings.ini regardless of where I put that file or the value of the 
environment variable XDG_CONFIG_HOME... or the actual font name.  I 
found this to be true on both MAC OS X (Yosemite 1010, Gtk3 and Gtkmm3 
built with jhbuild) and on my Linux Ubuntu box.


I can change the font for specific widgets, as I mentioned previously, 
using the override_font method of  Gtk::Widget in Gtkmm.


This is not an actual problem for me as I like the fonts that I am 
getting.  But I just thought that I would mention that there is still 
some magic going on that I, for one, do not understand.


jim...   Jim Charlton

On 15-02-25 10:35 PM, Roger Davis wrote:


Hi all,

So I finally have my problem fully solved for now, and here is a 
summary of the pertinent points. Beware that some of this may only 
apply to the MacPorts install of gtk3, I have no experience with any 
other type of gtk3 install on MacOS.


(1) I had to set my XDG_CONFIG_HOME environment variable to a 
directory of my own creation containing the file gtk-3.0/settings.ini. 
The contents of the latter are


[Settings]
gtk-application-prefer-dark-theme = false
gtk-theme-name = Adwaita
gtk-icon-theme-name = Adwaita
gtk-font-name = Cantarell 12

Use the gtk-font-name to specify a font name and size of your choice, 
but the named font must be MacOS-managed, not X11/fontconfig-managed! 
Meaning, if you were to open up the MacOS FontBook app you should see 
it listed there.


You may be able to set XDG_CONFIG_HOME to any gtk3-installed theme 
directory, e.g., /opt/local/share/themes/HighContrast, but whatever 
font is being used by that theme (or by default) must be similarly 
MacOS-managed.


(2) If you want to use a font that is not already managed by MacOS 
(e.g., Cantarell or any other gtk-ish font not already available in 
native MacOS), you must install it in one of two ways. You can use 
FontBook as recommended by many web sources, but I could not find any 
way to install my fonts in that manner so as to be visible to all 
userIDs. To do the latter I had to manually use the Finder to drag the 
desired .ttf file(s) into /Library/Fonts. See 
http://support.apple.com/en-us/HT201722 for more information.


(3 -- Free Bonus!) Unless you are using a direct gtk-on-Quartz 
implementation (in which case, please tell me if that's working well 
and, if so, how you made it so), you will very likely be using the 
XQuartz X11 server. I have been having intermittent problems with 
XQuartz startup when invoking various X11 clients, the problem being 
that occasionally X11 windows are mapped to the display in an 
unmanaged state (meaning without the MacOS window titlebar and its 
close/iconify/etc. buttons and with no way to move the window anywhere 
else on the display). This does not happen often but it's far from 
rare. When it does happen, it takes XQuartz a *very* long time to 
start (tens of seconds). This problem has been reported by other users 
but I have never seen any clear fix, and I have seen one fix that did 
not work for me at all (changing a Mission Control setting). In my 
case (and probably all the others), the quartz-wm window manager 
either died or was just never started. Fortunately for me at least, 
however, I have so far been able to fix this problem just by manually 
(re?)starting the window manager with


% quartz-wm 

May my luck continue and yours be as good, because this is a truly 
annoying problem!


I hope others find these tips helpful, and thanks again to the list 
members who helped me grope my way to these solutions!


Roger
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: gtk3 (GtkTextView) and MacOS

2015-02-25 Thread Jim Charlton
I had a similar problem with gtk3 and gtkmm3 programs on MacOS X 
(Yosemite) and Linux (Ubuntu).  I am using jhbuild to install the 
gtk/gtkmm libraries on the Mac.  The UI looks fine on Linux but not so 
good on the Mac.  The problem appears to be the theme.


On linux (Ubuntu), using libgtkmm-3.0-dev, compiled programs can have 
their themes changed with Tweak Tool. Having chosen the Ambiance theme, 
I can edit /usr/share/themes/Ambiance/gtk-3.0/gtk.css to @import 
url(gtk-main.css); and then edit 
/usr/share/themes/Ambiance/gtk-3.0/gtk-main.css to customize the theme.


I found (eventually) that I could do the same on the Mac if I set the 
environment variable
XDG_CONFIG_HOME=/path/to/theme/gtk-3.0/ (I am not sure where your themes 
are installed using MacPorts. Perhaps /usr/share/themes/Ambiance or 
whatever).
prior to executing the program. The selected (and perhaps edited) theme 
is then used over the embedded default.
If memory serves me correctly... I was able to copy themes from Linux to 
the Mac and use them.


jim...   JIm Charlton


On 15-02-24 11:18 PM, Roger Davis wrote:

Hi all,

I have an application suite built on gtk3 which is targeted at both 
Linux (specifically CentOS 6 and 7) and MacOS X (Yosemite). Although 
the software is usable under MacOS I am having an ugly cosmetic 
problem there with my GtkTextView widgets, and other visual details 
are also not consistent with CentOS Linux. I suspect this is due to an 
incomplete or misconfigured gnome3 theme/font installation under 
Yosemite. (I am using the MacPorts gtk3/gnome packages.) I am hoping 
that someone here can give some advice on what gnome3 packages I need 
to install and configure to at least solve my GtkTextView problem.


Under Linux my GtkTextView widgets display text nicely with consistent 
and adequate spacing between successive lines of text. There appears 
to be a very consistent 2 or 3 pixels of white space between the 
lowest descenders of line N and the highest ascenders of line N+1. 
Under MacOS, however, the descenders from line N actually touch the 
ascenders of line N+1 and the text is thus hard to read. Furthermore, 
line spacing is not always consistent -- lines with the unicode 
sequence \342\206\222 (right-arrow) have 2 or 3 pixels of additional 
inter-line spacing after the preceding line. (That spacing is actually 
perfect, but I want it for *every* line.)


There appear to be no relevant gtk_text_view_XXX() functions 
controlling inter-line spacing, so I assume this problem is all about 
something that is broken with my gnome3 theme and/or font installation 
under MacOS. Does anyone have any idea of what this might be?


I would very much prefer to configure a gnome3 installation under 
MacOS that is as lightweight as possible. No gtk3 apps other than my 
own are running, and I don't want to force users to have to cope with 
the gnome3 UI any more than is necessary, although if there was a way 
for them to select their own theme (especially with regard to font 
sizing within GtkTextView and other dialog panel widgets) that would 
be a big plus. Another reason for a lightweight gnome3 environment is 
that I've so far been unable to even install the full MacPorts gnome3 
package set (due to a problem with the mojs17 port which seems to be a 
required dependency for many of the gnome3 packages), and I've read 
that many people who did manage to install a full-featured gnome3 
under MacOS never got it to operate.


Following is a list of gtk3- and gnome-related MacPorts packages which 
are now installed on my system, and which are clearly sufficient to 
build my software and run it, albeit with these annoying cosmetic issues:



port list installed | grep gnome

adwaita-icon-theme @3.14.1 gnome/adwaita-icon-theme
at-spi2-atk@2.14.1 gnome/at-spi2-atk
at-spi2-core   @2.14.1 gnome/at-spi2-core
gnome-backgrounds  @3.14.1 gnome/gnome-backgrounds
gnome-icon-theme   @3.12.0 gnome/gnome-icon-theme
gnome-themes-standard  @3.14.0 gnome/gnome-themes-standard
gobject-introspection  @1.42.0 gnome/gobject-introspection
gtk2   @2.24.25gnome/gtk2
gtk3   @3.14.5 gnome/gtk3
hicolor-icon-theme @0.14 gnome/hicolor-icon-theme
icon-naming-utils  @0.8.90 gnome/icon-naming-utils
libcroco   @0.6.8  gnome/libcroco

Can anyone recommend any other packages which are necessary to get my 
GtkTextView objects to display better-looking text? Is there any 
necessary user-environment configuration, e.g., environment variables 
or config files stashed in ~ or elsewhere? (I did try copying the 
~/.config directory from a CentOS 7 system with a functional 
full-blown gnome3 environment, but that didn't make any difference.) 
Are there any gnome3-related system processes which must be running 
before I start a gtk3 app if I want

Re: gtk3 (GtkTextView) and MacOS

2015-02-25 Thread Jim Charlton

Roger:

I don't know if it will help or not... but I have used Gtk::TextView, 
the gtkmm wrapper for GtkTextView and have changed the fonts with the 
class method override_font.


For example

Gtk::TextView tv1;
Pango::FontDescription *pfd = new Pango::FontDescription(Sans 8);
tv1.override_font(*pfd);

This implies that GtkTextView uses pango font descriptors. Perhaps you 
can use the GtkWidget.modify_font() method that will accept a 
PangoFontDescription.


jim...   Jim Charlton



On 15-02-25 03:56 PM, Roger Davis wrote:


Thanks, Jim, your hint on setting XDG_CONFIG_HOME led me to a bunch of 
other useful info on the web that I have been slogging through all 
morning now. I have had some success but am still far from the finish 
line.


On my Mac, if I set XDG_CONFIG_HOME to 
/opt/local/share/themes/HighContrast, which is where MacPorts dumped the
HighContrast theme, and which contains a gtk-3.0 subdirectory with the 
files gtk.css, gtk.gresource and settings.ini, my app successfully 
loads the HighContrast theme, although I still have the same font 
problems within my GtkTextView windows.


Similarly, I can make my own settings.ini file in 
~/gtksettings/gtk-3.0, set XDG_CONFIG_HOME to ~/gtksettings, and my 
app processes that file, but again with the same font issues. That 
file contains a line of the form


   gtk-font-name = fontname fontsize

e.g.,

   gtk-font-name = Sans 10

and I can tweak the fontsize value and successfully get the altered 
font size in my app. However, absolutely nothing that I do to the 
fontname results in the use of a different font. In fact,


   gtk-font-name = FontConfusion 10

still loads exactly the same font!

So, I am now convinced this is some kind of font installation or 
configuration problem. I am guessing that my MacOS gtk3 can't find any 
fonts whatsoever except for this exceptionally unintelligent fallback 
font it seems to be using. Does anyone know where gtk3 is looking for 
its fonts? I've spent quite a while looking for font files on my 
CentOS 7 system where I'm not having font problems, and actually can't 
find many there anywhere! Can anyone give me a reference to some 
decent documentation on where gtk3 font management that describes how 
to name fonts with the gtk-font-name property and how that name is 
associated with an actual font file? I sure have not been able to find 
any on my own!


Thanks again,

Roger


I found (eventually) that I could do the same on the Mac if I set the 
environment variable XDG_CONFIG_HOME=/path/to/theme/gtk-3.0/ (I am 
not sure where your themes are installed using MacPorts. Perhaps 
/usr/share/themes/Ambiance or whatever). prior to executing the 
program. The selected (and perhaps edited) theme is then used over 
the embedded default. If memory serves me correctly... I was able to 
copy themes from

Linux to the Mac and use them.

jim...   JIm Charlton


___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Plotting Library for Gtkmm-3.0 - PlotMM

2015-02-10 Thread Jim Charlton

On 15-02-10 12:50 AM, Murray Cumming wrote:

On Sun, 2015-02-08 at 09:08 -0800, Jim Charlton wrote:

A recent post about charting and plotting software for gtk-3.0
encouraged me to share some modifications I have made to the PlotMM
library originally made available by Andy Thaller
(http://plotmm.sourceforge.net/).

I have made quite extensive modifications to the original library in
order to make it compatible with Gtkmm-3.0.  Most of the the original
functionality remains as described in the link above.

The modified library, with a Makefile for Linux/Ubuntu 14.04.1, is
included in the package, as are notes on the modification I have made.
I have also verified that the code compiles on MAC OS X 10.10 with the
gtk/gtkmm osx libraries installed.

To obtain the package, go to http://jimc.dyndns.org/Mod-Plotmm.

Well done. However, this project would be healthier in the long term if
you put it somewhere like github.




I have to admit that it has been a while since I used git and github.  I 
have attempted to create a repository for the modified Plotmm libraries.


See if you can find the Mod-Plotmm respository under 
charlton01/Mod-Plotmm on github.com.


Jim Charlton

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Plotting Library for Gtkmm-3.0 - PlotMM

2015-02-08 Thread Jim Charlton
A recent post about charting and plotting software for gtk-3.0 
encouraged me to share some modifications I have made to the PlotMM 
library originally made available by Andy Thaller 
(http://plotmm.sourceforge.net/).


I have made quite extensive modifications to the original library in 
order to make it compatible with Gtkmm-3.0.  Most of the the original 
functionality remains as described in the link above.


The modified library, with a Makefile for Linux/Ubuntu 14.04.1, is 
included in the package, as are notes on the modification I have made.  
I have also verified that the code compiles on MAC OS X 10.10 with the 
gtk/gtkmm osx libraries installed.


To obtain the package, go to http://jimc.dyndns.org/Mod-Plotmm.

Jim Charlton
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Problem with MessageDialog boxes

2015-01-06 Thread Jim Charlton
I have been trying to compile some gtkmm code with 
Gtk::MessageDialog().  The icons do not appear and the buttons are 
packed full width of the message box.


Running gtk3-demo shows the same problem.

I am using libgtk-3.0 version number 1401.5.0.  Older versions of 
libraries seem to work OK.


Any hints as to what I might do to get my messagedialog boxes back to 
normal (other than using an older version of the libraries)?


jim...   Jim Charlton

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list