mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2025-02-28 20:16:52 +00:00
2005-02-10 Jeroen Zwartepoorte <jeroen@xs4all.nl>
* sample/Actions.cs: Remove obsolete & unsafe GLib.Object.Data usage. svn path=/trunk/gtk-sharp/; revision=40441
This commit is contained in:
parent
9a715222e4
commit
46007cfd17
|
@ -1,3 +1,7 @@
|
||||||
|
2005-02-10 Jeroen Zwartepoorte <jeroen@xs4all.nl>
|
||||||
|
|
||||||
|
* sample/Actions.cs: Remove obsolete & unsafe GLib.Object.Data usage.
|
||||||
|
|
||||||
2005-02-10 Mike Kestner <mkestner@novell.com>
|
2005-02-10 Mike Kestner <mkestner@novell.com>
|
||||||
|
|
||||||
* configure.in : update version for 1.9.2 release.
|
* configure.in : update version for 1.9.2 release.
|
||||||
|
|
|
@ -8,6 +8,7 @@ namespace GtkSamples {
|
||||||
|
|
||||||
using Gtk;
|
using Gtk;
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
|
||||||
public class Actions {
|
public class Actions {
|
||||||
static VBox box = null;
|
static VBox box = null;
|
||||||
|
@ -18,6 +19,7 @@ namespace GtkSamples {
|
||||||
static ActionGroup dynGroup = null;
|
static ActionGroup dynGroup = null;
|
||||||
static uint mergeId = 0;
|
static uint mergeId = 0;
|
||||||
static UIManager uim = null;
|
static UIManager uim = null;
|
||||||
|
static Hashtable actions = new Hashtable ();
|
||||||
|
|
||||||
/* XML description of the menus for the test app. The parser understands
|
/* XML description of the menus for the test app. The parser understands
|
||||||
* a subset of the Bonobo UI XML format, and uses GMarkup for parsing */
|
* a subset of the Bonobo UI XML format, and uses GMarkup for parsing */
|
||||||
|
@ -297,7 +299,7 @@ namespace GtkSamples {
|
||||||
|
|
||||||
static void OnSelect (object obj, EventArgs args)
|
static void OnSelect (object obj, EventArgs args)
|
||||||
{
|
{
|
||||||
Action action = ((GLib.Object)obj).Data["action"] as Action;
|
Action action = (Action) actions[obj];
|
||||||
if (action.Tooltip != null)
|
if (action.Tooltip != null)
|
||||||
statusbar.Push (0, action.Tooltip);
|
statusbar.Push (0, action.Tooltip);
|
||||||
}
|
}
|
||||||
|
@ -310,7 +312,7 @@ namespace GtkSamples {
|
||||||
static void OnProxyConnect (object obj, ConnectProxyArgs args)
|
static void OnProxyConnect (object obj, ConnectProxyArgs args)
|
||||||
{
|
{
|
||||||
if (args.Proxy is MenuItem) {
|
if (args.Proxy is MenuItem) {
|
||||||
((GLib.Object)args.Proxy).Data ["action"] = args.Action;
|
actions[args.Proxy] = args.Action;
|
||||||
((Item)args.Proxy).Selected += new EventHandler (OnSelect);
|
((Item)args.Proxy).Selected += new EventHandler (OnSelect);
|
||||||
((Item)args.Proxy).Deselected += new EventHandler (OnDeselect);
|
((Item)args.Proxy).Deselected += new EventHandler (OnDeselect);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue