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
This commit is contained in:
Ben Loftis 2009-05-20 03:34:00 +00:00
parent 06142b7544
commit e8730462c2
5 changed files with 15 additions and 1 deletions

View File

@ -573,6 +573,7 @@
</menu>
<menu name='Help' action='Help'>
<menuitem action='About'/>
<menuitem action='Chat'/>
</menu>
</menubar>

View File

@ -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 ()
{

View File

@ -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 ();

View File

@ -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));

View File

@ -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);
};