Giter Site home page Giter Site logo

agalin / pidgin_macos_integration Goto Github PK

View Code? Open in Web Editor NEW
8.0 5.0 1.0 78 KB

Pidgin plugin adding macOS shell integration

License: BSD 2-Clause "Simplified" License

Objective-C 5.42% C 8.33% Swift 86.25%
pidgin-plugins pidgin macos libpurple libpurple-plugin macos-swift

pidgin_macos_integration's Introduction

MacOS integration plugin for Pidgin

Pidgin is a multiprotocol communicator based on libPurple with GUI created using GTK+. There is no official support for macOS as there is an alternative written using native frameworks - Adium. Sadly, Adium seems to be nearly abandoned. It means that there is no native libPurple client for macOS. This plugin tries make Pidgin feel as native as it is possible.

Basic Integration

I suggest to create app bundle (or use mine: Pidgin Bundle) for Pidgin as it adds dock icon and hides Terminal window. It's REQUIRED for notifications and possible future translations to work properly.

Homebrew has a formula for gtk-chtheme which makes theme change easier - and macOS themes for GTK are easy to find.

Features

There are currently following features implemented:

  • Menu integration - all buddy list and conversation menus moved from window to menubar, moved standard macOS options: preferences, about to application menu.
  • Notification Center integration - every message received shows native macOS notification and requests attention (jumping dock icon), plays configurable sound (currently only built-in seem to work).
  • Built-in GTK shortcuts mapped to ⌘-based from ⌃-based (limited to built-in, not Pidgin-defined) through GTK OSX Application. Includes support for ⌘-Q (check issues section).
  • Partial workaround for GTK2 Mojave rendering issues - Mojave changes AppKit's redrawing logic and breaks some redraws for GTK2. In Pidgin it's reflected by not refreshing conversation on tab switch and so on. More details

Implementation details

Plugin is written in Swift. As Pidgin is written in C, bridging is needed. That's done by Objective-C to Swift bridge. Only things that are really hard or impossible to do via bridging (varargs functions, some type casting like callback registration) is done in Objective-C. It's mostly just an ocasion for the author to learn Swift and Cocoa.

Issues and TODO

  • GTK OSX Application does not provide any way to cleanly deintegrate it from running GTK application. It means that plugin unload leaves Pidgin with some integration intact. Window menus are made visible again and callbacks are deregistered but that's all.
  • No clean build procedure. Project is currently hardcoded to Homebrew-installed libraries in enabled version. Probably should be changed to pkg-config.
  • No prebuilt libraries - see previous point.
  • Protocols are missing icons in Conversation Send To menu. They need to be added manually.
  • Notifications are displayed for receiving-im-msg and receiving-chat-msg instead of displayed-im-msg and displayed-chat-msg (I had some issues with text pointers for this one callback type) which means that filtered messages can still send notifications. It can lower your privacy!
  • Currently using NSUserNotification api which will be deprecated with the release of Mojave.
  • Help menu does not stay visible all the time (it's still connected to Buddy List window).
  • It seems that preferences menu option is only available for last opened window.
  • ⌘-` seems not to work.
  • ⌘-Q seems not to call proper Pidgin termination callbacks. Some settings may be lost when used!
  • Application starts in background - that's actually issue with every GTK+ based app. Fixed with correct Info.plist entries.
  • It's possible to add some kind of Touch Bar support.
  • Custom notification sounds are palyed correctly when tested but don't work for notifications.

Build

Build using XCode.

Homebrew dependencies:

  • Pidgin
  • GTK+
  • gtk-mac-integration
  • GLib
  • Cairo
  • Pango
  • Atk
  • Gettext

pidgin_macos_integration's People

Contributors

agalin avatar kgraefe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

snowkat

pidgin_macos_integration's Issues

Menu entry "Settings" is missing

When the buddy list is in focus, none of the menus in the menu bar have the "Settings" entry. Normally this would be under "Extras". I noticed that it is under "Pidgin" when I focus a chat window, though.

License

I am no expert, but I think your licensing is not compatible with Pidgin/libpurple.

From what I understand, GPL code can call BSD code, but not the other way around. Therefore as Pidgin and libpurple are under GPL, plugins must be GPL as well.

Pidgin crashes when plugin is loaded at startup

I managed to build the project using recent Xcode. From there the installation procedure is not clear. I manually copied ~/Library/Developer/Xcode/DerivedData/Pidgin_MacOS_Integration-dfzhbrtqfeopwxdtrkyrvgpzfkfo/Build/Products/Debug/Pidgin MacOS Integration to ~/.purple/plugins/macos-integration.so.

After that I could load the plugin within Pidgin and it seemed to work fine but after quitting, Pidgin crashes on every start. I have to delete the plugin (or disable it in prefs.xml) to get Pidgin running again.

When running pidgin from command line the output is:

> pidgin
Initialization
Load
selfPtr: Optional(0x00007fc66e47f140)
Fatal error: Unexpectedly found nil while unwrapping an Optional value
Illegal instruction: 4

Creating a separate bundle

Hi,

I found your project when was trying to write gtk-osx-integration for the pidgin myself. I am currently fixed few bugs in osx version (e.g. broken status icon) + compiled number of plugins (skype, facebook) and thinking to release standalone dmg version. I think we can join efforts, as i dont think that brew is a best place for it. I did +- same for the gimp/osx - https://github.com/samm-git/gimp-osx-package

Let me know what do you think please.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.