X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fgnome%2FFileDialog.C;h=3d573507535d13bcaa90c244974f52b6aa37db41;hb=3e39bef2c13125023f3b72532d90575bbe307335;hp=466bcef414ba1b4ef7cfaa4ea74c988c4f81b3d6;hpb=5a00c559468bb27a6e70177142d6795b0d28d0bb;p=lyx.git diff --git a/src/frontends/gnome/FileDialog.C b/src/frontends/gnome/FileDialog.C index 466bcef414..3d57350753 100644 --- a/src/frontends/gnome/FileDialog.C +++ b/src/frontends/gnome/FileDialog.C @@ -1,13 +1,12 @@ -// -*- C++ -*- /* This file is part of * ================================================= - * + * * LyX, The Document Processor * Copyright 1995-2000 The LyX Team. * - * ================================================= + * ================================================= * - * \author Baruch Even + * \author Baruch Even **/ #ifdef __GNUG__ @@ -41,7 +40,7 @@ public: void button_clicked(bool canceled); void ok_clicked() { button_clicked(false); } void cancel_clicked() { button_clicked(true); } - + private: Gtk::FileSelection sel_; bool modal_; @@ -49,11 +48,11 @@ private: }; FileDialog::Private::Private(string const & title) - : sel_(title), modal_(false) + : sel_(title), modal_(false) { - sel_.get_ok_button()->clicked.connect(slot(this, + sel_.get_ok_button()->clicked.connect(slot(this, &FileDialog::Private::ok_clicked)); - sel_.get_cancel_button()->clicked.connect(slot(this, + sel_.get_cancel_button()->clicked.connect(slot(this, &FileDialog::Private::cancel_clicked)); } @@ -64,7 +63,7 @@ string const FileDialog::Private::exec() sel_.show(); Gnome::Main::run(); // Find if its canceled or oked and return as needed. - + if (canceled_) return string(); else @@ -80,7 +79,7 @@ void FileDialog::Private::button_clicked(bool canceled) // FileDialog -FileDialog::FileDialog(LyXView * lv, string const & title, kb_action a, +FileDialog::FileDialog(LyXView * lv, string const & title, kb_action a, Button /*b1*/, Button /*b2*/) : private_(new Private(title)) , lv_(lv), title_(title), success_(a) @@ -95,8 +94,8 @@ FileDialog::~FileDialog() } -FileDialog::Result const -FileDialog::Select(string const & path, string const & mask, +FileDialog::Result const +FileDialog::Select(string const & path, string const & mask, string const & suggested) { // For some reason we need to ignore the asynchronous method... @@ -109,17 +108,17 @@ FileDialog::Select(string const & path, string const & mask, } #endif lyxerr << "Synchronous file dialog." << std::endl; - + lyxerr << "Path: " << path << "\nMask: " << mask << "\nSuggested: " << suggested << std::endl; - + string filter = mask; rsplit(mask, filter, '|'); private_->set_complete(mask); private_->set_filename(path+suggested); - - ProhibitInput(lv_->view()); + + lv_->prohibitInput(); string const filename = private_->exec(); - AllowInput(lv_->view()); + lv_->allowInput(); // Collect the info and return it for synchronous dialog. return FileDialog::Result(Chosen, filename);