Displaying 20 results from an estimated 20 matches for "add_root".
2012 Aug 01
17
[PATCH] add crtime to the snapshot list
From: Anand <anand.jain@oracle.com>
This patch adds creation-time to the snapshot list display,
which would help user to better manage the snapshots when
number of snapshots grow substantially. This patch is developed
and on top of the send/receive btrfs and btrfs-progs repo at
git://github.com/ablock84/linux-btrfs.git (send-v2)
git://github.com/ablock84/btrfs-progs.git (send-v2)
2006 Aug 03
1
routeset mapper problem
...t; ''content'',
:use_cache => ''true'',
:cache_path => nil,
:force_utf8 => Comatose::Options.force_utf8.to_s,
:named_route=> nil
}.merge(options)
# Ensure the controller is aware of the mount point...
ContentController.add_root(path, opts[:index])
# Add the route...
opts[:controller] = ''content''
opts[:action] =''show''
route_name = opts.delete(:named_route)
unless route_name.nil?
named_route( route_name, "#{path}/*page", opts )
else
if opts[:i...
2013 Apr 11
0
[PATCH] Btrfs-progs: enhance 'btrfs subvolume list'
...*ritem,
+ u32 ritem_len)
+{
+ struct root_info *rinfo;
+
+ rinfo = root_tree_search(root_lookup, root_id);
+ if (!rinfo || rinfo->root_id != root_id)
+ return -ENOENT;
+
+ return set_root_info(rinfo, ref_tree, root_offset, dir_id, name,
+ name_len, ritem, ritem_len);
+}
+
/*
* add_root - update the existed root, or allocate a new root and insert it
* into the lookup tree.
@@ -446,66 +563,36 @@ static int update_root(struct root_lookup *root_lookup,
* dir_id: inode id of the directory in ref_tree where this root can be found.
* name: the name of root_id in that directo...
2007 Nov 13
3
New wxTree method
...more Ruby-ish way to add a bulk of
items to a tree control (and to easily connect a data structure to a
tree). Since tree view can be seen as an array of arrays, I simply added
a method called append_array (see attached file). With it, you can add a
full tree as simple as:
---
root = treectrl.add_root("Root")
treectrl.append_array(root, ["one", "two", ["sub1", "sub2"], "three"])
---
It also gives your objects the possibility to interact a bit more with
the tree item, if needed. See the docs for the method.
My plans are also to add at...
2006 May 31
1
Help enhancing acts_as_nested_set
...ount
self.find(:all, :conditions => "#{parent_column} = 0 AND
#{left_col_name} > 0").length
end
def find_cellar
self.find(:first, :conditions => "#{parent_column} = 0 AND
#{left_col_name} < 0")
end
def add_root (node)
node.reload
raise "Node already in the hierarchy, try move?" unless
node.unknown?
self.transaction {
begin
# get the next lft value to use for a new root node
last = self.find(:first, :order =&g...
2011 Jul 12
0
[PATCH]: Use a general way to get the default subvolume for btrfs
...uf + off);
+ off += sizeof(*sh);
+ if (sh->type == BTRFS_DIR_ITEM_KEY) {
+ dir_item = (struct btrfs_dir_item *)(args.buf + off);
+ name_len = dir_item->name_len;
+ name = (char *)(dir_item + 1);
+
+
+ /*add_root(&root_lookup, sh->objectid, sh->offset,
+ dir_id, name, name_len);*/
+ strncpy(dirname, name, name_len);
+ dirname[name_len] = '\0';
+ if (strcmp(dirname, "default") == 0) {
+ defaultsubvo...
2007 Sep 04
0
[ wxruby-Bugs-13640 ] Invalid value for TreeCtrl#get_root_id when TR_HIDE_ROOT style is set (MSW)
...atus: Open
Resolution: None
Priority: 3
Submitted By: Alex Fenton (brokentoy)
Assigned to: Alex Fenton (brokentoy)
Summary: Invalid value for TreeCtrl#get_root_id when TR_HIDE_ROOT style is set (MSW)
Initial Comment:
When a TreeCtrl is created with the TR_HIDE_ROOT style, the id values returned by add_root and get_root_id are invalid (-65636) - if passed back into get_item_text , get_item_data, item_has_children etc nothing is returned.
----------------------------------------------------------------------
You can respond by visiting:
http://rubyforge.org/tracker/?func=detail&atid=218&aid=...
2007 Jun 20
0
[ wxruby-Bugs-11708 ] Wx::TreeCtrl#on_compare_items can not work
...:DEFAULT_POSITION, Wx::DEFAULT_SIZE, Wx::TR_DEFAULT_STYLE | Wx::TR_EDIT_LABELS
end
def on_compare_items(item1, item2)
raise #no raise
end
end
class MyFrame < Wx::Frame
def initialize(title)
super(nil, -1, title)
@tree=MyTreeCtrl.new(self)
@root = @tree.add_root("The Root Item")
0.upto(15) do |x|
child= @tree.append_item(@root, "Item " + x.to_s())
@tree.sort_children(child)
end
@tree.sort_children(@root )
end
end
class MyApp < Wx::App
def on_init
$frame = MyFrame.new("Minimal wxRuby App...
2011 Jul 07
5
[PATCH v1 0/2] Btrfs-progs: commands "resolve inode" and "resolve logical"
The kernel patch series just sent (Subject: "Btrfs: scrub: print path to
corrupted files and trigger nodatasum fixup") introduces two new ioctls to
do in-kernel filesystem path construction. This series provides the
corresponding userspace changes, adding two new commands to the btrfs utility:
--
btrfs resolve inode [-v] <inode> <path>
resolves an <inode> to all
2007 Jun 05
0
[1051] trunk/wxruby2/samples/aui/aui.rb: Changed assign_image_list to set_image_list.
...lt;/span><span class="cx"> Wx::Size.new(16, 16) ) )
</span><del>- tree.assign_image_list(img_list)
</del><ins>+ tree.set_image_list(img_list)
</ins><span class="cx"> root = tree.add_root("Wx::AUI Project", 0)
</span><span class="cx"> items = []
</span><span class="cx"> 1.upto(5) { | i | items << tree.append_item(root, "Item #{i}", 0) }
</span></span></pre>
</div>
</div>
<...
2007 Dec 30
1
ReOrdering Wx::TreeCtrl Items
...Contract9'' => nil
}
#...
#And Given the following code:
#...
@tc_project_list = Wx::TreeCtrl.new(self, :size =>
Wx::Size.new(175, 150), :style => Wx::TR_HIDE_ROOT | Wx::TR_EDIT_LABELS
| Wx::TR_HAS_BUTTONS | Wx::TR_LINES_AT_ROOT)
tcr_project_root = @tc_project_list.add_root("Project List")
populate_project_tree(@project_list, tcr_project_root)
#...
#...
def populate_project_tree(h_project_list, parent_node)
h_project_list.each {|key, value|
tree_node = @tc_project_list.append_item(parent_node, key.to_s)
if value.class.to_...
2006 Dec 01
0
[766] trunk/wxruby2: Added item_data aliases for client_data functions, update doc & tests;
...ot;lines">@@ -34,21 +34,26 @@
</span><span class="cx">
</span><span class="cx"> def test_treectrl_itemdata
</span><span class="cx"> f = CtrlContainerFrame.new(Wx::TreeCtrl)
</span><del>- root = f.control.add_root(''foo'')
</del><ins>+ tree = f.control
+ root = tree.add_root(''foo'')
+ assert_nil(tree.get_item_data( tree.get_root_item))
</ins><span class="cx">
</span><del>- id = f.control.append_item(root, ''a...
2007 Jul 05
8
when can publish the next version?
when can publish the next version?
i am waiting...
_______________________________________________
wxruby-users mailing list
wxruby-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/wxruby-users
2004 May 22
4
couple of questions
Hi folks
A couple of questions:
1) I seem to get funny artifacts in the display of TreeCtrl, ComboBox
and ListBox when the MDI child frame containing it is first painted (see
attached - it should be two-root treeview, unopened). I''m not sure if
it''s related to being in a MDI, but the controls sample looks OK. The
artifacts are cleared up when it''s repainted or
2006 Nov 16
0
[741] trunk/wxruby2: Fix get_item_data, hiding TreeItemData messiness, fix GC-ing (Alex Fenton)
...quot;Validator":validator.html
</span><span class="cx">
</span><span class="cx">
</span><del>- *destructor*()
-
-Destructor, destroying the list control.
-
-
</del><span class="cx"> h3(#TreeCtrl_addroot). TreeCtrl#add_root
</span><span class="cx">
</span><span class="cx"> "TreeItemId":treeitemid.html *add_root*(%(arg-type)String% text, %(arg-type)Integer% image = -1,
</span><span class="cx"> %(arg-type)Integer% selI...
2007 Jun 05
0
[1050] trunk/wxruby2/doc/textile: Delete doc references to remove assign_image_list methods in Tree/ListCtrl
...amp;nbsp    2007-06-05 20:13:43 UTC (rev 1050)
</span><span class="lines">@@ -130,9 +130,6 @@
</span><span class="cx"> * "TreeCtrl.new":#TreeCtrl_new
</span><span class="cx"> * "TreeCtrl#add_root":#TreeCtrl_addroot
</span><span class="cx"> * "TreeCtrl#append_item":#TreeCtrl_appenditem
</span><del>-* "TreeCtrl#assign_buttons_image_list":#TreeCtrl_assignbuttonsimagelist
-* "TreeCtrl#assign_image_list":#TreeCtrl_assignimageli...
2006 Nov 21
0
[744] trunk/wxruby2: get_data support & mem mgmt to all ControlWithItems types, using more
...rol, 0, { ''b'' => ''B'' })
+ assert_retrievable_data(f.control, 1, ''string item data'')
+ assert_retrievable_data(f.control, 2, 42.3)
+ end
+
+ def test_treectrl_itemdata
+ f = CtrlContainerFrame.new(Wx::TreeCtrl)
+ root = f.control.add_root(''foo'')
+
+ id = f.control.append_item(root, ''a hash'', -1, -1, { :a => 7 })
+ assert_equal({:a => 7 },
+ f.control.get_item_data(id) )
+
+ id = f.control.prepend_item(root, ''a float'', -1, -1, 7.8)
+ assert_equa...
2004 Jan 08
3
pictorG
...,e.get_point)
}
evt_menu(ID_EDITLAB) {
edit_label get_selection
}
evt_tree_key_down(self.get_id) {|e|
case e.get_key_code
when K_F2
edit_label get_selection
end
}
end
def build_from_tree parent,tree
m = parent.nil? ? Proc.new {|p,l| @root=add_root l} : Proc.new {|p,l| append_item p,l}
unless tree.kind_of? Tree
m.call parent,tree
else # tree is real tree
node = m.call parent,tree.label
tree.children.each {|i|
build_from_tree node,i
}
end
end
def ShowMenu id, pt
@tree_item = id
menu=Menu....
2006 Dec 26
0
[806] trunk/wxruby2/samples/treectrl: Restored demonstration of use of icons and fonts within TreeCtrl
...;cx"> def add_test_items_to_tree(num_children,depth)
</span><del>- image = Wx::get_app.show_images() ? TreeCtrlIcon_Folder : -1
</del><ins>+ image = Wx::get_app.show_images ? TreeCtrlIcon_Folder : -1
</ins><span class="cx"> root_id = add_root("Root",image, image)
</span><span class="cx"> if image != -1
</span><span class="cx"> set_item_image(root_id, TreeCtrlIcon_FolderOpened,
</span><del>- Wx::TREE_ITEM_ICON_EXPANDED)
</del><ins>...
2007 Mar 22
0
[916] branches/wxruby2/wxwidgets_282: More Wx::AUI classes, event hooks and sample
...Wx::Size.new(16, 16) ) )
+ img_list.add( Wx::ArtProvider::get_bitmap( Wx::ART_NORMAL_FILE,
+ Wx::ART_OTHER,
+ Wx::Size.new(16, 16) ) )
+ tree.assign_image_list(img_list)
+ root = tree.add_root("Wx::AUI Project", 0)
+ items = []
+ 1.upto(5) { | i | items << tree.append_item(root, "Item #{i}", 0) }
+
+ items.each do | id |
+ 1.upto(5) { | i | tree.append_item(id, "Subitem #{i}", 0) }
+ end
+
+ tree.expand(root)
+ tree
+ end
+...