aboutsummaryrefslogtreecommitdiff
path: root/bindings/vala
diff options
context:
space:
mode:
Diffstat (limited to 'bindings/vala')
-rw-r--r--bindings/vala/examples/ayatana-indicator-example.vala64
1 files changed, 32 insertions, 32 deletions
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;
+ }
}