diff options
author | Stefano Karapetsas <[email protected]> | 2012-12-14 08:03:06 -0800 |
---|---|---|
committer | Stefano Karapetsas <[email protected]> | 2012-12-14 08:03:06 -0800 |
commit | 633888e6d08db32937799634da238ad2d8e575a2 (patch) | |
tree | 8748cb9f9fb57738a14422972f7af9c740cd7589 /capplets | |
parent | 6540605b4e786e2ce75d2dd89aa3c66e961265b8 (diff) | |
parent | 37b7b37e16c6f8067ff213b9436027b362c476a8 (diff) | |
download | mate-control-center-633888e6d08db32937799634da238ad2d8e575a2.tar.bz2 mate-control-center-633888e6d08db32937799634da238ad2d8e575a2.tar.xz |
Merge pull request #26 from sbalneav/master
Get about-me functional.
Diffstat (limited to 'capplets')
-rw-r--r-- | capplets/Makefile.am | 8 | ||||
-rw-r--r-- | capplets/about-me/Makefile.am | 5 | ||||
-rw-r--r-- | capplets/about-me/mate-about-me-dialog.ui | 1516 | ||||
-rw-r--r-- | capplets/about-me/mate-about-me-password.c | 9 | ||||
-rw-r--r-- | capplets/about-me/mate-about-me.c | 541 |
5 files changed, 86 insertions, 1993 deletions
diff --git a/capplets/Makefile.am b/capplets/Makefile.am index 437e2e45..d1236522 100644 --- a/capplets/Makefile.am +++ b/capplets/Makefile.am @@ -8,7 +8,8 @@ SUBDIRS = \ keybindings \ mouse \ network \ - windows + windows \ + about-me DIST_SUBDIRS = \ common \ @@ -23,9 +24,4 @@ DIST_SUBDIRS = \ display \ about-me - -if BUILD_ABOUTME -SUBDIRS += about-me -endif - -include $(top_srcdir)/git.mk diff --git a/capplets/about-me/Makefile.am b/capplets/about-me/Makefile.am index 6cd5e139..8249a385 100644 --- a/capplets/about-me/Makefile.am +++ b/capplets/about-me/Makefile.am @@ -28,10 +28,9 @@ marshal.h: fprintd-marshal.list marshal.c: fprintd-marshal.list @GLIB_GENMARSHAL@ --prefix=fprintd_marshal $< --body --header > $@ -if BUILD_ABOUTME bin_PROGRAMS = mate-about-me -mate_about_me_LDADD = $(MATECC_CAPPLETS_LIBS) $(LIBEBOOK_LIBS) +mate_about_me_LDADD = $(MATECC_CAPPLETS_LIBS) mate_about_me_LDFLAGS = -export-dynamic @INTLTOOL_DESKTOP_RULE@ @@ -51,8 +50,6 @@ INCLUDES = \ -DMATECC_PIXMAP_DIR="\"$(pkgdatadir)/pixmaps\"" \ -DMATELOCALEDIR="\"$(datadir)/locale\"" -endif # BUILD_ABOUTME - CLEANFILES = $(MATECC_CAPPLETS_CLEANFILES) $(desktop_DATA) $(MARSHALFILES) EXTRA_DIST = $(ui_files) fprintd-marshal.list diff --git a/capplets/about-me/mate-about-me-dialog.ui b/capplets/about-me/mate-about-me-dialog.ui index fdf79b6e..c57f267c 100644 --- a/capplets/about-me/mate-about-me-dialog.ui +++ b/capplets/about-me/mate-about-me-dialog.ui @@ -1,34 +1,64 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <interface> - <requires lib="gtk+" version="2.16"/> - <!-- interface-naming-policy toplevel-contextual --> + <!-- interface-requires gtk+ 3.0 --> <object class="GtkDialog" id="about-me-dialog"> + <property name="can_focus">False</property> <property name="border_width">5</property> <property name="title" translatable="yes">About Me</property> <property name="type_hint">dialog</property> - <property name="has_separator">False</property> <child internal-child="vbox"> - <object class="GtkVBox" id="dialog-vbox2"> + <object class="GtkBox" id="dialog-vbox2"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="orientation">vertical</property> <property name="spacing">2</property> + <child internal-child="action_area"> + <object class="GtkButtonBox" id="dialog-action_area2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="layout_style">end</property> + <child> + <object class="GtkButton" id="closebutton1"> + <property name="label">gtk-close</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="can_default">True</property> + <property name="receives_default">False</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">0</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="pack_type">end</property> + <property name="position">0</property> + </packing> + </child> <child> <object class="GtkVBox" id="vbox55"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="border_width">5</property> - <property name="orientation">vertical</property> <property name="spacing">12</property> <child> <object class="GtkHBox" id="hbox58"> <property name="visible">True</property> + <property name="can_focus">False</property> <child> <object class="GtkHBox" id="hbox59"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="spacing">12</property> <child> <object class="GtkButton" id="button-image"> - <property name="width_request">80</property> - <property name="height_request">80</property> + <property name="width_request">100</property> + <property name="height_request">100</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">False</property> @@ -46,6 +76,7 @@ <child> <object class="GtkLabel" id="fullname"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="xalign">0</property> <property name="label" translatable="yes">Full Name</property> </object> @@ -57,21 +88,25 @@ </child> </object> <packing> + <property name="expand">True</property> + <property name="fill">True</property> <property name="position">0</property> </packing> </child> <child> <object class="GtkVBox" id="buttons_vbox"> <property name="visible">True</property> - <property name="orientation">vertical</property> + <property name="can_focus">False</property> <property name="spacing">6</property> <child> <object class="GtkHBox" id="hbox60"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="spacing">12</property> <child> <object class="GtkLabel" id="label1012"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="yalign">0</property> <property name="label" translatable="yes">User name:</property> </object> @@ -84,9 +119,12 @@ <child> <object class="GtkLabel" id="login"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="yalign">0</property> </object> <packing> + <property name="expand">True</property> + <property name="fill">True</property> <property name="position">1</property> </packing> </child> @@ -140,6 +178,7 @@ </object> <packing> <property name="expand">False</property> + <property name="fill">True</property> <property name="position">1</property> </packing> </child> @@ -151,1466 +190,13 @@ </packing> </child> <child> - <object class="GtkHBox" id="hbox61"> - <property name="visible">True</property> - <child> - <object class="GtkNotebook" id="notebook2"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <child> - <object class="GtkVBox" id="vbox57"> - <property name="visible">True</property> - <property name="border_width">12</property> - <property name="orientation">vertical</property> - <property name="spacing">18</property> - <child> - <object class="GtkVBox" id="vbox62"> - <property name="visible">True</property> - <property name="orientation">vertical</property> - <property name="spacing">6</property> - <child> - <object class="GtkLabel" id="label1017"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">Email</property> - <attributes> - <attribute name="weight" value="bold"/> - </attributes> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkHBox" id="hbox62"> - <property name="visible">True</property> - <child> - <object class="GtkLabel" id="label1058"> - <property name="visible">True</property> - <property name="label"> </property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkTable" id="table121"> - <property name="visible">True</property> - <property name="n_rows">2</property> - <property name="n_columns">2</property> - <property name="column_spacing">12</property> - <property name="row_spacing">6</property> - <child> - <object class="GtkLabel" id="label1015"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">_Work:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">email-work-e</property> - </object> - <packing> - <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label1016"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes" comments="Home vs Work (email)">_Home:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">email-home-e</property> - </object> - <packing> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <object class="GtkEntry" id="email-work-e"> - <property name="visible">True</property> - <property name="can_focus">True</property> - </object> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <object class="GtkEntry" id="email-home-e"> - <property name="visible">True</property> - <property name="can_focus">True</property> - </object> - <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> - </object> - <packing> - <property name="position">1</property> - </packing> - </child> - </object> - <packing> - <property name="position">1</property> - </packing> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkVBox" id="vbox63"> - <property name="visible">True</property> - <property name="orientation">vertical</property> - <property name="spacing">6</property> - <child> - <object class="GtkLabel" id="label1021"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">Telephone</property> - <attributes> - <attribute name="weight" value="bold"/> - </attributes> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkHBox" id="hbox63"> - <property name="visible">True</property> - <child> - <object class="GtkLabel" id="label1059"> - <property name="visible">True</property> - <property name="label"> </property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkTable" id="table122"> - <property name="visible">True</property> - <property name="n_rows">2</property> - <property name="n_columns">4</property> - <property name="column_spacing">12</property> - <property name="row_spacing">6</property> - <child> - <object class="GtkLabel" id="label1018"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">Wor_k:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">phone-work-e</property> - </object> - <packing> - <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label1019"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes" comments="Home vs Work (phone)">Hom_e:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">phone-home-e</property> - </object> - <packing> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <object class="GtkEntry" id="phone-work-e"> - <property name="visible">True</property> - <property name="can_focus">True</property> - </object> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <object class="GtkEntry" id="phone-home-e"> - <property name="visible">True</property> - <property name="can_focus">True</property> - </object> - <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> - <object class="GtkEntry" id="phone-mobile-e"> - <property name="visible">True</property> - <property name="can_focus">True</property> - </object> - <packing> - <property name="left_attach">3</property> - <property name="right_attach">4</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <object class="GtkEntry" id="phone-work-fax-e"> - <property name="visible">True</property> - <property name="can_focus">True</property> - </object> - <packing> - <property name="left_attach">3</property> - <property name="right_attach">4</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label1020"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">_Mobile:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">phone-mobile-e</property> - </object> - <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label1057"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">Work _fax:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">phone-work-fax-e</property> - </object> - <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> - <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> - </packing> - </child> - </object> - <packing> - <property name="position">1</property> - </packing> - </child> - </object> - <packing> - <property name="position">1</property> - </packing> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">1</property> - </packing> - </child> - <child> - <object class="GtkVBox" id="vbox64"> - <property name="visible">True</property> - <property name="orientation">vertical</property> - <property name="spacing">6</property> - <child> - <object class="GtkLabel" id="label1023"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">Instant Messaging</property> - <attributes> - <attribute name="weight" value="bold"/> - </attributes> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkHBox" id="hbox64"> - <property name="visible">True</property> - <child> - <object class="GtkLabel" id="label1060"> - <property name="visible">True</property> - <property name="label"> </property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkTable" id="table123"> - <property name="visible">True</property> - <property name="n_rows">3</property> - <property name="n_columns">4</property> - <property name="column_spacing">12</property> - <property name="row_spacing">6</property> - <child> - <object class="GtkLabel" id="label1022"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">_XMPP:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">im-jabber-e</property> - </object> - <packing> - <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <object class="GtkEntry" id="im-jabber-e"> - <property name="visible">True</property> - <property name="can_focus">True</property> - </object> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <object class="GtkEntry" id="im-msn-e"> - <property name="visible">True</property> - <property name="can_focus">True</property> - </object> - <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> - <object class="GtkLabel" id="label1052"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">_Yahoo:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">im-yahoo-e</property> - </object> - <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> - <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label1053"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">M_SN:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">im-msn-e</property> - </object> - <packing> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">GTK_FILL</property> - <property name="y_options">GTK_FILL</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label1054"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">IC_Q:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">im-icq-e</property> - </object> - <packing> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label1055"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">A_IM/iChat:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">im-aim-e</property> - </object> - <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label1056"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">_GroupWise:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">im-groupwise-e</property> - </object> - <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <object class="GtkEntry" id="im-icq-e"> - <property name="visible">True</property> - <property name="can_focus">True</property> - </object> - <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> - <object class="GtkEntry" id="im-yahoo-e"> - <property name="visible">True</property> - <property name="can_focus">True</property> - </object> - <packing> - <property name="left_attach">3</property> - <property name="right_attach">4</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <object class="GtkEntry" id="im-aim-e"> - <property name="visible">True</property> - <property name="can_focus">True</property> - </object> - <packing> - <property name="left_attach">3</property> - <property name="right_attach">4</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <object class="GtkEntry" id="im-groupwise-e"> - <property name="visible">True</property> - <property name="can_focus">True</property> - </object> - <packing> - <property name="left_attach">3</property> - <property name="right_attach">4</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="y_options"></property> - </packing> - </child> - </object> - <packing> - <property name="position">1</property> - </packing> - </child> - </object> - <packing> - <property name="position">1</property> - </packing> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">2</property> - </packing> - </child> - </object> - </child> - <child type="tab"> - <object class="GtkLabel" id="label1024"> - <property name="visible">True</property> - <property name="label" translatable="yes">Contact</property> - </object> - <packing> - <property name="tab_fill">False</property> - </packing> - </child> - <child> - <object class="GtkVBox" id="vbox60"> - <property name="visible">True</property> - <property name="border_width">12</property> - <property name="orientation">vertical</property> - <property name="spacing">18</property> - <child> - <object class="GtkVBox" id="vbox61"> - <property name="visible">True</property> - <property name="orientation">vertical</property> - <child> - <object class="GtkVBox" id="vbox65"> - <property name="visible">True</property> - <property name="orientation">vertical</property> - <child> - <object class="GtkLabel" id="label1043"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes" comments="Home vs Work (address)">Home</property> - <attributes> - <attribute name="weight" value="bold"/> - </attributes> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkHBox" id="hbox65"> - <property name="visible">True</property> - <child> - <object class="GtkLabel" id="label1061"> - <property name="visible">True</property> - <property name="label"> </property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkTable" id="addr-table-1"> - <property name="visible">True</property> - <property name="n_rows">4</property> - <property name="n_columns">4</property> - <property name="column_spacing">12</property> - <property name="row_spacing">6</property> - <child> - <object class="GtkLabel" id="label1037"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">_Address:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">addr-street-1</property> - </object> - <packing> - <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <object class="GtkScrolledWindow" id="addr-scrolledwindow-1"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="hscrollbar_policy">automatic</property> - <property name="vscrollbar_policy">never</property> - <property name="shadow_type">in</property> - <child> - <object class="GtkTextView" id="addr-street-1"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="accepts_tab">False</property> - </object> - </child> - </object> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="bottom_attach">3</property> - <property name="y_options">GTK_FILL</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label1038"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">C_ity:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">addr-locality-1</property> - </object> - <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> - <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label1039"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">_ZIP/Postal code:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">addr-code-1</property> - </object> - <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label1040"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">_State/Province:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">addr-region-1</property> - </object> - <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label1041"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">Co_untry:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">addr-country-1</property> - </object> - <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> - <property name="top_attach">3</property> - <property name="bottom_attach">4</property> - <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label1042"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">P._O. box:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">addr-po-1</property> - </object> - <packing> - <property name="top_attach">3</property> - <property name="bottom_attach">4</property> - <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <object class="GtkEntry" id="addr-po-1"> - <property name="visible">True</property> - <property name="can_focus">True</property> - </object> - <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> - <object class="GtkEntry" id="addr-locality-1"> - <property name="visible">True</property> - <property name="can_focus">True</property> - </object> - <packing> - <property name="left_attach">3</property> - <property name="right_attach">4</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <object class="GtkEntry" id="addr-code-1"> - <property name="visible">True</property> - <property name="can_focus">True</property> - </object> - <packing> - <property name="left_attach">3</property> - <property name="right_attach">4</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <object class="GtkEntry" id="addr-country-1"> - <property name="visible">True</property> - <property name="can_focus">True</property> - </object> - <packing> - <property name="left_attach">3</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> - <object class="GtkEntry" id="addr-region-1"> - <property name="visible">True</property> - <property name="can_focus">True</property> - </object> - <packing> - <property name="left_attach">3</property> - <property name="right_attach">4</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - </object> - <packing> - <property name="position">1</property> - </packing> - </child> - </object> - <packing> - <property name="position">1</property> - </packing> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">0</property> - </packing> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkVBox" id="vbox66"> - <property name="visible">True</property> - <property name="orientation">vertical</property> - <property name="spacing">6</property> - <child> - <object class="GtkLabel" id="label1050"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">Work</property> - <attributes> - <attribute name="weight" value="bold"/> - </attributes> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkHBox" id="hbox66"> - <property name="visible">True</property> - <child> - <object class="GtkLabel" id="label1062"> - <property name="visible">True</property> - <property name="label"> </property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkTable" id="addr-table-2"> - <property name="visible">True</property> - <property name="n_rows">4</property> - <property name="n_columns">4</property> - <property name="column_spacing">12</property> - <property name="row_spacing">6</property> - <child> - <object class="GtkLabel" id="label1044"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">A_ddress:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">addr-street-2</property> - </object> - <packing> - <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <object class="GtkScrolledWindow" id="addr-scrolledwindow-2"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="hscrollbar_policy">automatic</property> - <property name="vscrollbar_policy">never</property> - <property name="shadow_type">in</property> - <child> - <object class="GtkTextView" id="addr-street-2"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="accepts_tab">False</property> - </object> - </child> - </object> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="bottom_attach">3</property> - <property name="y_options">GTK_FILL</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label1045"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">ZIP/_Postal code:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">addr-code-2</property> - </object> - <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label1046"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">State/Pro_vince:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">addr-region-2</property> - </object> - <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label1047"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">Cou_ntry:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">addr-country-2</property> - </object> - <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> - <property name="top_attach">3</property> - <property name="bottom_attach">4</property> - <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label1048"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">P.O. _box:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">addr-po-2</property> - </object> - <packing> - <property name="top_attach">3</property> - <property name="bottom_attach">4</property> - <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label1049"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">Ci_ty:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">addr-locality-2</property> - </object> - <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> - <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <object class="GtkEntry" id="addr-po-2"> - <property name="visible">True</property> - <property name="can_focus">True</property> - </object> - <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> - <object class="GtkEntry" id="addr-locality-2"> - <property name="visible">True</property> - <property name="can_focus">True</property> - </object> - <packing> - <property name="left_attach">3</property> - <property name="right_attach">4</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <object class="GtkEntry" id="addr-code-2"> - <property name="visible">True</property> - <property name="can_focus">True</property> - </object> - <packing> - <property name="left_attach">3</property> - <property name="right_attach">4</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <object class="GtkEntry" id="addr-region-2"> - <property name="visible">True</property> - <property name="can_focus">True</property> - </object> - <packing> - <property name="left_attach">3</property> - <property name="right_attach">4</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <object class="GtkEntry" id="addr-country-2"> - <property name="visible">True</property> - <property name="can_focus">True</property> - </object> - <packing> - <property name="left_attach">3</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> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - </object> - <packing> - <property name="position">1</property> - </packing> - </child> - </object> - <packing> - <property name="position">1</property> - </packing> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">1</property> - </packing> - </child> - </object> - <packing> - <property name="position">1</property> - </packing> - </child> - <child type="tab"> - <object class="GtkLabel" id="label1051"> - <property name="visible">True</property> - <property name="label" translatable="yes">Address</property> - </object> - <packing> - <property name="position">1</property> - <property name="tab_fill">False</property> - </packing> - </child> - <child> - <object class="GtkVBox" id="vbox59"> - <property name="visible">True</property> - <property name="border_width">12</property> - <property name="orientation">vertical</property> - <property name="spacing">18</property> - <child> - <object class="GtkVBox" id="vbox67"> - <property name="visible">True</property> - <property name="orientation">vertical</property> - <property name="spacing">6</property> - <child> - <object class="GtkLabel" id="label1028"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">Web</property> - <attributes> - <attribute name="weight" value="bold"/> - </attributes> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkHBox" id="hbox67"> - <property name="visible">True</property> - <child> - <object class="GtkLabel" id="label1063"> - <property name="visible">True</property> - <property name="label"> </property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkTable" id="table124"> - <property name="visible">True</property> - <property name="n_rows">3</property> - <property name="n_columns">2</property> - <property name="column_spacing">12</property> - <property name="row_spacing">6</property> - <child> - <object class="GtkLabel" id="label1025"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">_Home page:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">web-homepage-e</property> - </object> - <packing> - <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label1026"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">Web _log:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">web-weblog-e</property> - </object> - <packing> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label1027"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">Cale_ndar:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">web-calendar-e</property> - </object> - <packing> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <object class="GtkEntry" id="web-homepage-e"> - <property name="visible">True</property> - <property name="can_focus">True</property> - </object> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <object class="GtkEntry" id="web-weblog-e"> - <property name="visible">True</property> - <property name="can_focus">True</property> - </object> - <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> - <object class="GtkEntry" id="web-calendar-e"> - <property name="visible">True</property> - <property name="can_focus">True</property> - </object> - <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> - </object> - <packing> - <property name="position">1</property> - </packing> - </child> - </object> - <packing> - <property name="position">1</property> - </packing> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkVBox" id="vbox68"> - <property name="visible">True</property> - <property name="orientation">vertical</property> - <property name="spacing">6</property> - <child> - <object class="GtkLabel" id="label1035"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">Job</property> - <attributes> - <attribute name="weight" value="bold"/> - </attributes> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkHBox" id="hbox68"> - <property name="visible">True</property> - <child> - <object class="GtkLabel" id="label1064"> - <property name="visible">True</property> - <property name="label"> </property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkTable" id="table125"> - <property name="visible">True</property> - <property name="n_rows">6</property> - <property name="n_columns">2</property> - <property name="column_spacing">12</property> - <property name="row_spacing">6</property> - <child> - <object class="GtkLabel" id="label1029"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">_Profession:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">job-profession-e</property> - </object> - <packing> - <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label1030"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">C_ompany:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">job-company-e</property> - </object> - <packing> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label1031"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">_Manager:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">job-manager-e</property> - </object> - <packing> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label1032"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">_Title:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">job-title-e</property> - </object> - <packing> - <property name="top_attach">3</property> - <property name="bottom_attach">4</property> - <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label1033"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">_Department:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">job-dept-e</property> - </object> - <packing> - <property name="top_attach">4</property> - <property name="bottom_attach">5</property> - <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label1034"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">A_ssistant:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">job-assistant-e</property> - </object> - <packing> - <property name="top_attach">5</property> - <property name="bottom_attach">6</property> - <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <object class="GtkEntry" id="job-profession-e"> - <property name="visible">True</property> - <property name="can_focus">True</property> - </object> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <object class="GtkEntry" id="job-company-e"> - <property name="visible">True</property> - <property name="can_focus">True</property> - </object> - <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> - <object class="GtkEntry" id="job-manager-e"> - <property name="visible">True</property> - <property name="can_focus">True</property> - </object> - <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> - <object class="GtkEntry" id="job-title-e"> - <property name="visible">True</property> - <property name="can_focus">True</property> - </object> - <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> - <object class="GtkEntry" id="job-dept-e"> - <property name="visible">True</property> - <property name="can_focus">True</property> - </object> - <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> - <object class="GtkEntry" id="job-assistant-e"> - <property name="visible">True</property> - <property name="can_focus">True</property> - </object> - <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> - </object> - <packing> - <property name="position">1</property> - </packing> - </child> - </object> - <packing> - <property name="position">1</property> - </packing> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">1</property> - </packing> - </child> - </object> - <packing> - <property name="position">2</property> - </packing> - </child> - <child type="tab"> - <object class="GtkLabel" id="label1036"> - <property name="visible">True</property> - <property name="label" translatable="yes">Personal Info</property> - </object> - <packing> - <property name="position">2</property> - <property name="tab_fill">False</property> - </packing> - </child> - </object> - <packing> - <property name="position">0</property> - </packing> - </child> - </object> - <packing> - <property name="position">1</property> - </packing> - </child> - </object> - <packing> - <property name="position">1</property> - </packing> - </child> - <child internal-child="action_area"> - <object class="GtkHButtonBox" id="dialog-action_area2"> - <property name="visible">True</property> - <property name="layout_style">end</property> - <child> - <object class="GtkButton" id="closebutton1"> - <property name="label">gtk-close</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="can_default">True</property> - <property name="receives_default">False</property> - <property name="use_stock">True</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">0</property> - </packing> + <placeholder/> </child> </object> <packing> <property name="expand">False</property> - <property name="pack_type">end</property> - <property name="position">0</property> + <property name="fill">True</property> + <property name="position">1</property> </packing> </child> </object> diff --git a/capplets/about-me/mate-about-me-password.c b/capplets/about-me/mate-about-me-password.c index 80f8e4ca..87bf084c 100644 --- a/capplets/about-me/mate-about-me-password.c +++ b/capplets/about-me/mate-about-me-password.c @@ -210,6 +210,7 @@ spawn_passwd (PasswordDialog *pdialog, GError **error) g_set_error (error, PASSDLG_ERROR, PASSDLG_ERROR_BACKEND, + "%s", strerror (errno)); /* Clean up */ @@ -427,7 +428,7 @@ io_watch_stdout (GIOChannel *source, GIOCondition condition, PasswordDialog *pdi GError *error = NULL; gchar *msg = NULL; /* Status error message */ - GtkBuilder *dialog; + GtkBuilder *dialog = NULL; gboolean reinit = FALSE; @@ -722,13 +723,13 @@ passdlg_error_dialog (GtkWindow *parent, const gchar *title, dialog = gtk_message_dialog_new (parent, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, - msg); + "%s", msg); if (title) gtk_window_set_title (GTK_WINDOW (dialog), title); if (details) gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog), - details); + "%s", details); gtk_dialog_run (GTK_DIALOG (dialog)); gtk_widget_destroy (dialog); } @@ -872,7 +873,7 @@ passdlg_authenticate (GtkButton *button, PasswordDialog *pdialog) static guint passdlg_validate_passwords (PasswordDialog *pdialog) { - GtkBuilder *dialog; + GtkBuilder *dialog = NULL; const gchar *new_password, *retyped_password; glong nlen, rlen; diff --git a/capplets/about-me/mate-about-me.c b/capplets/about-me/mate-about-me.c index 0ef9156f..b48cbdee 100644 --- a/capplets/about-me/mate-about-me.c +++ b/capplets/about-me/mate-about-me.c @@ -26,7 +26,6 @@ #include <glib/gstdio.h> #include <gio/gio.h> #include <unistd.h> -#include <libebook/e-book.h> #include <dbus/dbus-glib-bindings.h> #define MATE_DESKTOP_USE_UNSTABLE_API @@ -39,29 +38,23 @@ #include "capplet-util.h" -#define MAX_HEIGHT 150 -#define MAX_WIDTH 150 +#define MAX_HEIGHT 100 +#define MAX_WIDTH 100 #define EMAIL_SLOTS 4 typedef struct { - EContact *contact; - EBook *book; GtkBuilder *dialog; GtkWidget *enable_fingerprint_button; GtkWidget *disable_fingerprint_button; - GtkWidget *image_chooser; + GtkWidget *image_chooser; + GdkPixbuf *image; GdkScreen *screen; GtkIconTheme *theme; MateDesktopThumbnailFactory *thumbs; - EContactAddress *addr1; - EContactAddress *addr2; - gchar *email[EMAIL_SLOTS]; - const gchar *email_types[EMAIL_SLOTS]; - gboolean have_image; gboolean image_changed; gboolean create_self; @@ -75,77 +68,6 @@ typedef struct { static MateAboutMe *me = NULL; -struct WidToCid { - gchar *wid; - guint cid; -}; - -enum { - ADDRESS_STREET = 1, - ADDRESS_POBOX, - ADDRESS_LOCALITY, - ADDRESS_CODE, - ADDRESS_REGION, - ADDRESS_COUNTRY -}; - -#define EMAIL_WORK 0 -#define EMAIL_HOME 1 -#define ADDRESS_HOME 21 -#define ADDRESS_WORK 27 - -struct WidToCid ids[] = { - - { "email-work-e", 0 }, /* 00 */ - { "email-home-e", 1 }, /* 01 */ - - { "phone-home-e", E_CONTACT_PHONE_HOME }, /* 02 */ - { "phone-mobile-e", E_CONTACT_PHONE_MOBILE }, /* 03 */ - { "phone-work-e", E_CONTACT_PHONE_BUSINESS }, /* 04 */ - { "phone-work-fax-e", E_CONTACT_PHONE_BUSINESS_FAX }, /* 05 */ - - { "im-jabber-e", E_CONTACT_IM_JABBER_HOME_1 }, /* 06 */ - { "im-msn-e", E_CONTACT_IM_MSN_HOME_1 }, /* 07 */ - { "im-icq-e", E_CONTACT_IM_ICQ_HOME_1 }, /* 08 */ - { "im-yahoo-e", E_CONTACT_IM_YAHOO_HOME_1 }, /* 09 */ - { "im-aim-e", E_CONTACT_IM_AIM_HOME_1 }, /* 10 */ - { "im-groupwise-e", E_CONTACT_IM_GROUPWISE_HOME_1 }, /* 11 */ - - { "web-homepage-e", E_CONTACT_HOMEPAGE_URL }, /* 12 */ - { "web-calendar-e", E_CONTACT_CALENDAR_URI }, /* 13 */ - { "web-weblog-e", E_CONTACT_BLOG_URL }, /* 14 */ - - { "job-profession-e", E_CONTACT_ROLE }, /* 15 */ - { "job-title-e", E_CONTACT_TITLE }, /* 16 */ - { "job-dept-e", E_CONTACT_ORG_UNIT }, /* 17 */ - { "job-assistant-e", E_CONTACT_ASSISTANT }, /* 18 */ - { "job-company-e", E_CONTACT_ORG }, /* 19 */ - { "job-manager-e", E_CONTACT_MANAGER }, /* 20 */ - - { "addr-street-1", ADDRESS_STREET }, /* 21 */ - { "addr-po-1", ADDRESS_POBOX }, /* 22 */ - { "addr-locality-1", ADDRESS_LOCALITY }, /* 23 */ - { "addr-code-1", ADDRESS_CODE }, /* 24 */ - { "addr-region-1", ADDRESS_REGION }, /* 25 */ - { "addr-country-1", ADDRESS_COUNTRY }, /* 26 */ - - { "addr-street-2", ADDRESS_STREET }, /* 27 */ - { "addr-po-2", ADDRESS_POBOX }, /* 28 */ - { "addr-locality-2", ADDRESS_LOCALITY }, /* 29 */ - { "addr-code-2", ADDRESS_CODE }, /* 30 */ - { "addr-region-2", ADDRESS_REGION }, /* 31 */ - { "addr-country-2", ADDRESS_COUNTRY }, /* 32 */ - - { NULL, 0 } -}; - -#define ATTRIBUTE_HOME "HOME" -#define ATTRIBUTE_WORK "WORK" -#define ATTRIBUTE_OTHER "OTHER" - -static void about_me_set_address_field (EContactAddress *, guint, gchar *); - - /*** Utility functions ***/ static void about_me_error (GtkWindow *parent, gchar *str) @@ -154,7 +76,7 @@ about_me_error (GtkWindow *parent, gchar *str) dialog = gtk_message_dialog_new (parent, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, - GTK_BUTTONS_OK, str); + GTK_BUTTONS_OK, "%s", str); gtk_dialog_run (GTK_DIALOG (dialog)); gtk_widget_destroy (dialog); @@ -164,20 +86,10 @@ about_me_error (GtkWindow *parent, gchar *str) static void about_me_destroy (void) { - e_contact_address_free (me->addr1); - e_contact_address_free (me->addr2); - - if (me->contact) - g_object_unref (me->contact); - if (me->book) - g_object_unref (me->book); if (me->dialog) g_object_unref (me->dialog); - - g_free (me->email[0]); - g_free (me->email[1]); - g_free (me->email[2]); - g_free (me->email[3]); + if (me->image) + g_object_unref (me->image); g_free (me->person); g_free (me->login); @@ -187,346 +99,33 @@ about_me_destroy (void) } static void -about_me_update_email (MateAboutMe *me) -{ - GList *attrs = NULL; - gint i; - - for (i = 0; i < EMAIL_SLOTS; ++i) { - if (me->email[i] != NULL) { - EVCardAttribute *attr; - const gchar *type = me->email_types[i]; - - attr = e_vcard_attribute_new (NULL, EVC_EMAIL); - - e_vcard_attribute_add_param_with_value (attr, - e_vcard_attribute_param_new (EVC_TYPE), - type ? type : ATTRIBUTE_OTHER); - - e_vcard_attribute_add_value (attr, me->email[i]); - attrs = g_list_append (attrs, attr); - } - } - - e_contact_set_attributes (me->contact, E_CONTACT_EMAIL, attrs); - - g_list_foreach (attrs, (GFunc) e_vcard_attribute_free, NULL); - g_list_free (attrs); -} - -static void -about_me_commit (MateAboutMe *me) -{ - EContactName *name; - - char *strings[4], **stringptr; - char *fileas; - - name = NULL; - - if (me->create_self) { - if (me->username == NULL) - fileas = g_strdup ("Myself"); - else { - name = e_contact_name_from_string (me->username); - - stringptr = strings; - if (name->family && *name->family) - *(stringptr++) = name->family; - if (name->given && *name->given) - *(stringptr++) = name->given; - *stringptr = NULL; - fileas = g_strjoinv (", ", strings); - } - - e_contact_set (me->contact, E_CONTACT_FILE_AS, fileas); - e_contact_set (me->contact, E_CONTACT_NICKNAME, me->login); - e_contact_set (me->contact, E_CONTACT_FULL_NAME, me->username); - - e_contact_name_free (name); - g_free (fileas); - } - - about_me_update_email (me); - - if (me->create_self) { - e_book_add_contact (me->book, me->contact, NULL); - e_book_set_self (me->book, me->contact, NULL); - } else { - if (!e_book_commit_contact (me->book, me->contact, NULL)) - g_warning ("Could not save contact information"); - } - - me->create_self = FALSE; -} - -static gboolean -about_me_commit_from_timeout (MateAboutMe *me) -{ - about_me_commit (me); - - return FALSE; -} - -static gboolean -about_me_focus_out (GtkWidget *widget, GdkEventFocus *event, MateAboutMe *unused) -{ - gchar *str; - const gchar *wid; - gint i; - - if (me == NULL) - return FALSE; - - wid = gtk_buildable_get_name (GTK_BUILDABLE (widget)); - - if (wid == NULL) - return FALSE; - - for (i = 0; ids[i].wid != NULL; i++) - if (strcmp (ids[i].wid, wid) == 0) - break; - - if (GTK_IS_ENTRY (widget)) { - str = gtk_editable_get_chars (GTK_EDITABLE (widget), 0, -1); - } else if (GTK_IS_TEXT_VIEW (widget)) { - GtkTextBuffer *buffer; - GtkTextIter iter_start; - GtkTextIter iter_end; - - buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (widget)); - gtk_text_buffer_get_start_iter (buffer, &iter_start); - iter_end = iter_start; - gtk_text_iter_forward_to_end (&iter_end); - str = gtk_text_iter_get_text (&iter_start, &iter_end); - } else { - return FALSE; - } - - if (i == EMAIL_HOME || i == EMAIL_WORK) { - - g_free (me->email[ids[i].cid]); - if (str[0] == '\0') - me->email[ids[i].cid] = NULL; - else - me->email[ids[i].cid] = g_strdup (str); - me->email_types[ids[i].cid] = (i == EMAIL_HOME) ? ATTRIBUTE_HOME : ATTRIBUTE_WORK; - /* FIXME: i'm getting an empty address field in evolution */ - } else if (i >= ADDRESS_HOME && i < ADDRESS_WORK) { - about_me_set_address_field (me->addr1, ids[i].cid, str); - e_contact_set (me->contact, E_CONTACT_ADDRESS_HOME, me->addr1); - } else if (i >= ADDRESS_WORK) { - about_me_set_address_field (me->addr2, ids[i].cid, str); - e_contact_set (me->contact, E_CONTACT_ADDRESS_WORK, me->addr2); - } else { - e_contact_set (me->contact, ids[i].cid, str); - } - - g_free (str); - - if (me->commit_timeout_id) { - g_source_remove (me->commit_timeout_id); - } - - me->commit_timeout_id = g_timeout_add (600, (GSourceFunc) about_me_commit_from_timeout, me); - - return FALSE; -} - -/* - * Helpers - */ - -static gchar * -about_me_get_address_field (EContactAddress *addr, guint cid) -{ - gchar *str; - - if (addr == NULL) { - return NULL; - } - - switch (cid) { - case ADDRESS_STREET: - str = addr->street; - break; - case ADDRESS_POBOX: - str = addr->po; - break; - case ADDRESS_LOCALITY: - str = addr->locality; - break; - case ADDRESS_CODE: - str = addr->code; - break; - case ADDRESS_REGION: - str = addr->region; - break; - case ADDRESS_COUNTRY: - str = addr->country; - break; - default: - str = NULL; - break; - } - - return str; -} - -static void -about_me_set_address_field (EContactAddress *addr, guint cid, gchar *str) -{ - switch (cid) { - case ADDRESS_STREET: - g_free (addr->street); - addr->street = g_strdup (str); - break; - case ADDRESS_POBOX: - g_free (addr->po); - addr->po = g_strdup (str); - break; - case ADDRESS_LOCALITY: - g_free (addr->locality); - addr->locality = g_strdup (str); - break; - case ADDRESS_CODE: - g_free (addr->code); - addr->code = g_strdup (str); - break; - case ADDRESS_REGION: - g_free (addr->region); - addr->region = g_strdup (str); - break; - case ADDRESS_COUNTRY: - g_free (addr->country); - addr->country = g_strdup (str); - break; - } -} - -static void -about_me_setup_email (MateAboutMe *me) -{ - GList *attrs, *la; - gboolean has_home = FALSE, has_work = FALSE; - guint i; - - attrs = e_contact_get_attributes (me->contact, E_CONTACT_EMAIL); - - for (la = attrs, i = 0; la; la = la->next, ++i) { - EVCardAttribute *a = la->data; - - me->email[i] = e_vcard_attribute_get_value (a); - if (e_vcard_attribute_has_type (a, ATTRIBUTE_HOME)) { - me->email_types[i] = ATTRIBUTE_HOME; - if (!has_home) { - ids[EMAIL_HOME].cid = i; - has_home = TRUE; - } - } else if (e_vcard_attribute_has_type (a, ATTRIBUTE_WORK)) { - me->email_types[i] = ATTRIBUTE_WORK; - if (!has_work) { - ids[EMAIL_WORK].cid = i; - has_work = TRUE; - } - } else { - me->email_types[i] = ATTRIBUTE_OTHER; - } - - e_vcard_attribute_free (a); - } - - g_list_free (attrs); - - if (ids[EMAIL_HOME].cid == ids[EMAIL_WORK].cid) { - if (has_home) - ids[EMAIL_WORK].cid = 1; - else - ids[EMAIL_HOME].cid = 0; - } - - me->email_types[ids[EMAIL_WORK].cid] = ATTRIBUTE_WORK; - me->email_types[ids[EMAIL_HOME].cid] = ATTRIBUTE_HOME; -} - -/** - * about_me_load_string_field: - * - * wid: UI widget name - * cid: id of the field (EDS id) - * aid: position in the array WidToCid - **/ - -static void -about_me_load_string_field (MateAboutMe *me, const gchar *wid, guint cid, guint aid) +about_me_load_photo (MateAboutMe *me) { - GtkWidget *widget; - GtkBuilder *dialog; - const gchar *str; - - dialog = me->dialog; - - widget = WID (wid); - - if (me->create_self == TRUE) { - g_signal_connect (widget, "focus-out-event", G_CALLBACK (about_me_focus_out), me); - return; - } - - if (aid == EMAIL_HOME || aid == EMAIL_WORK) { - str = e_contact_get_const (me->contact, E_CONTACT_EMAIL_1 + cid); - } else if (aid >= ADDRESS_HOME && aid < ADDRESS_WORK) { - str = about_me_get_address_field (me->addr1, cid); - } else if (aid >= ADDRESS_WORK) { - str = about_me_get_address_field (me->addr2, cid); - } else { - str = e_contact_get_const (me->contact, cid); - } - - str = str ? str : ""; - - if (GTK_IS_ENTRY (widget)) { - gtk_entry_set_text (GTK_ENTRY (widget), str); - } else if (GTK_IS_TEXT_VIEW (widget)) { - GtkTextBuffer *buffer; - - buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (widget)); - gtk_text_buffer_set_text (buffer, str, -1); - } - - g_signal_connect (widget, "focus-out-event", G_CALLBACK (about_me_focus_out), me); -} - -static void -about_me_load_photo (MateAboutMe *me, EContact *contact) -{ - GtkBuilder *dialog; - EContactPhoto *photo; - - dialog = me->dialog; + gchar *file; + GError *error = NULL; - if (me->person) - e_image_chooser_set_from_file (E_IMAGE_CHOOSER (me->image_chooser), me->person); + file = g_build_filename (g_get_home_dir (), ".face", NULL); + me->image = gdk_pixbuf_new_from_file(file, &error); - photo = e_contact_get (contact, E_CONTACT_PHOTO); + if (me->image != NULL) { + e_image_chooser_set_from_file (E_IMAGE_CHOOSER (me->image_chooser), file); + me->have_image = TRUE; + } else { + me->have_image = FALSE; + g_warning ("Could not load %s: %s", file, error->message); + g_error_free (error); + } - if (photo && photo->type == E_CONTACT_PHOTO_TYPE_INLINED) { - me->have_image = TRUE; - e_image_chooser_set_image_data (E_IMAGE_CHOOSER (me->image_chooser), - (char *) photo->data.inlined.data, photo->data.inlined.length); - e_contact_photo_free (photo); - } else { - me->have_image = FALSE; - } + g_free (file); } static void about_me_update_photo (MateAboutMe *me) { GtkBuilder *dialog; - EContactPhoto *photo; gchar *file; GError *error; + gboolean result; guchar *data; gsize length; @@ -536,7 +135,7 @@ about_me_update_photo (MateAboutMe *me) if (me->image_changed && me->have_image) { GdkPixbufLoader *loader = gdk_pixbuf_loader_new (); - GdkPixbuf *pixbuf, *scaled; + GdkPixbuf *pixbuf = NULL, *scaled = NULL; int height, width; gboolean do_scale = FALSE; float scale; @@ -580,20 +179,11 @@ about_me_update_photo (MateAboutMe *me) length = scaled_length; } - photo = g_new0 (EContactPhoto, 1); - photo->type = E_CONTACT_PHOTO_TYPE_INLINED; - photo->data.inlined.data = data; - photo->data.inlined.length = length; - e_contact_set (me->contact, E_CONTACT_PHOTO, photo); - /* Save the image for MDM */ /* FIXME: I would have to read the default used by the mdmgreeter program */ error = NULL; file = g_build_filename (g_get_home_dir (), ".face", NULL); - if (g_file_set_contents (file, - (gchar *) photo->data.inlined.data, - photo->data.inlined.length, - &error) != FALSE) { + if (g_file_set_contents (file, (gchar *)data, length, &error) == TRUE) { g_chmod (file, 0644); } else { g_warning ("Could not create %s: %s", file, error->message); @@ -601,44 +191,21 @@ about_me_update_photo (MateAboutMe *me) } g_free (file); - - e_contact_photo_free (photo); + g_object_unref (pixbuf); } else if (me->image_changed && !me->have_image) { /* Update the image in the card */ - e_contact_set (me->contact, E_CONTACT_PHOTO, NULL); - file = g_build_filename (g_get_home_dir (), ".face", NULL); g_unlink (file); g_free (file); } - - about_me_commit (me); } static void about_me_load_info (MateAboutMe *me) { - gint i; - - if (me->create_self == FALSE) { - me->addr1 = e_contact_get (me->contact, E_CONTACT_ADDRESS_HOME); - if (me->addr1 == NULL) - me->addr1 = g_new0 (EContactAddress, 1); - me->addr2 = e_contact_get (me->contact, E_CONTACT_ADDRESS_WORK); - if (me->addr2 == NULL) - me->addr2 = g_new0 (EContactAddress, 1); - } else { - me->addr1 = g_new0 (EContactAddress, 1); - me->addr2 = g_new0 (EContactAddress, 1); - } - - for (i = 0; ids[i].wid != NULL; i++) { - about_me_load_string_field (me, ids[i].wid, ids[i].cid, i); - } - set_fingerprint_label (me->enable_fingerprint_button, me->disable_fingerprint_button); } @@ -809,7 +376,6 @@ about_me_button_clicked_cb (GtkDialog *dialog, gint response_id, MateAboutMe *me else { if (me->commit_timeout_id) { g_source_remove (me->commit_timeout_id); - about_me_commit (me); } about_me_destroy (); @@ -842,10 +408,10 @@ about_me_setup_dialog (void) GtkIconInfo *icon; GtkBuilder *dialog; GError *error = NULL; - GList *chain; gchar *str; me = g_new0 (MateAboutMe, 1); + me->image = NULL; dialog = gtk_builder_new (); gtk_builder_add_from_file (dialog, MATECC_UI_DIR "/mate-about-me-dialog.ui", NULL); @@ -883,43 +449,11 @@ about_me_setup_dialog (void) main_dialog, G_CONNECT_SWAPPED); - /* Get the self contact */ - if (!e_book_get_self (&me->contact, &me->book, &error)) { - if (error->code == E_BOOK_ERROR_PROTOCOL_NOT_SUPPORTED) { - about_me_error (NULL, _("There was an error while trying to get the addressbook information\n" \ - "Evolution Data Server can't handle the protocol")); - g_clear_error (&error); - about_me_destroy (); - return -1; - } - - g_clear_error (&error); - - me->create_self = TRUE; - me->contact = e_contact_new (); - - if (me->book == NULL) { - me->book = e_book_new_system_addressbook (&error); - if (me->book == NULL || error != NULL) { - g_error ("%s", error->message); - g_clear_error (&error); - } - - if (e_book_open (me->book, FALSE, NULL) == FALSE) { - about_me_error (GTK_WINDOW (main_dialog), - _("Unable to open address book")); - g_clear_error (&error); - } - } - } else { - about_me_setup_email (me); - } - me->login = g_strdup (g_get_user_name ()); me->username = g_strdup (g_get_real_name ()); /* Contact Tab */ - about_me_load_photo (me, me->contact); + about_me_load_photo (me); widget = WID ("fullname"); str = g_strdup_printf ("<b><span size=\"xx-large\">%s</span></b>", me->username); @@ -953,27 +487,6 @@ about_me_setup_dialog (void) g_signal_connect (me->image_chooser, "changed", G_CALLBACK (about_me_image_changed_cb), me); - /* Address tab: set up the focus chains */ - chain = g_list_prepend (NULL, WID ("addr-country-1")); - chain = g_list_prepend (chain, WID ("addr-po-1")); - chain = g_list_prepend (chain, WID ("addr-region-1")); - chain = g_list_prepend (chain, WID ("addr-code-1")); - chain = g_list_prepend (chain, WID ("addr-locality-1")); - chain = g_list_prepend (chain, WID ("addr-scrolledwindow-1")); - widget = WID ("addr-table-1"); - gtk_container_set_focus_chain (GTK_CONTAINER (widget), chain); - g_list_free (chain); - - chain = g_list_prepend (NULL, WID ("addr-country-2")); - chain = g_list_prepend (chain, WID ("addr-po-2")); - chain = g_list_prepend (chain, WID ("addr-region-2")); - chain = g_list_prepend (chain, WID ("addr-code-2")); - chain = g_list_prepend (chain, WID ("addr-locality-2")); - chain = g_list_prepend (chain, WID ("addr-scrolledwindow-2")); - widget = WID ("addr-table-2"); - gtk_container_set_focus_chain (GTK_CONTAINER (widget), chain); - g_list_free (chain); - about_me_load_info (me); gtk_widget_show_all (main_dialog); |