~saurabhanandiit/gtg/exportFixed

« back to all changes in this revision

Viewing changes to GTG/gtk/backends_dialog/configurepanel.py

  • Committer: Izidor Matušov
  • Date: 2012-02-29 10:06:41 UTC
  • mfrom: (1098 gtg)
  • mto: This revision was merged to the branch mainline in revision 1103.
  • Revision ID: izidor.matusov@gmail.com-20120229100641-q1uns4yqz1fem2z4
Merged with the current trunk & solved problems with offset

Show diffs side-by-side

added added

removed removed

Lines of Context:
84
84
        '''
85
85
        hbox.set_spacing(10)
86
86
        self.image_icon = gtk.Image()
87
 
        self.image_icon.set_size_request(100, 100)
 
87
        self.image_icon.set_size_request(48, 48)
88
88
        vbox = gtk.VBox()
89
89
        hbox_top = gtk.HBox()
90
90
        self.human_name_label = gtk.Label()
107
107
        vbox.pack_start(self.sync_desc_label, True)
108
108
        hbox.pack_start(self.image_icon, False)
109
109
        align_vbox = gtk.Alignment(xalign = 0, yalign = 0, xscale = 1)
110
 
        align_vbox.set_padding(10, 0, 20, 0)
 
110
        align_vbox.set_padding(12, 0, 0, 0)
111
111
        align_vbox.add(vbox)
112
112
        hbox.pack_start(align_vbox, True)
113
113
 
134
134
        self.refresh_sync_status()
135
135
        self.parameters_ui.refresh(self.backend)
136
136
        self.image_icon.set_from_pixbuf(self.dialog.get_pixbuf_from_icon_name(\
137
 
                                        self.backend.get_name(), 80, 80))
 
137
                                        self.backend.get_name(), 48, 48))
138
138
 
139
139
    def refresh_title(self, sender = None, data = None):
140
140
        '''
192
192
            label = _("This is the default backend")
193
193
        else:
194
194
            if self.backend.is_enabled():
195
 
                label = _("Syncing is enabled")
 
195
                label = _("Syncing is enabled.")
196
196
            else:
197
 
                label = _('Syncing is <span color="red">disabled</span>')
 
197
                label = _('Syncing is <span color="red">disabled</span>.')
198
198
        self.sync_status_label.set_markup(label)
199
199
 
200
200
    def refresh_sync_status(self, sender = False, data = False):
208
208
        self.refresh_sync_button()
209
209
        self.refresh_sync_status_label()
210
210
    
211
 
    def set_hidden(self, is_hidden):
212
 
        '''
213
 
        Notifies this pane if it's hidden or not. We disconnect signals when
214
 
        hidden, since there is no need to keep the UI updated.
215
 
        Hopefully, this should make GTG faster :)
216
 
 
217
 
        @param is_hidden: boolean, True if the window is not visible
218
 
        '''
219
 
        #These is only needed to refresh the number of synced tasks.
220
 
        #since that is disabled for now, there is no need for this
221
 
 
222
 
#        if is_hidden:
223
 
#            if self.task_added_handle:
224
 
#                self.req.disconnect(self.task_added_handle)
225
 
#                self.task_added_handle = None
226
 
#            if self.task_deleted_handle:
227
 
#                self.req.disconnect(self.task_deleted_handle)
228
 
#                self.task_deleted_handle = None
229
 
#        else:
230
 
#            self.task_added_handle = self.req.connect("task-added", \
231
 
#                                            self.__on_task_changed)
232
 
#            self.task_added_handle = self.req.connect("task-modified", \
233
 
#                                            self.__on_task_changed)
234
 
#            self.task_deleted_handle = self.req.connect("task-deleted",  \
235
 
#                                            self.__on_task_changed)
236
 
#
237
 
#    def __on_task_changed(self, sender, task_id):
238
 
#        '''
239
 
#        If tasks are added, modified or removed, updates the number of
240
 
#        tasks of the current backend
241
 
#        '''
242
 
#        self.refresh_sync_status()
243
 
 
244
211
    def on_sync_button_clicked(self, sender):
245
212
        '''
246
213
        Signal callback when a backend is enabled/disabled via the UI button