On 27/06/10 08:16, Andrew wrote:
> On 26/06/10 23:09, Abderrahim Kitouni wrote:
>> Hi,
>>
>> 2010/6/25, Andrew <[email protected]>:
>>> Thankyou very much :-) That seemed to work and hopefully I shall try
>>>  less ambitious things next time :-)
>>>
>>>  However now I get this error, is this a bug in the library (this is
>>>  without invoking a new instance of the subclass, just compiling the
>>>  definition of the subclass)?
>>>
>>>  /home/andrew/Software/Projects/wasiliana/src/indicator.vala.c: In
>>>  function ‘wapp_indicator_category_from_enum’:
>>>  /home/andrew/Software/Projects/wasiliana/src/indicator.vala.c:82: error:
>>>  ‘APP_INDICATOR_TYPE_CATEGORY’ undeclared (first use in this function)
>> [...]
>>>  /home/andrew/Software/Projects/wasiliana/src/indicator.vala.c: In
>>>  function ‘wapp_indicator_get_type’:
>>>  /home/andrew/Software/Projects/wasiliana/src/indicator.vala.c:160:
>>>  error: ‘APP_INDICATOR_TYPE_INDICATOR’ undeclared (first use in this
>>>  function)
>>
>> I've told you this library is weird. Looking at the sources, these are
>> APP_INDICATOR_TYPE_INDICATOR_CATEGORY and APP_INDICATOR_TYPE
>> respectively. So the bindings need to be fixed: you need to add
>> type_id="..." (replacing the ... with the above types) to the CCode
>> attribute of the enum/class.
>>
>> HTH,
>> Abderrahim
> 
> Sorry, is that in the vapi file or the actual source code?
> 

Ignore that, I managed to do the APP_INDICATOR_TYPE correctly in the
vapi file, however I don't seem to have any success with the
APP_INDICATOR_TYPE_INDICATOR_CATEGORY.

Attached is the vapi file, could you point me in the right direction?

Thankyou

-- 
Andrew
/* appindicator.vapi generated by vapigen, do not modify. */

[CCode (cprefix = "AppIndicator", lower_case_cprefix = "app_indicator_")]
namespace AppIndicator {
	[CCode (cheader_filename = "libappindicator/app-indicator.h", cname = "AppIndicator", type_id="APP_INDICATOR_TYPE")]
	public class Indicator : GLib.Object {
		[CCode (cname = "app_indicator_new", has_construct_function = false)]
		public Indicator (string id, string icon_name, AppIndicator.Category category);
		[NoWrapper]
		public virtual void app_indicator_reserved_1 ();
		[NoWrapper]
		public virtual void app_indicator_reserved_2 ();
		[NoWrapper]
		public virtual unowned Gtk.StatusIcon fallback ();
		[CCode (cname = "app_indicator_get_attention_icon")]
		public unowned string get_attention_icon ();
		[CCode (cname = "app_indicator_get_category")]
		public AppIndicator.Category get_category ();
		[CCode (cname = "app_indicator_get_icon")]
		public unowned string get_icon ();
		[CCode (cname = "app_indicator_get_id")]
		public unowned string get_id ();
		[CCode (cname = "app_indicator_get_menu")]
		public unowned Gtk.Menu get_menu ();
		[CCode (cname = "app_indicator_get_status")]
		public AppIndicator.Status get_status ();
		[CCode (cname = "app_indicator_set_attention_icon")]
		public void set_attention_icon (string icon_name);
		[CCode (cname = "app_indicator_set_icon")]
		public void set_icon (string icon_name);
		[CCode (cname = "app_indicator_set_menu")]
		public void set_menu (Gtk.Menu menu);
		[CCode (cname = "app_indicator_set_status")]
		public void set_status (AppIndicator.Status status);
		[NoWrapper]
		public virtual void unfallback (Gtk.StatusIcon status_icon);
		[CCode (cname = "app_indicator_new_with_path", has_construct_function = false)]
		public Indicator.with_path (string id, string icon_name, AppIndicator.Category category, string icon_path);
		[NoAccessorMethod]
		public string attention_icon_name { owned get; set; }
		public string category { get; construct; }
		[NoAccessorMethod]
		public bool connected { get; }
		[NoAccessorMethod]
		public string icon_name { owned get; set; }
		[NoAccessorMethod]
		public string icon_theme_path { owned get; construct; }
		public string id { get; construct; }
		public string menu { get; }
		public string status { get; set; }
		public virtual signal void connection_changed (bool connected);
		public virtual signal void new_attention_icon ();
		public virtual signal void new_icon ();
		public virtual signal void new_status (string status);
	}
	[CCode (cprefix = "APP_INDICATOR_CATEGORY_", cheader_filename = "libappindicator/app-indicator.h")]
	public enum Category {
		APPLICATION_STATUS,
		COMMUNICATIONS,
		SYSTEM_SERVICES,
		HARDWARE,
		OTHER
	}
	[CCode (cprefix = "APP_INDICATOR_STATUS_", cheader_filename = "libappindicator/app-indicator.h")]
	public enum Status {
		PASSIVE,
		ACTIVE,
		ATTENTION
	}
	[CCode (cheader_filename = "libappindicator/app-indicator.h")]
	public const string APP_INDICATOR_SIGNAL_CONNECTION_CHANGED;
	[CCode (cheader_filename = "libappindicator/app-indicator.h")]
	public const string APP_INDICATOR_SIGNAL_NEW_ATTENTION_ICON;
	[CCode (cheader_filename = "libappindicator/app-indicator.h")]
	public const string APP_INDICATOR_SIGNAL_NEW_ICON;
	[CCode (cheader_filename = "libappindicator/app-indicator.h")]
	public const string APP_INDICATOR_SIGNAL_NEW_STATUS;
}
_______________________________________________
vala-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to