[Xfce4-commits] <libxfce4ui:master> Allow passing parent window to conflict dialog.

Jérôme Guelfucci noreply at xfce.org
Sun Dec 30 15:42:14 CET 2012


Updating branch refs/heads/master
         to b56143b76d5e25ac661252d177cb7f598abfde87 (commit)
       from 4c2a8a1dd003091288f4b86521ae8f3ff7359370 (commit)

commit b56143b76d5e25ac661252d177cb7f598abfde87
Author: Jérôme Guelfucci <jeromeg at xfce.org>
Date:   Thu Dec 20 11:04:20 2012 +0100

    Allow passing parent window to conflict dialog.

 libxfce4kbd-private/xfce-shortcuts.c |    7 ++++---
 libxfce4kbd-private/xfce-shortcuts.h |    3 ++-
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/libxfce4kbd-private/xfce-shortcuts.c b/libxfce4kbd-private/xfce-shortcuts.c
index e569a0e..1985ed4 100644
--- a/libxfce4kbd-private/xfce-shortcuts.c
+++ b/libxfce4kbd-private/xfce-shortcuts.c
@@ -67,7 +67,8 @@ static XfceShortcutConflictMessage conflict_messages[] = {
 
 
 gint
-xfce_shortcut_conflict_dialog (const gchar *owner,
+xfce_shortcut_conflict_dialog (GtkWindow   *parent,
+                               const gchar *owner,
                                const gchar *other,
                                const gchar *shortcut,
                                const gchar *owner_action,
@@ -150,7 +151,7 @@ xfce_shortcut_conflict_dialog (const gchar *owner,
         owner_button_text = g_markup_printf_escaped (_(conflict_messages[i].owner_button_text), owner_action_name);
         other_button_text = g_markup_printf_escaped (_(conflict_messages[i].other_button_text), other_action_name);
 
-        response = xfce_message_dialog (NULL, title, GTK_STOCK_DIALOG_QUESTION,
+        response = xfce_message_dialog (parent, title, GTK_STOCK_DIALOG_QUESTION,
                                         title, secondary_text,
                                         XFCE_BUTTON_TYPE_MIXED, NULL, owner_button_text, GTK_RESPONSE_ACCEPT,
                                         XFCE_BUTTON_TYPE_MIXED, NULL, other_button_text, GTK_RESPONSE_REJECT,
@@ -168,7 +169,7 @@ xfce_shortcut_conflict_dialog (const gchar *owner,
 
   if (G_UNLIKELY (!handled))
     {
-      xfce_message_dialog (NULL, title, GTK_STOCK_DIALOG_ERROR,
+      xfce_message_dialog (parent, title, GTK_STOCK_DIALOG_ERROR,
                            title, _("This shortcut is already being used for something else."),
                            GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE, NULL);
       response = GTK_RESPONSE_REJECT;
diff --git a/libxfce4kbd-private/xfce-shortcuts.h b/libxfce4kbd-private/xfce-shortcuts.h
index 4c7a27a..421c79a 100644
--- a/libxfce4kbd-private/xfce-shortcuts.h
+++ b/libxfce4kbd-private/xfce-shortcuts.h
@@ -26,7 +26,8 @@
 
 G_BEGIN_DECLS
 
-gboolean xfce_shortcut_conflict_dialog (const gchar *owner,
+gboolean xfce_shortcut_conflict_dialog (GtkWindow   *parent,
+                                        const gchar *owner,
                                         const gchar *other,
                                         const gchar *shortcut,
                                         const gchar *owner_action,


More information about the Xfce4-commits mailing list