Skip to content

Commit

Permalink
Switch to gtk3
Browse files Browse the repository at this point in the history
  • Loading branch information
ncopa committed Aug 30, 2018
1 parent 9964988 commit 2bda3fc
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ PKG_CHECK_MODULES([GLIB], [glib-2.0])
PKG_CHECK_MODULES([GIO], [gio-2.0])
PKG_CHECK_MODULES([GMODULE], [gmodule-2.0])
PKG_CHECK_MODULES([XFCE4_VALA], [xfce4-vala])
PKG_CHECK_MODULES([LIBXFCE4UI], [libxfce4ui-1])
PKG_CHECK_MODULES([LIBXFCE4UI], [libxfce4ui-2])
AC_CONFIG_FILES([
Makefile
src/Makefile
Expand Down
8 changes: 7 additions & 1 deletion src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ xfce_bluetooth_LDADD = @GLIB_LIBS@ \
@GIO_LIBS@ \
@GMODULE_LIBS@ \
@LIBXFCE4UI_LIBS@
# Gtk builder needs libxfce4ui to be explicitly linked in
xfce_bluetooth_LDFLAGS = -Wl,--no-as-needed -lxfce4ui-2

xfce_bluetooth_agent_SOURCES = xfce-bluetooth-agent.vala BluezInterface.vala
xfce_bluetooth_agent_CFLAGS = @GLIB_CFLAGS@ \
Expand All @@ -21,4 +23,8 @@ xfce_bluetooth_agent_LDADD = @GLIB_LIBS@ \
@GMODULE_LIBS@ \
@LIBXFCE4UI_LIBS@

AM_VALAFLAGS = --pkg gtk+-2.0 --pkg gmodule-2.0 --pkg gio-2.0 --pkg libxfce4ui-1

AM_VALAFLAGS = --pkg gtk+-3.0 \
--pkg gmodule-2.0 \
--pkg gio-2.0 \
--pkg libxfce4ui-2
6 changes: 3 additions & 3 deletions src/xfce-bluetooth.vala
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class XfceBluetoothApp : GLib.Object {
BluezAdapterProperties adapter;
HashTable<ObjectPath, HashTable<string, HashTable<string, Variant>>> objects;

ListStore device_store;
Gtk.ListStore device_store;

private void find_adapter() {
objects.foreach((path, ifaces) => {
Expand Down Expand Up @@ -53,7 +53,7 @@ public class XfceBluetoothApp : GLib.Object {
}

private void find_devices() {
device_store = new ListStore(DevCols.N_COLUMNS,
device_store = new Gtk.ListStore(DevCols.N_COLUMNS,
typeof(string),
typeof(string),
typeof(string),
Expand Down Expand Up @@ -239,7 +239,7 @@ public class XfceBluetoothApp : GLib.Object {
Value objpath = Value(typeof(string));
model.get_value(iter, DevCols.OBJPATH, out objpath);
adapter.remove_device(new ObjectPath(objpath.get_string()));
device_store.remove(iter);
device_store.remove(ref iter);
}
}

Expand Down

0 comments on commit 2bda3fc

Please sign in to comment.