[gnote] Use new utility for creating inner grids in recentchanges
- From: Aurimas Černius <aurimasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnote] Use new utility for creating inner grids in recentchanges
- Date: Mon, 14 Mar 2016 20:27:17 +0000 (UTC)
commit 474ad2c46c3db7e98c1f961baaaf7e2a43864b2a
Author: Aurimas Černius <aurisc4 gmail com>
Date: Mon Mar 14 22:24:32 2016 +0200
Use new utility for creating inner grids in recentchanges
src/recentchanges.cpp | 14 +++-----------
src/recentchanges.hpp | 1 -
2 files changed, 3 insertions(+), 12 deletions(-)
---
diff --git a/src/recentchanges.cpp b/src/recentchanges.cpp
index ee5bc55..0a5ded8 100644
--- a/src/recentchanges.cpp
+++ b/src/recentchanges.cpp
@@ -737,14 +737,6 @@ namespace gnote {
}
}
- Gtk::Grid *NoteRecentChanges::create_inner_popover_grid(int & top)
- {
- Gtk::Grid *grid = manage(new Gtk::Grid);
- utils::set_common_popover_widget_props(*grid);
- top = 0;
- return grid;
- }
-
Gtk::PopoverMenu *NoteRecentChanges::make_window_menu(Gtk::Button *button, const std::vector<Gtk::Widget*>
& items)
{
std::map<Glib::ustring, Gtk::Widget*> submenus;
@@ -752,7 +744,7 @@ namespace gnote {
Gtk::Grid *main_grid = manage(new Gtk::Grid);
int main_top = 0;
int top = 0;
- Gtk::Grid *grid = create_inner_popover_grid(top);
+ Gtk::Grid *grid = manage(utils::create_popover_inner_grid(&top));
FOREACH(Gtk::Widget *item, items) {
if(item) {
utils::PopoverSubmenu *submenu = dynamic_cast<utils::PopoverSubmenu*>(item);
@@ -765,13 +757,13 @@ namespace gnote {
}
else {
main_grid->attach(*grid, 0, main_top++, 1, 1);
- grid = create_inner_popover_grid(top);
+ grid = manage(utils::create_popover_inner_grid(&top));
}
}
if(top > 0) {
main_grid->attach(*grid, 0, main_top++, 1, 1);
- grid = create_inner_popover_grid(top);
+ grid = manage(utils::create_popover_inner_grid(&top));
}
Gtk::Widget *close_item = manage(utils::create_popover_button("win.close-window", _("_Close")));
diff --git a/src/recentchanges.hpp b/src/recentchanges.hpp
index 4a08d0a..90f6906 100644
--- a/src/recentchanges.hpp
+++ b/src/recentchanges.hpp
@@ -88,7 +88,6 @@ private:
void on_find_next_button_clicked();
void on_find_prev_button_clicked();
Gtk::PopoverMenu *make_window_menu(Gtk::Button *button, const std::vector<Gtk::Widget*> & items);
- Gtk::Grid *create_inner_popover_grid(int & top);
void on_embedded_name_changed(const std::string & name);
void on_settings_changed(const Glib::ustring & key);
bool on_notes_widget_key_press(GdkEventKey*);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]