Commit b82ada01 authored by Daniel Elstner's avatar Daniel Elstner
Browse files

Move to anonymous namespace. Not that it matters much, but I like it this

* src/filetree.cc (regexxer_create_file_tree): Move to anonymous
namespace.  Not that it matters much, but I like it this way.
* src/statusline.cc (regexxer_create_status_line): ditto.
parent f337e4e3
2004-05-25 Daniel Elstner <daniel.elstner@gmx.net>
* src/filetree.cc (regexxer_create_file_tree): Move to anonymous
namespace. Not that it matters much, but I like it this way.
* src/statusline.cc (regexxer_create_status_line): ditto.
2004-05-25 Daniel Elstner <daniel.elstner@gmx.net>
* src/filetree.cc (FileTree::FileTree): Remove superfluous
......
......@@ -33,6 +33,27 @@
using namespace Regexxer::FileTreePrivate;
namespace
{
extern "C"
GtkWidget* regexxer_create_file_tree(char*, char*, char*, int, int)
{
try
{
Gtk::Widget *const widget = new Regexxer::FileTree();
widget->show();
return Gtk::manage(widget)->gobj();
}
catch (...)
{
g_return_val_if_reached(0);
}
}
} // anonymous namespace
namespace Regexxer
{
......@@ -515,10 +536,9 @@ bool FileTree::save_file_at_iter(const Gtk::TreeModel::iterator& iter,
if (!*error_list)
error_list->reset(new MessageList());
const Glib::ustring message = Util::compose(_("Failed to save file \"%1\": %2"),
Util::filename_to_utf8_fallback(fileinfo->fullname),
error.what());
(*error_list)->push_back(message);
(*error_list)->push_back(Util::compose(_("Failed to save file \"%1\": %2"),
Util::filename_to_utf8_fallback(fileinfo->fullname),
error.what()));
}
if (!fileinfo->buffer->get_modified())
......@@ -1030,20 +1050,5 @@ void FileTree::on_conf_value_changed(const Glib::ustring& key, const Gnome::Conf
}
}
extern "C"
GtkWidget* regexxer_create_file_tree(char*, char*, char*, int, int)
{
try
{
Gtk::Widget *const widget = new FileTree();
widget->show();
return Gtk::manage(widget)->gobj();
}
catch (...)
{
g_return_val_if_reached(0);
}
}
} // namespace Regexxer
......@@ -33,6 +33,27 @@
#endif
namespace
{
extern "C"
GtkWidget* regexxer_create_status_line(char*, char*, char*, int, int)
{
try
{
Gtk::Widget *const widget = new Regexxer::StatusLine();
widget->show();
return Gtk::manage(widget)->gobj();
}
catch (...)
{
g_return_val_if_reached(0);
}
}
} // anonymous namespace
namespace Regexxer
{
......@@ -340,20 +361,5 @@ void StatusLine::on_hierarchy_changed(Gtk::Widget* previous_toplevel)
}
}
extern "C"
GtkWidget* regexxer_create_status_line(char*, char*, char*, int, int)
{
try
{
Gtk::Widget *const widget = new StatusLine();
widget->show();
return Gtk::manage(widget)->gobj();
}
catch (...)
{
g_return_val_if_reached(0);
}
}
} // namespace Regexxer
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment