From 28d217863f9c72d0ca3f1e16fe7f7da058b43346 Mon Sep 17 00:00:00 2001 From: Robert Tari Date: Wed, 13 Jul 2022 23:32:15 +0200 Subject: Whitespace fix --- .../vala/examples/ayatana-indicator-example.vala | 64 +++++++++++----------- 1 file changed, 32 insertions(+), 32 deletions(-) (limited to 'bindings') diff --git a/bindings/vala/examples/ayatana-indicator-example.vala b/bindings/vala/examples/ayatana-indicator-example.vala index 764009f..4804314 100644 --- a/bindings/vala/examples/ayatana-indicator-example.vala +++ b/bindings/vala/examples/ayatana-indicator-example.vala @@ -21,46 +21,46 @@ using Gtk; using AppIndicator; public class IndicatorExample { - public static int main(string[] args) { - Gtk.init(ref args); + 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 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 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; + 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"); + indicator.set_status(IndicatorStatus.ACTIVE); + indicator.set_attention_icon("indicator-messages-new"); - var menu = new Gtk.Menu(); + 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 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); + 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); + indicator.set_menu(menu); + indicator.set_secondary_activate_target(bar); - win.show_all(); + win.show_all(); - Gtk.main(); - return 0; - } + Gtk.main(); + return 0; + } } -- cgit v1.2.3 From 44a82a050cf69f8b04429f1f7e06d3ad7bf58ca7 Mon Sep 17 00:00:00 2001 From: Robert Tari Date: Thu, 14 Jul 2022 23:38:23 +0200 Subject: Fix remaining deprecation warnings --- bindings/vala/examples/ayatana-indicator-example.vala | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'bindings') diff --git a/bindings/vala/examples/ayatana-indicator-example.vala b/bindings/vala/examples/ayatana-indicator-example.vala index 4804314..55535ab 100644 --- a/bindings/vala/examples/ayatana-indicator-example.vala +++ b/bindings/vala/examples/ayatana-indicator-example.vala @@ -1,5 +1,6 @@ /* * Copyright 2011 Canonical Ltd. + * Copyright 2022 Robert Tari * * 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 @@ -15,6 +16,7 @@ * * Authors: * Marco Trevisan (TreviƱo) + * Robert Tari */ using Gtk; @@ -37,7 +39,7 @@ public class IndicatorExample { if (!(indicator is Indicator)) return -1; indicator.set_status(IndicatorStatus.ACTIVE); - indicator.set_attention_icon("indicator-messages-new"); + indicator.set_attention_icon_full("indicator-messages-new", null); var menu = new Gtk.Menu(); -- cgit v1.2.3 From d305bdac70063c544e5893798ca9569a1903f53b Mon Sep 17 00:00:00 2001 From: Robert Tari Date: Fri, 15 Jul 2022 00:53:48 +0200 Subject: Silence warnings generated by Vala --- bindings/vala/examples/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bindings') diff --git a/bindings/vala/examples/CMakeLists.txt b/bindings/vala/examples/CMakeLists.txt index b747208..2751096 100644 --- a/bindings/vala/examples/CMakeLists.txt +++ b/bindings/vala/examples/CMakeLists.txt @@ -21,7 +21,7 @@ add_custom_command( # ayatana-indicator-example -set_source_files_properties("${CMAKE_CURRENT_BINARY_DIR}/ayatana-indicator-example.c" PROPERTIES COMPILE_FLAGS " -include ${CMAKE_SOURCE_DIR}/src/app-indicator.h") +set_source_files_properties("${CMAKE_CURRENT_BINARY_DIR}/ayatana-indicator-example.c" PROPERTIES COMPILE_FLAGS " -include ${CMAKE_SOURCE_DIR}/src/app-indicator.h -Wno-incompatible-pointer-types") add_executable("ayatana-indicator-example" "${CMAKE_CURRENT_BINARY_DIR}/ayatana-indicator-example.c") target_include_directories("ayatana-indicator-example" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS}) target_link_libraries("ayatana-indicator-example" "${PROJECT_DEPS_LIBRARIES} -layatana-appindicator3 -L${CMAKE_BINARY_DIR}/src") -- cgit v1.2.3 From 694ab4eec294a93358f78a349c6df94c3b666126 Mon Sep 17 00:00:00 2001 From: Robert Tari Date: Fri, 15 Jul 2022 23:37:01 +0200 Subject: Fix all remaining build warnings --- bindings/vala/ayatana-appindicator-0.1-custom.vala | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'bindings') diff --git a/bindings/vala/ayatana-appindicator-0.1-custom.vala b/bindings/vala/ayatana-appindicator-0.1-custom.vala index 9fa51eb..4cf9e3e 100644 --- a/bindings/vala/ayatana-appindicator-0.1-custom.vala +++ b/bindings/vala/ayatana-appindicator-0.1-custom.vala @@ -1,5 +1,6 @@ /* - Copyright (C) 2011 Canonical, Ltd. + Copyright 2011 Canonical, Ltd. + Copyright 2022 Robert Tari This program is free software: you can redistribute it and/or modify it under the terms of either or both of the following licenses: @@ -19,11 +20,13 @@ License version 3 and version 2.1 along with this program. If not, see - Authored by Michal Hruby + Authors: + Michal Hruby + Robert Tari */ namespace AppIndicator { - [CCode (type_check_function = "IS_APP_INDICATOR", type_id = "app_indicator_get_type ()")] + [CCode (type_check_function = "APP_IS_INDICATOR", type_id = "app_indicator_get_type ()")] public class Indicator : GLib.Object { } } -- cgit v1.2.3