[gnote] Add utility function for creating popover inner grid



commit 678513905630ca29d5c352e71f8cffd2c788408b
Author: Aurimas Černius <aurisc4 gmail com>
Date:   Mon Mar 14 22:23:43 2016 +0200

    Add utility function for creating popover inner grid

 src/utils.cpp |   10 ++++++++++
 src/utils.hpp |    1 +
 2 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/src/utils.cpp b/src/utils.cpp
index 537264f..9e6b77d 100644
--- a/src/utils.cpp
+++ b/src/utils.cpp
@@ -322,6 +322,16 @@ namespace gnote {
       widget.property_hexpand() = true;
     }
 
+    Gtk::Grid *create_popover_inner_grid(int *top)
+    {
+      Gtk::Grid *grid = new Gtk::Grid;
+      set_common_popover_widget_props(*grid);
+      if(top) {
+        *top = 0;
+      }
+      return grid;
+    }
+
 
     void add_item_to_ordered_map(std::map<int, Gtk::Widget*> & dest, int order, Gtk::Widget *item)
     {
diff --git a/src/utils.hpp b/src/utils.hpp
index 7e24758..19650f8 100644
--- a/src/utils.hpp
+++ b/src/utils.hpp
@@ -67,6 +67,7 @@ namespace gnote {
     Gtk::Widget * create_popover_submenu_button(const Glib::ustring & submenu, const Glib::ustring & label);
     Gtk::Grid * create_popover_submenu(const Glib::ustring & name);
     void set_common_popover_widget_props(Gtk::Widget & widget);
+    Gtk::Grid *create_popover_inner_grid(int *top = NULL);
 
     void add_item_to_ordered_map(std::map<int, Gtk::Widget*> & dest, int order, Gtk::Widget *item);
     void merge_ordered_maps(std::map<int, Gtk::Widget*> & dest, const std::map<int, Gtk::Widget*> & adds);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]