Features/GTK3/Porting/Record: Difference between revisions
No edit summary |
No edit summary |
||
| Line 213: | Line 213: | ||
return taglist | return taglist | ||
GObject.get_data() and set_data() are deprecated. Use normal Python attributes instead | |||
button.set_data('handler-ids', (clicked_handler, remove_handler, clipboard_handler)) | |||
'''No joint implementation:''' | |||
self.connect('size_allocate', self._size_allocate_cb) | |||
def _size_allocate_cb(self, widget, requisition): | |||
. . . | |||
and | |||
def do_size_allocate(self, allocation): | |||
. . . | |||
'''Replace:''' | |||
taglist.add_value( | |||
Gst.TagMergeMode.REPLACE, | |||
Gst.TAG_DATE, | |||
utils.getDateString(int(time.time()))) | |||
def getDateString( when ): | |||
return strftime( "%c", time.localtime(when) ) | |||
'''By:''' | |||
datetime = GLib.DateTime.new_now_local() | |||
date = GLib.Date() | |||
date.set_day(datetime.get_day_of_month()) | |||
date.set_month(datetime.get_month()) | |||
date.set_year(datetime.get_year()) | |||
taglist.add_value( | |||
Gst.TagMergeMode.REPLACE, | |||
Gst.TAG_DATE, | |||
date) | |||