[Xfce4-commits] [apps/ristretto] 01/01: Resolve "GtkDialog mapped without a transient parent" for set wallpaper dialogs
noreply at xfce.org
noreply at xfce.org
Thu Aug 1 19:44:45 CEST 2019
This is an automated email from the git hooks/post-receive script.
f 2 4 0 4 p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository apps/ristretto.
commit 653953f004c284ab802c112bd070c2b45181a29e
Author: Igor <f2404 at yandex.ru>
Date: Thu Aug 1 13:44:02 2019 -0400
Resolve "GtkDialog mapped without a transient parent" for set wallpaper dialogs
---
src/gnome_wallpaper_manager.c | 4 +++-
src/main_window.c | 2 +-
src/wallpaper_manager.c | 5 +++--
src/wallpaper_manager.h | 5 +++--
src/xfce_wallpaper_manager.c | 4 +++-
5 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/src/gnome_wallpaper_manager.c b/src/gnome_wallpaper_manager.c
index 658bcca..268e321 100644
--- a/src/gnome_wallpaper_manager.c
+++ b/src/gnome_wallpaper_manager.c
@@ -101,7 +101,8 @@ enum
static gint
rstto_gnome_wallpaper_manager_configure_dialog_run (
RsttoWallpaperManager *self,
- RsttoFile *file)
+ RsttoFile *file,
+ GtkWindow *parent)
{
RsttoGnomeWallpaperManager *manager = RSTTO_GNOME_WALLPAPER_MANAGER (self);
gint response = GTK_RESPONSE_OK;
@@ -120,6 +121,7 @@ rstto_gnome_wallpaper_manager_configure_dialog_run (
configure_monitor_chooser_pixbuf (manager);
+ gtk_window_set_transient_for (GTK_WINDOW (manager->priv->dialog), parent);
response = gtk_dialog_run (GTK_DIALOG (manager->priv->dialog));
gtk_widget_hide (manager->priv->dialog);
if ((response == GTK_RESPONSE_OK) || (response == GTK_RESPONSE_APPLY))
diff --git a/src/main_window.c b/src/main_window.c
index 638a433..d250dfa 100644
--- a/src/main_window.c
+++ b/src/main_window.c
@@ -2373,7 +2373,7 @@ cb_rstto_main_window_set_as_wallpaper (GtkWidget *widget, RsttoMainWindow *windo
response = GTK_RESPONSE_APPLY;
while (GTK_RESPONSE_APPLY == response)
{
- response = rstto_wallpaper_manager_configure_dialog_run (window->priv->wallpaper_manager, file);
+ response = rstto_wallpaper_manager_configure_dialog_run (window->priv->wallpaper_manager, file, GTK_WINDOW (window));
switch (response)
{
case GTK_RESPONSE_OK:
diff --git a/src/wallpaper_manager.c b/src/wallpaper_manager.c
index 8d3ee04..0e24b83 100644
--- a/src/wallpaper_manager.c
+++ b/src/wallpaper_manager.c
@@ -32,9 +32,10 @@
gint
rstto_wallpaper_manager_configure_dialog_run (
RsttoWallpaperManager *self,
- RsttoFile *file)
+ RsttoFile *file,
+ GtkWindow *parent)
{
- return RSTTO_WALLPAPER_MANAGER_GET_IFACE (self)->configure_dialog_run(self, file);
+ return RSTTO_WALLPAPER_MANAGER_GET_IFACE (self)->configure_dialog_run (self, file, parent);
}
gboolean
diff --git a/src/wallpaper_manager.h b/src/wallpaper_manager.h
index 91a0fae..8990228 100644
--- a/src/wallpaper_manager.h
+++ b/src/wallpaper_manager.h
@@ -46,7 +46,7 @@ typedef struct _RsttoWallpaperManagerIface RsttoWallpaperManagerIface;
struct _RsttoWallpaperManagerIface {
GTypeInterface parent;
- gint (*configure_dialog_run) (RsttoWallpaperManager *self, RsttoFile *file);
+ gint (*configure_dialog_run) (RsttoWallpaperManager *self, RsttoFile *file, GtkWindow *parent);
gboolean (*set) (RsttoWallpaperManager *self, RsttoFile *file);
gboolean (*check_running) (RsttoWallpaperManager *self);
};
@@ -60,7 +60,8 @@ rstto_wallpaper_manager_check_running (RsttoWallpaperManager *self);
gint
rstto_wallpaper_manager_configure_dialog_run (
RsttoWallpaperManager *self,
- RsttoFile *file);
+ RsttoFile *file,
+ GtkWindow *parent);
gboolean
rstto_wallpaper_manager_set (
diff --git a/src/xfce_wallpaper_manager.c b/src/xfce_wallpaper_manager.c
index d770885..a00ba24 100644
--- a/src/xfce_wallpaper_manager.c
+++ b/src/xfce_wallpaper_manager.c
@@ -210,7 +210,8 @@ retrieve_monitor_name (gint monitor_id)
static gint
rstto_xfce_wallpaper_manager_configure_dialog_run (
RsttoWallpaperManager *self,
- RsttoFile *file)
+ RsttoFile *file,
+ GtkWindow *parent)
{
RsttoXfceWallpaperManager *manager = RSTTO_XFCE_WALLPAPER_MANAGER (self);
gint response = 0;
@@ -229,6 +230,7 @@ rstto_xfce_wallpaper_manager_configure_dialog_run (
configure_monitor_chooser_pixbuf (manager);
+ gtk_window_set_transient_for (GTK_WINDOW (manager->priv->dialog), parent);
response = gtk_dialog_run (GTK_DIALOG (manager->priv->dialog));
gtk_widget_hide (manager->priv->dialog);
if ((response == GTK_RESPONSE_OK) || (response == GTK_RESPONSE_APPLY))
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list