aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bindings/vala/examples/indicator-example.vala6
-rw-r--r--configure.ac4
-rw-r--r--docs/reference/libappindicator-docs.sgml.in4
-rw-r--r--example/simple-client-vala.vala36
-rw-r--r--src/app-indicator.c7
-rw-r--r--tests/test-libappindicator.desktop15
6 files changed, 36 insertions, 36 deletions
diff --git a/bindings/vala/examples/indicator-example.vala b/bindings/vala/examples/indicator-example.vala
index 8feb4ba..764009f 100644
--- a/bindings/vala/examples/indicator-example.vala
+++ b/bindings/vala/examples/indicator-example.vala
@@ -39,16 +39,16 @@ public class IndicatorExample {
indicator.set_status(IndicatorStatus.ACTIVE);
indicator.set_attention_icon("indicator-messages-new");
- var menu = new Menu();
+ var menu = new Gtk.Menu();
- var item = new MenuItem.with_label("Foo");
+ 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 MenuItem.with_label("Bar");
+ var bar = item = new Gtk.MenuItem.with_label("Bar");
item.show();
item.activate.connect(() => {
indicator.set_status(IndicatorStatus.ACTIVE);
diff --git a/configure.ac b/configure.ac
index f38947d..1a34310 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,5 @@
AC_INIT([libappindicator],
- [0.4.90],
+ [0.4.92],
[http://bugs.launchpad.net/libappindicator],
[libappindicator],
[http://launchpad.net/libappindicator])
@@ -44,7 +44,7 @@ GTK_REQUIRED_VERSION=2.18
GTK3_REQUIRED_VERSION=2.91
GLIB_REQUIRED_VERSION=2.26
GIO_REQUIRED_VERSION=2.26
-INDICATOR_REQUIRED_VERSION=0.3.5
+INDICATOR_REQUIRED_VERSION=0.4.93
DBUSMENUGTK_REQUIRED_VERSION=0.5.90
DBUS_GLIB_REQUIRED_VERSION=0.82
diff --git a/docs/reference/libappindicator-docs.sgml.in b/docs/reference/libappindicator-docs.sgml.in
index 67c7cc6..b6f8009 100644
--- a/docs/reference/libappindicator-docs.sgml.in
+++ b/docs/reference/libappindicator-docs.sgml.in
@@ -25,6 +25,10 @@
<title>API Index</title>
<xi:include href="xml/api-index-full.xml"><xi:fallback /></xi:include>
</index>
+ <index id="api-index-0-5">
+ <title>API 0.5 Index</title>
+ <xi:include href="xml/api-index-0.5.xml"><xi:fallback /></xi:include>
+ </index>
<index id="api-index-deprecated">
<title>Deprecated API Index</title>
<xi:include href="xml/api-index-deprecated.xml"><xi:fallback /></xi:include>
diff --git a/example/simple-client-vala.vala b/example/simple-client-vala.vala
index 1b8bad9..f8cd874 100644
--- a/example/simple-client-vala.vala
+++ b/example/simple-client-vala.vala
@@ -30,7 +30,7 @@ static int main(string[] args) {
}
class SimpleClient {
- Menu menu;
+ Gtk.Menu menu;
Indicator ci;
int percentage;
bool active;
@@ -56,24 +56,24 @@ class SimpleClient {
widget.set_sensitive(!widget.is_sensitive());
}
- private void append_submenu(MenuItem item) {
- var menu = new Menu();
- MenuItem mi;
+ private void append_submenu(Gtk.MenuItem item) {
+ var menu = new Gtk.Menu();
+ Gtk.MenuItem mi;
- mi = new MenuItem.with_label("Sub 1");
+ mi = new Gtk.MenuItem.with_label("Sub 1");
menu.append(mi);
mi.activate.connect(() => { print("Sub1\n"); });
- MenuItem prev_mi = mi;
- mi = new MenuItem.with_label("Sub 2");
+ Gtk.MenuItem prev_mi = mi;
+ mi = new Gtk.MenuItem.with_label("Sub 2");
menu.append(mi);
mi.activate.connect(() => { toggle_sensitivity(prev_mi); });
- mi = new MenuItem.with_label("Sub 3");
+ mi = new Gtk.MenuItem.with_label("Sub 3");
menu.append(mi);
mi.activate.connect(() => { print("Sub3\n"); });
- mi = new MenuItem.with_label("Toggle Attention");
+ mi = new Gtk.MenuItem.with_label("Toggle Attention");
menu.append(mi);
mi.activate.connect(() => {
if (ci.get_status() == IndicatorStatus.ATTENTION)
@@ -88,7 +88,7 @@ class SimpleClient {
item.set_submenu(menu);
}
- private void label_toggle(MenuItem item) {
+ private void label_toggle(Gtk.MenuItem item) {
can_haz_label = !can_haz_label;
if (can_haz_label) {
@@ -114,28 +114,28 @@ class SimpleClient {
return true;
});
- menu = new Menu();
+ menu = new Gtk.Menu();
var chk = new CheckMenuItem.with_label("1");
chk.activate.connect(() => { print("1\n"); });
menu.append(chk);
chk.show();
- var radio = new RadioMenuItem.with_label(new SList<RadioMenuItem>(), "2");
+ var radio = new Gtk.RadioMenuItem.with_label(new SList<RadioMenuItem>(), "2");
radio.activate.connect(() => { print("2\n"); });
menu.append(radio);
radio.show();
- var submenu = new MenuItem.with_label("3");
+ var submenu = new Gtk.MenuItem.with_label("3");
menu.append(submenu);
append_submenu(submenu);
submenu.show();
- var toggle_item = new MenuItem.with_label("Toggle 3");
+ var toggle_item = new Gtk.MenuItem.with_label("Toggle 3");
toggle_item.activate.connect(() => { toggle_sensitivity(submenu); });
menu.append(toggle_item);
toggle_item.show();
- var imgitem = new ImageMenuItem.from_stock(Stock.NEW, null);
+ var imgitem = new Gtk.ImageMenuItem.from_stock(Stock.NEW, null);
imgitem.activate.connect(() => {
Image img = (Image) imgitem.get_image();
img.set_from_stock(Stock.OPEN, IconSize.MENU);
@@ -143,7 +143,7 @@ class SimpleClient {
menu.append(imgitem);
imgitem.show();
- var att = new MenuItem.with_label("Get Attention");
+ var att = new Gtk.MenuItem.with_label("Get Attention");
att.activate.connect(() => {
if (active) {
ci.set_status(IndicatorStatus.ATTENTION);
@@ -158,13 +158,13 @@ class SimpleClient {
menu.append(att);
att.show();
- var show = new MenuItem.with_label("Show Label");
+ var show = new Gtk.MenuItem.with_label("Show Label");
label_toggle(show);
show.activate.connect(() => { label_toggle(show); });
menu.append(show);
show.show();
- var icon = new CheckMenuItem.with_label("Set Local Icon");
+ var icon = new Gtk.CheckMenuItem.with_label("Set Local Icon");
icon.activate.connect(() => {
if (icon.get_active()) {
ci.set_icon("simple-client-test-icon.png");
diff --git a/src/app-indicator.c b/src/app-indicator.c
index d7b3d18..0d6450c 100644
--- a/src/app-indicator.c
+++ b/src/app-indicator.c
@@ -926,11 +926,8 @@ app_indicator_set_property (GObject * object, guint prop_id, const GValue * valu
break;
case PROP_DBUS_MENU_SERVER:
- if (priv->menuservice != NULL) {
- g_object_unref (priv->menuservice);
- }
- gpointer val = g_value_dup_object(value);
- priv->menuservice = DBUSMENU_SERVER(val);
+ g_clear_object (&priv->menuservice);
+ priv->menuservice = DBUSMENU_SERVER (g_value_dup_object(value));
break;
default:
diff --git a/tests/test-libappindicator.desktop b/tests/test-libappindicator.desktop
index f8a72f3..4747030 100644
--- a/tests/test-libappindicator.desktop
+++ b/tests/test-libappindicator.desktop
@@ -5,20 +5,19 @@ Comment=This is only a test
Exec=/usr/bin/false
Terminal=false
Type=Application
-X-Ayatana-Desktop-Shortcuts=Short1;Short2;Short3;
-TargetEnvironment=Test Program;
+Actions=Short1;Short2;Short3;
-[Short1 Shortcut Group]
+[Desktop Action Short1]
Name=Shortcut 1
Exec=/usr/bin/true
-TargetEnvironment=Test Program;
+OnlyShowIn=Test Program;
-[Short2 Shortcut Group]
+[Desktop Action Short2]
Name=Shortcut 2
Exec=/usr/bin/true
-TargetEnvironment=Test Program;
+OnlyShowIn=Test Program;
-[Short3 Shortcut Group]
+[Desktop Action Short3]
Name=Shortcut 3
Exec=/usr/bin/true
-TargetEnvironment=Test Program;
+OnlyShowIn=Test Program;