[gnote] Fix typos with embedded widgets
- From: Aurimas Äernius <aurimasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnote] Fix typos with embedded widgets
- Date: Wed, 28 Nov 2012 21:12:53 +0000 (UTC)
commit d633b77d28d07f5835ff524bd16a8c88332c35e5
Author: Aurimas Äernius <aurisc4 gmail com>
Date: Wed Nov 28 23:10:37 2012 +0200
Fix typos with embedded widgets
Embedable -> Embeddable
embeded -> embedded
src/note.cpp | 10 +++---
src/note.hpp | 4 +-
src/notewindow.cpp | 10 +++---
src/notewindow.hpp | 4 +-
src/recentchanges.cpp | 86 ++++++++++++++++++++++----------------------
src/recentchanges.hpp | 20 +++++-----
src/searchnoteswidget.cpp | 6 ++--
src/searchnoteswidget.hpp | 2 +-
src/utils.hpp | 30 ++++++++--------
9 files changed, 86 insertions(+), 86 deletions(-)
---
diff --git a/src/note.cpp b/src/note.cpp
index 0719f35..9358374 100644
--- a/src/note.cpp
+++ b/src/note.cpp
@@ -278,7 +278,7 @@ namespace gnote {
, m_save_needed(false)
, m_is_deleting(false)
, m_enabled(true)
- , m_note_window_embeded(false)
+ , m_note_window_embedded(false)
, m_focus_widget(NULL)
, m_manager(_manager)
, m_window(NULL)
@@ -1008,14 +1008,14 @@ namespace gnote {
m_window->set_position(m_data.data().x(), m_data.data().y());
}
- m_window->signal_embeded.connect(sigc::mem_fun(*this, &Note::on_note_window_embeded));
+ m_window->signal_embedded.connect(sigc::mem_fun(*this, &Note::on_note_window_embedded));
}
return m_window;
}
- void Note::on_note_window_embeded()
+ void Note::on_note_window_embedded()
{
- if(!m_note_window_embeded) {
+ if(!m_note_window_embedded) {
// This is here because emiting inside
// OnRealized causes segfaults.
m_signal_opened(*this);
@@ -1023,7 +1023,7 @@ namespace gnote {
// Add any child widgets if any exist now that
// the window is showing.
process_child_widget_queue();
- m_note_window_embeded = true;
+ m_note_window_embedded = true;
}
notebooks::NotebookManager::instance().active_notes_notebook()->add_note(shared_from_this());
diff --git a/src/note.hpp b/src/note.hpp
index 955e386..8202cbb 100644
--- a/src/note.hpp
+++ b/src/note.hpp
@@ -373,7 +373,7 @@ private:
const Ptr & renamed);
void remove_links(const std::string & old_title,
const Ptr & renamed);
- void on_note_window_embeded();
+ void on_note_window_embedded();
Note(NoteData * data, const std::string & filepath, NoteManager & manager);
@@ -394,7 +394,7 @@ private:
bool m_save_needed;
bool m_is_deleting;
bool m_enabled;
- bool m_note_window_embeded;
+ bool m_note_window_embedded;
Gtk::Widget *m_focus_widget;
NoteManager &m_manager;
diff --git a/src/notewindow.cpp b/src/notewindow.cpp
index d90884d..a370a1c 100644
--- a/src/notewindow.cpp
+++ b/src/notewindow.cpp
@@ -162,25 +162,25 @@ namespace gnote {
signal_name_changed(m_name);
}
- void NoteWindow::embed(utils::EmbedableWidgetHost *h)
+ void NoteWindow::embed(utils::EmbeddableWidgetHost *h)
{
//remove from previous host, if any
if(host()) {
host()->unembed_widget(*this);
}
- utils::EmbedableWidget::embed(h);
+ utils::EmbeddableWidget::embed(h);
}
void NoteWindow::foreground()
{
//addins may add accelarators, so accel group must be there
- utils::EmbedableWidgetHost *current_host = host();
+ utils::EmbeddableWidgetHost *current_host = host();
Gtk::Window *parent = dynamic_cast<Gtk::Window*>(current_host);
if(parent) {
add_accel_group(*parent);
}
- utils::EmbedableWidget::foreground();
+ utils::EmbeddableWidget::foreground();
if(parent) {
parent->set_default_size(m_width, m_height);
Glib::RefPtr<Gdk::Window> parent_window = parent->get_window();
@@ -198,7 +198,7 @@ namespace gnote {
void NoteWindow::background()
{
- utils::EmbedableWidget::background();
+ utils::EmbeddableWidget::background();
Gtk::Window *parent = dynamic_cast<Gtk::Window*>(host());
if(!parent) {
return;
diff --git a/src/notewindow.hpp b/src/notewindow.hpp
index 32995a3..0d0981f 100644
--- a/src/notewindow.hpp
+++ b/src/notewindow.hpp
@@ -100,7 +100,7 @@ private:
class NoteWindow
: public Gtk::VBox
- , public utils::EmbedableWidget
+ , public utils::EmbeddableWidget
{
public:
NoteWindow(Note &);
@@ -108,7 +108,7 @@ public:
virtual std::string get_name() const;
void set_name(const std::string & name);
- virtual void embed(utils::EmbedableWidgetHost *h);
+ virtual void embed(utils::EmbeddableWidgetHost *h);
virtual void foreground();
virtual void background();
diff --git a/src/recentchanges.cpp b/src/recentchanges.cpp
index 6dc098a..58cb988 100644
--- a/src/recentchanges.cpp
+++ b/src/recentchanges.cpp
@@ -80,8 +80,8 @@ namespace gnote {
NoteRecentChanges::~NoteRecentChanges()
{
- while(m_embeded_widgets.size()) {
- unembed_widget(**m_embeded_widgets.begin());
+ while(m_embedded_widgets.size()) {
+ unembed_widget(**m_embedded_widgets.begin());
}
}
@@ -109,14 +109,14 @@ namespace gnote {
void NoteRecentChanges::on_all_notes_clicked()
{
- utils::EmbedableWidget *current = currently_embeded();
+ utils::EmbeddableWidget *current = currently_embedded();
if(&m_search_notes_widget == dynamic_cast<SearchNotesWidget*>(current)) {
return;
}
if(current) {
- background_embeded(*current);
+ background_embedded(*current);
}
- foreground_embeded(m_search_notes_widget);
+ foreground_embedded(m_search_notes_widget);
}
void NoteRecentChanges::present_note(const Note::Ptr & note)
@@ -193,9 +193,9 @@ namespace gnote {
std::vector<Gtk::Widget*> current = m_embed_box.get_children();
for(std::vector<Gtk::Widget*>::iterator iter = current.begin();
iter != current.end(); ++iter) {
- utils::EmbedableWidget *widget = dynamic_cast<utils::EmbedableWidget*>(*iter);
+ utils::EmbeddableWidget *widget = dynamic_cast<utils::EmbeddableWidget*>(*iter);
if(widget) {
- background_embeded(*widget);
+ background_embedded(*widget);
}
}
@@ -214,15 +214,15 @@ namespace gnote {
switch (ev->keyval) {
case GDK_KEY_Escape:
// Allow Escape to close the window
- if(&m_search_notes_widget == dynamic_cast<SearchNotesWidget*>(currently_embeded())) {
+ if(&m_search_notes_widget == dynamic_cast<SearchNotesWidget*>(currently_embedded())) {
on_close_window();
}
else {
- utils::EmbedableWidget *current_item = currently_embeded();
+ utils::EmbeddableWidget *current_item = currently_embedded();
if(current_item) {
- background_embeded(*current_item);
+ background_embedded(*current_item);
}
- foreground_embeded(m_search_notes_widget);
+ foreground_embedded(m_search_notes_widget);
}
break;
default:
@@ -237,11 +237,11 @@ namespace gnote {
// Select "All Notes" in the notebooks list
m_search_notes_widget.select_all_notes_notebook();
- if(m_embed_box.get_children().size() == 0 && m_embeded_widgets.size() > 0) {
- foreground_embeded(**m_embeded_widgets.rbegin());
+ if(m_embed_box.get_children().size() == 0 && m_embedded_widgets.size() > 0) {
+ foreground_embedded(**m_embedded_widgets.rbegin());
}
- std::vector<Gtk::Widget*> embeded = m_embed_box.get_children();
- if(embeded.size() == 1 && embeded.front() == &m_search_notes_widget) {
+ std::vector<Gtk::Widget*> embedded = m_embed_box.get_children();
+ if(embedded.size() == 1 && embedded.front() == &m_search_notes_widget) {
m_search_notes_widget.focus_search_entry();
}
NoteRecentChangesParent::on_show();
@@ -249,39 +249,39 @@ namespace gnote {
void NoteRecentChanges::set_search_text(const std::string & value)
{
- //TODO: handle non-search embeded widgets
+ //TODO: handle non-search embedded widgets
m_search_notes_widget.set_search_text(value);
}
- void NoteRecentChanges::embed_widget(utils::EmbedableWidget & widget)
+ void NoteRecentChanges::embed_widget(utils::EmbeddableWidget & widget)
{
- if(std::find(m_embeded_widgets.begin(), m_embeded_widgets.end(), &widget) == m_embeded_widgets.end()) {
+ if(std::find(m_embedded_widgets.begin(), m_embedded_widgets.end(), &widget) == m_embedded_widgets.end()) {
widget.embed(this);
- m_embeded_widgets.push_back(&widget);
+ m_embedded_widgets.push_back(&widget);
}
- utils::EmbedableWidget *current = currently_embeded();
+ utils::EmbeddableWidget *current = currently_embedded();
if(current && current != &widget) {
- background_embeded(*current);
+ background_embedded(*current);
}
- foreground_embeded(widget);
+ foreground_embedded(widget);
}
- void NoteRecentChanges::unembed_widget(utils::EmbedableWidget & widget)
+ void NoteRecentChanges::unembed_widget(utils::EmbeddableWidget & widget)
{
bool show_other = false;
- std::list<utils::EmbedableWidget*>::iterator iter = std::find(
- m_embeded_widgets.begin(), m_embeded_widgets.end(), &widget);
- if(iter != m_embeded_widgets.end()) {
+ std::list<utils::EmbeddableWidget*>::iterator iter = std::find(
+ m_embedded_widgets.begin(), m_embedded_widgets.end(), &widget);
+ if(iter != m_embedded_widgets.end()) {
if(is_foreground(**iter)) {
- background_embeded(widget);
+ background_embedded(widget);
show_other = true;
}
- m_embeded_widgets.erase(iter);
+ m_embedded_widgets.erase(iter);
widget.unembed();
}
if(show_other) {
- if(m_embeded_widgets.size()) {
- foreground_embeded(**m_embeded_widgets.rbegin());
+ if(m_embedded_widgets.size()) {
+ foreground_embedded(**m_embedded_widgets.rbegin());
}
else if(get_visible()) {
on_close_window();
@@ -289,10 +289,10 @@ namespace gnote {
}
}
- void NoteRecentChanges::foreground_embeded(utils::EmbedableWidget & widget)
+ void NoteRecentChanges::foreground_embedded(utils::EmbeddableWidget & widget)
{
try {
- if(currently_embeded() == &widget) {
+ if(currently_embedded() == &widget) {
return;
}
Gtk::Widget &wid = dynamic_cast<Gtk::Widget&>(widget);
@@ -301,21 +301,21 @@ namespace gnote {
wid.show();
m_all_notes_button->set_sensitive(
dynamic_cast<SearchNotesWidget*>(&widget) != &m_search_notes_widget);
- on_embeded_name_changed(widget.get_name());
- m_current_embeded_name_slot = widget.signal_name_changed
- .connect(sigc::mem_fun(*this, &NoteRecentChanges::on_embeded_name_changed));
+ on_embedded_name_changed(widget.get_name());
+ m_current_embedded_name_slot = widget.signal_name_changed
+ .connect(sigc::mem_fun(*this, &NoteRecentChanges::on_embedded_name_changed));
}
catch(std::bad_cast&) {
}
}
- void NoteRecentChanges::background_embeded(utils::EmbedableWidget & widget)
+ void NoteRecentChanges::background_embedded(utils::EmbeddableWidget & widget)
{
try {
- if(currently_embeded() != &widget) {
+ if(currently_embedded() != &widget) {
return;
}
- m_current_embeded_name_slot.disconnect();
+ m_current_embedded_name_slot.disconnect();
Gtk::Widget &wid = dynamic_cast<Gtk::Widget&>(widget);
widget.background();
m_embed_box.remove(wid);
@@ -324,12 +324,12 @@ namespace gnote {
}
}
- bool NoteRecentChanges::is_foreground(utils::EmbedableWidget & widget)
+ bool NoteRecentChanges::is_foreground(utils::EmbeddableWidget & widget)
{
std::vector<Gtk::Widget*> current = m_embed_box.get_children();
for(std::vector<Gtk::Widget*>::iterator iter = current.begin();
iter != current.end(); ++iter) {
- if(dynamic_cast<utils::EmbedableWidget*>(*iter) == &widget) {
+ if(dynamic_cast<utils::EmbeddableWidget*>(*iter) == &widget) {
return true;
}
}
@@ -337,10 +337,10 @@ namespace gnote {
return false;
}
- utils::EmbedableWidget *NoteRecentChanges::currently_embeded()
+ utils::EmbeddableWidget *NoteRecentChanges::currently_embedded()
{
std::vector<Gtk::Widget*> children = m_embed_box.get_children();
- return children.size() ? dynamic_cast<utils::EmbedableWidget*>(children[0]) : NULL;
+ return children.size() ? dynamic_cast<utils::EmbeddableWidget*>(children[0]) : NULL;
}
bool NoteRecentChanges::on_map_event(GdkEventAny *evt)
@@ -350,7 +350,7 @@ namespace gnote {
return res;
}
- void NoteRecentChanges::on_embeded_name_changed(const std::string & name)
+ void NoteRecentChanges::on_embedded_name_changed(const std::string & name)
{
std::string title;
if(name != "") {
diff --git a/src/recentchanges.hpp b/src/recentchanges.hpp
index 62c68b6..0e6c257 100644
--- a/src/recentchanges.hpp
+++ b/src/recentchanges.hpp
@@ -41,7 +41,7 @@ typedef utils::ForcedPresentWindow NoteRecentChangesParent;
class NoteRecentChanges
: public NoteRecentChangesParent
, public std::tr1::enable_shared_from_this<NoteRecentChanges>
- , public utils::EmbedableWidgetHost
+ , public utils::EmbeddableWidgetHost
{
public:
typedef std::tr1::shared_ptr<NoteRecentChanges> Ptr;
@@ -58,10 +58,10 @@ public:
void present_note(const Note::Ptr & note);
void new_note();
- virtual void embed_widget(utils::EmbedableWidget &);
- virtual void unembed_widget(utils::EmbedableWidget &);
- virtual void foreground_embeded(utils::EmbedableWidget &);
- virtual void background_embeded(utils::EmbedableWidget &);
+ virtual void embed_widget(utils::EmbeddableWidget &);
+ virtual void unembed_widget(utils::EmbeddableWidget &);
+ virtual void foreground_embedded(utils::EmbeddableWidget &);
+ virtual void background_embedded(utils::EmbeddableWidget &);
virtual bool running()
{
return m_mapped;
@@ -77,20 +77,20 @@ private:
void on_close_window();
bool on_delete(GdkEventAny *);
bool on_key_pressed(GdkEventKey *);
- bool is_foreground(utils::EmbedableWidget &);
- utils::EmbedableWidget *currently_embeded();
+ bool is_foreground(utils::EmbeddableWidget &);
+ utils::EmbeddableWidget *currently_embedded();
Gtk::Toolbar *make_toolbar();
void on_all_notes_clicked();
- void on_embeded_name_changed(const std::string & name);
+ void on_embedded_name_changed(const std::string & name);
NoteManager &m_note_manager;
SearchNotesWidget m_search_notes_widget;
Gtk::VBox m_content_vbox;
Gtk::VBox m_embed_box;
Gtk::ToolButton *m_all_notes_button;
- std::list<utils::EmbedableWidget*> m_embeded_widgets;
+ std::list<utils::EmbeddableWidget*> m_embedded_widgets;
bool m_mapped;
- sigc::connection m_current_embeded_name_slot;
+ sigc::connection m_current_embedded_name_slot;
};
diff --git a/src/searchnoteswidget.cpp b/src/searchnoteswidget.cpp
index 77d4461..ad246ca 100644
--- a/src/searchnoteswidget.cpp
+++ b/src/searchnoteswidget.cpp
@@ -444,7 +444,7 @@ void SearchNotesWidget::save_position()
int width;
int height;
- utils::EmbedableWidgetHost *current_host = host();
+ utils::EmbeddableWidgetHost *current_host = host();
if(!current_host || !current_host->running()) {
return;
}
@@ -1551,7 +1551,7 @@ void SearchNotesWidget::on_delete_notebook()
void SearchNotesWidget::foreground()
{
- utils::EmbedableWidget::foreground();
+ utils::EmbeddableWidget::foreground();
restore_position();
Gtk::Window *win = dynamic_cast<Gtk::Window*>(host());
if(win) {
@@ -1561,7 +1561,7 @@ void SearchNotesWidget::foreground()
void SearchNotesWidget::background()
{
- utils::EmbedableWidget::background();
+ utils::EmbeddableWidget::background();
save_position();
Gtk::Window *win = dynamic_cast<Gtk::Window*>(host());
if(win) {
diff --git a/src/searchnoteswidget.hpp b/src/searchnoteswidget.hpp
index 2f23639..54a7722 100644
--- a/src/searchnoteswidget.hpp
+++ b/src/searchnoteswidget.hpp
@@ -41,7 +41,7 @@ namespace gnote {
class SearchNotesWidget
: public Gtk::VBox
- , public utils::EmbedableWidget
+ , public utils::EmbeddableWidget
{
public:
SearchNotesWidget(NoteManager & m);
diff --git a/src/utils.hpp b/src/utils.hpp
index af53db3..4e235f9 100644
--- a/src/utils.hpp
+++ b/src/utils.hpp
@@ -240,31 +240,31 @@ namespace gnote {
void release_button();
};
- class EmbedableWidget;
- class EmbedableWidgetHost
+ class EmbeddableWidget;
+ class EmbeddableWidgetHost
{
public:
- virtual void embed_widget(EmbedableWidget &) = 0;
- virtual void unembed_widget(EmbedableWidget &) = 0;
- virtual void foreground_embeded(EmbedableWidget &) = 0;
- virtual void background_embeded(EmbedableWidget &) = 0;
+ virtual void embed_widget(EmbeddableWidget &) = 0;
+ virtual void unembed_widget(EmbeddableWidget &) = 0;
+ virtual void foreground_embedded(EmbeddableWidget &) = 0;
+ virtual void background_embedded(EmbeddableWidget &) = 0;
virtual bool running() = 0;
};
- class EmbedableWidget
+ class EmbeddableWidget
{
public:
- EmbedableWidget() : m_host(NULL) {}
+ EmbeddableWidget() : m_host(NULL) {}
virtual std::string get_name() const = 0;
- virtual void embed(EmbedableWidgetHost *h)
+ virtual void embed(EmbeddableWidgetHost *h)
{
m_host = h;
- signal_embeded();
+ signal_embedded();
}
virtual void unembed()
{
m_host = NULL;
- signal_unembeded();
+ signal_unembedded();
}
virtual void foreground()
{
@@ -274,18 +274,18 @@ namespace gnote {
{
signal_backgrounded();
}
- EmbedableWidgetHost *host() const
+ EmbeddableWidgetHost *host() const
{
return m_host;
}
sigc::signal<void, const std::string &> signal_name_changed;
- sigc::signal<void> signal_embeded;
- sigc::signal<void> signal_unembeded;
+ sigc::signal<void> signal_embedded;
+ sigc::signal<void> signal_unembedded;
sigc::signal<void> signal_foregrounded;
sigc::signal<void> signal_backgrounded;
private:
- EmbedableWidgetHost *m_host;
+ EmbeddableWidgetHost *m_host;
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]