diff options
| author | Ted Gould <ted@gould.cx> | 2009-11-29 19:01:07 +0000 |
|---|---|---|
| committer | Ted Gould <ted@gould.cx> | 2009-11-29 19:01:07 +0000 |
| commit | 29d3c0b15028e61f176df3a75189bf0959d0d03e (patch) | |
| tree | 727afe596c693a9bdd098d72618abd9ceb0d1969 /src/extension/implementation/script.h | |
| parent | Add the build dir dbus directory to grab some headerfiles for distcheck. (diff) | |
| parent | hopefully fix build on linux (diff) | |
| download | inkscape-29d3c0b15028e61f176df3a75189bf0959d0d03e.tar.gz inkscape-29d3c0b15028e61f176df3a75189bf0959d0d03e.zip | |
Merging in from trunk
(bzr r8254.1.37)
Diffstat (limited to 'src/extension/implementation/script.h')
| -rw-r--r-- | src/extension/implementation/script.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/extension/implementation/script.h b/src/extension/implementation/script.h index 4620375f9..8e25fb351 100644 --- a/src/extension/implementation/script.h +++ b/src/extension/implementation/script.h @@ -135,7 +135,7 @@ private: /** * */ - void checkStderr (const Glib::ustring &filename, + void checkStderr (const Glib::ustring &filename, Gtk::MessageType type, const Glib::ustring &message); @@ -146,7 +146,7 @@ private: Glib::RefPtr<Glib::IOChannel> _channel; Glib::RefPtr<Glib::MainLoop> _main_loop; bool _dead; - + public: file_listener () : _dead(false) { }; virtual ~file_listener () { @@ -187,11 +187,15 @@ private: // Note, doing a copy here, on purpose Glib::ustring string (void) { return _string; }; - void toFile (const Glib::ustring &name) { + bool toFile (const Glib::ustring &name) { + try { Glib::RefPtr<Glib::IOChannel> stdout_file = Glib::IOChannel::create_from_file(name, "w"); stdout_file->set_encoding(); stdout_file->write(_string); - return; + } catch (Glib::FileError &e) { + return false; + } + return true; }; }; |
