From 2ac0a2cc891fc77afba85c6426e297fa4a055add Mon Sep 17 00:00:00 2001 From: Duncan Mak Date: Fri, 19 Jul 2002 19:05:11 +0000 Subject: [PATCH] 2002-07-20 Duncan Mak * TestSizeGroup.cs: Minor aesthetic changes. * TestStatusbar.cs: Some changes in the output to figure out why it is behaving like this. svn path=/trunk/gtk-sharp/; revision=5946 --- sample/test/ChangeLog | 7 +++++++ sample/test/TestSizeGroup.cs | 2 +- sample/test/TestStatusbar.cs | 22 ++++++++++++++++------ 3 files changed, 24 insertions(+), 7 deletions(-) diff --git a/sample/test/ChangeLog b/sample/test/ChangeLog index e98c37de0..a7accc51a 100644 --- a/sample/test/ChangeLog +++ b/sample/test/ChangeLog @@ -1,3 +1,10 @@ +2002-07-20 Duncan Mak + + * TestSizeGroup.cs: Minor aesthetic changes. + + * TestStatusbar.cs: Some changes in the output to figure out why + it is behaving like this. + 2002-07-19 Duncan Mak * TestSizeGroup.cs: New test for GtkSizeGroup. diff --git a/sample/test/TestSizeGroup.cs b/sample/test/TestSizeGroup.cs index cc49ca9ad..2ac77c013 100644 --- a/sample/test/TestSizeGroup.cs +++ b/sample/test/TestSizeGroup.cs @@ -91,7 +91,7 @@ namespace WidgetViewer { static void Add_Row (Table table, uint row, SizeGroup size_group, string label_text, string [] options) { - Label label = new Label (label_text); + Label label = Label.NewWithMnemonic (label_text); label.SetAlignment (0, 1); table.Attach (label, diff --git a/sample/test/TestStatusbar.cs b/sample/test/TestStatusbar.cs index 50b79dc4d..3bc51fd12 100644 --- a/sample/test/TestStatusbar.cs +++ b/sample/test/TestStatusbar.cs @@ -62,25 +62,35 @@ namespace WidgetViewer { static void pop_clicked (object o, EventArgs args) { - Console.WriteLine ("Pop"); + if (counter < -1) + return; + + Console.WriteLine ("Pop: " + counter); statusbar.Pop (context_id); + + counter --; } static void statusbar_popped (object o, TextPoppedArgs args) { - Console.WriteLine ("statusbar_popped signal"); - Console.WriteLine (args.Text); - Console.WriteLine (args.ContextId); + Console.WriteLine ("Popped: " + counter); } static void statusbar_pushed (object o, EventArgs args) { - string content = String.Format ("Push #{0}", counter); + string content = null; + + if (counter < 0) + content = String.Empty; + else + content = String.Format ("Push #{0}", counter); + + Console.WriteLine ("Push: " + counter); + context_id = statusbar.GetContextId (content); statusbar.Push (context_id, content); counter ++; - return; } static void Close_Button (object o, EventArgs args)