+TitlePngPopup::TitlePngPopup(TitleMain *client, TitleWindow *window)
+ : BC_DialogThread()
+{
+ this->client = client;
+ this->window = window;
+}
+
+TitlePngPopup::~TitlePngPopup()
+{
+ close_window();
+}
+
+void TitlePngPopup::handle_done_event(int result)
+{
+ if( result ) return;
+ BrowseButtonWindow *gui = (BrowseButtonWindow *)get_gui();
+ const char *path = gui->get_submitted_path();
+ char txt[BCSTRLEN]; sprintf(txt, "<png %s>",path);
+ window->insert_ibeam(txt, strlen(txt));
+}
+
+BC_Window *TitlePngPopup::new_gui()
+{
+ BC_DisplayInfo display_info;
+ int x = display_info.get_abs_cursor_x();
+ int y = display_info.get_abs_cursor_y();
+
+ BC_Window *gui = new BrowseButtonWindow(client->server->mwindow->theme,
+ x-25, y-100, window, "", _("Png file"), _("Png path"), 0);
+ gui->create_objects();
+ return gui;
+}
+
+int TitlePngPopup::activate()
+{
+ BC_DialogThread::start();
+ return 1;
+}
+