On 27/06/10 18:11, Andrew wrote:
> On 27/06/10 17:32, Abderrahim Kitouni wrote:
>> Hi,
>>
>> 2010/6/27 Andrew <[email protected]>:
>>> On 27/06/10 08:16, Andrew wrote:
>>> 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?
>>
>> in :
>>      [CCode (cprefix = "APP_INDICATOR_CATEGORY_", cheader_filename =
>> "libappindicator/app-indicator.h")]
>>      public enum Category {
>>
>> add type_id="APP_INDICATOR_TYPE_INDICATOR_CATEGORY" just like you did
>> it with the class. I see no reason for it not working.
>>
>> Abderrahim
> 
> Nope doesn't work, the error is:
> 
> /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_INDICATOR_CATEGORY’ undeclared (first use in this
> function)
> /home/andrew/Software/Projects/wasiliana/src/indicator.vala.c:82: error:
> (Each undeclared identifier is reported only once
> /home/andrew/Software/Projects/wasiliana/src/indicator.vala.c:82: error:
> for each function it appears in.)
> error: cc exited with status 256
> 
> The C and genie files are attached (if it helps)
> 
> 

And the vapi file (probably more useful)

-- 
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", type_id="APP_INDICATOR_TYPE_INDICATOR_CATEGORY")]
	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