bug with Gtk::ScrolledWindow

2012-10-04 Thread Jonas Platte
Hello, I recently found a bug in gtkmm. I filed a bug report on launchpad (I've got no bugzilla account and didn't really search much at first): https://bugs.launchpad.net/ubuntu/+source/gtkmm3.0/+bug/1055744 Now I want to try to debug it, but I have absolutely no experience in debugging that

Re: bug with Gtk::ScrolledWindow

2012-10-07 Thread Jonas Platte
Am 05.10.2012 06:06, schrieb Ian Martin: On 05/10/12 03:04, Jonas Platte wrote: Hello, I recently found a bug in gtkmm. I filed a bug report on launchpad (I've got no bugzilla account and didn't really search much at first): https://bugs.launchpad.net/ubuntu/+source/gtkmm3.0/+bug/1055744

Re: bug with Gtk::ScrolledWindow

2012-10-08 Thread Jonas Platte
Am 08.10.2012 09:55, schrieb Kjell Ahlstedt: 2012-10-07 21:42, Jonas Platte skrev: Am 05.10.2012 06:06, schrieb Ian Martin: On 05/10/12 03:04, Jonas Platte wrote: Hello, I recently found a bug in gtkmm. I filed a bug report on launchpad (I've got no bugzilla account and didn't really search

Sticking a TreeView-Entry to the bottom

2012-10-29 Thread Jonas Platte
Hey, does anyone know a possibility to stick to last entry of a TreeView to the bottom of the TreeView Widget (e.g. by adding blank space between the last two entries)? ___ gtkmm-list mailing list gtkmm-list@gnome.org

Re: Microsoft Visual Studio 10

2012-11-13 Thread Jonas Platte
Does your stdafx.h have all of the includes it has per default? It doesn't seem so to me. Visual Studio needs some strange headers to be able to compile. Add a new project and copy those includes from there to your stdafx.h Am 11.11.2012 22:57, schrieb Arbol One: Yes, aaahh, MS-VS10 is very

Gtkmm program crashing when started

2012-12-12 Thread Jonas Platte
Hello, I think I need help with a program I wrote. It uses gtkmm and it sometimes crashes without a reason when I start it (segmentation fault). I tried to let it crash when started with debugging and it stopped in /usr/include/glibmm-2.4/glibmm/refptr.h in line 208: pCppObject_-unreference(); //

Re: Gtkmm program crashing when started

2012-12-12 Thread Jonas Platte
Okay it seems that this problem is fixed. I checked if a Glib::RefPtr equaled NULL in the constructor, before it got an initial value. :D I think that thing was static before so it could have made sense sometime. Anyway, thanks Yann :) Am 12.12.2012 14:03, schrieb Jonas Platte: Okay thanks I'll

Gtk::Builder get_object

2013-01-06 Thread Jonas Platte
Hello, I have one obvious question: How to use Gtk::Builder::get_object()? I've got a simple glade file, with some scales that use Gtk::Adjustment's, and I simply want to use these. But I can't use Gtk::Adjustment* pAdj = builder-get_object(adjustment1); or something like that. The compiler

Re: Gtk::Builder get_object

2013-01-07 Thread Jonas Platte
It works! Thanks a lot :) Am 06.01.2013 16:28, schrieb Kjell Ahlstedt: Glib::RefPtrGtk::Adjustment pAdj = Glib::RefPtrGtk::Adjustment::cast_dynamic(builder-get_object(adjustment1)); 2013-01-06 15:13, Jonas Platte skrev: Hello, I have one obvious question: How to use Gtk::Builder

Weird behavior of Gtk::TreeSelection

2013-01-09 Thread Jonas Platte
Hey it's me again with another problem :D I've got two Gtk::TreeViews with static rows, all on depth 0 (except one that can be added / removed). I've packed those TreeViews into a box with a DrawingArea between them to be able to stick the last row to the bottom of the Windows they are in. I need

Building gtkmm on windows

2013-02-07 Thread Jonas Platte
Hello, I'm trying to port my GTK+ 3 program to windows, and because there are no official packages, now am about to build gtkmm (with Visual Studio 2010). If I'm not mistaken, I have to build the depencies for myself too, at least I didn't find any windows packages of glibmm for windows, which

Re: How to use OpenGL with Gtkmm 3?

2013-03-26 Thread Jonas Platte
Am 26.03.2013 15:16, schrieb Gerardo Ballabio: Hi all, can you please tell me whether there's a way to render an OpenGL scene in a gtkmm3 program? You could use the SFMLWidget: https://github.com/LaurentGomila/SFML/wiki/Source%3A-GTK-SFMLWidget Here is how to use OpenGL directly with SFML:

