This repository has been archived by the owner on Feb 8, 2018. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2008-08-06 Mike Kestner <mkestner@novell.com>
* *: Update to GNOME 2.23.5 API. Add gnome-print-sharp.dll and gnome-panel-sharp.dll assemblies, along with .pcs to detect their availability. svn path=/trunk/gnome-desktop-sharp/; revision=109795
- Loading branch information
Showing
42 changed files
with
4,080 additions
and
151 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
SUBDIRS = . glue | ||
|
||
if ENABLE_GNOME_PANEL | ||
pkg = gnome-panel | ||
pkgversion = 2.24 | ||
pkgconfigdir = $(libdir)/pkgconfig | ||
pkgconfig_DATA = gnome-panel-sharp-2.24.pc | ||
else | ||
pkg = | ||
pkgversion = | ||
endif | ||
|
||
API_VERSION=2.24.0.0 | ||
INCLUDE_API = | ||
METADATA = metadata | ||
references = | ||
glue_args = --glue-includes=panel-applet.h --gluelib-name=gnomepanelsharpglue-2 --glue-filename=glue/generated.c | ||
|
||
sources = \ | ||
PanelAppletFactory.cs | ||
|
||
customs = \ | ||
PanelApplet.custom | ||
|
||
add_dist = gnome-panel-sharp-2.24.pc.in gnome-panel-sharp.dll.config.in | ||
|
||
include ../Makefile.include | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
[DllImport ("panel-applet-2")] | ||
static extern void panel_applet_setup_menu (IntPtr handle, IntPtr xml, BonoboUIVerb[] items, IntPtr user_data); | ||
|
||
public void SetupMenu (string xml, BonoboUIVerb[] items) | ||
{ | ||
BonoboUIVerb[] nulled_items = new BonoboUIVerb[items.Length + 1]; | ||
Array.Copy (items, nulled_items, items.Length); | ||
nulled_items[items.Length] = new BonoboUIVerb (null, null); | ||
IntPtr native = GLib.Marshaller.StringToPtrGStrdup (xml); | ||
panel_applet_setup_menu (Handle, native, nulled_items, IntPtr.Zero); | ||
GLib.Marshaller.Free (native); | ||
PersistentData ["setup_menu_verbs"] = items; | ||
} | ||
|
||
public abstract void Creation (); | ||
|
||
public abstract string IID { | ||
get; | ||
} | ||
|
||
public abstract string FactoryIID { | ||
get; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
// Gnome.PanelAppletFactory.cs - PanelAppletFactory class impl | ||
// | ||
// Copyright (c) 2004-2005 Novell, Inc. | ||
// | ||
// This code is inserted after the automatically generated code. | ||
// | ||
// This program is free software; you can redistribute it and/or | ||
// modify it under the terms of version 2 of the Lesser GNU General | ||
// Public License as published by the Free Software Foundation. | ||
// | ||
// This program is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
// Lesser General Public License for more details. | ||
// | ||
// You should have received a copy of the GNU Lesser General Public | ||
// License along with this program; if not, write to the | ||
// Free Software Foundation, Inc., 59 Temple Place - Suite 330, | ||
// Boston, MA 02111-1307, USA. | ||
|
||
|
||
|
||
using System; | ||
using System.Reflection; | ||
using System.Runtime.InteropServices; | ||
|
||
namespace Gnome | ||
{ | ||
public class PanelAppletFactory | ||
{ | ||
private PanelAppletFactory () {} | ||
|
||
private static string _IID; | ||
private static string _factoryIID; | ||
private static GnomeSharp.PanelAppletFactoryCallbackWrapper cb_wrapper; | ||
|
||
public static void Register (Type applet_type) | ||
{ | ||
PanelApplet applet = (PanelApplet) Activator.CreateInstance (applet_type, BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance | BindingFlags.CreateInstance, null, new object[] {IntPtr.Zero}, null); | ||
|
||
cb_wrapper = new GnomeSharp.PanelAppletFactoryCallbackWrapper (new PanelAppletFactoryCallback (Creation)); | ||
_IID = applet.IID; | ||
_factoryIID = applet.FactoryIID; | ||
IntPtr native_iid = GLib.Marshaller.StringToPtrGStrdup (_factoryIID); | ||
panel_applet_factory_main (native_iid, ((GLib.GType) applet_type).Val, cb_wrapper.NativeDelegate, IntPtr.Zero); | ||
GLib.Marshaller.Free (native_iid); | ||
} | ||
|
||
private static bool Creation (PanelApplet applet, string iid) | ||
{ | ||
if (_IID != iid) | ||
return false; | ||
applet.Creation (); | ||
return true; | ||
} | ||
|
||
[DllImport("panel-applet-2")] | ||
static extern int panel_applet_factory_main(IntPtr iid, IntPtr applet_type, GnomeSharp.PanelAppletFactoryCallbackNative cb, IntPtr data); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
lib_LTLIBRARIES = $(TARGET) | ||
|
||
if ENABLE_GNOME_PANEL | ||
TARGET = libgnomepanelsharpglue-2.la | ||
else | ||
TARGET = | ||
endif | ||
|
||
libgnomepanelsharpglue_2_la_SOURCES = panelapplet.c | ||
|
||
nodist_libgnomepanelsharpglue_2_la_SOURCES = generated.c | ||
|
||
libgnomepanelsharpglue_2_la_LDFLAGS = -module -avoid-version -no-undefined | ||
|
||
libgnomepanelsharpglue_2_la_LIBADD = $(GNOME_PANEL_LIBS) | ||
|
||
INCLUDES = $(GNOME_PANEL_CFLAGS) -I$(top_srcdir) | ||
|
||
libgnomepanelsharpglue.dll: $(libgnomepanelsharpglue_2_la_OBJECTS) libgnomepanelsharpglue.rc libgnomepanelsharpglue.def | ||
./build-dll libgnomepanelsharpglue-2 $(VERSION) | ||
|
||
CLEANFILES = lib*.a lib*.dll | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#include <panel-applet.h> | ||
|
||
typedef struct _ContextMenuItem | ||
{ | ||
const gchar *verb; | ||
gpointer callback; | ||
} ContextMenuItem; | ||
|
||
void panelapplet_setup_menu (PanelApplet *applet, const gchar *xml, ContextMenuItem *menuitems, gint cnt); | ||
|
||
void | ||
panelapplet_setup_menu (PanelApplet *applet, const gchar *xml, ContextMenuItem *menuitems, gint cnt) | ||
{ | ||
int i; | ||
BonoboUIVerb *menu_verbs = NULL; | ||
|
||
menu_verbs = g_new0 (BonoboUIVerb, cnt + 1); | ||
|
||
for (i = 0; i < cnt; i++) { | ||
menu_verbs[i].cname = menuitems[i].verb; | ||
menu_verbs[i].cb = menuitems[i].callback; | ||
menu_verbs[i].user_data = NULL; | ||
} | ||
menu_verbs[cnt].cname = NULL; | ||
menu_verbs[cnt].cb = NULL; | ||
menu_verbs[cnt].user_data = NULL; | ||
panel_applet_setup_menu (applet, xml, menu_verbs, NULL); | ||
g_free (menu_verbs); | ||
} |
Oops, something went wrong.