[gnote] Remove Tools button from NoteWindow
- From: Aurimas Černius <aurimasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnote] Remove Tools button from NoteWindow
- Date: Sat, 1 Jun 2013 19:05:56 +0000 (UTC)
commit e7281c0804b9853319e79c296b7de939b4f145bf
Author: Aurimas Černius <aurisc4 gmail com>
Date: Sat Jun 1 22:04:54 2013 +0300
Remove Tools button from NoteWindow
Replaced by main window gears button.
Part of Bug 700655.
src/noteaddin.cpp | 24 ------------------------
src/noteaddin.hpp | 2 --
src/notewindow.cpp | 27 ---------------------------
src/notewindow.hpp | 6 ------
4 files changed, 0 insertions(+), 59 deletions(-)
---
diff --git a/src/noteaddin.cpp b/src/noteaddin.cpp
index a731b9b..ce6f06f 100644
--- a/src/noteaddin.cpp
+++ b/src/noteaddin.cpp
@@ -48,10 +48,6 @@ namespace gnote {
iter != m_note_actions.end(); ++iter) {
get_window()->remove_widget_action(*iter);
}
- for(std::list<Gtk::MenuItem*>::const_iterator iter = m_tools_menu_items.begin();
- iter != m_tools_menu_items.end(); ++iter) {
- delete *iter;
- }
for(std::list<Gtk::MenuItem*>::const_iterator iter = m_text_menu_items.begin();
iter != m_text_menu_items.end(); ++iter) {
delete *iter;
@@ -74,14 +70,6 @@ namespace gnote {
on_note_opened();
NoteWindow * window = get_window();
- for(std::list<Gtk::MenuItem*>::const_iterator iter = m_tools_menu_items.begin();
- iter != m_tools_menu_items.end(); ++iter) {
- Gtk::Widget *item= *iter;
- if ((item->get_parent() == NULL) ||
- (item->get_parent() != window->plugin_menu()))
- window->plugin_menu()->add (*item);
- }
-
for(std::list<Gtk::MenuItem*>::const_iterator iter = m_text_menu_items.begin();
iter != m_text_menu_items.end(); ++iter) {
Gtk::Widget *item = *iter;
@@ -113,18 +101,6 @@ namespace gnote {
get_window()->add_widget_action(action, order);
}
- void NoteAddin::add_plugin_menu_item (Gtk::MenuItem *item)
- {
- if (is_disposing())
- throw sharp::Exception ("Plugin is disposing already");
-
- m_tools_menu_items.push_back (item);
-
- if (m_note->is_opened()) {
- get_window()->plugin_menu()->add (*item);
- }
- }
-
void NoteAddin::add_tool_item (Gtk::ToolItem *item, int position)
{
if (is_disposing())
diff --git a/src/noteaddin.hpp b/src/noteaddin.hpp
index 358bfde..b26831c 100644
--- a/src/noteaddin.hpp
+++ b/src/noteaddin.hpp
@@ -106,14 +106,12 @@ public:
}
void on_note_opened_event(Note & );
void add_note_action(const Glib::RefPtr<Gtk::Action> & action, int order);
- void add_plugin_menu_item(Gtk::MenuItem *item);
void add_tool_item (Gtk::ToolItem *item, int position);
void add_text_menu_item (Gtk::MenuItem * item);
private:
Note::Ptr m_note;
sigc::connection m_note_opened_cid;
std::list<std::string> m_note_actions;
- std::list<Gtk::MenuItem*> m_tools_menu_items;
std::list<Gtk::MenuItem*> m_text_menu_items;
typedef std::map<Gtk::ToolItem*, int> ToolItemMap;
ToolItemMap m_toolbar_items;
diff --git a/src/notewindow.cpp b/src/notewindow.cpp
index 3f5c62a..f85e2cb 100644
--- a/src/notewindow.cpp
+++ b/src/notewindow.cpp
@@ -79,12 +79,6 @@ namespace gnote {
m_text_menu = Gtk::manage(new NoteTextMenu(note.get_buffer(), note.get_buffer()->undoer()));
- // Add the Find menu item to the toolbar Text menu. It
- // should only show up in the toplevel Text menu, since
- // the context menu already has a Find submenu.
-
- m_plugin_menu = manage(make_plugin_menu());
-
m_embeddable_toolbar = manage(make_toolbar());
m_template_widget = make_template_bar();
@@ -419,15 +413,6 @@ namespace gnote {
grid->attach(*text_button, grid_col++, 0, 1, 1);
text_button->set_tooltip_text(_("Set properties of text"));
- utils::ToolMenuButton *plugin_button = Gtk::manage(
- new utils::ToolMenuButton(*manage(new Gtk::Image(Gtk::Stock::EXECUTE, icon_size)),
- _("T_ools"),
- m_plugin_menu));
- plugin_button->set_use_underline(true);
- plugin_button->show_all();
- grid->attach(*plugin_button, grid_col++, 0, 1, 1);
- plugin_button->set_tooltip_text(_("Use tools on this note"));
-
grid->attach(*manage(new Gtk::SeparatorToolItem()), grid_col++, 0, 1, 1);
m_delete_button = manage(new Gtk::ToolButton(Gtk::Stock::DELETE));
@@ -449,18 +434,6 @@ namespace gnote {
}
- //
- // This menu can be
- // populated by individual plugins using
- // NotePlugin.AddPluginMenuItem().
- //
- Gtk::Menu *NoteWindow::make_plugin_menu()
- {
- Gtk::Menu *menu = new Gtk::Menu();
- return menu;
- }
-
-
Gtk::Grid * NoteWindow::make_template_bar()
{
Gtk::Grid * bar = manage(new Gtk::Grid);
diff --git a/src/notewindow.hpp b/src/notewindow.hpp
index 240b6a6..9241aed 100644
--- a/src/notewindow.hpp
+++ b/src/notewindow.hpp
@@ -178,10 +178,6 @@ public:
{
return m_delete_button;
}
- Gtk::Menu * plugin_menu() const
- {
- return m_plugin_menu;
- }
Gtk::Menu * text_menu() const
{
return m_text_menu;
@@ -203,7 +199,6 @@ private:
void update_link_button_sensitivity();
void on_populate_popup(Gtk::Menu*);
Gtk::Grid *make_toolbar();
- Gtk::Menu * make_plugin_menu();
Gtk::Grid * make_template_bar();
void on_untemplate_button_click();
void on_save_size_check_button_toggled();
@@ -232,7 +227,6 @@ private:
Gtk::ToolButton *m_pin_button;
Gtk::ToolButton *m_link_button;
NoteTextMenu *m_text_menu;
- Gtk::Menu *m_plugin_menu;
Gtk::TextView *m_editor;
Gtk::ScrolledWindow *m_editor_window;
NoteFindHandler m_find_handler;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]