summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 351ec2c)
raw | patch | inline | side by side (parent: 351ec2c)
author | pjrm <pjrm@users.sourceforge.net> | |
Thu, 17 May 2007 22:46:46 +0000 (22:46 +0000) | ||
committer | pjrm <pjrm@users.sourceforge.net> | |
Thu, 17 May 2007 22:46:46 +0000 (22:46 +0000) |
src/ui/dialog/document-properties.cpp | patch | blob | history |
index 4fc3e5497c91a748c719e36251caf419be363d98..4bf4db48aaa910406828c1ba750099b881015062 100644 (file)
//========================================================================
/**
- * Helper function that attachs widgets in a 3xn table. The widgets come in an
+ * Helper function that attaches widgets in a 3xn table. The widgets come in an
* array that has two entries per table row. The two entries code for four
* possible cases: (0,0) means insert space in first column; (0, non-0) means
* widget in columns 2-3; (non-0, 0) means label in columns 1-3; and
* (non-0, non-0) means two widgets in columns 2 and 3.
**/
inline void
-attach_all(Gtk::Table &table, Gtk::Widget *const arr[], unsigned size, int start = 0)
+attach_all(Gtk::Table &table, Gtk::Widget *const arr[], unsigned const n, int start = 0)
{
- for (unsigned i=0, r=start; i<size/sizeof(Gtk::Widget*); i+=2)
+ for (unsigned i = 0, r = start; i < n; i += 2)
{
if (arr[i] && arr[i+1])
{
_rcp_bord._label, _rcp_bord._cp,
};
- attach_all (_page_page.table(), widget_array, sizeof(widget_array));
+ attach_all(_page_page.table(), widget_array, G_N_ELEMENTS(widget_array));
}
void
_rcp_hgui._label, _rcp_hgui._cp,
};
- attach_all (_page_guides.table(), widget_array, sizeof(widget_array));
+ attach_all(_page_guides.table(), widget_array, G_N_ELEMENTS(widget_array));
}
void
0, _rsu_gusn._vbox,
};
- attach_all (_page_snap.table(), array, sizeof(array));
+ attach_all(_page_snap.table(), array, G_N_ELEMENTS(array));
}
/**
(Gtk::Widget*) &_grids_notebook, 0
};
- attach_all (_page_grids.table(), widget_array, sizeof(widget_array));
+ attach_all(_page_grids.table(), widget_array, G_N_ELEMENTS(widget_array));
}