summaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2002-04-12 23:00:46 +0000
committerHavoc Pennington <hp@src.gnome.org>2002-04-12 23:00:46 +0000
commitf965726d15950bc4e83409fe73bb2b7588781e81 (patch)
tree58a9446fd2591e67028600d9a4c0e90fb1ecfe1d /src/tools
parent38ff6a49c4c8584dda82eeccfb5a447cfdfdcfef (diff)
downloadmetacity-f965726d15950bc4e83409fe73bb2b7588781e81.tar.gz
metacity-f965726d15950bc4e83409fe73bb2b7588781e81.tar.bz2
make one of the toolbar buttons lock up the demo
2002-04-12 Havoc Pennington <hp@redhat.com> * src/tools/metacity-window-demo.c (do_appwindow): make one of the toolbar buttons lock up the demo * src/window.c (meta_window_delete): move error trap to be around a narrower part of the function, and add part of the ping stuff, nothing user-visible yet * src/metacity-dialog.c (main): metacity-dialog executable to live in libexecdir and pop up dialogs for us.
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/metacity-window-demo.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/tools/metacity-window-demo.c b/src/tools/metacity-window-demo.c
index 96a65d0..dc64952 100644
--- a/src/tools/metacity-window-demo.c
+++ b/src/tools/metacity-window-demo.c
@@ -22,6 +22,7 @@
#include <gtk/gtk.h>
#include <gdk/gdkx.h>
#include <X11/Xatom.h>
+#include <unistd.h>
static GtkWidget* do_appwindow (void);
@@ -473,6 +474,13 @@ static GtkItemFactoryEntry menu_items[] =
};
static void
+sleep_cb (GtkWidget *button,
+ gpointer data)
+{
+ sleep (1000);
+}
+
+static void
toolbar_cb (GtkWidget *button,
gpointer data)
{
@@ -611,9 +619,9 @@ do_appwindow (void)
gtk_toolbar_insert_stock (GTK_TOOLBAR (toolbar),
GTK_STOCK_OPEN,
- "This is a demo button with an 'open' icon",
+ "This is a demo button that locks up the demo",
NULL,
- G_CALLBACK (toolbar_cb),
+ G_CALLBACK (sleep_cb),
window, /* user data for callback */
-1); /* -1 means "append" */