From b7373f4ddc88c1aab1ad2aa2a615d1832d71a330 Mon Sep 17 00:00:00 2001 From: Patrick Griffis Date: Thu, 31 Mar 2016 06:58:03 -0400 Subject: unix: Open urls in existing instance if supported --- data/misc/Makefile.am | 13 +++++++++++-- data/misc/hexchat.desktop.in | 18 ------------------ data/misc/hexchat.desktop.in.in | 18 ++++++++++++++++++ 3 files changed, 29 insertions(+), 20 deletions(-) delete mode 100644 data/misc/hexchat.desktop.in create mode 100644 data/misc/hexchat.desktop.in.in (limited to 'data') diff --git a/data/misc/Makefile.am b/data/misc/Makefile.am index 48805ba3..e40c4ba9 100644 --- a/data/misc/Makefile.am +++ b/data/misc/Makefile.am @@ -3,6 +3,15 @@ appdata_DATA = $(appdata_in_files:.xml.in=.xml) appdatadir = $(datadir)/appdata @INTLTOOL_XML_RULE@ +if USE_DBUS +exec_command = 'hexchat --existing %U' +else +exec_command = 'hexchat %U' +endif + +hexchat.desktop.in: hexchat.desktop.in.in + $(AM_V_GEN)sed -e s!\@exec_command\@!$(exec_command)! < $< > $@ + data_desktopdir = $(datadir)/applications data_desktop_in_files = hexchat.desktop.in @@ -26,6 +35,6 @@ uninstall-hook: $(UPDATE_MIME_DATABASE); $(UPDATE_DESKTOP_DATABASE); -EXTRA_DIST = hexchat.appdata.xml.in hexchat.desktop.in htm.desktop.in htm-mime.xml +EXTRA_DIST = hexchat.appdata.xml.in hexchat.desktop.in.in htm.desktop.in htm-mime.xml -CLEANFILES = $(appdata_DATA) $(data_desktop_DATA) +CLEANFILES = $(appdata_DATA) $(data_desktop_DATA) hexchat.desktop.in diff --git a/data/misc/hexchat.desktop.in b/data/misc/hexchat.desktop.in deleted file mode 100644 index bca42665..00000000 --- a/data/misc/hexchat.desktop.in +++ /dev/null @@ -1,18 +0,0 @@ -[Desktop Entry] -_Name=HexChat -_GenericName=IRC Client -_Comment=Chat with other people online -_Keywords=IM;Chat; -Exec=hexchat %U -Icon=hexchat -Terminal=false -Type=Application -Categories=GTK;Network;IRCClient; -StartupNotify=true -X-GNOME-UsesNotifications=true -MimeType=x-scheme-handler/irc;x-scheme-handler/ircs; -Actions=SafeMode; - -[Desktop Action SafeMode] -_Name=Open Safe Mode -Exec=hexchat --no-auto --no-plugins diff --git a/data/misc/hexchat.desktop.in.in b/data/misc/hexchat.desktop.in.in new file mode 100644 index 00000000..a778e9b5 --- /dev/null +++ b/data/misc/hexchat.desktop.in.in @@ -0,0 +1,18 @@ +[Desktop Entry] +_Name=HexChat +_GenericName=IRC Client +_Comment=Chat with other people online +_Keywords=IM;Chat; +Exec=@exec_command@ +Icon=hexchat +Terminal=false +Type=Application +Categories=GTK;Network;IRCClient; +StartupNotify=true +X-GNOME-UsesNotifications=true +MimeType=x-scheme-handler/irc;x-scheme-handler/ircs; +Actions=SafeMode; + +[Desktop Action SafeMode] +_Name=Open Safe Mode +Exec=hexchat --no-auto --no-plugins -- cgit 1.4.1