Help->Chat menu item launches the users browser to allow chatting on IRC via mibbit
authorBen Loftis <ben@glw.com>
Wed, 20 May 2009 03:34:00 +0000 (03:34 +0000)
committerBen Loftis <ben@glw.com>
Wed, 20 May 2009 03:34:00 +0000 (03:34 +0000)
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@5103 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/ardour.menus.in
gtk2_ardour/ardour_ui.cc
gtk2_ardour/ardour_ui.h
gtk2_ardour/ardour_ui_ed.cc
gtk2_ardour/nag.h

index f692061c7a932e979a460c8d9998bcb336868995..73ce9e0a476e8edc9a0cff9bcd88043de15964b1 100644 (file)
          </menu>
         <menu name='Help' action='Help'>
             <menuitem action='About'/>
+            <menuitem action='Chat'/>
        </menu>
      </menubar>
 
index a3b699c809f54493b405b42aa657ce51c9f2ae4e..24b3316f3d22559d0f235e3eacfd971f82b74f6e 100644 (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 ()
 {
index 29acce6377535f1817b9c262c793116e6c150bf1..fa126c1565eb91557049c535a5b733d4f93ac08b 100644 (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 ();
        
index 2916257aa3b549a0a2cd680dbcfd00a25b1eb83c..014b94ab81ab9bcf6734ea5795c965aaa137e308 100644 (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));
        
index 5872e28f3b3ebe4b97e1e6823bb2fc3f97fe97f5..6d5b19139c11b3e348901ca363e3430aac57d886 100644 (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);
 };