lib/onim/gui.rb
# Appends single item to roster in the correct group
# creates group if needed
Appends single item to roster in the correct group
creates group if needed
Appends single item to roster in the correct group creates group if needed
def add_item_to_roster(item)
      if item.group
          if @groups_rows[item.group]
            parent = @groups_rows[item.group]
          else
            parent = @contacts_model.append nil
            parent.set_value(0,nil)
            parent.set_value(1,nil)
            parent.set_value(2,item.group)
            max_color = 255*255
            parent.set_value(3,Gdk::Color.new(max_color,max_color,max_color*0.8))
            @groups_rows[item.group] = parent
            parent.set_value(4,item.group)
            parent.set_value(5,nil)
            parent.set_value(6,item.group)
          end
        else
          parent = nil
        end
        x = @contacts_model.append parent
        @contacts_rows[item.jid] = x
        fill_model_values_for_item item, x
    end
def add_item_to_roster ( item ) if item . group if @groups_rows [ item . group ] parent = @groups_rows [ item . group ] else parent = @contacts_model . append nil parent . set_value ( 0 , nil ) parent . set_value ( 1 , nil ) parent . set_value ( 2 , item . group ) max_color = 255 * 255 parent . set_value ( 3 , Gdk :: Color . new ( max_color , max_color , max_color * 0.8 ) ) @groups_rows [ item . group ] = parent parent . set_value ( 4 , item . group ) parent . set_value ( 5 , nil ) parent . set_value ( 6 , item . group ) end else parent = nil end x = @contacts_model . append parent @contacts_rows [ item . jid ] = x fill_model_values_for_item item , x end
Appends single item to roster in the correct group
creates group if needed
Appends single item to roster in the correct group creates group if needed
item
<not_specific>