Re: Pause and resume GtkApplication

2018-01-27 Thread Alexander Koeppe
Hi just FYI: I solved it. The trick was that within the second g_application_run(), the app menu must be attached to the application using gtk_application_set_app_menu() *before* adding the already existing _window_ using gtk_application_add_window() to the application. This way the app-menu is

Re: Pause and resume GtkApplication

2018-01-26 Thread Alexander Koeppe
Thanks to all of you. I try to incorporate all the advisories and hints as best as I can given the constraints underlying. Cheers  -- Alex ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org

Re: Pause and resume GtkApplication

2018-01-26 Thread Chris Vine
On Fri, 26 Jan 2018 11:14:36 +0700 "Lucky B.C" wrote: > Well, in the case, I will tell something about me, first I've never > used the GtkApplication just main window maybe sub windows (dialogs) > too, and my programs did not do as what you are trying to do. Second > I'm a C

Re: Pause and resume GtkApplication

2018-01-25 Thread Lucky B.C
Well, in the case, I will tell something about me, first I've never used the GtkApplication just main window maybe sub windows (dialogs) too, and my programs did not do as what you are trying to do. Second I'm a C programmer, in my opinion, you should redesign your app because sometimes we must do

Re: Pause and resume GtkApplication

2018-01-25 Thread Joël Krähemann
Well, do a context menu and forget about it. In opensuse it is a special package you install for Gnome3 :/ On Fri, Jan 26, 2018 at 12:30 AM, Alexander Koeppe wrote: > It's not really because of async execution. > I just tried various gtk_window functions that trigger the

Re: Pause and resume GtkApplication

2018-01-25 Thread Alexander Koeppe
It's not really because of async execution. I just tried various gtk_window functions that trigger the "window-state-change" event. But not all of them provide the desired effect. e.g. gtk_window_maximize() reappears the app-menu. gtk_window_iconfify() not So I wonder what is the default callback

Re: Pause and resume GtkApplication

2018-01-25 Thread Joël Krähemann
Hi Just some explanation. Your timeout is is dispatched by gtk_main(). As doing your call to the backend, you have to listen on message and then forward the event to the UI. AgsAudio::set-pads() actually is part of my backend. Sends the message. Here you need some async non-blocking call to

Re: Pause and resume GtkApplication

2018-01-25 Thread Joël Krähemann
Hi, Well there was some redundant code. This actually fixes it: http://git.savannah.nongnu.org/cgit/gsequencer.git/tree/ags/X/file/ags_simple_file.c?h=1.5.x#n1904 Bests, Joël On Thu, Jan 25, 2018 at 11:16 PM, Joël Krähemann wrote: > Hi, > You do some async work? Read

Re: Pause and resume GtkApplication

2018-01-25 Thread Joël Krähemann
Hi, You do some async work? Read about: g_timeout_add_full(); and g_main_context_iteration(); You, can callback the to the UI forwarded event. I do something similar as reading a file from a different thread:

Re: Pause and resume GtkApplication

2018-01-25 Thread Alexander Koeppe
Thanks Lucky, Good idea to create the widget right away and hide it until it's time. However, just by accident, I got back the app-menu in the window. Try this with the code below: 1. After I selected "Restart" simulating the pause and resume, the app-menu disappeared. 2. Then I double-clicked

Re: Pause and resume GtkApplication

2018-01-23 Thread Lucky B.C
Wow, I see your problem is that you did not understand what GtkBuilder and Gtk are doing, Because If I'm not wrong, each choice (entry) is a function to start something you want to do after the user/you clicked to the button called "restart". Here's my solution, it's maybe help you. *) You can

Re: Pause and resume GtkApplication

2018-01-23 Thread Alexander Koeppe
I know about the possiblity to fire the low-level functions using an button callback. However this would draw an exception for other UI choices the application has: e.g. text, deamon. Therefore I'm looking for a way to keep the application structure for all UIs the same. There is the test app

Re: Pause and resume GtkApplication

2018-01-22 Thread Lucky B.C
Hi, can you show your demo about the way you did? But I think you should keep the gtk_main() runs, because you can run your low-level functions by "clicked" signal on button. On Jan 23, 2018 03:44, "Alexander Koeppe" wrote: Hi, I have an application where some things