pidgin-nm-1.0.patch 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. diff --git a/configure.ac b/configure.ac
  2. index 04836fa..0a2d451 100644
  3. --- a/configure.ac
  4. +++ b/configure.ac
  5. @@ -1423,18 +1423,24 @@ fi
  6. dnl Check for NetworkManager.h; if we don't have it, oh well
  7. if test "x$enable_dbus" = "xyes" ; then
  8. if test "x$enable_nm" = "xyes" ; then
  9. - PKG_CHECK_MODULES(NETWORKMANAGER, [NetworkManager >= 0.5.0], [
  10. + PKG_CHECK_MODULES(NETWORKMANAGER, [libnm], [
  11. AC_SUBST(NETWORKMANAGER_CFLAGS)
  12. AC_SUBST(NETWORKMANAGER_LIBS)
  13. AC_DEFINE(HAVE_NETWORKMANAGER, 1, [Define if we have NetworkManager.])
  14. ], [
  15. - enable_nm=no
  16. - if test "x$force_deps" = "xyes" ; then
  17. - AC_MSG_ERROR([
  18. + PKG_CHECK_MODULES(NETWORKMANAGER, [NetworkManager >= 0.5.0], [
  19. + AC_SUBST(NETWORKMANAGER_CFLAGS)
  20. + AC_SUBST(NETWORKMANAGER_LIBS)
  21. + AC_DEFINE(HAVE_NETWORKMANAGER, 1, [Define if we have NetworkManager.])
  22. + ], [
  23. + enable_nm=no
  24. + if test "x$force_deps" = "xyes" ; then
  25. + AC_MSG_ERROR([
  26. NetworkManager development headers not found.
  27. Use --disable-nm if you do not need NetworkManager support.
  28. ])
  29. - fi])
  30. + fi])
  31. + ])
  32. fi
  33. else
  34. enable_nm=no
  35. diff --git a/libpurple/network.c b/libpurple/network.c
  36. index c43e3c7..b17e439 100644
  37. --- a/libpurple/network.c
  38. +++ b/libpurple/network.c
  39. @@ -939,8 +939,13 @@ nm_update_state(NMState state)
  40. #if NM_CHECK_VERSION(0,8,992)
  41. case NM_STATE_DISCONNECTING:
  42. #endif
  43. +#if NM_CHECK_VERSION(1,0,0)
  44. + if (prev != NM_STATE_CONNECTED_GLOBAL && prev != NM_STATE_UNKNOWN)
  45. + break;
  46. +#else
  47. if (prev != NM_STATE_CONNECTED && prev != NM_STATE_UNKNOWN)
  48. break;
  49. +#endif
  50. if (ui_ops != NULL && ui_ops->network_disconnected != NULL)
  51. ui_ops->network_disconnected();
  52. break;