diff --git a/gajim/data/gui/profile_window.ui b/gajim/data/gui/profile_window.ui index 7893928d9..8691f57ae 100644 --- a/gajim/data/gui/profile_window.ui +++ b/gajim/data/gui/profile_window.ui @@ -1,16 +1,13 @@ - + - + False - Personal Information + Profile dialog - - - True @@ -20,585 +17,425 @@ True False - 6 + 6 + 6 + 6 + 6 + True - + True False - 6 - 6 - 6 + 18 + 18 + 18 + 18 + vertical + 18 - + True False - <b>Name:</b> - True - 0 - 0 - - - 0 - 0 - - - - - True - True - - - 1 - 0 - - - - - True - False - <b>Nickname:</b> - True - 1 - 0 - - - 2 - 0 - - - - - True - True - - - 3 - 0 - - - - - True - True + 18 - + + 150 True False - 6 - 6 - 6 + vertical + 6 - - True - False - <b>Family:</b> - True - 1 - 0 - - - 0 - 0 - - - - + True True - - - 1 - 0 - - - - - True - False - <b>Given:</b> - True - 1 - 0 - - - 2 - 0 - - - - - True - True - - - 3 - 0 - - - - - True - False - <b>Middle:</b> - True - 1 - 0 - - - 0 - 1 - - - - - True - False - <b>Prefix:</b> - True - 1 - 0 - - - 0 - 2 - - - - - True - True - - - 1 - 1 - - - - - True - True - - - 1 - 2 - - - - - True - False - <b>Suffix:</b> - True - 1 - 0 - - - 2 - 2 - - - - - True - True - - - 3 - 2 - - - - - - - - - - - - - True - False - <b>Full Name</b> - True - 0 - 0 - - - - - 0 - 1 - 4 - - - - - True - True - - - True - False - 6 - 6 - 6 - - - True - False - <b>Street:</b> - True - 1 - 0 - - - 0 - 0 - - - - - True - True - - - 1 - 0 - - - - - True - False - <b>Extra Address:</b> - True - 1 - 0 - - - 2 - 0 - - - - - True - True - - - 3 - 0 - - - - - True - False - <b>City:</b> - True - 1 - 0 - - - 0 - 1 - - - - - True - True - - - 1 - 1 - - - - - True - False - <b>Postal Code:</b> - True - 1 - 0 - - - 2 - 1 - - - - - True - True - - - 3 - 1 - - - - - True - False - <b>State:</b> - True - 1 - 0 - - - 0 - 2 - - - - - True - True - - - 1 - 2 - - - - - True - False - <b>Country:</b> - True - 1 - 0 - - - 2 - 2 - - - - - True - True - - - 3 - 2 - - - - - - - True - False - <b>Address</b> - True - 0 - 0 - - - - - 0 - 2 - 4 - - - - - True - False - <b>Homepage:</b> - True - 1 - 0 - - - 0 - 3 - - - - - True - True - - - 1 - 3 - 3 - - - - - True - False - <b>E-Mail:</b> - True - 1 - - - 0 - 4 - - - - - True - True - - - 1 - 4 - 3 - - - - - True - False - <b>Phone No.:</b> - True - 1 - 0 - - - 0 - 5 - - - - - True - True - - - 1 - 5 - - - - - True - True - - - - 3 - 5 - - - - - True - False - <b>Avatar:</b> - True - 1 - 0 - - - 0 - 6 - - - - - True - False - 6 - - - True - False - - - - True - False - False + False + - + True False - gtk-missing-image + + + True + False + gtk-missing-image + + + -1 + + + + + True + True + True + True + Clear Avatar + end + start + 6 + 6 + 6 + 6 + True + + + + True + False + window-close + + + + + + + + False + False + 0 + + + + + 140 + 140 + True + True + False + True + start + start + True + + + + True + False + center + vertical + 18 + + + True + False + 10 + avatar-default + 6 + + + False + True + 0 + + + + + True + False + Set Avatar… + + + False + True + 1 + + + + + + + + False + False + 1 + - - - False - False - 0 - - - - - Click to set your avatar - True - True - False - True - True - - - - False - False - 1 - - - - - Remove Avatar - True - True - True - Clear Avatar - start - end - - False True - 2 + 0 + + + + + True + False + 6 + 12 + + + True + False + end + Full Name + True + right + + + + 0 + 2 + + + + + True + True + True + + + 1 + 1 + + + + + True + True + True + + + 1 + 2 + + + + + True + False + end + Nickname + True + right + + + + 0 + 1 + + + + + True + False + end + 6 + 12 + Account + True + right + + + + 0 + 0 + + + + + True + False + start + 2 + 6 + 12 + + + 1 + 0 + + + + + True + True + 1 - 1 - 6 - 3 + False + True + 0 - + True False - Format: YYYY-MM-DD - False + 6 + 12 - + + True + True + True + + + 1 + 0 + 3 + + + + + True + True + + + 1 + 1 + 3 + + + + True False - <b>Birthday:</b> + end + Phone No. True - 1 - 0 + right + + + 0 + 3 + + + + + True + True + + + 1 + 3 + + + + + True + True + + + + 3 + 3 + + + + + True + False + Format: YYYY-MM-DD + False + + + True + False + end + Birthday + True + right + + + + + + 2 + 3 + + + + + True + False + end + Homepage + True + right + + + + 0 + 0 + + + + + True + False + end + E-Mail + True + right + + + + 0 + 1 + + + + + True + False + end + Jabber ID + True + right + + + + 0 + 2 + + + + + True + True + + + 1 + 2 + 3 + - 2 - 5 + False + True + 3 @@ -607,87 +444,34 @@ True False - Personal Info - 0 - 0 + Main False - + True False - 6 + start + 18 + 18 + 18 + 18 6 - 6 + 12 - + True False - <b>Company:</b> + end + Family True - 1 - 0 - - - 0 - 0 - - - - - True - True - - - 1 - 0 - - - - - True - False - <b>Department:</b> - True - 1 - 0 - - - 2 - 0 - - - - - True - True - - - 3 - 0 - - - - - True - False - <b>Position:</b> - True - 1 - 0 - - - 0 - 1 - - - - - True - True + right + 1 @@ -695,13 +479,9 @@ - + True - False - <b>Role:</b> - True - 1 - 0 + True 2 @@ -709,9 +489,16 @@ - + True - True + False + end + Given + True + right + 3 @@ -719,228 +506,314 @@ - + True True - - - True - False - 5 - 6 - 6 - - - True - False - <b>Street:</b> - True - 1 - 0 - - - 0 - 0 - - - - - True - True - - - 1 - 0 - - - - - True - False - <b>Extra Address:</b> - True - 1 - 0 - - - 2 - 0 - - - - - True - True - - - 3 - 0 - - - - - True - False - <b>City:</b> - True - 1 - 0 - - - 0 - 1 - - - - - True - True - - - 1 - 1 - - - - - True - False - <b>Postal Code:</b> - True - 1 - 0 - - - 2 - 1 - - - - - True - True - - - 3 - 1 - - - - - True - False - <b>State:</b> - True - 1 - 0 - - - 0 - 2 - - - - - True - True - - - 1 - 2 - - - - - True - False - <b>Country:</b> - True - 1 - 0 - - - 2 - 2 - - - - - True - True - - - 3 - 2 - - - - - - - True - False - <b>Address</b> - True - 1 - 0 - - - 0 + 4 + 1 + + + + + True + False + end + Middle + True + + + + 1 2 - 4 - + True False - <b>E-Mail:</b> + end + Prefix True - 1 - 0 - - - 0 - 3 - - - - - True - True + right + 1 3 - 3 - - True - False - <b>Phone No.:</b> - True - 1 - 0 - - - 0 - 4 - - - - + True True - 1 - 4 + 2 + 2 + + + True + True + + + 2 + 3 + + + + + True + False + end + Suffix + True + right + + + + 3 + 3 + + + + + True + True + + + 4 + 3 + + + + + True + False + end + Street + True + right + + + + 1 + 5 + + + + + True + True + True + + + 2 + 5 + + + + + True + False + end + Extra Address + True + right + + + + 3 + 5 + + + + + True + True + True + + + 4 + 5 + + + + + True + False + end + City + True + right + + + + 1 + 6 + + + + + True + False + end + State + True + right + + + + 1 + 7 + + + + + True + True + + + 2 + 7 + + + + + True + True + + + 2 + 6 + + + + + True + True + + + 4 + 6 + + + + + True + False + end + Postal Code + True + right + + + + 3 + 6 + + + + + True + True + + + 4 + 7 + + + + + True + False + end + Country + True + right + + + + 3 + 7 + + + + + True + False + start + 12 + <b>Address</b> + True + + + 0 + 4 + 5 + + + + + 12 + True + False + + + 0 + 1 + + + + + True + False + start + <b>Name Details</b> + True + + + 0 + 0 + 5 + + + + + + + + + + + + + + + + + @@ -952,16 +825,450 @@ 1 + + + True + False + Personal + + + 1 + False + + + + + True + False + 18 + 18 + 18 + 18 + vertical + 18 + + + True + False + 6 + 12 + + + True + False + end + Company + True + right + + + + 0 + 0 + + + + + True + True + True + + + 1 + 0 + + + + + True + False + end + Department + True + + + + 2 + 0 + + + + + True + True + True + + + 3 + 0 + + + + + True + False + end + Position + True + right + + + + 0 + 1 + + + + + True + True + + + 1 + 1 + + + + + True + True + + + 3 + 1 + + + + + True + False + end + Role + True + right + + + + 2 + 1 + + + + + False + True + 0 + + + + + True + False + start + 6 + 12 + + + True + False + end + E-Mail + True + right + + + + 1 + 5 + + + + + True + True + + + 2 + 5 + 3 + + + + + True + False + end + Phone No. + True + right + + + + 1 + 6 + + + + + True + True + + + 2 + 6 + + + + + True + False + end + Street + True + right + + + + 1 + 1 + + + + + True + True + + + 2 + 1 + + + + + True + False + end + Extra Address + True + right + + + + 3 + 1 + + + + + True + True + + + 4 + 1 + + + + + True + False + end + City + True + right + + + + 1 + 2 + + + + + True + True + + + 2 + 2 + + + + + True + False + end + Postal Code + right + + + + 3 + 2 + + + + + True + True + + + 4 + 2 + + + + + True + True + + + 2 + 3 + + + + + True + False + end + State + True + right + + + + 1 + 3 + + + + + True + True + + + 4 + 3 + + + + + True + False + end + Country + True + right + + + + 3 + 3 + + + + + True + False + start + <b>Address</b> + True + + + 0 + 0 + 5 + + + + + True + False + start + 12 + <b>Contact</b> + True + + + 0 + 4 + 5 + + + + + 12 + True + False + + + 0 + 1 + + + + + + + + + + + + + + + + + + + + + + + False + True + 1 + + + + + 2 + + True False Work - 0 - 0 - 1 + 2 False @@ -969,7 +1276,10 @@ True True - 6 + 6 + 6 + 6 + 6 in @@ -977,11 +1287,14 @@ True True word + 6 + 6 + 6 - 2 + 3 @@ -989,11 +1302,9 @@ True False About - 0 - 0 - 2 + 3 False @@ -1008,12 +1319,18 @@ True False - 6 + 6 + 6 + 6 + 6 + 12 - + True False - 0.10000000149 + False @@ -1021,10 +1338,25 @@ 0 + + + True + False + center + 0.10000000149 + + + False + False + 1 + + True False + end + True 12 end @@ -1052,6 +1384,9 @@ False True + False @@ -1063,7 +1398,7 @@ False True - 1 + 2 @@ -1073,18 +1408,10 @@ 1 - - - True - False - - - False - False - 2 - - + + + diff --git a/gajim/profile_window.py b/gajim/profile_window.py index e178e0e2e..34e1a26e5 100644 --- a/gajim/profile_window.py +++ b/gajim/profile_window.py @@ -56,6 +56,8 @@ class ProfileWindow: self.account = account self.jid = app.get_jid_from_account(account) + account_label = app.config.get_per('accounts', account, 'account_label') + self.set_value('account_label', account_label) self.dialog = None self.avatar_mime_type = None @@ -67,9 +69,6 @@ class ProfileWindow: self.update_progressbar) self.remove_statusbar_timeout_id = None - # Create Image for avatar button - image = Gtk.Image() - self.xml.get_object('PHOTO_button').set_image(image) self.xml.connect_signals(self) app.ged.register_event_handler('vcard-published', ged.GUI1, self._nec_vcard_published) @@ -111,13 +110,11 @@ class ProfileWindow: def _clear_photo(self, widget): # empty the image button = self.xml.get_object('PHOTO_button') - image = button.get_image() + image = self.xml.get_object('PHOTO_image') image.set_from_pixbuf(None) button.hide() text_button = self.xml.get_object('NOPHOTO_button') text_button.show() - remove_avatar = self.xml.get_object('remove_avatar') - remove_avatar.hide() self.avatar_encoded = None self.avatar_sha = None self.avatar_mime_type = None @@ -134,15 +131,12 @@ class ProfileWindow: surface = app.interface.get_avatar(sha, AvatarSize.VCARD, scale) button = self.xml.get_object('PHOTO_button') - image = button.get_image() + image = self.xml.get_object('PHOTO_image') image.set_from_surface(surface) button.show() text_button = self.xml.get_object('NOPHOTO_button') text_button.hide() - remove_avatar = self.xml.get_object('remove_avatar') - remove_avatar.show() - self.avatar_sha = sha publish = app.interface.get_avatar(sha, publish=True) self.avatar_encoded = base64.b64encode(publish).decode('utf-8') @@ -200,15 +194,13 @@ class ProfileWindow: def set_values(self, vcard_): button = self.xml.get_object('PHOTO_button') - image = button.get_image() + image = self.xml.get_object('PHOTO_image') text_button = self.xml.get_object('NOPHOTO_button') - remove_avatar = self.xml.get_object('remove_avatar') if not 'PHOTO' in vcard_: # set default image image.set_from_pixbuf(None) button.hide() text_button.show() - remove_avatar.hide() for i in vcard_.keys(): if i == 'PHOTO': photo_encoded = vcard_[i]['BINVAL'] @@ -230,7 +222,6 @@ class ProfileWindow: scale) image.set_from_surface(surface) button.show() - remove_avatar.show() text_button.hide() continue if i == 'ADR' or i == 'TEL' or i == 'EMAIL': @@ -293,7 +284,7 @@ class ProfileWindow: """ Make the vCard dictionary """ - entries = ['FN', 'NICKNAME', 'BDAY', 'EMAIL_HOME_USERID', 'URL', + entries = ['FN', 'NICKNAME', 'BDAY', 'EMAIL_HOME_USERID', 'JABBERID', 'URL', 'TEL_HOME_NUMBER', 'N_FAMILY', 'N_GIVEN', 'N_MIDDLE', 'N_PREFIX', 'N_SUFFIX', 'ADR_HOME_STREET', 'ADR_HOME_EXTADR', 'ADR_HOME_LOCALITY', 'ADR_HOME_REGION', 'ADR_HOME_PCODE', 'ADR_HOME_CTRY', 'ORG_ORGNAME',