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 need to be setup in the UI, then
some low-level routines to be executed using the setup values and then
resuming the UI loop for further operation.

Since I'm migrating the GTK code from GTK2/3 compatible to GNOME/GTK3, I
make use of g_application_run().

However, I find no simialar way to interrupt the loop (e.g.
gtk_main_quit()) and resuming the UI later (gtk_main()).

The only way I found yet is to quit the application using
g_application_quit() but keep the window widget, clearing the
application (g_object_unref()) and creating a new application after
executing the low-level routines and finally adding the still existing
window widget to this new application using
gtk_application_add_window(). This way I can reuse the window and avoid
any flickering which is the required effect.

The only caveat is, the added window is not considered being the primary
instance of the second application, hence the app-menu isn't displayed.

Is there any way to define a window added being the primary instance of
the application or to show the app-menu (set using
gtk_application_set_app_menu()) in such an non-primary window, or even a
complete different approach?


Thanks and regards

- Alex


___
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


Pause and resume GtkApplication

2018-01-22 Thread Alexander Koeppe
Hi,

I have an application where some things need to be setup in the UI, then
some low-level routines to be executed using the setup values and then
resuming the UI loop for further operation.

Since I'm migrating the GTK code from GTK2/3 compatible to GNOME/GTK3, I
make use of g_application_run().

However, I find no simialar way to interrupt the loop (e.g.
gtk_main_quit()) and resuming the UI later (gtk_main()).

The only way I found yet is to quit the application using
g_application_quit() but keep the window widget, clearing the
application (g_object_unref()) and creating a new application after
executing the low-level routines and finally adding the still existing
window widget to this new application using
gtk_application_add_window(). This way I can reuse the window and avoid
any flickering which is the required effect.

The only caveat is, the added window is not considered being the primary
instance of the second application, hence the app-menu isn't displayed.

Is there any way to define a window added being the primary instance of
the application or to show the app-menu (set using
gtk_application_set_app_menu()) in such an non-primary window, or even a
complete different approach?


Thanks and regards

- Alex


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


Scrolling a GtkTreeview cell

2018-01-22 Thread Kian Karas
Hi,

I have a GtkTreeview with size constraints, which causes the text of one
particular column in one particular row not to fit into its cell.

Is there a way for the user to scroll the content of a specific cell (i.e.
a specific column in the current highlighted row) - e.g. with the keyboard
arrow keys, when the GtkTreeview has focus?

My GtkTreeview has two columns and multiple rows. It is currently only one
particular row in my right column that suffers from this issue. However, it
would be great if the solution would be general enough to support scrolling
of the right column of any row (if the content do not fit). I do not expect
to have this issue on my left column. The right column only ever contains
text (GtkCellRendererText).

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