summaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2002-09-12 20:46:03 +0000
committerHavoc Pennington <hp@src.gnome.org>2002-09-12 20:46:03 +0000
commitcfa98e02fcaae0ce49fc94fcbc0bc947ea2ea730 (patch)
tree901b7b3fea3eaeecaf076d2bcff702e0f14741af /src/tools
parentefa3a05a353c98422e0fa9cf6486d5930442e663 (diff)
downloadmetacity-cfa98e02fcaae0ce49fc94fcbc0bc947ea2ea730.tar.gz
metacity-cfa98e02fcaae0ce49fc94fcbc0bc947ea2ea730.tar.bz2
fix compiler warnings
2002-09-12 Havoc Pennington <hp@redhat.com> * src/workspace.c (meta_workspace_screen_index) (meta_workspace_index): fix compiler warnings * src/tools/metacity-window-demo.c (menu_items): add a test for dialogs with no transient parent * src/place.c (find_first_fit): Try placing window at origin of first Xinerama, even if there are no windows to place next to; makes placement work when no other windows are open on the screen.
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/metacity-window-demo.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/tools/metacity-window-demo.c b/src/tools/metacity-window-demo.c
index ca75e2e..695b0f5 100644
--- a/src/tools/metacity-window-demo.c
+++ b/src/tools/metacity-window-demo.c
@@ -258,6 +258,28 @@ modal_dialog_cb (gpointer callback_data,
}
static void
+no_parent_dialog_cb (gpointer callback_data,
+ guint callback_action,
+ GtkWidget *widget)
+{
+ GtkWidget *dialog;
+
+ dialog = gtk_message_dialog_new (NULL,
+ GTK_DIALOG_DESTROY_WITH_PARENT,
+ GTK_MESSAGE_INFO,
+ GTK_BUTTONS_CLOSE,
+ "Here is a dialog with no transient parent");
+
+ /* Close dialog on user response */
+ g_signal_connect (G_OBJECT (dialog),
+ "response",
+ G_CALLBACK (gtk_widget_destroy),
+ NULL);
+
+ gtk_widget_show (dialog);
+}
+
+static void
utility_cb (gpointer callback_data,
guint callback_action,
GtkWidget *widget)
@@ -613,6 +635,7 @@ static GtkItemFactoryEntry menu_items[] =
{ "/Windows/tearoff", NULL, NULL, 0, "<Tearoff>" },
{ "/Windows/_Dialog", "<control>d", dialog_cb, 0, NULL },
{ "/Windows/_Modal dialog", NULL, modal_dialog_cb, 0, NULL },
+ { "/Windows/_Parentless dialog", NULL, no_parent_dialog_cb, 0, NULL },
{ "/Windows/_Utility", "<control>u", utility_cb, 0, NULL },
{ "/Windows/_Splashscreen", "<control>s", splashscreen_cb, 0, NULL },
{ "/Windows/_Top dock", NULL, dock_cb, DOCK_TOP, NULL },