Changeset 4414


Ignore:
Timestamp:
Apr 25, 2017, 12:48:18 PM (2 years ago)
Author:
mabarracus
Message:

Fix bug, newer created profiles doesn't show in group mapping
group mapping with sorted profiles into combobox

Location:
syncer-plank/trunk/fuentes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • syncer-plank/trunk/fuentes/debian/changelog

    r4412 r4414  
     1syncer-plank (0.3.2) xenial; urgency=medium
     2
     3  * Fix bug, newer created profiles doesn't show in group mapping
     4  * group mapping with sorted profiles into combobox
     5
     6 -- M.Angel Juan <m.angel.juan@gmail.com>  Tue, 25 Apr 2017 12:46:47 +0200
     7
    18syncer-plank (0.3.1) xenial; urgency=medium
    29
  • syncer-plank/trunk/fuentes/syncer-plank.install/usr/bin/syncer-plank-gui

    r4412 r4414  
    663663        #
    664664        self.group_profile_boxes = {}
    665 
     665        self.profiles_need_refresh = False
    666666        # Show window
    667667        self.obj.show_all()
     
    682682        container=self.ctl.getobj('box_container_grp_profiles')
    683683
    684         if len(self.group_profile_boxes) == 0:
     684        if self.profiles_need_refresh or len(self.group_profile_boxes) == 0:
     685            #
     686            # Profiles changed, need complete refresh
     687            #
     688            if self.profiles_need_refresh:
     689                self.profiles_need_refresh = False
     690                for box in container:
     691                    box.destroy()
     692                self.group_profile_boxes = {}
    685693            #
    686694            # if it's the first time called build the structure
     
    13541362        return ret_pr
    13551363
     1364    ##############################
     1365    #
     1366    # Sort list with format [['profile_name','grp_list_with_commas']['profile_name','grp_list_with_commas']]
     1367    #
     1368    ##############################
     1369    def sort_profiles(self,*args,**kwargs):
     1370        self.profile_list.sort(key=lambda x: x[0])
     1371
    13561372##############################
    13571373#
     
    16241640                            if g != '':
    16251641                                self.model.current_relations[g]=p[0]
     1642                    self.model.sort_profiles()
    16261643
    16271644                elif action == 'remove_profile_done':
     
    16461663                    # Update information about existent profiles
    16471664                    self.model.clear_liststore(type='profiles')
     1665                    self.window.profiles_need_refresh = True
    16481666                    self.helper.n4d_get_profiles_stored(user=self.model.user, pwd=self.model.pwd)
    16491667                    check_args('name',**kwargs)
     
    16781696                    # Update information about existent profiles
    16791697                    self.model.clear_liststore(type='profiles')
     1698                    self.window.profiles_need_refresh = True
    16801699                    self.helper.n4d_get_profiles_stored(user=self.model.user, pwd=self.model.pwd)
    16811700                    # Force redo liststore from combobox from profile window, next time will rebuild the view
     
    17931812            self.window.change_stack('box_pselector')
    17941813        if to == 'group_mapping':
     1814            #prevent trigger combo actions
    17951815            self.building_view = True
    17961816            self.window.build_group_profile_window(groups=self.model.group_list,profiles=self.model.profile_list)
Note: See TracChangeset for help on using the changeset viewer.