Re: How to use OpenGL with Gtkmm 3?

2013-03-26 Thread Jonas Platte
Am 26.03.2013 16:16, schrieb dAgeCKo: Le 26/03/2013 15:54, Jonas Platte a écrit : Am 26.03.2013 15:16, schrieb Gerardo Ballabio: Hi all, can you please tell me whether there's a way to render an OpenGL scene in a gtkmm3 program? You could use the SFMLWidget: https://github.com/LaurentGomila

Re: wy signal handler could not be override

2013-03-29 Thread Jonas Platte
Am 29.03.2013 12:52, schrieb Klaus Rudolph: I want to override a signal handler in a derived class: class MyRect : public Goocanvas::Rect { public: MyRect( double x, double y, double w, double h): Goocanvas::Rect( x,y,w,h) { } public: bool

Re: wy signal handler could not be override

2013-03-29 Thread Jonas Platte
Am 29.03.2013 13:56, schrieb Klaus Rudolph: I've googled the thing and can't find any mistake in your function. But to make sure you're really overriding the function, you can use the override keyword from C++11, if your compiler supports that. For g++, you can activate C++11 features with the

Re: wy signal handler could not be override

2013-03-29 Thread Jonas Platte
Am 29.03.2013 14:31, schrieb Klaus Rudolph: To override the signal handler is part of the documentation. Looking in the sources shows the virtual functions: virtual bool on_Signal_Name(...); But it seems simply not to work as expected and I have no idea why. I would provide a full

Re: wy signal handler could not be override

2013-03-29 Thread Jonas Platte
Am 29.03.2013 15:05, schrieb Klaus Rudolph: It would be better to declare the override-method as virtual, but I don't think it is necessary. But try that too. Overriding a virtual function needs no additional virtual. What I think is the most probable answer to the question why your

Gtkmm program with strange crashes

2013-04-01 Thread Jonas Platte
Hello, I'm having some weird problem with my Gtkmm program. I updated it to only load one dialog with Gtk::Builder if that dialog is needed. I only changed the time it is loaded and moved it into it's own .ui-file and now my program crashes on usage of this dialog, but _only sometimes and not

giomm DBus service throwing errors on connection establishment

2013-05-17 Thread Jonas Platte
Hello, I don't know if this is the right place to ask but I found nothing especially about giomm. I'm trying to write a basic dbus service. The methods work, but as soon as I use properties I get the following error once per property upon connection establishment (through a Gio::DBus::Proxy in

Re: How to update both the Console and the GTKMM gui window after running other functions

2013-07-31 Thread Jonas Platte
Gtk::Main::run runs until the window is closed. If you want to let the window open while executing code that takes time to finish (like copying many files in an installation), you should create a seperate thread that does those things and updates the UI respectively. For changing the label

Re: How to update both the Console and the GTKMM gui window after running other functions

2013-07-31 Thread Jonas Platte
of example that works). On Wed, 2013-07-31 at 14:19 +0200, Jonas Platte wrote: Gtk::Main::run runs until the window is closed. If you want to let the window open while executing code that takes time to finish (like copying many files in an installation), you should create a seperate thread that does

Re: How to update both the Console and the GTKMM gui window after running other functions

2013-07-31 Thread Jonas Platte
You're problem is that your myLabel class isn't a label but a window. You're deriving it from Gtk::Window. Normally, you wouldn't derive your own label, I wonder what you wanted to accomplish with that... To make clear how you would structure your code with an own Window class normally, here

Re: How to update both the Console and the GTKMM gui window after running other functions

2013-08-01 Thread Jonas Platte
. -- L. James -- L. D. James lja...@apollo3.com mailto:lja...@apollo3.com www.apollo3.com/~ljames On Thu, 2013-08-01 at 02:27 +0200, Jonas Platte wrote: You're problem is that your myLabel class isn't a label but a window. You're deriving it from Gtk::Window. Normally, you wouldn't derive your own

Re: How to update both the Console and the GTKMM gui window after running other functions

2013-08-01 Thread Jonas Platte
www.apollo3.com/~ljames On Thu, 2013-08-01 at 15:43 +0200, Jonas Platte wrote: I understand what kind of application you try to write. But as I already said, this is no good approach to start learning the basics because it's a complicated thing that involves creating a thread that runs

Re: How to update both the Console and the GTKMM gui window after running other functions

2013-08-01 Thread Jonas Platte
7:24 AM, Jonas Platte wrote: It is quite simple to open another thread and call set_text of your label from there. The problem is that this will probably crash your program, as gtkmm is not thread-safe. That's why you need to make sure that your set_text doesn't overlap with the gtk main loop

Re: using TreeView::set_cursor in a function connected to CellRendererText::signal_edited

2013-08-01 Thread Jonas Platte
, Jonas Platte skrev: Hello, I'm having a little problem with editable cells: I have a validity check for data entered into a editable cell, and if it fails, I want to give the user another try to enter something into that same cell. To get the focus to the previously edited cell again after

Re: using TreeView::set_cursor in a function connected to CellRendererText::signal_edited

2013-08-01 Thread Jonas Platte
, you should perhaps ask on the gtk-devel-list or gtk-app-devel-list, but I think you would get similar answers there. There are now 275 open GtkTreeView bugs. Kjell 2013-08-01 19:51, Jonas Platte skrev: I filed a bug report a while ago and no one seems to respond to it. Is this normal? Should

Re: Conflict between windows.h and giomm/dbusmessage.h (2)

2013-08-16 Thread Jonas Platte
I could imagine that the problem is not caused by windows.h, but by winsock.h as the documentation says Gio::Socket uses winsock2 (afaik winsock2.h) and gio(mm) compiles on windows. Have you tried only including giomm.h and windows.h without winsock? If you have no special reason to use

Re: Conflict between windows.h and giomm/dbusmessage.h (2)

2013-08-19 Thread Jonas Platte
I already answered to your previous mail, I don't know why you didn't receive my reply. But you can read it on the mail archive: https://mail.gnome.org/archives/gtkmm-list/2013-August/msg00115.html Am 18.08.2013 15:19, schrieb John Emmas: On 15/08/2013 10:20, John Emmas wrote: I discovered

Re: Trigger an event manually.

2013-08-20 Thread Jonas Platte
Most events have additional methods to trigger them, for Gtk::Button this is clicked(). But why do you want to do that? Am 20.08.2013 10:09, schrieb sourav: I am using Gtkmm and would like to pragmatically fire an event (say like a click event), which simulates the on_button_click event. How

Re: gtkmm 3 win32?

2013-09-02 Thread Jonas Platte
I managed to cross-compile my gtkmm 3 app using a tutorial to compile glade for windows (http://blogs.gnome.org/xjuan/2012/05/29/cross-compiling-glade-for-win32/). The windows libraries that are used there are from the OpenSUSE repositories, which seem to have mingw32-builds of some otherwise

General performance question

2013-09-08 Thread Jonas Platte
Hello, I've got a simple question: In gtkmm, when I want to set a boolean property of any object, like a widget, and I don't know it's current state, should I first check if the state isn't how I want it to be, or should I always call set? For example, in the case I want a widget to get

Re: libgdamm.h: No such file or directory

2014-08-09 Thread Jonas Platte
Hi, What do you want with libgda when you want to use libgdamm? I guess you use a Debian-based distro as you have these other packages (I find them on my Ubuntu 14.04 server). What you need is the package libgdamm5.0-dev, not libgda-5.0-dev. You also don't have to install any of those other

Re: how to set a callback function to an icon in an entry ?

2015-01-22 Thread Jonas Platte
Jonas Platte jonaspla...@gmail.com wrote: There are the methods signal_icon_press() and signal_icon_release() [1] in Gtk::Entry (assuming that's what you're talking about). I think you should be able to connect to one or both of them to create a functioning (secondary) icon clicked handler

Re: how to set a callback function to an icon in an entry ?

2015-01-21 Thread Jonas Platte
There are the methods signal_icon_press() and signal_icon_release() [1] in Gtk::Entry (assuming that's what you're talking about). I think you should be able to connect to one or both of them to create a functioning (secondary) icon clicked handler. [1]

Re: Compilation with gtkmm gives a lot of warnings

2015-01-18 Thread Jonas Platte
There's a simple fix for that: Don't use -Weffc++. The C++ standard library g++ uses (I think it's called libstdc++) doesn't even pass without, or with only a few warnings when having that flag enabled. For example, it warns you about class members that are not explicitly initialized in each

Re: combo box in dialog did not work, not mouse selctable, lots of Gdk-CRITICAL messages on console output

2015-02-18 Thread Jonas Platte
Well, first of all: Your code runs perfectly for me. I compiled it with: g++ main.cpp `pkg-config --cflags --libs gtkmm-3.0` -std=c++11 Which platform do you run on, and could it be that you don't use the default Gtk+ theme you had there in the beginning? IIRC I had similar problems with

Re: combo box in dialog did not work, not mouse selctable, lots of Gdk-CRITICAL messages on console output

2015-02-18 Thread Jonas Platte
Am 18.02.2015 um 19:40 schrieb Klaus Rudolph: Good hint! I run under kde environment. With a gnome desktop it works as expected :-) But is there a way to fix this problem so that the program runs under other desktops/wm also? I run on a fedora 21 with quite new gnome and kde installed. It

Re: combo box in dialog did not work, not mouse selctable, lots of Gdk-CRITICAL messages on console output

2015-02-18 Thread Jonas Platte
Am 18.02.2015 um 20:19 schrieb Klaus Rudolph: Can you give a short code snipped of running a dialog in a different way. Maybe this can be a start point for me. I actually have no idea what I did wrong in my code :-( If I could I had already done that. Like I said, I can't remember to have

Re: how to shrink a window

2015-02-18 Thread Jonas Platte
set_default_size() is for the default size, set_size_request() is for the minimum size – it's called size request because it's a requenst to the window manager to not let the user shrink the window further, which it can ignore (i3-wm does that for example). What you want is resize():

Re: cross-mingw compiled gtkmm application crashes in libstdc++-6

2015-02-09 Thread Jonas Platte
That call stack doesn't have any symbols from gtkmm / glibmm / gtk+ / glib in it. Either I am completely overlooked something or this doesn't have anything to do with gtkmm. I had a look at the bug report.. Again, did I overlook something obvious? Because I can't find any reference to the code

Re: Using C++11

2015-06-30 Thread Jonas Platte
Am 30.06.2015 um 13:44 schrieb Murray Cumming: On Tue, 2015-06-30 at 12:16 +0100, Chris Vine wrote: On Tue, 30 Jun 2015 12:06:46 +0200 Murray Cumming murr...@murrayc.com wrote: I would guess that it is because fedora is a fast moving distribution and they like to press ahead with what

Re: C++11: Make all destructors noexcept?

2015-08-29 Thread Jonas Platte
Am 29.08.2015 um 17:39 schrieb Murray Cumming: I wonder, does anyone know if any of our destructors could currently throw an exception, or if it's conceivable for any of them to throw exceptions? If we could make our destructors noexcept (and if that doesn't break ABI) then we could make

Re: C++11: Make all destructors noexcept?

2015-08-30 Thread Jonas Platte
Am 30.08.2015 um 11:34 schrieb Murray Cumming: On Sat, 2015-08-29 at 17:53 +0200, Jonas Platte wrote: Most destructors are noexcept(true) by default in C++11 already [1]. If some class in *mm has a destructor that can throw exceptions, it's likely to be broken already. [1]: http

Re: Implementing swap()

2015-09-10 Thread Jonas Platte
Am 10.09.2015 um 23:11 schrieb Murray Cumming: > Now that our Glib::Objects and Gtk::Widgets are movable, so they can be > placed in standard containers, I guess we should implement swap() so the > standard containers can use that too. And maybe it's just generally good > practice to provide a

Re: Replace Gtk::manage() with std::unique_ptr<>?

2016-02-08 Thread Jonas Platte
Am 08.02.2016 um 21:27 schrieb Jonathan Wakely: > No, std::make_unique is only available since C++14, std::make_shared > was in C++11. Right, thanks for correcting me. Don't know why I thought it was the other way around. ___ gtkmm-list mailing list

Re: Replace Gtk::manage() with std::unique_ptr<>?

2016-02-08 Thread Jonas Platte
Am 08.02.2016 um 21:50 schrieb Murray Cumming: > On Mon, 2016-02-08 at 21:13 +0100, Jonas Platte wrote: >> Am 08.02.2016 um 20:42 schrieb Murray Cumming: >>> Thanks. But that wouldn't involve a std::unique_ptr<> at all. It >>> doesn't feel much different t

Re: Replace Gtk::manage() with std::unique_ptr<>?

2016-02-08 Thread Jonas Platte
So, I've read most of this conversation, and it seems this simple alternative hasn't come up yet: // Old code auto button = Gtk::manage(new Gtk::Button("a button"); button->show(); container.add(button); // New code auto button = container.add_managed("a button"); button->show();

Re: Replace Gtk::manage() with std::unique_ptr<>?

2016-02-08 Thread Jonas Platte
Am 08.02.2016 um 20:42 schrieb Murray Cumming: > Thanks. But that wouldn't involve a std::unique_ptr<> at all. It > doesn't feel much different than what we have with Gtk::manage(). Well, you could still deprecate Gtk::manage and use std::make_unique in the implementation and reduce the