[glom] Remove unused methods.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom] Remove unused methods.
- Date: Sun, 1 Nov 2015 12:57:51 +0000 (UTC)
commit 0afacbb0f5b9417088cbc203658640dca76d7a37
Author: Murray Cumming <murrayc murrayc com>
Date: Fri Oct 30 13:54:09 2015 +0100
Remove unused methods.
Found by cppcheck.
glom/appwindow.cc | 9 -------
glom/appwindow.h | 1 -
glom/bakery/appwindow_withdoc.cc | 6 ----
glom/bakery/appwindow_withdoc.h | 2 -
glom/base_db.cc | 26 --------------------
glom/base_db.h | 1 -
glom/dialog_existing_or_new.cc | 16 ------------
glom/dialog_existing_or_new.h | 2 -
glom/import_csv/csv_parser.cc | 5 ----
glom/import_csv/csv_parser.h | 3 --
glom/mode_data/db_adddel/db_adddel.cc | 21 ----------------
glom/mode_data/db_adddel/db_adddel.h | 2 -
glom/mode_data/flowtablewithfields.cc | 5 ----
glom/mode_data/flowtablewithfields.h | 2 -
glom/mode_design/layout/dialog_layout_details.cc | 8 ------
.../print_layouts/print_layout_toolbar_button.cc | 10 -------
.../print_layouts/print_layout_toolbar_button.h | 3 --
glom/utility_widgets/adddel/adddel.cc | 9 -------
glom/utility_widgets/adddel/adddel.h | 1 -
glom/utility_widgets/canvas/canvas_item_movable.cc | 7 -----
glom/utility_widgets/canvas/canvas_item_movable.h | 1 -
21 files changed, 0 insertions(+), 140 deletions(-)
---
diff --git a/glom/appwindow.cc b/glom/appwindow.cc
index 7e9686b..b4f470f 100644
--- a/glom/appwindow.cc
+++ b/glom/appwindow.cc
@@ -3003,13 +3003,4 @@ void AppWindow::on_menu_edit_find()
m_pFrame->set_mode_data();
}
-
-void AppWindow::on_recent_files_activate(Gtk::RecentChooser& chooser)
-{
- const auto uri = chooser.get_current_uri();
- const auto bTest = open_document(uri);
- if(!bTest)
- document_history_remove(uri);
-}
-
} //namespace Glom
diff --git a/glom/appwindow.h b/glom/appwindow.h
index 088f86e..559d309 100644
--- a/glom/appwindow.h
+++ b/glom/appwindow.h
@@ -206,7 +206,6 @@ protected:
void on_menu_edit_cut_activate();
void on_menu_edit_paste_activate();
void on_menu_edit_find();
- void on_recent_files_activate(Gtk::RecentChooser& recent_chooser);
//Menu Builder and Actions
Glib::RefPtr<Gtk::Builder> m_builder;
diff --git a/glom/bakery/appwindow_withdoc.cc b/glom/bakery/appwindow_withdoc.cc
index f991d20..6643627 100644
--- a/glom/bakery/appwindow_withdoc.cc
+++ b/glom/bakery/appwindow_withdoc.cc
@@ -458,12 +458,6 @@ void AppWindow_WithDoc::after_successful_save()
document_history_add(m_pDocument->get_file_uri());
}
-Glib::ustring AppWindow_WithDoc::get_conf_fullkey(const Glib::ustring& key)
-{
- return "/apps/" + m_strAppName + '/' + key;
-}
-
-
void AppWindow_WithDoc::document_history_add(const Glib::ustring& /* file_uri */)
{
//Override this.
diff --git a/glom/bakery/appwindow_withdoc.h b/glom/bakery/appwindow_withdoc.h
index 5678b9f..70de0e4 100644
--- a/glom/bakery/appwindow_withdoc.h
+++ b/glom/bakery/appwindow_withdoc.h
@@ -164,8 +164,6 @@ protected:
virtual enumSaveChanges ui_offer_to_save_changes() = 0;
- static Glib::ustring get_conf_fullkey(const Glib::ustring& key);
-
//Document:
Document* m_pDocument; //An instance of a derived type.
bool m_bCloseAfterSave;
diff --git a/glom/base_db.cc b/glom/base_db.cc
index 292ecb9..4a76e28 100644
--- a/glom/base_db.cc
+++ b/glom/base_db.cc
@@ -508,32 +508,6 @@ std::shared_ptr<LayoutItem_Image> Base_DB::offer_imageobject(const std::shared_p
return result;
}
-std::shared_ptr<LayoutItem_Notebook> Base_DB::offer_notebook(const std::shared_ptr<LayoutItem_Notebook>&
start_notebook, Gtk::Window* transient_for)
-{
- std::shared_ptr<LayoutItem_Notebook> result = start_notebook;
-
- Dialog_Notebook* dialog = nullptr;
- Utils::get_glade_widget_derived_with_warning(dialog);
- if(!dialog) //Unlikely and it already warns on stderr.
- return result;
-
- if(transient_for)
- dialog->set_transient_for(*transient_for);
-
- dialog->set_notebook(start_notebook);
- //dialog->set_transient_for(*this);
- const auto response = Glom::UiUtils::dialog_run_with_help(dialog);
- dialog->hide();
- if(response == Gtk::RESPONSE_OK)
- {
- //Get the chosen relationship:
- result = dialog->get_notebook();
- }
-
- delete dialog;
-
- return result;
-}
#endif // !GLOM_ENABLE_CLIENT_ONLY
//static:
diff --git a/glom/base_db.h b/glom/base_db.h
index 9fb15d0..51980dd 100644
--- a/glom/base_db.h
+++ b/glom/base_db.h
@@ -115,7 +115,6 @@ protected:
std::shared_ptr<LayoutItem_Text> offer_textobject(const std::shared_ptr<LayoutItem_Text>&
start_textobject, Gtk::Window* transient_for = 0, bool show_title = true);
std::shared_ptr<LayoutItem_Image> offer_imageobject(const std::shared_ptr<LayoutItem_Image>&
start_imageobject, Gtk::Window* transient_for = 0, bool show_title = true);
- std::shared_ptr<LayoutItem_Notebook> offer_notebook(const std::shared_ptr<LayoutItem_Notebook>&
start_notebook, Gtk::Window* transient_for = 0);
#endif // !GLOM_ENABLE_CLIENT_ONLY
bool get_relationship_exists(const Glib::ustring& table_name, const Glib::ustring& relationship_name);
diff --git a/glom/dialog_existing_or_new.cc b/glom/dialog_existing_or_new.cc
index 326206a..9aa9bfa 100644
--- a/glom/dialog_existing_or_new.cc
+++ b/glom/dialog_existing_or_new.cc
@@ -766,28 +766,12 @@ void Dialog_ExistingOrNew::on_existing_row_activated(const Gtk::TreeModel::Path&
on_select_clicked();
}
-void Dialog_ExistingOrNew::on_existing_button_clicked(const Gtk::TreeModel::Path& path)
-{
- m_existing_view->get_selection()->select(path);
-
- if(m_select_button->is_sensitive())
- on_select_clicked();
-}
-
#ifndef GLOM_ENABLE_CLIENT_ONLY
void Dialog_ExistingOrNew::on_new_row_activated(const Gtk::TreeModel::Path& /* path */, Gtk::TreeViewColumn*
/* column */)
{
if(m_select_button->is_sensitive())
on_select_clicked();
}
-
-void Dialog_ExistingOrNew::on_new_button_clicked(const Gtk::TreeModel::Path& path)
-{
- m_new_view->get_selection()->select(path);
-
- if(m_select_button->is_sensitive())
- on_select_clicked();
-}
#endif //GLOM_ENABLE_CLIENT_ONLY
void Dialog_ExistingOrNew::on_select_clicked()
diff --git a/glom/dialog_existing_or_new.h b/glom/dialog_existing_or_new.h
index 37860c7..80a0ee3 100644
--- a/glom/dialog_existing_or_new.h
+++ b/glom/dialog_existing_or_new.h
@@ -91,7 +91,6 @@ private:
void new_title_data_func(Gtk::CellRenderer* renderer, const Gtk::TreeModel::iterator& iter);
bool on_new_select_func(const Glib::RefPtr<Gtk::TreeModel>& model, const Gtk::TreeModel::Path& path, bool
path_currently_selected);
void on_new_row_activated(const Gtk::TreeModel::Path& path, Gtk::TreeViewColumn* column);
- void on_new_button_clicked(const Gtk::TreeModel::Path& path);
bool list_examples();
@@ -108,7 +107,6 @@ private:
#endif
void on_existing_row_activated(const Gtk::TreeModel::Path& path, Gtk::TreeViewColumn* column);
- void on_existing_button_clicked(const Gtk::TreeModel::Path& path);
void on_select_clicked();
diff --git a/glom/import_csv/csv_parser.cc b/glom/import_csv/csv_parser.cc
index 6dbc0b1..71bfb51 100644
--- a/glom/import_csv/csv_parser.cc
+++ b/glom/import_csv/csv_parser.cc
@@ -153,11 +153,6 @@ const CsvParser::type_row_strings CsvParser::fetch_next_row()
g_return_val_if_reached(empty);
}
-void CsvParser::reset_row_index()
-{
- m_row_index = 0;
-}
-
CsvParser::type_signal_file_read_error CsvParser::signal_file_read_error() const
{
return m_signal_file_read_error;
diff --git a/glom/import_csv/csv_parser.h b/glom/import_csv/csv_parser.h
index f662c0e..c1f6cfe 100644
--- a/glom/import_csv/csv_parser.h
+++ b/glom/import_csv/csv_parser.h
@@ -86,9 +86,6 @@ public:
// client of this method to check for the parser's state/cache size.
const type_row_strings fetch_next_row();
- /// Resets the internal row index used for fetch_next_row().
- void reset_row_index();
-
// Signals:
typedef sigc::signal<void, const Glib::ustring&> type_signal_file_read_error;
diff --git a/glom/mode_data/db_adddel/db_adddel.cc b/glom/mode_data/db_adddel/db_adddel.cc
index a161561..fafe3df 100644
--- a/glom/mode_data/db_adddel/db_adddel.cc
+++ b/glom/mode_data/db_adddel/db_adddel.cc
@@ -89,9 +89,6 @@ DbAddDel::DbAddDel()
//Make sure that the TreeView doesn't start out only big enough for zero items.
set_height_rows(6, 6);
- //Allow the user to change the column order:
- //m_TreeView.set_column_drag_function( sigc::mem_fun(*this, &DbAddDel::on_treeview_column_drop) );
-
m_TreeView.add_events(Gdk::BUTTON_PRESS_MASK); //Allow us to catch button_press_event and
button_release_event
m_TreeView.signal_button_press_event().connect_notify( sigc::mem_fun(*this,
&DbAddDel::on_treeview_button_press_event) );
m_TreeView.signal_columns_changed().connect( sigc::mem_fun(*this, &DbAddDel::on_treeview_columns_changed)
);
@@ -1537,22 +1534,6 @@ void DbAddDel::on_treeview_button_press_event(GdkEventButton* button_event)
on_button_press_event_Popup(button_event);
}
-bool DbAddDel::on_treeview_columnheader_button_press_event(GdkEventButton* button_event)
-{
- //If this is a right-click with the mouse:
- if( (button_event->type == GDK_BUTTON_PRESS) && (button_event->button == 3) )
- {
- //TODO: Is something supposed to happen here?
- }
-
- return false;
-}
-
-bool DbAddDel::on_treeview_column_drop(Gtk::TreeView* /* treeview */, Gtk::TreeViewColumn* /* column */,
Gtk::TreeViewColumn* /* prev_column */, Gtk::TreeViewColumn* /* next_column */)
-{
- return true;
-}
-
/* We do not let the developer resize the columns directly in the treeview
* because we cannot easily avoid this signal handler from being called just during the
* intial size allocation.
@@ -1744,8 +1725,6 @@ guint DbAddDel::treeview_append_column(const Glib::ustring& title, Gtk::CellRend
const auto column_id = m_column_items[model_column_index]->get_name();
pViewColumn->set_column_id( (column_id.empty() ? title : column_id) );
- //TODO pViewColumn->signal_button_press_event().connect( sigc::mem_fun(*this,
&DbAddDel::on_treeview_columnheader_button_press_event) );
-
//Let the user click on the column header to sort.
pViewColumn->set_clickable();
pViewColumn->signal_clicked().connect(
diff --git a/glom/mode_data/db_adddel/db_adddel.h b/glom/mode_data/db_adddel/db_adddel.h
index fcc5a29..9f84698 100644
--- a/glom/mode_data/db_adddel/db_adddel.h
+++ b/glom/mode_data/db_adddel/db_adddel.h
@@ -328,7 +328,6 @@ private:
void on_treeview_cell_edited_bool(const Glib::ustring& path_string, int model_column_index, int
data_model_column_index);
void on_idle_treeview_cell_edited_revert(const Gtk::TreeModel::Row& row, guint model_column_index);
- bool on_treeview_column_drop(Gtk::TreeView* treeview, Gtk::TreeViewColumn* column, Gtk::TreeViewColumn*
prev_column, Gtk::TreeViewColumn* next_column);
void on_treeview_columns_changed();
bool on_button_press_event_Popup(GdkEventButton* button_event);
@@ -347,7 +346,6 @@ private:
void on_MenuPopup_activate_layout();
#endif
- bool on_treeview_columnheader_button_press_event(GdkEventButton* button_event);
void on_treeview_column_clicked(int model_column_index);
//void on_treeview_column_resized(int model_column_index, DbTreeViewColumnGlom* view_column);
void on_idle_row_edit();
diff --git a/glom/mode_data/flowtablewithfields.cc b/glom/mode_data/flowtablewithfields.cc
index 34107b2..a1cf5bf 100644
--- a/glom/mode_data/flowtablewithfields.cc
+++ b/glom/mode_data/flowtablewithfields.cc
@@ -932,11 +932,6 @@ FlowTableWithFields::type_list_widgets FlowTableWithFields::get_field(const std:
return result;
}
-void FlowTableWithFields::change_group(const Glib::ustring& /* id */, const Glib::ustring& /*new_group */)
-{
- //TODO.
-}
-
void FlowTableWithFields::remove_all()
{
FlowTable::remove_all();
diff --git a/glom/mode_data/flowtablewithfields.h b/glom/mode_data/flowtablewithfields.h
index 9e4fd08..155b27b 100644
--- a/glom/mode_data/flowtablewithfields.h
+++ b/glom/mode_data/flowtablewithfields.h
@@ -111,8 +111,6 @@ public:
typedef std::list<Gtk::Widget*> type_list_widgets;
typedef std::list<const Gtk::Widget*> type_list_const_widgets;
- void change_group(const Glib::ustring& id, const Glib::ustring& new_group);
-
void set_design_mode(bool value = true) override;
void remove_all();
diff --git a/glom/mode_design/layout/dialog_layout_details.cc
b/glom/mode_design/layout/dialog_layout_details.cc
index b30e719..4d869ec 100644
--- a/glom/mode_design/layout/dialog_layout_details.cc
+++ b/glom/mode_design/layout/dialog_layout_details.cc
@@ -950,14 +950,6 @@ void Dialog_Layout_Details::on_button_edit()
if(layout_notebook)
{
Frame_Glom::show_ok_dialog(_("Notebook Tabs"), _("Add child groups to the notebook to add tabs."),
*this);
- /*
- std::shared_ptr<LayoutItem_Notebook> chosen = offer_notebook(layout_notebook);
- if(chosen)
- {
- row[m_model_items->m_columns.m_col_layout_item] = chosen;
- m_modified = true;
- }
- */
}
else
{
diff --git a/glom/mode_design/print_layouts/print_layout_toolbar_button.cc
b/glom/mode_design/print_layouts/print_layout_toolbar_button.cc
index 0910497..af8cbdf 100644
--- a/glom/mode_design/print_layouts/print_layout_toolbar_button.cc
+++ b/glom/mode_design/print_layouts/print_layout_toolbar_button.cc
@@ -82,16 +82,6 @@ PrintLayoutToolbarButton::enumItems PrintLayoutToolbarButton::get_item_type_from
return result;
}
-void PrintLayoutToolbarButton::on_drag_data_get(const Glib::RefPtr<Gdk::DragContext>&,
- Gtk::SelectionData& selection_data, guint, guint)
-{
- selection_data.set(8, (guint8*)(&m_type), 4);
-}
-
-void PrintLayoutToolbarButton::on_drag_begin(const Glib::RefPtr<Gdk::DragContext>& drag_context)
-{
- drag_context->set_icon(dynamic_cast<Gtk::Image*>(get_icon_widget())->get_pixbuf(), 0, 0);
-}
} // namespace Glom
diff --git a/glom/mode_design/print_layouts/print_layout_toolbar_button.h
b/glom/mode_design/print_layouts/print_layout_toolbar_button.h
index a1770e5..94c42f9 100644
--- a/glom/mode_design/print_layouts/print_layout_toolbar_button.h
+++ b/glom/mode_design/print_layouts/print_layout_toolbar_button.h
@@ -60,9 +60,6 @@ private:
{
return "flowtable";
};
-
- void on_drag_begin(const Glib::RefPtr<Gdk::DragContext>& drag_context) override;
- void on_drag_data_get(const Glib::RefPtr<Gdk::DragContext>&, Gtk::SelectionData& selection_data, guint,
guint) override;
private:
enumItems m_type;
diff --git a/glom/utility_widgets/adddel/adddel.cc b/glom/utility_widgets/adddel/adddel.cc
index 1e79df0..b02e229 100644
--- a/glom/utility_widgets/adddel/adddel.cc
+++ b/glom/utility_widgets/adddel/adddel.cc
@@ -117,10 +117,6 @@ void AddDel::init()
//Make sure that the TreeView doesn't start out only big enough for zero items.
m_TreeView.set_size_request(-1, 150);
- //Allow the user to change the column order:
- //m_TreeView.set_column_drag_function( sigc::mem_fun(*this, &AddDel::on_treeview_column_drop) );
-
-
//m_TreeView.add_events(Gdk::BUTTON_PRESS_MASK); //Allow us to catch button_press_event and
button_release_event
m_TreeView.signal_button_press_event().connect_notify( sigc::mem_fun(*this,
&AddDel::on_treeview_button_press_event) );
@@ -1314,11 +1310,6 @@ void AddDel::on_treeview_button_press_event(GdkEventButton* button_event)
on_button_press_event_Popup(button_event);
}
-bool AddDel::on_treeview_column_drop(Gtk::TreeView* /* treeview */, Gtk::TreeViewColumn* /* column */,
Gtk::TreeViewColumn* /* prev_column */, Gtk::TreeViewColumn* /* next_column */)
-{
- return true;
-}
-
guint AddDel::treeview_append_column(const Glib::ustring& title, Gtk::CellRenderer& cellrenderer, const
Gtk::TreeModelColumnBase& model_column, const Glib::ustring& column_id)
{
auto pViewColumn = Gtk::manage( new TreeViewColumnGlom(title, cellrenderer) );
diff --git a/glom/utility_widgets/adddel/adddel.h b/glom/utility_widgets/adddel/adddel.h
index 87f037b..b5dfd99 100644
--- a/glom/utility_widgets/adddel/adddel.h
+++ b/glom/utility_widgets/adddel/adddel.h
@@ -260,7 +260,6 @@ private:
void on_treeview_cell_editing_started(Gtk::CellEditable* editable, const Glib::ustring& path, int
model_column_index);
- bool on_treeview_column_drop(Gtk::TreeView* treeview, Gtk::TreeViewColumn* column, Gtk::TreeViewColumn*
prev_column, Gtk::TreeViewColumn* next_column);
void on_treeview_columns_changed();
bool on_button_press_event_Popup(GdkEventButton* button_event);
diff --git a/glom/utility_widgets/canvas/canvas_item_movable.cc
b/glom/utility_widgets/canvas/canvas_item_movable.cc
index e01f6ed..13cec88 100644
--- a/glom/utility_widgets/canvas/canvas_item_movable.cc
+++ b/glom/utility_widgets/canvas/canvas_item_movable.cc
@@ -441,13 +441,6 @@ Glib::RefPtr<Goocanvas::Item> CanvasItemMovable::cast_to_item(const Glib::RefPtr
return result;
}
-//static:
-Glib::RefPtr<const Goocanvas::Item> CanvasItemMovable::cast_const_to_item(const Glib::RefPtr<const
CanvasItemMovable>& item)
-{
- Glib::RefPtr<CanvasItemMovable> unconst = Glib::RefPtr<CanvasItemMovable>::cast_const(item);
- return cast_to_item(unconst);
-}
-
void CanvasItemMovable::set_selected(bool selected)
{
m_selected = selected;
diff --git a/glom/utility_widgets/canvas/canvas_item_movable.h
b/glom/utility_widgets/canvas/canvas_item_movable.h
index 5c65cee..75f1583 100644
--- a/glom/utility_widgets/canvas/canvas_item_movable.h
+++ b/glom/utility_widgets/canvas/canvas_item_movable.h
@@ -109,7 +109,6 @@ public:
static Glib::RefPtr<const CanvasItemMovable> cast_const_to_movable(const Glib::RefPtr<const
Goocanvas::Item>& item);
static Glib::RefPtr<Goocanvas::Item> cast_to_item(const Glib::RefPtr<CanvasItemMovable>& item);
- static Glib::RefPtr<const Goocanvas::Item> cast_const_to_item(const Glib::RefPtr<const CanvasItemMovable>&
item);
virtual void snap_position(double& x, double& y) const;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]