| Days | |
| Hours | |
| Minutes | |
| Seconds |
I’ve been working on CameraBooth some more and I separated out a launcher/monitor window for the application. You can load configurations then run them without having to use the command line. In that same vein you “should” be able to use it on multiple monitors now, so you can have your launcher on one screen and the booth window on another. I haven’t been able to test that for lack of having multiple monitors.
This is just a “preview” of what’s to come, right now it is super unstable. I don’t thread correctly, I just kind of hijack the glib main loop, so it’s a bit prone to crashes. I’ll fix that soon though. Until then here are some preview images of the new monitor screen.

Showing a failed booth window launch (didn’t plug in camera)

Showing the “live” monitor view. You can see what’s going on in the booth as well as monitor events like image captures.
Wrote a little buddy list application to The Mana World RPG. Nothing fancy, but I got to try out libcurl.
Go To Project Page

Here’s a non-obvious (or to me at least) trick to get tooltips onto a Gtk::Notebook tab. It took some searching, but essentially, you just add the Gtk::Label to a Gtk::EventBox and add that to the tab instead. Then you attach the tool tip to the Gtk::EventBox instead of the Gtk::Label.
Here’s an example. I couldn’t get my example to compile, the linker was going crazy, but I’m 99% sure that it’s fine. I’m probably just not seeing one glaring error. Let me know if you find it. The important stuff is all there, even if it won’t build.
main.cpp
1 2 3 4 5 6 7 8 9 10 11 12 13 | #include <gtkmm/main.h> #include "nbtt.h" using namespace std; int main (int argc, char *argv[]) { Gtk::Main kit (argc, argv); Nbtt notebookWindow; Gtk::Main::run(notebookWindow); return 0; } |
nbtt.cpp
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | #include <gtkmm/window.h> #include "nbtt.h" using namespace std; Nbtt::Nbtt() { set_title("Notebook Tabs With Labels!"); set_border_width(10); set_default_size(400, 200); lblTabOne.set_text("Tab 1"); lblTabTwo.set_text("Tab 2"); lblTabThree.set_text("Tab 3"); ebTabOne.add(lblTabOne); ebTabTwo.add(lblTabTwo); ebTabThree.add(lblTabThree); toolTips.set_tip(ebTabOne,"Tab to page one."); toolTips.set_tip(ebTabTwo,"Tab to page two."); toolTips.set_tip(ebTabThree,"Tab to page three."); exNotebook.append_page(pageOne, ebTabOne); exNotebook.append_page(pageTwo, "Second"); show_all(); } |
nbtt.h
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | #ifndef NBTT_H #define NBTT_H #include <gtkmm/window.h> #include <gtkmm/notebook.h> #include <gtkmm/eventbox.h> #include <gtkmm/label.h> #include <gtkmm/tooltips.h> using namespace std; class Nbtt; class Nbtt : public Gtk::Window { public: Nbtt(); private: Gtk::Notebook exNotebook; Gtk::EventBox ebTabOne; Gtk::EventBox ebTabTwo; Gtk::EventBox ebTabThree; Gtk::Label lblTabOne; Gtk::Label lblTabTwo; Gtk::Label lblTabThree; Gtk::Tooltips toolTips; Gtk::Label pageOne; Gtk::Label pageTwo; Gtk::Label pageThree; }; #endif // NBTT_H |
I found this trick in the gnome-list@gnome.org history. The thread starts here if you want to read the exchange.
Posted August 22nd, 2007 - Permalink