[gnote] Insert tool items at specified positions in note toolbar
- From: Aurimas Černius <aurimasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnote] Insert tool items at specified positions in note toolbar
- Date: Tue, 15 Apr 2014 20:18:27 +0000 (UTC)
commit b743a0f50a458eeb6e4a5542f4dd99848aa4af98
Author: Aurimas Černius <aurisc4 gmail com>
Date: Tue Apr 15 23:14:21 2014 +0300
Insert tool items at specified positions in note toolbar
src/noteaddin.cpp | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/src/noteaddin.cpp b/src/noteaddin.cpp
index 615644d..a34ffde 100644
--- a/src/noteaddin.cpp
+++ b/src/noteaddin.cpp
@@ -1,7 +1,7 @@
/*
* gnote
*
- * Copyright (C) 2012-2013 Aurimas Cernius
+ * Copyright (C) 2012-2014 Aurimas Cernius
* Copyright (C) 2009 Hubert Figuiere
*
* This program is free software: you can redistribute it and/or modify
@@ -86,8 +86,8 @@ namespace gnote {
if ((iter->first->get_parent() == NULL) ||
(iter->first->get_parent() != window->embeddable_toolbar())) {
Gtk::Grid *grid = window->embeddable_toolbar();
- int col = grid->get_children().size();
- grid->attach(*(iter->first), col, 0, 1, 1);
+ grid->insert_column(iter->second);
+ grid->attach(*iter->first, iter->second, 0, 1, 1);
}
}
}
@@ -111,7 +111,8 @@ namespace gnote {
if (m_note->is_opened()) {
Gtk::Grid *grid = get_window()->embeddable_toolbar();
- grid->attach(*item, grid->get_children().size(), 0, 1, 1);
+ grid->insert_column(position);
+ grid->attach(*item, position, 0, 1, 1);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]