From e8730462c258eb0545244a67e99228cd3fe79207 Mon Sep 17 00:00:00 2001 From: Ben Loftis Date: Wed, 20 May 2009 03:34:00 +0000 Subject: Help->Chat menu item launches the users browser to allow chatting on IRC via mibbit git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@5103 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/ardour.menus.in | 1 + gtk2_ardour/ardour_ui.cc | 11 +++++++++++ gtk2_ardour/ardour_ui.h | 1 + gtk2_ardour/ardour_ui_ed.cc | 1 + gtk2_ardour/nag.h | 2 +- 5 files changed, 15 insertions(+), 1 deletion(-) (limited to 'gtk2_ardour') diff --git a/gtk2_ardour/ardour.menus.in b/gtk2_ardour/ardour.menus.in index f692061c7a..73ce9e0a47 100644 --- a/gtk2_ardour/ardour.menus.in +++ b/gtk2_ardour/ardour.menus.in @@ -573,6 +573,7 @@ + diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index a3b699c809..24b3316f3d 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -79,6 +79,7 @@ typedef uint64_t microseconds_t; #include "new_session_dialog.h" #include "about.h" #include "splash.h" +#include "nag.h" #include "utils.h" #include "gui_thread.h" #include "theme_manager.h" @@ -2599,6 +2600,16 @@ ARDOUR_UI::show_about () about->show_all (); } +void +ARDOUR_UI::launch_chat () +{ +#ifdef __APPLE__ + NagScreen::open_uri("http://widget.mibbit.com/?settings=c06958ab4aa3b0c077669dd47e0c138e&server=irc.freenode.net&channel=%23ardour-osx&noServerNotices=true&noServerMotd=true"); +#else + NagScreen::open_uri("http://widget.mibbit.com/?settings=c06958ab4aa3b0c077669dd47e0c138e&server=irc.freenode.net&channel=%23ardour&noServerNotices=true&noServerMotd=true"); +#endif +} + void ARDOUR_UI::hide_about () { diff --git a/gtk2_ardour/ardour_ui.h b/gtk2_ardour/ardour_ui.h index 29acce6377..fa126c1565 100644 --- a/gtk2_ardour/ardour_ui.h +++ b/gtk2_ardour/ardour_ui.h @@ -114,6 +114,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI void show_splash (); void hide_splash (); + void launch_chat (); void show_about (); void hide_about (); diff --git a/gtk2_ardour/ardour_ui_ed.cc b/gtk2_ardour/ardour_ui_ed.cc index 2916257aa3..014b94ab81 100644 --- a/gtk2_ardour/ardour_ui_ed.cc +++ b/gtk2_ardour/ardour_ui_ed.cc @@ -214,6 +214,7 @@ ARDOUR_UI::install_actions () act = ActionManager::register_toggle_action (common_actions, X_("ToggleBigClock"), _("Big Clock"), mem_fun(*this, &ARDOUR_UI::toggle_big_clock_window)); ActionManager::session_sensitive_actions.push_back (act); ActionManager::register_action (common_actions, X_("About"), _("About"), mem_fun(*this, &ARDOUR_UI::show_about)); + ActionManager::register_action (common_actions, X_("Chat"), _("Chat"), mem_fun(*this, &ARDOUR_UI::launch_chat)); ActionManager::register_toggle_action (common_actions, X_("ToggleThemeManager"), _("Theme Manager"), mem_fun(*this, &ARDOUR_UI::toggle_theme_manager)); ActionManager::register_toggle_action (common_actions, X_("ToggleKeyEditor"), _("Keybindings"), mem_fun(*this, &ARDOUR_UI::toggle_key_editor)); diff --git a/gtk2_ardour/nag.h b/gtk2_ardour/nag.h index 5872e28f3b..6d5b19139c 100644 --- a/gtk2_ardour/nag.h +++ b/gtk2_ardour/nag.h @@ -15,6 +15,7 @@ class NagScreen : public ArdourDialog static NagScreen* maybe_nag (std::string context); void nag (); + static bool open_uri (const char*); private: NagScreen (std::string context, bool maybe_subscriber); @@ -32,7 +33,6 @@ class NagScreen : public ArdourDialog void mark_affirmed_subscriber (); void offer_to_donate (); void offer_to_subscribe (); - bool open_uri (const char*); static bool is_subscribed (bool& really); }; -- cgit v1.2.3