From a678c35b3fbd902eda171ad20a2b4d774d85a087 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger <asterix@lagaule.org> Date: Fri, 8 Sep 2006 17:35:28 +0000 Subject: [PATCH] vcard window now uses label instead of entry new profile_window to edit our vcard. For #2381 --- data/glade/vcard_information_window.glade | 1709 ++++++++++----------- src/common/connection_handlers.py | 2 +- src/gajim.py | 12 +- src/vcard.py | 274 +--- 4 files changed, 869 insertions(+), 1128 deletions(-) diff --git a/data/glade/vcard_information_window.glade b/data/glade/vcard_information_window.glade index 702118f4cf..79215a8c58 100644 --- a/data/glade/vcard_information_window.glade +++ b/data/glade/vcard_information_window.glade @@ -71,392 +71,100 @@ <child> <widget class="GtkTable" id="table7"> <property name="visible">True</property> - <property name="n_rows">8</property> + <property name="n_rows">7</property> <property name="n_columns">2</property> <property name="homogeneous">False</property> <property name="row_spacing">6</property> <property name="column_spacing">12</property> <child> - <widget class="GtkEventBox" id="status_label_eventbox"> - <property name="visible">True</property> - <property name="visible_window">False</property> - <property name="above_child">False</property> - - <child> - <widget class="GtkLabel" id="status_label"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes"></property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">True</property> - <property name="xalign">0</property> - <property name="yalign">0</property> - <property name="xpad">5</property> - <property name="ypad">5</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - </child> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">3</property> - <property name="bottom_attach">4</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkEventBox" id="resource_prio_label_eventbox"> - <property name="visible">True</property> - <property name="visible_window">False</property> - <property name="above_child">False</property> - - <child> - <widget class="GtkLabel" id="resource_prio_label"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes"></property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">True</property> - <property name="xalign">0</property> - <property name="yalign">0</property> - <property name="xpad">5</property> - <property name="ypad">5</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - </child> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkExpander" id="expander5"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="expanded">False</property> - <property name="spacing">0</property> - - <child> - <widget class="GtkTable" id="table8"> - <property name="border_width">6</property> - <property name="visible">True</property> - <property name="n_rows">1</property> - <property name="n_columns">4</property> - <property name="homogeneous">False</property> - <property name="row_spacing">6</property> - <property name="column_spacing">12</property> - - <child> - <widget class="GtkEventBox" id="subscription_label_eventbox"> - <property name="visible">True</property> - <property name="visible_window">False</property> - <property name="above_child">False</property> - - <child> - <widget class="GtkLabel" id="subscription_label"> - <property name="visible">True</property> - <property name="label" translatable="yes"></property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0</property> - <property name="xpad">5</property> - <property name="ypad">5</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - </child> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkEventBox" id="ask_label_eventbox"> - <property name="visible">True</property> - <property name="visible_window">False</property> - <property name="above_child">False</property> - - <child> - <widget class="GtkLabel" id="ask_label"> - <property name="visible">True</property> - <property name="label" translatable="yes"></property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0</property> - <property name="xpad">5</property> - <property name="ypad">5</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - </child> - </widget> - <packing> - <property name="left_attach">3</property> - <property name="right_attach">4</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label45"> - <property name="visible">True</property> - <property name="label" translatable="yes" comments="Family Name">Subscription:</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label46"> - <property name="visible">True</property> - <property name="label" translatable="yes" comments="Given Name">Ask:</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - </widget> - </child> - - <child> - <widget class="GtkLabel" id="label47"> - <property name="visible">True</property> - <property name="label" translatable="yes">More</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="type">label_item</property> - </packing> - </child> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">2</property> - <property name="top_attach">7</property> - <property name="bottom_attach">8</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkEntry" id="nickname_entry"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">True</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">*</property> - <property name="activates_default">False</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="jid_label"> + <widget class="GtkLabel" id="label51"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes"></property> + <property name="label" translatable="yes">Jabber ID:</property> <property name="use_underline">False</property> <property name="use_markup">False</property> <property name="justify">GTK_JUSTIFY_LEFT</property> <property name="wrap">False</property> - <property name="selectable">True</property> + <property name="selectable">False</property> <property name="xalign">0</property> <property name="yalign">0</property> - <property name="xpad">5</property> - <property name="ypad">5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> <property name="width_chars">-1</property> <property name="single_line_mode">False</property> <property name="angle">0</property> </widget> <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="x_options">fill</property> <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkLabel" id="client_name_version_label"> + <widget class="GtkLabel" id="label53"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes"></property> + <property name="label" translatable="yes">Resource:</property> <property name="use_underline">False</property> <property name="use_markup">False</property> <property name="justify">GTK_JUSTIFY_LEFT</property> <property name="wrap">False</property> - <property name="selectable">True</property> + <property name="selectable">False</property> <property name="xalign">0</property> <property name="yalign">0</property> - <property name="xpad">5</property> - <property name="ypad">5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> <property name="width_chars">-1</property> <property name="single_line_mode">False</property> <property name="angle">0</property> </widget> <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">4</property> - <property name="bottom_attach">5</property> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="x_options">fill</property> <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkLabel" id="os_label"> + <widget class="GtkLabel" id="label54"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes"></property> + <property name="label" translatable="yes">Status:</property> <property name="use_underline">False</property> <property name="use_markup">False</property> <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">True</property> - <property name="selectable">True</property> + <property name="wrap">False</property> + <property name="selectable">False</property> <property name="xalign">0</property> <property name="yalign">0</property> - <property name="xpad">5</property> - <property name="ypad">5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> <property name="width_chars">-1</property> <property name="single_line_mode">False</property> <property name="angle">0</property> </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">5</property> - <property name="bottom_attach">6</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkCheckButton" id="log_history_checkbutton"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">_Log conversation history</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <property name="active">True</property> - <property name="inconsistent">False</property> - <property name="draw_indicator">True</property> - </widget> <packing> <property name="left_attach">0</property> - <property name="right_attach">2</property> - <property name="top_attach">6</property> - <property name="bottom_attach">7</property> + <property name="right_attach">1</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> <property name="x_options">fill</property> <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkLabel" id="label52"> + <widget class="GtkLabel" id="label55"> <property name="visible">True</property> - <property name="label" translatable="yes">Nickname:</property> + <property name="label" translatable="yes">Client:</property> <property name="use_underline">False</property> <property name="use_markup">False</property> <property name="justify">GTK_JUSTIFY_LEFT</property> @@ -474,17 +182,17 @@ <packing> <property name="left_attach">0</property> <property name="right_attach">1</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> + <property name="top_attach">3</property> + <property name="bottom_attach">4</property> <property name="x_options">fill</property> <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkLabel" id="label51"> + <widget class="GtkLabel" id="label56"> <property name="visible">True</property> - <property name="label" translatable="yes">Jabber ID:</property> + <property name="label" translatable="yes">OS:</property> <property name="use_underline">False</property> <property name="use_markup">False</property> <property name="justify">GTK_JUSTIFY_LEFT</property> @@ -502,122 +210,366 @@ <packing> <property name="left_attach">0</property> <property name="right_attach">1</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> + <property name="top_attach">4</property> + <property name="bottom_attach">5</property> <property name="x_options">fill</property> <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkLabel" id="label53"> + <widget class="GtkLabel" id="jid_label"> <property name="visible">True</property> - <property name="label" translatable="yes">Resource:</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes"></property> <property name="use_underline">False</property> <property name="use_markup">False</property> <property name="justify">GTK_JUSTIFY_LEFT</property> <property name="wrap">False</property> - <property name="selectable">False</property> + <property name="selectable">True</property> <property name="xalign">0</property> <property name="yalign">0</property> - <property name="xpad">0</property> - <property name="ypad">0</property> + <property name="xpad">5</property> + <property name="ypad">5</property> <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> <property name="width_chars">-1</property> <property name="single_line_mode">False</property> <property name="angle">0</property> </widget> <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_options">fill</property> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkLabel" id="label54"> + <widget class="GtkEventBox" id="resource_prio_label_eventbox"> <property name="visible">True</property> - <property name="label" translatable="yes">Status:</property> + <property name="visible_window">False</property> + <property name="above_child">False</property> + + <child> + <widget class="GtkLabel" id="resource_prio_label"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes"></property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">True</property> + <property name="xalign">0</property> + <property name="yalign">0</property> + <property name="xpad">5</property> + <property name="ypad">5</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + </child> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="client_name_version_label"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes"></property> <property name="use_underline">False</property> <property name="use_markup">False</property> <property name="justify">GTK_JUSTIFY_LEFT</property> <property name="wrap">False</property> - <property name="selectable">False</property> + <property name="selectable">True</property> <property name="xalign">0</property> <property name="yalign">0</property> - <property name="xpad">0</property> - <property name="ypad">0</property> + <property name="xpad">5</property> + <property name="ypad">5</property> <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> <property name="width_chars">-1</property> <property name="single_line_mode">False</property> <property name="angle">0</property> </widget> <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> + <property name="left_attach">1</property> + <property name="right_attach">2</property> <property name="top_attach">3</property> <property name="bottom_attach">4</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="os_label"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes"></property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">True</property> + <property name="selectable">True</property> + <property name="xalign">0</property> + <property name="yalign">0</property> + <property name="xpad">5</property> + <property name="ypad">5</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">4</property> + <property name="bottom_attach">5</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkCheckButton" id="log_history_checkbutton"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">_Log conversation history</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="active">True</property> + <property name="inconsistent">False</property> + <property name="draw_indicator">True</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">2</property> + <property name="top_attach">5</property> + <property name="bottom_attach">6</property> <property name="x_options">fill</property> <property name="y_options"></property> </packing> </child> - <child> - <widget class="GtkLabel" id="label55"> - <property name="visible">True</property> - <property name="label" translatable="yes">Client:</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> + <child> + <widget class="GtkExpander" id="expander5"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="expanded">False</property> + <property name="spacing">0</property> + + <child> + <widget class="GtkTable" id="table8"> + <property name="border_width">6</property> + <property name="visible">True</property> + <property name="n_rows">1</property> + <property name="n_columns">4</property> + <property name="homogeneous">False</property> + <property name="row_spacing">6</property> + <property name="column_spacing">12</property> + + <child> + <widget class="GtkEventBox" id="subscription_label_eventbox"> + <property name="visible">True</property> + <property name="visible_window">False</property> + <property name="above_child">False</property> + + <child> + <widget class="GtkLabel" id="subscription_label"> + <property name="visible">True</property> + <property name="label" translatable="yes"></property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0</property> + <property name="xpad">5</property> + <property name="ypad">5</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + </child> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkEventBox" id="ask_label_eventbox"> + <property name="visible">True</property> + <property name="visible_window">False</property> + <property name="above_child">False</property> + + <child> + <widget class="GtkLabel" id="ask_label"> + <property name="visible">True</property> + <property name="label" translatable="yes"></property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0</property> + <property name="xpad">5</property> + <property name="ypad">5</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + </child> + </widget> + <packing> + <property name="left_attach">3</property> + <property name="right_attach">4</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label45"> + <property name="visible">True</property> + <property name="label" translatable="yes" comments="Family Name">Subscription:</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label46"> + <property name="visible">True</property> + <property name="label" translatable="yes" comments="Given Name">Ask:</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">2</property> + <property name="right_attach">3</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + </widget> + </child> + + <child> + <widget class="GtkLabel" id="label47"> + <property name="visible">True</property> + <property name="label" translatable="yes">More</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="type">label_item</property> + </packing> + </child> </widget> <packing> <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">4</property> - <property name="bottom_attach">5</property> - <property name="x_options">fill</property> + <property name="right_attach">2</property> + <property name="top_attach">6</property> + <property name="bottom_attach">7</property> <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkLabel" id="label56"> + <widget class="GtkEventBox" id="status_label_eventbox"> <property name="visible">True</property> - <property name="label" translatable="yes">OS:</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> + <property name="visible_window">True</property> + <property name="above_child">False</property> + + <child> + <widget class="GtkLabel" id="status_label"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes"></property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">True</property> + <property name="xalign">0</property> + <property name="yalign">0</property> + <property name="xpad">5</property> + <property name="ypad">5</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + </child> </widget> <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">5</property> - <property name="bottom_attach">6</property> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> <property name="x_options">fill</property> - <property name="y_options"></property> + <property name="y_options">fill</property> </packing> </child> </widget> @@ -715,48 +667,6 @@ <property name="row_spacing">6</property> <property name="column_spacing">12</property> - <child> - <widget class="GtkEntry" id="FN_entry"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">False</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">*</property> - <property name="activates_default">False</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkEntry" id="EMAIL_HOME_USERID_entry"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">False</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">*</property> - <property name="activates_default">False</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">4</property> - <property name="top_attach">4</property> - <property name="bottom_attach">5</property> - <property name="y_options"></property> - </packing> - </child> - <child> <widget class="GtkExpander" id="expander1"> <property name="visible">True</property> @@ -775,16 +685,23 @@ <property name="column_spacing">12</property> <child> - <widget class="GtkEntry" id="N_FAMILY_entry"> + <widget class="GtkLabel" id="N_FAMILY_label"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="editable">False</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">*</property> - <property name="activates_default">False</property> + <property name="label" translatable="yes"></property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0</property> + <property name="xpad">5</property> + <property name="ypad">5</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> </widget> <packing> <property name="left_attach">1</property> @@ -796,16 +713,23 @@ </child> <child> - <widget class="GtkEntry" id="N_GIVEN_entry"> + <widget class="GtkLabel" id="N_GIVEN_label"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="editable">False</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">*</property> - <property name="activates_default">False</property> + <property name="label" translatable="yes"></property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0</property> + <property name="xpad">5</property> + <property name="ypad">5</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> </widget> <packing> <property name="left_attach">3</property> @@ -817,16 +741,23 @@ </child> <child> - <widget class="GtkEntry" id="N_MIDDLE_entry"> + <widget class="GtkLabel" id="N_MIDDLE_label"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="editable">False</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">*</property> - <property name="activates_default">False</property> + <property name="label" translatable="yes"></property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0</property> + <property name="xpad">5</property> + <property name="ypad">5</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> </widget> <packing> <property name="left_attach">1</property> @@ -838,16 +769,23 @@ </child> <child> - <widget class="GtkEntry" id="N_PREFIX_entry"> + <widget class="GtkLabel" id="N_PREFIX_label"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="editable">False</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">*</property> - <property name="activates_default">False</property> + <property name="label" translatable="yes"></property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0</property> + <property name="xpad">5</property> + <property name="ypad">5</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> </widget> <packing> <property name="left_attach">1</property> @@ -859,16 +797,23 @@ </child> <child> - <widget class="GtkEntry" id="N_SUFFIX_entry"> + <widget class="GtkLabel" id="N_SUFFIX_label"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="editable">False</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">*</property> - <property name="activates_default">False</property> + <property name="label" translatable="yes"></property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0</property> + <property name="xpad">5</property> + <property name="ypad">5</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> </widget> <packing> <property name="left_attach">3</property> @@ -1053,27 +998,6 @@ </packing> </child> - <child> - <widget class="GtkEntry" id="NICKNAME_entry"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">False</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">*</property> - <property name="activates_default">False</property> - </widget> - <packing> - <property name="left_attach">3</property> - <property name="right_attach">4</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="y_options"></property> - </packing> - </child> - <child> <widget class="GtkExpander" id="expander2"> <property name="visible">True</property> @@ -1092,16 +1016,23 @@ <property name="column_spacing">5</property> <child> - <widget class="GtkEntry" id="ADR_HOME_STREET_entry"> + <widget class="GtkLabel" id="ADR_HOME_STREET_label"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="editable">False</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">*</property> - <property name="activates_default">False</property> + <property name="label" translatable="yes"></property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0</property> + <property name="xpad">5</property> + <property name="ypad">5</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> </widget> <packing> <property name="left_attach">1</property> @@ -1113,16 +1044,23 @@ </child> <child> - <widget class="GtkEntry" id="ADR_HOME_EXTADR_entry"> + <widget class="GtkLabel" id="ADR_HOME_EXTADR_label"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="editable">False</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">*</property> - <property name="activates_default">False</property> + <property name="label" translatable="yes"></property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0</property> + <property name="xpad">5</property> + <property name="ypad">5</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> </widget> <packing> <property name="left_attach">3</property> @@ -1134,16 +1072,23 @@ </child> <child> - <widget class="GtkEntry" id="ADR_HOME_LOCALITY_entry"> + <widget class="GtkLabel" id="ADR_HOME_LOCALITY_label"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="editable">False</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">*</property> - <property name="activates_default">False</property> + <property name="label" translatable="yes"></property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0</property> + <property name="xpad">5</property> + <property name="ypad">5</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> </widget> <packing> <property name="left_attach">1</property> @@ -1155,16 +1100,23 @@ </child> <child> - <widget class="GtkEntry" id="ADR_HOME_PCODE_entry"> + <widget class="GtkLabel" id="ADR_HOME_PCODE_label"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="editable">False</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">*</property> - <property name="activates_default">False</property> + <property name="label" translatable="yes"></property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0</property> + <property name="xpad">5</property> + <property name="ypad">5</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> </widget> <packing> <property name="left_attach">3</property> @@ -1176,16 +1128,23 @@ </child> <child> - <widget class="GtkEntry" id="ADR_HOME_REGION_entry"> + <widget class="GtkLabel" id="ADR_HOME_REGION_label"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="editable">False</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">*</property> - <property name="activates_default">False</property> + <property name="label" translatable="yes"></property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0</property> + <property name="xpad">5</property> + <property name="ypad">5</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> </widget> <packing> <property name="left_attach">1</property> @@ -1197,16 +1156,23 @@ </child> <child> - <widget class="GtkEntry" id="ADR_HOME_CTRY_entry"> + <widget class="GtkLabel" id="ADR_HOME_CTRY_label"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="editable">False</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">*</property> - <property name="activates_default">False</property> + <property name="label" translatable="yes"></property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0</property> + <property name="xpad">5</property> + <property name="ypad">5</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> </widget> <packing> <property name="left_attach">3</property> @@ -1419,27 +1385,6 @@ </packing> </child> - <child> - <widget class="GtkEntry" id="BDAY_entry"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">False</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">*</property> - <property name="activates_default">False</property> - </widget> - <packing> - <property name="left_attach">3</property> - <property name="right_attach">4</property> - <property name="top_attach">5</property> - <property name="bottom_attach">6</property> - <property name="y_options"></property> - </packing> - </child> - <child> <widget class="GtkLabel" id="label22"> <property name="visible">True</property> @@ -1468,48 +1413,6 @@ </packing> </child> - <child> - <widget class="GtkEntry" id="URL_entry"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">False</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">*</property> - <property name="activates_default">False</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">4</property> - <property name="top_attach">3</property> - <property name="bottom_attach">4</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkEntry" id="TEL_HOME_NUMBER_entry"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">False</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">*</property> - <property name="activates_default">False</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">5</property> - <property name="bottom_attach">6</property> - <property name="y_options"></property> - </packing> - </child> - <child> <widget class="GtkLabel" id="label24"> <property name="visible">True</property> @@ -1658,6 +1561,168 @@ <property name="y_options"></property> </packing> </child> + + <child> + <widget class="GtkLabel" id="NICKNAME_label"> + <property name="visible">True</property> + <property name="label" translatable="yes"></property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0</property> + <property name="xpad">5</property> + <property name="ypad">5</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">3</property> + <property name="right_attach">4</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="FN_label"> + <property name="visible">True</property> + <property name="label" translatable="yes"></property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0</property> + <property name="xpad">5</property> + <property name="ypad">5</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="EMAIL_HOME_USERID_label"> + <property name="visible">True</property> + <property name="label" translatable="yes"></property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0</property> + <property name="xpad">5</property> + <property name="ypad">5</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">4</property> + <property name="top_attach">4</property> + <property name="bottom_attach">5</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="URL_label"> + <property name="visible">True</property> + <property name="label" translatable="yes"></property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0</property> + <property name="xpad">5</property> + <property name="ypad">5</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">4</property> + <property name="top_attach">3</property> + <property name="bottom_attach">4</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="TEL_HOME_NUMBER_label"> + <property name="visible">True</property> + <property name="label" translatable="yes"></property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0</property> + <property name="xpad">5</property> + <property name="ypad">5</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">5</property> + <property name="bottom_attach">6</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="BDAY_label"> + <property name="visible">True</property> + <property name="label" translatable="yes"></property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0</property> + <property name="xpad">5</property> + <property name="ypad">5</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">3</property> + <property name="right_attach">4</property> + <property name="top_attach">5</property> + <property name="bottom_attach">6</property> + <property name="y_options"></property> + </packing> + </child> </widget> <packing> <property name="tab_expand">False</property> @@ -1699,16 +1764,23 @@ <property name="column_spacing">12</property> <child> - <widget class="GtkEntry" id="ORG_ORGNAME_entry"> + <widget class="GtkLabel" id="ORG_ORGNAME_label"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="editable">False</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">*</property> - <property name="activates_default">False</property> + <property name="label" translatable="yes"></property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0</property> + <property name="xpad">5</property> + <property name="ypad">5</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> </widget> <packing> <property name="left_attach">1</property> @@ -1720,16 +1792,22 @@ </child> <child> - <widget class="GtkEntry" id="ORG_ORGUNIT_entry"> + <widget class="GtkLabel" id="ORG_ORGUNIT_label"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">False</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">*</property> - <property name="activates_default">False</property> + <property name="label" translatable="yes"></property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0</property> + <property name="xpad">5</property> + <property name="ypad">5</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> </widget> <packing> <property name="left_attach">3</property> @@ -1741,16 +1819,23 @@ </child> <child> - <widget class="GtkEntry" id="TITLE_entry"> + <widget class="GtkLabel" id="TITLE_label"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="editable">False</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">*</property> - <property name="activates_default">False</property> + <property name="label" translatable="yes"></property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0</property> + <property name="xpad">5</property> + <property name="ypad">5</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> </widget> <packing> <property name="left_attach">1</property> @@ -1762,16 +1847,23 @@ </child> <child> - <widget class="GtkEntry" id="ROLE_entry"> + <widget class="GtkLabel" id="ROLE_label"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="editable">False</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">*</property> - <property name="activates_default">False</property> + <property name="label" translatable="yes"></property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0</property> + <property name="xpad">5</property> + <property name="ypad">5</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> </widget> <packing> <property name="left_attach">3</property> @@ -1783,16 +1875,23 @@ </child> <child> - <widget class="GtkEntry" id="EMAIL_WORK_USERID_entry"> + <widget class="GtkLabel" id="EMAIL_WORK_USERID_label"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="editable">False</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">*</property> - <property name="activates_default">False</property> + <property name="label" translatable="yes"></property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0</property> + <property name="xpad">5</property> + <property name="ypad">5</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> </widget> <packing> <property name="left_attach">1</property> @@ -1821,16 +1920,23 @@ <property name="column_spacing">5</property> <child> - <widget class="GtkEntry" id="ADR_WORK_STREET_entry"> + <widget class="GtkLabel" id="ADR_WORK_STREET_label"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="editable">False</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">*</property> - <property name="activates_default">False</property> + <property name="label" translatable="yes"></property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0</property> + <property name="xpad">5</property> + <property name="ypad">5</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> </widget> <packing> <property name="left_attach">1</property> @@ -1842,16 +1948,23 @@ </child> <child> - <widget class="GtkEntry" id="ADR_WORK_EXTADR_entry"> + <widget class="GtkLabel" id="ADR_WORK_EXTADR_label"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="editable">False</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">*</property> - <property name="activates_default">False</property> + <property name="label" translatable="yes"></property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0</property> + <property name="xpad">5</property> + <property name="ypad">5</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> </widget> <packing> <property name="left_attach">3</property> @@ -1863,16 +1976,23 @@ </child> <child> - <widget class="GtkEntry" id="ADR_WORK_LOCALITY_entry"> + <widget class="GtkLabel" id="ADR_WORK_LOCALITY_label"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="editable">False</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">*</property> - <property name="activates_default">False</property> + <property name="label" translatable="yes"></property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0</property> + <property name="xpad">5</property> + <property name="ypad">5</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> </widget> <packing> <property name="left_attach">1</property> @@ -1884,16 +2004,23 @@ </child> <child> - <widget class="GtkEntry" id="ADR_WORK_PCODE_entry"> + <widget class="GtkLabel" id="ADR_WORK_PCODE_label"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="editable">False</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">*</property> - <property name="activates_default">False</property> + <property name="label" translatable="yes"></property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0</property> + <property name="xpad">5</property> + <property name="ypad">5</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> </widget> <packing> <property name="left_attach">3</property> @@ -1905,16 +2032,23 @@ </child> <child> - <widget class="GtkEntry" id="ADR_WORK_REGION_entry"> + <widget class="GtkLabel" id="ADR_WORK_REGION_label"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="editable">False</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">*</property> - <property name="activates_default">False</property> + <property name="label" translatable="yes"></property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0</property> + <property name="xpad">5</property> + <property name="ypad">5</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> </widget> <packing> <property name="left_attach">1</property> @@ -1926,16 +2060,23 @@ </child> <child> - <widget class="GtkEntry" id="ADR_WORK_CTRY_entry"> + <widget class="GtkLabel" id="ADR_WORK_CTRY_label"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="editable">False</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">*</property> - <property name="activates_default">False</property> + <property name="label" translatable="yes"></property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0</property> + <property name="xpad">5</property> + <property name="ypad">5</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> </widget> <packing> <property name="left_attach">3</property> @@ -2149,16 +2290,23 @@ </child> <child> - <widget class="GtkEntry" id="TEL_WORK_NUMBER_entry"> + <widget class="GtkLabel" id="TEL_WORK_NUMBER_label"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="editable">False</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">*</property> - <property name="activates_default">False</property> + <property name="label" translatable="yes"></property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0</property> + <property name="xpad">5</property> + <property name="ypad">5</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> </widget> <packing> <property name="left_attach">1</property> @@ -2432,169 +2580,6 @@ <property name="fill">True</property> </packing> </child> - - <child> - <widget class="GtkHButtonBox" id="information_hbuttonbox"> - <property name="visible">True</property> - <property name="layout_style">GTK_BUTTONBOX_END</property> - <property name="spacing">12</property> - - <child> - <widget class="GtkButton" id="publish_button"> - <property name="visible">True</property> - <property name="can_default">True</property> - <property name="can_focus">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <signal name="clicked" handler="on_publish_button_clicked"/> - - <child> - <widget class="GtkAlignment" id="alignment1"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="yalign">0</property> - <property name="xscale">0</property> - <property name="yscale">0</property> - <property name="top_padding">0</property> - <property name="bottom_padding">0</property> - <property name="left_padding">0</property> - <property name="right_padding">0</property> - - <child> - <widget class="GtkHBox" id="hbox1"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">2</property> - - <child> - <widget class="GtkImage" id="image1"> - <property name="visible">True</property> - <property name="stock">gtk-go-up</property> - <property name="icon_size">4</property> - <property name="xalign">0</property> - <property name="yalign">0</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label1"> - <property name="visible">True</property> - <property name="label" translatable="yes">_Publish</property> - <property name="use_underline">True</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - </widget> - </child> - </widget> - </child> - </widget> - </child> - - <child> - <widget class="GtkButton" id="retrieve_button"> - <property name="visible">True</property> - <property name="can_default">True</property> - <property name="can_focus">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <signal name="clicked" handler="on_retrieve_button_clicked"/> - - <child> - <widget class="GtkAlignment" id="alignment2"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="yalign">0</property> - <property name="xscale">0</property> - <property name="yscale">0</property> - <property name="top_padding">0</property> - <property name="bottom_padding">0</property> - <property name="left_padding">0</property> - <property name="right_padding">0</property> - - <child> - <widget class="GtkHBox" id="hbox2"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">2</property> - - <child> - <widget class="GtkImage" id="image2"> - <property name="visible">True</property> - <property name="stock">gtk-go-down</property> - <property name="icon_size">4</property> - <property name="xalign">0</property> - <property name="yalign">0</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label2"> - <property name="visible">True</property> - <property name="label" translatable="yes">_Retrieve</property> - <property name="use_underline">True</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - </widget> - </child> - </widget> - </child> - </widget> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">True</property> - </packing> - </child> </widget> </child> </widget> diff --git a/src/common/connection_handlers.py b/src/common/connection_handlers.py index c877d0d768..1b2356e8d2 100644 --- a/src/common/connection_handlers.py +++ b/src/common/connection_handlers.py @@ -1356,7 +1356,7 @@ class ConnectionHandlers(ConnectionVcard, ConnectionBytestream, ConnectionDisco) user_nick = msg.getTagData('nick') if not user_nick: user_nick = '' - + if encTag and GnuPG.USE_GPG: #decrypt encmsg = encTag.getData() diff --git a/src/gajim.py b/src/gajim.py index c562f529cf..a01a6ee89c 100755 --- a/src/gajim.py +++ b/src/gajim.py @@ -185,7 +185,7 @@ parser = optparser.OptionsParser(config_filename) import roster_window import systray -import vcard +import profile_window import config class GlibIdleQueue(idlequeue.IdleQueue): @@ -339,9 +339,9 @@ class Interface: def edit_own_details(self, account): jid = gajim.get_jid_from_account(account) - if not self.instances[account]['infos'].has_key(jid): - self.instances[account]['infos'][jid] = \ - vcard.VcardWindow(jid, account, True) + if not self.instances[account].has_key('profile'): + self.instances[account]['profile'] = \ + profile_window.ProfileWindow(account) gajim.connections[account].request_vcard(jid) def handle_event_notify(self, account, array): @@ -764,8 +764,8 @@ class Interface: nick = array['NICKNAME'] if nick: gajim.nicks[account] = nick - if self.instances[account]['infos'].has_key(array['jid']): - win = self.instances[account]['infos'][array['jid']] + if self.instances[account].has_key('profile'): + win = self.instances[account]['profile'] win.set_values(array) if account in self.show_vcard_when_connect: self.show_vcard_when_connect.remove(account) diff --git a/src/vcard.py b/src/vcard.py index e1ddbec128..2281ab827b 100644 --- a/src/vcard.py +++ b/src/vcard.py @@ -57,55 +57,32 @@ def get_avatar_pixbuf_encoded_mime(photo): class VcardWindow: '''Class for contact's information window''' - def __init__(self, contact, account, vcard = False, is_fake = False): + def __init__(self, contact, account, is_fake = False): # the contact variable is the jid if vcard is true self.xml = gtkgui_helpers.get_glade('vcard_information_window.glade') self.window = self.xml.get_widget('vcard_information_window') - self.publish_button = self.xml.get_widget('publish_button') - self.retrieve_button = self.xml.get_widget('retrieve_button') - self.nickname_entry = self.xml.get_widget('nickname_entry') - if not vcard: # Maybe gc_vcard ? - self.nickname_entry.set_property('editable', False) - - self.publish_button.set_no_show_all(True) - self.retrieve_button.set_no_show_all(True) - - self.contact = contact # don't use it if vcard is true + self.contact = contact self.account = account - self.vcard = vcard self.is_fake = is_fake + self.avatar_mime_type = None self.avatar_encoded = None self.avatar_save_as_id = None - if vcard: # we view/edit our own vcard - self.jid = contact - # remove Jabber tab & show publish/retrieve/close/set_avatar buttons - # and make entries and textview editable - self.change_to_vcard() - else: # we see someone else's vcard - self.publish_button.hide() - self.retrieve_button.hide() - self.jid = contact.jid - self.fill_jabber_page() - - # if we are editing our own vcard publish button should publish - # vcard data we have typed including nickname, it's why we connect only - # here (when we see someone else's vcard) - self.nickname_entry.connect('focus-out-event', - self.on_nickname_entry_focus_out_event) - button = self.xml.get_widget('set_avatar_button') - button.set_no_show_all(True) - button.connect('clicked', - gtkgui_helpers.on_avatar_save_as_menuitem_activate, - self.jid, self.account, self.contact.name + '.jpeg') + self.fill_jabber_page() + + button = self.xml.get_widget('set_avatar_button') + button.set_no_show_all(True) + button.connect('clicked', + gtkgui_helpers.on_avatar_save_as_menuitem_activate, + self.contact.jid, self.account, self.contact.name + '.jpeg') self.xml.signal_autoconnect(self) self.window.show_all() def on_vcard_information_window_destroy(self, widget): - del gajim.interface.instances[self.account]['infos'][self.jid] + del gajim.interface.instances[self.account]['infos'][self.contact.jid] def on_vcard_information_window_key_press_event(self, widget, event): if event.keyval == gtk.keysyms.Escape: @@ -126,115 +103,16 @@ class VcardWindow: if oldlog != log: gajim.config.set_per('accounts', self.account, 'no_log_for', ' '.join(no_log_for)) - - def on_nickname_entry_focus_out_event(self, widget, event): - '''Save contact information and update - the roster item on the Jabber server''' - new_name = self.nickname_entry.get_text().decode('utf-8') - # update contact.name with new nickname if that is not '' - if new_name != self.contact.name and new_name != '': - self.contact.name = new_name - # update roster model - model = gajim.interface.roster.tree.get_model() - for iter_ in gajim.interface.roster.get_contact_iter(self.contact.jid, - self.account): - model[iter_][1] = new_name - gajim.connections[self.account].update_contact(self.contact.jid, - self.contact.name, self.contact.groups) - # update opened chat window - ctrl = gajim.interface.msg_win_mgr.get_control(self.contact.jid, - self.account) - if ctrl: - ctrl.update_ui() - win = gajim.interface.msg_win_mgr.get_window(self.contact.jid, - self.account) - win.redraw_tab(ctrl) - win.show_title() - - def on_close_button_clicked(self, widget): - self.window.destroy() - - def on_clear_button_clicked(self, widget): - # empty the image - path = os.path.join(gajim.DATA_DIR, 'pixmaps', 'person.png') - self.xml.get_widget('PHOTO_image').set_from_file(path) - self.avatar_encoded = None - if self.avatar_save_as_id: - self.xml.get_widget('set_avatar_button').disconnect( - self.avatar_save_as_id) - self.avatar_save_as_id = None - - def on_set_avatar_button_clicked(self, widget): - f = None - def on_ok(widget, path_to_file): - filesize = os.path.getsize(path_to_file) # in bytes - #FIXME: use messages for invalid file for 0.11 - invalid_file = False - msg = '' - if os.path.isfile(path_to_file): - stat = os.stat(path_to_file) - if stat[6] == 0: - invalid_file = True - else: - invalid_file = True - if not invalid_file and filesize > 16384: # 16 kb - try: - pixbuf = gtk.gdk.pixbuf_new_from_file(path_to_file) - # get the image at 'notification size' - # and use that user did not specify in ACE crazy size - scaled_pixbuf = gtkgui_helpers.get_scaled_pixbuf(pixbuf, - 'tooltip') - except gobject.GError, msg: # unknown format - # msg should be string, not object instance - msg = str(msg) - invalid_file = True - if invalid_file: - if True: # keep identation - dialogs.ErrorDialog(_('Could not load image'), msg) - return - if filesize > 16384: - if scaled_pixbuf: - path_to_file = os.path.join(gajim.TMP, - 'avatar_scaled.png') - scaled_pixbuf.save(path_to_file, 'png') - self.dialog.destroy() - - fd = open(path_to_file, 'rb') - data = fd.read() - pixbuf = gtkgui_helpers.get_pixbuf_from_data(data) - # rescale it - pixbuf = gtkgui_helpers.get_scaled_pixbuf(pixbuf, 'vcard') - image = self.xml.get_widget('PHOTO_image') - image.set_from_pixbuf(pixbuf) - self.avatar_encoded = base64.encodestring(data) - # returns None if unknown type - self.avatar_mime_type = mimetypes.guess_type(path_to_file)[0] - - self.dialog = dialogs.ImageChooserDialog(on_response_ok = on_ok) def on_PHOTO_button_press_event(self, widget, event): '''If right-clicked, show popup''' if event.button == 3: # right click - if self.vcard: - # our own avatar - account = None - nick = gajim.config.get_per('accounts', self.account, 'name') - else: - account = self.account - nick = self.contact.name menu = gtk.Menu() menuitem = gtk.ImageMenuItem(gtk.STOCK_SAVE_AS) menuitem.connect('activate', gtkgui_helpers.on_avatar_save_as_menuitem_activate, - self.jid, account, nick + '.jpeg') + self.contact.jid, self.account, self.contact.name + '.jpeg') menu.append(menuitem) - # show clear for own avatar - if self.vcard: - menuitem = gtk.ImageMenuItem(gtk.STOCK_CLEAR) - menuitem.connect('activate', - self.on_clear_button_clicked) - menu.append(menuitem) - menu.show_all() menu.connect('selection-done', lambda w:w.destroy()) # show the menu menu.show_all() @@ -269,16 +147,16 @@ class VcardWindow: if 'WORK' in entry: add_on = '_WORK' for j in entry.keys(): - self.set_value(i + add_on + '_' + j + '_entry', entry[j]) + self.set_value(i + add_on + '_' + j + '_label', entry[j]) if isinstance(vcard[i], dict): for j in vcard[i].keys(): - self.set_value(i + '_' + j + '_entry', vcard[i][j]) + self.set_value(i + '_' + j + '_label', vcard[i][j]) else: if i == 'DESC': self.xml.get_widget('DESC_textview').get_buffer().set_text( vcard[i], 0) else: - self.set_value(i + '_entry', vcard[i]) + self.set_value(i + '_label', vcard[i]) def set_last_status_time(self): self.fill_status_label() @@ -365,7 +243,6 @@ class VcardWindow: if self.contact.ask == 'subscribe': tooltips.set_tip(eb, _("You are waiting contact's answer about your subscription request")) - self.nickname_entry.set_text(self.contact.name) log = True if self.contact.jid in gajim.config.get_per('accounts', self.account, 'no_log_for').split(' '): @@ -417,124 +294,3 @@ class VcardWindow: self.fill_status_label() gajim.connections[self.account].request_vcard(self.contact.jid, self.is_fake) - - def add_to_vcard(self, vcard, entry, txt): - '''Add an information to the vCard dictionary''' - entries = entry.split('_') - loc = vcard - if len(entries) == 3: # We need to use lists - if not loc.has_key(entries[0]): - loc[entries[0]] = [] - found = False - for e in loc[entries[0]]: - if entries[1] in e: - found = True - break - if found: - e[entries[2]] = txt - else: - loc[entries[0]].append({entries[1]: '', entries[2]: txt}) - return vcard - while len(entries) > 1: - if not loc.has_key(entries[0]): - loc[entries[0]] = {} - loc = loc[entries[0]] - del entries[0] - loc[entries[0]] = txt - return vcard - - def make_vcard(self): - '''make the vCard dictionary''' - entries = ['FN', 'NICKNAME', 'BDAY', 'EMAIL_HOME_USERID', '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', - 'ORG_ORGUNIT', 'TITLE', 'ROLE', 'TEL_WORK_NUMBER', 'EMAIL_WORK_USERID', - 'ADR_WORK_STREET', 'ADR_WORK_EXTADR', 'ADR_WORK_LOCALITY', - 'ADR_WORK_REGION', 'ADR_WORK_PCODE', 'ADR_WORK_CTRY'] - vcard = {} - for e in entries: - txt = self.xml.get_widget(e + '_entry').get_text().decode('utf-8') - if txt != '': - vcard = self.add_to_vcard(vcard, e, txt) - - # DESC textview - buff = self.xml.get_widget('DESC_textview').get_buffer() - start_iter = buff.get_start_iter() - end_iter = buff.get_end_iter() - txt = buff.get_text(start_iter, end_iter, 0) - if txt != '': - vcard['DESC'] = txt.decode('utf-8') - - # Avatar - if self.avatar_encoded: - vcard['PHOTO'] = {'BINVAL': self.avatar_encoded} - if self.avatar_mime_type: - vcard['PHOTO']['TYPE'] = self.avatar_mime_type - return vcard - - def on_publish_button_clicked(self, widget): - if gajim.connections[self.account].connected < 2: - dialogs.ErrorDialog(_('You are not connected to the server'), - _('Without a connection you can not publish your contact ' - 'information.')) - return - vcard = self.make_vcard() - nick = '' - if vcard.has_key('NICKNAME'): - nick = vcard['NICKNAME'] - if nick == '': - nick = gajim.config.get_per('accounts', self.account, 'name') - gajim.nicks[self.account] = nick - gajim.connections[self.account].send_vcard(vcard) - - def on_retrieve_button_clicked(self, widget): - entries = ['FN', 'NICKNAME', 'BDAY', 'EMAIL_HOME_USERID', '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', - 'ORG_ORGUNIT', 'TITLE', 'ROLE', 'ADR_WORK_STREET', 'ADR_WORK_EXTADR', - 'ADR_WORK_LOCALITY', 'ADR_WORK_REGION', 'ADR_WORK_PCODE', - 'ADR_WORK_CTRY'] - if gajim.connections[self.account].connected > 1: - # clear all entries - for e in entries: - self.xml.get_widget(e + '_entry').set_text('') - self.xml.get_widget('DESC_textview').get_buffer().set_text('') - self.xml.get_widget('PHOTO_image').set_from_pixbuf(None) - if self.avatar_save_as_id: - self.xml.get_widget('set_avatar_button').disconnect( - self.avatar_save_as_id) - self.avatar_save_as_id = None - gajim.connections[self.account].request_vcard(self.jid) - else: - dialogs.ErrorDialog(_('You are not connected to the server'), - _('Without a connection, you can not get your contact information.')) - - def change_to_vcard(self): - self.xml.get_widget('information_notebook').remove_page(0) - self.xml.get_widget('nickname_label').set_markup( - '<b><span size="x-large">' + - _('Personal details') + - '</span></b>') - self.xml.get_widget('set_avatar_button').connect('clicked', - self.on_set_avatar_button_clicked) - - self.xml.get_widget('set_avatar_button').show() - self.publish_button.show() - self.retrieve_button.show() - - #make all entries editable - entries = ['FN', 'NICKNAME', 'BDAY', 'EMAIL_HOME_USERID', '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', - 'ORG_ORGUNIT', 'TITLE', 'ROLE', 'TEL_WORK_NUMBER', 'EMAIL_WORK_USERID', - 'ADR_WORK_STREET', 'ADR_WORK_EXTADR', 'ADR_WORK_LOCALITY', - 'ADR_WORK_REGION', 'ADR_WORK_PCODE', 'ADR_WORK_CTRY'] - for e in entries: - self.xml.get_widget(e + '_entry').set_property('editable', True) - - description_textview = self.xml.get_widget('DESC_textview') - description_textview.set_editable(True) - description_textview.set_cursor_visible(True) -- GitLab