From def21c26e7c517b3abd8db299b8601742bccbafd Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Mon, 9 Nov 2015 20:58:24 +0100 Subject: Fork from Ubuntu's libappindicator project. --- bindings/Makefile.am | 2 + bindings/mono/ApplicationIndicator.custom | 14 +- bindings/mono/AssemblyInfo.cs | 10 +- bindings/mono/Makefile.am | 26 +-- bindings/mono/TestAyatanaIndicator.cs | 82 +++++++++ bindings/mono/TestIndicator.cs | 82 --------- bindings/mono/app-indicator.sources.xml.in | 6 +- bindings/mono/appindicator-sharp-0.1.pc.in | 12 -- bindings/mono/appindicator-sharp.dll.config.in | 7 - bindings/mono/appindicator-sharp.snk | Bin 596 -> 0 bytes bindings/mono/ayatana-appindicator-sharp-0.1.pc.in | 12 ++ .../mono/ayatana-appindicator-sharp.dll.config.in | 7 + bindings/mono/ayatana-appindicator-sharp.snk | Bin 0 -> 596 bytes bindings/mono/examples/AyatanaIndicatorExample.cs | 61 +++++++ bindings/mono/examples/IndicatorExample.cs | 61 ------- bindings/mono/examples/Makefile.am | 7 +- .../mono/examples/ayatana-indicator-example.in | 2 + bindings/mono/examples/indicator-example.in | 2 - bindings/mono/libappindicator-api.metadata | 66 ------- bindings/mono/libayatana-appindicator-api.metadata | 66 +++++++ .../mono/policy.0.0.appindicator-sharp.config.in | 10 -- ...policy.0.0.ayatana-appindicator-sharp.config.in | 10 ++ .../mono/policy.0.1.appindicator-sharp.config.in | 10 -- ...policy.0.1.ayatana-appindicator-sharp.config.in | 10 ++ bindings/python/Makefile.am | 25 +-- bindings/python/__init__.py | 2 +- bindings/python/appindicator-arg-types.py | 2 +- bindings/python/appindicator.defs | 200 --------------------- bindings/python/appindicator.override.in | 65 ------- bindings/python/appindicatormodule.c | 49 ----- bindings/python/ayatana_appindicator.defs | 200 +++++++++++++++++++++ bindings/python/ayatana_appindicator.override.in | 65 +++++++ bindings/python/ayatana_appindicatormodule.c | 51 ++++++ bindings/vala/Makefile.am | 13 +- bindings/vala/appindicator-0.1-custom.vala | 31 ---- bindings/vala/ayatana-appindicator-0.1-custom.vala | 31 ++++ bindings/vala/examples/Makefile.am | 23 +-- .../vala/examples/ayatana-indicator-example.vala | 66 +++++++ bindings/vala/examples/indicator-example.vala | 66 ------- 39 files changed, 732 insertions(+), 722 deletions(-) create mode 100644 bindings/mono/TestAyatanaIndicator.cs delete mode 100644 bindings/mono/TestIndicator.cs delete mode 100644 bindings/mono/appindicator-sharp-0.1.pc.in delete mode 100644 bindings/mono/appindicator-sharp.dll.config.in delete mode 100644 bindings/mono/appindicator-sharp.snk create mode 100644 bindings/mono/ayatana-appindicator-sharp-0.1.pc.in create mode 100644 bindings/mono/ayatana-appindicator-sharp.dll.config.in create mode 100644 bindings/mono/ayatana-appindicator-sharp.snk create mode 100644 bindings/mono/examples/AyatanaIndicatorExample.cs delete mode 100644 bindings/mono/examples/IndicatorExample.cs create mode 100755 bindings/mono/examples/ayatana-indicator-example.in delete mode 100755 bindings/mono/examples/indicator-example.in delete mode 100644 bindings/mono/libappindicator-api.metadata create mode 100644 bindings/mono/libayatana-appindicator-api.metadata delete mode 100644 bindings/mono/policy.0.0.appindicator-sharp.config.in create mode 100644 bindings/mono/policy.0.0.ayatana-appindicator-sharp.config.in delete mode 100644 bindings/mono/policy.0.1.appindicator-sharp.config.in create mode 100644 bindings/mono/policy.0.1.ayatana-appindicator-sharp.config.in delete mode 100644 bindings/python/appindicator.defs delete mode 100644 bindings/python/appindicator.override.in delete mode 100644 bindings/python/appindicatormodule.c create mode 100644 bindings/python/ayatana_appindicator.defs create mode 100644 bindings/python/ayatana_appindicator.override.in create mode 100644 bindings/python/ayatana_appindicatormodule.c delete mode 100644 bindings/vala/appindicator-0.1-custom.vala create mode 100644 bindings/vala/ayatana-appindicator-0.1-custom.vala create mode 100644 bindings/vala/examples/ayatana-indicator-example.vala delete mode 100644 bindings/vala/examples/indicator-example.vala (limited to 'bindings') diff --git a/bindings/Makefile.am b/bindings/Makefile.am index d1f6d73..d2a1ac5 100644 --- a/bindings/Makefile.am +++ b/bindings/Makefile.am @@ -10,3 +10,5 @@ endif if HAS_MONO SUBDIRS += mono endif + +DISTCLEANFILES = Makefile.in \ No newline at end of file diff --git a/bindings/mono/ApplicationIndicator.custom b/bindings/mono/ApplicationIndicator.custom index fcc52d7..4992c08 100644 --- a/bindings/mono/ApplicationIndicator.custom +++ b/bindings/mono/ApplicationIndicator.custom @@ -1,16 +1,16 @@ -[DllImport ("appindicator.dll")] +[DllImport ("ayatana-appindicator.dll")] static extern int app_indicator_get_status (IntPtr i); -[DllImport ("appindicator.dll")] +[DllImport ("ayatana-appindicator.dll")] static extern int app_indicator_get_category (IntPtr i); -[DllImport ("appindicator.dll")] +[DllImport ("ayatana-appindicator.dll")] static extern void app_indicator_set_status (IntPtr i, int s); [GLib.Property ("status")] - public Status Status { + public AppIndicatorStatus AppIndicatorStatus { get { - return (Status) app_indicator_get_status (Handle); + return (AppIndicatorStatus) app_indicator_get_status (Handle); } set { @@ -19,8 +19,8 @@ static extern void app_indicator_set_status (IntPtr i, int s); } [GLib.Property ("category")] - public Category Category { + public AppIndicatorCategory AppIndicatorCategory { get { - return (Category) app_indicator_get_category (Handle); + return (AppIndicatorCategory) app_indicator_get_category (Handle); } } diff --git a/bindings/mono/AssemblyInfo.cs b/bindings/mono/AssemblyInfo.cs index 0417db6..4b3e671 100644 --- a/bindings/mono/AssemblyInfo.cs +++ b/bindings/mono/AssemblyInfo.cs @@ -20,11 +20,11 @@ using System.Reflection; [assembly: AssemblyTitle ("Application Indicators")] -[assembly: AssemblyDescription ("Ubuntu Application Indicators")] +[assembly: AssemblyDescription ("Ayatana Application Indicators")] [assembly: AssemblyConfiguration ("")] -[assembly: AssemblyCompany ("Canonical, Ltd.")] -[assembly: AssemblyProduct ("Ubuntu")] -[assembly: AssemblyCopyright ("© 2010 Canonical, Ltd.")] +[assembly: AssemblyCompany ("Ayatana Project")] +[assembly: AssemblyProduct ("Ayatana AppIndicators")] +[assembly: AssemblyCopyright ("© 2010 Canonical, Ltd.; © 2015 Mike Gabriel")] [assembly: AssemblyTrademark ("")] [assembly: AssemblyCulture ("")] -[assembly: AssemblyVersion ("0.2")] +[assembly: AssemblyVersion ("0.5.0.0")] diff --git a/bindings/mono/Makefile.am b/bindings/mono/Makefile.am index 6f8e8a9..2424a62 100644 --- a/bindings/mono/Makefile.am +++ b/bindings/mono/Makefile.am @@ -1,18 +1,18 @@ SUBDIRS = . examples pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = appindicator-sharp-0.1.pc +pkgconfig_DATA = ayatana-appindicator-sharp-0.1.pc if BUILD_MONO_TEST -TEST = AppIndicator.Test.dll +TEST = AyatanaAppIndicator.Test.dll endif -API = libappindicator-api.xml -MIDDLE_API = libappindicator-api.middle -RAW_API = libappindicator-api.raw -METADATA = libappindicator-api.metadata -ASSEMBLY_NAME = appindicator-sharp -ASSEMBLY_VERSION = 0.2.0.0 +API = libayatana-appindicator-api.xml +MIDDLE_API = libayatana-appindicator-api.middle +RAW_API = libayatana-appindicator-api.raw +METADATA = libayatana-appindicator-api.metadata +ASSEMBLY_NAME = ayatana-appindicator-sharp +ASSEMBLY_VERSION = 0.5.0.0 ASSEMBLY = $(ASSEMBLY_NAME).dll POLICY = policy.$(POLICY_VERSION).$(ASSEMBLY_NAME) POLICY_VERSION = 0.0 @@ -31,7 +31,7 @@ TARGET = \ $(DLLPOLICY1) \ $(POLICY1).config -assemblydir = $(libdir)/cli/appindicator-sharp-0.1 +assemblydir = $(libdir)/cli/ayatana-appindicator-sharp-0.1 assembly_DATA = $(TARGET) CLEANFILES = \ @@ -55,7 +55,7 @@ endif DISTCLEANFILES = $(ASSEMBLY).config if BUILD_MONO_TEST -TEST_SOURCES = TestIndicator.cs +TEST_SOURCES = TestAyatanaIndicator.cs endif customs = ApplicationIndicator.custom @@ -64,8 +64,8 @@ EXTRA_DIST = \ AssemblyInfo.cs \ $(RAW_API) \ $(METADATA) \ - appindicator-sharp-0.1.pc.in \ - appindicator-sharp.dll.config.in \ + ayatana-appindicator-sharp-0.1.pc.in \ + ayatana-appindicator-sharp.dll.config.in \ app-indicator.sources.xml.in \ $(ASSEMBLY_NAME).snk \ $(POLICY).config.in \ @@ -173,3 +173,5 @@ $(POLICY1).config: $(POLICY1).config.in Makefile $(DLLPOLICY1): $(POLICY1).config $(ASSEMBLY_NAME).snk Makefile $(AL) -link:$(POLICY1).config -out:$(DLLPOLICY1) -keyfile:$(srcdir)/$(ASSEMBLY_NAME).snk + +DISTCLEANFILES += Makefile.in diff --git a/bindings/mono/TestAyatanaIndicator.cs b/bindings/mono/TestAyatanaIndicator.cs new file mode 100644 index 0000000..61fc53c --- /dev/null +++ b/bindings/mono/TestAyatanaIndicator.cs @@ -0,0 +1,82 @@ +/* + * Copyright 2009 Canonical Ltd. + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 3, 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 warranties of + * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + * + * Authors: + * Cody Russell + */ + +using System; +using GLib; +using Gtk; +using AyatanaAppIndicator; + +using NUnit.Framework; + +namespace Ayatana.AyatanaAppIndicator.Test +{ + [TestFixture] + public class IndicatorTest + { + ApplicationIndicator indicator; + + private void Update () + { + while (MainContext.Pending ()) + MainContext.Iteration(true); + } + + [SetUp] + public void Init () + { + Application.Init (); + + Console.WriteLine ("Init()"); + + indicator = new ApplicationIndicator ("my-id", "my-name", AppIndicatorCategory.ApplicationStatus); + + Console.WriteLine ("Created indicator"); + + Update(); + } + + [Test] + public void TestProperties () + { + Console.WriteLine ("TestProperties()"); + + Assert.AreNotSame (indicator, null); + + Assert.AreEqual (indicator.IconName, "my-name"); + Assert.AreEqual (indicator.ID, "my-id"); + Assert.AreEqual (indicator.AppIndicatorStatus, AppIndicatorCategory.ApplicationStatus); + + Console.WriteLine ("End.."); + } + + [Test] + public void TestSetProperties () + { + Console.WriteLine ("TestSetProperties"); + + indicator.AppIndicatorStatus = AppIndicatorStatus.Attention; + indicator.AttentionIconName = "my-attention-name"; + + Assert.AreEqual (indicator.AppIndicatorStatus, AppIndicatorStatus.Attention); + Assert.AreEqual (indicator.AttentionIconName, "my-attention-name"); + + Console.WriteLine ("End.."); + } + } +} \ No newline at end of file diff --git a/bindings/mono/TestIndicator.cs b/bindings/mono/TestIndicator.cs deleted file mode 100644 index 3127342..0000000 --- a/bindings/mono/TestIndicator.cs +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright 2009 Canonical Ltd. - * - * This program is free software: you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 3, 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 warranties of - * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program. If not, see . - * - * Authors: - * Cody Russell - */ - -using System; -using GLib; -using Gtk; -using AppIndicator; - -using NUnit.Framework; - -namespace Ayatana.AppIndicator.Test -{ - [TestFixture] - public class IndicatorTest - { - ApplicationIndicator indicator; - - private void Update () - { - while (MainContext.Pending ()) - MainContext.Iteration(true); - } - - [SetUp] - public void Init () - { - Application.Init (); - - Console.WriteLine ("Init()"); - - indicator = new ApplicationIndicator ("my-id", "my-name", Category.ApplicationStatus); - - Console.WriteLine ("Created indicator"); - - Update(); - } - - [Test] - public void TestProperties () - { - Console.WriteLine ("TestProperties()"); - - Assert.AreNotSame (indicator, null); - - Assert.AreEqual (indicator.IconName, "my-name"); - Assert.AreEqual (indicator.ID, "my-id"); - Assert.AreEqual (indicator.Status, Category.ApplicationStatus); - - Console.WriteLine ("End.."); - } - - [Test] - public void TestSetProperties () - { - Console.WriteLine ("TestSetProperties"); - - indicator.Status = Status.Attention; - indicator.AttentionIconName = "my-attention-name"; - - Assert.AreEqual (indicator.Status, Status.Attention); - Assert.AreEqual (indicator.AttentionIconName, "my-attention-name"); - - Console.WriteLine ("End.."); - } - } -} \ No newline at end of file diff --git a/bindings/mono/app-indicator.sources.xml.in b/bindings/mono/app-indicator.sources.xml.in index 7f8e869..9a283ea 100644 --- a/bindings/mono/app-indicator.sources.xml.in +++ b/bindings/mono/app-indicator.sources.xml.in @@ -1,7 +1,7 @@ - - - + + + @top_builddir@/bindings/mono/app-indicator.c @top_builddir@/src/app-indicator-enum-types.c @top_builddir@/src/app-indicator-enum-types.h diff --git a/bindings/mono/appindicator-sharp-0.1.pc.in b/bindings/mono/appindicator-sharp-0.1.pc.in deleted file mode 100644 index f63c01e..0000000 --- a/bindings/mono/appindicator-sharp-0.1.pc.in +++ /dev/null @@ -1,12 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -assemblies_dir=${prefix}/lib/cli/appindicator-sharp-0.1 - -Name: appindicator-sharp -Description: application indicators for .NET -Version: @VERSION@ -Libraries: ${assemblies_dir}/appindicator-sharp.dll ${assemblies_dir}/appindicator-sharp.dll.config -Requires: gtk-sharp-2.0 -Cflags: -Libs: -r:${assemblies_dir}/appindicator-sharp.dll diff --git a/bindings/mono/appindicator-sharp.dll.config.in b/bindings/mono/appindicator-sharp.dll.config.in deleted file mode 100644 index 2d21d00..0000000 --- a/bindings/mono/appindicator-sharp.dll.config.in +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/bindings/mono/appindicator-sharp.snk b/bindings/mono/appindicator-sharp.snk deleted file mode 100644 index efb62d0..0000000 Binary files a/bindings/mono/appindicator-sharp.snk and /dev/null differ diff --git a/bindings/mono/ayatana-appindicator-sharp-0.1.pc.in b/bindings/mono/ayatana-appindicator-sharp-0.1.pc.in new file mode 100644 index 0000000..6c091ed --- /dev/null +++ b/bindings/mono/ayatana-appindicator-sharp-0.1.pc.in @@ -0,0 +1,12 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +assemblies_dir=${prefix}/lib/cli/ayatana-appindicator-sharp-0.1 + +Name: ayatana-appindicator-sharp +Description: application indicators for .NET +Version: @VERSION@ +Libraries: ${assemblies_dir}/ayatana-appindicator-sharp.dll ${assemblies_dir}/ayatana-appindicator-sharp.dll.config +Requires: gtk-sharp-2.0 +Cflags: +Libs: -r:${assemblies_dir}/ayatana-appindicator-sharp.dll diff --git a/bindings/mono/ayatana-appindicator-sharp.dll.config.in b/bindings/mono/ayatana-appindicator-sharp.dll.config.in new file mode 100644 index 0000000..7061914 --- /dev/null +++ b/bindings/mono/ayatana-appindicator-sharp.dll.config.in @@ -0,0 +1,7 @@ + + + + + + + diff --git a/bindings/mono/ayatana-appindicator-sharp.snk b/bindings/mono/ayatana-appindicator-sharp.snk new file mode 100644 index 0000000..efb62d0 Binary files /dev/null and b/bindings/mono/ayatana-appindicator-sharp.snk differ diff --git a/bindings/mono/examples/AyatanaIndicatorExample.cs b/bindings/mono/examples/AyatanaIndicatorExample.cs new file mode 100644 index 0000000..35f3c79 --- /dev/null +++ b/bindings/mono/examples/AyatanaIndicatorExample.cs @@ -0,0 +1,61 @@ +/* + * Copyright 2009 Canonical Ltd. + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 3, 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 warranties of + * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + * + * Authors: + * Cody Russell + */ + +using Gtk; +using AyatanaAppIndicator; + +public class IndicatorExample +{ + public static void Main () + { + Application.Init (); + + Window win = new Window ("Test"); + win.Resize (200, 200); + + Label label = new Label (); + label.Text = "Hello, world!"; + + win.Add (label); + + ApplicationIndicator indicator = new ApplicationIndicator ("Example", + "applications-microblogging-panel", + AppIndicatorCategory.ApplicationStatus); + + indicator.AppIndicatorStatus = AppIndicatorStatus.Attention; + + Menu menu = new Menu (); + var foo = new MenuItem ("Foo"); + menu.Append (foo); + foo.Activated += delegate { + System.Console.WriteLine ("Foo item has been activated"); + }; + + menu.Append (new MenuItem ("Bar")); + + indicator.Menu = menu; + indicator.Menu.ShowAll (); + + indicator.SecondaryActivateTarget = foo; + + win.ShowAll (); + + Application.Run (); + } +} diff --git a/bindings/mono/examples/IndicatorExample.cs b/bindings/mono/examples/IndicatorExample.cs deleted file mode 100644 index 7413c54..0000000 --- a/bindings/mono/examples/IndicatorExample.cs +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright 2009 Canonical Ltd. - * - * This program is free software: you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 3, 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 warranties of - * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program. If not, see . - * - * Authors: - * Cody Russell - */ - -using Gtk; -using AppIndicator; - -public class IndicatorExample -{ - public static void Main () - { - Application.Init (); - - Window win = new Window ("Test"); - win.Resize (200, 200); - - Label label = new Label (); - label.Text = "Hello, world!"; - - win.Add (label); - - ApplicationIndicator indicator = new ApplicationIndicator ("Example", - "applications-microblogging-panel", - Category.ApplicationStatus); - - indicator.Status = Status.Attention; - - Menu menu = new Menu (); - var foo = new MenuItem ("Foo"); - menu.Append (foo); - foo.Activated += delegate { - System.Console.WriteLine ("Foo item has been activated"); - }; - - menu.Append (new MenuItem ("Bar")); - - indicator.Menu = menu; - indicator.Menu.ShowAll (); - - indicator.SecondaryActivateTarget = foo; - - win.ShowAll (); - - Application.Run (); - } -} diff --git a/bindings/mono/examples/Makefile.am b/bindings/mono/examples/Makefile.am index b929492..de93b20 100644 --- a/bindings/mono/examples/Makefile.am +++ b/bindings/mono/examples/Makefile.am @@ -1,10 +1,11 @@ -ASSEMBLY = IndicatorExample.exe -CSFILES = IndicatorExample.cs +ASSEMBLY = AyatanaIndicatorExample.exe +CSFILES = AyatanaIndicatorExample.cs CLEANFILES = $(ASSEMBLY) +DISTCLEANFILES = Makefile.in EXTRA_DIST = $(CSFILES) -references = $(GTK_SHARP_LIBS) -r:$(top_builddir)/bindings/mono/appindicator-sharp.dll +references = $(GTK_SHARP_LIBS) -r:$(top_builddir)/bindings/mono/ayatana-appindicator-sharp.dll $(ASSEMBLY): $(CSFILES) Makefile.am $(CSC) $(CSFLAGS) -out:$(ASSEMBLY) -target:exe $(references) $(srcdir)/$(CSFILES) diff --git a/bindings/mono/examples/ayatana-indicator-example.in b/bindings/mono/examples/ayatana-indicator-example.in new file mode 100755 index 0000000..07d1473 --- /dev/null +++ b/bindings/mono/examples/ayatana-indicator-example.in @@ -0,0 +1,2 @@ +#!/bin/sh +MONO_PATH=@top_builddir@/bindings/mono @top_builddir@/bindings/mono/examples/AyatanaIndicatorExample.exe diff --git a/bindings/mono/examples/indicator-example.in b/bindings/mono/examples/indicator-example.in deleted file mode 100755 index 3eca155..0000000 --- a/bindings/mono/examples/indicator-example.in +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -MONO_PATH=@top_builddir@/bindings/mono @top_builddir@/bindings/mono/examples/IndicatorExample.exe diff --git a/bindings/mono/libappindicator-api.metadata b/bindings/mono/libappindicator-api.metadata deleted file mode 100644 index e610c88..0000000 --- a/bindings/mono/libappindicator-api.metadata +++ /dev/null @@ -1,66 +0,0 @@ - - - ApplicationIndicator - NewAttentionIcon - new-attention-icon - NewStatus - new-status - NewLabel - new-label - NewAccessibleDesc - new-accessible-desc - ConnectionChanged - connection-changed - ScrollEvent - scroll-event - NewIcon - new-icon - NewIconThemePath - new-icon-theme-path - ID - true - true - IconName - AttentionIconName - IconThemePath - Menu - GtkMenu* - Connected - Label - LabelGuide - AccessibleDesc - OrderingIndex - SetMenu - - id - icon-name - category - id - icon-name - category - icon-theme-path - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/bindings/mono/libayatana-appindicator-api.metadata b/bindings/mono/libayatana-appindicator-api.metadata new file mode 100644 index 0000000..e610c88 --- /dev/null +++ b/bindings/mono/libayatana-appindicator-api.metadata @@ -0,0 +1,66 @@ + + + ApplicationIndicator + NewAttentionIcon + new-attention-icon + NewStatus + new-status + NewLabel + new-label + NewAccessibleDesc + new-accessible-desc + ConnectionChanged + connection-changed + ScrollEvent + scroll-event + NewIcon + new-icon + NewIconThemePath + new-icon-theme-path + ID + true + true + IconName + AttentionIconName + IconThemePath + Menu + GtkMenu* + Connected + Label + LabelGuide + AccessibleDesc + OrderingIndex + SetMenu + + id + icon-name + category + id + icon-name + category + icon-theme-path + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bindings/mono/policy.0.0.appindicator-sharp.config.in b/bindings/mono/policy.0.0.appindicator-sharp.config.in deleted file mode 100644 index e1fe0db..0000000 --- a/bindings/mono/policy.0.0.appindicator-sharp.config.in +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/bindings/mono/policy.0.0.ayatana-appindicator-sharp.config.in b/bindings/mono/policy.0.0.ayatana-appindicator-sharp.config.in new file mode 100644 index 0000000..e1fe0db --- /dev/null +++ b/bindings/mono/policy.0.0.ayatana-appindicator-sharp.config.in @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/bindings/mono/policy.0.1.appindicator-sharp.config.in b/bindings/mono/policy.0.1.appindicator-sharp.config.in deleted file mode 100644 index 0a8f9b1..0000000 --- a/bindings/mono/policy.0.1.appindicator-sharp.config.in +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/bindings/mono/policy.0.1.ayatana-appindicator-sharp.config.in b/bindings/mono/policy.0.1.ayatana-appindicator-sharp.config.in new file mode 100644 index 0000000..0a8f9b1 --- /dev/null +++ b/bindings/mono/policy.0.1.ayatana-appindicator-sharp.config.in @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/bindings/python/Makefile.am b/bindings/python/Makefile.am index fe95c02..f57a2f7 100644 --- a/bindings/python/Makefile.am +++ b/bindings/python/Makefile.am @@ -1,10 +1,10 @@ defsdir = $(datadir)/pygtk/2.0/defs -defs_DATA = appindicator.defs +defs_DATA = ayatana_appindicator.defs #CFLAGS = -Wall -Werror INCLUDES = \ -I$(top_srcdir)/src \ - -DG_LOG_DOMAIN=\"appindicator-python\" \ + -DG_LOG_DOMAIN=\"ayatana-appindicator-python\" \ -DDATADIR=\"$(datadir)\" \ -DLIBDIR=\"$(libdir)\" \ $(APPINDICATOR_PYTHON_CFLAGS) \ @@ -13,20 +13,21 @@ INCLUDES = \ pkgpythondir = $(pyexecdir) pkgpyexecdir = $(pyexecdir) -pkgappindicatordir = $(pkgpythondir)/appindicator +pkgappindicatordir = $(pkgpythondir)/ayatana_appindicator pkgappindicator_PYTHON = __init__.py -appindicatordir = $(pkgpyexecdir)/appindicator -appindicator_LTLIBRARIES = _appindicator.la +appindicatordir = $(pkgpyexecdir)/ayatana_appindicator +appindicator_LTLIBRARIES = _ayatana_appindicator.la -_appindicator_la_LDFLAGS = -module -avoid-version -export-symbols-regex init_appindicator -_appindicator_la_LIBADD = $(APPINDICATOR_PYTHON_LIBS) -L$(top_builddir)/src/.libs -lappindicator -_appindicator_la_SOURCES = appindicatormodule.c -nodist__appindicator_la_SOURCES = appindicator.c +_ayatana_appindicator_la_LDFLAGS = -module -avoid-version -export-symbols-regex init_appindicator +_ayatana_appindicator_la_LIBADD = $(APPINDICATOR_PYTHON_LIBS) -L$(top_builddir)/src/.libs -layatana-appindicator +_ayatana_appindicator_la_SOURCES = ayatana_appindicatormodule.c +nodist__ayatana_appindicator_la_SOURCES = ayatana_appindicator.c -CLEANFILES = appindicator.c -EXTRA_DIST = appindicator.override.in appindicator-arg-types.py $(defs_DATA) -appindicator.c: $(defs_DATA) appindicator.override +CLEANFILES = ayatana_appindicator.c +DISTCLEANFILES = Makefile.in +EXTRA_DIST = ayatana_appindicator.override.in appindicator-arg-types.py $(defs_DATA) +ayatana_appindicator.c: $(defs_DATA) ayatana_appindicator.override %.c: %.defs ($(PYGTK_CODEGEN) \ diff --git a/bindings/python/__init__.py b/bindings/python/__init__.py index 20e2140..5dd1329 100644 --- a/bindings/python/__init__.py +++ b/bindings/python/__init__.py @@ -24,4 +24,4 @@ # License version 3 and version 2.1 along with this program. If not, see # -from _appindicator import * +from _ayatana_appindicator import * diff --git a/bindings/python/appindicator-arg-types.py b/bindings/python/appindicator-arg-types.py index 9d74aa0..46066ca 100644 --- a/bindings/python/appindicator-arg-types.py +++ b/bindings/python/appindicator-arg-types.py @@ -1,4 +1,4 @@ -# Python bindings for libappindicator. +# Python bindings for libayatana-appindicator. # # Copyright 2009 Canonical Ltd. # diff --git a/bindings/python/appindicator.defs b/bindings/python/appindicator.defs deleted file mode 100644 index 4fcc2d5..0000000 --- a/bindings/python/appindicator.defs +++ /dev/null @@ -1,200 +0,0 @@ -;; -*- scheme -*- -; object definitions ... -(define-object Indicator - (in-module "App") - (parent "GObject") - (c-name "AppIndicator") - (gtype-id "APP_TYPE_INDICATOR") -) - -;; Enumerations and flags ... - -(define-enum IndicatorCategory - (in-module "App") - (c-name "AppIndicatorCategory") - (gtype-id "APP_INDICATOR_TYPE_INDICATOR_CATEGORY") - (values - '("ApplicationStatus" "APP_INDICATOR_CATEGORY_APPLICATION_STATUS") - '("Communications" "APP_INDICATOR_CATEGORY_COMMUNICATIONS") - '("SystemServices" "APP_INDICATOR_CATEGORY_SYSTEM_SERVICES") - '("Hardware" "APP_INDICATOR_CATEGORY_HARDWARE") - '("Other" "APP_INDICATOR_CATEGORY_OTHER") - ) -) - -(define-enum IndicatorStatus - (in-module "App") - (c-name "AppIndicatorStatus") - (gtype-id "APP_INDICATOR_TYPE_INDICATOR_STATUS") - (values - '("Passive" "APP_INDICATOR_STATUS_PASSIVE") - '("Active" "APP_INDICATOR_STATUS_ACTIVE") - '("NeedsAttention" "APP_INDICATOR_STATUS_ATTENTION") - ) -) - -;; From app-indicator.h - -(define-function app_indicator_get_type - (c-name "app_indicator_get_type") - (return-type "GType") -) - -(define-function app_indicator_new_with_path - (c-name "app_indicator_new_with_path") - (is-constructor-of "AppIndicator") - (return-type "AppIndicator*") - (parameters - '("const-gchar*" "id") - '("const-gchar*" "icon_name") - '("AppIndicatorCategory" "category") - '("const-gchar*" "icon_theme_path" (null-ok) (default "NULL")) - ) -) - -(define-method set_status - (of-object "AppIndicator") - (c-name "app_indicator_set_status") - (return-type "none") - (parameters - '("AppIndicatorStatus" "status") - ) -) - -(define-method set_attention_icon - (of-object "AppIndicator") - (c-name "app_indicator_set_attention_icon_full") - (return-type "none") - (parameters - '("const-gchar*" "icon_name") - '("const-gchar*" "icon_desc" (null-ok) (default "NULL")) - ) -) - -(define-method set_menu - (of-object "AppIndicator") - (c-name "app_indicator_set_menu") - (return-type "none") - (parameters - '("GtkMenu*" "menu") - ) -) - -(define-method set_icon - (of-object "AppIndicator") - (c-name "app_indicator_set_icon_full") - (return-type "none") - (parameters - '("const-gchar*" "icon_name") - '("const-gchar*" "icon_desc" (null-ok) (default "NULL")) - ) -) - -(define-method set_label - (of-object "AppIndicator") - (c-name "app_indicator_set_label") - (return-type "none") - (parameters - '("const-gchar*" "label" (null-ok)) - '("const-gchar*" "guide" (null-ok) (default "NULL")) - ) -) - -(define-method set_ordering_index - (of-object "AppIndicator") - (c-name "app_indicator_set_ordering_index") - (parameters - '("guint32" "ordering_index") - ) -) - -(define-method set_icon_theme_path - (of-object "AppIndicator") - (c-name "app_indicator_set_icon_theme_path") - (return-type "none") - (parameters - '("const-gchar*" "icon_theme_path" (null-ok)) - ) -) - -(define-method get_id - (of-object "AppIndicator") - (c-name "app_indicator_get_id") - (return-type "const-gchar*") -) - -(define-method get_category - (of-object "AppIndicator") - (c-name "app_indicator_get_category") - (return-type "AppIndicatorCategory") -) - -(define-method get_status - (of-object "AppIndicator") - (c-name "app_indicator_get_status") - (return-type "AppIndicatorStatus") -) - -(define-method get_icon - (of-object "AppIndicator") - (c-name "app_indicator_get_icon") - (return-type "const-gchar*") -) - -(define-method get_icon_desc - (of-object "AppIndicator") - (c-name "app_indicator_get_icon_desc") - (return-type "const-gchar*") -) - -(define-method get_icon_theme_path - (of-object "AppIndicator") - (c-name "app_indicator_get_icon_theme_path") - (return-type "const-gchar*") -) - -(define-method get_attention_icon - (of-object "AppIndicator") - (c-name "app_indicator_get_attention_icon") - (return-type "const-gchar*") -) - -(define-method get_attention_icon_desc - (of-object "AppIndicator") - (c-name "app_indicator_get_attention_icon_desc") - (return-type "const-gchar*") -) - -(define-method get_menu - (of-object "AppIndicator") - (c-name "app_indicator_get_menu") - (return-type "GtkMenu*") -) - -(define-method get_label - (of-object "AppIndicator") - (c-name "app_indicator_get_label") - (return-type "const-gchar*") -) - -(define-method get_label_guide - (of-object "AppIndicator") - (c-name "app_indicator_get_label_guide") - (return-type "const-gchar*") -) - -(define-method get_ordering_index - (of-object "AppIndicator") - (c-name "app_indicator_get_ordering_index") - (return-type "guint32") -) - -(define-method build_menu_from_desktop - (of-object "AppIndicator") - (c-name "app_indicator_build_menu_from_desktop") - (return-type "none") - (parameters - '("const-gchar*" "desktop_file") - '("const-gchar*" "desktop_profile") - ) -) diff --git a/bindings/python/appindicator.override.in b/bindings/python/appindicator.override.in deleted file mode 100644 index 84d3159..0000000 --- a/bindings/python/appindicator.override.in +++ /dev/null @@ -1,65 +0,0 @@ -/* -Python bindings for libappindicator. - -Copyright 2009 Canonical Ltd. - -Authors: - Eitan Isaacson (original) - Neil Jagdish Patel - -This program is free software: you can redistribute it and/or modify it -under the terms of either or both of the following licenses: - -1) the GNU Lesser General Public License version 3, as published by the -Free Software Foundation; and/or -2) the GNU Lesser General Public License version 2.1, 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 warranties of -MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR -PURPOSE. See the applicable version of the GNU Lesser General Public -License for more details. - -You should have received a copy of both the GNU Lesser General Public -License version 3 and version 2.1 along with this program. If not, see - -*/ -%% -headers -#include -#include "@top_srcdir@/src/app-indicator.h" -#include "@top_builddir@/src/app-indicator-enum-types.h" -#include -#include "pygobject.h" -#include "pyglib.h" -#include - -typedef PyObject* (*to_pyobject_func) (gpointer data); - -#define APP_TYPE_INDICATOR APP_INDICATOR_TYPE - -void -_appindicator_add_constants(PyObject *module, const gchar *strip_prefix) -{ -#ifdef VERSION - PyModule_AddStringConstant(module, "__version__", VERSION); -#endif - pyg_enum_add(module, - "IndicatorCategory", - strip_prefix, - APP_INDICATOR_TYPE_INDICATOR_CATEGORY); - - pyg_enum_add(module, - "IndicatorStatus", - strip_prefix, - APP_INDICATOR_TYPE_INDICATOR_STATUS); - - if (PyErr_Occurred()) - PyErr_Print(); -} -%% -modulename appindicator -%% -import gobject.GObject as PyGObject_Type -import gtk.Menu as PyGtkMenu_Type diff --git a/bindings/python/appindicatormodule.c b/bindings/python/appindicatormodule.c deleted file mode 100644 index b66639c..0000000 --- a/bindings/python/appindicatormodule.c +++ /dev/null @@ -1,49 +0,0 @@ -/* -Python bindings for libappindicator. - -Copyright 2009 Canonical Ltd. - -Authors: - Eitan Isaacson - Neil Jagdish Patel - -This program is free software: you can redistribute it and/or modify it -under the terms of either or both of the following licenses: - -1) the GNU Lesser General Public License version 3, as published by the -Free Software Foundation; and/or -2) the GNU Lesser General Public License version 2.1, 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 warranties of -MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR -PURPOSE. See the applicable version of the GNU Lesser General Public -License for more details. - -You should have received a copy of both the GNU Lesser General Public -License version 3 and version 2.1 along with this program. If not, see - -*/ -#include - -void pyappindicator_register_classes (PyObject *d); -extern PyMethodDef pyappindicator_functions[]; - -DL_EXPORT(void) -init_appindicator(void) -{ - PyObject *m, *d; - - init_pygobject (); - - m = Py_InitModule ("_appindicator", pyappindicator_functions); - d = PyModule_GetDict (m); - - pyappindicator_register_classes (d); - - _appindicator_add_constants (m, "APP_INDICATOR_"); - if (PyErr_Occurred ()) { - Py_FatalError ("can't initialise module appindicator"); - } -} diff --git a/bindings/python/ayatana_appindicator.defs b/bindings/python/ayatana_appindicator.defs new file mode 100644 index 0000000..4fcc2d5 --- /dev/null +++ b/bindings/python/ayatana_appindicator.defs @@ -0,0 +1,200 @@ +;; -*- scheme -*- +; object definitions ... +(define-object Indicator + (in-module "App") + (parent "GObject") + (c-name "AppIndicator") + (gtype-id "APP_TYPE_INDICATOR") +) + +;; Enumerations and flags ... + +(define-enum IndicatorCategory + (in-module "App") + (c-name "AppIndicatorCategory") + (gtype-id "APP_INDICATOR_TYPE_INDICATOR_CATEGORY") + (values + '("ApplicationStatus" "APP_INDICATOR_CATEGORY_APPLICATION_STATUS") + '("Communications" "APP_INDICATOR_CATEGORY_COMMUNICATIONS") + '("SystemServices" "APP_INDICATOR_CATEGORY_SYSTEM_SERVICES") + '("Hardware" "APP_INDICATOR_CATEGORY_HARDWARE") + '("Other" "APP_INDICATOR_CATEGORY_OTHER") + ) +) + +(define-enum IndicatorStatus + (in-module "App") + (c-name "AppIndicatorStatus") + (gtype-id "APP_INDICATOR_TYPE_INDICATOR_STATUS") + (values + '("Passive" "APP_INDICATOR_STATUS_PASSIVE") + '("Active" "APP_INDICATOR_STATUS_ACTIVE") + '("NeedsAttention" "APP_INDICATOR_STATUS_ATTENTION") + ) +) + +;; From app-indicator.h + +(define-function app_indicator_get_type + (c-name "app_indicator_get_type") + (return-type "GType") +) + +(define-function app_indicator_new_with_path + (c-name "app_indicator_new_with_path") + (is-constructor-of "AppIndicator") + (return-type "AppIndicator*") + (parameters + '("const-gchar*" "id") + '("const-gchar*" "icon_name") + '("AppIndicatorCategory" "category") + '("const-gchar*" "icon_theme_path" (null-ok) (default "NULL")) + ) +) + +(define-method set_status + (of-object "AppIndicator") + (c-name "app_indicator_set_status") + (return-type "none") + (parameters + '("AppIndicatorStatus" "status") + ) +) + +(define-method set_attention_icon + (of-object "AppIndicator") + (c-name "app_indicator_set_attention_icon_full") + (return-type "none") + (parameters + '("const-gchar*" "icon_name") + '("const-gchar*" "icon_desc" (null-ok) (default "NULL")) + ) +) + +(define-method set_menu + (of-object "AppIndicator") + (c-name "app_indicator_set_menu") + (return-type "none") + (parameters + '("GtkMenu*" "menu") + ) +) + +(define-method set_icon + (of-object "AppIndicator") + (c-name "app_indicator_set_icon_full") + (return-type "none") + (parameters + '("const-gchar*" "icon_name") + '("const-gchar*" "icon_desc" (null-ok) (default "NULL")) + ) +) + +(define-method set_label + (of-object "AppIndicator") + (c-name "app_indicator_set_label") + (return-type "none") + (parameters + '("const-gchar*" "label" (null-ok)) + '("const-gchar*" "guide" (null-ok) (default "NULL")) + ) +) + +(define-method set_ordering_index + (of-object "AppIndicator") + (c-name "app_indicator_set_ordering_index") + (parameters + '("guint32" "ordering_index") + ) +) + +(define-method set_icon_theme_path + (of-object "AppIndicator") + (c-name "app_indicator_set_icon_theme_path") + (return-type "none") + (parameters + '("const-gchar*" "icon_theme_path" (null-ok)) + ) +) + +(define-method get_id + (of-object "AppIndicator") + (c-name "app_indicator_get_id") + (return-type "const-gchar*") +) + +(define-method get_category + (of-object "AppIndicator") + (c-name "app_indicator_get_category") + (return-type "AppIndicatorCategory") +) + +(define-method get_status + (of-object "AppIndicator") + (c-name "app_indicator_get_status") + (return-type "AppIndicatorStatus") +) + +(define-method get_icon + (of-object "AppIndicator") + (c-name "app_indicator_get_icon") + (return-type "const-gchar*") +) + +(define-method get_icon_desc + (of-object "AppIndicator") + (c-name "app_indicator_get_icon_desc") + (return-type "const-gchar*") +) + +(define-method get_icon_theme_path + (of-object "AppIndicator") + (c-name "app_indicator_get_icon_theme_path") + (return-type "const-gchar*") +) + +(define-method get_attention_icon + (of-object "AppIndicator") + (c-name "app_indicator_get_attention_icon") + (return-type "const-gchar*") +) + +(define-method get_attention_icon_desc + (of-object "AppIndicator") + (c-name "app_indicator_get_attention_icon_desc") + (return-type "const-gchar*") +) + +(define-method get_menu + (of-object "AppIndicator") + (c-name "app_indicator_get_menu") + (return-type "GtkMenu*") +) + +(define-method get_label + (of-object "AppIndicator") + (c-name "app_indicator_get_label") + (return-type "const-gchar*") +) + +(define-method get_label_guide + (of-object "AppIndicator") + (c-name "app_indicator_get_label_guide") + (return-type "const-gchar*") +) + +(define-method get_ordering_index + (of-object "AppIndicator") + (c-name "app_indicator_get_ordering_index") + (return-type "guint32") +) + +(define-method build_menu_from_desktop + (of-object "AppIndicator") + (c-name "app_indicator_build_menu_from_desktop") + (return-type "none") + (parameters + '("const-gchar*" "desktop_file") + '("const-gchar*" "desktop_profile") + ) +) diff --git a/bindings/python/ayatana_appindicator.override.in b/bindings/python/ayatana_appindicator.override.in new file mode 100644 index 0000000..3fdeb24 --- /dev/null +++ b/bindings/python/ayatana_appindicator.override.in @@ -0,0 +1,65 @@ +/* +Python bindings for libayatana-appindicator. + +Copyright 2009 Canonical Ltd. + +Authors: + Eitan Isaacson (original) + Neil Jagdish Patel + +This program is free software: you can redistribute it and/or modify it +under the terms of either or both of the following licenses: + +1) the GNU Lesser General Public License version 3, as published by the +Free Software Foundation; and/or +2) the GNU Lesser General Public License version 2.1, 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 warranties of +MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR +PURPOSE. See the applicable version of the GNU Lesser General Public +License for more details. + +You should have received a copy of both the GNU Lesser General Public +License version 3 and version 2.1 along with this program. If not, see + +*/ +%% +headers +#include +#include "@top_srcdir@/src/app-indicator.h" +#include "@top_builddir@/src/app-indicator-enum-types.h" +#include +#include "pygobject.h" +#include "pyglib.h" +#include + +typedef PyObject* (*to_pyobject_func) (gpointer data); + +#define APP_TYPE_INDICATOR APP_INDICATOR_TYPE + +void +_appindicator_add_constants(PyObject *module, const gchar *strip_prefix) +{ +#ifdef VERSION + PyModule_AddStringConstant(module, "__version__", VERSION); +#endif + pyg_enum_add(module, + "IndicatorCategory", + strip_prefix, + APP_INDICATOR_TYPE_INDICATOR_CATEGORY); + + pyg_enum_add(module, + "IndicatorStatus", + strip_prefix, + APP_INDICATOR_TYPE_INDICATOR_STATUS); + + if (PyErr_Occurred()) + PyErr_Print(); +} +%% +modulename ayatana_appindicator +%% +import gobject.GObject as PyGObject_Type +import gtk.Menu as PyGtkMenu_Type diff --git a/bindings/python/ayatana_appindicatormodule.c b/bindings/python/ayatana_appindicatormodule.c new file mode 100644 index 0000000..31d23a2 --- /dev/null +++ b/bindings/python/ayatana_appindicatormodule.c @@ -0,0 +1,51 @@ +/* +Python bindings for libayatana-appindicator. + +Copyright 2009 Canonical Ltd. +Copyright 2015 Mike Gabriel + +Authors: + Eitan Isaacson + Neil Jagdish Patel + Mike Gabriel + +This program is free software: you can redistribute it and/or modify it +under the terms of either or both of the following licenses: + +1) the GNU Lesser General Public License version 3, as published by the +Free Software Foundation; and/or +2) the GNU Lesser General Public License version 2.1, 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 warranties of +MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR +PURPOSE. See the applicable version of the GNU Lesser General Public +License for more details. + +You should have received a copy of both the GNU Lesser General Public +License version 3 and version 2.1 along with this program. If not, see + +*/ +#include + +void pyappindicator_register_classes (PyObject *d); +extern PyMethodDef pyappindicator_functions[]; + +DL_EXPORT(void) +init_appindicator(void) +{ + PyObject *m, *d; + + init_pygobject (); + + m = Py_InitModule ("_ayatana_appindicator", pyappindicator_functions); + d = PyModule_GetDict (m); + + pyappindicator_register_classes (d); + + _appindicator_add_constants (m, "APP_INDICATOR_"); + if (PyErr_Occurred ()) { + Py_FatalError ("can't initialise module ayatana_appindicator"); + } +} diff --git a/bindings/vala/Makefile.am b/bindings/vala/Makefile.am index 703e7a5..2763bc3 100644 --- a/bindings/vala/Makefile.am +++ b/bindings/vala/Makefile.am @@ -16,25 +16,26 @@ VER= endif vapidir = $(datadir)/vala/vapi -vapiprefix = appindicator$(VER)-0.1 +vapiprefix = ayatana-appindicator$(VER)-0.1 vapi_DATA = $(vapiprefix).vapi $(vapiprefix).deps DEPS = $(GTKVAPI) $(vapiprefix).deps: echo $(DEPS) > $@ -$(vapiprefix).vapi: $(top_builddir)/src/AppIndicator$(VER)-0.1.gir \ - $(top_builddir)/src/AppIndicator$(VER)-0.1.metadata \ - appindicator-0.1-custom.vala \ +$(vapiprefix).vapi: $(top_builddir)/src/AyatanaAppIndicator$(VER)-0.1.gir \ + $(top_builddir)/src/AyatanaAppIndicator$(VER)-0.1.metadata \ + ayatana-appindicator-0.1-custom.vala \ $(vapiprefix).deps $(VALA_API_GEN) --library=$(vapiprefix) --girdir=$(srcdir)/src \ - $< $(srcdir)/appindicator-0.1-custom.vala + $< $(srcdir)/ayatana-appindicator-0.1-custom.vala CLEANFILES = $(vapi_DATA) +DISTCLEANFILES = Makefile.in endif endif EXTRA_DIST = \ - appindicator-0.1-custom.vala + ayatana-appindicator-0.1-custom.vala diff --git a/bindings/vala/appindicator-0.1-custom.vala b/bindings/vala/appindicator-0.1-custom.vala deleted file mode 100644 index 9fa51eb..0000000 --- a/bindings/vala/appindicator-0.1-custom.vala +++ /dev/null @@ -1,31 +0,0 @@ -/* - Copyright (C) 2011 Canonical, Ltd. - - This program is free software: you can redistribute it and/or modify it - under the terms of either or both of the following licenses: - - 1) the GNU Lesser General Public License version 3, as published by the - Free Software Foundation; and/or - 2) the GNU Lesser General Public License version 2.1, 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 warranties of - MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR - PURPOSE. See the applicable version of the GNU Lesser General Public - License for more details. - - You should have received a copy of both the GNU Lesser General Public - License version 3 and version 2.1 along with this program. If not, see - - - Authored by Michal Hruby -*/ - -namespace AppIndicator { - [CCode (type_check_function = "IS_APP_INDICATOR", type_id = "app_indicator_get_type ()")] - public class Indicator : GLib.Object { - } -} - -// vim:et:ai:cindent:ts=2 sts=2 sw=2: diff --git a/bindings/vala/ayatana-appindicator-0.1-custom.vala b/bindings/vala/ayatana-appindicator-0.1-custom.vala new file mode 100644 index 0000000..9fa51eb --- /dev/null +++ b/bindings/vala/ayatana-appindicator-0.1-custom.vala @@ -0,0 +1,31 @@ +/* + Copyright (C) 2011 Canonical, Ltd. + + This program is free software: you can redistribute it and/or modify it + under the terms of either or both of the following licenses: + + 1) the GNU Lesser General Public License version 3, as published by the + Free Software Foundation; and/or + 2) the GNU Lesser General Public License version 2.1, 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 warranties of + MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR + PURPOSE. See the applicable version of the GNU Lesser General Public + License for more details. + + You should have received a copy of both the GNU Lesser General Public + License version 3 and version 2.1 along with this program. If not, see + + + Authored by Michal Hruby +*/ + +namespace AppIndicator { + [CCode (type_check_function = "IS_APP_INDICATOR", type_id = "app_indicator_get_type ()")] + public class Indicator : GLib.Object { + } +} + +// vim:et:ai:cindent:ts=2 sts=2 sw=2: diff --git a/bindings/vala/examples/Makefile.am b/bindings/vala/examples/Makefile.am index 67ad932..315447c 100644 --- a/bindings/vala/examples/Makefile.am +++ b/bindings/vala/examples/Makefile.am @@ -4,36 +4,37 @@ else VER= endif -VALAFILES = indicator-example.vala +VALAFILES = ayatana-indicator-example.vala EXTRA_DIST = $(VALAFILES) VALAFLAGS = \ - --pkg appindicator$(VER)-0.1 \ + --pkg ayatana-appindicator$(VER)-0.1 \ --vapidir=$(top_builddir)/bindings/vala \ --save-temps if HAVE_VALAC -BUILT_SOURCES = indicator-example.c +BUILT_SOURCES = ayatana-indicator-example.c -indicator-example.c: $(VALAFILES) Makefile.am +ayatana-indicator-example.c: $(VALAFILES) Makefile.am $(VALAC) $(VALAFLAGS) -C $< -o $@ - $(SED) -i "s|#include\s*<\s*libappindicator/app-indicator.h\s*>||g" $@ + $(SED) -i "s|#include\s*<\s*libayatana-appindicator/app-indicator.h\s*>||g" $@ -nodist_indicator_example_SOURCES = indicator-example.c -indicator_example_CFLAGS = \ +nodist_ayatana_indicator_example_SOURCES = ayatana-indicator-example.c +ayatana_indicator_example_CFLAGS = \ $(LIBRARY_CFLAGS) \ -Wall \ -I$(top_srcdir)/src \ -include $(top_srcdir)/src/app-indicator.h -indicator_example_LDADD = \ +ayatana_indicator_example_LDADD = \ $(LIBRARY_LIBS) \ - $(top_builddir)/src/libappindicator$(VER).la + $(top_builddir)/src/libayatana-appindicator$(VER).la -check_PROGRAMS = indicator-example +check_PROGRAMS = ayatana-indicator-example CLEANFILES = \ *.c \ - indicator-example + ayatana-indicator-example +DISTCLEANFILES = Makefile.in endif diff --git a/bindings/vala/examples/ayatana-indicator-example.vala b/bindings/vala/examples/ayatana-indicator-example.vala new file mode 100644 index 0000000..764009f --- /dev/null +++ b/bindings/vala/examples/ayatana-indicator-example.vala @@ -0,0 +1,66 @@ +/* + * Copyright 2011 Canonical Ltd. + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 3, 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 warranties of + * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + * + * Authors: + * Marco Trevisan (Treviño) + */ + +using Gtk; +using AppIndicator; + +public class IndicatorExample { + public static int main(string[] args) { + Gtk.init(ref args); + + var win = new Window(); + win.title = "Indicator Test"; + win.resize(200, 200); + win.destroy.connect(Gtk.main_quit); + + var label = new Label("Hello, world!"); + win.add(label); + + var indicator = new Indicator(win.title, "indicator-messages", + IndicatorCategory.APPLICATION_STATUS); + if (!(indicator is Indicator)) return -1; + + indicator.set_status(IndicatorStatus.ACTIVE); + indicator.set_attention_icon("indicator-messages-new"); + + var menu = new Gtk.Menu(); + + var item = new Gtk.MenuItem.with_label("Foo"); + item.activate.connect(() => { + indicator.set_status(IndicatorStatus.ATTENTION); + }); + item.show(); + menu.append(item); + + var bar = item = new Gtk.MenuItem.with_label("Bar"); + item.show(); + item.activate.connect(() => { + indicator.set_status(IndicatorStatus.ACTIVE); + }); + menu.append(item); + + indicator.set_menu(menu); + indicator.set_secondary_activate_target(bar); + + win.show_all(); + + Gtk.main(); + return 0; + } +} diff --git a/bindings/vala/examples/indicator-example.vala b/bindings/vala/examples/indicator-example.vala deleted file mode 100644 index 764009f..0000000 --- a/bindings/vala/examples/indicator-example.vala +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright 2011 Canonical Ltd. - * - * This program is free software: you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 3, 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 warranties of - * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program. If not, see . - * - * Authors: - * Marco Trevisan (Treviño) - */ - -using Gtk; -using AppIndicator; - -public class IndicatorExample { - public static int main(string[] args) { - Gtk.init(ref args); - - var win = new Window(); - win.title = "Indicator Test"; - win.resize(200, 200); - win.destroy.connect(Gtk.main_quit); - - var label = new Label("Hello, world!"); - win.add(label); - - var indicator = new Indicator(win.title, "indicator-messages", - IndicatorCategory.APPLICATION_STATUS); - if (!(indicator is Indicator)) return -1; - - indicator.set_status(IndicatorStatus.ACTIVE); - indicator.set_attention_icon("indicator-messages-new"); - - var menu = new Gtk.Menu(); - - var item = new Gtk.MenuItem.with_label("Foo"); - item.activate.connect(() => { - indicator.set_status(IndicatorStatus.ATTENTION); - }); - item.show(); - menu.append(item); - - var bar = item = new Gtk.MenuItem.with_label("Bar"); - item.show(); - item.activate.connect(() => { - indicator.set_status(IndicatorStatus.ACTIVE); - }); - menu.append(item); - - indicator.set_menu(menu); - indicator.set_secondary_activate_target(bar); - - win.show_all(); - - Gtk.main(); - return 0; - } -} -- cgit v1.2.3