2002-07-23 Duncan Mak <duncan@ximian.com>
* TestMenus.cs: Use MenuItem instead of ImageMenuItem, this test works now. * TestFileSelection.cs: window.Selections is crashing, remove it. OK Button doesn't do anything now. * WidgetViewer.cs: Add in a frame. svn path=/trunk/gtk-sharp/; revision=6021
This commit is contained in:
parent
738aef2a29
commit
2f44d60039
5 changed files with 26 additions and 17 deletions
|
@ -1,3 +1,13 @@
|
|||
2002-07-23 Duncan Mak <duncan@ximian.com>
|
||||
|
||||
* TestMenus.cs: Use MenuItem instead of ImageMenuItem, this test
|
||||
works now.
|
||||
|
||||
* TestFileSelection.cs: window.Selections is crashing, remove
|
||||
it. OK Button doesn't do anything now.
|
||||
|
||||
* WidgetViewer.cs: Add in a frame.
|
||||
|
||||
2002-07-20 Duncan Mak <duncan@ximian.com>
|
||||
|
||||
* TestSizeGroup.cs: Minor aesthetic changes.
|
||||
|
|
|
@ -7,4 +7,4 @@ all:
|
|||
TestDialog.cs TestFlipping.cs TestMenus.cs TestSizeGroup.cs \
|
||||
WidgetViewer.cs
|
||||
clean:
|
||||
rm -f *.exe *~
|
||||
rm -f *.exe
|
||||
|
|
|
@ -39,7 +39,6 @@ namespace WidgetViewer {
|
|||
|
||||
static void file_selection_ok (object o, EventArgs args)
|
||||
{
|
||||
Console.WriteLine (window.Selections);
|
||||
}
|
||||
|
||||
static void show_fileops (object o, EventArgs args)
|
||||
|
|
|
@ -30,13 +30,11 @@ namespace WidgetViewer {
|
|||
box1.PackStart (menubar, false, false, 0);
|
||||
|
||||
Menu menu = Create_Menu (2, true);
|
||||
|
||||
MenuItem menuitem = new MenuItem ("test\nline2");
|
||||
|
||||
MenuItem menuitem = new MenuItem ("foo");
|
||||
menuitem.Submenu = menu;
|
||||
menubar.Append (menuitem);
|
||||
|
||||
menuitem = new MenuItem ("foo");
|
||||
menuitem = new MenuItem ("bar");
|
||||
menuitem.Submenu = Create_Menu (3, true);
|
||||
menubar.Append (menuitem);
|
||||
|
||||
|
@ -59,7 +57,7 @@ namespace WidgetViewer {
|
|||
|
||||
VBox box2 = new VBox (false, 10);
|
||||
box2.BorderWidth = 10;
|
||||
box1.PackStart (box1, true, true, 0);
|
||||
box1.PackStart (box2, true, true, 0);
|
||||
|
||||
menu = Create_Menu (1, false);
|
||||
menu.AccelGroup = accel_group;
|
||||
|
@ -103,14 +101,13 @@ namespace WidgetViewer {
|
|||
|
||||
static Menu Create_Menu (int depth, bool tearoff)
|
||||
{
|
||||
Console.WriteLine ("Depth: " + depth);
|
||||
if (depth < 1)
|
||||
return null;
|
||||
|
||||
Menu menu = new Menu ();
|
||||
MenuItem menuitem = null;
|
||||
string label = null;
|
||||
GLib.SList group = null;
|
||||
GLib.SList group = new GLib.SList (IntPtr.Zero);
|
||||
|
||||
if (tearoff) {
|
||||
menuitem = new TearoffMenuItem ();
|
||||
|
@ -121,12 +118,9 @@ namespace WidgetViewer {
|
|||
for (int i = 0, j = 1; i < 5; i++, j++) {
|
||||
|
||||
label = String.Format ("item {0} - {1}", depth, j);
|
||||
Console.WriteLine ("label: " + label);
|
||||
menuitem = RadioMenuItem.NewWithLabel (group, label);
|
||||
|
||||
|
||||
group = ((RadioMenuItem) menuitem).Group;
|
||||
Console.WriteLine ("Pass");
|
||||
// menuitem = RadioMenuItem.NewWithLabel (group, label);
|
||||
// group = ((RadioMenuItem) menuitem).Group;
|
||||
menuitem = new MenuItem (label);
|
||||
menu.Append (menuitem);
|
||||
|
||||
if (i == 3)
|
||||
|
|
|
@ -28,10 +28,15 @@ namespace WidgetViewer {
|
|||
|
||||
VBox box1 = new VBox (false, 0);
|
||||
window.Add (box1);
|
||||
|
||||
|
||||
box2 = new VBox (false, 5);
|
||||
box2.BorderWidth = 10;
|
||||
box1.PackStart (box2, true, true, 0);
|
||||
|
||||
Frame frame = new Frame ("Select a widget");
|
||||
frame.BorderWidth = 5;
|
||||
frame.Add (box2);
|
||||
|
||||
box1.PackStart (frame, true, true, 0);
|
||||
|
||||
AddButton ("Bi-directional flipping", new EventHandler (Flipping));
|
||||
AddButton ("Check Buttons", new EventHandler (Check_Buttons));
|
||||
|
@ -82,6 +87,7 @@ namespace WidgetViewer {
|
|||
static void Viewer_Delete (object o, DeleteEventArgs args)
|
||||
{
|
||||
viewer.Destroy ();
|
||||
viewer = null;
|
||||
args.RetVal = true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue