diff options
author | Milan Crha <mcrha@redhat.com> | 2009-04-24 17:45:21 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2009-04-24 17:45:21 +0800 |
commit | 8a072ffc7c0ddcde472877a51ace0bb14f86fb0a (patch) | |
tree | 5c49c7807f24cd118e32e11ad52482b0ce65d0e6 | |
parent | f6792a6f1e60b04ee1c137c9232802df437580f6 (diff) | |
download | gsoc2013-evolution-8a072ffc7c0ddcde472877a51ace0bb14f86fb0a.tar.gz gsoc2013-evolution-8a072ffc7c0ddcde472877a51ace0bb14f86fb0a.tar.zst gsoc2013-evolution-8a072ffc7c0ddcde472877a51ace0bb14f86fb0a.zip |
GN-bug #572348 - Removed deprecated Gtk+ symbols
Some still left, because those gone in kill-bonobo branch.
81 files changed, 2868 insertions, 6349 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index 78b54abb78..55337e64a7 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,30 @@ +2009-04-24 Milan Crha <mcrha@redhat.com> + + ** Fix for bug #572348 + + * gui/component/ldap-config.glade: + * gui/contact-editor/fullname.glade: + * gui/contact-editor/contact-editor.glade: + * gui/contact-editor/e-contact-editor.c: + * gui/contact-editor/e-contact-editor-fullname.c: + * gui/component/addressbook-config.c: + * conduit/address-conduit.c: + Remove deprecated Gtk+ symbols. + + * gui/contact-editor/Makefile.am: + * gui/contact-editor/im.glade: + * gui/contact-editor/e-contact-editor-im.h: + * gui/contact-editor/e-contact-editor-im.c: + * gui/contact-editor/fulladdr.glade: + * gui/contact-editor/e-contact-editor-address.h: + * gui/contact-editor/e-contact-editor-address.c: + * printing/Makefile.am: + * printing/e-contact-print.glade: + * printing/e-contact-print-style-editor.h: + * printing/e-contact-print-style-editor.c: + * printing/test-contact-print-style-editor.c: + Remove death files. + 2009-02-26 Matthew Barnes <mbarnes@redhat.com> ** Fixes part of bug #572950 diff --git a/addressbook/conduit/address-conduit.c b/addressbook/conduit/address-conduit.c index e80d1c346e..4cf0c126d7 100644 --- a/addressbook/conduit/address-conduit.c +++ b/addressbook/conduit/address-conduit.c @@ -475,7 +475,7 @@ static EAddrConduitGui * e_addr_gui_new (EPilotSettings *ps) { EAddrConduitGui *gui; - GtkWidget *lbl, *menu; + GtkWidget *lbl; gint rows, i; static const char *items[] = {"Business", "Home", "Other", NULL}; @@ -490,18 +490,10 @@ e_addr_gui_new (EPilotSettings *ps) rows = E_PILOT_SETTINGS_TABLE_ROWS; lbl = gtk_label_new (_("Default Sync Address:")); gtk_misc_set_alignment (GTK_MISC (lbl), 0.0, 0.5); - gui->default_address = gtk_option_menu_new (); - menu = gtk_menu_new (); + gui->default_address = gtk_combo_box_new_text (); for (i = 0; items[i] != NULL; i++) { - GtkWidget *item; - - item = gtk_menu_item_new_with_label (items[i]); - gtk_widget_show (item); - - gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); + gtk_combo_box_append_text (GTK_COMBO_BOX (gui->default_address), items[i]); } - gtk_widget_show (menu); - gtk_option_menu_set_menu (GTK_OPTION_MENU (gui->default_address), menu); gtk_table_attach_defaults (GTK_TABLE (ps), lbl, 0, 1, rows, rows + 1); gtk_table_attach_defaults (GTK_TABLE (ps), gui->default_address, 1, 2, rows, rows + 1); gtk_widget_show (lbl); @@ -523,9 +515,9 @@ e_addr_gui_fill_widgets (EAddrConduitGui *gui, EAddrConduitCfg *cfg) g_return_if_fail (gui != NULL); g_return_if_fail (cfg != NULL); - e_dialog_option_menu_set (gui->default_address, - cfg->default_address, - default_address_map); + e_dialog_combo_box_set (gui->default_address, + cfg->default_address, + default_address_map); } static void @@ -534,8 +526,8 @@ e_addr_gui_fill_config (EAddrConduitGui *gui, EAddrConduitCfg *cfg) g_return_if_fail (gui != NULL); g_return_if_fail (cfg != NULL); - cfg->default_address = e_dialog_option_menu_get (gui->default_address, - default_address_map); + cfg->default_address = e_dialog_combo_box_get (gui->default_address, + default_address_map); } static void diff --git a/addressbook/gui/component/addressbook-config.c b/addressbook/gui/component/addressbook-config.c index bfa91cea47..1f0fa57847 100644 --- a/addressbook/gui/component/addressbook-config.c +++ b/addressbook/gui/component/addressbook-config.c @@ -99,7 +99,6 @@ struct _AddressbookSourceDialog { /* Source selection (druid only) */ ESourceList *source_list; GSList *menu_source_groups; - GtkWidget *group_optionmenu; /* ESource we're currently editing */ ESource *source; @@ -111,19 +110,19 @@ struct _AddressbookSourceDialog { /* info page fields */ GtkWidget *host; - GtkWidget *auth_optionmenu; + GtkWidget *auth_combobox; AddressbookLDAPAuthType auth; GtkWidget *auth_principal; /* connecting page fields */ - GtkWidget *port_combo; - GtkWidget *ssl_optionmenu; + GtkWidget *port_comboentry; + GtkWidget *ssl_combobox; AddressbookLDAPSSLType ssl; /* searching page fields */ GtkWidget *rootdn; AddressbookLDAPScopeType scope; - GtkWidget *scope_optionmenu; + GtkWidget *scope_combobox; GtkWidget *search_filter; GtkWidget *timeout_scale; GtkWidget *limit_spinbutton; @@ -210,6 +209,21 @@ ldap_parse_ssl (const char *ssl) return ADDRESSBOOK_LDAP_SSL_WHENEVER_POSSIBLE; } +static const char * +ldap_get_ssl_tooltip (AddressbookLDAPSSLType ssl_type) +{ + switch (ssl_type) { + case ADDRESSBOOK_LDAP_SSL_ALWAYS: + return _("Selecting this option means that Evolution will only connect to your LDAP server if your LDAP server supports SSL."); + case ADDRESSBOOK_LDAP_SSL_WHENEVER_POSSIBLE: + return _("Selecting this option means that Evolution will only connect to your LDAP server if your LDAP server supports TLS."); + case ADDRESSBOOK_LDAP_SSL_NEVER: + return _("Selecting this option means that your server does not support either SSL or TLS. This means that your connection will be insecure, and that you will be vulnerable to security exploits."); + } + + return NULL; +} + static gboolean source_to_uri_parts (ESource *source, gchar **host, gchar **rootdn, AddressbookLDAPScopeType *scope, gchar **search_filter, gint *port) { @@ -669,7 +683,7 @@ url_changed(AddressbookSourceDialog *sdialog) search_filter = form_ldap_search_filter (sdialog->search_filter); str = g_strdup_printf ("%s:%s/%s?" /* trigraph prevention */ "?%s?%s", gtk_entry_get_text (GTK_ENTRY (sdialog->host)), - gtk_entry_get_text (GTK_ENTRY (GTK_COMBO (sdialog->port_combo)->entry)), + gtk_entry_get_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (sdialog->port_comboentry)))), gtk_entry_get_text (GTK_ENTRY (sdialog->rootdn)), ldap_unparse_scope (sdialog->scope), search_filter); @@ -691,20 +705,22 @@ port_entry_changed_cb(GtkWidget *w, AddressbookSourceDialog *sdialog) if (!strcmp (port, LDAPS_PORT_STRING)) { sdialog->ssl = ADDRESSBOOK_LDAP_SSL_ALWAYS; - gtk_option_menu_set_history (GTK_OPTION_MENU(sdialog->ssl_optionmenu), sdialog->ssl); - gtk_widget_set_sensitive (sdialog->ssl_optionmenu, FALSE); + gtk_combo_box_set_active (GTK_COMBO_BOX (sdialog->ssl_combobox), sdialog->ssl); + gtk_widget_set_sensitive (sdialog->ssl_combobox, FALSE); } else { - gtk_widget_set_sensitive (sdialog->ssl_optionmenu, TRUE); + gtk_widget_set_sensitive (sdialog->ssl_combobox, TRUE); } url_changed(sdialog); } static void -ssl_optionmenu_changed_cb(GtkWidget *w, AddressbookSourceDialog *sdialog) +ssl_combobox_changed_cb(GtkWidget *w, AddressbookSourceDialog *sdialog) { - sdialog->ssl = gtk_option_menu_get_history((GtkOptionMenu *)w); + sdialog->ssl = gtk_combo_box_get_active (GTK_COMBO_BOX (w)); e_source_set_property (sdialog->source, "ssl", ldap_unparse_ssl (sdialog->ssl)); + + gtk_widget_set_tooltip_text (sdialog->ssl_combobox, ldap_get_ssl_tooltip (sdialog->ssl)); } @@ -740,20 +756,24 @@ eabc_general_host(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, str gtk_entry_set_text((GtkEntry *)sdialog->host, lud && lud->lud_host ? lud->lud_host : ""); g_signal_connect (sdialog->host, "changed", G_CALLBACK (host_changed_cb), sdialog); - sdialog->port_combo = glade_xml_get_widget (gui, "port-combo"); + sdialog->port_comboentry = glade_xml_get_widget (gui, "port-comboentry"); + gtk_widget_set_has_tooltip (sdialog->port_comboentry, TRUE); + gtk_widget_set_tooltip_text (sdialog->port_comboentry, _("This is the port on the LDAP server that Evolution will try to connect to. A list of standard ports has been provided. Ask your system administrator what port you should specify.")); sprintf(port, "%u", lud && lud->lud_port? lud->lud_port : LDAP_PORT); - gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (sdialog->port_combo)->entry), port); - g_signal_connect (GTK_COMBO(sdialog->port_combo)->entry, "changed", G_CALLBACK (port_entry_changed_cb), sdialog); + gtk_entry_set_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (sdialog->port_comboentry))), port); + g_signal_connect (gtk_bin_get_child (GTK_BIN (sdialog->port_comboentry)), "changed", G_CALLBACK (port_entry_changed_cb), sdialog); if (lud) ldap_free_urldesc (lud); - sdialog->ssl_optionmenu = glade_xml_get_widget (gui, "ssl-optionmenu"); + sdialog->ssl_combobox = glade_xml_get_widget (gui, "ssl-combobox"); + gtk_widget_set_has_tooltip (sdialog->ssl_combobox, TRUE); tmp = e_source_get_property (sdialog->source, "ssl"); sdialog->ssl = tmp ? ldap_parse_ssl (tmp) : ADDRESSBOOK_LDAP_SSL_WHENEVER_POSSIBLE; - gtk_option_menu_set_history (GTK_OPTION_MENU(sdialog->ssl_optionmenu), sdialog->ssl); - gtk_widget_set_sensitive (sdialog->ssl_optionmenu, strcmp (port, LDAPS_PORT_STRING) != 0); - g_signal_connect(sdialog->ssl_optionmenu, "changed", G_CALLBACK(ssl_optionmenu_changed_cb), sdialog); + gtk_combo_box_set_active (GTK_COMBO_BOX (sdialog->ssl_combobox), sdialog->ssl); + gtk_widget_set_tooltip_text (sdialog->ssl_combobox, ldap_get_ssl_tooltip (sdialog->ssl)); + gtk_widget_set_sensitive (sdialog->ssl_combobox, strcmp (port, LDAPS_PORT_STRING) != 0); + g_signal_connect (sdialog->ssl_combobox, "changed", G_CALLBACK (ssl_combobox_changed_cb), sdialog); g_object_unref(gui); @@ -784,9 +804,9 @@ auth_entry_changed_cb(GtkWidget *w, AddressbookSourceDialog *sdialog) } static void -auth_optionmenu_changed_cb(GtkWidget *w, AddressbookSourceDialog *sdialog) +auth_combobox_changed_cb(GtkWidget *w, AddressbookSourceDialog *sdialog) { - sdialog->auth = gtk_option_menu_get_history((GtkOptionMenu *)w); + sdialog->auth = gtk_combo_box_get_active (GTK_COMBO_BOX (w)); e_source_set_property (sdialog->source, "auth", ldap_unparse_auth (sdialog->auth)); /* make sure the right property is set for the auth - ugh, funny api */ @@ -814,11 +834,13 @@ eabc_general_auth(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, str w = glade_xml_get_widget(gui, item->label); gtk_box_pack_start((GtkBox *)parent, w, FALSE, FALSE, 0); - sdialog->auth_optionmenu = glade_xml_get_widget (gui, "auth-optionmenu"); + sdialog->auth_combobox = glade_xml_get_widget (gui, "auth-combobox"); + gtk_widget_set_has_tooltip (sdialog->auth_combobox, TRUE); + gtk_widget_set_tooltip_text (sdialog->auth_combobox, _("This is the method Evolution will use to authenticate you. Note that setting this to \"Email Address\" requires anonymous access to your LDAP server.")); tmp = e_source_get_property(sdialog->source, "auth"); sdialog->auth = tmp ? ldap_parse_auth(tmp) : ADDRESSBOOK_LDAP_AUTH_NONE; - gtk_option_menu_set_history (GTK_OPTION_MENU(sdialog->auth_optionmenu), sdialog->auth); - g_signal_connect(sdialog->auth_optionmenu, "changed", G_CALLBACK(auth_optionmenu_changed_cb), sdialog); + gtk_combo_box_set_active (GTK_COMBO_BOX (sdialog->auth_combobox), sdialog->auth); + g_signal_connect (sdialog->auth_combobox, "changed", G_CALLBACK(auth_combobox_changed_cb), sdialog); sdialog->auth_principal = glade_xml_get_widget (gui, "auth-entry"); switch (sdialog->auth) { @@ -854,9 +876,9 @@ search_filter_changed_cb (GtkWidget *w, AddressbookSourceDialog *sdialog) } static void -scope_optionmenu_changed_cb(GtkWidget *w, AddressbookSourceDialog *sdialog) +scope_combobox_changed_cb(GtkWidget *w, AddressbookSourceDialog *sdialog) { - sdialog->scope = gtk_option_menu_get_history((GtkOptionMenu *)w); + sdialog->scope = gtk_combo_box_get_active (GTK_COMBO_BOX (w)); url_changed(sdialog); } @@ -891,7 +913,9 @@ eabc_details_search(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, s gtk_entry_set_text((GtkEntry *)sdialog->rootdn, lud && lud->lud_dn ? lud->lud_dn : ""); g_signal_connect (sdialog->rootdn, "changed", G_CALLBACK (rootdn_changed_cb), sdialog); - sdialog->scope_optionmenu = glade_xml_get_widget (gui, "scope-optionmenu"); + sdialog->scope_combobox = glade_xml_get_widget (gui, "scope-combobox"); + gtk_widget_set_has_tooltip (sdialog->scope_combobox, TRUE); + gtk_widget_set_tooltip_text (sdialog->scope_combobox, _("The search scope defines how deep you would like the search to extend down the directory tree. A search scope of \"sub\" will include all entries below your search base. A search scope of \"one\" will only include the entries one level beneath your base.")); if (lud) { switch (lud->lud_scope) { case LDAP_SCOPE_BASE: @@ -906,8 +930,8 @@ eabc_details_search(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, s break; } } - gtk_option_menu_set_history (GTK_OPTION_MENU(sdialog->scope_optionmenu), sdialog->scope); - g_signal_connect(sdialog->scope_optionmenu, "changed", G_CALLBACK(scope_optionmenu_changed_cb), sdialog); + gtk_combo_box_set_active (GTK_COMBO_BOX (sdialog->scope_combobox), sdialog->scope); + g_signal_connect (sdialog->scope_combobox, "changed", G_CALLBACK(scope_combobox_changed_cb), sdialog); sdialog->search_filter = glade_xml_get_widget (gui, "search-filter-entry"); gtk_entry_set_text((GtkEntry *)sdialog->search_filter, lud && lud->lud_filter ? lud->lud_filter : ""); diff --git a/addressbook/gui/component/ldap-config.glade b/addressbook/gui/component/ldap-config.glade index 2cf886b914..cc1fbd0174 100644 --- a/addressbook/gui/component/ldap-config.glade +++ b/addressbook/gui/component/ldap-config.glade @@ -17,6 +17,7 @@ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property> <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> <property name="focus_on_map">True</property> + <property name="urgency_hint">False</property> <property name="has_separator">False</property> <child internal-child="vbox"> @@ -85,7 +86,7 @@ <child> <widget class="GtkLabel" id="label564"> <property name="visible">True</property> - <property name="label" translatable="no">Display</property> + <property name="label">Display</property> <property name="use_underline">False</property> <property name="use_markup">True</property> <property name="justify">GTK_JUSTIFY_LEFT</property> @@ -199,7 +200,7 @@ <child> <widget class="GtkLabel" id="label557"> <property name="visible">True</property> - <property name="label" translatable="no">Server Information</property> + <property name="label">Server Information</property> <property name="use_underline">False</property> <property name="use_markup">True</property> <property name="justify">GTK_JUSTIFY_LEFT</property> @@ -274,7 +275,6 @@ <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> - <property name="mnemonic_widget">entry27</property> <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> <property name="width_chars">-1</property> <property name="single_line_mode">False</property> @@ -338,7 +338,7 @@ <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> - <property name="mnemonic_widget">ssl-optionmenu</property> + <property name="mnemonic_widget">ssl-combobox</property> <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> <property name="width_chars">-1</property> <property name="single_line_mode">False</property> @@ -352,43 +352,13 @@ </child> <child> - <widget class="GtkOptionMenu" id="ssl-optionmenu"> + <widget class="GtkComboBox" id="ssl-combobox"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">0</property> - - <child internal-child="menu"> - <widget class="GtkMenu" id="convertwidget41"> - <property name="visible">True</property> - - <child> - <widget class="GtkMenuItem" id="convertwidget42"> - <property name="visible">True</property> - <property name="tooltip" translatable="yes">Selecting this option means that Evolution will only connect to your LDAP server if your LDAP server supports SSL.</property> - <property name="label" translatable="yes">SSL encryption</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget43"> - <property name="visible">True</property> - <property name="tooltip" translatable="yes">Selecting this option means that Evolution will only connect to your LDAP server if your LDAP server supports TLS.</property> - <property name="label" translatable="yes">TLS encryption</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget44"> - <property name="visible">True</property> - <property name="tooltip" translatable="yes">Selecting this option means that your server does not support either SSL or TLS. This means that your connection will be insecure, and that you will be vulnerable to security exploits.</property> - <property name="label" translatable="yes">No encryption</property> - <property name="use_underline">True</property> - </widget> - </child> - </widget> - </child> + <property name="items" translatable="yes">SSL encryption +TLS encryption +No encryption</property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> </widget> <packing> <property name="padding">0</property> @@ -408,71 +378,6 @@ </child> <child> - <widget class="GtkCombo" id="port-combo"> - <property name="visible">True</property> - <property name="value_in_list">False</property> - <property name="allow_empty">True</property> - <property name="case_sensitive">False</property> - <property name="enable_arrow_keys">True</property> - <property name="enable_arrows_always">False</property> - - <child internal-child="entry"> - <widget class="GtkEntry" id="entry27"> - <property name="visible">True</property> - <property name="tooltip" translatable="yes">This is the port on the LDAP server that Evolution will try to connect to. A list of standard ports has been provided. Ask your system administrator what port you should specify.</property> - <property name="can_focus">True</property> - <property name="has_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> - </child> - - <child internal-child="list"> - <widget class="GtkList" id="convertwidget32"> - <property name="visible">True</property> - <property name="selection_mode">GTK_SELECTION_BROWSE</property> - - <child> - <widget class="GtkListItem" id="listitem16"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label">389</property> - </widget> - </child> - - <child> - <widget class="GtkListItem" id="listitem17"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label">636</property> - </widget> - </child> - - <child> - <widget class="GtkListItem" id="listitem18"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label">3268</property> - </widget> - </child> - </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="GtkEntry" id="server-name-entry"> <property name="visible">True</property> <property name="tooltip" translatable="yes">This is the full name of your LDAP server. For example, "ldap.mycompany.com".</property> @@ -494,6 +399,26 @@ <property name="y_options"></property> </packing> </child> + + <child> + <widget class="GtkComboBoxEntry" id="port-comboentry"> + <property name="visible">True</property> + <property name="items" translatable="yes">389 +636 +3268</property> + <property name="add_tearoffs">False</property> + <property name="has_frame">True</property> + <property name="focus_on_click">True</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="x_options">fill</property> + <property name="y_options">fill</property> + </packing> + </child> </widget> <packing> <property name="padding">0</property> @@ -587,7 +512,6 @@ <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> - <property name="mnemonic_widget">auth-optionmenu</property> <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> <property name="width_chars">-1</property> <property name="single_line_mode">False</property> @@ -633,53 +557,6 @@ </child> <child> - <widget class="GtkOptionMenu" id="auth-optionmenu"> - <property name="visible">True</property> - <property name="tooltip" translatable="yes">This is the method Evolution will use to authenticate you. Note that setting this to "Email Address" requires anonymous access to your LDAP server.</property> - <property name="can_focus">True</property> - <property name="history">0</property> - - <child internal-child="menu"> - <widget class="GtkMenu" id="convertwidget28"> - <property name="visible">True</property> - - <child> - <widget class="GtkMenuItem" id="convertwidget29"> - <property name="visible">True</property> - <property name="label" translatable="yes">Anonymously</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget30"> - <property name="visible">True</property> - <property name="label" translatable="yes">Using email address</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget31"> - <property name="visible">True</property> - <property name="label" translatable="yes">Using distinguished name (DN)</property> - <property name="use_underline">True</property> - </widget> - </child> - </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="x_options">expand|shrink|fill</property> - <property name="y_options">shrink</property> - </packing> - </child> - - <child> <widget class="GtkEntry" id="auth-entry"> <property name="visible">True</property> <property name="tooltip" translatable="yes">Evolution will use this email address to authenticate you with the server.</property> @@ -700,6 +577,25 @@ <property name="y_options"></property> </packing> </child> + + <child> + <widget class="GtkComboBox" id="auth-combobox"> + <property name="visible">True</property> + <property name="items" translatable="yes">Anonymously +Using email address +Using distinguished name (DN)</property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</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="x_options">shrink|fill</property> + <property name="y_options">shrink|fill</property> + </packing> + </child> </widget> <packing> <property name="padding">0</property> @@ -892,7 +788,6 @@ <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> - <property name="mnemonic_widget">scope-optionmenu</property> <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> <property name="width_chars">-1</property> <property name="single_line_mode">False</property> @@ -909,44 +804,6 @@ </child> <child> - <widget class="GtkOptionMenu" id="scope-optionmenu"> - <property name="visible">True</property> - <property name="tooltip" translatable="yes">The search scope defines how deep you would like the search to extend down the directory tree. A search scope of "sub" will include all entries below your search base. A search scope of "one" will only include the entries one level beneath your base.</property> - <property name="can_focus">True</property> - <property name="history">0</property> - - <child> - <widget class="GtkMenu" id="menu12"> - - <child> - <widget class="GtkMenuItem" id="menuitem7"> - <property name="visible">True</property> - <property name="label" translatable="yes">One</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="menuitem8"> - <property name="visible">True</property> - <property name="label" translatable="yes">Sub</property> - <property name="use_underline">True</property> - </widget> - </child> - </widget> - </child> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">3</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_options">expand|shrink|fill</property> - <property name="y_options">shrink|fill</property> - </packing> - </child> - - <child> <widget class="GtkEntry" id="rootdn-entry"> <property name="visible">True</property> <property name="tooltip" translatable="yes">The search base is the distinguished name (DN) of the entry where your searches will begin. If you leave this blank, the search will begin at the root of the directory tree.</property> @@ -1105,6 +962,24 @@ <property name="y_options">shrink|fill</property> </packing> </child> + + <child> + <widget class="GtkComboBox" id="scope-combobox"> + <property name="visible">True</property> + <property name="items" translatable="yes">One +Sub</property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">3</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="x_options">shrink|fill</property> + <property name="y_options">shrink|fill</property> + </packing> + </child> </widget> <packing> <property name="padding">0</property> @@ -1496,6 +1371,7 @@ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property> <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> <property name="focus_on_map">True</property> + <property name="urgency_hint">False</property> <property name="has_separator">False</property> <child internal-child="vbox"> @@ -1575,1475 +1451,4 @@ </child> </widget> -<widget class="GtkDialog" id="account-add-window"> - <property name="visible">True</property> - <property name="title" translatable="yes">Add Address Book</property> - <property name="type">GTK_WINDOW_TOPLEVEL</property> - <property name="window_position">GTK_WIN_POS_NONE</property> - <property name="modal">False</property> - <property name="resizable">True</property> - <property name="destroy_with_parent">False</property> - <property name="decorated">True</property> - <property name="skip_taskbar_hint">False</property> - <property name="skip_pager_hint">False</property> - <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property> - <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> - <property name="focus_on_map">True</property> - <property name="has_separator">False</property> - - <child internal-child="vbox"> - <widget class="GtkVBox" id="dialog-vbox10"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> - - <child internal-child="action_area"> - <widget class="GtkHButtonBox" id="dialog-action_area10"> - <property name="visible">True</property> - <property name="layout_style">GTK_BUTTONBOX_END</property> - - <child> - <widget class="GtkButton" id="cancel-button"> - <property name="visible">True</property> - <property name="can_default">True</property> - <property name="can_focus">True</property> - <property name="label">gtk-cancel</property> - <property name="use_stock">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <property name="response_id">-6</property> - </widget> - </child> - - <child> - <widget class="GtkButton" id="ok-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> - <property name="response_id">0</property> - - <child> - <widget class="GtkAlignment" id="alignment62"> - <property name="visible">True</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</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="hbox129"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">2</property> - - <child> - <widget class="GtkImage" id="image11"> - <property name="visible">True</property> - <property name="stock">gtk-add</property> - <property name="icon_size">4</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</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="label580"> - <property name="visible">True</property> - <property name="label" translatable="yes">_Add Address Book</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.5</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> - <property name="pack_type">GTK_PACK_END</property> - </packing> - </child> - - <child> - <widget class="GtkNotebook" id="notebook1"> - <property name="border_width">12</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="show_tabs">True</property> - <property name="show_border">True</property> - <property name="tab_pos">GTK_POS_TOP</property> - <property name="scrollable">False</property> - <property name="enable_popup">False</property> - - <child> - <widget class="GtkVBox" id="vbox5"> - <property name="border_width">12</property> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">12</property> - - <child> - <widget class="GtkHBox" id="hbox19"> - <property name="border_width">6</property> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">6</property> - - <child> - <widget class="GtkLabel" id="label64"> - <property name="visible">True</property> - <property name="label" translatable="yes"><b>Type:</b></property> - <property name="use_underline">False</property> - <property name="use_markup">True</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</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> - - <child> - <widget class="GtkOptionMenu" id="group-optionmenu"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">-1</property> - - <child> - <widget class="GtkMenu" id="menu11"> - </widget> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkFrame" id="frame1"> - <property name="visible">True</property> - <property name="label_xalign">0</property> - <property name="label_yalign">0.5</property> - <property name="shadow_type">GTK_SHADOW_NONE</property> - - <child> - <widget class="GtkTable" id="table7"> - <property name="border_width">12</property> - <property name="visible">True</property> - <property name="n_rows">1</property> - <property name="n_columns">2</property> - <property name="homogeneous">False</property> - <property name="row_spacing">6</property> - <property name="column_spacing">6</property> - - <child> - <widget class="GtkEntry" id="display-name-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="label41"> - <property name="visible">True</property> - <property name="label" translatable="yes">_Name:</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="mnemonic_widget">display-name-entry</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> - </widget> - </child> - - <child> - <widget class="GtkLabel" id="label38"> - <property name="visible">True</property> - <property name="label" translatable="no">Display</property> - <property name="use_underline">False</property> - <property name="use_markup">True</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</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="type">label_item</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkFrame" id="server-frame"> - <property name="visible">True</property> - <property name="label_xalign">0</property> - <property name="label_yalign">0.5</property> - <property name="shadow_type">GTK_SHADOW_NONE</property> - - <child> - <widget class="GtkTable" id="table8"> - <property name="border_width">12</property> - <property name="visible">True</property> - <property name="n_rows">3</property> - <property name="n_columns">2</property> - <property name="homogeneous">False</property> - <property name="row_spacing">6</property> - <property name="column_spacing">6</property> - - <child> - <widget class="GtkEntry" id="server-name-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="label44"> - <property name="visible">True</property> - <property name="label" translatable="yes">_Port:</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="mnemonic_widget">port-entry</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">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkCombo" id="port-combo"> - <property name="visible">True</property> - <property name="value_in_list">False</property> - <property name="allow_empty">True</property> - <property name="case_sensitive">False</property> - <property name="enable_arrow_keys">True</property> - <property name="enable_arrows_always">False</property> - - <child internal-child="entry"> - <widget class="GtkEntry" id="port-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> - </child> - - <child internal-child="list"> - <widget class="GtkList" id="combo-list1"> - <property name="visible">True</property> - <property name="selection_mode">GTK_SELECTION_BROWSE</property> - - <child> - <widget class="GtkListItem" id="listitem11"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">389</property> - </widget> - </child> - - <child> - <widget class="GtkListItem" id="listitem12"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">636</property> - </widget> - </child> - - <child> - <widget class="GtkListItem" id="listitem13"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">3268</property> - </widget> - </child> - </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="GtkHBox" id="hbox15"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">6</property> - - <child> - <widget class="GtkLabel" id="label50"> - <property name="visible">True</property> - <property name="label" translatable="yes">_Use secure connection:</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.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="mnemonic_widget">ssl-optionmenu</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> - - <child> - <widget class="GtkOptionMenu" id="ssl-optionmenu"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">0</property> - - <child> - <widget class="GtkMenu" id="menu9"> - - <child> - <widget class="GtkMenuItem" id="always1"> - <property name="visible">True</property> - <property name="label" translatable="yes">Always</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_always1_activate" last_modification_time="Mon, 29 Mar 2004 21:37:12 GMT"/> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id=""> - <property name="visible">True</property> - <property name="label" translatable="yes">Whenever Possible</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_whenever_possible1_activate" last_modification_time="Mon, 29 Mar 2004 21:37:12 GMT"/> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="never1"> - <property name="visible">True</property> - <property name="label" translatable="yes">Never</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_never1_activate" last_modification_time="Mon, 29 Mar 2004 21:37:12 GMT"/> - </widget> - </child> - </widget> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - </widget> - <packing> - <property name="left_attach">0</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> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="server-name-label"> - <property name="visible">True</property> - <property name="label" translatable="yes">_Server:</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="mnemonic_widget">server-name-entry</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> - </widget> - </child> - - <child> - <widget class="GtkLabel" id="label39"> - <property name="visible">True</property> - <property name="label" translatable="no">Server Information</property> - <property name="use_underline">False</property> - <property name="use_markup">True</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</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="type">label_item</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkFrame" id="authentication-frame"> - <property name="visible">True</property> - <property name="label_xalign">0</property> - <property name="label_yalign">0.5</property> - <property name="shadow_type">GTK_SHADOW_NONE</property> - - <child> - <widget class="GtkTable" id="table9"> - <property name="border_width">12</property> - <property name="visible">True</property> - <property name="n_rows">2</property> - <property name="n_columns">2</property> - <property name="homogeneous">False</property> - <property name="row_spacing">6</property> - <property name="column_spacing">6</property> - - <child> - <widget class="GtkLabel" id="label46"> - <property name="visible">True</property> - <property name="label" translatable="yes">_Login method:</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="mnemonic_widget">auth-optionmenu</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="label47"> - <property name="visible">True</property> - <property name="label" translatable="yes">Lo_gin:</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="mnemonic_widget">auth-entry</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">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkEntry" id="auth-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">1</property> - <property name="bottom_attach">2</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkOptionMenu" id="auth-optionmenu"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">0</property> - - <child> - <widget class="GtkMenu" id="menu8"> - - <child> - <widget class="GtkMenuItem" id="anonymously1"> - <property name="visible">True</property> - <property name="label" translatable="yes">Anonymously</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_anonymously1_activate" last_modification_time="Mon, 29 Mar 2004 21:27:10 GMT"/> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="email_address2"> - <property name="visible">True</property> - <property name="label" translatable="yes">Email address</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_email_address2_activate" last_modification_time="Mon, 29 Mar 2004 21:27:10 GMT"/> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="distinguished_name2"> - <property name="visible">True</property> - <property name="label" translatable="yes">Distinguished name</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_distinguished_name2_activate" last_modification_time="Mon, 29 Mar 2004 21:27:10 GMT"/> - </widget> - </child> - </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="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - </widget> - </child> - - <child> - <widget class="GtkLabel" id="label49"> - <property name="visible">True</property> - <property name="label" translatable="yes"><b>Authentication</b></property> - <property name="use_underline">False</property> - <property name="use_markup">True</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</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="type">label_item</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - </widget> - <packing> - <property name="tab_expand">False</property> - <property name="tab_fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="basic-label"> - <property name="visible">True</property> - <property name="label" translatable="yes">Basic</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.5</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="type">tab</property> - </packing> - </child> - - <child> - <widget class="GtkVBox" id="details-vbox"> - <property name="border_width">12</property> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">12</property> - - <child> - <widget class="GtkFrame" id="searching-frame"> - <property name="visible">True</property> - <property name="label_xalign">0</property> - <property name="label_yalign">0.5</property> - <property name="shadow_type">GTK_SHADOW_NONE</property> - - <child> - <widget class="GtkTable" id="table10"> - <property name="border_width">12</property> - <property name="visible">True</property> - <property name="n_rows">4</property> - <property name="n_columns">3</property> - <property name="homogeneous">False</property> - <property name="row_spacing">6</property> - <property name="column_spacing">6</property> - - <child> - <widget class="GtkLabel" id="label53"> - <property name="visible">True</property> - <property name="label" translatable="yes">Search _base:</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="mnemonic_widget">rootdn-entry</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="label54"> - <property name="visible">True</property> - <property name="label" translatable="yes">_Search scope:</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="mnemonic_widget">scope-optionmenu</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="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkEntry" id="rootdn-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">3</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkButton" id="rootdn-button"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - - <child> - <widget class="GtkAlignment" id="alignment13"> - <property name="visible">True</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</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="hbox16"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">2</property> - - <child> - <widget class="GtkImage" id="image9"> - <property name="visible">True</property> - <property name="stock">gtk-find</property> - <property name="icon_size">4</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</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="label57"> - <property name="visible">True</property> - <property name="label" translatable="yes">Find Possible Search Bases</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.5</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> - <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="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkOptionMenu" id="scope-optionmenu"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">0</property> - - <child> - <widget class="GtkMenu" id="menu10"> - - <child> - <widget class="GtkMenuItem" id="one"> - <property name="visible">True</property> - <property name="label" translatable="yes">One</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="sub"> - <property name="visible">True</property> - <property name="label" translatable="yes">Sub</property> - <property name="use_underline">True</property> - </widget> - </child> - </widget> - </child> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">3</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="label55"> - <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.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">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="label56"> - <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.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">2</property> - <property name="right_attach">3</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="label582"> - <property name="visible">True</property> - <property name="label" translatable="yes">Search _filter:</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="mnemonic_widget">entry30</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">3</property> - <property name="bottom_attach">4</property> - <property name="x_options">expand|shrink|fill</property> - <property name="y_options">shrink|fill</property> - </packing> - </child> - - <child> - <widget class="GtkEntry" id="entry30"> - <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> - <accessibility> - <atkproperty name="AtkObject::accessible_name" translatable="yes">Search filter</atkproperty> - <atkproperty name="AtkObject::accessible_description" translatable="yes">Search filter is the type of the objects searched for, while performing the search. If this is not modified, by default search will be performed on objectclass of the type "person".</atkproperty> - </accessibility> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">3</property> - <property name="top_attach">3</property> - <property name="bottom_attach">4</property> - <property name="x_options">expand|shrink|fill</property> - <property name="y_options">shrink|fill</property> - </packing> - </child> - </widget> - </child> - - <child> - <widget class="GtkLabel" id="label51"> - <property name="visible">True</property> - <property name="label" translatable="yes"><b>Searching</b></property> - <property name="use_underline">False</property> - <property name="use_markup">True</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</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="type">label_item</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkFrame" id="downloading-frame"> - <property name="visible">True</property> - <property name="label_xalign">0</property> - <property name="label_yalign">0.5</property> - <property name="shadow_type">GTK_SHADOW_NONE</property> - - <child> - <widget class="GtkTable" id="table11"> - <property name="border_width">12</property> - <property name="visible">True</property> - <property name="n_rows">3</property> - <property name="n_columns">3</property> - <property name="homogeneous">False</property> - <property name="row_spacing">6</property> - <property name="column_spacing">6</property> - - <child> - <widget class="GtkLabel" id="label58"> - <property name="visible">True</property> - <property name="label" translatable="yes">_Timeout:</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="mnemonic_widget">timeout-scale</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="label59"> - <property name="visible">True</property> - <property name="label" translatable="yes">minutes</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.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">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> - - <child> - <widget class="GtkHBox" id="hbox17"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">6</property> - - <child> - <widget class="GtkLabel" id="label60"> - <property name="visible">True</property> - <property name="label" translatable="yes">1</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.5</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> - - <child> - <widget class="GtkHScale" id="timeout-scale"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="draw_value">False</property> - <property name="value_pos">GTK_POS_TOP</property> - <property name="digits">1</property> - <property name="update_policy">GTK_UPDATE_CONTINUOUS</property> - <property name="inverted">False</property> - <property name="adjustment">3 1 5 0.5 1 0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label61"> - <property name="visible">True</property> - <property name="label" translatable="yes">5</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.5</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> - <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">fill</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label62"> - <property name="visible">True</property> - <property name="label" translatable="yes">_Download limit:</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="mnemonic_widget">download-limit-spinbutton</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">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="label63"> - <property name="visible">True</property> - <property name="label" translatable="yes">cards</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.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">2</property> - <property name="right_attach">3</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="GtkSpinButton" id="download-limit-spinbutton"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="climb_rate">1</property> - <property name="digits">0</property> - <property name="numeric">False</property> - <property name="update_policy">GTK_UPDATE_ALWAYS</property> - <property name="snap_to_ticks">False</property> - <property name="wrap">False</property> - <property name="adjustment">0 0 1000 1 10 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="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkCheckButton" id="canbrowsecheck"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes" comments="To translators: If enabled, addressbook will only fetch contacts from the server until either set time limit or amount of contacts limit reached">B_rowse this book until limit reached</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <property name="active">False</property> - <property name="inconsistent">False</property> - <property name="draw_indicator">True</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">3</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> - </widget> - </child> - - <child> - <widget class="GtkLabel" id="label52"> - <property name="visible">True</property> - <property name="label" translatable="yes"><b>Downloading</b></property> - <property name="use_underline">False</property> - <property name="use_markup">True</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</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="type">label_item</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - </widget> - <packing> - <property name="tab_expand">False</property> - <property name="tab_fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="details-label"> - <property name="visible">True</property> - <property name="label" translatable="yes">Details</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.5</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="type">tab</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - </widget> - </child> -</widget> - </glade-interface> diff --git a/addressbook/gui/contact-editor/Makefile.am b/addressbook/gui/contact-editor/Makefile.am index 32d5531859..0b2ec028f5 100644 --- a/addressbook/gui/contact-editor/Makefile.am +++ b/addressbook/gui/contact-editor/Makefile.am @@ -20,10 +20,6 @@ privsolib_LTLIBRARIES = \ libecontacteditor_la_SOURCES = \ eab-editor.c \ eab-editor.h \ - e-contact-editor-im.c \ - e-contact-editor-im.h \ - e-contact-editor-address.c \ - e-contact-editor-address.h \ e-contact-editor-fullname.c \ e-contact-editor-fullname.h \ e-contact-editor.c \ @@ -40,9 +36,7 @@ libecontacteditor_la_LIBADD = \ $(EVOLUTION_ADDRESSBOOK_LIBS) glade_DATA = \ - im.glade \ contact-editor.glade \ - fulladdr.glade \ fullname.glade EXTRA_DIST= $(glade_DATA) diff --git a/addressbook/gui/contact-editor/contact-editor.glade b/addressbook/gui/contact-editor/contact-editor.glade index 1f3af8d208..c840cf679b 100644 --- a/addressbook/gui/contact-editor/contact-editor.glade +++ b/addressbook/gui/contact-editor/contact-editor.glade @@ -205,7 +205,7 @@ <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> - <property name="mnemonic_widget">entry-file-as</property> + <property name="mnemonic_widget">combo-file-as</property> <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> <property name="width_chars">-1</property> <property name="single_line_mode">False</property> @@ -314,48 +314,6 @@ </child> <child> - <widget class="GtkCombo" id="combo-file-as"> - <property name="visible">True</property> - <property name="value_in_list">False</property> - <property name="allow_empty">True</property> - <property name="case_sensitive">False</property> - <property name="enable_arrow_keys">True</property> - <property name="enable_arrows_always">False</property> - <accessibility> - <atkrelation target="accellabel-fileas" type="labelled-by"/> - </accessibility> - - <child internal-child="entry"> - <widget class="GtkEntry" id="entry-file-as"> - <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> - </child> - - <child internal-child="list"> - <widget class="GtkList" id="list14"> - <property name="visible">True</property> - <property name="selection_mode">GTK_SELECTION_BROWSE</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="Custom" id="source-combo-box-source"> <property name="visible">True</property> <property name="creation_function">e_contact_editor_create_source_combo_box</property> @@ -391,6 +349,26 @@ <property name="y_options"></property> </packing> </child> + + <child> + <widget class="GtkComboBoxEntry" id="combo-file-as"> + <property name="visible">True</property> + <property name="items">a +b +c</property> + <property name="add_tearoffs">False</property> + <property name="has_frame">True</property> + <property name="focus_on_click">True</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="x_options">fill</property> + <property name="y_options">fill</property> + </packing> + </child> </widget> <packing> <property name="padding">0</property> @@ -441,84 +419,6 @@ <property name="column_spacing">6</property> <child> - <widget class="GtkOptionMenu" id="optionmenu-email-1"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">0</property> - - <child> - <widget class="GtkMenu" id="menu169"> - - <child> - <widget class="GtkMenuItem" id="menuitem380"> - <property name="visible">True</property> - <property name="label" translatable="yes">Work</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_work2_activate" last_modification_time="Fri, 12 Mar 2004 19:27:14 GMT"/> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="menuitem381"> - <property name="visible">True</property> - <property name="label" translatable="yes">Personal</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_personal2_activate" last_modification_time="Fri, 12 Mar 2004 19:27:14 GMT"/> - </widget> - </child> - </widget> - </child> - </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="GtkOptionMenu" id="optionmenu-email-2"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">0</property> - - <child> - <widget class="GtkMenu" id="menu170"> - - <child> - <widget class="GtkMenuItem" id="menuitem382"> - <property name="visible">True</property> - <property name="label" translatable="yes">Work</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_work2_activate" last_modification_time="Fri, 12 Mar 2004 19:27:14 GMT"/> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="menuitem383"> - <property name="visible">True</property> - <property name="label" translatable="yes">Personal</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_personal2_activate" last_modification_time="Fri, 12 Mar 2004 19:27:14 GMT"/> - </widget> - </child> - </widget> - </child> - </widget> - <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="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> <widget class="GtkEntry" id="entry-email-2"> <property name="visible">True</property> <property name="can_focus">True</property> @@ -529,9 +429,6 @@ <property name="has_frame">True</property> <property name="invisible_char">*</property> <property name="activates_default">False</property> - <accessibility> - <atkrelation target="optionmenu-email-2" type="labelled-by"/> - </accessibility> </widget> <packing> <property name="left_attach">1</property> @@ -543,84 +440,6 @@ </child> <child> - <widget class="GtkOptionMenu" id="optionmenu-email-3"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">0</property> - - <child> - <widget class="GtkMenu" id="menu171"> - - <child> - <widget class="GtkMenuItem" id="menuitem384"> - <property name="visible">True</property> - <property name="label" translatable="yes">Work</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_work2_activate" last_modification_time="Fri, 12 Mar 2004 19:27:14 GMT"/> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="menuitem385"> - <property name="visible">True</property> - <property name="label" translatable="yes">Personal</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_personal2_activate" last_modification_time="Fri, 12 Mar 2004 19:27:14 GMT"/> - </widget> - </child> - </widget> - </child> - </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> - - <child> - <widget class="GtkOptionMenu" id="optionmenu-email-4"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">0</property> - - <child> - <widget class="GtkMenu" id="menu172"> - - <child> - <widget class="GtkMenuItem" id="menuitem386"> - <property name="visible">True</property> - <property name="label" translatable="yes">Work</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_work2_activate" last_modification_time="Fri, 12 Mar 2004 19:27:14 GMT"/> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="menuitem387"> - <property name="visible">True</property> - <property name="label" translatable="yes">Personal</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_personal2_activate" last_modification_time="Fri, 12 Mar 2004 19:27:14 GMT"/> - </widget> - </child> - </widget> - </child> - </widget> - <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">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> <widget class="GtkEntry" id="entry-email-1"> <property name="visible">True</property> <property name="can_focus">True</property> @@ -631,9 +450,6 @@ <property name="has_frame">True</property> <property name="invisible_char">*</property> <property name="activates_default">False</property> - <accessibility> - <atkrelation target="optionmenu-email-1" type="labelled-by"/> - </accessibility> </widget> <packing> <property name="left_attach">1</property> @@ -655,9 +471,6 @@ <property name="has_frame">True</property> <property name="invisible_char">*</property> <property name="activates_default">False</property> - <accessibility> - <atkrelation target="optionmenu-email-3" type="labelled-by"/> - </accessibility> </widget> <packing> <property name="left_attach">3</property> @@ -679,9 +492,6 @@ <property name="has_frame">True</property> <property name="invisible_char">*</property> <property name="activates_default">False</property> - <accessibility> - <atkrelation target="optionmenu-email-4" type="labelled-by"/> - </accessibility> </widget> <packing> <property name="left_attach">3</property> @@ -713,6 +523,78 @@ <property name="y_options"></property> </packing> </child> + + <child> + <widget class="GtkComboBox" id="combobox-email-1"> + <property name="visible">True</property> + <property name="items">Work +Personal</property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</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">fill</property> + </packing> + </child> + + <child> + <widget class="GtkComboBox" id="combobox-email-2"> + <property name="visible">True</property> + <property name="items">Work +Personal</property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> + </widget> + <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="x_options">fill</property> + <property name="y_options">fill</property> + </packing> + </child> + + <child> + <widget class="GtkComboBox" id="combobox-email-3"> + <property name="visible">True</property> + <property name="items">Work +Personal</property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</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">fill</property> + </packing> + </child> + + <child> + <widget class="GtkComboBox" id="combobox-email-4"> + <property name="visible">True</property> + <property name="items">Work +Personal</property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> + </widget> + <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">fill</property> + <property name="y_options">fill</property> + </packing> + </child> </widget> </child> @@ -786,9 +668,6 @@ <property name="has_frame">True</property> <property name="invisible_char">*</property> <property name="activates_default">False</property> - <accessibility> - <atkrelation target="optionmenu-phone-1" type="labelled-by"/> - </accessibility> </widget> <packing> <property name="left_attach">1</property> @@ -810,9 +689,6 @@ <property name="has_frame">True</property> <property name="invisible_char">*</property> <property name="activates_default">False</property> - <accessibility> - <atkrelation target="optionmenu-phone-2" type="labelled-by"/> - </accessibility> </widget> <packing> <property name="left_attach">1</property> @@ -834,9 +710,6 @@ <property name="has_frame">True</property> <property name="invisible_char">*</property> <property name="activates_default">False</property> - <accessibility> - <atkrelation target="optionmenu-phone-4" type="labelled-by"/> - </accessibility> </widget> <packing> <property name="left_attach">3</property> @@ -858,9 +731,6 @@ <property name="has_frame">True</property> <property name="invisible_char">*</property> <property name="activates_default">False</property> - <accessibility> - <atkrelation target="optionmenu-phone-3" type="labelled-by"/> - </accessibility> </widget> <packing> <property name="left_attach">3</property> @@ -872,33 +742,11 @@ </child> <child> - <widget class="GtkOptionMenu" id="optionmenu-phone-1"> + <widget class="GtkComboBox" id="combobox-phone-1"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">0</property> - - <child> - <widget class="GtkMenu" id="menu179"> - - <child> - <widget class="GtkMenuItem" id="menuitem412"> - <property name="visible">True</property> - <property name="label" translatable="yes">Work</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_work2_activate" last_modification_time="Fri, 12 Mar 2004 19:27:14 GMT"/> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="menuitem413"> - <property name="visible">True</property> - <property name="label" translatable="yes">Personal</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_personal2_activate" last_modification_time="Fri, 12 Mar 2004 19:27:14 GMT"/> - </widget> - </child> - </widget> - </child> + <property name="items" translatable="yes"></property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> </widget> <packing> <property name="left_attach">0</property> @@ -906,38 +754,16 @@ <property name="top_attach">0</property> <property name="bottom_attach">1</property> <property name="x_options">fill</property> - <property name="y_options"></property> + <property name="y_options">fill</property> </packing> </child> <child> - <widget class="GtkOptionMenu" id="optionmenu-phone-2"> + <widget class="GtkComboBox" id="combobox-phone-2"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">0</property> - - <child> - <widget class="GtkMenu" id="menu180"> - - <child> - <widget class="GtkMenuItem" id="menuitem414"> - <property name="visible">True</property> - <property name="label" translatable="yes">Work</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_work2_activate" last_modification_time="Fri, 12 Mar 2004 19:27:14 GMT"/> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="menuitem415"> - <property name="visible">True</property> - <property name="label" translatable="yes">Personal</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_personal2_activate" last_modification_time="Fri, 12 Mar 2004 19:27:14 GMT"/> - </widget> - </child> - </widget> - </child> + <property name="items" translatable="yes"></property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> </widget> <packing> <property name="left_attach">0</property> @@ -945,38 +771,16 @@ <property name="top_attach">1</property> <property name="bottom_attach">2</property> <property name="x_options">fill</property> - <property name="y_options"></property> + <property name="y_options">fill</property> </packing> </child> <child> - <widget class="GtkOptionMenu" id="optionmenu-phone-3"> + <widget class="GtkComboBox" id="combobox-phone-3"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">0</property> - - <child> - <widget class="GtkMenu" id="menu181"> - - <child> - <widget class="GtkMenuItem" id="menuitem416"> - <property name="visible">True</property> - <property name="label" translatable="yes">Work</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_work2_activate" last_modification_time="Fri, 12 Mar 2004 19:27:14 GMT"/> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="menuitem417"> - <property name="visible">True</property> - <property name="label" translatable="yes">Personal</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_personal2_activate" last_modification_time="Fri, 12 Mar 2004 19:27:14 GMT"/> - </widget> - </child> - </widget> - </child> + <property name="items" translatable="yes"></property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> </widget> <packing> <property name="left_attach">2</property> @@ -984,38 +788,16 @@ <property name="top_attach">0</property> <property name="bottom_attach">1</property> <property name="x_options">fill</property> - <property name="y_options"></property> + <property name="y_options">fill</property> </packing> </child> <child> - <widget class="GtkOptionMenu" id="optionmenu-phone-4"> + <widget class="GtkComboBox" id="combobox-phone-4"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">0</property> - - <child> - <widget class="GtkMenu" id="menu182"> - - <child> - <widget class="GtkMenuItem" id="menuitem418"> - <property name="visible">True</property> - <property name="label" translatable="yes">Work</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_work2_activate" last_modification_time="Fri, 12 Mar 2004 19:27:14 GMT"/> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="menuitem419"> - <property name="visible">True</property> - <property name="label" translatable="yes">Personal</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_personal2_activate" last_modification_time="Fri, 12 Mar 2004 19:27:14 GMT"/> - </widget> - </child> - </widget> - </child> + <property name="items" translatable="yes"></property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> </widget> <packing> <property name="left_attach">2</property> @@ -1023,7 +805,7 @@ <property name="top_attach">1</property> <property name="bottom_attach">2</property> <property name="x_options">fill</property> - <property name="y_options"></property> + <property name="y_options">fill</property> </packing> </child> </widget> @@ -1043,85 +825,49 @@ <property name="column_spacing">6</property> <child> - <widget class="GtkOptionMenu" id="optionmenu-phone-5"> + <widget class="GtkEntry" id="entry-phone-5"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="history">0</property> - - <child> - <widget class="GtkMenu" id="menu187"> - - <child> - <widget class="GtkMenuItem" id="menuitem430"> - <property name="visible">True</property> - <property name="label" translatable="yes">Work</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_work2_activate" last_modification_time="Fri, 12 Mar 2004 19:27:14 GMT"/> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="menuitem431"> - <property name="visible">True</property> - <property name="label" translatable="yes">Personal</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_personal2_activate" last_modification_time="Fri, 12 Mar 2004 19:27:14 GMT"/> - </widget> - </child> - </widget> - </child> + <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">0</property> - <property name="right_attach">1</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="x_options">fill</property> <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkOptionMenu" id="optionmenu-phone-6"> + <widget class="GtkEntry" id="entry-phone-6"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="history">0</property> - - <child> - <widget class="GtkMenu" id="menu188"> - - <child> - <widget class="GtkMenuItem" id="menuitem432"> - <property name="visible">True</property> - <property name="label" translatable="yes">Work</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_work2_activate" last_modification_time="Fri, 12 Mar 2004 19:27:14 GMT"/> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="menuitem433"> - <property name="visible">True</property> - <property name="label" translatable="yes">Personal</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_personal2_activate" last_modification_time="Fri, 12 Mar 2004 19:27:14 GMT"/> - </widget> - </child> - </widget> - </child> + <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">0</property> - <property name="right_attach">1</property> + <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="x_options">fill</property> <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkEntry" id="entry-phone-5"> + <widget class="GtkEntry" id="entry-phone-7"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="editable">True</property> @@ -1131,13 +877,10 @@ <property name="has_frame">True</property> <property name="invisible_char">*</property> <property name="activates_default">False</property> - <accessibility> - <atkrelation target="optionmenu-phone-5" type="labelled-by"/> - </accessibility> </widget> <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> + <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> @@ -1145,7 +888,7 @@ </child> <child> - <widget class="GtkEntry" id="entry-phone-6"> + <widget class="GtkEntry" id="entry-phone-8"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="editable">True</property> @@ -1155,13 +898,10 @@ <property name="has_frame">True</property> <property name="invisible_char">*</property> <property name="activates_default">False</property> - <accessibility> - <atkrelation target="optionmenu-phone-6" type="labelled-by"/> - </accessibility> </widget> <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> + <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> @@ -1169,128 +909,70 @@ </child> <child> - <widget class="GtkOptionMenu" id="optionmenu-phone-7"> + <widget class="GtkComboBox" id="combobox-phone-5"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">0</property> - - <child> - <widget class="GtkMenu" id="menu189"> - - <child> - <widget class="GtkMenuItem" id="menuitem434"> - <property name="visible">True</property> - <property name="label" translatable="yes">Work</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_work2_activate" last_modification_time="Fri, 12 Mar 2004 19:27:14 GMT"/> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="menuitem435"> - <property name="visible">True</property> - <property name="label" translatable="yes">Personal</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_personal2_activate" last_modification_time="Fri, 12 Mar 2004 19:27:14 GMT"/> - </widget> - </child> - </widget> - </child> + <property name="items" translatable="yes"></property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> </widget> <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</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> + <property name="y_options">fill</property> </packing> </child> <child> - <widget class="GtkOptionMenu" id="optionmenu-phone-8"> + <widget class="GtkComboBox" id="combobox-phone-6"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">0</property> - - <child> - <widget class="GtkMenu" id="menu190"> - - <child> - <widget class="GtkMenuItem" id="menuitem436"> - <property name="visible">True</property> - <property name="label" translatable="yes">Work</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_work2_activate" last_modification_time="Fri, 12 Mar 2004 19:27:14 GMT"/> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="menuitem437"> - <property name="visible">True</property> - <property name="label" translatable="yes">Personal</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_personal2_activate" last_modification_time="Fri, 12 Mar 2004 19:27:14 GMT"/> - </widget> - </child> - </widget> - </child> + <property name="items" translatable="yes"></property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> </widget> <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</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> + <property name="y_options">fill</property> </packing> </child> <child> - <widget class="GtkEntry" id="entry-phone-7"> + <widget class="GtkComboBox" id="combobox-phone-7"> <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> - <accessibility> - <atkrelation target="optionmenu-phone-7" type="labelled-by"/> - </accessibility> + <property name="items" translatable="yes"></property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> </widget> <packing> - <property name="left_attach">3</property> - <property name="right_attach">4</property> + <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="y_options"></property> + <property name="x_options">fill</property> + <property name="y_options">fill</property> </packing> </child> <child> - <widget class="GtkEntry" id="entry-phone-8"> + <widget class="GtkComboBox" id="combobox-phone-8"> <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> - <accessibility> - <atkrelation target="optionmenu-phone-8" type="labelled-by"/> - </accessibility> + <property name="items" translatable="yes"></property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> </widget> <packing> - <property name="left_attach">3</property> - <property name="right_attach">4</property> + <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="y_options"></property> + <property name="x_options">fill</property> + <property name="y_options">fill</property> </packing> </child> </widget> @@ -1402,54 +1084,6 @@ <property name="column_spacing">6</property> <child> - <widget class="GtkOptionMenu" id="optionmenu-im-service-1"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">0</property> - - <child> - <widget class="GtkMenu" id="menu173"> - - <child> - <widget class="GtkMenuItem" id="menuitem388"> - <property name="visible">True</property> - <property name="label" translatable="yes">AIM</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_aim1_activate" last_modification_time="Fri, 12 Mar 2004 18:38:59 GMT"/> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="menuitem389"> - <property name="visible">True</property> - <property name="label" translatable="yes">Novell GroupWise</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_novell_groupwise1_activate" last_modification_time="Fri, 12 Mar 2004 18:38:59 GMT"/> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="menuitem390"> - <property name="visible">True</property> - <property name="label" translatable="yes">MSN Messenger</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_msn_messenger1_activate" last_modification_time="Fri, 12 Mar 2004 18:38:59 GMT"/> - </widget> - </child> - </widget> - </child> - </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="GtkEntry" id="entry-im-name-1"> <property name="visible">True</property> <property name="can_focus">True</property> @@ -1460,9 +1094,6 @@ <property name="has_frame">True</property> <property name="invisible_char">*</property> <property name="activates_default">False</property> - <accessibility> - <atkrelation target="optionmenu-im-service-1" type="labelled-by"/> - </accessibility> </widget> <packing> <property name="left_attach">1</property> @@ -1474,54 +1105,6 @@ </child> <child> - <widget class="GtkOptionMenu" id="optionmenu-im-service-2"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">0</property> - - <child> - <widget class="GtkMenu" id="menu174"> - - <child> - <widget class="GtkMenuItem" id="menuitem391"> - <property name="visible">True</property> - <property name="label" translatable="yes">AIM</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_aim1_activate" last_modification_time="Fri, 12 Mar 2004 18:38:59 GMT"/> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="menuitem392"> - <property name="visible">True</property> - <property name="label" translatable="yes">Novell GroupWise</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_novell_groupwise1_activate" last_modification_time="Fri, 12 Mar 2004 18:38:59 GMT"/> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="menuitem393"> - <property name="visible">True</property> - <property name="label" translatable="yes">MSN Messenger</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_msn_messenger1_activate" last_modification_time="Fri, 12 Mar 2004 18:38:59 GMT"/> - </widget> - </child> - </widget> - </child> - </widget> - <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="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> <widget class="GtkEntry" id="entry-im-name-2"> <property name="visible">True</property> <property name="can_focus">True</property> @@ -1532,9 +1115,6 @@ <property name="has_frame">True</property> <property name="invisible_char">*</property> <property name="activates_default">False</property> - <accessibility> - <atkrelation target="optionmenu-im-service-2" type="labelled-by"/> - </accessibility> </widget> <packing> <property name="left_attach">1</property> @@ -1546,55 +1126,28 @@ </child> <child> - <widget class="GtkOptionMenu" id="optionmenu-im-service-3"> + <widget class="GtkEntry" id="entry-im-name-3"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="history">0</property> - - <child> - <widget class="GtkMenu" id="menu175"> - - <child> - <widget class="GtkMenuItem" id="menuitem394"> - <property name="visible">True</property> - <property name="label" translatable="yes">AIM</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_aim1_activate" last_modification_time="Fri, 12 Mar 2004 18:38:59 GMT"/> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="menuitem395"> - <property name="visible">True</property> - <property name="label" translatable="yes">Novell GroupWise</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_novell_groupwise1_activate" last_modification_time="Fri, 12 Mar 2004 18:38:59 GMT"/> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="menuitem396"> - <property name="visible">True</property> - <property name="label" translatable="yes">MSN Messenger</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_msn_messenger1_activate" last_modification_time="Fri, 12 Mar 2004 18:38:59 GMT"/> - </widget> - </child> - </widget> - </child> + <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">2</property> - <property name="right_attach">3</property> + <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="x_options">fill</property> <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkEntry" id="entry-im-name-3"> + <widget class="GtkEntry" id="entry-im-name-4"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="editable">True</property> @@ -1604,88 +1157,81 @@ <property name="has_frame">True</property> <property name="invisible_char">*</property> <property name="activates_default">False</property> - <accessibility> - <atkrelation target="optionmenu-im-service-3" type="labelled-by"/> - </accessibility> </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="top_attach">1</property> + <property name="bottom_attach">2</property> <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkOptionMenu" id="optionmenu-im-service-4"> + <widget class="GtkComboBox" id="combobox-im-service-1"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">0</property> - - <child> - <widget class="GtkMenu" id="menu183"> - - <child> - <widget class="GtkMenuItem" id="menuitem420"> - <property name="visible">True</property> - <property name="label" translatable="yes">AIM</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_aim1_activate" last_modification_time="Fri, 12 Mar 2004 18:38:59 GMT"/> - </widget> - </child> + <property name="items" translatable="yes"></property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</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">fill</property> + </packing> + </child> - <child> - <widget class="GtkMenuItem" id="menuitem421"> - <property name="visible">True</property> - <property name="label" translatable="yes">Novell GroupWise</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_novell_groupwise1_activate" last_modification_time="Fri, 12 Mar 2004 18:38:59 GMT"/> - </widget> - </child> + <child> + <widget class="GtkComboBox" id="combobox-im-service-2"> + <property name="visible">True</property> + <property name="items" translatable="yes"></property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> + </widget> + <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="x_options">fill</property> + <property name="y_options">fill</property> + </packing> + </child> - <child> - <widget class="GtkMenuItem" id="menuitem422"> - <property name="visible">True</property> - <property name="label" translatable="yes">MSN Messenger</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_msn_messenger1_activate" last_modification_time="Fri, 12 Mar 2004 18:38:59 GMT"/> - </widget> - </child> - </widget> - </child> + <child> + <widget class="GtkComboBox" id="combobox-im-service-3"> + <property name="visible">True</property> + <property name="items" translatable="yes"></property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> </widget> <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="top_attach">0</property> + <property name="bottom_attach">1</property> <property name="x_options">fill</property> - <property name="y_options"></property> + <property name="y_options">fill</property> </packing> </child> <child> - <widget class="GtkEntry" id="entry-im-name-4"> + <widget class="GtkComboBox" id="combobox-im-service-4"> <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> - <accessibility> - <atkrelation target="optionmenu-im-service-4" type="labelled-by"/> - </accessibility> + <property name="items" translatable="yes"></property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> </widget> <packing> - <property name="left_attach">3</property> - <property name="right_attach">4</property> + <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="y_options"></property> + <property name="x_options">fill</property> + <property name="y_options">fill</property> </packing> </child> </widget> @@ -2785,9 +2331,9 @@ <property name="border_width">6</property> <property name="visible">True</property> <property name="xalign">0.5</property> - <property name="yalign">0.15</property> + <property name="yalign">0.15000000596</property> <property name="xscale">1</property> - <property name="yscale">0.70</property> + <property name="yscale">0.699999988079</property> <property name="top_padding">0</property> <property name="bottom_padding">0</property> <property name="left_padding">19</property> @@ -3033,7 +2579,7 @@ <property name="justify">GTK_JUSTIFY_LEFT</property> <property name="wrap">False</property> <property name="selectable">False</property> - <property name="xalign">1.0</property> + <property name="xalign">1</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">4</property> @@ -3084,7 +2630,7 @@ <property name="justify">GTK_JUSTIFY_LEFT</property> <property name="wrap">False</property> <property name="selectable">False</property> - <property name="xalign">1.0</property> + <property name="xalign">1</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> @@ -3113,7 +2659,7 @@ <property name="justify">GTK_JUSTIFY_LEFT</property> <property name="wrap">False</property> <property name="selectable">False</property> - <property name="xalign">1.0</property> + <property name="xalign">1</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> @@ -3132,15 +2678,12 @@ <property name="y_options"></property> </packing> </child> - - <child> - <placeholder /> - </child> - - <child> - <placeholder /> - </child> </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> </child> </widget> </child> @@ -3156,7 +2699,7 @@ <property name="justify">GTK_JUSTIFY_LEFT</property> <property name="wrap">False</property> <property name="selectable">False</property> - <property name="xalign">0.42</property> + <property name="xalign">0.419999986887</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> @@ -3190,9 +2733,9 @@ <property name="border_width">6</property> <property name="visible">True</property> <property name="xalign">0.5</property> - <property name="yalign">0.15</property> + <property name="yalign">0.15000000596</property> <property name="xscale">1</property> - <property name="yscale">0.70</property> + <property name="yscale">0.699999988079</property> <property name="top_padding">0</property> <property name="bottom_padding">0</property> <property name="left_padding">19</property> @@ -3224,6 +2767,7 @@ <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property> <property name="shadow_type">GTK_SHADOW_IN</property> <property name="window_placement">GTK_CORNER_TOP_LEFT</property> + <child> <widget class="GtkTextView" id="textview-work-address"> <property name="height_request">25</property> @@ -3314,7 +2858,7 @@ <property name="justify">GTK_JUSTIFY_LEFT</property> <property name="wrap">False</property> <property name="selectable">False</property> - <property name="xalign">1.0</property> + <property name="xalign">1</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> @@ -3466,7 +3010,7 @@ <property name="justify">GTK_JUSTIFY_LEFT</property> <property name="wrap">False</property> <property name="selectable">False</property> - <property name="xalign">1.0</property> + <property name="xalign">1</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">4</property> @@ -3517,7 +3061,7 @@ <property name="justify">GTK_JUSTIFY_LEFT</property> <property name="wrap">False</property> <property name="selectable">False</property> - <property name="xalign">1.0</property> + <property name="xalign">1</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> @@ -3536,17 +3080,16 @@ <property name="y_options"></property> </packing> </child> - </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> </child> </widget> </child> </widget> - <packing> - <property name="padding">8</property> - <property name="expand">True</property> - <property name="fill">False</property> - </packing> </child> <child> @@ -3558,7 +3101,7 @@ <property name="justify">GTK_JUSTIFY_LEFT</property> <property name="wrap">False</property> <property name="selectable">False</property> - <property name="xalign">0.42</property> + <property name="xalign">0.419999986887</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> @@ -3592,9 +3135,9 @@ <property name="border_width">6</property> <property name="visible">True</property> <property name="xalign">0.5</property> - <property name="yalign">0.15</property> + <property name="yalign">0.15000000596</property> <property name="xscale">1</property> - <property name="yscale">0.70</property> + <property name="yscale">0.699999988079</property> <property name="top_padding">0</property> <property name="bottom_padding">0</property> <property name="left_padding">19</property> @@ -3675,7 +3218,7 @@ <property name="justify">GTK_JUSTIFY_LEFT</property> <property name="wrap">False</property> <property name="selectable">False</property> - <property name="xalign">1.0</property> + <property name="xalign">1</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> @@ -3827,7 +3370,7 @@ <property name="justify">GTK_JUSTIFY_LEFT</property> <property name="wrap">False</property> <property name="selectable">False</property> - <property name="xalign">1.0</property> + <property name="xalign">1</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">4</property> @@ -3878,7 +3421,7 @@ <property name="justify">GTK_JUSTIFY_LEFT</property> <property name="wrap">False</property> <property name="selectable">False</property> - <property name="xalign">1.0</property> + <property name="xalign">1</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> @@ -3908,6 +3451,7 @@ <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property> <property name="shadow_type">GTK_SHADOW_IN</property> <property name="window_placement">GTK_CORNER_TOP_LEFT</property> + <child> <widget class="GtkTextView" id="textview-other-address"> <property name="height_request">25</property> @@ -3948,11 +3492,6 @@ </widget> </child> </widget> - <packing> - <property name="padding">8</property> - <property name="expand">True</property> - <property name="fill">False</property> - </packing> </child> <child> @@ -3964,7 +3503,7 @@ <property name="justify">GTK_JUSTIFY_LEFT</property> <property name="wrap">False</property> <property name="selectable">False</property> - <property name="xalign">0.42</property> + <property name="xalign">0.419999986887</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> diff --git a/addressbook/gui/contact-editor/e-contact-editor-fullname.c b/addressbook/gui/contact-editor/e-contact-editor-fullname.c index 3eeaa9d6ed..bbe9ece7ba 100644 --- a/addressbook/gui/contact-editor/e-contact-editor-fullname.c +++ b/addressbook/gui/contact-editor/e-contact-editor-fullname.c @@ -191,8 +191,8 @@ e_contact_editor_fullname_set_property (GObject *object, guint prop_id, case PROP_EDITABLE: { int i; char *widget_names[] = { - "combo-title", - "combo-suffix", + "comboentry-title", + "comboentry-suffix", "entry-first", "entry-middle", "entry-last", @@ -210,10 +210,10 @@ e_contact_editor_fullname_set_property (GObject *object, guint prop_id, gtk_editable_set_editable (GTK_EDITABLE (w), e_contact_editor_fullname->editable); } - else if (GTK_IS_COMBO (w)) { - gtk_editable_set_editable (GTK_EDITABLE (GTK_COMBO (w)->entry), + else if (GTK_IS_COMBO_BOX_ENTRY (w)) { + gtk_editable_set_editable (GTK_EDITABLE (gtk_bin_get_child (GTK_BIN (w))), e_contact_editor_fullname->editable); - gtk_widget_set_sensitive (GTK_COMBO (w)->button, e_contact_editor_fullname->editable); + gtk_widget_set_sensitive (w, e_contact_editor_fullname->editable); } else if (GTK_IS_LABEL (w)) { gtk_widget_set_sensitive (w, e_contact_editor_fullname->editable); @@ -252,7 +252,14 @@ e_contact_editor_fullname_get_property (GObject *object, guint prop_id, static void fill_in_field(EContactEditorFullname *editor, char *field, char *string) { - GtkEntry *entry = GTK_ENTRY(glade_xml_get_widget(editor->gui, field)); + GtkWidget *widget = glade_xml_get_widget (editor->gui, field); + GtkEntry *entry = NULL; + + if (GTK_IS_ENTRY (widget)) + entry = GTK_ENTRY (widget); + else if (GTK_IS_COMBO_BOX_ENTRY (widget)) + entry = GTK_ENTRY (gtk_bin_get_child (GTK_BIN (widget))); + if (entry) { if (string) gtk_entry_set_text(entry, string); @@ -266,18 +273,25 @@ fill_in_info(EContactEditorFullname *editor) { EContactName *name = editor->name; if (name) { - fill_in_field(editor, "entry-title", name->prefixes); + fill_in_field(editor, "comboentry-title", name->prefixes); fill_in_field(editor, "entry-first", name->given); fill_in_field(editor, "entry-middle", name->additional); fill_in_field(editor, "entry-last", name->family); - fill_in_field(editor, "entry-suffix", name->suffixes); + fill_in_field(editor, "comboentry-suffix", name->suffixes); } } static char * extract_field(EContactEditorFullname *editor, char *field) { - GtkEntry *entry = GTK_ENTRY(glade_xml_get_widget(editor->gui, field)); + GtkWidget *widget = glade_xml_get_widget(editor->gui, field); + GtkEntry *entry = NULL; + + if (GTK_IS_ENTRY (widget)) + entry = GTK_ENTRY (widget); + else if (GTK_IS_COMBO_BOX_ENTRY (widget)) + entry = GTK_ENTRY (gtk_bin_get_child (GTK_BIN (widget))); + if (entry) return g_strdup (gtk_entry_get_text(entry)); else @@ -293,9 +307,9 @@ extract_info(EContactEditorFullname *editor) editor->name = name; } - name->prefixes = extract_field(editor, "entry-title" ); + name->prefixes = extract_field(editor, "comboentry-title" ); name->given = extract_field(editor, "entry-first" ); name->additional = extract_field(editor, "entry-middle"); name->family = extract_field(editor, "entry-last" ); - name->suffixes = extract_field(editor, "entry-suffix"); + name->suffixes = extract_field(editor, "comboentry-suffix"); } diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c index ac4f663ffc..c3a73fbcd5 100644 --- a/addressbook/gui/contact-editor/e-contact-editor.c +++ b/addressbook/gui/contact-editor/e-contact-editor.c @@ -56,8 +56,6 @@ #include "eab-contact-merging.h" -#include "e-contact-editor-address.h" -#include "e-contact-editor-im.h" #include "e-contact-editor-fullname.h" #define EMAIL_SLOTS 4 @@ -450,7 +448,7 @@ name_to_style (const EContactName *name, const gchar *company, int style) static int file_as_get_style (EContactEditor *editor) { - GtkEntry *file_as = GTK_ENTRY(glade_xml_get_widget(editor->gui, "entry-file-as")); + GtkEntry *file_as = GTK_ENTRY (gtk_bin_get_child (GTK_BIN (glade_xml_get_widget(editor->gui, "combo-file-as")))); GtkEntry *company_w = GTK_ENTRY (glade_xml_get_widget (editor->gui, "entry-company")); char *filestring; char *trystring; @@ -483,23 +481,20 @@ file_as_set_style (EContactEditor *editor, int style) char *string; int i; GList *strings = NULL; - GtkEntry *file_as = GTK_ENTRY (glade_xml_get_widget (editor->gui, "entry-file-as")); + GtkComboBox *combo_file_as = GTK_COMBO_BOX (glade_xml_get_widget (editor->gui, "combo-file-as")); GtkEntry *company_w = GTK_ENTRY (glade_xml_get_widget (editor->gui, "entry-company")); - GtkWidget *widget; const gchar *company; - if (!(file_as && GTK_IS_ENTRY (file_as))) + if (!(combo_file_as && GTK_IS_COMBO_BOX_ENTRY (combo_file_as))) return; company = gtk_entry_get_text (GTK_ENTRY (company_w)); if (style == -1) { - string = g_strdup (gtk_entry_get_text(file_as)); + string = gtk_combo_box_get_active_text (combo_file_as); strings = g_list_append (strings, string); } - widget = glade_xml_get_widget (editor->gui, "combo-file-as"); - for (i = 0; i < 6; i++) { if (style_makes_sense (editor->name, company, i)) { char *u; @@ -511,16 +506,22 @@ file_as_set_style (EContactEditor *editor, int style) } } - if (widget && GTK_IS_COMBO (widget)) { - GtkCombo *combo = GTK_COMBO (widget); - gtk_combo_set_popdown_strings (combo, strings); - g_list_foreach (strings, (GFunc) g_free, NULL); - g_list_free (strings); + if (combo_file_as) { + GList *l; + + gtk_list_store_clear (GTK_LIST_STORE (gtk_combo_box_get_model (combo_file_as))); + + for (l = strings; l; l = l->next) { + gtk_combo_box_append_text (combo_file_as, l->data); + } } + g_list_foreach (strings, (GFunc) g_free, NULL); + g_list_free (strings); + if (style != -1) { string = name_to_style (editor->name, company, style); - set_entry_text (editor, file_as, string); + set_entry_text (editor, GTK_ENTRY (gtk_bin_get_child (GTK_BIN (combo_file_as))), string); g_free (string); } } @@ -543,9 +544,9 @@ name_entry_changed (GtkWidget *widget, EContactEditor *editor) } static void -file_as_entry_changed (GtkWidget *widget, EContactEditor *editor) +file_as_combo_changed (GtkWidget *widget, EContactEditor *editor) { - char *string = gtk_editable_get_chars (GTK_EDITABLE (widget), 0, -1); + char *string = gtk_combo_box_get_active_text (GTK_COMBO_BOX (widget)); if (string && *string) { gchar *title; @@ -598,7 +599,7 @@ sensitize_ok (EContactEditor *ce) GtkWidget *widget; gboolean allow_save; GtkWidget *entry_fullname = glade_xml_get_widget (ce->gui, "entry-fullname" ); - GtkWidget *entry_file_as = glade_xml_get_widget (ce->gui, "entry-file-as"); + GtkWidget *entry_file_as = gtk_bin_get_child (GTK_BIN (glade_xml_get_widget (ce->gui, "combo-file-as"))); GtkWidget *company_name = glade_xml_get_widget (ce->gui, "entry-company"); const char *name_entry_string = gtk_entry_get_text (GTK_ENTRY (entry_fullname)); const char *file_as_entry_string = gtk_entry_get_text (GTK_ENTRY (entry_file_as)); @@ -656,26 +657,19 @@ set_entry_text (EContactEditor *editor, GtkEntry *entry, const gchar *string) } static void -set_option_menu_history (EContactEditor *editor, GtkOptionMenu *option_menu, gint history) +set_combo_box_active (EContactEditor *editor, GtkComboBox *combo_box, gint active) { - g_signal_handlers_block_matched (option_menu, G_SIGNAL_MATCH_DATA, + g_signal_handlers_block_matched (combo_box, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, editor); - gtk_option_menu_set_history (option_menu, history); - g_signal_handlers_unblock_matched (option_menu, G_SIGNAL_MATCH_DATA, + gtk_combo_box_set_active (combo_box, active); + g_signal_handlers_unblock_matched (combo_box, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, editor); } static void -email_menu_changed(GtkWidget *widget, GtkWidget *next) -{ - gtk_widget_grab_focus(next); -} - -static void init_email_record_location (EContactEditor *editor, gint record) { - GtkWidget *location_option_menu; - GtkWidget *location_menu; + GtkComboBox *location_combo_box; GtkWidget *email_entry; gchar *widget_name; gint i; @@ -684,24 +678,18 @@ init_email_record_location (EContactEditor *editor, gint record) email_entry = glade_xml_get_widget (editor->gui, widget_name); g_free (widget_name); - widget_name = g_strdup_printf ("optionmenu-email-%d", record); - location_option_menu = glade_xml_get_widget (editor->gui, widget_name); + widget_name = g_strdup_printf ("combobox-email-%d", record); + location_combo_box = GTK_COMBO_BOX (glade_xml_get_widget (editor->gui, widget_name)); g_free (widget_name); - location_menu = gtk_menu_new (); + gtk_list_store_clear (GTK_LIST_STORE (gtk_combo_box_get_model (location_combo_box))); for (i = 0; i < G_N_ELEMENTS (common_location); i++) { - GtkWidget *item; - - item = gtk_menu_item_new_with_label (_(common_location [i].pretty_name)); - gtk_menu_shell_append (GTK_MENU_SHELL (location_menu), item); -+ g_signal_connect (item, "activate", G_CALLBACK (email_menu_changed), email_entry); + gtk_combo_box_append_text (location_combo_box, _(common_location [i].pretty_name)); } - gtk_widget_show_all (location_menu); - gtk_option_menu_set_menu (GTK_OPTION_MENU (location_option_menu), location_menu); - - g_signal_connect (location_option_menu, "changed", G_CALLBACK (object_changed), editor); + g_signal_connect_swapped (location_combo_box, "changed", G_CALLBACK (gtk_widget_grab_focus), email_entry); + g_signal_connect (location_combo_box, "changed", G_CALLBACK (object_changed), editor); g_signal_connect (email_entry, "changed", G_CALLBACK (object_changed), editor); g_signal_connect_swapped (email_entry, "activate", G_CALLBACK (entry_activated), editor); } @@ -718,19 +706,19 @@ init_email (EContactEditor *editor) static void fill_in_email_record (EContactEditor *editor, gint record, const gchar *address, gint location) { - GtkWidget *location_option_menu; + GtkWidget *location_combo_box; GtkWidget *email_entry; gchar *widget_name; - widget_name = g_strdup_printf ("optionmenu-email-%d", record); - location_option_menu = glade_xml_get_widget (editor->gui, widget_name); + widget_name = g_strdup_printf ("combobox-email-%d", record); + location_combo_box = glade_xml_get_widget (editor->gui, widget_name); g_free (widget_name); widget_name = g_strdup_printf ("entry-email-%d", record); email_entry = glade_xml_get_widget (editor->gui, widget_name); g_free (widget_name); - set_option_menu_history (editor, GTK_OPTION_MENU (location_option_menu), + set_combo_box_active (editor, GTK_COMBO_BOX (location_combo_box), location >= 0 ? location : email_default [2]); set_entry_text (editor, GTK_ENTRY (email_entry), address ? address : ""); } @@ -738,12 +726,12 @@ fill_in_email_record (EContactEditor *editor, gint record, const gchar *address, static void extract_email_record (EContactEditor *editor, gint record, gchar **address, gint *location) { - GtkWidget *location_option_menu; + GtkWidget *location_combo_box; GtkWidget *email_entry; gchar *widget_name; - widget_name = g_strdup_printf ("optionmenu-email-%d", record); - location_option_menu = glade_xml_get_widget (editor->gui, widget_name); + widget_name = g_strdup_printf ("combobox-email-%d", record); + location_combo_box = glade_xml_get_widget (editor->gui, widget_name); g_free (widget_name); widget_name = g_strdup_printf ("entry-email-%d", record); @@ -751,7 +739,7 @@ extract_email_record (EContactEditor *editor, gint record, gchar **address, gint g_free (widget_name); *address = g_strdup (gtk_entry_get_text (GTK_ENTRY (email_entry))); - *location = gtk_option_menu_get_history (GTK_OPTION_MENU (location_option_menu)); + *location = gtk_combo_box_get_active (GTK_COMBO_BOX (location_combo_box)); } static const gchar * @@ -1009,19 +997,19 @@ extract_email (EContactEditor *editor) static void sensitize_email_record (EContactEditor *editor, gint record, gboolean enabled) { - GtkWidget *location_option_menu; + GtkWidget *location_combo_box; GtkWidget *email_entry; gchar *widget_name; - widget_name = g_strdup_printf ("optionmenu-email-%d", record); - location_option_menu = glade_xml_get_widget (editor->gui, widget_name); + widget_name = g_strdup_printf ("combobox-email-%d", record); + location_combo_box = glade_xml_get_widget (editor->gui, widget_name); g_free (widget_name); widget_name = g_strdup_printf ("entry-email-%d", record); email_entry = glade_xml_get_widget (editor->gui, widget_name); g_free (widget_name); - gtk_widget_set_sensitive (location_option_menu, enabled); + gtk_widget_set_sensitive (location_combo_box, enabled); gtk_editable_set_editable (GTK_EDITABLE (email_entry), enabled); } @@ -1044,6 +1032,29 @@ sensitize_email (EContactEditor *editor) } } +static void +init_item_sensitiveable_combo_box (GtkComboBox *combo) +{ + GtkCellRenderer *cell; + GtkListStore *store; + + g_return_if_fail (combo != NULL); + g_return_if_fail (GTK_IS_COMBO_BOX (combo)); + + store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_BOOLEAN); + gtk_combo_box_set_model (combo, GTK_TREE_MODEL (store)); + g_object_unref (store); + + gtk_cell_layout_clear (GTK_CELL_LAYOUT (combo)); + + cell = gtk_cell_renderer_text_new (); + gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo), cell, TRUE); + gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combo), cell, + "text", 0, + "sensitive", 1, + NULL); +} + /* EContact can get attributes by field ID only, and there is none for TEL, so we need this */ static GList * get_attributes_named (EVCard *vcard, const gchar *attr_name) @@ -1104,19 +1115,19 @@ expand_phone (EContactEditor *editor, gboolean expanded) static void fill_in_phone_record (EContactEditor *editor, gint record, const gchar *phone, gint phone_type) { - GtkWidget *phone_type_option_menu; + GtkWidget *phone_type_combo_box; GtkWidget *phone_entry; gchar *widget_name; - widget_name = g_strdup_printf ("optionmenu-phone-%d", record); - phone_type_option_menu = glade_xml_get_widget (editor->gui, widget_name); + widget_name = g_strdup_printf ("combobox-phone-%d", record); + phone_type_combo_box = glade_xml_get_widget (editor->gui, widget_name); g_free (widget_name); widget_name = g_strdup_printf ("entry-phone-%d", record); phone_entry = glade_xml_get_widget (editor->gui, widget_name); g_free (widget_name); - set_option_menu_history (editor, GTK_OPTION_MENU (phone_type_option_menu), + set_combo_box_active (editor, GTK_COMBO_BOX (phone_type_combo_box), phone_type >= 0 ? phone_type : phones_default [record - 1]); set_entry_text (editor, GTK_ENTRY (phone_entry), phone ? phone : ""); @@ -1128,12 +1139,12 @@ fill_in_phone_record (EContactEditor *editor, gint record, const gchar *phone, g static void extract_phone_record (EContactEditor *editor, gint record, gchar **phone, gint *phone_type) { - GtkWidget *phone_type_option_menu; + GtkWidget *phone_type_combo_box; GtkWidget *phone_entry; gchar *widget_name; - widget_name = g_strdup_printf ("optionmenu-phone-%d", record); - phone_type_option_menu = glade_xml_get_widget (editor->gui, widget_name); + widget_name = g_strdup_printf ("combobox-phone-%d", record); + phone_type_combo_box = glade_xml_get_widget (editor->gui, widget_name); g_free (widget_name); widget_name = g_strdup_printf ("entry-phone-%d", record); @@ -1141,7 +1152,7 @@ extract_phone_record (EContactEditor *editor, gint record, gchar **phone, gint * g_free (widget_name); *phone = g_strdup (gtk_entry_get_text (GTK_ENTRY (phone_entry))); - *phone_type = gtk_option_menu_get_history (GTK_OPTION_MENU (phone_type_option_menu)); + *phone_type = gtk_combo_box_get_active (GTK_COMBO_BOX (phone_type_combo_box)); } static void @@ -1240,42 +1251,38 @@ extract_phone (EContactEditor *editor) } static void -phone_menu_changed(GtkWidget *widget, GtkWidget *next) -{ - gtk_widget_grab_focus(next); -} - -static void init_phone_record_type (EContactEditor *editor, gint record) { - GtkWidget *phone_type_option_menu; - GtkWidget *phone_type_menu; + GtkWidget *phone_type_combo_box; GtkWidget *phone_entry; gchar *widget_name; gint i; + GtkListStore *store; widget_name = g_strdup_printf ("entry-phone-%d", record); phone_entry = glade_xml_get_widget (editor->gui, widget_name); g_free (widget_name); - widget_name = g_strdup_printf ("optionmenu-phone-%d", record); - phone_type_option_menu = glade_xml_get_widget (editor->gui, widget_name); + widget_name = g_strdup_printf ("combobox-phone-%d", record); + phone_type_combo_box = glade_xml_get_widget (editor->gui, widget_name); g_free (widget_name); - phone_type_menu = gtk_menu_new (); + init_item_sensitiveable_combo_box (GTK_COMBO_BOX (phone_type_combo_box)); + store = GTK_LIST_STORE (gtk_combo_box_get_model (GTK_COMBO_BOX (phone_type_combo_box))); for (i = 0; i < G_N_ELEMENTS (phones); i++) { - GtkWidget *item; + GtkTreeIter iter; - item = gtk_menu_item_new_with_label (e_contact_pretty_name (phones [i].field_id)); - gtk_menu_shell_append (GTK_MENU_SHELL (phone_type_menu), item); - g_signal_connect (item, "activate", G_CALLBACK (phone_menu_changed), phone_entry); + gtk_list_store_append (store, &iter); + gtk_list_store_set ( + store, &iter, + 0, e_contact_pretty_name (phones [i].field_id), + 1, TRUE, + -1); } - gtk_widget_show_all (phone_type_menu); - gtk_option_menu_set_menu (GTK_OPTION_MENU (phone_type_option_menu), phone_type_menu); - - g_signal_connect (phone_type_option_menu, "changed", G_CALLBACK (object_changed), editor); + g_signal_connect_swapped (phone_type_combo_box, "changed", G_CALLBACK (gtk_widget_grab_focus), phone_entry); + g_signal_connect (phone_type_combo_box, "changed", G_CALLBACK (object_changed), editor); g_signal_connect (phone_entry, "changed", G_CALLBACK (object_changed), editor); g_signal_connect_swapped (phone_entry, "activate", G_CALLBACK (entry_activated), editor); } @@ -1292,49 +1299,50 @@ init_phone (EContactEditor *editor) } static void -sensitize_phone_types (EContactEditor *editor, GtkWidget *option_menu) +sensitize_phone_types (EContactEditor *editor, GtkWidget *combo_box) { - GtkWidget *menu; - GList *l; - gint i; + GtkTreeModel *model; + GtkTreeIter iter; + gint i; + gboolean valid; - menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (option_menu)); - l = gtk_container_get_children (GTK_CONTAINER (menu)); + model = gtk_combo_box_get_model (GTK_COMBO_BOX (combo_box)); + valid = gtk_tree_model_get_iter_first (model, &iter); for (i = 0; i < G_N_ELEMENTS (phones); i++) { - GtkWidget *widget; - - if (!l) { - g_warning (G_STRLOC ": Unexpected end of phone items in option menu"); + if (!valid) { + g_warning (G_STRLOC ": Unexpected end of phone items in combo box"); return; } - widget = l->data; - gtk_widget_set_sensitive (widget, is_field_supported (editor, phones [i].field_id)); + gtk_list_store_set ( + GTK_LIST_STORE (model), &iter, + 1, is_field_supported (editor, phones [i].field_id), + -1); - l = g_list_next (l); + valid = gtk_tree_model_iter_next (model, &iter); } } static void sensitize_phone_record (EContactEditor *editor, gint record, gboolean enabled) { - GtkWidget *phone_type_option_menu; + GtkWidget *phone_type_combo_box; GtkWidget *phone_entry; gchar *widget_name; - widget_name = g_strdup_printf ("optionmenu-phone-%d", record); - phone_type_option_menu = glade_xml_get_widget (editor->gui, widget_name); + widget_name = g_strdup_printf ("combobox-phone-%d", record); + phone_type_combo_box = glade_xml_get_widget (editor->gui, widget_name); g_free (widget_name); widget_name = g_strdup_printf ("entry-phone-%d", record); phone_entry = glade_xml_get_widget (editor->gui, widget_name); g_free (widget_name); - gtk_widget_set_sensitive (phone_type_option_menu, enabled); + gtk_widget_set_sensitive (phone_type_combo_box, enabled); gtk_editable_set_editable (GTK_EDITABLE (phone_entry), enabled); - sensitize_phone_types (editor, phone_type_option_menu); + sensitize_phone_types (editor, phone_type_combo_box); } static void @@ -1357,42 +1365,38 @@ init_im_record_location (EContactEditor *editor, gint record) { #ifdef ENABLE_IM_LOCATION - GtkWidget *location_option_menu; - GtkWidget *location_menu; - gint i; + GtkWidget *location_combo_box; + GtkListStore *store; + gint i; gchar *widget_name; - widget_name = g_strdup_printf ("optionmenu-im-location-%d", record); - location_option_menu = glade_xml_get_widget (editor->gui, widget_name); + widget_name = g_strdup_printf ("combobox-im-location-%d", record); + location_combo_box = glade_xml_get_widget (editor->gui, widget_name); g_free (widget_name); - location_menu = gtk_menu_new (); + init_item_sensitiveable_combo_box (GTK_COMBO_BOX (location_combo_box)); + store = GTK_LIST_STORE (gtk_combo_box_get_model (GTK_COMBO_BOX (location_combo_box))); for (i = 0; i < G_N_ELEMENTS (common_location); i++) { - GtkWidget *item; + GtkTreeIter iter; - item = gtk_menu_item_new_with_label (_(common_location [i].pretty_name)); - gtk_menu_shell_append (GTK_MENU_SHELL (location_menu), item); + gtk_list_store_append (store, &iter); + gtk_list_store_set ( + store, &iter, + 0, _(common_location [i].pretty_name), + 1, TRUE, + -1); } - gtk_widget_show_all (location_menu); - gtk_option_menu_set_menu (GTK_OPTION_MENU (location_option_menu), location_menu); - - g_signal_connect (location_option_menu, "changed", G_CALLBACK (object_changed), editor); + g_signal_connect (location_combo_box, "changed", G_CALLBACK (object_changed), editor); #endif } static void -im_menu_changed(GtkWidget *widget, GtkWidget *next) -{ - gtk_widget_grab_focus(next); -} - -static void init_im_record_service (EContactEditor *editor, gint record) { - GtkWidget *service_option_menu; - GtkWidget *service_menu; + GtkWidget *service_combo_box; + GtkListStore *store; GtkWidget *name_entry; gchar *widget_name; gint i; @@ -1401,24 +1405,26 @@ init_im_record_service (EContactEditor *editor, gint record) name_entry = glade_xml_get_widget (editor->gui, widget_name); g_free (widget_name); - widget_name = g_strdup_printf ("optionmenu-im-service-%d", record); - service_option_menu = glade_xml_get_widget (editor->gui, widget_name); + widget_name = g_strdup_printf ("combobox-im-service-%d", record); + service_combo_box = glade_xml_get_widget (editor->gui, widget_name); g_free (widget_name); - service_menu = gtk_menu_new (); + init_item_sensitiveable_combo_box (GTK_COMBO_BOX (service_combo_box)); + store = GTK_LIST_STORE (gtk_combo_box_get_model (GTK_COMBO_BOX (service_combo_box))); for (i = 0; i < G_N_ELEMENTS (im_service); i++) { - GtkWidget *item; + GtkTreeIter iter; - item = gtk_menu_item_new_with_label (im_service [i].pretty_name); - gtk_menu_shell_append (GTK_MENU_SHELL (service_menu), item); - g_signal_connect (item, "activate", G_CALLBACK (im_menu_changed), name_entry); + gtk_list_store_append (store, &iter); + gtk_list_store_set ( + store, &iter, + 0, im_service [i].pretty_name, + 1, TRUE, + -1); } - gtk_widget_show_all (service_menu); - gtk_option_menu_set_menu (GTK_OPTION_MENU (service_option_menu), service_menu); - - g_signal_connect (service_option_menu, "changed", G_CALLBACK (object_changed), editor); + g_signal_connect_swapped (service_combo_box, "changed", G_CALLBACK (gtk_widget_grab_focus), name_entry); + g_signal_connect (service_combo_box, "changed", G_CALLBACK (object_changed), editor); g_signal_connect (name_entry, "changed", G_CALLBACK (object_changed), editor); g_signal_connect_swapped (name_entry, "activate", G_CALLBACK (entry_activated), editor); } @@ -1437,20 +1443,20 @@ init_im (EContactEditor *editor) static void fill_in_im_record (EContactEditor *editor, gint record, gint service, const gchar *name, gint location) { - GtkWidget *service_option_menu; + GtkWidget *service_combo_box; #ifdef ENABLE_IM_LOCATION - GtkWidget *location_option_menu; + GtkWidget *location_combo_box; #endif GtkWidget *name_entry; gchar *widget_name; - widget_name = g_strdup_printf ("optionmenu-im-service-%d", record); - service_option_menu = glade_xml_get_widget (editor->gui, widget_name); + widget_name = g_strdup_printf ("combobox-im-service-%d", record); + service_combo_box = glade_xml_get_widget (editor->gui, widget_name); g_free (widget_name); #ifdef ENABLE_IM_LOCATION - widget_name = g_strdup_printf ("optionmenu-im-location-%d", record); - location_option_menu = glade_xml_get_widget (editor->gui, widget_name); + widget_name = g_strdup_printf ("combobox-im-location-%d", record); + location_combo_box = glade_xml_get_widget (editor->gui, widget_name); g_free (widget_name); #endif @@ -1459,10 +1465,10 @@ fill_in_im_record (EContactEditor *editor, gint record, gint service, const gcha g_free (widget_name); #ifdef ENABLE_IM_LOCATION - set_option_menu_history (editor, GTK_OPTION_MENU (location_option_menu), + set_combo_box_active (editor, GTK_COMBO_BOX (location_combo_box), location >= 0 ? location : 0); #endif - set_option_menu_history (editor, GTK_OPTION_MENU (service_option_menu), + set_combo_box_active (editor, GTK_COMBO_BOX (service_combo_box), service >= 0 ? service : im_service_default [record - 1]); set_entry_text (editor, GTK_ENTRY (name_entry), name ? name : ""); } @@ -1507,20 +1513,20 @@ fill_in_im (EContactEditor *editor) static void extract_im_record (EContactEditor *editor, gint record, gint *service, gchar **name, gint *location) { - GtkWidget *service_option_menu; + GtkWidget *service_combo_box; #ifdef ENABLE_IM_LOCATION - GtkWidget *location_option_menu; + GtkWidget *location_combo_box; #endif GtkWidget *name_entry; gchar *widget_name; - widget_name = g_strdup_printf ("optionmenu-im-service-%d", record); - service_option_menu = glade_xml_get_widget (editor->gui, widget_name); + widget_name = g_strdup_printf ("combobox-im-service-%d", record); + service_combo_box = glade_xml_get_widget (editor->gui, widget_name); g_free (widget_name); #ifdef ENABLE_IM_LOCATION - widget_name = g_strdup_printf ("optionmenu-im-location-%d", record); - location_option_menu = glade_xml_get_widget (editor->gui, widget_name); + widget_name = g_strdup_printf ("combobox-im-location-%d", record); + location_combo_box = glade_xml_get_widget (editor->gui, widget_name); g_free (widget_name); #endif @@ -1529,9 +1535,9 @@ extract_im_record (EContactEditor *editor, gint record, gint *service, gchar **n g_free (widget_name); *name = g_strdup (gtk_entry_get_text (GTK_ENTRY (name_entry))); - *service = gtk_option_menu_get_history (GTK_OPTION_MENU (service_option_menu)); + *service = gtk_combo_box_get_active (GTK_COMBO_BOX (service_combo_box)); #ifdef ENABLE_IM_LOCATION - *location = gtk_option_menu_get_history (GTK_OPTION_MENU (location_option_menu)); + *location = gtk_combo_box_get_active (GTK_COMBO_BOX (location_combo_box)); #else *location = 1; /* set everything to HOME */ #endif @@ -1602,47 +1608,48 @@ extract_im (EContactEditor *editor) g_free (service_attr_list); } static void -sensitize_im_types (EContactEditor *editor, GtkWidget *option_menu) +sensitize_im_types (EContactEditor *editor, GtkWidget *combo_box) { - GtkWidget *menu; - GList *l; - gint i; + GtkTreeModel *model; + GtkTreeIter iter; + gint i; + gboolean valid; - menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (option_menu)); - l = gtk_container_get_children (GTK_CONTAINER (menu)); + model = gtk_combo_box_get_model (GTK_COMBO_BOX (combo_box)); + valid = gtk_tree_model_get_iter_first (model, &iter); for (i = 0; i < G_N_ELEMENTS (im_service); i++) { - GtkWidget *widget; - - if (!l) { - g_warning (G_STRLOC ": Unexpected end of im items in option menu"); + if (!valid) { + g_warning (G_STRLOC ": Unexpected end of im items in combo box"); return; } - widget = l->data; - gtk_widget_set_sensitive (widget, is_field_supported (editor, im_service [i].field)); + gtk_list_store_set ( + GTK_LIST_STORE (model), &iter, + 1, is_field_supported (editor, im_service [i].field), + -1); - l = g_list_next (l); + valid = gtk_tree_model_iter_next (model, &iter); } } static void sensitize_im_record (EContactEditor *editor, gint record, gboolean enabled) { - GtkWidget *service_option_menu; + GtkWidget *service_combo_box; #ifdef ENABLE_IM_LOCATION - GtkWidget *location_option_menu; + GtkWidget *location_combo_box; #endif GtkWidget *name_entry; gchar *widget_name; - widget_name = g_strdup_printf ("optionmenu-im-service-%d", record); - service_option_menu = glade_xml_get_widget (editor->gui, widget_name); + widget_name = g_strdup_printf ("combobox-im-service-%d", record); + service_combo_box = glade_xml_get_widget (editor->gui, widget_name); g_free (widget_name); #ifdef ENABLE_IM_LOCATION - widget_name = g_strdup_printf ("optionmenu-im-location-%d", record); - location_option_menu = glade_xml_get_widget (editor->gui, widget_name); + widget_name = g_strdup_printf ("combobox-im-location-%d", record); + location_combo_box = glade_xml_get_widget (editor->gui, widget_name); g_free (widget_name); #endif @@ -1650,12 +1657,12 @@ sensitize_im_record (EContactEditor *editor, gint record, gboolean enabled) name_entry = glade_xml_get_widget (editor->gui, widget_name); g_free (widget_name); - gtk_widget_set_sensitive (service_option_menu, enabled); + gtk_widget_set_sensitive (service_combo_box, enabled); #ifdef ENABLE_IM_LOCATION - gtk_widget_set_sensitive (location_option_menu, enabled); + gtk_widget_set_sensitive (location_combo_box, enabled); #endif gtk_editable_set_editable (GTK_EDITABLE (name_entry), enabled); - sensitize_im_types (editor, service_option_menu); + sensitize_im_types (editor, service_combo_box); } static void @@ -2103,8 +2110,7 @@ static FieldMapping simple_field_map [] = { { "image-chooser", E_CONTACT_PHOTO, TRUE, TRUE }, { "button-image", E_CONTACT_PHOTO, FALSE, TRUE }, - { "combo-file-as", E_CONTACT_FILE_AS, FALSE, TRUE }, - { "entry-file-as", E_CONTACT_FILE_AS, TRUE, TRUE }, + { "combo-file-as", E_CONTACT_FILE_AS, TRUE, TRUE }, { "accellabel-fileas", E_CONTACT_FILE_AS, FALSE, TRUE }, }; @@ -2117,6 +2123,10 @@ init_simple_field (EContactEditor *editor, GtkWidget *widget) changed_object = G_OBJECT (widget); g_signal_connect_swapped (widget, "activate", G_CALLBACK (entry_activated), editor); } + else if (GTK_IS_COMBO_BOX_ENTRY (widget)) { + changed_object = G_OBJECT (/*gtk_bin_get_child (GTK_BIN*/ (widget)/*)*/); + g_signal_connect_swapped (gtk_bin_get_child (GTK_BIN (widget)), "activate", G_CALLBACK (entry_activated), editor); + } else if (GTK_IS_TEXT_VIEW (widget)) { changed_object = G_OBJECT (gtk_text_view_get_buffer (GTK_TEXT_VIEW (widget))); } @@ -2155,6 +2165,11 @@ fill_in_simple_field (EContactEditor *editor, GtkWidget *widget, gint field_id) gtk_entry_set_text (GTK_ENTRY (widget), STRING_MAKE_NON_NULL (text)); g_free (text); } + else if (GTK_IS_COMBO_BOX_ENTRY (widget)) { + gchar *text = e_contact_get (contact, field_id); + gtk_entry_set_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (widget))), STRING_MAKE_NON_NULL (text)); + g_free (text); + } else if (GTK_IS_TEXT_VIEW (widget)) { GtkTextBuffer *buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (widget)); gchar *text = e_contact_get (contact, field_id); @@ -2220,6 +2235,13 @@ extract_simple_field (EContactEditor *editor, GtkWidget *widget, gint field_id) const gchar *text = gtk_entry_get_text (GTK_ENTRY (widget)); e_contact_set (contact, field_id, (gchar *) text); } + else if (GTK_IS_COMBO_BOX_ENTRY (widget)) { + char *text = gtk_combo_box_get_active_text (GTK_COMBO_BOX (widget)); + + e_contact_set (contact, field_id, text); + + g_free (text); + } else if (GTK_IS_TEXT_VIEW (widget)) { GtkTextBuffer *buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (widget)); GtkTextIter start, end; @@ -2368,8 +2390,8 @@ init_simple (EContactEditor *editor) widget = glade_xml_get_widget (editor->gui, "entry-fullname"); g_signal_connect (widget, "changed", G_CALLBACK (name_entry_changed), editor); - widget = glade_xml_get_widget (editor->gui, "entry-file-as"); - g_signal_connect (widget, "changed", G_CALLBACK (file_as_entry_changed), editor); + widget = glade_xml_get_widget (editor->gui, "combo-file-as"); + g_signal_connect (widget, "changed", G_CALLBACK (file_as_combo_changed), editor); widget = glade_xml_get_widget (editor->gui, "entry-company"); g_signal_connect (widget, "changed", G_CALLBACK (company_entry_changed), editor); } @@ -2991,7 +3013,7 @@ save_contact (EContactEditor *ce, gboolean should_close) } entry_fullname = glade_xml_get_widget (ce->gui, "entry-fullname" ); - entry_file_as = glade_xml_get_widget (ce->gui, "entry-file-as"); + entry_file_as = gtk_bin_get_child (GTK_BIN (glade_xml_get_widget (ce->gui, "combo-file-as"))); company_name = glade_xml_get_widget (ce->gui, "entry-company"); name_entry_string = gtk_entry_get_text (GTK_ENTRY (entry_fullname)); file_as_entry_string = gtk_entry_get_text (GTK_ENTRY (entry_file_as)); diff --git a/addressbook/gui/contact-editor/fullname.glade b/addressbook/gui/contact-editor/fullname.glade index 2271304017..6520dfa472 100644 --- a/addressbook/gui/contact-editor/fullname.glade +++ b/addressbook/gui/contact-editor/fullname.glade @@ -15,6 +15,8 @@ <property name="skip_pager_hint">False</property> <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property> <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> + <property name="focus_on_map">True</property> + <property name="urgency_hint">False</property> <property name="has_separator">False</property> <child internal-child="vbox"> @@ -73,420 +75,6 @@ <property name="column_spacing">6</property> <child> - <widget class="GtkCombo" id="combo-title"> - <property name="visible">True</property> - <property name="value_in_list">False</property> - <property name="allow_empty">True</property> - <property name="case_sensitive">False</property> - <property name="enable_arrow_keys">True</property> - <property name="enable_arrows_always">False</property> - <accessibility> - <atkrelation target="label-title" type="labelled-by"/> - </accessibility> - - <child internal-child="entry"> - <widget class="GtkEntry" id="entry-title"> - <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> - </child> - - <child internal-child="list"> - <widget class="GtkList" id="convertwidget1"> - <property name="visible">True</property> - <property name="selection_mode">GTK_SELECTION_BROWSE</property> - - <child> - <widget class="GtkListItem" id="convertwidget2"> - <property name="visible">True</property> - - <child> - <widget class="GtkLabel" id="convertwidget3"> - <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.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - </child> - </widget> - </child> - - <child> - <widget class="GtkListItem" id="convertwidget4"> - <property name="visible">True</property> - - <child> - <widget class="GtkLabel" id="convertwidget5"> - <property name="visible">True</property> - <property name="label" translatable="yes">Mr.</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.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - </child> - </widget> - </child> - - <child> - <widget class="GtkListItem" id="convertwidget6"> - <property name="visible">True</property> - - <child> - <widget class="GtkLabel" id="convertwidget7"> - <property name="visible">True</property> - <property name="label" translatable="yes">Mrs.</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.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - </child> - </widget> - </child> - - <child> - <widget class="GtkListItem" id="convertwidget8"> - <property name="visible">True</property> - - <child> - <widget class="GtkLabel" id="convertwidget9"> - <property name="visible">True</property> - <property name="label" translatable="yes">Ms.</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.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - </child> - </widget> - </child> - - <child> - <widget class="GtkListItem" id="convertwidget10"> - <property name="visible">True</property> - - <child> - <widget class="GtkLabel" id="convertwidget11"> - <property name="visible">True</property> - <property name="label" translatable="yes">Miss</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.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - </child> - </widget> - </child> - - <child> - <widget class="GtkListItem" id="convertwidget12"> - <property name="visible">True</property> - - <child> - <widget class="GtkLabel" id="convertwidget13"> - <property name="visible">True</property> - <property name="label" translatable="yes">Dr.</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.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - </child> - </widget> - </child> - - <child> - <widget class="GtkListItem" id="convertwidget14"> - <property name="visible">True</property> - - <child> - <widget class="GtkLabel" id="convertwidget15"> - <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.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - </child> - </widget> - </child> - </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="GtkCombo" id="combo-suffix"> - <property name="visible">True</property> - <property name="value_in_list">False</property> - <property name="allow_empty">True</property> - <property name="case_sensitive">False</property> - <property name="enable_arrow_keys">True</property> - <property name="enable_arrows_always">False</property> - <accessibility> - <atkrelation target="label-suffix" type="labelled-by"/> - </accessibility> - - <child internal-child="entry"> - <widget class="GtkEntry" id="entry-suffix"> - <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> - </child> - - <child internal-child="list"> - <widget class="GtkList" id="convertwidget16"> - <property name="visible">True</property> - <property name="selection_mode">GTK_SELECTION_BROWSE</property> - - <child> - <widget class="GtkListItem" id="convertwidget17"> - <property name="visible">True</property> - - <child> - <widget class="GtkLabel" id="convertwidget18"> - <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.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - </child> - </widget> - </child> - - <child> - <widget class="GtkListItem" id="convertwidget19"> - <property name="visible">True</property> - - <child> - <widget class="GtkLabel" id="convertwidget20"> - <property name="visible">True</property> - <property name="label" translatable="yes">Sr.</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.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - </child> - </widget> - </child> - - <child> - <widget class="GtkListItem" id="convertwidget21"> - <property name="visible">True</property> - - <child> - <widget class="GtkLabel" id="convertwidget22"> - <property name="visible">True</property> - <property name="label" translatable="yes">Jr.</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.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - </child> - </widget> - </child> - - <child> - <widget class="GtkListItem" id="convertwidget23"> - <property name="visible">True</property> - - <child> - <widget class="GtkLabel" id="convertwidget24"> - <property name="visible">True</property> - <property name="label" translatable="yes">I</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.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - </child> - </widget> - </child> - - <child> - <widget class="GtkListItem" id="convertwidget25"> - <property name="visible">True</property> - - <child> - <widget class="GtkLabel" id="convertwidget26"> - <property name="visible">True</property> - <property name="label" translatable="yes">II</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.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - </child> - </widget> - </child> - - <child> - <widget class="GtkListItem" id="convertwidget27"> - <property name="visible">True</property> - - <child> - <widget class="GtkLabel" id="convertwidget28"> - <property name="visible">True</property> - <property name="label" translatable="yes">III</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.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - </child> - </widget> - </child> - - <child> - <widget class="GtkListItem" id="convertwidget29"> - <property name="visible">True</property> - - <child> - <widget class="GtkLabel" id="convertwidget30"> - <property name="visible">True</property> - <property name="label" translatable="yes">Esq.</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.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - </child> - </widget> - </child> - - <child> - <widget class="GtkListItem" id="convertwidget31"> - <property name="visible">True</property> - - <child> - <widget class="GtkLabel" id="convertwidget32"> - <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.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - </child> - </widget> - </child> - </widget> - </child> - </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="GtkEntry" id="entry-first"> <property name="visible">True</property> <property name="can_focus">True</property> @@ -563,6 +151,10 @@ <property name="xpad">0</property> <property name="ypad">0</property> <property name="mnemonic_widget">entry-first</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> @@ -587,7 +179,10 @@ <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> - <property name="mnemonic_widget">entry-title</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> @@ -613,6 +208,10 @@ <property name="xpad">0</property> <property name="ypad">0</property> <property name="mnemonic_widget">entry-middle</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> @@ -638,6 +237,10 @@ <property name="xpad">0</property> <property name="ypad">0</property> <property name="mnemonic_widget">entry-last</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> @@ -662,7 +265,10 @@ <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> - <property name="mnemonic_widget">entry-suffix</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> @@ -673,6 +279,53 @@ <property name="y_options">fill</property> </packing> </child> + + <child> + <widget class="GtkComboBoxEntry" id="comboentry-title"> + <property name="visible">True</property> + <property name="items" translatable="yes"> +Mr. +Mrs. +Ms. +Miss +Dr.</property> + <property name="add_tearoffs">False</property> + <property name="has_frame">True</property> + <property name="focus_on_click">True</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="x_options">fill</property> + <property name="y_options">fill</property> + </packing> + </child> + + <child> + <widget class="GtkComboBoxEntry" id="comboentry-suffix"> + <property name="visible">True</property> + <property name="items" translatable="yes"> +Sr. +Jr. +I +II +III +Esq.</property> + <property name="add_tearoffs">False</property> + <property name="has_frame">True</property> + <property name="focus_on_click">True</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="x_options">fill</property> + <property name="y_options">fill</property> + </packing> + </child> </widget> <packing> <property name="padding">0</property> diff --git a/addressbook/printing/Makefile.am b/addressbook/printing/Makefile.am index 12be8759d4..8db1e7d889 100644 --- a/addressbook/printing/Makefile.am +++ b/addressbook/printing/Makefile.am @@ -4,9 +4,6 @@ ecps_DATA = \ medbook.ecps \ phonelist.ecps -glade_DATA = \ - e-contact-print.glade - INCLUDES = \ -DG_LOG_DOMAIN=\"addressbook-printing\" \ -I$(top_srcdir)/addressbook \ @@ -21,8 +18,6 @@ noinst_LTLIBRARIES = \ libecontactprint.la libecontactprint_la_SOURCES = \ - e-contact-print-style-editor.c \ - e-contact-print-style-editor.h \ e-contact-print-types.h \ e-contact-print.c \ e-contact-print.h @@ -32,8 +27,7 @@ libecontactprint_la_LIBADD = \ $(top_builddir)/widgets/misc/libemiscwidgets.la noinst_PROGRAMS = \ - contact-print-test \ - contact-print-style-editor-test + contact-print-test contact_print_test_SOURCES = \ test-print.c @@ -44,17 +38,11 @@ contact_print_test_LDADD = \ $(top_builddir)/e-util/libeutil.la \ $(EVOLUTION_ADDRESSBOOK_LIBS) -contact_print_style_editor_test_SOURCES = \ - test-contact-print-style-editor.c - contact_print_style_editor_test_LDADD = \ libecontactprint.la \ $(top_builddir)/addressbook/util/libeabutil.la \ $(top_builddir)/e-util/libeutil.la \ $(EVOLUTION_ADDRESSBOOK_LIBS) - - EXTRA_DIST = \ - $(glade_DATA) \ $(ecps_DATA) diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 306e5bda37..285c5ce9db 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,28 @@ +2009-04-24 Milan Crha <mcrha@redhat.com> + + ** Fix for bug #572348 + + * gui/dialogs/task-page.glade: + * gui/dialogs/task-page.c: + * gui/dialogs/task-details-page.glade: + * gui/dialogs/task-details-page.c: + * gui/dialogs/recurrence-page.glade: + * gui/dialogs/recurrence-page.c: + * gui/dialogs/alarm-dialog.glade: + * gui/dialogs/alarm-dialog.c: + * gui/dialogs/event-page.glade: + * gui/dialogs/event-page.c: + * gui/dialogs/memo-page.glade: + * gui/dialogs/memo-page.c: + * gui/goto-dialog.glade: + * gui/goto.c: + * gui/e-itip-control.c: + Remove deprecated Gtk+ symbols. + + * gui/dialogs/Makefile.am: + * gui/dialogs/meeting-page.glade: + Remove death files. + 2009-04-13 Chenthill Palanisamy <pchenthill@novell.com> Fixes #561312 diff --git a/calendar/gui/dialogs/Makefile.am b/calendar/gui/dialogs/Makefile.am index 6dd8a4cd77..c6d61101a8 100644 --- a/calendar/gui/dialogs/Makefile.am +++ b/calendar/gui/dialogs/Makefile.am @@ -89,7 +89,6 @@ glade_DATA = \ cal-prefs-dialog.glade \ e-delegate-dialog.glade \ event-page.glade \ - meeting-page.glade \ memo-page.glade \ recurrence-page.glade \ schedule-page.glade \ diff --git a/calendar/gui/dialogs/alarm-dialog.c b/calendar/gui/dialogs/alarm-dialog.c index 984c1b756f..3881c85106 100644 --- a/calendar/gui/dialogs/alarm-dialog.c +++ b/calendar/gui/dialogs/alarm-dialog.c @@ -60,18 +60,18 @@ typedef struct { /* Toplevel */ GtkWidget *toplevel; - GtkWidget *action; + GtkWidget *action_combo; GtkWidget *interval_value; - GtkWidget *value_units; - GtkWidget *relative; - GtkWidget *time; + GtkWidget *value_units_combo; + GtkWidget *relative_combo; + GtkWidget *time_combo; /* Alarm repeat widgets */ GtkWidget *repeat_toggle; GtkWidget *repeat_group; GtkWidget *repeat_quantity; GtkWidget *repeat_value; - GtkWidget *repeat_unit; + GtkWidget *repeat_unit_combo; GtkWidget *option_notebook; @@ -118,7 +118,7 @@ enum { DAYS }; -/* Option menu maps */ +/* Combo box maps */ static const int action_map[] = { E_CAL_COMPONENT_ALARM_DISPLAY, E_CAL_COMPONENT_ALARM_AUDIO, @@ -167,18 +167,18 @@ static const int duration_units_map[] = { }; static void populate_widgets_from_alarm (Dialog *dialog); -static void action_selection_done_cb (GtkMenuShell *menu_shell, gpointer data); +static void action_changed_cb (GtkWidget *action_combo, gpointer data); /* Fills the widgets with default values */ static void clear_widgets (Dialog *dialog) { /* Sane defaults */ - e_dialog_option_menu_set (dialog->action, E_CAL_COMPONENT_ALARM_DISPLAY, action_map); + e_dialog_combo_box_set (dialog->action_combo, E_CAL_COMPONENT_ALARM_DISPLAY, action_map); e_dialog_spin_set (dialog->interval_value, 15); - e_dialog_option_menu_set (dialog->value_units, MINUTES, value_map); - e_dialog_option_menu_set (dialog->relative, BEFORE, relative_map); - e_dialog_option_menu_set (dialog->time, E_CAL_COMPONENT_ALARM_TRIGGER_RELATIVE_START, time_map); + e_dialog_combo_box_set (dialog->value_units_combo, MINUTES, value_map); + e_dialog_combo_box_set (dialog->relative_combo, BEFORE, relative_map); + e_dialog_combo_box_set (dialog->time_combo, E_CAL_COMPONENT_ALARM_TRIGGER_RELATIVE_START, time_map); gtk_widget_set_sensitive (dialog->repeat_group, FALSE); gtk_widget_set_sensitive (dialog->dalarm_group, FALSE); @@ -192,8 +192,9 @@ clear_widgets (Dialog *dialog) static void alarm_to_dialog (Dialog *dialog) { - GtkWidget *menu; - GList *l; + GtkTreeModel *model; + GtkTreeIter iter; + gboolean valid; gboolean repeat; ECalComponentAlarmAction action; char *email; @@ -203,12 +204,15 @@ alarm_to_dialog (Dialog *dialog) clear_widgets (dialog); /* Alarm types */ - menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (dialog->action)); - for (i = 0, l = GTK_MENU_SHELL (menu)->children; action_map[i] != -1; i++, l = l->next) { - if (e_cal_get_static_capability (dialog->ecal, action_map_cap[i])) - gtk_widget_set_sensitive (l->data, FALSE); - else - gtk_widget_set_sensitive (l->data, TRUE); + model = gtk_combo_box_get_model (GTK_COMBO_BOX (dialog->action_combo)); + valid = gtk_tree_model_get_iter_first (model, &iter); + for (i = 0; valid && action_map[i] != -1; i++) { + gtk_list_store_set ( + GTK_LIST_STORE (model), &iter, + 1, !e_cal_get_static_capability (dialog->ecal, action_map_cap[i]), + -1); + + valid = gtk_tree_model_iter_next (model, &iter); } /* Set a default address if possible */ @@ -255,17 +259,17 @@ alarm_to_repeat_widgets (Dialog *dialog, ECalComponentAlarm *alarm) return; if ( repeat.duration.minutes ) { - e_dialog_option_menu_set (dialog->repeat_unit, DUR_MINUTES, duration_units_map); + e_dialog_combo_box_set (dialog->repeat_unit_combo, DUR_MINUTES, duration_units_map); e_dialog_spin_set (dialog->repeat_value, repeat.duration.minutes); } if ( repeat.duration.hours ) { - e_dialog_option_menu_set (dialog->repeat_unit, DUR_HOURS, duration_units_map); + e_dialog_combo_box_set (dialog->repeat_unit_combo, DUR_HOURS, duration_units_map); e_dialog_spin_set (dialog->repeat_value, repeat.duration.hours); } if ( repeat.duration.days ) { - e_dialog_option_menu_set (dialog->repeat_unit, DUR_DAYS, duration_units_map); + e_dialog_combo_box_set (dialog->repeat_unit_combo, DUR_DAYS, duration_units_map); e_dialog_spin_set (dialog->repeat_value, repeat.duration.days); } } @@ -285,7 +289,7 @@ repeat_widgets_to_alarm (Dialog *dialog, ECalComponentAlarm *alarm) repeat.repetitions = e_dialog_spin_get_int (dialog->repeat_quantity); memset (&repeat.duration, 0, sizeof (repeat.duration)); - switch (e_dialog_option_menu_get (dialog->repeat_unit, duration_units_map)) { + switch (e_dialog_combo_box_get (dialog->repeat_unit_combo, duration_units_map)) { case DUR_MINUTES: repeat.duration.minutes = e_dialog_spin_get_int (dialog->repeat_value); break; @@ -609,11 +613,11 @@ populate_widgets_from_alarm (Dialog *dialog) /* Alarm Types */ switch ( trigger->type ) { case E_CAL_COMPONENT_ALARM_TRIGGER_RELATIVE_START: - e_dialog_option_menu_set (dialog->time, E_CAL_COMPONENT_ALARM_TRIGGER_RELATIVE_START, time_map); + e_dialog_combo_box_set (dialog->time_combo, E_CAL_COMPONENT_ALARM_TRIGGER_RELATIVE_START, time_map); break; case E_CAL_COMPONENT_ALARM_TRIGGER_RELATIVE_END: - e_dialog_option_menu_set (dialog->time, E_CAL_COMPONENT_ALARM_TRIGGER_RELATIVE_END, time_map); + e_dialog_combo_box_set (dialog->time_combo, E_CAL_COMPONENT_ALARM_TRIGGER_RELATIVE_END, time_map); break; default: g_warning ("%s: Unexpected alarm type (%d)", G_STRLOC, trigger->type); @@ -621,25 +625,25 @@ populate_widgets_from_alarm (Dialog *dialog) switch ( trigger->u.rel_duration.is_neg ){ case 1: - e_dialog_option_menu_set (dialog->relative, BEFORE, relative_map); + e_dialog_combo_box_set (dialog->relative_combo, BEFORE, relative_map); break; case 0: - e_dialog_option_menu_set (dialog->relative, AFTER, relative_map); + e_dialog_combo_box_set (dialog->relative_combo, AFTER, relative_map); break; } if ( trigger->u.rel_duration.days ) { - e_dialog_option_menu_set (dialog->value_units, DAYS, value_map); + e_dialog_combo_box_set (dialog->value_units_combo, DAYS, value_map); e_dialog_spin_set (dialog->interval_value, trigger->u.rel_duration.days); } else if ( trigger->u.rel_duration.hours ) { - e_dialog_option_menu_set (dialog->value_units, HOURS, value_map); + e_dialog_combo_box_set (dialog->value_units_combo, HOURS, value_map); e_dialog_spin_set (dialog->interval_value, trigger->u.rel_duration.hours); } else if ( trigger->u.rel_duration.minutes ) { - e_dialog_option_menu_set (dialog->value_units, MINUTES, value_map); + e_dialog_combo_box_set (dialog->value_units_combo, MINUTES, value_map); e_dialog_spin_set (dialog->interval_value, trigger->u.rel_duration.minutes); } else { - e_dialog_option_menu_set (dialog->value_units, MINUTES, value_map); + e_dialog_combo_box_set (dialog->value_units_combo, MINUTES, value_map); e_dialog_spin_set (dialog->interval_value, 0); } @@ -647,8 +651,8 @@ populate_widgets_from_alarm (Dialog *dialog) alarm_to_repeat_widgets (dialog, dialog->alarm); /* Alarm options */ - e_dialog_option_menu_set (dialog->action, *action, action_map); - action_selection_done_cb (GTK_MENU_SHELL (gtk_option_menu_get_menu (GTK_OPTION_MENU (dialog->action))), dialog); + e_dialog_combo_box_set (dialog->action_combo, *action, action_map); + action_changed_cb (dialog->action_combo, dialog); switch (*action) { case E_CAL_COMPONENT_ALARM_AUDIO: @@ -680,13 +684,13 @@ dialog_to_alarm (Dialog *dialog) /* Fill out the alarm */ memset (&trigger, 0, sizeof (ECalComponentAlarmTrigger)); - trigger.type = e_dialog_option_menu_get (dialog->time, time_map); - if (e_dialog_option_menu_get (dialog->relative, relative_map) == BEFORE) + trigger.type = e_dialog_combo_box_get (dialog->time_combo, time_map); + if (e_dialog_combo_box_get (dialog->relative_combo, relative_map) == BEFORE) trigger.u.rel_duration.is_neg = 1; else trigger.u.rel_duration.is_neg = 0; - switch (e_dialog_option_menu_get (dialog->value_units, value_map)) { + switch (e_dialog_combo_box_get (dialog->value_units_combo, value_map)) { case MINUTES: trigger.u.rel_duration.minutes = e_dialog_spin_get_int (dialog->interval_value); @@ -707,7 +711,7 @@ dialog_to_alarm (Dialog *dialog) } e_cal_component_alarm_set_trigger (dialog->alarm, trigger); - action = e_dialog_option_menu_get (dialog->action, action_map); + action = e_dialog_combo_box_get (dialog->action_combo, action_map); e_cal_component_alarm_set_action (dialog->alarm, action); /* Repeat stuff */ @@ -753,17 +757,17 @@ get_widgets (Dialog *dialog) if (!dialog->toplevel) return FALSE; - dialog->action = GW ("action"); + dialog->action_combo = GW ("action-combobox"); dialog->interval_value = GW ("interval-value"); - dialog->value_units = GW ("value-units"); - dialog->relative = GW ("relative"); - dialog->time = GW ("time"); + dialog->value_units_combo = GW ("value-units-combobox"); + dialog->relative_combo = GW ("relative-combobox"); + dialog->time_combo = GW ("time-combobox"); dialog->repeat_toggle = GW ("repeat-toggle"); dialog->repeat_group = GW ("repeat-group"); dialog->repeat_quantity = GW ("repeat-quantity"); dialog->repeat_value = GW ("repeat-value"); - dialog->repeat_unit = GW ("repeat-unit"); + dialog->repeat_unit_combo = GW ("repeat-unit-combobox"); dialog->option_notebook = GW ("option-notebook"); @@ -787,16 +791,57 @@ get_widgets (Dialog *dialog) #undef GW - return (dialog->action + if (dialog->action_combo) { + const char *actions[] = { + N_("Pop up an alert"), + N_("Play a sound"), + N_("Run a program"), + N_("Send an email") + }; + + GtkComboBox *combo = (GtkComboBox*)dialog->action_combo; + GtkCellRenderer *cell; + GtkListStore *store; + gint i; + + g_return_val_if_fail (combo != NULL, FALSE); + g_return_val_if_fail (GTK_IS_COMBO_BOX (combo), FALSE); + + store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_BOOLEAN); + gtk_combo_box_set_model (combo, GTK_TREE_MODEL (store)); + g_object_unref (store); + + gtk_cell_layout_clear (GTK_CELL_LAYOUT (combo)); + + cell = gtk_cell_renderer_text_new (); + gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo), cell, TRUE); + gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combo), cell, + "text", 0, + "sensitive", 1, + NULL); + + for (i = 0; i < G_N_ELEMENTS (actions); i++) { + GtkTreeIter iter; + + gtk_list_store_append (store, &iter); + gtk_list_store_set ( + store, &iter, + 0, _(actions[i]), + 1, TRUE, + -1); + } + } + + return (dialog->action_combo && dialog->interval_value - && dialog->value_units - && dialog->relative - && dialog->time + && dialog->value_units_combo + && dialog->relative_combo + && dialog->time_combo && dialog->repeat_toggle && dialog->repeat_group && dialog->repeat_quantity && dialog->repeat_value - && dialog->repeat_unit + && dialog->repeat_unit_combo && dialog->option_notebook && dialog->dalarm_group && dialog->dalarm_message @@ -823,7 +868,7 @@ show_options (Dialog *dialog) char *email; e_cal_component_alarm_set_action (dialog->alarm, - e_dialog_option_menu_get (dialog->action, action_map)); + e_dialog_combo_box_get (dialog->action_combo, action_map)); repeat = !e_cal_get_static_capability (dialog->ecal, CAL_STATIC_CAPABILITY_NO_ALARM_REPEAT); @@ -1052,14 +1097,14 @@ malarm_description_changed_cb (GtkWidget *widget, gpointer data) } static void -action_selection_done_cb (GtkMenuShell *menu_shell, gpointer data) +action_changed_cb (GtkWidget *action_combo, gpointer data) { Dialog *dialog = data; char *dir; ECalComponentAlarmAction action; int page = 0, i; - action = e_dialog_option_menu_get (dialog->action, action_map); + action = e_dialog_combo_box_get (dialog->action_combo, action_map); for (i = 0; action_map[i] != -1 ; i++) { if (action == action_map[i]) { page = i; @@ -1102,12 +1147,10 @@ action_selection_done_cb (GtkMenuShell *menu_shell, gpointer data) static void init_widgets (Dialog *dialog) { - GtkWidget *menu; GtkTextBuffer *text_buffer; - menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (dialog->action)); - g_signal_connect (menu, "selection_done", - G_CALLBACK (action_selection_done_cb), + g_signal_connect (dialog->action_combo, "changed", + G_CALLBACK (action_changed_cb), dialog); g_signal_connect (G_OBJECT (dialog->repeat_toggle), "toggled", diff --git a/calendar/gui/dialogs/alarm-dialog.glade b/calendar/gui/dialogs/alarm-dialog.glade index 5a5d4ef291..91b23c5e6d 100644 --- a/calendar/gui/dialogs/alarm-dialog.glade +++ b/calendar/gui/dialogs/alarm-dialog.glade @@ -137,48 +137,10 @@ <property name="spacing">6</property> <child> - <widget class="GtkOptionMenu" id="action"> + <widget class="GtkComboBox" id="action-combobox"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">0</property> - - <child internal-child="menu"> - <widget class="GtkMenu" id="convertwidget1"> - <property name="visible">True</property> - - <child> - <widget class="GtkMenuItem" id="convertwidget2"> - <property name="visible">True</property> - <property name="label" translatable="yes">Pop up an alert</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget3"> - <property name="visible">True</property> - <property name="label" translatable="yes">Play a sound</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget4"> - <property name="visible">True</property> - <property name="label" translatable="yes">Run a program</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="send_an_email1"> - <property name="visible">True</property> - <property name="label" translatable="yes">Send an email</property> - <property name="use_underline">True</property> - </widget> - </child> - </widget> - </child> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> </widget> <packing> <property name="padding">0</property> @@ -207,40 +169,13 @@ </child> <child> - <widget class="GtkOptionMenu" id="value-units"> + <widget class="GtkComboBox" id="value-units-combobox"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">0</property> - - <child internal-child="menu"> - <widget class="GtkMenu" id="convertwidget5"> - <property name="visible">True</property> - - <child> - <widget class="GtkMenuItem" id="convertwidget6"> - <property name="visible">True</property> - <property name="label" translatable="yes">minute(s)</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget7"> - <property name="visible">True</property> - <property name="label" translatable="yes">hour(s)</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget8"> - <property name="visible">True</property> - <property name="label" translatable="yes">day(s)</property> - <property name="use_underline">True</property> - </widget> - </child> - </widget> - </child> + <property name="items" translatable="yes">minute(s) +hour(s) +day(s)</property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> </widget> <packing> <property name="padding">0</property> @@ -250,32 +185,12 @@ </child> <child> - <widget class="GtkOptionMenu" id="relative"> + <widget class="GtkComboBox" id="relative-combobox"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">0</property> - - <child internal-child="menu"> - <widget class="GtkMenu" id="convertwidget9"> - <property name="visible">True</property> - - <child> - <widget class="GtkMenuItem" id="convertwidget10"> - <property name="visible">True</property> - <property name="label" translatable="yes">before</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget11"> - <property name="visible">True</property> - <property name="label" translatable="yes">after</property> - <property name="use_underline">True</property> - </widget> - </child> - </widget> - </child> + <property name="items" translatable="yes">before +after</property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> </widget> <packing> <property name="padding">0</property> @@ -285,32 +200,12 @@ </child> <child> - <widget class="GtkOptionMenu" id="time"> + <widget class="GtkComboBox" id="time-combobox"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">0</property> - - <child internal-child="menu"> - <widget class="GtkMenu" id="convertwidget12"> - <property name="visible">True</property> - - <child> - <widget class="GtkMenuItem" id="convertwidget13"> - <property name="visible">True</property> - <property name="label" translatable="yes">start of appointment</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget14"> - <property name="visible">True</property> - <property name="label" translatable="yes">end of appointment</property> - <property name="use_underline">True</property> - </widget> - </child> - </widget> - </child> + <property name="items" translatable="yes">start of appointment +end of appointment</property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> </widget> <packing> <property name="padding">0</property> @@ -485,40 +380,13 @@ </child> <child> - <widget class="GtkOptionMenu" id="repeat-unit"> + <widget class="GtkComboBox" id="repeat-unit-combobox"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">0</property> - - <child internal-child="menu"> - <widget class="GtkMenu" id="convertwidget1"> - <property name="visible">True</property> - - <child> - <widget class="GtkMenuItem" id="convertwidget2"> - <property name="visible">True</property> - <property name="label" translatable="yes">minutes</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget3"> - <property name="visible">True</property> - <property name="label" translatable="yes">hours</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget4"> - <property name="visible">True</property> - <property name="label" translatable="yes">days</property> - <property name="use_underline">True</property> - </widget> - </child> - </widget> - </child> + <property name="items" translatable="yes">minutes +hours +days</property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> </widget> <packing> <property name="padding">0</property> diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c index 03447bf3a2..2644afb05b 100644 --- a/calendar/gui/dialogs/event-page.c +++ b/calendar/gui/dialogs/event-page.c @@ -98,7 +98,7 @@ struct _EventPagePrivate { GtkWidget *start_time; GtkWidget *end_time; - GtkWidget *end_time_selector; + GtkWidget *end_time_combo; GtkWidget *time_hour; GtkWidget *hour_selector; GtkWidget *minute_selector; @@ -115,7 +115,7 @@ struct _EventPagePrivate { gboolean show_time_as_busy; GtkWidget *alarm_dialog; - GtkWidget *alarm_time; + GtkWidget *alarm_time_combo; GtkWidget *alarm_warning; GtkWidget *alarm_box; @@ -174,7 +174,7 @@ static void set_attendees (ECalComponent *comp, const GPtrArray *attendees); static void hour_sel_changed ( GtkSpinButton *widget, EventPage *epage); static void minute_sel_changed ( GtkSpinButton *widget, EventPage *epage); static void hour_minute_changed ( EventPage *epage); -static void update_end_time_selector( EventPage *epage); +static void update_end_time_combo ( EventPage *epage); static void event_page_select_organizer (EventPage *epage, const char *backend_address); static void set_subscriber_info_string (EventPage *epage, const char *backend_address); @@ -354,8 +354,8 @@ set_all_day (EventPage *epage, gboolean all_day) /* TODO implement for in end time selector */ if (all_day) - gtk_option_menu_set_history (GTK_OPTION_MENU (priv->end_time_selector), 1); - gtk_widget_set_sensitive (priv->end_time_selector, !all_day); + gtk_combo_box_set_active (GTK_COMBO_BOX (priv->end_time_combo), 1); + gtk_widget_set_sensitive (priv->end_time_combo, !all_day); e_date_edit_set_show_time (E_DATE_EDIT (priv->start_time), !all_day); e_date_edit_set_show_time (E_DATE_EDIT (priv->end_time), !all_day); @@ -450,7 +450,7 @@ update_time (EventPage *epage, ECalComponentDateTime *start_date, ECalComponentD priv->sync_timezones = TRUE; - update_end_time_selector (epage); + update_end_time_combo (epage); } /* Fills the widgets with default values */ @@ -488,7 +488,7 @@ clear_widgets (EventPage *epage) set_busy_time_menu (epage, TRUE); /* Alarm */ - e_dialog_option_menu_set (priv->alarm_time, ALARM_NONE, alarm_map); + e_dialog_combo_box_set (priv->alarm_time_combo, ALARM_NONE, alarm_map); /* Categories */ e_dialog_editable_set (priv->categories, NULL); @@ -728,9 +728,9 @@ sensitize_widgets (EventPage *epage) sensitize = !read_only && sens; - alarm = e_dialog_option_menu_get (priv->alarm_time, alarm_map) != ALARM_NONE; + alarm = e_dialog_combo_box_get (priv->alarm_time_combo, alarm_map) != ALARM_NONE; custom = is_custom_alarm_store (priv->alarm_list_store, priv->old_summary, priv->alarm_units, priv->alarm_interval, NULL) || - e_dialog_option_menu_get (priv->alarm_time, alarm_map) == ALARM_CUSTOM ? TRUE:FALSE; + e_dialog_combo_box_get (priv->alarm_time_combo, alarm_map) == ALARM_CUSTOM ? TRUE:FALSE; if (alarm && !priv->alarm_icon) { priv->alarm_icon = create_image_event_box ("stock_bell", _("This event has alarms")); @@ -740,7 +740,7 @@ sensitize_widgets (EventPage *epage) /* The list of organizers is set to be non-editable. Otherwise any * change in the displayed list causes an 'Account not found' error. */ - gtk_editable_set_editable (GTK_EDITABLE (GTK_COMBO (priv->organizer)->entry), FALSE); + gtk_editable_set_editable (GTK_EDITABLE (gtk_bin_get_child (GTK_BIN (priv->organizer))), FALSE); gtk_editable_set_editable (GTK_EDITABLE (priv->summary), !read_only); gtk_editable_set_editable (GTK_EDITABLE (priv->location), sensitize); @@ -750,16 +750,16 @@ sensitize_widgets (EventPage *epage) gtk_widget_set_sensitive (priv->end_time, sensitize); gtk_widget_set_sensitive (priv->end_timezone, sensitize); gtk_text_view_set_editable (GTK_TEXT_VIEW (priv->description), !read_only); - gtk_widget_set_sensitive (priv->alarm_time, !read_only); + gtk_widget_set_sensitive (priv->alarm_time_combo, !read_only); gtk_widget_set_sensitive (priv->categories_btn, !read_only); /*TODO implement the for portion of the end time selector */ if (flags & COMP_EDITOR_NEW_ITEM) { if (priv->all_day_event) - gtk_option_menu_set_history (GTK_OPTION_MENU (priv->end_time_selector), 1); + gtk_combo_box_set_active (GTK_COMBO_BOX (priv->end_time_combo), 1); else - gtk_option_menu_set_history (GTK_OPTION_MENU (priv->end_time_selector), 0); + gtk_combo_box_set_active (GTK_COMBO_BOX (priv->end_time_combo), 0); } else - gtk_option_menu_set_history (GTK_OPTION_MENU (priv->end_time_selector), 1); + gtk_combo_box_set_active (GTK_COMBO_BOX (priv->end_time_combo), 1); gtk_widget_set_sensitive (priv->hour_selector, sensitize); gtk_widget_set_sensitive (priv->minute_selector, sensitize); @@ -856,7 +856,7 @@ get_current_account (EventPage *epage) priv = epage->priv; - str = gtk_entry_get_text (GTK_ENTRY (GTK_COMBO (priv->organizer)->entry)); + str = gtk_entry_get_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (priv->organizer)))); if (!str) return NULL; @@ -960,7 +960,6 @@ event_page_fill_widgets (CompEditorPage *page, ECalComponent *comp) if (organizer.value != NULL) { const gchar *strip = itip_strip_mailto (organizer.value); gchar *string; - GList *list = NULL; if (itip_organizer_is_user (comp, client) || itip_sentby_is_user (comp, client)) { if (e_cal_get_static_capability ( @@ -986,13 +985,15 @@ event_page_fill_widgets (CompEditorPage *page, ECalComponent *comp) string = g_strdup (strip); if (!priv->user_org) { - list = g_list_append (list, string); - gtk_combo_set_popdown_strings (GTK_COMBO (priv->organizer), list); - gtk_editable_set_editable (GTK_EDITABLE (GTK_COMBO (priv->organizer)->entry), FALSE); + gtk_list_store_clear (GTK_LIST_STORE (gtk_combo_box_get_model (GTK_COMBO_BOX (priv->organizer)))); + gtk_combo_box_append_text (GTK_COMBO_BOX (priv->organizer), string); + gtk_combo_box_set_active (GTK_COMBO_BOX (priv->organizer), 0); + gtk_editable_set_editable (GTK_EDITABLE (gtk_bin_get_child (GTK_BIN (priv->organizer))), FALSE); + } else { + gtk_entry_set_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (priv->organizer))), string); } g_free (string); - g_list_free (list); priv->existing = TRUE; } } else { @@ -1039,7 +1040,7 @@ event_page_fill_widgets (CompEditorPage *page, ECalComponent *comp) e_cal_component_free_datetime (&start_date); e_cal_component_free_datetime (&end_date); - update_end_time_selector (epage); + update_end_time_combo (epage); /* Classification */ e_cal_component_get_classification (comp, &cl); comp_editor_set_classification (editor, cl); @@ -1064,7 +1065,7 @@ event_page_fill_widgets (CompEditorPage *page, ECalComponent *comp) enable_busy_time_menu (epage, TRUE); /* Alarms */ - g_signal_handlers_block_matched (priv->alarm_time, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, epage); + g_signal_handlers_block_matched (priv->alarm_time_combo, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, epage); g_signal_handlers_block_matched (priv->alarm_list_store, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, epage); if (e_cal_component_has_alarms (comp)) { @@ -1073,9 +1074,9 @@ event_page_fill_widgets (CompEditorPage *page, ECalComponent *comp) alarms = e_cal_component_get_alarm_uids (comp); if (!is_custom_alarm_uid_list (comp, alarms, priv->old_summary, priv->alarm_units, priv->alarm_interval, &alarm_type)) - e_dialog_option_menu_set (priv->alarm_time, alarm_type, alarm_map); + e_dialog_combo_box_set (priv->alarm_time_combo, alarm_type, alarm_map); else - e_dialog_option_menu_set (priv->alarm_time, ALARM_CUSTOM, alarm_map); + e_dialog_combo_box_set (priv->alarm_time_combo, ALARM_CUSTOM, alarm_map); for (list = alarms; list != NULL; list = list->next) { ECalComponentAlarm *ca; @@ -1087,9 +1088,9 @@ event_page_fill_widgets (CompEditorPage *page, ECalComponent *comp) cal_obj_uid_list_free (alarms); } else { - e_dialog_option_menu_set (priv->alarm_time, ALARM_NONE, alarm_map); + e_dialog_combo_box_set (priv->alarm_time_combo, ALARM_NONE, alarm_map); } - g_signal_handlers_unblock_matched (priv->alarm_time, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, epage); + g_signal_handlers_unblock_matched (priv->alarm_time_combo, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, epage); g_signal_handlers_unblock_matched (priv->alarm_list_store, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, epage); /* Categories */ @@ -1281,8 +1282,8 @@ event_page_fill_component (CompEditorPage *page, ECalComponent *comp) /* Alarm */ e_cal_component_remove_all_alarms (comp); - if (e_dialog_option_menu_get (priv->alarm_time, alarm_map) != ALARM_NONE) { - if (e_dialog_option_menu_get (priv->alarm_time, alarm_map) == ALARM_CUSTOM) { + if (e_dialog_combo_box_get (priv->alarm_time_combo, alarm_map) != ALARM_NONE) { + if (e_dialog_combo_box_get (priv->alarm_time_combo, alarm_map) == ALARM_CUSTOM) { GtkTreeModel *model; GtkTreeIter iter; gboolean valid_iter; @@ -1349,7 +1350,7 @@ event_page_fill_component (CompEditorPage *page, ECalComponent *comp) trigger.type = E_CAL_COMPONENT_ALARM_TRIGGER_RELATIVE_START; trigger.u.rel_duration.is_neg = 1; - alarm_type = e_dialog_option_menu_get (priv->alarm_time, alarm_map); + alarm_type = e_dialog_combo_box_get (priv->alarm_time_combo, alarm_map); switch (alarm_type) { case ALARM_15_MINUTES: trigger.u.rel_duration.minutes = 15; @@ -1512,10 +1513,10 @@ event_page_set_dates (CompEditorPage *page, CompEditorPageDates *dates) static void -time_sel_changed (GtkOptionMenu *widget, EventPage *epage) +time_sel_changed (GtkComboBox *combo, EventPage *epage) { EventPagePrivate *priv; - int selection = gtk_option_menu_get_history (widget); + int selection = gtk_combo_box_get_active (combo); priv = epage->priv; @@ -1528,12 +1529,12 @@ time_sel_changed (GtkOptionMenu *widget, EventPage *epage) gtk_widget_show (priv->time_hour); gtk_widget_hide (priv->end_time); - update_end_time_selector ( epage); + update_end_time_combo ( epage); } } static -void update_end_time_selector (EventPage *epage) +void update_end_time_combo (EventPage *epage) { EventPagePrivate *priv; struct icaltimetype start_tt = icaltime_null_time(); @@ -2024,11 +2025,11 @@ event_page_set_all_day_event (EventPage *epage, gboolean all_day) g_return_if_fail (date_set); /* TODO implement the for portion in end time selector */ - gtk_widget_set_sensitive (priv->end_time_selector, !all_day); + gtk_widget_set_sensitive (priv->end_time_combo, !all_day); if (all_day) - gtk_option_menu_set_history (GTK_OPTION_MENU (priv->end_time_selector), 1); + gtk_combo_box_set_active (GTK_COMBO_BOX (priv->end_time_combo), 1); else - gtk_option_menu_set_history (GTK_OPTION_MENU (priv->end_time_selector), 0); + gtk_combo_box_set_active (GTK_COMBO_BOX (priv->end_time_combo), 0); action = comp_editor_get_action (editor, "view-time-zone"); gtk_action_set_sensitive (action, !all_day); @@ -2181,7 +2182,7 @@ get_widgets (EventPage *epage) page->accel_group = g_object_ref (accel_groups->data); priv->alarm_dialog = GW ("alarm-dialog"); priv->alarm_box = GW ("custom_box"); - priv->alarm_time = GW ("alarm-time"); + priv->alarm_time_combo = GW ("alarm-time-combobox"); priv->timezone_label = GW ("timezone-label"); priv->start_timezone = GW ("start-timezone"); @@ -2204,7 +2205,10 @@ get_widgets (EventPage *epage) priv->categories = GW ("categories"); priv->categories_btn = GW ("categories-button"); + priv->organizer = GW ("organizer"); + gtk_list_store_clear (GTK_LIST_STORE (gtk_combo_box_get_model (GTK_COMBO_BOX (priv->organizer)))); + priv->summary = GW ("summary"); priv->summary_label = GW ("summary-label"); priv->location = GW ("location"); @@ -2241,7 +2245,7 @@ get_widgets (EventPage *epage) priv->time_hour = GW ("time-hour"); priv->hour_selector = GW ("hour_selector"); priv->minute_selector = GW ("minute_selector"); - priv->end_time_selector = GW ("end-time-selector"); + priv->end_time_combo = GW ("end-time-combobox"); priv->end_time = GW ("end-time"); gtk_widget_show_all (priv->time_hour); @@ -2656,7 +2660,7 @@ alarm_changed_cb (GtkWidget *widget, gpointer data) epage = EVENT_PAGE (data); priv = epage->priv; - if (e_dialog_option_menu_get (priv->alarm_time, alarm_map) != ALARM_NONE) { + if (e_dialog_combo_box_get (priv->alarm_time_combo, alarm_map) != ALARM_NONE) { ECalComponentAlarm *ca; ECalComponentAlarmTrigger trigger; icalcomponent *icalcomp; @@ -2671,7 +2675,7 @@ alarm_changed_cb (GtkWidget *widget, gpointer data) trigger.type = E_CAL_COMPONENT_ALARM_TRIGGER_RELATIVE_START; trigger.u.rel_duration.is_neg = 1; - alarm_type = e_dialog_option_menu_get (priv->alarm_time, alarm_map); + alarm_type = e_dialog_combo_box_get (priv->alarm_time_combo, alarm_map); switch (alarm_type) { case ALARM_15_MINUTES: e_alarm_list_clear (priv->alarm_list_store); @@ -2795,9 +2799,8 @@ init_widgets (EventPage *epage) CompEditor *editor; GtkTextBuffer *text_buffer; icaltimezone *zone; - char *menu_label = NULL; + char *combo_label = NULL; GtkTreeSelection *selection; - GtkWidget *cus_item, *menu; ECal *client; editor = comp_editor_page_get_editor (COMP_EDITOR_PAGE (epage)); @@ -2903,11 +2906,11 @@ init_widgets (EventPage *epage) } /* End time selector */ - gtk_option_menu_set_history (GTK_OPTION_MENU (priv->end_time_selector), 1); + gtk_combo_box_set_active (GTK_COMBO_BOX (priv->end_time_combo), 1); gtk_widget_hide (priv->time_hour); gtk_widget_show (priv->end_time); - g_signal_connect (priv->end_time_selector, "changed", G_CALLBACK (time_sel_changed), epage); - update_end_time_selector ( epage); + g_signal_connect (priv->end_time_combo, "changed", G_CALLBACK (time_sel_changed), epage); + update_end_time_combo ( epage); /* Hour and Minute selector */ gtk_spin_button_set_range( (GtkSpinButton*) priv->hour_selector, 0, G_MAXINT); @@ -2918,50 +2921,40 @@ init_widgets (EventPage *epage) priv->alarm_units = calendar_config_get_default_reminder_units (); priv->alarm_interval = calendar_config_get_default_reminder_interval (); - menu_label = ""; + combo_label = NULL; switch (priv->alarm_units) { case CAL_DAYS: if (priv->alarm_interval != 1) { - menu_label = g_strdup_printf (ngettext("%d day before appointment", "%d days before appointment", priv->alarm_interval), priv->alarm_interval); + combo_label = g_strdup_printf (ngettext("%d day before appointment", "%d days before appointment", priv->alarm_interval), priv->alarm_interval); } break; case CAL_HOURS: if (priv->alarm_interval != 1) { - menu_label = g_strdup_printf (ngettext("%d hour before appointment", "%d hours before appointment", priv->alarm_interval), priv->alarm_interval); + combo_label = g_strdup_printf (ngettext("%d hour before appointment", "%d hours before appointment", priv->alarm_interval), priv->alarm_interval); } break; case CAL_MINUTES: if (priv->alarm_interval != 15) { - menu_label = g_strdup_printf (ngettext("%d minute before appointment", "%d minutes before appointment", priv->alarm_interval), priv->alarm_interval); + combo_label = g_strdup_printf (ngettext("%d minute before appointment", "%d minutes before appointment", priv->alarm_interval), priv->alarm_interval); } break; } - cus_item = gtk_menu_item_new_with_label (menu_label); - if(menu_label[0] != '\0') { - gtk_widget_show (cus_item); + if (combo_label) { + gtk_combo_box_append_text (GTK_COMBO_BOX (priv->alarm_time_combo), combo_label); + g_free (combo_label); } - menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (priv->alarm_time)); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), cus_item); - - cus_item = gtk_menu_item_new_with_label (_("Customize")); - gtk_widget_show (cus_item); - menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (priv->alarm_time)); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), cus_item); - - cus_item = gtk_menu_item_new_with_label (_("None")); - gtk_widget_show (cus_item); - menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (priv->alarm_time)); - gtk_menu_shell_prepend (GTK_MENU_SHELL (menu), cus_item); + gtk_combo_box_append_text (GTK_COMBO_BOX (priv->alarm_time_combo), _("Customize")); + gtk_combo_box_append_text (GTK_COMBO_BOX (priv->alarm_time_combo), _("None")); g_signal_connect_swapped ( - priv->alarm_time, "changed", + priv->alarm_time_combo, "changed", G_CALLBACK (comp_editor_page_changed), epage); g_signal_connect ( - priv->alarm_time, "changed", + priv->alarm_time_combo, "changed", G_CALLBACK (alarm_changed_cb), epage); /* Belongs to priv->description */ @@ -3046,9 +3039,8 @@ event_page_select_organizer (EventPage *epage, const char *backend_address) if (default_address) { if (!priv->comp || !e_cal_component_has_organizer (priv->comp)) { - gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (priv->organizer)->entry), default_address); - /* FIXME: Use accessor functions to access private members of a GtkCombo widget */ - gtk_widget_set_sensitive (GTK_WIDGET (GTK_COMBO (priv->organizer)->button), !subscribed_cal); + gtk_entry_set_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (priv->organizer))), default_address); + gtk_widget_set_sensitive (priv->organizer, !subscribed_cal); } } else g_warning ("No potential organizers!"); @@ -3114,9 +3106,14 @@ event_page_construct (EventPage *epage, EMeetingStore *model) g_object_unref(it); - if (priv->address_strings) - gtk_combo_set_popdown_strings (GTK_COMBO (priv->organizer), priv->address_strings); - else + if (priv->address_strings) { + GList *l; + + for (l = priv->address_strings; l; l = l->next) + gtk_combo_box_append_text (GTK_COMBO_BOX (priv->organizer), l->data); + + gtk_combo_box_set_active (GTK_COMBO_BOX (priv->organizer), 0); + } else g_warning ("No potential organizers!"); if (!init_widgets (epage)) { diff --git a/calendar/gui/dialogs/event-page.glade b/calendar/gui/dialogs/event-page.glade index c7d00dda94..7a57f6b716 100644 --- a/calendar/gui/dialogs/event-page.glade +++ b/calendar/gui/dialogs/event-page.glade @@ -198,7 +198,6 @@ <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> - <property name="mnemonic_widget">organizer-entry</property> <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> <property name="width_chars">-1</property> <property name="single_line_mode">False</property> @@ -392,34 +391,12 @@ <property name="spacing">0</property> <child> - <widget class="GtkOptionMenu" id="end-time-selector"> - <property name="height_request">24</property> + <widget class="GtkComboBox" id="end-time-combobox"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">0</property> - - <child> - <widget class="GtkMenu" id="menu2"> - - <child> - <widget class="GtkMenuItem" id="for1"> - <property name="visible">True</property> - <property name="label" translatable="yes">for</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_for1_activate" last_modification_time="Tue, 18 Oct 2005 03:44:20 GMT"/> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="until1"> - <property name="visible">True</property> - <property name="label" translatable="yes">until</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_until1_activate" last_modification_time="Tue, 18 Oct 2005 03:44:20 GMT"/> - </widget> - </child> - </widget> - </child> + <property name="items" translatable="yes">for +until</property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> </widget> <packing> <property name="padding">12</property> @@ -756,34 +733,13 @@ <property name="spacing">0</property> <child> - <widget class="GtkCombo" id="organizer"> + <widget class="GtkComboBoxEntry" id="organizer"> <property name="visible">True</property> - <property name="value_in_list">False</property> - <property name="allow_empty">True</property> - <property name="case_sensitive">False</property> - <property name="enable_arrow_keys">True</property> - <property name="enable_arrows_always">False</property> - - <child internal-child="entry"> - <widget class="GtkEntry" id="organizer-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> - </child> - - <child internal-child="list"> - <widget class="GtkList" id="combo-list1"> - <property name="visible">True</property> - <property name="selection_mode">GTK_SELECTION_BROWSE</property> - </widget> - </child> + <property name="items" translatable="yes">a +b</property> + <property name="add_tearoffs">False</property> + <property name="has_frame">True</property> + <property name="focus_on_click">True</property> </widget> <packing> <property name="padding">0</property> @@ -1090,7 +1046,6 @@ <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> - <property name="mnemonic_widget">alarm-time</property> <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> <property name="width_chars">-1</property> <property name="single_line_mode">False</property> @@ -1104,42 +1059,13 @@ </child> <child> - <widget class="GtkOptionMenu" id="alarm-time"> + <widget class="GtkComboBox" id="alarm-time-combobox"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">0</property> - - <child> - <widget class="GtkMenu" id="menu1"> - - <child> - <widget class="GtkMenuItem" id="15_minutes_before_appointment1"> - <property name="visible">True</property> - <property name="label" translatable="yes">15 minutes before appointment</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_15_minutes_before_appointment1_activate" last_modification_time="Mon, 10 Oct 2005 02:55:55 GMT"/> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="1_hour_before_appointment1"> - <property name="visible">True</property> - <property name="label" translatable="yes">1 hour before appointment</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_1_hour_before_appointment1_activate" last_modification_time="Mon, 10 Oct 2005 02:55:55 GMT"/> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="1day_before_appointment1"> - <property name="visible">True</property> - <property name="label" translatable="yes">1 day before appointment</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_1day_before_appointment1_activate" last_modification_time="Mon, 10 Oct 2005 02:55:55 GMT"/> - </widget> - </child> - </widget> - </child> + <property name="items" translatable="yes">15 minutes before appointment +1 hour before appointment +1 day before appointment</property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> </widget> <packing> <property name="padding">4</property> diff --git a/calendar/gui/dialogs/meeting-page.glade b/calendar/gui/dialogs/meeting-page.glade index c332d081ca..e69de29bb2 100644 --- a/calendar/gui/dialogs/meeting-page.glade +++ b/calendar/gui/dialogs/meeting-page.glade @@ -1,407 +0,0 @@ -<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*--> -<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd"> - -<glade-interface> - -<widget class="GtkWindow" id="meeting-toplevel"> - <property name="title" translatable="no">window1</property> - <property name="type">GTK_WINDOW_TOPLEVEL</property> - <property name="window_position">GTK_WIN_POS_NONE</property> - <property name="modal">False</property> - <property name="resizable">True</property> - <property name="destroy_with_parent">False</property> - <property name="decorated">True</property> - <property name="skip_taskbar_hint">False</property> - <property name="skip_pager_hint">False</property> - <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property> - <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> - <property name="focus_on_map">True</property> - - <child> - <widget class="GtkVBox" id="meeting-page"> - <property name="border_width">12</property> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">6</property> - - <child> - <widget class="GtkVBox" id="vbox1"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">6</property> - - <child> - <widget class="GtkHBox" id="organizer-table"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">12</property> - - <child> - <widget class="GtkLabel" id="label10"> - <property name="visible">True</property> - <property name="label" translatable="yes">Or_ganizer:</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.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="mnemonic_widget">organizer-entry</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> - - <child> - <widget class="GtkCombo" id="organizer"> - <property name="visible">True</property> - <property name="value_in_list">True</property> - <property name="allow_empty">False</property> - <property name="case_sensitive">False</property> - <property name="enable_arrow_keys">True</property> - <property name="enable_arrows_always">False</property> - <accessibility> - <atkproperty name="AtkObject::accessible_name" translatable="yes">Organizer</atkproperty> - </accessibility> - - <child internal-child="entry"> - <widget class="GtkEntry" id="organizer-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> - </child> - - <child internal-child="list"> - <widget class="GtkList" id="convertwidget1"> - <property name="visible">True</property> - <property name="selection_mode">GTK_SELECTION_BROWSE</property> - - <child> - <widget class="GtkListItem" id="convertwidget2"> - <property name="visible">True</property> - - <child> - <widget class="GtkLabel" id="convertwidget3"> - <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.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> - </child> - </widget> - </child> - </widget> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkHBox" id="existing-organizer-table"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">12</property> - - <child> - <widget class="GtkLabel" id="org-label"> - <property name="visible">True</property> - <property name="label" translatable="yes">Organizer:</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.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="mnemonic_widget">organizer-entry</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> - - <child> - <widget class="GtkLabel" id="existing-organizer"> - <property name="visible">True</property> - <property name="label" translatable="yes">None</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_CENTER</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> - - <child> - <widget class="GtkButton" id="existing-organizer-button"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">C_hange Organizer</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="attendees-label"> - <property name="visible">True</property> - <property name="label" translatable="yes"><b>Att_endees</b></property> - <property name="use_underline">True</property> - <property name="use_markup">True</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> - - <child> - <widget class="GtkHBox" id="list-box"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">12</property> - - <child> - <widget class="GtkVButtonBox" id="vbuttonbox1"> - <property name="visible">True</property> - <property name="layout_style">GTK_BUTTONBOX_START</property> - <property name="spacing">6</property> - - <child> - <widget class="GtkButton" id="add-attendee"> - <property name="visible">True</property> - <property name="can_default">True</property> - <property name="can_focus">True</property> - <property name="label">gtk-add</property> - <property name="use_stock">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - </widget> - </child> - - <child> - <widget class="GtkButton" id="remove-attendee"> - <property name="visible">True</property> - <property name="can_default">True</property> - <property name="can_focus">True</property> - <property name="label">gtk-remove</property> - <property name="use_stock">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - </widget> - </child> - - <child> - <widget class="GtkButton" id="invite"> - <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> - - <child> - <widget class="GtkAlignment" id="alignment1"> - <property name="visible">True</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</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="hbox3"> - <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-jump-to</property> - <property name="icon_size">4</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</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">Co_ntacts...</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.5</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> - <property name="pack_type">GTK_PACK_END</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label7"> - <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.5</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> - - <child> - <placeholder/> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - </widget> - </child> -</widget> - -</glade-interface> diff --git a/calendar/gui/dialogs/memo-page.c b/calendar/gui/dialogs/memo-page.c index 9277a3c111..4f8c37c0a3 100644 --- a/calendar/gui/dialogs/memo-page.c +++ b/calendar/gui/dialogs/memo-page.c @@ -255,7 +255,6 @@ memo_page_fill_widgets (CompEditorPage *page, if (organizer.value != NULL) { const gchar *strip = itip_strip_mailto (organizer.value); gchar *string; - GList *list = NULL; if ( organizer.cn != NULL) string = g_strdup_printf ("%s <%s>", organizer.cn, strip); @@ -263,14 +262,14 @@ memo_page_fill_widgets (CompEditorPage *page, string = g_strdup (strip); if (itip_organizer_is_user (comp, client) || itip_sentby_is_user (comp, client)) { - gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (priv->org_combo)->entry), string); + gtk_entry_set_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (priv->org_combo))), string); } else { - list = g_list_append (list, string); - gtk_combo_set_popdown_strings (GTK_COMBO (priv->org_combo), list); - gtk_editable_set_editable (GTK_EDITABLE (GTK_COMBO (priv->org_combo)->entry), FALSE); + gtk_list_store_clear (GTK_LIST_STORE (gtk_combo_box_get_model (GTK_COMBO_BOX (priv->org_combo)))); + gtk_combo_box_append_text (GTK_COMBO_BOX (priv->org_combo), string); + gtk_combo_box_set_active (GTK_COMBO_BOX (priv->org_combo), 0); + gtk_editable_set_editable (GTK_EDITABLE (gtk_bin_get_child (GTK_BIN (priv->org_combo))), FALSE); } g_free (string); - g_list_free (list); } } @@ -344,7 +343,7 @@ sensitize_widgets (MemoPage *mpage) /* The list of organizers is set to be non-editable. Otherwise any * change in the displayed list causes an 'Account not found' error. */ - gtk_editable_set_editable (GTK_EDITABLE (GTK_COMBO (priv->org_combo)->entry), FALSE); + gtk_editable_set_editable (GTK_EDITABLE (gtk_bin_get_child (GTK_BIN (priv->org_combo))), FALSE); gtk_text_view_set_editable (GTK_TEXT_VIEW (priv->memo_content), sensitize); gtk_widget_set_sensitive (priv->start_date, sensitize); @@ -515,7 +514,7 @@ get_current_account (MemoPage *page) EIterator *it; const char *str; - str = gtk_entry_get_text (GTK_ENTRY (GTK_COMBO (priv->org_combo)->entry)); + str = gtk_entry_get_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (priv->org_combo)))); if (!str) return NULL; @@ -778,6 +777,7 @@ get_widgets (MemoPage *mpage) priv->org_label = GW ("org-label"); priv->org_combo = GW ("org-combo"); + gtk_list_store_clear (GTK_LIST_STORE (gtk_combo_box_get_model (GTK_COMBO_BOX (priv->org_combo)))); priv->to_button = GW ("to-button"); priv->to_hbox = GW ("to-hbox"); @@ -1062,9 +1062,8 @@ memo_page_select_organizer (MemoPage *mpage, const char *backend_address) if (default_address) { if (flags & COMP_EDITOR_NEW_ITEM) { - gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (priv->org_combo)->entry), default_address); - /* FIXME: Use accessor functions to access private members of a GtkCombo widget */ - gtk_widget_set_sensitive (GTK_WIDGET (GTK_COMBO (priv->org_combo)->button), !subscribed_cal); + gtk_entry_set_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (priv->org_combo))), default_address); + gtk_widget_set_sensitive (priv->org_combo, !subscribed_cal); } } else g_warning ("No potential organizers!"); @@ -1132,9 +1131,14 @@ memo_page_construct (MemoPage *mpage) g_object_unref(it); - if (priv->address_strings) - gtk_combo_set_popdown_strings (GTK_COMBO (priv->org_combo), priv->address_strings); - else + if (priv->address_strings) { + GList *l; + + for (l = priv->address_strings; l; l = l->next) + gtk_combo_box_append_text (GTK_COMBO_BOX (priv->org_combo), l->data); + + gtk_combo_box_set_active (GTK_COMBO_BOX (priv->org_combo), 0); + } else g_warning ("No potential organizers!"); gtk_widget_show (priv->org_label); diff --git a/calendar/gui/dialogs/memo-page.glade b/calendar/gui/dialogs/memo-page.glade index 6b65a053d5..b1ff10f3f4 100644 --- a/calendar/gui/dialogs/memo-page.glade +++ b/calendar/gui/dialogs/memo-page.glade @@ -159,7 +159,6 @@ <widget class="GtkLabel" id="label18"> <property name="visible">True</property> <property name="label" translatable="yes">_Description:</property> - <property name="mnemonic_widget">memo_content</property> <property name="use_underline">True</property> <property name="use_markup">False</property> <property name="justify">GTK_JUSTIFY_CENTER</property> @@ -169,6 +168,7 @@ <property name="yalign">0</property> <property name="xpad">0</property> <property name="ypad">0</property> + <property name="mnemonic_widget">memo_content</property> <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> <property name="width_chars">-1</property> <property name="single_line_mode">False</property> @@ -285,7 +285,6 @@ <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> - <property name="mnemonic_widget">combo-entry1</property> <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> <property name="width_chars">-1</property> <property name="single_line_mode">False</property> @@ -428,44 +427,6 @@ </child> <child> - <widget class="GtkCombo" id="org-combo"> - <property name="value_in_list">False</property> - <property name="allow_empty">True</property> - <property name="case_sensitive">False</property> - <property name="enable_arrow_keys">True</property> - <property name="enable_arrows_always">False</property> - - <child internal-child="entry"> - <widget class="GtkEntry" id="combo-entry1"> - <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> - </child> - - <child internal-child="list"> - <widget class="GtkList" id="combo-list1"> - <property name="visible">True</property> - <property name="selection_mode">GTK_SELECTION_BROWSE</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="GtkHBox" id="to-hbox"> <property name="homogeneous">False</property> <property name="spacing">0</property> @@ -485,6 +446,25 @@ <property name="y_options">fill</property> </packing> </child> + + <child> + <widget class="GtkComboBoxEntry" id="org-combo"> + <property name="visible">True</property> + <property name="items" translatable="yes">a +b</property> + <property name="add_tearoffs">False</property> + <property name="has_frame">True</property> + <property name="focus_on_click">True</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="x_options">fill</property> + <property name="y_options">fill</property> + </packing> + </child> </widget> <packing> <property name="padding">0</property> diff --git a/calendar/gui/dialogs/recurrence-page.c b/calendar/gui/dialogs/recurrence-page.c index 15171d52ed..c85a0ae0f2 100644 --- a/calendar/gui/dialogs/recurrence-page.c +++ b/calendar/gui/dialogs/recurrence-page.c @@ -145,9 +145,9 @@ struct _RecurrencePagePrivate { GtkWidget *params; GtkWidget *interval_value; - GtkWidget *interval_unit; + GtkWidget *interval_unit_combo; GtkWidget *special; - GtkWidget *ending_menu; + GtkWidget *ending_combo; GtkWidget *ending_special; GtkWidget *custom_warning_bin; @@ -159,10 +159,10 @@ struct _RecurrencePagePrivate { /* For monthly recurrences, created by hand */ int month_index; - GtkWidget *month_day_menu; + GtkWidget *month_day_combo; enum month_day_options month_day; - GtkWidget *month_num_menu; + GtkWidget *month_num_combo; enum month_num_options month_num; /* For ending date, created by hand */ @@ -343,11 +343,11 @@ recurrence_page_finalize (GObject *object) preview_date_range_changed_cb, NULL); g_signal_handlers_disconnect_matched ( - priv->interval_unit, G_SIGNAL_MATCH_DATA, + priv->interval_unit_combo, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, object); g_signal_handlers_disconnect_matched ( - priv->ending_menu, G_SIGNAL_MATCH_DATA, + priv->ending_combo, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, object); /* Chain up to parent's finalize() method. */ @@ -410,7 +410,6 @@ clear_widgets (RecurrencePage *rpage) { RecurrencePagePrivate *priv; GtkAdjustment *adj; - GtkWidget *menu; priv = rpage->priv; @@ -431,22 +430,20 @@ clear_widgets (RecurrencePage *rpage) e_dialog_spin_set (priv->interval_value, 1); g_signal_handlers_unblock_matched (adj, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage); - menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (priv->interval_unit)); - g_signal_handlers_block_matched (menu, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage); - e_dialog_option_menu_set (priv->interval_unit, + g_signal_handlers_block_matched (priv->interval_unit_combo, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage); + e_dialog_combo_box_set (priv->interval_unit_combo, ICAL_DAILY_RECURRENCE, freq_map); - g_signal_handlers_unblock_matched (menu, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage); + g_signal_handlers_unblock_matched (priv->interval_unit_combo, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage); priv->ending_date_tt = icaltime_today (); priv->ending_count = 1; - menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (priv->ending_menu)); - g_signal_handlers_block_matched (menu, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage); - e_dialog_option_menu_set (priv->ending_menu, + g_signal_handlers_block_matched (priv->ending_combo, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage); + e_dialog_combo_box_set (priv->ending_combo, ENDING_FOR, ending_types_map); - g_signal_handlers_unblock_matched (menu, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage); + g_signal_handlers_unblock_matched (priv->ending_combo, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage); make_ending_special (rpage); /* Exceptions list */ e_date_time_list_clear (priv->exception_list_store); @@ -668,7 +665,7 @@ simple_recur_to_comp (RecurrencePage *rpage, ECalComponent *comp) /* Frequency, interval, week start */ - r.freq = e_dialog_option_menu_get (priv->interval_unit, freq_map); + r.freq = e_dialog_combo_box_get (priv->interval_unit_combo, freq_map); r.interval = e_dialog_spin_get_int (priv->interval_value); r.week_start = ICAL_SUNDAY_WEEKDAY + calendar_config_get_week_start_day (); @@ -721,14 +718,14 @@ simple_recur_to_comp (RecurrencePage *rpage, ECalComponent *comp) enum month_day_options month_day; g_return_if_fail (GTK_BIN (priv->special)->child != NULL); - g_return_if_fail (priv->month_day_menu != NULL); - g_return_if_fail (GTK_IS_OPTION_MENU (priv->month_day_menu)); - g_return_if_fail (priv->month_num_menu != NULL); - g_return_if_fail (GTK_IS_OPTION_MENU (priv->month_num_menu)); + g_return_if_fail (priv->month_day_combo != NULL); + g_return_if_fail (GTK_IS_COMBO_BOX (priv->month_day_combo)); + g_return_if_fail (priv->month_num_combo != NULL); + g_return_if_fail (GTK_IS_COMBO_BOX (priv->month_num_combo)); - month_num = e_dialog_option_menu_get (priv->month_num_menu, + month_num = e_dialog_combo_box_get (priv->month_num_combo, month_num_options_map ); - month_day = e_dialog_option_menu_get (priv->month_day_menu, + month_day = e_dialog_combo_box_get (priv->month_day_combo, month_day_options_map); if (month_num == MONTH_NUM_LAST) @@ -799,8 +796,7 @@ simple_recur_to_comp (RecurrencePage *rpage, ECalComponent *comp) /* Ending date */ - ending_type = e_dialog_option_menu_get (priv->ending_menu, - ending_types_map); + ending_type = e_dialog_combo_box_get (priv->ending_combo, ending_types_map); switch (ending_type) { case ENDING_FOR: @@ -903,8 +899,8 @@ fill_component (RecurrencePage *rpage, ECalComponent *comp) e_cal_component_set_exdate_list (comp, list); e_cal_component_free_exdate_list (list); - if (GTK_WIDGET_VISIBLE (priv->ending_menu) && GTK_WIDGET_IS_SENSITIVE (priv->ending_menu) && - e_dialog_option_menu_get (priv->ending_menu, ending_types_map) == ENDING_UNTIL) { + if (GTK_WIDGET_VISIBLE (priv->ending_combo) && GTK_WIDGET_IS_SENSITIVE (priv->ending_combo) && + e_dialog_combo_box_get (priv->ending_combo, ending_types_map) == ENDING_UNTIL) { /* check whether the "until" date is in the future */ struct icaltimetype tt; gboolean ok = TRUE; @@ -978,44 +974,37 @@ make_weekly_special (RecurrencePage *rpage) G_CALLBACK (comp_editor_page_changed), rpage); } - +/* Creates the subtree for the monthly recurrence number */ static void -month_num_submenu_selection_done_cb (GtkMenuShell *menu_shell, gpointer data) -{ - GtkWidget *item; - int month_index; - - item = gtk_menu_get_active (GTK_MENU (menu_shell)); - item = gtk_menu_get_active (GTK_MENU (gtk_menu_item_get_submenu (GTK_MENU_ITEM (item)))); - - month_index = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (item), "data")); - g_object_set_data (G_OBJECT (data), "data", GINT_TO_POINTER (month_index)); -} - -/* Creates the option menu for the monthly recurrence number */ -static GtkWidget * -make_recur_month_num_submenu (const char *title, int start, int end) +make_recur_month_num_subtree (GtkTreeStore *store, GtkTreeIter *par, const char *title, int start, int end) { - GtkWidget *submenu, *item; + GtkTreeIter iter, parent; int i; - submenu = gtk_menu_new (); + gtk_tree_store_append (store, &parent, par); + gtk_tree_store_set (store, &parent, 0, _(title), 1, -1, -1); + for (i = start; i < end; i++) { - item = gtk_menu_item_new_with_label (_(e_cal_recur_nth[i])); - gtk_menu_shell_append(GTK_MENU_SHELL(submenu), item); - g_object_set_data (G_OBJECT (item), "data", GINT_TO_POINTER (i + 1)); - gtk_widget_show (item); + gtk_tree_store_append (store, &iter, &parent); + gtk_tree_store_set (store, &iter, 0, _(e_cal_recur_nth[i]), 1, i + 1, -1); } +} +static void +only_leaf_sensitive (GtkCellLayout *cell_layout, + GtkCellRenderer *cell, + GtkTreeModel *tree_model, + GtkTreeIter *iter, + gpointer data) +{ + gboolean sensitive; - item = gtk_menu_item_new_with_label (_(title)); - gtk_widget_show (item); - gtk_menu_item_set_submenu (GTK_MENU_ITEM (item), submenu); + sensitive = !gtk_tree_model_iter_has_child (tree_model, iter); - return item; + g_object_set (cell, "sensitive", sensitive, NULL); } static GtkWidget * -make_recur_month_num_menu (int month_index) +make_recur_month_num_combo (int month_index) { static const char *options[] = { /* TRANSLATORS: Entire string is for example: This appointment recurs/Every [x] month(s) on the [first] [Monday] [forever]' @@ -1046,67 +1035,65 @@ make_recur_month_num_menu (int month_index) N_("last") }; - GtkWidget *menu, *submenu, *item, *submenu_item; - GtkWidget *omenu; int i; + GtkTreeStore *store; + GtkTreeIter iter; + GtkWidget *combo; + GtkCellRenderer *cell; - menu = gtk_menu_new (); + store = gtk_tree_store_new (2, G_TYPE_STRING, G_TYPE_INT); /* Relation */ for (i = 0; i < sizeof (options) / sizeof (options[0]); i++) { - item = gtk_menu_item_new_with_label (_(options[i])); - gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); - gtk_widget_show (item); + gtk_tree_store_append (store, &iter, NULL); + gtk_tree_store_set (store, &iter, 0, _(options [i]), 1, month_num_options_map [i], -1); } /* Current date */ - item = gtk_menu_item_new_with_label (_(e_cal_recur_nth[month_index - 1])); - gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); - gtk_widget_show (item); - - /* Other Submenu */ - submenu = gtk_menu_new (); + gtk_tree_store_append (store, &iter, NULL); + gtk_tree_store_set (store, &iter, 0, _(e_cal_recur_nth[month_index - 1]), 1, MONTH_NUM_DAY, -1); + gtk_tree_store_append (store, &iter, NULL); /* TRANSLATORS: Entire string is for example: This appointment recurs/Every [x] month(s) on the [Other date] [11th to 20th] [17th] [forever]' * (dropdown menu options are in [square brackets]). */ - submenu_item = gtk_menu_item_new_with_label (_("Other Date")); - gtk_menu_shell_append(GTK_MENU_SHELL(menu), submenu_item); - gtk_widget_show (submenu_item); + gtk_tree_store_set (store, &iter, 0, _("Other Date"), 1, MONTH_NUM_OTHER, -1); /* TRANSLATORS: This is a submenu option string to split the date range into three submenus to choose the exact day of * the month to setup an appointment recurrence. The entire string is for example: This appointment recurs/Every [x] month(s) * on the [Other date] [1st to 10th] [7th] [forever]' (dropdown menu options are in [square brackets]). */ - item = make_recur_month_num_submenu (_("1st to 10th"), 0, 10); - gtk_menu_shell_append(GTK_MENU_SHELL(submenu), item); + make_recur_month_num_subtree (store, &iter, _("1st to 10th"), 0, 10); + /* TRANSLATORS: This is a submenu option string to split the date range into three submenus to choose the exact day of * the month to setup an appointment recurrence. The entire string is for example: This appointment recurs/Every [x] month(s) * on the [Other date] [11th to 20th] [17th] [forever]' (dropdown menu options are in [square brackets]). */ - item = make_recur_month_num_submenu (_("11th to 20th"), 10, 20); - gtk_menu_shell_append(GTK_MENU_SHELL(submenu), item); + make_recur_month_num_subtree (store, &iter, _("11th to 20th"), 10, 20); + /* TRANSLATORS: This is a submenu option string to split the date range into three submenus to choose the exact day of * the month to setup an appointment recurrence. The entire string is for example: This appointment recurs/Every [x] month(s) * on the [Other date] [21th to 31th] [27th] [forever]' (dropdown menu options are in [square brackets]). */ - item = make_recur_month_num_submenu (_("21st to 31st"), 20, 31); - gtk_menu_shell_append(GTK_MENU_SHELL(submenu), item); + make_recur_month_num_subtree (store, &iter, _("21st to 31st"), 20, 31); + + combo = gtk_combo_box_new_with_model (GTK_TREE_MODEL (store)); + g_object_unref (store); - gtk_menu_item_set_submenu (GTK_MENU_ITEM (submenu_item), submenu); - g_object_set_data (G_OBJECT (submenu_item), "data", GINT_TO_POINTER (month_index)); - g_signal_connect((submenu), "selection_done", - G_CALLBACK (month_num_submenu_selection_done_cb), - submenu_item); + cell = gtk_cell_renderer_text_new (); + gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo), cell, TRUE); + gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combo), cell, "text", 0, NULL); - omenu = gtk_option_menu_new (); - gtk_option_menu_set_menu (GTK_OPTION_MENU (omenu), menu); + gtk_cell_layout_set_cell_data_func (GTK_CELL_LAYOUT (combo), + cell, + only_leaf_sensitive, + NULL, NULL); - return omenu; + return combo; } -/* Creates the option menu for the monthly recurrence days */ +/* Creates the combo box for the monthly recurrence days */ static GtkWidget * -make_recur_month_menu (void) +make_recur_month_combobox (void) { static const char *options[] = { /* For Translator : 'day' is part of the sentence of the form 'appointment recurs/Every [x] month(s) on the [first] [day] [forever]' @@ -1122,76 +1109,80 @@ make_recur_month_menu (void) N_("Sunday") }; - GtkWidget *menu; - GtkWidget *omenu; + GtkWidget *combo; int i; - menu = gtk_menu_new (); + combo = gtk_combo_box_new_text (); for (i = 0; i < sizeof (options) / sizeof (options[0]); i++) { - GtkWidget *item; - - item = gtk_menu_item_new_with_label (_(options[i])); - gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); - gtk_widget_show (item); + gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _(options[i])); } - omenu = gtk_option_menu_new (); - gtk_option_menu_set_menu (GTK_OPTION_MENU (omenu), menu); - - return omenu; + return combo; } static void -month_num_menu_selection_done_cb (GtkMenuShell *menu_shell, - RecurrencePage *rpage) +month_num_combo_changed_cb (GtkComboBox *combo, RecurrencePage *rpage) { + GtkTreeIter iter; RecurrencePagePrivate *priv; enum month_num_options month_num; enum month_day_options month_day; priv = rpage->priv; - month_num = e_dialog_option_menu_get (priv->month_num_menu, - month_num_options_map); - month_day = e_dialog_option_menu_get (priv->month_day_menu, + month_day = e_dialog_combo_box_get (priv->month_day_combo, month_day_options_map); - if (month_num == MONTH_NUM_OTHER) { - GtkWidget *label, *item; + if (gtk_combo_box_get_active_iter (GTK_COMBO_BOX (priv->month_num_combo), &iter)) { + gint value; + GtkTreeIter parent; + GtkTreeModel *model = gtk_combo_box_get_model (GTK_COMBO_BOX (priv->month_num_combo)); + + gtk_tree_model_get (model, &iter, 1, &value, -1); - item = gtk_menu_get_active (GTK_MENU (menu_shell)); - priv->month_index = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (item), "data")); + if (value == -1) { + return; + } + + if (gtk_tree_model_iter_parent (model, &parent, &iter)) { + /* it's a leaf, thus the day number */ + month_num = MONTH_NUM_DAY; + priv->month_index = value; - month_num = MONTH_NUM_DAY; - e_dialog_option_menu_set (priv->month_num_menu, month_num, month_num_options_map); + g_return_if_fail (gtk_tree_model_iter_nth_child (model, &iter, NULL, month_num)); - label = GTK_BIN (priv->month_num_menu)->child; - gtk_label_set_text (GTK_LABEL (label), _(e_cal_recur_nth[priv->month_index - 1])); + gtk_tree_store_set (GTK_TREE_STORE (model), &iter, 0, _(e_cal_recur_nth[priv->month_index - 1]), -1); + gtk_combo_box_set_active_iter (GTK_COMBO_BOX (priv->month_num_combo), &iter); + } else { + /* top level node */ + month_num = value; - e_dialog_option_menu_set (priv->month_num_menu, 0, month_num_options_map); - e_dialog_option_menu_set (priv->month_num_menu, month_num, month_num_options_map); + if (month_num == MONTH_NUM_OTHER) + month_num = MONTH_NUM_DAY; + } + } else { + month_num = 0; } if (month_num == MONTH_NUM_DAY && month_day != MONTH_DAY_NTH) - e_dialog_option_menu_set (priv->month_day_menu, + e_dialog_combo_box_set (priv->month_day_combo, MONTH_DAY_NTH, month_day_options_map); else if (month_num != MONTH_NUM_DAY && month_num != MONTH_NUM_LAST && month_day == MONTH_DAY_NTH) - e_dialog_option_menu_set (priv->month_day_menu, + e_dialog_combo_box_set (priv->month_day_combo, MONTH_DAY_MON, month_num_options_map); comp_editor_page_changed (COMP_EDITOR_PAGE (rpage)); } -/* Callback used when the monthly day selection menu changes. We need +/* Callback used when the monthly day selection changes. We need * to change the valid range of the day index spin button; e.g. days * are 1-31 while a Sunday is the 1st through 5th. */ static void -month_day_menu_selection_done_cb (GtkMenuShell *menu_shell, - RecurrencePage *rpage) +month_day_combo_changed_cb (GtkComboBox *combo, RecurrencePage *rpage) { RecurrencePagePrivate *priv; enum month_num_options month_num; @@ -1199,16 +1190,16 @@ month_day_menu_selection_done_cb (GtkMenuShell *menu_shell, priv = rpage->priv; - month_num = e_dialog_option_menu_get (priv->month_num_menu, + month_num = e_dialog_combo_box_get (priv->month_num_combo, month_num_options_map); - month_day = e_dialog_option_menu_get (priv->month_day_menu, + month_day = e_dialog_combo_box_get (priv->month_day_combo, month_day_options_map); if (month_day == MONTH_DAY_NTH && month_num != MONTH_NUM_LAST && month_num != MONTH_NUM_DAY) - e_dialog_option_menu_set (priv->month_num_menu, + e_dialog_combo_box_set (priv->month_num_combo, MONTH_NUM_DAY, month_num_options_map); else if (month_day != MONTH_DAY_NTH && month_num == MONTH_NUM_DAY) - e_dialog_option_menu_set (priv->month_num_menu, + e_dialog_combo_box_set (priv->month_num_combo, MONTH_NUM_FIRST, month_num_options_map); @@ -1223,12 +1214,11 @@ make_monthly_special (RecurrencePage *rpage) GtkWidget *hbox; GtkWidget *label; GtkAdjustment *adj; - GtkWidget *menu; priv = rpage->priv; g_return_if_fail (GTK_BIN (priv->special)->child == NULL); - g_return_if_fail (priv->month_day_menu == NULL); + g_return_if_fail (priv->month_day_combo == NULL); /* Create the widgets */ @@ -1243,21 +1233,21 @@ make_monthly_special (RecurrencePage *rpage) adj = GTK_ADJUSTMENT (gtk_adjustment_new (1, 1, 31, 1, 10, 10)); - priv->month_num_menu = make_recur_month_num_menu (priv->month_index); - gtk_box_pack_start (GTK_BOX (hbox), priv->month_num_menu, + priv->month_num_combo = make_recur_month_num_combo (priv->month_index); + gtk_box_pack_start (GTK_BOX (hbox), priv->month_num_combo, FALSE, FALSE, 6); - priv->month_day_menu = make_recur_month_menu (); - gtk_box_pack_start (GTK_BOX (hbox), priv->month_day_menu, + priv->month_day_combo = make_recur_month_combobox (); + gtk_box_pack_start (GTK_BOX (hbox), priv->month_day_combo, FALSE, FALSE, 6); gtk_widget_show_all (hbox); /* Set the options */ - e_dialog_option_menu_set (priv->month_num_menu, + e_dialog_combo_box_set (priv->month_num_combo, priv->month_num, month_num_options_map); - e_dialog_option_menu_set (priv->month_day_menu, + e_dialog_combo_box_set (priv->month_day_combo, priv->month_day, month_day_options_map); @@ -1265,14 +1255,8 @@ make_monthly_special (RecurrencePage *rpage) adj, "value-changed", G_CALLBACK (comp_editor_page_changed), rpage); - menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (priv->month_num_menu)); - g_signal_connect((menu), "selection_done", - G_CALLBACK (month_num_menu_selection_done_cb), - rpage); - menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (priv->month_day_menu)); - g_signal_connect((menu), "selection_done", - G_CALLBACK (month_day_menu_selection_done_cb), - rpage); + g_signal_connect (priv->month_num_combo, "changed", G_CALLBACK (month_num_combo_changed_cb), rpage); + g_signal_connect (priv->month_day_combo, "changed", G_CALLBACK (month_day_combo_changed_cb), rpage); } /* Changes the recurrence-special widget to match the interval units. @@ -1290,18 +1274,18 @@ make_recurrence_special (RecurrencePage *rpage) priv = rpage->priv; - if (priv->month_num_menu != NULL) { - gtk_widget_destroy (priv->month_num_menu); - priv->month_num_menu = NULL; + if (priv->month_num_combo != NULL) { + gtk_widget_destroy (priv->month_num_combo); + priv->month_num_combo = NULL; } if (GTK_BIN (priv->special)->child != NULL) { gtk_widget_destroy (GTK_BIN (priv->special)->child); priv->weekday_picker = NULL; - priv->month_day_menu = NULL; + priv->month_day_combo = NULL; } - frequency = e_dialog_option_menu_get (priv->interval_unit, freq_map); + frequency = e_dialog_combo_box_get (priv->interval_unit_combo, freq_map); switch (frequency) { case ICAL_DAILY_RECURRENCE: @@ -1449,8 +1433,7 @@ make_ending_special (RecurrencePage *rpage) priv->ending_count_spin = NULL; } - ending_type = e_dialog_option_menu_get (priv->ending_menu, - ending_types_map); + ending_type = e_dialog_combo_box_get (priv->ending_combo, ending_types_map); switch (ending_type) { case ENDING_FOR: @@ -1480,20 +1463,18 @@ fill_ending_date (RecurrencePage *rpage, struct icalrecurrencetype *r) { RecurrencePagePrivate *priv = rpage->priv; CompEditor *editor; - GtkWidget *menu; ECal *client; editor = comp_editor_page_get_editor (COMP_EDITOR_PAGE (rpage)); client = comp_editor_get_client (editor); - menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (priv->ending_menu)); - g_signal_handlers_block_matched (menu, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage); + g_signal_handlers_block_matched (priv->ending_combo, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage); if (r->count == 0) { if (r->until.year == 0) { /* Forever */ - e_dialog_option_menu_set (priv->ending_menu, + e_dialog_combo_box_set (priv->ending_combo, ENDING_FOREVER, ending_types_map); } else { @@ -1526,7 +1507,7 @@ fill_ending_date (RecurrencePage *rpage, struct icalrecurrencetype *r) } priv->ending_date_tt = r->until; - e_dialog_option_menu_set (priv->ending_menu, + e_dialog_combo_box_set (priv->ending_combo, ENDING_UNTIL, ending_types_map); } @@ -1534,12 +1515,12 @@ fill_ending_date (RecurrencePage *rpage, struct icalrecurrencetype *r) /* Count of occurrences */ priv->ending_count = r->count; - e_dialog_option_menu_set (priv->ending_menu, + e_dialog_combo_box_set (priv->ending_combo, ENDING_FOR, ending_types_map); } - g_signal_handlers_unblock_matched (menu, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage); + g_signal_handlers_unblock_matched (priv->ending_combo, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage); make_ending_special (rpage); } @@ -1564,7 +1545,6 @@ recurrence_page_fill_widgets (CompEditorPage *page, ECalComponent *comp) int n_by_second, n_by_minute, n_by_hour; int n_by_day, n_by_month_day, n_by_year_day; int n_by_week_no, n_by_month, n_by_set_pos; - GtkWidget *menu; GtkAdjustment *adj; rpage = RECURRENCE_PAGE (page); @@ -1673,12 +1653,11 @@ recurrence_page_fill_widgets (CompEditorPage *page, ECalComponent *comp) || n_by_set_pos != 0) goto custom; - menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (priv->interval_unit)); - g_signal_handlers_block_matched (menu, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage); - e_dialog_option_menu_set (priv->interval_unit, + g_signal_handlers_block_matched (priv->interval_unit_combo, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage); + e_dialog_combo_box_set (priv->interval_unit_combo, ICAL_DAILY_RECURRENCE, freq_map); - g_signal_handlers_unblock_matched (menu, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage); + g_signal_handlers_unblock_matched (priv->interval_unit_combo, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage); break; case ICAL_WEEKLY_RECURRENCE: { @@ -1740,12 +1719,11 @@ recurrence_page_fill_widgets (CompEditorPage *page, ECalComponent *comp) priv->weekday_day_mask = day_mask; - menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (priv->interval_unit)); - g_signal_handlers_block_matched (menu, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage); - e_dialog_option_menu_set (priv->interval_unit, + g_signal_handlers_block_matched (priv->interval_unit_combo, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage); + e_dialog_combo_box_set (priv->interval_unit_combo, ICAL_WEEKLY_RECURRENCE, freq_map); - g_signal_handlers_unblock_matched (menu, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage); + g_signal_handlers_unblock_matched (priv->interval_unit_combo, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage); break; } @@ -1840,12 +1818,11 @@ recurrence_page_fill_widgets (CompEditorPage *page, ECalComponent *comp) } else goto custom; - menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (priv->interval_unit)); - g_signal_handlers_block_matched (menu, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage); - e_dialog_option_menu_set (priv->interval_unit, + g_signal_handlers_block_matched (priv->interval_unit_combo, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage); + e_dialog_combo_box_set (priv->interval_unit_combo, ICAL_MONTHLY_RECURRENCE, freq_map); - g_signal_handlers_unblock_matched (menu, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage); + g_signal_handlers_unblock_matched (priv->interval_unit_combo, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage); break; case ICAL_YEARLY_RECURRENCE: @@ -1857,12 +1834,11 @@ recurrence_page_fill_widgets (CompEditorPage *page, ECalComponent *comp) || n_by_set_pos != 0) goto custom; - menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (priv->interval_unit)); - g_signal_handlers_block_matched (menu, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage); - e_dialog_option_menu_set (priv->interval_unit, + g_signal_handlers_block_matched (priv->interval_unit_combo, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage); + e_dialog_combo_box_set (priv->interval_unit_combo, ICAL_YEARLY_RECURRENCE, freq_map); - g_signal_handlers_unblock_matched (menu, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage); + g_signal_handlers_unblock_matched (priv->interval_unit_combo, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage); break; default: @@ -2019,9 +1995,9 @@ get_widgets (RecurrencePage *rpage) priv->params = GW ("params"); priv->interval_value = GW ("interval-value"); - priv->interval_unit = GW ("interval-unit"); + priv->interval_unit_combo = GW ("interval-unit-combobox"); priv->special = GW ("special"); - priv->ending_menu = GW ("ending-menu"); + priv->ending_combo = GW ("ending-combobox"); priv->ending_special = GW ("ending-special"); priv->custom_warning_bin = GW ("custom-warning-bin"); @@ -2037,9 +2013,9 @@ get_widgets (RecurrencePage *rpage) return (priv->recurs && priv->params && priv->interval_value - && priv->interval_unit + && priv->interval_unit_combo && priv->special - && priv->ending_menu + && priv->ending_combo && priv->ending_special && priv->custom_warning_bin && priv->exception_list @@ -2296,19 +2272,19 @@ init_widgets (RecurrencePage *rpage) /* Recurrence units */ g_signal_connect_swapped ( - priv->interval_unit, "changed", + priv->interval_unit_combo, "changed", G_CALLBACK (comp_editor_page_changed), rpage); g_signal_connect_swapped ( - priv->interval_unit, "changed", + priv->interval_unit_combo, "changed", G_CALLBACK (make_recurrence_special), rpage); /* Recurrence ending */ g_signal_connect_swapped ( - priv->ending_menu, "changed", + priv->ending_combo, "changed", G_CALLBACK (comp_editor_page_changed), rpage); g_signal_connect_swapped ( - priv->ending_menu, "changed", + priv->ending_combo, "changed", G_CALLBACK (make_ending_special), rpage); /* Exception buttons */ diff --git a/calendar/gui/dialogs/recurrence-page.glade b/calendar/gui/dialogs/recurrence-page.glade index 14d6c2fa04..5cec3f8494 100644 --- a/calendar/gui/dialogs/recurrence-page.glade +++ b/calendar/gui/dialogs/recurrence-page.glade @@ -4,7 +4,7 @@ <glade-interface> <widget class="GtkWindow" id="recurrence-toplevel"> - <property name="title" translatable="no">window1</property> + <property name="title">window1</property> <property name="type">GTK_WINDOW_TOPLEVEL</property> <property name="window_position">GTK_WIN_POS_NONE</property> <property name="modal">False</property> @@ -15,6 +15,8 @@ <property name="skip_pager_hint">False</property> <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property> <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> + <property name="focus_on_map">True</property> + <property name="urgency_hint">False</property> <child> <widget class="GtkVBox" id="recurrence-page"> @@ -36,6 +38,10 @@ <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> @@ -63,6 +69,10 @@ <property name="yalign">0.5</property> <property name="xpad">12</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> @@ -81,8 +91,7 @@ <widget class="GtkCheckButton" id="recurs"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes" comments="TRANSLATORS: Entire string is for example: - 'This appointment recurs/Every[x][day(s)][for][1]occurrences' (dropdown menu options are in [square brackets])">This appointment rec_urs</property> + <property name="label" translatable="yes" comments="TRANSLATORS: Entire string is for example: 'This appointment recurs/Every[x][day(s)][for][1]occurrences' (dropdown menu options are in [square brackets])">This appointment rec_urs</property> <property name="use_underline">True</property> <property name="relief">GTK_RELIEF_NORMAL</property> <property name="focus_on_click">True</property> @@ -112,8 +121,7 @@ <child> <widget class="GtkLabel" id="label68"> <property name="visible">True</property> - <property name="label" translatable="yes" comments="TRANSLATORS: Entire string is for example: - 'This appointment recurs/Every[x][day(s)][for][1]occurrences' (dropdown menu options are in [square brackets])">Every</property> + <property name="label" translatable="yes" comments="TRANSLATORS: Entire string is for example: 'This appointment recurs/Every[x][day(s)][for][1]occurrences' (dropdown menu options are in [square brackets])">Every</property> <property name="use_underline">False</property> <property name="use_markup">False</property> <property name="justify">GTK_JUSTIFY_CENTER</property> @@ -123,6 +131,10 @@ <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> @@ -151,52 +163,15 @@ </child> <child> - <widget class="GtkOptionMenu" id="interval-unit"> + <widget class="GtkComboBox" id="interval-unit-combobox"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">0</property> - - <child internal-child="menu"> - <widget class="GtkMenu" id="convertwidget1"> - <property name="visible">True</property> - - <child> - <widget class="GtkMenuItem" id="convertwidget2"> - <property name="visible">True</property> - <property name="label" translatable="yes" comments="TRANSLATORS: Entire string is for example: - 'This appointment recurs/Every[x][day(s)][for][1]occurrences' (dropdown menu options are in [square brackets])">day(s)</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget3"> - <property name="visible">True</property> - <property name="label" translatable="yes" comments="TRANSLATORS: Entire string is for example: - 'This appointment recurs/Every[x][week(s)][for][1]occurrences' (dropdown menu options are in [square brackets])">week(s)</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget4"> - <property name="visible">True</property> - <property name="label" translatable="yes" comments="TRANSLATORS: Entire string is for example: - 'This appointment recurs/Every[x][month(s)][for][1]occurrences' (dropdown menu options are in [square brackets])">month(s)</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget5"> - <property name="visible" comments="TRANSLATORS: Entire string is for example: - 'This appointment recurs/Every[x][year(s)][for][1]occurrences' (dropdown menu options are in [square brackets])">True</property> - <property name="label" translatable="yes">year(s)</property> - <property name="use_underline">True</property> - </widget> - </child> - </widget> - </child> + <property name="items" translatable="yes" comments="TRANSLATORS: Entire string is for example: + 'This appointment recurs/Every[x][day(s)][for][1]occurrences' (combobox options are in [square brackets])">day(s) +week(s) +month(s) +year(s)</property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> </widget> <packing> <property name="padding">0</property> @@ -229,43 +204,14 @@ </child> <child> - <widget class="GtkOptionMenu" id="ending-menu"> + <widget class="GtkComboBox" id="ending-combobox"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">0</property> - - <child internal-child="menu"> - <widget class="GtkMenu" id="convertwidget6"> - <property name="visible">True</property> - - <child> - <widget class="GtkMenuItem" id="convertwidget7"> - <property name="visible">True</property> - <property name="label" translatable="yes" comments="TRANSLATORS: Entire string is for example: - 'This appointment recurs/Every[x][day(s)][for][1]occurrences' (dropdown menu options are in [square brackets])">for</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget8"> - <property name="visible">True</property> - <property name="label" translatable="yes" comments="TRANSLATORS: Entire string is for example: - 'This appointment recurs/Every[x][day(s)][until][2006/01/01]' (dropdown menu options are in [square brackets])">until</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget9"> - <property name="visible">True</property> - <property name="label" translatable="yes" comments="TRANSLATORS: Entire string is for example: - 'This appointment recurs/Every[x][day(s)][forever]' (dropdown menu options are in [square brackets])">forever</property> - <property name="use_underline">True</property> - </widget> - </child> - </widget> - </child> + <property name="items" translatable="yes" comments="TRANSLATORS: Entire string is for example: + 'This appointment recurs/Every[x][day(s)][for][1]occurrences' (combobox options are in [square brackets])">for +until +forever</property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> </widget> <packing> <property name="padding">0</property> @@ -361,6 +307,10 @@ <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> @@ -388,6 +338,10 @@ <property name="yalign">0.5</property> <property name="xpad">12</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> @@ -418,6 +372,9 @@ <property name="rules_hint">False</property> <property name="reorderable">False</property> <property name="enable_search">True</property> + <property name="fixed_height_mode">False</property> + <property name="hover_selection">False</property> + <property name="hover_expand">False</property> </widget> </child> </widget> @@ -502,6 +459,10 @@ <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> @@ -562,6 +523,10 @@ <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> @@ -589,6 +554,10 @@ <property name="yalign">0.5</property> <property name="xpad">12</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> diff --git a/calendar/gui/dialogs/task-details-page.c b/calendar/gui/dialogs/task-details-page.c index a2be1381a6..959c275443 100644 --- a/calendar/gui/dialogs/task-details-page.c +++ b/calendar/gui/dialogs/task-details-page.c @@ -52,8 +52,8 @@ struct _TaskDetailsPagePrivate { /* Widgets from the Glade file */ GtkWidget *main; - GtkWidget *status; - GtkWidget *priority; + GtkWidget *status_combo; + GtkWidget *priority_combo; GtkWidget *percent_complete; GtkWidget *date_completed_label; @@ -165,7 +165,7 @@ task_details_page_focus_main_widget (CompEditorPage *page) tdpage = TASK_DETAILS_PAGE (page); priv = tdpage->priv; - gtk_widget_grab_focus (priv->status); + gtk_widget_grab_focus (priv->status_combo); } @@ -241,8 +241,8 @@ sensitize_widgets (TaskDetailsPage *tdpage) if (!e_cal_is_read_only (client, &read_only, NULL)) read_only = TRUE; - gtk_widget_set_sensitive (priv->status, !read_only); - gtk_widget_set_sensitive (priv->priority, !read_only); + gtk_widget_set_sensitive (priv->status_combo, !read_only); + gtk_widget_set_sensitive (priv->priority_combo, !read_only); gtk_widget_set_sensitive (priv->percent_complete, !read_only); gtk_widget_set_sensitive (priv->completed_date, !read_only); gtk_widget_set_sensitive (priv->url_label, !read_only); @@ -290,7 +290,7 @@ task_details_page_fill_widgets (CompEditorPage *page, ECalComponent *comp) } else status = ICAL_STATUS_NONE; } - e_dialog_option_menu_set (priv->status, status, status_map); + e_dialog_combo_box_set (priv->status_combo, status, status_map); if (percent) e_cal_component_free_percent (percent); @@ -325,7 +325,7 @@ task_details_page_fill_widgets (CompEditorPage *page, ECalComponent *comp) } else { priority = PRIORITY_UNDEFINED; } - e_dialog_option_menu_set (priv->priority, priority, priority_map); + e_dialog_combo_box_set (priv->priority_combo, priority, priority_map); /* URL */ e_cal_component_get_url (comp, &url); @@ -358,11 +358,11 @@ task_details_page_fill_component (CompEditorPage *page, ECalComponent *comp) e_cal_component_set_percent (comp, &percent); /* Status. */ - status = e_dialog_option_menu_get (priv->status, status_map); + status = e_dialog_combo_box_get (priv->status_combo, status_map); e_cal_component_set_status (comp, status); /* Priority. */ - priority = e_dialog_option_menu_get (priv->priority, priority_map); + priority = e_dialog_combo_box_get (priv->priority_combo, priority_map); priority_value = priority_index_to_value (priority); e_cal_component_set_priority (comp, &priority_value); @@ -465,8 +465,8 @@ get_widgets (TaskDetailsPage *tdpage) g_object_ref (priv->main); gtk_container_remove (GTK_CONTAINER (priv->main->parent), priv->main); - priv->status = GW ("status"); - priv->priority = GW ("priority"); + priv->status_combo = GW ("status-combobox"); + priv->priority_combo = GW ("priority-combobox"); priv->percent_complete = GW ("percent-complete"); priv->date_completed_label = GW ("date_completed_label"); @@ -483,8 +483,8 @@ get_widgets (TaskDetailsPage *tdpage) #undef GW - return (priv->status - && priv->priority + return (priv->status_combo + && priv->priority_combo && priv->percent_complete && priv->date_completed_label && priv->completed_date @@ -542,19 +542,19 @@ date_changed_cb (EDateEdit *dedit, gpointer data) &completed_tt.hour, &completed_tt.minute); - status = e_dialog_option_menu_get (priv->status, status_map); + status = e_dialog_combo_box_get (priv->status_combo, status_map); if (!date_set) { completed_tt = icaltime_null_time (); if (status == ICAL_STATUS_COMPLETED) { - e_dialog_option_menu_set (priv->status, + e_dialog_combo_box_set (priv->status_combo, ICAL_STATUS_NONE, status_map); e_dialog_spin_set (priv->percent_complete, 0); } } else { if (status != ICAL_STATUS_COMPLETED) { - e_dialog_option_menu_set (priv->status, + e_dialog_combo_box_set (priv->status_combo, ICAL_STATUS_COMPLETED, status_map); } @@ -569,7 +569,7 @@ date_changed_cb (EDateEdit *dedit, gpointer data) } static void -status_changed (GtkMenu *menu, TaskDetailsPage *tdpage) +status_changed (GtkWidget *combo, TaskDetailsPage *tdpage) { TaskDetailsPagePrivate *priv; icalproperty_status status; @@ -585,7 +585,7 @@ status_changed (GtkMenu *menu, TaskDetailsPage *tdpage) comp_editor_page_set_updating (COMP_EDITOR_PAGE (tdpage), TRUE); - status = e_dialog_option_menu_get (priv->status, status_map); + status = e_dialog_combo_box_get (priv->status_combo, status_map); if (status == ICAL_STATUS_NONE) { e_dialog_spin_set (priv->percent_complete, 0); e_date_edit_set_time (E_DATE_EDIT (priv->completed_date), ctime); @@ -642,7 +642,7 @@ percent_complete_changed (GtkAdjustment *adj, TaskDetailsPage *tdpage) status = ICAL_STATUS_INPROCESS; } - e_dialog_option_menu_set (priv->status, status, status_map); + e_dialog_combo_box_set (priv->status_combo, status, status_map); e_date_edit_set_time (E_DATE_EDIT (priv->completed_date), ctime); complete_date_changed (tdpage, ctime, complete); @@ -672,8 +672,8 @@ init_widgets (TaskDetailsPage *tdpage) /* Connect signals. The Status, Percent Complete & Date Completed properties are closely related so whenever one changes we may need to update the other 2. */ - g_signal_connect((GTK_OPTION_MENU (priv->status)->menu), - "deactivate", + g_signal_connect (GTK_COMBO_BOX (priv->status_combo), + "changed", G_CALLBACK (status_changed), tdpage); g_signal_connect((GTK_SPIN_BUTTON (priv->percent_complete)->adjustment), @@ -682,7 +682,7 @@ init_widgets (TaskDetailsPage *tdpage) /* Priority */ g_signal_connect_swapped ( - GTK_OPTION_MENU (priv->priority)->menu, "deactivate", + GTK_COMBO_BOX (priv->priority_combo), "changed", G_CALLBACK (comp_editor_page_changed), tdpage); /* Completed Date */ diff --git a/calendar/gui/dialogs/task-details-page.glade b/calendar/gui/dialogs/task-details-page.glade index aac90876ed..44fc3b2fbb 100644 --- a/calendar/gui/dialogs/task-details-page.glade +++ b/calendar/gui/dialogs/task-details-page.glade @@ -4,7 +4,7 @@ <glade-interface> <widget class="GtkWindow" id="task-details-toplevel"> - <property name="title" translatable="no">window1</property> + <property name="title">window1</property> <property name="type">GTK_WINDOW_TOPLEVEL</property> <property name="window_position">GTK_WIN_POS_NONE</property> <property name="modal">False</property> @@ -15,6 +15,8 @@ <property name="skip_pager_hint">False</property> <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property> <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> + <property name="focus_on_map">True</property> + <property name="urgency_hint">False</property> <child> <widget class="GtkVBox" id="task-details-page"> @@ -36,6 +38,10 @@ <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> @@ -63,6 +69,10 @@ <property name="yalign">0.5</property> <property name="xpad">12</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> @@ -93,7 +103,10 @@ <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> - <property name="mnemonic_widget">status</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> @@ -119,6 +132,10 @@ <property name="xpad">0</property> <property name="ypad">0</property> <property name="mnemonic_widget">percent-complete</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> @@ -143,7 +160,10 @@ <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> - <property name="mnemonic_widget">priority</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> @@ -168,6 +188,10 @@ <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="left_attach">0</property> @@ -180,114 +204,6 @@ </child> <child> - <widget class="GtkOptionMenu" id="priority"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">0</property> - - <child internal-child="menu"> - <widget class="GtkMenu" id="convertwidget7"> - <property name="visible">True</property> - - <child> - <widget class="GtkMenuItem" id="convertwidget8"> - <property name="visible">True</property> - <property name="label" translatable="yes">High</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget9"> - <property name="visible">True</property> - <property name="label" translatable="yes">Normal</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget10"> - <property name="visible">True</property> - <property name="label" translatable="yes">Low</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget11"> - <property name="visible">True</property> - <property name="label" translatable="yes">Undefined</property> - <property name="use_underline">True</property> - </widget> - </child> - </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="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkOptionMenu" id="status"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">0</property> - - <child internal-child="menu"> - <widget class="GtkMenu" id="convertwidget1"> - <property name="visible">True</property> - - <child> - <widget class="GtkMenuItem" id="convertwidget2"> - <property name="visible">True</property> - <property name="label" translatable="yes">Not Started</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget3"> - <property name="visible">True</property> - <property name="label" translatable="yes">In Progress</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget5"> - <property name="visible">True</property> - <property name="label" translatable="yes">Completed</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget6"> - <property name="visible">True</property> - <property name="label" translatable="yes">Canceled</property> - <property name="use_underline">True</property> - </widget> - </child> - </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="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> <widget class="GtkSpinButton" id="percent-complete"> <property name="visible">True</property> <property name="can_focus">True</property> @@ -329,6 +245,46 @@ <property name="y_options"></property> </packing> </child> + + <child> + <widget class="GtkComboBox" id="priority-combobox"> + <property name="visible">True</property> + <property name="items" translatable="yes">High +Normal +Low +Undefined</property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> + </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="x_options">fill</property> + <property name="y_options">fill</property> + </packing> + </child> + + <child> + <widget class="GtkComboBox" id="status-combobox"> + <property name="visible">True</property> + <property name="items" translatable="yes">Not Started +In Progress +Completed +Canceled</property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</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="x_options">fill</property> + <property name="y_options">fill</property> + </packing> + </child> </widget> <packing> <property name="padding">0</property> @@ -357,6 +313,10 @@ <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> @@ -384,6 +344,10 @@ <property name="yalign">0.5</property> <property name="xpad">12</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> @@ -415,6 +379,10 @@ <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="left_attach">0</property> diff --git a/calendar/gui/dialogs/task-page.c b/calendar/gui/dialogs/task-page.c index d9078c61b7..c3a8e34ba0 100644 --- a/calendar/gui/dialogs/task-page.c +++ b/calendar/gui/dialogs/task-page.c @@ -332,7 +332,7 @@ sensitize_widgets (TaskPage *tpage) /* The list of organizers is set to be non-editable. Otherwise any * change in the displayed list causes an 'Account not found' error. */ - gtk_editable_set_editable (GTK_EDITABLE (GTK_COMBO (priv->organizer)->entry), FALSE); + gtk_editable_set_editable (GTK_EDITABLE (gtk_bin_get_child (GTK_BIN (priv->organizer))), FALSE); gtk_editable_set_editable (GTK_EDITABLE (priv->summary), !read_only); gtk_widget_set_sensitive (priv->due_date, !read_only); @@ -371,7 +371,7 @@ sensitize_widgets (TaskPage *tpage) gtk_widget_show (priv->attendee_box); gtk_widget_show (priv->organizer); gtk_label_set_text_with_mnemonic (GTK_LABEL (priv->org_cal_label), _("Organi_zer:")); - gtk_label_set_mnemonic_widget (GTK_LABEL (priv->org_cal_label), GTK_COMBO (priv->organizer)->entry); + gtk_label_set_mnemonic_widget (GTK_LABEL (priv->org_cal_label), priv->organizer); } } void @@ -418,7 +418,7 @@ get_current_account (TaskPage *page) priv = page->priv; - str = gtk_entry_get_text (GTK_ENTRY (GTK_COMBO (priv->organizer)->entry)); + str = gtk_entry_get_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (priv->organizer)))); if (!str) return NULL; @@ -614,7 +614,6 @@ task_page_fill_widgets (CompEditorPage *page, ECalComponent *comp) if (organizer.value != NULL) { const gchar *strip = itip_strip_mailto (organizer.value); gchar *string; - GList *list = NULL; if (itip_organizer_is_user (comp, client) || itip_sentby_is_user (comp, client)) { if (e_cal_get_static_capability ( @@ -640,13 +639,15 @@ task_page_fill_widgets (CompEditorPage *page, ECalComponent *comp) string = g_strdup (strip); if (!priv->user_org) { - list = g_list_append (list, string); - gtk_combo_set_popdown_strings (GTK_COMBO (priv->organizer), list); - gtk_editable_set_editable (GTK_EDITABLE (GTK_COMBO (priv->organizer)->entry), FALSE); + gtk_list_store_clear (GTK_LIST_STORE (gtk_combo_box_get_model (GTK_COMBO_BOX (priv->organizer)))); + gtk_combo_box_append_text (GTK_COMBO_BOX (priv->organizer), string); + gtk_combo_box_set_active (GTK_COMBO_BOX (priv->organizer), 0); + gtk_editable_set_editable (GTK_EDITABLE (gtk_bin_get_child (GTK_BIN (priv->organizer))), FALSE); + } else { + gtk_entry_set_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (priv->organizer))), string); } g_free (string); - g_list_free (list); priv->existing = TRUE; } } else { @@ -1425,7 +1426,10 @@ get_widgets (TaskPage *tpage) priv->description = GW ("description"); priv->categories_btn = GW ("categories-button"); priv->categories = GW ("categories"); + priv->organizer = GW ("organizer"); + gtk_list_store_clear (GTK_LIST_STORE (gtk_combo_box_get_model (GTK_COMBO_BOX (priv->organizer)))); + priv->invite = GW ("invite"); priv->add = GW ("add-attendee"); priv->edit = GW ("edit-attendee"); @@ -2000,9 +2004,8 @@ task_page_select_organizer (TaskPage *tpage, const char *backend_address) if (default_address) { if (!priv->comp || !e_cal_component_has_organizer (priv->comp)) { - gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (priv->organizer)->entry), default_address); - /* FIXME: Use accessor functions to access private members of a GtkCombo widget */ - gtk_widget_set_sensitive (GTK_WIDGET (GTK_COMBO (priv->organizer)->button), !subscribed_cal); + gtk_entry_set_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (priv->organizer))), default_address); + gtk_widget_set_sensitive (priv->organizer, !subscribed_cal); } } else g_warning ("No potential organizers!"); @@ -2069,9 +2072,14 @@ task_page_construct (TaskPage *tpage, EMeetingStore *model, ECal *client) g_object_unref(it); - if (priv->address_strings) - gtk_combo_set_popdown_strings (GTK_COMBO (priv->organizer), priv->address_strings); - else + if (priv->address_strings) { + GList *l; + + for (l = priv->address_strings; l; l = l->next) + gtk_combo_box_append_text (GTK_COMBO_BOX (priv->organizer), l->data); + + gtk_combo_box_set_active (GTK_COMBO_BOX (priv->organizer), 0); + } else g_warning ("No potential organizers!"); if (!init_widgets (tpage)) { diff --git a/calendar/gui/dialogs/task-page.glade b/calendar/gui/dialogs/task-page.glade index d106381f8f..72beb68f21 100644 --- a/calendar/gui/dialogs/task-page.glade +++ b/calendar/gui/dialogs/task-page.glade @@ -600,34 +600,13 @@ <property name="spacing">6</property> <child> - <widget class="GtkCombo" id="organizer"> + <widget class="GtkComboBoxEntry" id="organizer"> <property name="visible">True</property> - <property name="value_in_list">False</property> - <property name="allow_empty">True</property> - <property name="case_sensitive">False</property> - <property name="enable_arrow_keys">True</property> - <property name="enable_arrows_always">False</property> - - <child internal-child="entry"> - <widget class="GtkEntry" id="organiser-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> - </child> - - <child internal-child="list"> - <widget class="GtkList" id="combo-list1"> - <property name="visible">True</property> - <property name="selection_mode">GTK_SELECTION_BROWSE</property> - </widget> - </child> + <property name="items" translatable="yes">a +b</property> + <property name="add_tearoffs">False</property> + <property name="has_frame">True</property> + <property name="focus_on_click">True</property> </widget> <packing> <property name="padding">0</property> diff --git a/calendar/gui/e-itip-control.c b/calendar/gui/e-itip-control.c index 157afc6018..c5a483ea8e 100644 --- a/calendar/gui/e-itip-control.c +++ b/calendar/gui/e-itip-control.c @@ -101,8 +101,6 @@ struct _EItipControlPrivate { gint view_only; }; -#define ACTION_DATA "EItipControl:Action" - /* HTML Strings */ #define HTML_BODY_START "<body bgcolor=\"#ffffff\" text=\"#000000\" link=\"#336699\">" #define HTML_SEP "<hr color=#336699 align=\"left\" width=450>" @@ -2199,28 +2197,66 @@ url_requested_cb (GtkHTML *html, const gchar *url, GtkHTMLStream *handle, gpoint close (fd); } +static GtkWidget * +create_combo_box (void) +{ + GtkComboBox *combo; + GtkCellRenderer *cell; + GtkListStore *store; + + combo = GTK_COMBO_BOX (gtk_combo_box_new ()); + + store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_INT); + gtk_combo_box_set_model (combo, GTK_TREE_MODEL (store)); + g_object_unref (store); + + gtk_cell_layout_clear (GTK_CELL_LAYOUT (combo)); + + cell = gtk_cell_renderer_text_new (); + gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo), cell, TRUE); + gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combo), cell, + "text", 0, + NULL); + + return GTK_WIDGET (combo); +} + static void option_activated_cb (GtkWidget *widget, gpointer data) { EItipControl *itip = E_ITIP_CONTROL (data); EItipControlPrivate *priv; + GtkTreeIter iter; + gint act; priv = itip->priv; - priv->action = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (widget), ACTION_DATA)); + g_return_if_fail (gtk_combo_box_get_active_iter (GTK_COMBO_BOX (widget), &iter)); + + gtk_tree_model_get (gtk_combo_box_get_model (GTK_COMBO_BOX (widget)), &iter, 1, &act, -1); + + priv->action = act; } static void -add_option (EItipControl *itip, GtkWidget *menu, const char *text, char action) +add_option (EItipControl *itip, GtkWidget *combo, const char *text, char action) { - GtkWidget *item; + GtkTreeIter iter; + GtkListStore *store; + + store = GTK_LIST_STORE (gtk_combo_box_get_model (GTK_COMBO_BOX (combo))); - item = gtk_menu_item_new_with_label (text); - g_signal_connect (item, "activate", G_CALLBACK (option_activated_cb), itip); - g_object_set_data (G_OBJECT (item), ACTION_DATA, GINT_TO_POINTER ((int)action)); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); - gtk_widget_show (item); + gtk_list_store_append (store, &iter); + gtk_list_store_set ( + store, &iter, + 0, text, + 1, (gint) action, + -1); + if (gtk_combo_box_get_active (GTK_COMBO_BOX (combo)) == -1) { + gtk_combo_box_set_active (GTK_COMBO_BOX (combo), 0); + g_signal_connect (combo, "changed", G_CALLBACK (option_activated_cb), itip); + } } static void @@ -2308,24 +2344,20 @@ static gboolean publish_options_object (EItipControl *itip, GtkHTML *html, GtkHTMLEmbedded *eb) { EItipControlPrivate *priv; - GtkWidget *option, *menu; + GtkWidget *combo; priv = itip->priv; insert_boxes (eb, itip); insert_label (priv->hbox.widget); - option = gtk_option_menu_new (); + combo = create_combo_box (); - menu = gtk_menu_new (); - - add_option (itip, menu, _("Update"), 'U'); + add_option (itip, combo, _("Update"), 'U'); priv->action = 'U'; - gtk_option_menu_set_menu (GTK_OPTION_MENU (option), menu); - - gtk_box_pack_start (GTK_BOX (priv->hbox.widget), option, FALSE, TRUE, 0); - gtk_widget_show (option); + gtk_box_pack_start (GTK_BOX (priv->hbox.widget), combo, FALSE, TRUE, 0); + gtk_widget_show (combo); insert_ok (priv->hbox.widget, itip); @@ -2336,26 +2368,22 @@ static gboolean request_options_object (EItipControl *itip, GtkHTML *html, GtkHTMLEmbedded *eb) { EItipControlPrivate *priv; - GtkWidget *option, *menu; + GtkWidget *combo; priv = itip->priv; insert_boxes (eb, itip); insert_label (priv->hbox.widget); - option = gtk_option_menu_new (); - - menu = gtk_menu_new (); + combo = create_combo_box (); - add_option (itip, menu, _("Accept"), 'A'); - add_option (itip, menu, _("Tentatively accept"), 'T'); - add_option (itip, menu, _("Decline"), 'D'); + add_option (itip, combo, _("Accept"), 'A'); + add_option (itip, combo, _("Tentatively accept"), 'T'); + add_option (itip, combo, _("Decline"), 'D'); priv->action = 'A'; - gtk_option_menu_set_menu (GTK_OPTION_MENU (option), menu); - - gtk_box_pack_start (GTK_BOX (priv->hbox.widget), option, FALSE, TRUE, 0); - gtk_widget_show (option); + gtk_box_pack_start (GTK_BOX (priv->hbox.widget), combo, FALSE, TRUE, 0); + gtk_widget_show (combo); insert_rsvp (priv->hbox.widget, itip); insert_ok (priv->hbox.widget, itip); @@ -2367,24 +2395,20 @@ static gboolean freebusy_options_object (EItipControl *itip, GtkHTML *html, GtkHTMLEmbedded *eb) { EItipControlPrivate *priv; - GtkWidget *option, *menu; + GtkWidget *combo; priv = itip->priv; insert_boxes (eb, itip); insert_label (priv->hbox.widget); - option = gtk_option_menu_new (); - - menu = gtk_menu_new (); + combo = create_combo_box (); - add_option (itip, menu, _("Send Free/Busy Information"), 'F'); + add_option (itip, combo, _("Send Free/Busy Information"), 'F'); priv->action = 'F'; - gtk_option_menu_set_menu (GTK_OPTION_MENU (option), menu); - - gtk_container_add (GTK_CONTAINER (priv->hbox.widget), option); - gtk_widget_show (option); + gtk_container_add (GTK_CONTAINER (priv->hbox.widget), combo); + gtk_widget_show (combo); insert_ok (priv->hbox.widget, itip); @@ -2395,24 +2419,20 @@ static gboolean reply_options_object (EItipControl *itip, GtkHTML *html, GtkHTMLEmbedded *eb) { EItipControlPrivate *priv; - GtkWidget *option, *menu; + GtkWidget *combo; priv = itip->priv; insert_boxes (eb, itip); insert_label (priv->hbox.widget); - option = gtk_option_menu_new (); + combo = create_combo_box (); - menu = gtk_menu_new (); - - add_option (itip, menu, _("Update respondent status"), 'R'); + add_option (itip, combo, _("Update respondent status"), 'R'); priv->action = 'R'; - gtk_option_menu_set_menu (GTK_OPTION_MENU (option), menu); - - gtk_container_add (GTK_CONTAINER (priv->hbox.widget), option); - gtk_widget_show (option); + gtk_container_add (GTK_CONTAINER (priv->hbox.widget), combo); + gtk_widget_show (combo); insert_ok (priv->hbox.widget, itip); @@ -2423,24 +2443,20 @@ static gboolean refresh_options_object (EItipControl *itip, GtkHTML *html, GtkHTMLEmbedded *eb) { EItipControlPrivate *priv; - GtkWidget *option, *menu; + GtkWidget *combo; priv = itip->priv; insert_boxes (eb, itip); insert_label (priv->hbox.widget); - option = gtk_option_menu_new (); - - menu = gtk_menu_new (); + combo = create_combo_box (); - add_option (itip, menu, _("Send Latest Information"), 'S'); + add_option (itip, combo, _("Send Latest Information"), 'S'); priv->action = 'S'; - gtk_option_menu_set_menu (GTK_OPTION_MENU (option), menu); - - gtk_container_add (GTK_CONTAINER (priv->hbox.widget), option); - gtk_widget_show (option); + gtk_container_add (GTK_CONTAINER (priv->hbox.widget), combo); + gtk_widget_show (combo); insert_ok (priv->hbox.widget, itip); @@ -2451,24 +2467,20 @@ static gboolean cancel_options_object (EItipControl *itip, GtkHTML *html, GtkHTMLEmbedded *eb) { EItipControlPrivate *priv; - GtkWidget *option, *menu; + GtkWidget *combo; priv = itip->priv; insert_boxes (eb, itip); insert_label (priv->hbox.widget); - option = gtk_option_menu_new (); - - menu = gtk_menu_new (); + combo = create_combo_box (); - add_option (itip, menu, _("Cancel"), 'C'); + add_option (itip, combo, _("Cancel"), 'C'); priv->action = 'C'; - gtk_option_menu_set_menu (GTK_OPTION_MENU (option), menu); - - gtk_container_add (GTK_CONTAINER (priv->hbox.widget), option); - gtk_widget_show (option); + gtk_container_add (GTK_CONTAINER (priv->hbox.widget), combo); + gtk_widget_show (combo); insert_ok (priv->hbox.widget, itip); diff --git a/calendar/gui/goto-dialog.glade b/calendar/gui/goto-dialog.glade index ab832f335d..aeed7ae70d 100644 --- a/calendar/gui/goto-dialog.glade +++ b/calendar/gui/goto-dialog.glade @@ -10,6 +10,13 @@ <property name="modal">False</property> <property name="resizable">True</property> <property name="destroy_with_parent">False</property> + <property name="decorated">True</property> + <property name="skip_taskbar_hint">False</property> + <property name="skip_pager_hint">False</property> + <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property> + <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> + <property name="focus_on_map">True</property> + <property name="urgency_hint">False</property> <property name="has_separator">True</property> <child internal-child="vbox"> @@ -31,6 +38,7 @@ <property name="label" translatable="yes">_Select Today</property> <property name="use_underline">True</property> <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> <property name="response_id">0</property> </widget> </child> @@ -43,6 +51,7 @@ <property name="label">gtk-cancel</property> <property name="use_stock">True</property> <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> <property name="response_id">-6</property> </widget> </child> @@ -68,112 +77,22 @@ <property name="spacing">4</property> <child> - <widget class="GtkOptionMenu" id="month"> + <widget class="GtkComboBox" id="month-combobox"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">0</property> - - <child internal-child="menu"> - <widget class="GtkMenu" id="convertwidget1"> - <property name="visible">True</property> - - <child> - <widget class="GtkMenuItem" id="convertwidget2"> - <property name="visible">True</property> - <property name="label" translatable="yes">January</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget3"> - <property name="visible">True</property> - <property name="label" translatable="yes">February</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget4"> - <property name="visible">True</property> - <property name="label" translatable="yes">March</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget5"> - <property name="visible">True</property> - <property name="label" translatable="yes">April</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget6"> - <property name="visible">True</property> - <property name="label" translatable="yes">May</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget7"> - <property name="visible">True</property> - <property name="label" translatable="yes">June</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget8"> - <property name="visible">True</property> - <property name="label" translatable="yes">July</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget9"> - <property name="visible">True</property> - <property name="label" translatable="yes">August</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget10"> - <property name="visible">True</property> - <property name="label" translatable="yes">September</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget11"> - <property name="visible">True</property> - <property name="label" translatable="yes">October</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget12"> - <property name="visible">True</property> - <property name="label" translatable="yes">November</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget13"> - <property name="visible">True</property> - <property name="label" translatable="yes">December</property> - <property name="use_underline">True</property> - </widget> - </child> - </widget> - </child> + <property name="items" translatable="yes">January +February +March +April +May +June +July +August +September +October +November +December</property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> </widget> <packing> <property name="padding">0</property> diff --git a/calendar/gui/goto.c b/calendar/gui/goto.c index 200cc0134b..ac4100160a 100644 --- a/calendar/gui/goto.c +++ b/calendar/gui/goto.c @@ -38,7 +38,7 @@ typedef struct GladeXML *xml; GtkWidget *dialog; - GtkWidget *month; + GtkWidget *month_combobox; GtkWidget *year; ECalendar *ecal; GtkWidget *vbox; @@ -67,11 +67,8 @@ static void month_changed (GtkToggleButton *toggle, gpointer data) { GoToDialog *dlg = data; - GtkWidget *menu, *active; - menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (dlg->month)); - active = gtk_menu_get_active (GTK_MENU (menu)); - dlg->month_val = g_list_index (GTK_MENU_SHELL (menu)->children, active); + dlg->month_val = gtk_combo_box_get_active (GTK_COMBO_BOX (dlg->month_combobox)); e_calendar_item_set_first_month (dlg->ecal->calitem, dlg->year_val, dlg->month_val); } @@ -174,14 +171,14 @@ get_widgets (GoToDialog *dlg) dlg->dialog = GW ("goto-dialog"); - dlg->month = GW ("month"); + dlg->month_combobox = GW ("month-combobox"); dlg->year = GW ("year"); dlg->vbox = GW ("vbox"); #undef GW return (dlg->dialog - && dlg->month + && dlg->month_combobox && dlg->year && dlg->vbox); } @@ -189,13 +186,9 @@ get_widgets (GoToDialog *dlg) static void goto_dialog_init_widgets (GoToDialog *dlg) { - GtkWidget *menu; GtkAdjustment *adj; - GList *l; - menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (dlg->month)); - for (l = GTK_MENU_SHELL (menu)->children; l != NULL; l = l->next) - g_signal_connect (menu, "selection_done", G_CALLBACK (month_changed), dlg); + g_signal_connect (dlg->month_combobox, "changed", G_CALLBACK (month_changed), dlg); adj = gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (dlg->year)); g_signal_connect (adj, "value_changed", G_CALLBACK (year_changed), dlg); @@ -244,7 +237,7 @@ goto_dialog (GnomeCalendar *gcal) dlg->month_val = tt.month - 1; dlg->day_val = tt.day; - gtk_option_menu_set_history (GTK_OPTION_MENU (dlg->month), dlg->month_val); + gtk_combo_box_set_active (GTK_COMBO_BOX (dlg->month_combobox), dlg->month_val); gtk_spin_button_set_value (GTK_SPIN_BUTTON (dlg->year), dlg->year_val); create_ecal (dlg); diff --git a/e-util/ChangeLog b/e-util/ChangeLog index 4b29efd710..69db24d87d 100644 --- a/e-util/ChangeLog +++ b/e-util/ChangeLog @@ -1,3 +1,14 @@ +2009-04-24 Milan Crha <mcrha@redhat.com> + + ** Fix for bug #572348 + + * e-config.c: + * e-cursor.c: + * e-dialog-utils.c: + * e-dialog-widgets.h: + * e-dialog-widgets.c: + Remove deprecated Gtk+ symbols. + 2009-04-07 Tobias Mueller <tobiasmue@gnome.org> ** Fixes bug #577989 diff --git a/e-util/e-config.c b/e-util/e-config.c index 4530d7a78b..1da54b5436 100644 --- a/e-util/e-config.c +++ b/e-util/e-config.c @@ -905,10 +905,10 @@ e_config_create_window(EConfig *emp, struct _GtkWindow *parent, const char *titl g_signal_connect(w, "response", G_CALLBACK(ec_dialog_response), emp); gtk_widget_ensure_style (w); - gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (w)->vbox), 0); - gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (w)->action_area), 12); + gtk_container_set_border_width (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (w))), 0); + gtk_container_set_border_width (GTK_CONTAINER (gtk_dialog_get_action_area (GTK_DIALOG (w))), 12); - gtk_box_pack_start((GtkBox *)((GtkDialog *)w)->vbox, emp->widget, TRUE, TRUE, 0); + gtk_box_pack_start((GtkBox *)gtk_dialog_get_content_area (((GtkDialog *)w)), emp->widget, TRUE, TRUE, 0); } else { /* response is handled directly by the druid stuff */ w = gtk_window_new(GTK_WINDOW_TOPLEVEL); diff --git a/e-util/e-cursor.c b/e-util/e-cursor.c index 97e3989f9b..7d547e38ac 100644 --- a/e-util/e-cursor.c +++ b/e-util/e-cursor.c @@ -47,7 +47,7 @@ void e_cursor_set (GtkWidget *widget, ECursorType cursor) GdkCursor *window_cursor; toplevel = gtk_widget_get_toplevel (widget); - if (GTK_WIDGET_TOPLEVEL (toplevel) && toplevel->window) { + if (GTK_WIDGET_TOPLEVEL (toplevel) && gtk_widget_get_window (GTK_WIDGET (toplevel))) { switch (cursor) { case E_CURSOR_NORMAL : @@ -61,7 +61,7 @@ void e_cursor_set (GtkWidget *widget, ECursorType cursor) window_cursor = gdk_cursor_new (GDK_LEFT_PTR); } - gdk_window_set_cursor (toplevel->window, window_cursor); + gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (toplevel)), window_cursor); gdk_cursor_unref (window_cursor); } diff --git a/e-util/e-dialog-utils.c b/e-util/e-dialog-utils.c index a3bde484d5..0546430512 100644 --- a/e-util/e-dialog-utils.c +++ b/e-util/e-dialog-utils.c @@ -178,8 +178,8 @@ e_dialog_set_transient_for (GtkWindow *dialog, } #ifdef GDK_WINDOWING_X11 /* Find the top-level windowmanager-managed X Window */ - display = GDK_WINDOW_XDISPLAY (parent_widget->window); - parent = GDK_WINDOW_XID (parent_widget->window); + display = GDK_WINDOW_XDISPLAY (gtk_widget_get_window (parent_widget)); + parent = GDK_WINDOW_XID (gtk_widget_get_window (parent_widget)); while (parent && !window_is_wm_toplevel (display, parent)) { status = XQueryTree (display, parent, &root_ret, @@ -228,7 +228,7 @@ e_dialog_set_transient_for_xid (GtkWindow *dialog, } #ifdef GDK_MULTIHEAD_SAFE - display = gdk_drawable_get_display (GDK_DRAWABLE (GTK_WIDGET (dialog)->window)); + display = gdk_drawable_get_display (GDK_DRAWABLE (gtk_widget_get_window (GTK_WIDGET (dialog)))); parent = gdk_window_lookup_for_display (display, xid); if (!parent) parent = gdk_window_foreign_new_for_display (display, xid); @@ -239,7 +239,7 @@ e_dialog_set_transient_for_xid (GtkWindow *dialog, #endif g_return_if_fail (parent != NULL); - gdk_window_set_transient_for (GTK_WIDGET (dialog)->window, parent); + gdk_window_set_transient_for (gtk_widget_get_window (GTK_WIDGET (dialog)), parent); } diff --git a/e-util/e-dialog-widgets.c b/e-util/e-dialog-widgets.c index d3987b07bc..afe50a85b4 100644 --- a/e-util/e-dialog-widgets.c +++ b/e-util/e-dialog-widgets.c @@ -139,34 +139,6 @@ get_radio_value (GtkRadioButton *radio, gpointer value_var, gpointer info) *value = e_dialog_radio_get (GTK_WIDGET (radio), value_map); } -/* Hooks an option menu */ -static void -hook_option_menu (GtkWidget *dialog, GtkOptionMenu *omenu, gpointer value_var, gpointer info) -{ - const int *value_map; - int *value; - - /* Set the value */ - - value = (int *) value_var; - value_map = (const int *) info; - - e_dialog_option_menu_set (GTK_WIDGET (omenu), *value, value_map); -} - -/* Gets the value of an option menu */ -static void -get_option_menu_value (GtkOptionMenu *omenu, gpointer value_var, gpointer info) -{ - const int *value_map; - int *value; - - value = (int *) value_var; - value_map = (const int *) info; - - *value = e_dialog_option_menu_get (GTK_WIDGET (omenu), value_map); -} - /* Hooks a toggle button */ static void hook_toggle (GtkWidget *dialog, GtkToggleButton *toggle, gpointer value_var, gpointer info) @@ -470,83 +442,6 @@ e_dialog_spin_get_int (GtkWidget *widget) } /** - * e_dialog_option_menu_set: - * @widget: A #GtkOptionMenu. - * @value: Enumerated value. - * @value_map: Map from enumeration values to array indices. - * - * Sets the selected item in a #GtkOptionMenu. Please read the description of - * e_dialog_radio_set() to see how @value_map maps enumeration values to item - * indices. - **/ -void -e_dialog_option_menu_set (GtkWidget *widget, int value, const int *value_map) -{ - int i; - - g_return_if_fail (widget != NULL); - g_return_if_fail (GTK_IS_OPTION_MENU (widget)); - g_return_if_fail (value_map != NULL); - - i = value_to_index (value_map, value); - - if (i != -1) - gtk_option_menu_set_history (GTK_OPTION_MENU (widget), i); - else - g_message ("e_dialog_option_menu_set(): could not find value %d in value map!", - value); -} - -/** - * e_dialog_option_menu_get: - * @widget: A #GtkOptionMenu. - * @value_map: Map from enumeration values to array indices. - * - * Queries the selected item in a #GtkOptionMenu. Please read the description - * of e_dialog_radio_set() to see how @value_map maps enumeration values to item - * indices. - * - * Return value: Enumeration value which corresponds to the selected item in the - * option menu. - **/ -int -e_dialog_option_menu_get (GtkWidget *widget, const int *value_map) -{ - GtkMenu *menu; - GtkWidget *active; - GList *children; - GList *l; - int i; - int v; - - g_return_val_if_fail (widget != NULL, -1); - g_return_val_if_fail (GTK_IS_OPTION_MENU (widget), -1); - g_return_val_if_fail (value_map != NULL, -1); - - menu = GTK_MENU (gtk_option_menu_get_menu (GTK_OPTION_MENU (widget))); - - active = gtk_menu_get_active (menu); - g_return_val_if_fail (active != NULL, -1); - - children = GTK_MENU_SHELL (menu)->children; - - for (i = 0, l = children; l; l = l->next, i++) { - if (GTK_WIDGET (l->data) == active) - break; - } - - g_return_val_if_fail (l != NULL, -1); - - v = index_to_value (value_map, i); - if (v == -1) { - g_message ("e_dialog_option_menu_get(): could not find index %d in value map!", i); - return -1; - } - - return v; -} - -/** * e_dialog_combo_box_set: * @widget: A #GtkComboBox. * @value: Enumerated value. @@ -681,8 +576,6 @@ e_dialog_widget_hook_value (GtkWidget *dialog, GtkWidget *widget, if (GTK_IS_RADIO_BUTTON (widget)) hook_radio (dialog, GTK_RADIO_BUTTON (widget), value_var, info); - else if (GTK_IS_OPTION_MENU (widget)) - hook_option_menu (dialog, GTK_OPTION_MENU (widget), value_var, info); else if (GTK_IS_TOGGLE_BUTTON (widget)) hook_toggle (dialog, GTK_TOGGLE_BUTTON (widget), value_var, info); else if (GTK_IS_SPIN_BUTTON (widget)) @@ -729,8 +622,6 @@ e_dialog_get_values (GtkWidget *dialog) if (GTK_IS_RADIO_BUTTON (wh->widget)) get_radio_value (GTK_RADIO_BUTTON (wh->widget), wh->value_var, wh->info); - else if (GTK_IS_OPTION_MENU (wh->widget)) - get_option_menu_value (GTK_OPTION_MENU (wh->widget), wh->value_var, wh->info); else if (GTK_IS_TOGGLE_BUTTON (wh->widget)) get_toggle_value (GTK_TOGGLE_BUTTON (wh->widget), wh->value_var, wh->info); else if (GTK_IS_SPIN_BUTTON (wh->widget)) diff --git a/e-util/e-dialog-widgets.h b/e-util/e-dialog-widgets.h index 39f4b47b39..1a46c02fd3 100644 --- a/e-util/e-dialog-widgets.h +++ b/e-util/e-dialog-widgets.h @@ -43,9 +43,6 @@ void e_dialog_spin_set (GtkWidget *widget, double value); double e_dialog_spin_get_double (GtkWidget *widget); int e_dialog_spin_get_int (GtkWidget *widget); -void e_dialog_option_menu_set (GtkWidget *widget, int value, const int *value_map); -int e_dialog_option_menu_get (GtkWidget *widget, const int *value_map); - void e_dialog_combo_box_set (GtkWidget *widget, int value, const int *value_map); int e_dialog_combo_box_get (GtkWidget *widget, const int *value_map); diff --git a/filter/ChangeLog b/filter/ChangeLog index a30463deb5..656210ddce 100644 --- a/filter/ChangeLog +++ b/filter/ChangeLog @@ -1,3 +1,13 @@ +2009-04-24 Milan Crha <mcrha@redhat.com> + + ** Fix for bug #572348 + + * filter.glade: + * filter-datespec.c: + * filter-rule.c: + * filter-option.c: + Remove deprecated Gtk+ symbols. + 2009-01-11 Tor Lillqvist <tml@novell.com> * filter-option.c (get_dynamic_options): Add cast to avoid diff --git a/filter/filter-datespec.c b/filter/filter-datespec.c index 82b0e08197..599681c4d4 100644 --- a/filter/filter-datespec.c +++ b/filter/filter-datespec.c @@ -95,7 +95,7 @@ static const timespan timespans[] = { struct _FilterDatespecPrivate { GtkWidget *label_button; - GtkWidget *notebook_type, *option_type, *calendar_specify, *spin_relative, *option_relative, *option_past_future; + GtkWidget *notebook_type, *combobox_type, *calendar_specify, *spin_relative, *combobox_relative, *combobox_past_future; FilterDatespec_type type; int span; }; @@ -385,49 +385,39 @@ set_values (FilterDatespec *fds) case FDST_X_AGO: p->span = get_best_span(fds->value); gtk_spin_button_set_value((GtkSpinButton*)p->spin_relative, fds->value/timespans[p->span].seconds); - gtk_option_menu_set_history((GtkOptionMenu*)p->option_relative, p->span); - gtk_option_menu_set_history((GtkOptionMenu*)p->option_past_future, 0); + gtk_combo_box_set_active (GTK_COMBO_BOX (p->combobox_relative), p->span); + gtk_combo_box_set_active (GTK_COMBO_BOX (p->combobox_past_future), 0); break; case FDST_X_FUTURE: p->span = get_best_span(fds->value); gtk_spin_button_set_value((GtkSpinButton*)p->spin_relative, fds->value/timespans[p->span].seconds); - gtk_option_menu_set_history((GtkOptionMenu*)p->option_relative, p->span); - gtk_option_menu_set_history((GtkOptionMenu*)p->option_past_future, 1); + gtk_combo_box_set_active (GTK_COMBO_BOX (p->combobox_relative), p->span); + gtk_combo_box_set_active (GTK_COMBO_BOX (p->combobox_past_future), 1); break; } gtk_notebook_set_current_page ((GtkNotebook*) p->notebook_type, note_type); - gtk_option_menu_set_history ((GtkOptionMenu*) p->option_type, note_type); + gtk_combo_box_set_active (GTK_COMBO_BOX (p->combobox_type), note_type); } static void -set_option_type (GtkMenu *menu, FilterDatespec *fds) +set_combobox_type (GtkComboBox *combobox, FilterDatespec *fds) { - GtkWidget *w; - - /* ugh, no other way to 'get_history' */ - w = gtk_menu_get_active (menu); - fds->priv->type = g_list_index (GTK_MENU_SHELL (menu)->children, w); + fds->priv->type = gtk_combo_box_get_active (combobox); gtk_notebook_set_current_page ((GtkNotebook*) fds->priv->notebook_type, fds->priv->type); } static void -set_option_relative (GtkMenu *menu, FilterDatespec *fds) +set_combobox_relative (GtkComboBox *combobox, FilterDatespec *fds) { - GtkWidget *w; - - w = gtk_menu_get_active (menu); - fds->priv->span = g_list_index (GTK_MENU_SHELL (menu)->children, w); + fds->priv->span = gtk_combo_box_get_active (combobox); } static void -set_option_past_future (GtkMenu *menu, FilterDatespec *fds) +set_combobox_past_future (GtkComboBox *combobox, FilterDatespec *fds) { - GtkWidget *w; - - w = gtk_menu_get_active (menu); - if(g_list_index (GTK_MENU_SHELL (menu)->children, w) == 0) + if (gtk_combo_box_get_active (combobox) == 0) fds->type = fds->priv->type = FDST_X_AGO; else fds->type = fds->priv->type = FDST_X_FUTURE; @@ -457,20 +447,17 @@ button_clicked (GtkButton *button, FilterDatespec *fds) gtk_dialog_set_has_separator (dialog, FALSE); p->notebook_type = glade_xml_get_widget (gui, "notebook_type"); - p->option_type = glade_xml_get_widget (gui, "option_type"); + p->combobox_type = glade_xml_get_widget (gui, "combobox_type"); p->calendar_specify = glade_xml_get_widget (gui, "calendar_specify"); p->spin_relative = glade_xml_get_widget (gui, "spin_relative"); - p->option_relative = glade_xml_get_widget (gui, "option_relative"); - p->option_past_future = glade_xml_get_widget (gui, "option_past_future"); + p->combobox_relative = glade_xml_get_widget (gui, "combobox_relative"); + p->combobox_past_future = glade_xml_get_widget (gui, "combobox_past_future"); set_values (fds); - g_signal_connect (GTK_OPTION_MENU (p->option_type)->menu, "deactivate", - G_CALLBACK (set_option_type), fds); - g_signal_connect (GTK_OPTION_MENU (p->option_relative)->menu, "deactivate", - G_CALLBACK (set_option_relative), fds); - g_signal_connect (GTK_OPTION_MENU (p->option_past_future)->menu, "deactivate", - G_CALLBACK (set_option_past_future), fds); + g_signal_connect (p->combobox_type, "changed", G_CALLBACK (set_combobox_type), fds); + g_signal_connect (p->combobox_relative, "changed", G_CALLBACK (set_combobox_relative), fds); + g_signal_connect (p->combobox_past_future, "changed", G_CALLBACK (set_combobox_past_future), fds); gtk_box_pack_start ((GtkBox *) dialog->vbox, toplevel, TRUE, TRUE, 3); diff --git a/filter/filter-option.c b/filter/filter-option.c index 7af511b543..3b93084d67 100644 --- a/filter/filter-option.c +++ b/filter/filter-option.c @@ -342,11 +342,11 @@ xml_decode (FilterElement *fe, xmlNodePtr node) } static void -option_changed (GtkWidget *widget, FilterElement *fe) +combobox_changed (GtkWidget *widget, FilterElement *fe) { FilterOption *fo = (FilterOption *)fe; - fo->current = g_object_get_data ((GObject *) widget, "option"); + fo->current = (struct _filter_option *) g_list_nth (fo->options, gtk_combo_box_get_active (GTK_COMBO_BOX (widget))); } static GSList * @@ -376,10 +376,7 @@ static GtkWidget * get_widget (FilterElement *fe) { FilterOption *fo = (FilterOption *)fe; - GtkWidget *menu; - GtkWidget *omenu; - GtkWidget *item; - GtkWidget *first = NULL; + GtkWidget *combobox; GList *l; struct _filter_option *op; int index = 0, current = 0; @@ -436,35 +433,20 @@ get_widget (FilterElement *fe) g_list_free (old_ops); } - menu = gtk_menu_new (); + combobox = gtk_combo_box_new_text (); l = fo->options; while (l) { op = l->data; - item = gtk_menu_item_new_with_label (_(op->title)); - g_object_set_data ((GObject *) item, "option", op); - g_signal_connect (item, "activate", G_CALLBACK (option_changed), fe); - gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); - gtk_widget_show (item); - if (op == fo->current) { - current = index; - first = item; - } else if (!first) { - first = item; - } + gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), _(op->title)); l = g_list_next (l); index++; } - omenu = gtk_option_menu_new (); - gtk_option_menu_set_menu (GTK_OPTION_MENU (omenu), menu); - - if (first) - g_signal_emit_by_name (first, "activate", fe); - - gtk_option_menu_set_history (GTK_OPTION_MENU (omenu), current); + g_signal_connect (combobox, "changed", G_CALLBACK (combobox_changed), fe); + gtk_combo_box_set_active (GTK_COMBO_BOX (combobox), current); - return omenu; + return combobox; } static void diff --git a/filter/filter-rule.c b/filter/filter-rule.c index 9febe8d0ee..7972de13d0 100644 --- a/filter/filter-rule.c +++ b/filter/filter-rule.c @@ -605,13 +605,13 @@ build_code (FilterRule *fr, GString *out) static void fr_grouping_changed(GtkWidget *w, FilterRule *fr) { - fr->grouping = gtk_option_menu_get_history((GtkOptionMenu *)w); + fr->grouping = gtk_combo_box_get_active (GTK_COMBO_BOX (w)); } static void fr_threading_changed(GtkWidget *w, FilterRule *fr) { - fr->threading = gtk_option_menu_get_history((GtkOptionMenu *)w); + fr->threading = gtk_combo_box_get_active (GTK_COMBO_BOX (w)); } struct _part_data { @@ -622,11 +622,20 @@ struct _part_data { }; static void -option_activate (GtkMenuItem *item, struct _part_data *data) +part_combobox_changed (GtkComboBox *combobox, struct _part_data *data) { - FilterPart *part = g_object_get_data ((GObject *) item, "part"); + FilterPart *part = NULL; FilterPart *newpart; + int index, i; + + index = gtk_combo_box_get_active (combobox); + for (i = 0, part = rule_context_next_part (data->f, part); part && i < index; i++, part = rule_context_next_part (data->f, part)) { + /* traverse until reached index */ + } + g_return_if_fail (part != NULL); + g_return_if_fail (i == index); + /* dont update if we haven't changed */ if (!strcmp (part->title, data->part->title)) return; @@ -644,17 +653,13 @@ option_activate (GtkMenuItem *item, struct _part_data *data) data->partwidget = filter_part_get_widget (newpart); if (data->partwidget) gtk_box_pack_start (GTK_BOX (data->container), data->partwidget, TRUE, TRUE, 0); - - g_object_set_data ((GObject *) data->container, "part", newpart); } static GtkWidget * get_rule_part_widget (RuleContext *f, FilterPart *newpart, FilterRule *fr) { FilterPart *part = NULL; - GtkWidget *menu; - GtkWidget *item; - GtkWidget *omenu; + GtkWidget *combobox; GtkWidget *hbox; GtkWidget *p; int index = 0, current = 0; @@ -674,26 +679,23 @@ get_rule_part_widget (RuleContext *f, FilterPart *newpart, FilterRule *fr) data->partwidget = p; data->container = hbox; - menu = gtk_menu_new (); + combobox = gtk_combo_box_new_text (); + /* sigh, this is a little ugly */ while ((part = rule_context_next_part (f, part))) { - item = gtk_menu_item_new_with_label (_(part->title)); - g_object_set_data ((GObject *) item, "part", part); - g_signal_connect (item, "activate", G_CALLBACK (option_activate), data); - gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); - gtk_widget_show (item); + gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), _(part->title)); + if (!strcmp (newpart->title, part->title)) current = index; index++; } - omenu = gtk_option_menu_new (); - gtk_option_menu_set_menu (GTK_OPTION_MENU (omenu), menu); - gtk_option_menu_set_history (GTK_OPTION_MENU (omenu), current); - gtk_widget_show (omenu); + gtk_combo_box_set_active (GTK_COMBO_BOX (combobox), current); + g_signal_connect (combobox, "changed", G_CALLBACK (part_combobox_changed), data); + gtk_widget_show (combobox); - gtk_box_pack_start (GTK_BOX (hbox), omenu, FALSE, FALSE, 0); + gtk_box_pack_start (GTK_BOX (hbox), combobox, FALSE, FALSE, 0); if (p) gtk_box_pack_start (GTK_BOX (hbox), p, TRUE, TRUE, 0); @@ -836,7 +838,7 @@ get_widget (FilterRule *fr, struct _RuleContext *f) { GtkWidget *hbox, *vbox, *parts, *inframe; GtkWidget *add, *label, *name, *w; - GtkWidget *omenu, *menu, *item; + GtkWidget *combobox; GtkWidget *scrolledwindow; GtkObject *hadj, *vadj; GList *l; @@ -920,48 +922,40 @@ get_widget (FilterRule *fr, struct _RuleContext *f) const char *thread_types[] = { N_("If all conditions are met"), N_("If any conditions are met") }; label = gtk_label_new_with_mnemonic (_("_Find items:")); - menu = gtk_menu_new (); + combobox = gtk_combo_box_new_text (); for (i=0;i<2;i++) { - item = gtk_menu_item_new_with_label(_(thread_types[i])); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); - gtk_widget_show (item); + gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), _(thread_types[i])); } - omenu = gtk_option_menu_new (); - gtk_label_set_mnemonic_widget ((GtkLabel *)label, omenu); - gtk_option_menu_set_menu (GTK_OPTION_MENU (omenu), menu); - gtk_option_menu_set_history (GTK_OPTION_MENU (omenu), fr->grouping); - gtk_widget_show (omenu); + gtk_label_set_mnemonic_widget ((GtkLabel *)label, combobox); + gtk_combo_box_set_active (GTK_COMBO_BOX (combobox), fr->grouping); + gtk_widget_show (combobox); - gtk_box_pack_end (GTK_BOX (hbox), omenu, FALSE, FALSE, 0); + gtk_box_pack_end (GTK_BOX (hbox), combobox, FALSE, FALSE, 0); gtk_box_pack_end (GTK_BOX (hbox), label, FALSE, FALSE, 0); - g_signal_connect(omenu, "changed", G_CALLBACK(fr_grouping_changed), fr); + g_signal_connect (combobox, "changed", G_CALLBACK (fr_grouping_changed), fr); } if (f->flags & RULE_CONTEXT_THREADING) { const char *thread_types[] = { N_("None"), N_("All related"), N_("Replies"), N_("Replies and parents"), N_("No reply or parent") }; label = gtk_label_new_with_mnemonic (_("I_nclude threads")); - menu = gtk_menu_new (); + combobox = gtk_combo_box_new_text (); for (i=0;i<5;i++) { - item = gtk_menu_item_new_with_label(_(thread_types[i])); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); - gtk_widget_show (item); + gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), _(thread_types[i])); } - omenu = gtk_option_menu_new (); - gtk_label_set_mnemonic_widget ((GtkLabel *)label, omenu); - gtk_option_menu_set_menu (GTK_OPTION_MENU (omenu), menu); - gtk_option_menu_set_history (GTK_OPTION_MENU (omenu), fr->threading); - gtk_widget_show (omenu); + gtk_label_set_mnemonic_widget ((GtkLabel *)label, combobox); + gtk_combo_box_set_active (GTK_COMBO_BOX (combobox), fr->threading); + gtk_widget_show (combobox); - gtk_box_pack_end (GTK_BOX (hbox), omenu, FALSE, FALSE, 0); + gtk_box_pack_end (GTK_BOX (hbox), combobox, FALSE, FALSE, 0); gtk_box_pack_end (GTK_BOX (hbox), label, FALSE, FALSE, 0); - g_signal_connect(omenu, "changed", G_CALLBACK(fr_threading_changed), fr); + g_signal_connect (combobox, "changed", G_CALLBACK (fr_threading_changed), fr); } gtk_box_pack_start (GTK_BOX (inframe), hbox, FALSE, FALSE, 3); diff --git a/filter/filter.glade b/filter/filter.glade index 3b43c26249..3773a234c1 100644 --- a/filter/filter.glade +++ b/filter/filter.glade @@ -6,7 +6,7 @@ <widget class="GtkWindow" id="rule-editor"> <property name="visible">True</property> - <property name="title" translatable="no">window1</property> + <property name="title">window1</property> <property name="type">GTK_WINDOW_TOPLEVEL</property> <property name="window_position">GTK_WIN_POS_NONE</property> <property name="modal">False</property> @@ -53,23 +53,11 @@ </child> <child> - <widget class="GtkOptionMenu" id="filter_source"> - <property name="can_focus">True</property> - <property name="history">0</property> - - <child internal-child="menu"> - <widget class="GtkMenu" id="convertwidget15"> - <property name="visible">True</property> - - <child> - <widget class="GtkMenuItem" id="convertwidget16"> - <property name="visible">True</property> - <property name="label" translatable="yes">Incoming</property> - <property name="use_underline">True</property> - </widget> - </child> - </widget> - </child> + <widget class="GtkComboBox" id="filter_source_combobox"> + <property name="visible">True</property> + <property name="items" translatable="yes">Incoming</property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> </widget> <packing> <property name="padding">0</property> @@ -298,7 +286,7 @@ <widget class="GtkWindow" id="filter_datespec_win"> <property name="border_width">6</property> <property name="visible">True</property> - <property name="title" translatable="no">window1</property> + <property name="title">window1</property> <property name="type">GTK_WINDOW_TOPLEVEL</property> <property name="window_position">GTK_WIN_POS_NONE</property> <property name="modal">False</property> @@ -351,40 +339,13 @@ </child> <child> - <widget class="GtkOptionMenu" id="option_type"> + <widget class="GtkComboBox" id="combobox_type"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">0</property> - - <child internal-child="menu"> - <widget class="GtkMenu" id="convertwidget19"> - <property name="visible">True</property> - - <child> - <widget class="GtkMenuItem" id="convertwidget20"> - <property name="visible">True</property> - <property name="label" translatable="yes">the current time</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget21"> - <property name="visible">True</property> - <property name="label" translatable="yes">the time you specify</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget22"> - <property name="visible">True</property> - <property name="label" translatable="yes">a time relative to the current time</property> - <property name="use_underline">True</property> - </widget> - </child> - </widget> - </child> + <property name="items" translatable="yes">the current time +the time you specify +a time relative to the current time</property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> </widget> <packing> <property name="padding">0</property> @@ -625,72 +586,17 @@ a time relative to when filtering occurs.</property> </child> <child> - <widget class="GtkOptionMenu" id="option_relative"> + <widget class="GtkComboBox" id="combobox_relative"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">0</property> - - <child internal-child="menu"> - <widget class="GtkMenu" id="convertwidget23"> - <property name="visible">True</property> - - <child> - <widget class="GtkMenuItem" id="convertwidget24"> - <property name="visible">True</property> - <property name="label" translatable="yes">seconds</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget25"> - <property name="visible">True</property> - <property name="label" translatable="yes">minutes</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget26"> - <property name="visible">True</property> - <property name="label" translatable="yes">hours</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget27"> - <property name="visible">True</property> - <property name="label" translatable="yes">days</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget28"> - <property name="visible">True</property> - <property name="label" translatable="yes">weeks</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget29"> - <property name="visible">True</property> - <property name="label" translatable="yes">months</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget30"> - <property name="visible">True</property> - <property name="label" translatable="yes">years</property> - <property name="use_underline">True</property> - </widget> - </child> - </widget> - </child> + <property name="items" translatable="yes">seconds +minutes +hours +days +weeks +months +years</property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> </widget> <packing> <property name="padding">0</property> @@ -700,33 +606,12 @@ a time relative to when filtering occurs.</property> </child> <child> - <widget class="GtkOptionMenu" id="option_past_future"> + <widget class="GtkComboBox" id="combobox_past_future"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">0</property> - - <child internal-child="menu"> - <widget class="GtkMenu" id="convertwidget31"> - <property name="visible">True</property> - - <child> - <widget class="GtkMenuItem" id="convertwidget32"> - <property name="visible">True</property> - <property name="label" translatable="yes">ago</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget33"> - <property name="visible">True</property> - <property name="label" translatable="yes">in the future</property> - <property name="use_underline">True</property> - </widget> - </child> - </widget> - </child> - + <property name="items" translatable="yes">ago +in the future</property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> </widget> <packing> <property name="padding">0</property> diff --git a/mail/ChangeLog b/mail/ChangeLog index d1e0e834ef..73fca14281 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,21 @@ +2009-04-24 Milan Crha <mcrha@redhat.com> + + ** Fix for bug #572348 + + * mail-config.glade: + * mail-dialogs.glade: + * em-composer-prefs.h: + * em-composer-prefs.c: + * em-subscribe-editor.c: + * em-filter-editor.c: + * em-filter-rule.c: + * em-filter-source-element.c: + * em-mailer-prefs.h: + * em-mailer-prefs.c: + * message-tag-followup.h: + * message-tag-followup.c: + Remove deprecated Gtk+ symbols. + 2009-04-15 Chenthill Palanisamy <pchenthill@novell.com> * mail/mail-ops.c: Corrected a typo error. diff --git a/mail/em-composer-prefs.c b/mail/em-composer-prefs.c index 0b19cc24bf..d9f3718cb0 100644 --- a/mail/em-composer-prefs.c +++ b/mail/em-composer-prefs.c @@ -665,7 +665,7 @@ spell_setup (EMComposerPrefs *prefs) } static gint -attach_style_reply_new_order (gint style_id, +reply_style_new_order (gint style_id, gboolean from_enum_to_option_id) { gint values[] = { @@ -685,41 +685,18 @@ attach_style_reply_new_order (gint style_id, } static void -attach_style_info (GtkWidget *item, - gpointer user_data) -{ - gint *style = user_data; - - g_object_set_data ( - G_OBJECT (item), "style", GINT_TO_POINTER (*style)); - - (*style)++; -} - -static void -attach_style_info_reply (GtkWidget *item, - gpointer user_data) -{ - gint *style = user_data; - - g_object_set_data ( - G_OBJECT (item), "style", GINT_TO_POINTER ( - attach_style_reply_new_order (*style, FALSE))); - - (*style)++; -} - -static void -style_activate (GtkWidget *item, - EMComposerPrefs *prefs) +style_changed (GtkComboBox *combobox, const gchar *key) { GConfClient *client; - const gchar *key; gint style; client = mail_config_get_gconf_client (); - key = g_object_get_data (G_OBJECT (item), "key"); - style = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (item), "style")); + style = gtk_combo_box_get_active (combobox); + g_return_if_fail (style >= 0); + + if (g_str_has_suffix (key, "/reply_style")) + style = reply_style_new_order (style, FALSE); + gconf_client_set_int (client, key, style, NULL); } @@ -979,31 +956,15 @@ em_composer_prefs_construct (EMComposerPrefs *prefs) spell_setup (prefs); /* Forwards and Replies */ - prefs->forward_style = GTK_OPTION_MENU (glade_xml_get_widget (gui, "omenuForwardStyle")); + prefs->forward_style = GTK_COMBO_BOX (glade_xml_get_widget (gui, "comboboxForwardStyle")); style = gconf_client_get_int (client, "/apps/evolution/mail/format/forward_style", NULL); - gtk_option_menu_set_history (prefs->forward_style, style); - style = 0; + gtk_combo_box_set_active (prefs->forward_style, style); + g_signal_connect (prefs->forward_style, "changed", G_CALLBACK (style_changed), "/apps/evolution/mail/format/forward_style"); - gtk_container_foreach (GTK_CONTAINER (gtk_option_menu_get_menu (prefs->forward_style)), - attach_style_info, &style); - - if (gtk_option_menu_get_menu (prefs->forward_style)) { - option_menu_connect (prefs, prefs->forward_style, G_CALLBACK (style_activate), - "/apps/evolution/mail/format/forward_style"); - } - - prefs->reply_style = GTK_OPTION_MENU (glade_xml_get_widget (gui, "omenuReplyStyle")); + prefs->reply_style = GTK_COMBO_BOX (glade_xml_get_widget (gui, "comboboxReplyStyle")); style = gconf_client_get_int (client, "/apps/evolution/mail/format/reply_style", NULL); - gtk_option_menu_set_history (prefs->reply_style, attach_style_reply_new_order (style, TRUE)); - style = 0; - gtk_container_foreach (GTK_CONTAINER (gtk_option_menu_get_menu (prefs->reply_style)), - attach_style_info_reply, &style); - - - if (gtk_option_menu_get_menu (prefs->reply_style)) { - option_menu_connect (prefs, prefs->reply_style, G_CALLBACK (style_activate), - "/apps/evolution/mail/format/reply_style"); - } + gtk_combo_box_set_active (prefs->reply_style, reply_style_new_order (style, TRUE)); + g_signal_connect (prefs->reply_style, "changed", G_CALLBACK (style_changed), "/apps/evolution/mail/format/reply_style"); /* Signatures */ dialog = (GtkDialog *) gtk_dialog_new (); diff --git a/mail/em-composer-prefs.h b/mail/em-composer-prefs.h index 6fcab979f4..82c6ece51e 100644 --- a/mail/em-composer-prefs.h +++ b/mail/em-composer-prefs.h @@ -66,11 +66,8 @@ struct _EMComposerPrefs { GtkTreeModel *language_model; /* Forwards and Replies */ - GtkOptionMenu *forward_style; - GtkOptionMenu *reply_style; - - /* Keyboard Shortcuts */ - GtkOptionMenu *shortcuts_type; + GtkComboBox *forward_style; + GtkComboBox *reply_style; /* Signatures */ GtkTreeView *sig_list; diff --git a/mail/em-filter-editor.c b/mail/em-filter-editor.c index fb0c2c4ea6..4a92a65c58 100644 --- a/mail/em-filter-editor.c +++ b/mail/em-filter-editor.c @@ -122,11 +122,29 @@ em_filter_editor_new (EMFilterContext *fc, const EMFilterSource *source_names) } static void -select_source (GtkMenuItem *mi, EMFilterEditor *fe) +free_sources (gpointer data) +{ + GSList *sources = data; + + g_slist_foreach (sources, (GFunc)g_free, NULL); + g_slist_free (sources); +} + +static void +select_source (GtkComboBox *combobox, EMFilterEditor *fe) { char *source; + int idx; + GSList *sources; + + g_return_if_fail (GTK_IS_COMBO_BOX (combobox)); - source = g_object_get_data(G_OBJECT(mi), "source"); + idx = gtk_combo_box_get_active (combobox); + sources = g_object_get_data (G_OBJECT (combobox), "sources"); + + g_return_if_fail (idx >= 0 && idx < g_slist_length (sources)); + + source = (char *)g_slist_nth (sources, idx); g_return_if_fail (source); rule_editor_set_source ((RuleEditor *)fe, source); @@ -135,23 +153,23 @@ select_source (GtkMenuItem *mi, EMFilterEditor *fe) void em_filter_editor_construct (EMFilterEditor *fe, EMFilterContext *fc, GladeXML *gui, const EMFilterSource *source_names) { - GtkWidget *menu, *item, *omenu; + GtkWidget *combobox; int i; GtkTreeViewColumn *column; + GSList *sources = NULL; - omenu = glade_xml_get_widget (gui, "filter_source"); - gtk_option_menu_remove_menu (GTK_OPTION_MENU (omenu)); - menu = gtk_menu_new (); + combobox = glade_xml_get_widget (gui, "filter_source_combobox"); + gtk_list_store_clear (GTK_LIST_STORE (gtk_combo_box_get_model (GTK_COMBO_BOX (combobox)))); for (i = 0; source_names[i].source; i++) { - item = gtk_menu_item_new_with_label(source_names[i].name); - g_object_set_data_full((GObject *)item, "source", g_strdup(source_names[i].source), g_free); - gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); - gtk_widget_show (item); - g_signal_connect (item, "activate", G_CALLBACK (select_source), fe); + gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), source_names[i].name); + sources = g_slist_append (sources, g_strdup(source_names[i].source)); } - gtk_option_menu_set_menu (GTK_OPTION_MENU (omenu), menu); - gtk_widget_show (omenu); + + gtk_combo_box_set_active (GTK_COMBO_BOX (combobox), 0); + g_signal_connect (combobox, "changed", G_CALLBACK (select_source), fe); + g_object_set_data_full (G_OBJECT (combobox), "sources", sources, free_sources); + gtk_widget_show (combobox); rule_editor_construct ((RuleEditor *) fe, (RuleContext *) fc, gui, source_names[0].source, _("_Filter Rules")); diff --git a/mail/em-filter-rule.c b/mail/em-filter-rule.c index 61156302f8..10f06e38da 100644 --- a/mail/em-filter-rule.c +++ b/mail/em-filter-rule.c @@ -324,39 +324,44 @@ struct _part_data { }; static void -option_activate(GtkMenuItem *item, struct _part_data *data) +part_combobox_changed (GtkComboBox *combobox, struct _part_data *data) { - FilterPart *part = g_object_get_data((GObject *)item, "part"); + FilterPart *part = NULL; FilterPart *newpart; + int index, i; + + index = gtk_combo_box_get_active (combobox); + for (i = 0, part = rule_context_next_part (RULE_CONTEXT (data->f), part); part && i < index; i++, part = rule_context_next_part (RULE_CONTEXT (data->f), part)) { + /* traverse until reached index */ + } + + g_return_if_fail (part != NULL); + g_return_if_fail (i == index); /* dont update if we haven't changed */ - if (!strcmp(part->title, data->part->title)) + if (!strcmp (part->title, data->part->title)) return; /* here we do a widget shuffle, throw away the old widget/rulepart, and create another */ if (data->partwidget) - gtk_container_remove(GTK_CONTAINER(data->container), data->partwidget); + gtk_container_remove (GTK_CONTAINER (data->container), data->partwidget); - newpart = filter_part_clone(part); - filter_part_copy_values(newpart, data->part); - em_filter_rule_replace_action((EMFilterRule *)data->fr, data->part, newpart); - g_object_unref(data->part); + newpart = filter_part_clone (part); + filter_part_copy_values (newpart, data->part); + em_filter_rule_replace_action ((EMFilterRule *)data->fr, data->part, newpart); + g_object_unref (data->part); data->part = newpart; - data->partwidget = filter_part_get_widget(newpart); + data->partwidget = filter_part_get_widget (newpart); if (data->partwidget) - gtk_box_pack_start(GTK_BOX(data->container), data->partwidget, TRUE, TRUE, 0); - - g_object_set_data((GObject *)data->container, "part", newpart); + gtk_box_pack_start (GTK_BOX (data->container), data->partwidget, TRUE, TRUE, 0); } static GtkWidget * get_rule_part_widget(EMFilterContext *f, FilterPart *newpart, FilterRule *fr) { FilterPart *part = NULL; - GtkWidget *menu; - GtkWidget *item; - GtkWidget *omenu; + GtkWidget *combobox; GtkWidget *hbox; GtkWidget *p; int index = 0, current = 0; @@ -373,14 +378,9 @@ get_rule_part_widget(EMFilterContext *f, FilterPart *newpart, FilterRule *fr) data->partwidget = p; data->container = hbox; - menu = gtk_menu_new(); + combobox = gtk_combo_box_new_text (); while ((part = em_filter_context_next_action(f, part))) { - item = gtk_menu_item_new_with_label(_(part->title)); - - g_object_set_data((GObject *)item, "part", part); - g_signal_connect(item, "activate", G_CALLBACK(option_activate), data); - gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); - gtk_widget_show(item); + gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), _(part->title)); if (!strcmp(newpart->title, part->title)) current = index; @@ -388,12 +388,11 @@ get_rule_part_widget(EMFilterContext *f, FilterPart *newpart, FilterRule *fr) index++; } - omenu = gtk_option_menu_new(); - gtk_option_menu_set_menu(GTK_OPTION_MENU(omenu), menu); - gtk_option_menu_set_history(GTK_OPTION_MENU(omenu), current); - gtk_widget_show(omenu); + gtk_combo_box_set_active (GTK_COMBO_BOX (combobox), current); + g_signal_connect (combobox, "changed", G_CALLBACK (part_combobox_changed), data); + gtk_widget_show (combobox); - gtk_box_pack_start(GTK_BOX(hbox), omenu, FALSE, FALSE, 0); + gtk_box_pack_start(GTK_BOX(hbox), combobox, FALSE, FALSE, 0); if (p) gtk_box_pack_start(GTK_BOX(hbox), p, TRUE, TRUE, 0); diff --git a/mail/em-filter-source-element.c b/mail/em-filter-source-element.c index d2b5136751..096f91b2dd 100644 --- a/mail/em-filter-source-element.c +++ b/mail/em-filter-source-element.c @@ -232,21 +232,26 @@ clone(FilterElement *fe) } static void -source_changed(GtkWidget *item, EMFilterSourceElement *fs) +source_changed(GtkComboBox *combobox, EMFilterSourceElement *fs) { - SourceInfo *info = (SourceInfo *)g_object_get_data((GObject *)item, "source"); + SourceInfo *info; + int idx; - g_free(fs->priv->current_url); - fs->priv->current_url = g_strdup(info->url); + idx = gtk_combo_box_get_active (combobox); + g_return_if_fail (idx >= 0 && idx < g_list_length (fs->priv->sources)); + + info = (SourceInfo *) g_list_nth (fs->priv->sources, idx); + g_return_if_fail (info != NULL); + + g_free (fs->priv->current_url); + fs->priv->current_url = g_strdup (info->url); } static GtkWidget * get_widget(FilterElement *fe) { EMFilterSourceElement *fs = (EMFilterSourceElement *)fe; - GtkWidget *menu; - GtkWidget *omenu; - GtkWidget *item; + GtkWidget *combobox; GList *i; SourceInfo *first = NULL; int index, current_index; @@ -254,7 +259,7 @@ get_widget(FilterElement *fe) if (fs->priv->sources == NULL) em_filter_source_element_get_sources(fs); - menu = gtk_menu_new(); + combobox = gtk_combo_box_new_text (); index = 0; current_index = -1; @@ -273,15 +278,9 @@ get_widget(FilterElement *fe) else label = g_strdup_printf("%s <%s>", info->name, info->address); - item = gtk_menu_item_new_with_label(label); + gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), label); g_free(label); - g_object_set_data((GObject *)item, "source", info); - g_signal_connect(item, "activate", G_CALLBACK(source_changed), fs); - - gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); - gtk_widget_show(item); - if (fs->priv->current_url && !strcmp(info->url, fs->priv->current_url)) current_index = index; @@ -289,13 +288,10 @@ get_widget(FilterElement *fe) } } - omenu = gtk_option_menu_new(); - gtk_option_menu_set_menu(GTK_OPTION_MENU(omenu), menu); - if (current_index >= 0) { - gtk_option_menu_set_history(GTK_OPTION_MENU(omenu), current_index); + gtk_combo_box_set_active (GTK_COMBO_BOX (combobox), current_index); } else { - gtk_option_menu_set_history(GTK_OPTION_MENU(omenu), 0); + gtk_combo_box_set_active (GTK_COMBO_BOX (combobox), 0); g_free(fs->priv->current_url); if (first) @@ -304,7 +300,9 @@ get_widget(FilterElement *fe) fs->priv->current_url = NULL; } - return omenu; + g_signal_connect (combobox, "changed", G_CALLBACK (source_changed), fs); + + return combobox; } static void diff --git a/mail/em-mailer-prefs.c b/mail/em-mailer-prefs.c index ec5b8c7fb7..e489e16826 100644 --- a/mail/em-mailer-prefs.c +++ b/mail/em-mailer-prefs.c @@ -933,82 +933,74 @@ charset_menu_init (EMMailerPrefs *prefs) } static void -trash_days_activate (GtkWidget *item, EMMailerPrefs *prefs) +trash_days_changed (GtkComboBox *combobox, EMMailerPrefs *prefs) { - int days; + int idx; + + idx = gtk_combo_box_get_active (combobox); + g_return_if_fail (idx >= 0 && idx < G_N_ELEMENTS (empty_trash_frequency)); - days = GPOINTER_TO_INT (g_object_get_data ((GObject *) item, "days")); - gconf_client_set_int (prefs->gconf, "/apps/evolution/mail/trash/empty_on_exit_days", days, NULL); + gconf_client_set_int (prefs->gconf, "/apps/evolution/mail/trash/empty_on_exit_days", empty_trash_frequency [idx].days, NULL); } static void emmp_empty_trash_init (EMMailerPrefs *prefs) { int locked, days, hist = 0, i; - GtkWidget *menu, *item; toggle_button_init (prefs, prefs->empty_trash, FALSE, "/apps/evolution/mail/trash/empty_on_exit", G_CALLBACK (toggle_button_toggled)); days = gconf_client_get_int(prefs->gconf, "/apps/evolution/mail/trash/empty_on_exit_days", NULL); - menu = gtk_menu_new(); + + gtk_list_store_clear (GTK_LIST_STORE (gtk_combo_box_get_model (prefs->empty_trash_days))); for (i = 0; i < G_N_ELEMENTS (empty_trash_frequency); i++) { if (days >= empty_trash_frequency[i].days) hist = i; - item = gtk_menu_item_new_with_label (_(empty_trash_frequency[i].label)); - g_object_set_data ((GObject *) item, "days", GINT_TO_POINTER (empty_trash_frequency[i].days)); - g_signal_connect (item, "activate", G_CALLBACK (trash_days_activate), prefs); - - gtk_widget_show (item); - gtk_menu_shell_append((GtkMenuShell *)menu, item); + gtk_combo_box_append_text (prefs->empty_trash_days, _(empty_trash_frequency[i].label)); } - gtk_widget_show(menu); - gtk_option_menu_set_menu((GtkOptionMenu *)prefs->empty_trash_days, menu); - gtk_option_menu_set_history((GtkOptionMenu *)prefs->empty_trash_days, hist); + g_signal_connect (prefs->empty_trash_days, "changed", G_CALLBACK (trash_days_changed), prefs); + gtk_combo_box_set_active (prefs->empty_trash_days, hist); locked = !gconf_client_key_is_writable (prefs->gconf, "/apps/evolution/mail/trash/empty_on_exit_days", NULL); gtk_widget_set_sensitive ((GtkWidget *) prefs->empty_trash_days, !locked); } static void -junk_days_activate (GtkWidget *item, EMMailerPrefs *prefs) +junk_days_changed (GtkComboBox *combobox, EMMailerPrefs *prefs) { - int days; + int idx; + + idx = gtk_combo_box_get_active (combobox); + g_return_if_fail (idx >= 0 && idx < G_N_ELEMENTS (empty_trash_frequency)); - days = GPOINTER_TO_INT (g_object_get_data ((GObject *) item, "days")); - gconf_client_set_int (prefs->gconf, "/apps/evolution/mail/junk/empty_on_exit_days", days, NULL); + gconf_client_set_int (prefs->gconf, "/apps/evolution/mail/junk/empty_on_exit_days", empty_trash_frequency[idx].days, NULL); } static void emmp_empty_junk_init (EMMailerPrefs *prefs) { int locked, days, hist = 0, i; - GtkWidget *menu, *item; toggle_button_init (prefs, prefs->empty_junk, FALSE, "/apps/evolution/mail/junk/empty_on_exit", G_CALLBACK (toggle_button_toggled)); days = gconf_client_get_int(prefs->gconf, "/apps/evolution/mail/junk/empty_on_exit_days", NULL); - menu = gtk_menu_new(); + + gtk_list_store_clear (GTK_LIST_STORE (gtk_combo_box_get_model (prefs->empty_junk_days))); for (i = 0; i < G_N_ELEMENTS (empty_trash_frequency); i++) { if (days >= empty_trash_frequency[i].days) hist = i; - item = gtk_menu_item_new_with_label (_(empty_trash_frequency[i].label)); - g_object_set_data ((GObject *) item, "days", GINT_TO_POINTER (empty_trash_frequency[i].days)); - g_signal_connect (item, "activate", G_CALLBACK (junk_days_activate), prefs); - - gtk_widget_show (item); - gtk_menu_shell_append((GtkMenuShell *)menu, item); + gtk_combo_box_append_text (prefs->empty_junk_days, _(empty_trash_frequency[i].label)); } - gtk_widget_show(menu); - gtk_option_menu_set_menu((GtkOptionMenu *)prefs->empty_junk_days, menu); - gtk_option_menu_set_history((GtkOptionMenu *)prefs->empty_junk_days, hist); + g_signal_connect (prefs->empty_junk_days, "changed", G_CALLBACK (junk_days_changed), prefs); + gtk_combo_box_set_active (prefs->empty_junk_days, hist); locked = !gconf_client_key_is_writable (prefs->gconf, "/apps/evolution/mail/junk/empty_on_exit_days", NULL); gtk_widget_set_sensitive ((GtkWidget *) prefs->empty_junk_days, !locked); @@ -1268,7 +1260,7 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs) /* Deleting Mail */ prefs->empty_trash = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkEmptyTrashOnExit")); - prefs->empty_trash_days = GTK_OPTION_MENU (glade_xml_get_widget (gui, "omenuEmptyTrashDays")); + prefs->empty_trash_days = GTK_COMBO_BOX (glade_xml_get_widget (gui, "comboboxEmptyTrashDays")); emmp_empty_trash_init (prefs); prefs->confirm_expunge = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkConfirmExpunge")); @@ -1481,7 +1473,7 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs) G_CALLBACK (toggle_button_toggled)); prefs->empty_junk = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "junk_empty_check")); - prefs->empty_junk_days = GTK_OPTION_MENU (glade_xml_get_widget (gui, "junk_empty_combo")); + prefs->empty_junk_days = GTK_COMBO_BOX (glade_xml_get_widget (gui, "junk_empty_combobox")); emmp_empty_junk_init (prefs); prefs->default_junk_plugin = GTK_COMBO_BOX (glade_xml_get_widget (gui, "default_junk_plugin")); diff --git a/mail/em-mailer-prefs.h b/mail/em-mailer-prefs.h index 6e783ef562..3b52d9f40a 100644 --- a/mail/em-mailer-prefs.h +++ b/mail/em-mailer-prefs.h @@ -34,6 +34,7 @@ extern "C" { struct _ESignature; struct _GtkToggleButton; struct _GtkOptionMenu; +struct _GtkComboBox; struct _GdkPixbuf; struct _GtkWidget; struct _GladeXML; @@ -85,7 +86,7 @@ struct _EMMailerPrefs { /* Deleting Mail */ struct _GtkToggleButton *empty_trash; - struct _GtkOptionMenu *empty_trash_days; + struct _GtkComboBox *empty_trash_days; struct _GtkToggleButton *confirm_expunge; /* HTML Mail tab */ @@ -121,7 +122,7 @@ struct _EMMailerPrefs { /* Junk prefs */ struct _GtkToggleButton *check_incoming; struct _GtkToggleButton *empty_junk; - struct _GtkOptionMenu *empty_junk_days; + struct _GtkComboBox *empty_junk_days; struct _GtkToggleButton *sa_local_tests_only; struct _GtkToggleButton *sa_use_daemon; diff --git a/mail/em-subscribe-editor.c b/mail/em-subscribe-editor.c index bca062b096..724b9b4874 100644 --- a/mail/em-subscribe-editor.c +++ b/mail/em-subscribe-editor.c @@ -59,9 +59,8 @@ struct _EMSubscribeEditor { GtkDialog *dialog; GtkWidget *vbox; /* where new stores are added */ - GtkWidget *optionmenu; + GtkWidget *combobox; GtkWidget *none_selected; /* 'please select a xxx' message */ - GtkWidget *none_selected_item; GtkWidget *progress; }; @@ -357,7 +356,7 @@ sub_folderinfo_exec (struct _emse_folderinfo_msg *m) if (m->seq == m->sub->seq) { camel_operation_register(m->base.cancel); - m->info = camel_store_get_folder_info(m->sub->store, m->node?m->node->info->full_name:pub_full_name, CAMEL_STORE_FOLDER_INFO_FAST | CAMEL_STORE_FOLDER_INFO_NO_VIRTUAL, &m->base.ex); + m->info = camel_store_get_folder_info(m->sub->store, m->node?m->node->info->full_name:pub_full_name, CAMEL_STORE_FOLDER_INFO_NO_VIRTUAL, &m->base.ex); camel_operation_unregister(m->base.cancel); } } @@ -729,20 +728,31 @@ sub_editor_got_store(char *uri, CamelStore *store, void *data) } static void -sub_editor_menu_changed(GtkWidget *w, EMSubscribeEditor *se) +sub_editor_combobox_changed (GtkWidget *w, EMSubscribeEditor *se) { int i, n; struct _EMSubscribe *sub; - d(printf("menu changed\n")); + d(printf("combobox changed\n")); i = 1; - n = gtk_option_menu_get_history((GtkOptionMenu *)se->optionmenu); - if (n == 0) - gtk_widget_show(se->none_selected); - else { - gtk_widget_hide(se->none_selected); - gtk_widget_hide(se->none_selected_item); + n = gtk_combo_box_get_active (GTK_COMBO_BOX (se->combobox)); + if (n == 0) { + gtk_widget_show (se->none_selected); + } else { + GtkTreeIter iter; + GtkTreeModel *model; + + gtk_widget_hide (se->none_selected); + + model = gtk_combo_box_get_model (GTK_COMBO_BOX (se->combobox)); + if (gtk_tree_model_get_iter_first (model, &iter)) { + /* hide the first item */ + gtk_list_store_set ( + GTK_LIST_STORE (model), &iter, + 1, FALSE, + -1); + } } se->current = NULL; @@ -815,7 +825,10 @@ GtkDialog *em_subscribe_editor_new(void) EAccountList *accounts; EIterator *iter; GladeXML *xml; - GtkWidget *menu, *w; + GtkWidget *w; + GtkCellRenderer *cell; + GtkListStore *store; + GtkTreeIter gtiter; char *gladefile; se = g_malloc0(sizeof(*se)); @@ -859,12 +872,27 @@ GtkDialog *em_subscribe_editor_new(void) w = glade_xml_get_widget(xml, "refresh_button"); g_signal_connect(w, "clicked", G_CALLBACK(sub_editor_refresh), se); - /* setup stores menu */ - se->optionmenu = glade_xml_get_widget(xml, "store_menu"); - menu = gtk_menu_new(); - se->none_selected_item = w = gtk_menu_item_new_with_label(_("No server has been selected")); - gtk_widget_show(w); - gtk_menu_shell_append ((GtkMenuShell *)menu, w); + /* setup stores combobox */ + se->combobox = glade_xml_get_widget (xml, "store_combobox"); + store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_BOOLEAN); + gtk_combo_box_set_model (GTK_COMBO_BOX (se->combobox), GTK_TREE_MODEL (store)); + g_object_unref (store); + + gtk_cell_layout_clear (GTK_CELL_LAYOUT (se->combobox)); + + cell = gtk_cell_renderer_text_new (); + gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (se->combobox), cell, TRUE); + gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (se->combobox), cell, + "text", 0, + "visible", 1, + NULL); + + gtk_list_store_append (store, >iter); + gtk_list_store_set ( + store, >iter, + 0, _("No server has been selected"), + 1, TRUE, + -1); accounts = mail_config_get_accounts (); for (iter = e_list_get_iterator ((EList *) accounts); @@ -875,9 +903,12 @@ GtkDialog *em_subscribe_editor_new(void) /* setup url table, and store table? */ if (account->enabled && account->source->url) { d(printf("adding account '%s'\n", account->name)); - w = gtk_menu_item_new_with_label(account->name); - gtk_menu_shell_append ((GtkMenuShell *)menu, w); - gtk_widget_show(w); + gtk_list_store_append (store, >iter); + gtk_list_store_set ( + store, >iter, + 0, account->name, + 1, TRUE, + -1); e_dlist_addtail(&se->stores, (EDListNode *)subscribe_new(se, account->source->url)); } else { d(printf("not adding account '%s'\n", account->name)); @@ -885,8 +916,8 @@ GtkDialog *em_subscribe_editor_new(void) } g_object_unref(iter); - gtk_option_menu_set_menu((GtkOptionMenu *)se->optionmenu, menu); - g_signal_connect(se->optionmenu, "changed", G_CALLBACK(sub_editor_menu_changed), se); + gtk_combo_box_set_active (GTK_COMBO_BOX (se->combobox), 0); + g_signal_connect(se->combobox, "changed", G_CALLBACK(sub_editor_combobox_changed), se); if (window_size.width == 0) { /* initialize @window_size with the previous session's size */ diff --git a/mail/mail-config.glade b/mail/mail-config.glade index de881e40e5..f435b95a63 100644 --- a/mail/mail-config.glade +++ b/mail/mail-config.glade @@ -550,8 +550,8 @@ For example: "Work" or "Personal"</property> <property name="invisible_char">*</property> <property name="activates_default">False</property> <accessibility> - <atkrelation target="label464" type="labelled-by"/> <atkrelation target="identity_address_label" type="labelled-by"/> + <atkrelation target="label464" type="labelled-by"/> </accessibility> </widget> <packing> @@ -633,8 +633,8 @@ For example: "Work" or "Personal"</property> <property name="invisible_char">*</property> <property name="activates_default">False</property> <accessibility> - <atkrelation target="identity_full_name_label" type="labelled-by"/> <atkrelation target="label464" type="labelled-by"/> + <atkrelation target="identity_full_name_label" type="labelled-by"/> </accessibility> </widget> <packing> @@ -836,8 +836,8 @@ For example: "Work" or "Personal"</property> <property name="invisible_char">*</property> <property name="activates_default">False</property> <accessibility> - <atkrelation target="label466" type="labelled-by"/> <atkrelation target="identity_organization_label" type="labelled-by"/> + <atkrelation target="label466" type="labelled-by"/> </accessibility> </widget> <packing> @@ -890,8 +890,8 @@ For example: "Work" or "Personal"</property> <property name="invisible_char">*</property> <property name="activates_default">False</property> <accessibility> - <atkrelation target="reply_to_label" type="labelled-by"/> <atkrelation target="label466" type="labelled-by"/> + <atkrelation target="reply_to_label" type="labelled-by"/> </accessibility> </widget> <packing> @@ -2804,7 +2804,7 @@ For example: "Work" or "Personal"</property> <widget class="Custom" id="sent_button"> <property name="visible">True</property> <property name="creation_function">em_account_editor_folder_selector_button_new</property> - <property name="string1" translatable="yes">Select Sent Folder</property> + <property name="string1">Select Sent Folder</property> <property name="int1">0</property> <property name="int2">0</property> <property name="last_modification_time">Tue, 14 Dec 2004 17:07:09 GMT</property> @@ -2823,7 +2823,7 @@ For example: "Work" or "Personal"</property> <widget class="Custom" id="drafts_button"> <property name="visible">True</property> <property name="creation_function">em_account_editor_folder_selector_button_new</property> - <property name="string1" translatable="yes">Select Drafts Folder</property> + <property name="string1">Select Drafts Folder</property> <property name="int1">0</property> <property name="int2">0</property> <property name="last_modification_time">Tue, 14 Dec 2004 17:07:02 GMT</property> @@ -5458,10 +5458,12 @@ For example: "Work" or "Personal"</property> </child> <child> - <widget class="GtkOptionMenu" id="omenuEmptyTrashDays"> + <widget class="GtkComboBox" id="comboboxEmptyTrashDays"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">-1</property> + <property name="items" translatable="yes">a +b</property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> </widget> <packing> <property name="padding">0</property> @@ -6648,10 +6650,12 @@ For example: "Work" or "Personal"</property> </child> <child> - <widget class="GtkOptionMenu" id="junk_empty_combo"> + <widget class="GtkComboBox" id="junk_empty_combobox"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">-1</property> + <property name="items" translatable="yes">a +b</property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> </widget> <packing> <property name="padding">0</property> @@ -6874,7 +6878,6 @@ For example: "Work" or "Personal"</property> <property name="right_attach">1</property> <property name="top_attach">6</property> <property name="bottom_attach">7</property> - <property name="x_padding">0</property> <property name="x_options">fill</property> </packing> </child> @@ -7164,7 +7167,6 @@ For example: "Work" or "Personal"</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> - <property name="mnemonic_widget">omenuReplyStyle</property> <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> <property name="width_chars">-1</property> <property name="single_line_mode">False</property> @@ -7199,48 +7201,14 @@ For example: "Work" or "Personal"</property> <property name="spacing">0</property> <child> - <widget class="GtkOptionMenu" id="omenuReplyStyle"> + <widget class="GtkComboBox" id="comboboxReplyStyle"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">0</property> - - <child internal-child="menu"> - <widget class="GtkMenu" id="convertwidget33"> - <property name="visible">True</property> - <child> - <widget class="GtkMenuItem" id="convertwidget36"> - <property name="visible">True</property> - <property name="label" translatable="yes">Attachment</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget50"> - <property name="visible">True</property> - <property name="label" translatable="yes">Inline (Outlook style)</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget34"> - <property name="visible">True</property> - <property name="label" translatable="yes">Quoted</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget35"> - <property name="visible">True</property> - <property name="label" translatable="yes">Do not quote</property> - <property name="use_underline">True</property> - </widget> - </child> - - </widget> - </child> + <property name="items" translatable="yes">Attachment +Inline (Outlook style) +Quoted +Do not quote</property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> </widget> <packing> <property name="padding">0</property> @@ -7268,40 +7236,13 @@ For example: "Work" or "Personal"</property> <property name="spacing">0</property> <child> - <widget class="GtkOptionMenu" id="omenuForwardStyle"> + <widget class="GtkComboBox" id="comboboxForwardStyle"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">0</property> - - <child internal-child="menu"> - <widget class="GtkMenu" id="convertwidget37"> - <property name="visible">True</property> - - <child> - <widget class="GtkMenuItem" id="convertwidget38"> - <property name="visible">True</property> - <property name="label" translatable="yes">Attachment</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget39"> - <property name="visible">True</property> - <property name="label" translatable="yes">Inline</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget40"> - <property name="visible">True</property> - <property name="label" translatable="yes">Quoted</property> - <property name="use_underline">True</property> - </widget> - </child> - </widget> - </child> + <property name="items" translatable="yes">Attachment +Inline +Quoted</property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> </widget> <packing> <property name="padding">0</property> @@ -7371,7 +7312,6 @@ For example: "Work" or "Personal"</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> - <property name="mnemonic_widget">omenuForwardStyle</property> <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> <property name="width_chars">-1</property> <property name="single_line_mode">False</property> @@ -9329,35 +9269,6 @@ for display purposes only. </property> </packing> </child> - <!--<child> - <widget class="GtkLabel" id="lblSocksHost"> - <property name="visible">True</property> - <property name="label" translatable="yes">S_OCKS Host:</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="mnemonic_widget">txtSocksHost</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="y_options"></property> - </packing> - </child>--> - <child> <widget class="GtkLabel" id="lblIgnoreHosts"> <property name="visible">True</property> @@ -9429,27 +9340,6 @@ for display purposes only. </property> </packing> </child> - <!--<child> - <widget class="GtkEntry" id="txtSocksHost"> - <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">2</property> - <property name="bottom_attach">3</property> - <property name="y_options"></property> - </packing> - </child>--> - <child> <widget class="GtkLabel" id="lblHttpPort"> <property name="visible">True</property> @@ -9506,34 +9396,6 @@ for display purposes only. </property> </packing> </child> - <!--<child> - <widget class="GtkLabel" id="lblSocksPort"> - <property name="visible">True</property> - <property name="label" translatable="yes">Port:</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.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">2</property> - <property name="right_attach">3</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="GtkSpinButton" id="spnHttpPort"> <property name="visible">True</property> @@ -9576,27 +9438,6 @@ for display purposes only. </property> </packing> </child> - <!--<child> - <widget class="GtkSpinButton" id="spnSocksPort"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="climb_rate">1</property> - <property name="digits">0</property> - <property name="numeric">False</property> - <property name="update_policy">GTK_UPDATE_ALWAYS</property> - <property name="snap_to_ticks">False</property> - <property name="wrap">False</property> - <property name="adjustment">0 0 65535 1 10 0</property> - </widget> - <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> <widget class="GtkEntry" id="txtIgnoreHosts"> <property name="visible">True</property> @@ -9780,59 +9621,6 @@ for display purposes only. </property> <property name="fill">True</property> </packing> </child> - - <!-- <child> - <widget class="GtkRadioButton" id="rdoAutoConfig"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">_Automatic proxy configuration URL:</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <property name="active">False</property> - <property name="inconsistent">False</property> - <property name="draw_indicator">True</property> - <property name="group">rdoSysSettings</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkAlignment" id="alignment36"> - <property name="visible">True</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xscale">1</property> - <property name="yscale">1</property> - <property name="top_padding">0</property> - <property name="bottom_padding">0</property> - <property name="left_padding">24</property> - <property name="right_padding">0</property> - - <child> - <widget class="GtkEntry" id="txtAutoConfigUrl"> - <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> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">True</property> - </packing> - </child> --> </widget> <packing> <property name="padding">0</property> diff --git a/mail/mail-dialogs.glade b/mail/mail-dialogs.glade index 1ecf410ed5..689082792a 100644 --- a/mail/mail-dialogs.glade +++ b/mail/mail-dialogs.glade @@ -19,6 +19,7 @@ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property> <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> <property name="focus_on_map">True</property> + <property name="urgency_hint">False</property> <property name="has_separator">False</property> <child internal-child="vbox"> @@ -174,7 +175,6 @@ <property name="fill">True</property> </packing> </child> - </widget> <packing> <property name="padding">0</property> @@ -201,6 +201,7 @@ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property> <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> <property name="focus_on_map">True</property> + <property name="urgency_hint">False</property> <property name="has_separator">False</property> <child internal-child="vbox"> @@ -235,31 +236,62 @@ </packing> </child> + <child> + <widget class="GtkVBox" id="vbox161"> + <property name="border_width">12</property> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">18</property> + <child> - <widget class="GtkVBox" id="vbox161"> - <property name="border_width">12</property> + <widget class="GtkVBox" id="frame5"> <property name="visible">True</property> <property name="homogeneous">False</property> - <property name="spacing">18</property> + <property name="spacing">6</property> + + <child> + <widget class="GtkLabel" id="label464"> + <property name="visible">True</property> + <property name="label" translatable="yes"><span weight="bold">Digital Signature</span></property> + <property name="use_underline">False</property> + <property name="use_markup">True</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> <child> - <widget class="GtkVBox" id="frame5"> + <widget class="GtkHBox" id="hbox170"> <property name="visible">True</property> <property name="homogeneous">False</property> - <property name="spacing">6</property> + <property name="spacing">0</property> <child> - <widget class="GtkLabel" id="label464"> + <widget class="GtkLabel" id="label465"> <property name="visible">True</property> - <property name="label" translatable="yes"><span weight="bold">Digital Signature</span></property> + <property name="label" translatable="yes"></property> <property name="use_underline">False</property> - <property name="use_markup">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="xalign">0.5</property> <property name="yalign">0.5</property> - <property name="xpad">0</property> + <property name="xpad">12</property> <property name="ypad">0</property> <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> <property name="width_chars">-1</property> @@ -274,67 +306,29 @@ </child> <child> - <widget class="GtkHBox" id="hbox170"> + <widget class="GtkTable" id="table10"> <property name="visible">True</property> + <property name="n_rows">1</property> + <property name="n_columns">1</property> <property name="homogeneous">False</property> - <property name="spacing">0</property> - - <child> - <widget class="GtkLabel" id="label465"> - <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.5</property> - <property name="yalign">0.5</property> - <property name="xpad">12</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> + <property name="row_spacing">2</property> + <property name="column_spacing">6</property> <child> - <widget class="GtkTable" id="table10"> + <widget class="GtkVBox" id="signature_vbox"> <property name="visible">True</property> - <property name="n_rows">1</property> - <property name="n_columns">1</property> <property name="homogeneous">False</property> - <property name="row_spacing">2</property> - <property name="column_spacing">6</property> + <property name="spacing">0</property> <child> - <widget class="GtkVBox" id="signature_vbox"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> - - <child> - <placeholder/> - </child> - </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> - </packing> + <placeholder/> </child> </widget> <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</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> </packing> </child> </widget> @@ -347,29 +341,67 @@ </widget> <packing> <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkVBox" id="frame6"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">6</property> + + <child> + <widget class="GtkLabel" id="label477"> + <property name="visible">True</property> + <property name="label" translatable="yes"><span weight="bold">Encryption</span></property> + <property name="use_underline">False</property> + <property name="use_markup">True</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> <child> - <widget class="GtkVBox" id="frame6"> + <widget class="GtkHBox" id="hbox171"> <property name="visible">True</property> <property name="homogeneous">False</property> - <property name="spacing">6</property> + <property name="spacing">0</property> <child> - <widget class="GtkLabel" id="label477"> + <widget class="GtkLabel" id="label478"> <property name="visible">True</property> - <property name="label" translatable="yes"><span weight="bold">Encryption</span></property> + <property name="label" translatable="yes"></property> <property name="use_underline">False</property> - <property name="use_markup">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="xalign">0.5</property> <property name="yalign">0.5</property> - <property name="xpad">0</property> + <property name="xpad">12</property> <property name="ypad">0</property> <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> <property name="width_chars">-1</property> @@ -384,67 +416,29 @@ </child> <child> - <widget class="GtkHBox" id="hbox171"> + <widget class="GtkTable" id="table11"> <property name="visible">True</property> + <property name="n_rows">1</property> + <property name="n_columns">1</property> <property name="homogeneous">False</property> - <property name="spacing">0</property> - - <child> - <widget class="GtkLabel" id="label478"> - <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.5</property> - <property name="yalign">0.5</property> - <property name="xpad">12</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> + <property name="row_spacing">2</property> + <property name="column_spacing">6</property> <child> - <widget class="GtkTable" id="table11"> + <widget class="GtkVBox" id="encryption_vbox"> <property name="visible">True</property> - <property name="n_rows">1</property> - <property name="n_columns">1</property> <property name="homogeneous">False</property> - <property name="row_spacing">2</property> - <property name="column_spacing">6</property> + <property name="spacing">0</property> <child> - <widget class="GtkVBox" id="encryption_vbox"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> - - <child> - <placeholder/> - </child> - </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> - </packing> + <placeholder/> </child> </widget> <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</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> </packing> </child> </widget> @@ -457,13 +451,24 @@ </widget> <packing> <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> + <property name="expand">True</property> + <property name="fill">True</property> </packing> </child> </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> </child> - + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> </widget> </child> </widget> @@ -483,6 +488,7 @@ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property> <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> <property name="focus_on_map">True</property> + <property name="urgency_hint">False</property> <property name="has_separator">False</property> <child internal-child="vbox"> @@ -556,7 +562,6 @@ <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> - <property name="mnemonic_widget">store_menu</property> <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> <property name="width_chars">-1</property> <property name="single_line_mode">False</property> @@ -570,24 +575,10 @@ </child> <child> - <widget class="GtkOptionMenu" id="store_menu"> + <widget class="GtkComboBox" id="store_combobox"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">0</property> - - <child> - <widget class="GtkMenu" id="menu1"> - - <child> - <widget class="GtkMenuItem" id="no_imap_server_selected1"> - <property name="visible">True</property> - <property name="label" translatable="yes">None Selected</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_no_imap_server_selected1_activate" last_modification_time="Mon, 14 Apr 2003 17:08:20 GMT"/> - </widget> - </child> - </widget> - </child> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> </widget> <packing> <property name="padding">0</property> @@ -661,6 +652,7 @@ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property> <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> <property name="focus_on_map">True</property> + <property name="urgency_hint">False</property> <property name="has_separator">True</property> <child internal-child="vbox"> @@ -882,6 +874,7 @@ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property> <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> <property name="focus_on_map">True</property> + <property name="urgency_hint">False</property> <property name="has_separator">False</property> <child internal-child="vbox"> @@ -943,13 +936,14 @@ <property name="spacing">6</property> <child> - <widget class="Custom" id="pixmap"> + <widget class="GtkImage" id="pixmap"> <property name="visible">True</property> - <property name="creation_function">e_create_image_widget</property> - <property name="string1">stock_mail-flag-for-followup</property> - <property name="int1">0</property> - <property name="int2">0</property> - <property name="last_modification_time">Wed, 08 Dec 2004 02:35:27 GMT</property> + <property name="icon_size">6</property> + <property name="icon_name">stock_mail-flag-for-followup</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> </widget> <packing> <property name="padding">0</property> @@ -1042,7 +1036,6 @@ Please select a follow up action from the "Flag" menu.</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> - <property name="mnemonic_widget">combo-entry</property> <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> <property name="width_chars">-1</property> <property name="single_line_mode">False</property> @@ -1106,71 +1099,6 @@ Please select a follow up action from the "Flag" menu.</property> </child> <child> - <widget class="GtkCombo" id="combo"> - <property name="visible">True</property> - <property name="value_in_list">False</property> - <property name="allow_empty">True</property> - <property name="case_sensitive">False</property> - <property name="enable_arrow_keys">True</property> - <property name="enable_arrows_always">False</property> - - <child internal-child="entry"> - <widget class="GtkEntry" id="combo-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> - </child> - - <child internal-child="list"> - <widget class="GtkList" id="convertwidget3"> - <property name="visible">True</property> - <property name="selection_mode">GTK_SELECTION_BROWSE</property> - - <child> - <widget class="GtkListItem" id="convertwidget4"> - <property name="visible">True</property> - - <child> - <widget class="GtkLabel" id="convertwidget5"> - <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.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> - </child> - </widget> - </child> - </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="Custom" id="target_date"> <property name="visible">True</property> <property name="creation_function">target_date_new</property> @@ -1208,6 +1136,25 @@ Please select a follow up action from the "Flag" menu.</property> <property name="y_options"></property> </packing> </child> + + <child> + <widget class="GtkComboBoxEntry" id="combo"> + <property name="visible">True</property> + <property name="items" translatable="yes">a +b</property> + <property name="add_tearoffs">False</property> + <property name="has_frame">True</property> + <property name="focus_on_click">True</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="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> </widget> <packing> <property name="padding">0</property> @@ -1241,6 +1188,7 @@ Please select a follow up action from the "Flag" menu.</property> <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property> <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> <property name="focus_on_map">True</property> + <property name="urgency_hint">False</property> <property name="has_separator">False</property> <child internal-child="vbox"> @@ -1441,7 +1389,6 @@ Please select a follow up action from the "Flag" menu.</property> <property name="inconsistent">False</property> <property name="draw_indicator">True</property> <property name="group">local_rb</property> - </widget> <packing> <property name="padding">0</property> diff --git a/mail/message-tag-followup.c b/mail/message-tag-followup.c index a5f2a967db..2ddd372257 100644 --- a/mail/message-tag-followup.c +++ b/mail/message-tag-followup.c @@ -112,7 +112,7 @@ message_tag_followup_class_init (MessageTagFollowUpClass *klass) static void message_tag_followup_init (MessageTagFollowUp *editor) { - editor->combo = NULL; + editor->combo_entry = NULL; editor->target_date = NULL; editor->completed = NULL; editor->clear = NULL; @@ -139,7 +139,7 @@ get_tag_list (MessageTagEditor *editor) time_t date; char *text; - camel_tag_set (&tags, "follow-up", gtk_entry_get_text (GTK_ENTRY (followup->combo->entry))); + camel_tag_set (&tags, "follow-up", gtk_entry_get_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (followup->combo_entry))))); date = e_date_edit_get_time (followup->target_date); if (date != (time_t) -1) { @@ -170,7 +170,7 @@ set_tag_list (MessageTagEditor *editor, CamelTag *tags) text = camel_tag_get (&tags, "follow-up"); if (text) - gtk_entry_set_text (GTK_ENTRY (followup->combo->entry), text); + gtk_entry_set_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (followup->combo_entry))), text); text = camel_tag_get (&tags, "due-by"); if (text && *text) { @@ -195,7 +195,7 @@ clear_clicked (GtkButton *button, gpointer user_data) { MessageTagFollowUp *followup = user_data; - gtk_list_select_item (GTK_LIST (followup->combo->list), DEFAULT_FLAG); + gtk_combo_box_set_active (followup->combo_entry, DEFAULT_FLAG); e_date_edit_set_time (followup->target_date, (time_t) -1); gtk_toggle_button_set_active (followup->completed, FALSE); @@ -268,7 +268,6 @@ construct (MessageTagEditor *editor) GtkCellRenderer *renderer; GtkListStore *model; GtkWidget *widget; - GList *strings; GladeXML *gui; int i; char *gladefile; @@ -294,11 +293,6 @@ construct (MessageTagEditor *editor) gtk_widget_reparent (widget, GTK_DIALOG (editor)->vbox); gtk_box_set_child_packing (GTK_BOX (GTK_DIALOG (editor)->vbox), widget, TRUE, TRUE, 6, GTK_PACK_START); - widget = glade_xml_get_widget (gui, "pixmap"); - gtk_image_set_from_icon_name ( - GTK_IMAGE (widget), "stock_mail-flag-for-followup", - GTK_ICON_SIZE_DIALOG); - followup->message_list = GTK_TREE_VIEW (glade_xml_get_widget (gui, "message_list")); model = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING); gtk_tree_view_set_model (followup->message_list, (GtkTreeModel *) model); @@ -311,13 +305,11 @@ construct (MessageTagEditor *editor) gtk_tree_view_insert_column_with_attributes (followup->message_list, -1, _("Subject"), renderer, "text", 1, NULL); - followup->combo = GTK_COMBO (glade_xml_get_widget (gui, "combo")); - strings = NULL; + followup->combo_entry = GTK_COMBO_BOX (glade_xml_get_widget (gui, "combo")); + gtk_list_store_clear (GTK_LIST_STORE (gtk_combo_box_get_model (followup->combo_entry))); for (i = 0; i < num_available_flags; i++) - strings = g_list_append (strings, (char *) _(available_flags[i])); - gtk_combo_set_popdown_strings (followup->combo, strings); - g_list_free (strings); - gtk_list_select_item (GTK_LIST (followup->combo->list), DEFAULT_FLAG); + gtk_combo_box_append_text (followup->combo_entry, (char *) _(available_flags[i])); + gtk_combo_box_set_active (followup->combo_entry, DEFAULT_FLAG); followup->target_date = E_DATE_EDIT (glade_xml_get_widget (gui, "target_date")); /* glade bug, need to show this ourselves */ diff --git a/mail/message-tag-followup.h b/mail/message-tag-followup.h index 80f261fb80..4b18865d89 100644 --- a/mail/message-tag-followup.h +++ b/mail/message-tag-followup.h @@ -47,7 +47,7 @@ struct _MessageTagFollowUp { struct _GtkTreeView *message_list; - struct _GtkCombo *combo; + struct _GtkComboBox *combo_entry; struct _EDateEdit *target_date; struct _GtkToggleButton *completed; diff --git a/plugins/caldav/ChangeLog b/plugins/caldav/ChangeLog index 256dc030fc..2fe681cb55 100644 --- a/plugins/caldav/ChangeLog +++ b/plugins/caldav/ChangeLog @@ -1,3 +1,9 @@ +2009-04-24 Milan Crha <mcrha@redhat.com> + + ** Fix for bug #572348 + + * caldav-source.c: Remove deprecated Gtk+ symbols. + 2009-02-26 Matthew Barnes <mbarnes@redhat.com> ** Fixes part of bug #572950 diff --git a/plugins/caldav/caldav-source.c b/plugins/caldav/caldav-source.c index 6fb7ea3841..00ca5acac5 100644 --- a/plugins/caldav/caldav-source.c +++ b/plugins/caldav/caldav-source.c @@ -206,7 +206,7 @@ user_changed (GtkEntry *editable, ESource *source) } static void -set_refresh_time (ESource *source, GtkWidget *spin, GtkWidget *option) +set_refresh_time (ESource *source, GtkWidget *spin, GtkWidget *combobox) { int time; int item_num = 0; @@ -226,15 +226,15 @@ set_refresh_time (ESource *source, GtkWidget *spin, GtkWidget *option) item_num = 1; time /= 60; } - gtk_option_menu_set_history (GTK_OPTION_MENU (option), item_num); + gtk_combo_box_set_active (GTK_COMBO_BOX (combobox), item_num); gtk_spin_button_set_value (GTK_SPIN_BUTTON (spin), time); } static char * -get_refresh_minutes (GtkWidget *spin, GtkWidget *option) +get_refresh_minutes (GtkWidget *spin, GtkWidget *combobox) { int setting = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (spin)); - switch (gtk_option_menu_get_history (GTK_OPTION_MENU (option))) { + switch (gtk_combo_box_get_active (GTK_COMBO_BOX (combobox))) { case 0: /* minutes */ break; @@ -262,24 +262,24 @@ static void spin_changed (GtkSpinButton *spin, ESource *source) { char *refresh_str; - GtkWidget *option; + GtkWidget *combobox; - option = g_object_get_data (G_OBJECT (spin), "option"); + combobox = g_object_get_data (G_OBJECT (spin), "combobox"); - refresh_str = get_refresh_minutes ((GtkWidget *) spin, option); + refresh_str = get_refresh_minutes ((GtkWidget *) spin, combobox); e_source_set_property (source, "refresh", refresh_str); g_free (refresh_str); } static void -option_changed (GtkOptionMenu *option, ESource *source) +combobox_changed (GtkComboBox *combobox, ESource *source) { char *refresh_str; GtkWidget *spin; - spin = g_object_get_data (G_OBJECT (option), "spin"); + spin = g_object_get_data (G_OBJECT (combobox), "spin"); - refresh_str = get_refresh_minutes (spin, (GtkWidget *) option); + refresh_str = get_refresh_minutes (spin, (GtkWidget *) combobox); e_source_set_property (source, "refresh", refresh_str); g_free (refresh_str); } @@ -299,13 +299,12 @@ oge_caldav (EPlugin *epl, GtkWidget *widget; GtkWidget *luser; GtkWidget *user; - GtkWidget *label, *hbox, *spin, *option, *menu; - GtkWidget *times[4]; + GtkWidget *label, *hbox, *spin, *combobox; char *uri; char *username; const char *ssl_prop; gboolean ssl_enabled; - int row, i; + int row; source = t->source; group = e_source_peek_group (source); @@ -425,25 +424,18 @@ oge_caldav (EPlugin *epl, gtk_widget_show (spin); gtk_box_pack_start (GTK_BOX (hbox), spin, FALSE, TRUE, 0); - option = gtk_option_menu_new (); - gtk_widget_show (option); - times[0] = gtk_menu_item_new_with_label (_("minutes")); - times[1] = gtk_menu_item_new_with_label (_("hours")); - times[2] = gtk_menu_item_new_with_label (_("days")); - times[3] = gtk_menu_item_new_with_label (_("weeks")); - menu = gtk_menu_new (); - gtk_widget_show (menu); - for (i = 0; i < 4; i++) { - gtk_widget_show (times[i]); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), times[i]); - } - gtk_option_menu_set_menu (GTK_OPTION_MENU (option), menu); - set_refresh_time (source, spin, option); - gtk_box_pack_start (GTK_BOX (hbox), option, FALSE, TRUE, 0); - - g_object_set_data (G_OBJECT (option), "spin", spin); - g_signal_connect (G_OBJECT (option), "changed", G_CALLBACK (option_changed), source); - g_object_set_data (G_OBJECT (spin), "option", option); + combobox = gtk_combo_box_new_text (); + gtk_widget_show (combobox); + gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), _("minutes")); + gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), _("hours")); + gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), _("days")); + gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), _("weeks")); + set_refresh_time (source, spin, combobox); + gtk_box_pack_start (GTK_BOX (hbox), combobox, FALSE, TRUE, 0); + + g_object_set_data (G_OBJECT (combobox), "spin", spin); + g_signal_connect (G_OBJECT (combobox), "changed", G_CALLBACK (combobox_changed), source); + g_object_set_data (G_OBJECT (spin), "combobox", combobox); g_signal_connect (G_OBJECT (spin), "value-changed", G_CALLBACK (spin_changed), source); gtk_table_attach (GTK_TABLE (parent), hbox, 1, 2, row, row+1, GTK_EXPAND | GTK_FILL, 0, 0, 0); diff --git a/plugins/calendar-http/ChangeLog b/plugins/calendar-http/ChangeLog index 8cadbba783..7ceb72ae76 100644 --- a/plugins/calendar-http/ChangeLog +++ b/plugins/calendar-http/ChangeLog @@ -1,3 +1,9 @@ +2009-04-24 Milan Crha <mcrha@redhat.com> + + ** Fix for bug #572348 + + * calendar-http.c: Remove deprecated Gtk+ symbols. + 2008-07-31 Matthew Barnes <mbarnes@redhat.com> ** Fixes part of bug #545568 diff --git a/plugins/calendar-http/calendar-http.c b/plugins/calendar-http/calendar-http.c index 273a8264e3..7814ef5ea0 100644 --- a/plugins/calendar-http/calendar-http.c +++ b/plugins/calendar-http/calendar-http.c @@ -140,7 +140,7 @@ e_calendar_http_url (EPlugin *epl, EConfigHookItemFactoryData *data) } static void -set_refresh_time (ESource *source, GtkWidget *spin, GtkWidget *option) +set_refresh_time (ESource *source, GtkWidget *spin, GtkWidget *combobox) { int time; int item_num = 0; @@ -160,15 +160,15 @@ set_refresh_time (ESource *source, GtkWidget *spin, GtkWidget *option) item_num = 1; time /= 60; } - gtk_option_menu_set_history (GTK_OPTION_MENU (option), item_num); + gtk_combo_box_set_active (GTK_COMBO_BOX (combobox), item_num); gtk_spin_button_set_value (GTK_SPIN_BUTTON (spin), time); } static char * -get_refresh_minutes (GtkWidget *spin, GtkWidget *option) +get_refresh_minutes (GtkWidget *spin, GtkWidget *combobox) { int setting = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (spin)); - switch (gtk_option_menu_get_history (GTK_OPTION_MENU (option))) { + switch (gtk_combo_box_get_active (GTK_COMBO_BOX (combobox))) { case 0: /* minutes */ break; @@ -196,24 +196,24 @@ static void spin_changed (GtkSpinButton *spin, ECalConfigTargetSource *t) { char *refresh_str; - GtkWidget *option; + GtkWidget *combobox; - option = g_object_get_data (G_OBJECT (spin), "option"); + combobox = g_object_get_data (G_OBJECT (spin), "combobox"); - refresh_str = get_refresh_minutes ((GtkWidget *) spin, option); + refresh_str = get_refresh_minutes ((GtkWidget *) spin, combobox); e_source_set_property (t->source, "refresh", refresh_str); g_free (refresh_str); } static void -option_changed (GtkOptionMenu *option, ECalConfigTargetSource *t) +combobox_changed (GtkComboBox *combobox, ECalConfigTargetSource *t) { char *refresh_str; GtkWidget *spin; - spin = g_object_get_data (G_OBJECT (option), "spin"); + spin = g_object_get_data (G_OBJECT (combobox), "spin"); - refresh_str = get_refresh_minutes (spin, (GtkWidget *) option); + refresh_str = get_refresh_minutes (spin, (GtkWidget *) combobox); e_source_set_property (t->source, "refresh", refresh_str); g_free (refresh_str); } @@ -231,9 +231,8 @@ GtkWidget * e_calendar_http_refresh (EPlugin *epl, EConfigHookItemFactoryData *data) { static GtkWidget *label; - GtkWidget *option, *spin, *menu, *hbox, *parent; - GtkWidget *times[4]; - int row, i; + GtkWidget *combobox, *spin, *hbox, *parent; + int row; ECalConfigTargetSource *t = (ECalConfigTargetSource *) data->target; ESource *source = t->source; EUri *uri; @@ -274,25 +273,18 @@ e_calendar_http_refresh (EPlugin *epl, EConfigHookItemFactoryData *data) gtk_widget_show (spin); gtk_box_pack_start (GTK_BOX (hbox), spin, FALSE, TRUE, 0); - option = gtk_option_menu_new (); - gtk_widget_show (option); - times[0] = gtk_menu_item_new_with_label (_("minutes")); - times[1] = gtk_menu_item_new_with_label (_("hours")); - times[2] = gtk_menu_item_new_with_label (_("days")); - times[3] = gtk_menu_item_new_with_label (_("weeks")); - menu = gtk_menu_new (); - gtk_widget_show (menu); - for (i = 0; i < 4; i++) { - gtk_widget_show (times[i]); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), times[i]); - } - gtk_option_menu_set_menu (GTK_OPTION_MENU (option), menu); - set_refresh_time (source, spin, option); - gtk_box_pack_start (GTK_BOX (hbox), option, FALSE, TRUE, 0); - - g_object_set_data (G_OBJECT (option), "spin", spin); - g_signal_connect (G_OBJECT (option), "changed", G_CALLBACK (option_changed), t); - g_object_set_data (G_OBJECT (spin), "option", option); + combobox = gtk_combo_box_new_text (); + gtk_widget_show (combobox); + gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), _("minutes")); + gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), _("hours")); + gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), _("days")); + gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), _("weeks")); + set_refresh_time (source, spin, combobox); + gtk_box_pack_start (GTK_BOX (hbox), combobox, FALSE, TRUE, 0); + + g_object_set_data (G_OBJECT (combobox), "spin", spin); + g_signal_connect (G_OBJECT (combobox), "changed", G_CALLBACK (combobox_changed), t); + g_object_set_data (G_OBJECT (spin), "combobox", combobox); g_signal_connect (G_OBJECT (spin), "value-changed", G_CALLBACK (spin_changed), t); gtk_table_attach (GTK_TABLE (parent), hbox, 1, 2, row, row+1, GTK_EXPAND | GTK_FILL, 0, 0, 0); diff --git a/plugins/calendar-weather/ChangeLog b/plugins/calendar-weather/ChangeLog index a34f5df01b..8aa7f8990c 100644 --- a/plugins/calendar-weather/ChangeLog +++ b/plugins/calendar-weather/ChangeLog @@ -1,3 +1,9 @@ +2009-04-24 Milan Crha <mcrha@redhat.com> + + ** Fix for bug #572348 + + * calendar-weather.c: Remove deprecated Gtk+ symbols. + 2008-12-10 Suman Manjunath <msuman@novell.com> * Makefile.am: Don't try to specify LIBGWEATHER_(CFLAGS|LIBS), they diff --git a/plugins/calendar-weather/calendar-weather.c b/plugins/calendar-weather/calendar-weather.c index a6dce31326..f61d90c4d0 100644 --- a/plugins/calendar-weather/calendar-weather.c +++ b/plugins/calendar-weather/calendar-weather.c @@ -397,7 +397,7 @@ e_calendar_weather_location (EPlugin *epl, EConfigHookItemFactoryData *data) } static void -set_refresh_time (ESource *source, GtkWidget *spin, GtkWidget *option) +set_refresh_time (ESource *source, GtkWidget *spin, GtkWidget *combobox) { int time; int item_num = 0; @@ -417,15 +417,15 @@ set_refresh_time (ESource *source, GtkWidget *spin, GtkWidget *option) item_num = 1; time /= 60; } - gtk_option_menu_set_history (GTK_OPTION_MENU (option), item_num); + gtk_combo_box_set_active (GTK_COMBO_BOX (combobox), item_num); gtk_spin_button_set_value (GTK_SPIN_BUTTON (spin), time); } static char * -get_refresh_minutes (GtkWidget *spin, GtkWidget *option) +get_refresh_minutes (GtkWidget *spin, GtkWidget *combobox) { int setting = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (spin)); - switch (gtk_option_menu_get_history (GTK_OPTION_MENU (option))) { + switch (gtk_combo_box_get_active (GTK_COMBO_BOX (combobox))) { case 0: /* minutes */ break; @@ -452,24 +452,24 @@ static void spin_changed (GtkSpinButton *spin, ECalConfigTargetSource *t) { char *refresh_str; - GtkWidget *option; + GtkWidget *combobox; - option = g_object_get_data (G_OBJECT (spin), "option"); + combobox = g_object_get_data (G_OBJECT (spin), "combobox"); - refresh_str = get_refresh_minutes ((GtkWidget *) spin, option); + refresh_str = get_refresh_minutes ((GtkWidget *) spin, combobox); e_source_set_property (t->source, "refresh", refresh_str); g_free (refresh_str); } static void -option_changed (GtkOptionMenu *option, ECalConfigTargetSource *t) +combobox_changed (GtkComboBox *combobox, ECalConfigTargetSource *t) { char *refresh_str; GtkWidget *spin; - spin = g_object_get_data (G_OBJECT (option), "spin"); + spin = g_object_get_data (G_OBJECT (combobox), "spin"); - refresh_str = get_refresh_minutes (spin, (GtkWidget *) option); + refresh_str = get_refresh_minutes (spin, (GtkWidget *) combobox); e_source_set_property (t->source, "refresh", refresh_str); g_free (refresh_str); } @@ -478,9 +478,8 @@ GtkWidget * e_calendar_weather_refresh (EPlugin *epl, EConfigHookItemFactoryData *data) { static GtkWidget *label; - GtkWidget *option, *spin, *menu, *hbox, *parent; - GtkWidget *times[4]; - int row, i; + GtkWidget *spin, *combobox, *hbox, *parent; + int row; ECalConfigTargetSource *t = (ECalConfigTargetSource *) data->target; ESource *source = t->source; EUri *uri; @@ -519,25 +518,18 @@ e_calendar_weather_refresh (EPlugin *epl, EConfigHookItemFactoryData *data) gtk_widget_show (spin); gtk_box_pack_start (GTK_BOX (hbox), spin, FALSE, TRUE, 0); - option = gtk_option_menu_new (); - gtk_widget_show (option); - times[0] = gtk_menu_item_new_with_label (_("minutes")); - times[1] = gtk_menu_item_new_with_label (_("hours")); - times[2] = gtk_menu_item_new_with_label (_("days")); - times[3] = gtk_menu_item_new_with_label (_("weeks")); - menu = gtk_menu_new (); - gtk_widget_show (menu); - for (i = 0; i < 4; i++) { - gtk_widget_show (times[i]); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), times[i]); - } - gtk_option_menu_set_menu (GTK_OPTION_MENU (option), menu); - set_refresh_time (source, spin, option); - gtk_box_pack_start (GTK_BOX (hbox), option, FALSE, TRUE, 0); - - g_object_set_data (G_OBJECT (option), "spin", spin); - g_signal_connect (G_OBJECT (option), "changed", G_CALLBACK (option_changed), t); - g_object_set_data (G_OBJECT (spin), "option", option); + combobox = gtk_combo_box_new_text (); + gtk_widget_show (combobox); + gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), _("minutes")); + gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), _("hours")); + gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), _("days")); + gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), _("weeks")); + set_refresh_time (source, spin, combobox); + gtk_box_pack_start (GTK_BOX (hbox), combobox, FALSE, TRUE, 0); + + g_object_set_data (G_OBJECT (combobox), "spin", spin); + g_signal_connect (G_OBJECT (combobox), "changed", G_CALLBACK (combobox_changed), t); + g_object_set_data (G_OBJECT (spin), "combobox", combobox); g_signal_connect (G_OBJECT (spin), "value-changed", G_CALLBACK (spin_changed), t); gtk_table_attach (GTK_TABLE (parent), hbox, 1, 2, row, row+1, GTK_EXPAND | GTK_FILL, 0, 0, 0); @@ -546,34 +538,34 @@ e_calendar_weather_refresh (EPlugin *epl, EConfigHookItemFactoryData *data) } static void -set_units (ESource *source, GtkWidget *option) +set_units (ESource *source, GtkWidget *combobox) { const char *format = e_source_get_property (source, "units"); if (format == NULL) { format = e_source_get_property (source, "temperature"); if (format == NULL) { e_source_set_property (source, "units", "metric"); - gtk_option_menu_set_history (GTK_OPTION_MENU (option), 0); + gtk_combo_box_set_active (GTK_COMBO_BOX (combobox), 0); } else if (strcmp ((const char *)format, "fahrenheit") == 0) { /* old format, convert */ e_source_set_property (source, "units", "imperial"); - gtk_option_menu_set_history (GTK_OPTION_MENU (option), 1); + gtk_combo_box_set_active (GTK_COMBO_BOX (combobox), 1); } else { e_source_set_property (source, "units", "metric"); - gtk_option_menu_set_history (GTK_OPTION_MENU (option), 0); + gtk_combo_box_set_active (GTK_COMBO_BOX (combobox), 0); } } else { if (strcmp ((const char *)format, "metric") == 0) - gtk_option_menu_set_history (GTK_OPTION_MENU (option), 0); + gtk_combo_box_set_active (GTK_COMBO_BOX (combobox), 0); else - gtk_option_menu_set_history (GTK_OPTION_MENU (option), 1); + gtk_combo_box_set_active (GTK_COMBO_BOX (combobox), 1); } } static void -units_changed (GtkOptionMenu *option, ECalConfigTargetSource *t) +units_changed (GtkComboBox *combobox, ECalConfigTargetSource *t) { - int choice = gtk_option_menu_get_history (GTK_OPTION_MENU (option)); + int choice = gtk_combo_box_get_active (GTK_COMBO_BOX (combobox)); if (choice == 0) e_source_set_property (t->source, "units", "metric"); else @@ -584,9 +576,8 @@ GtkWidget * e_calendar_weather_units (EPlugin *epl, EConfigHookItemFactoryData *data) { static GtkWidget *label; - GtkWidget *option, *menu, *parent; - GtkWidget *formats[2]; - int row, i; + GtkWidget *combobox, *parent; + int row; ECalConfigTargetSource *t = (ECalConfigTargetSource *) data->target; ESource *source = t->source; EUri *uri; @@ -617,23 +608,16 @@ e_calendar_weather_units (EPlugin *epl, EConfigHookItemFactoryData *data) gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach (GTK_TABLE (parent), label, 0, 1, row, row+1, GTK_FILL, 0, 0, 0); - option = gtk_option_menu_new (); - gtk_widget_show (option); - formats[0] = gtk_menu_item_new_with_label (_("Metric (Celsius, cm, etc)")); - formats[1] = gtk_menu_item_new_with_label (_("Imperial (Fahrenheit, inches, etc)")); - menu = gtk_menu_new (); - gtk_widget_show (menu); - for (i = 0; i < 2; i++) { - gtk_widget_show (formats[i]); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), formats[i]); - } - gtk_option_menu_set_menu (GTK_OPTION_MENU (option), menu); - set_units (source, option); - gtk_label_set_mnemonic_widget (GTK_LABEL (label), option); - g_signal_connect (G_OBJECT (option), "changed", G_CALLBACK (units_changed), t); - gtk_table_attach (GTK_TABLE (parent), option, 1, 2, row, row+1, GTK_FILL, 0, 0, 0); + combobox = gtk_combo_box_new_text (); + gtk_widget_show (combobox); + gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), _("Metric (Celsius, cm, etc)")); + gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), _("Imperial (Fahrenheit, inches, etc)")); + set_units (source, combobox); + gtk_label_set_mnemonic_widget (GTK_LABEL (label), combobox); + g_signal_connect (G_OBJECT (combobox), "changed", G_CALLBACK (units_changed), t); + gtk_table_attach (GTK_TABLE (parent), combobox, 1, 2, row, row+1, GTK_FILL, 0, 0, 0); - return option; + return combobox; } gboolean diff --git a/plugins/exchange-operations/ChangeLog b/plugins/exchange-operations/ChangeLog index 82e3c33902..91a2e017a2 100644 --- a/plugins/exchange-operations/ChangeLog +++ b/plugins/exchange-operations/ChangeLog @@ -1,3 +1,13 @@ +2009-04-24 Milan Crha <mcrha@redhat.com> + + ** Fix for bug #572348 + + * exchange-delegates.glade: + * e-foreign-folder-dialog.glade: + * exchange-folder-subscription.c: + * exchange-delegates-user.c: + Remove deprecated Gtk+ symbols. + 2009-02-26 Andre Klapper <a9016009@gmx.de> * exchange-permissions-dialog.c: diff --git a/plugins/exchange-operations/e-foreign-folder-dialog.glade b/plugins/exchange-operations/e-foreign-folder-dialog.glade index 2a3ae5a13f..7390e561ce 100644 --- a/plugins/exchange-operations/e-foreign-folder-dialog.glade +++ b/plugins/exchange-operations/e-foreign-folder-dialog.glade @@ -1,252 +1,220 @@ <?xml version="1.0" standalone="no"?> <!--*- mode: xml -*--> -<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd" > +<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd"> <glade-interface> - <widget class="GtkDialog" id="dialog"> - <property name="title" translatable="yes">Open Other User's Folder</property> - <property name="type">GTK_WINDOW_TOPLEVEL</property> - <property name="modal">no</property> - <property name="allow_shrink">no</property> - <property name="allow_grow">no</property> - <property name="width-request">350</property> - <property name="visible">yes</property> - <property name="window-position">GTK_WIN_POS_CENTER_ON_PARENT</property> - <child internal-child="vbox"> - <widget class="GtkVBox" id="dialog-vbox1"> - <property name="homogeneous">no</property> - <property name="spacing">8</property> - <property name="visible">yes</property> +<widget class="GtkDialog" id="dialog"> + <property name="visible">True</property> + <property name="title" translatable="yes">Open Other User's Folder</property> + <property name="type">GTK_WINDOW_TOPLEVEL</property> + <property name="window_position">GTK_WIN_POS_NONE</property> + <property name="modal">False</property> + <property name="resizable">True</property> + <property name="destroy_with_parent">False</property> + <property name="decorated">True</property> + <property name="skip_taskbar_hint">False</property> + <property name="skip_pager_hint">False</property> + <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property> + <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> + <property name="focus_on_map">True</property> + <property name="urgency_hint">False</property> + <property name="has_separator">True</property> + + <child internal-child="vbox"> + <widget class="GtkVBox" id="dialog-vbox1"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">8</property> + + <child internal-child="action_area"> + <widget class="GtkHButtonBox" id="dialog-action_area1"> + <property name="visible">True</property> + <property name="layout_style">GTK_BUTTONBOX_END</property> + + <child> + <widget class="GtkButton" id="button3"> + <property name="visible">True</property> + <property name="can_default">True</property> + <property name="can_focus">True</property> + <property name="label">gtk-cancel</property> + <property name="use_stock">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="response_id">-6</property> + </widget> + </child> + + <child> + <widget class="GtkButton" id="button1"> + <property name="visible">True</property> + <property name="can_default">True</property> + <property name="has_default">True</property> + <property name="can_focus">True</property> + <property name="label">gtk-ok</property> + <property name="use_stock">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="response_id">-5</property> + </widget> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="pack_type">GTK_PACK_END</property> + </packing> + </child> + + <child> + <widget class="GtkTable" id="table1"> + <property name="visible">True</property> + <property name="n_rows">3</property> + <property name="n_columns">2</property> + <property name="homogeneous">False</property> + <property name="row_spacing">3</property> + <property name="column_spacing">3</property> + + <child> + <widget class="GtkLabel" id="label1"> + <property name="visible">True</property> + <property name="label" translatable="yes">_Account:</property> + <property name="use_underline">True</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_CENTER</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</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="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="label3"> + <property name="visible">True</property> + <property name="label" translatable="yes">_Folder Name:</property> + <property name="use_underline">True</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_CENTER</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</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="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="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkHBox" id="user-picker-placeholder"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + + <child> + <placeholder/> + </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="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="button-user"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">_User:</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + </widget> + <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="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkComboBoxEntry" id="folder-name-combo"> + <property name="visible">True</property> + <property name="items" translatable="yes">a +b</property> + <property name="add_tearoffs">False</property> + <property name="has_frame">True</property> + <property name="focus_on_click">True</property> + </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="x_options">fill</property> + <property name="y_options">fill</property> + </packing> + </child> + + <child> + <widget class="GtkComboBox" id="server-combobox"> + <property name="visible">True</property> + <property name="items" translatable="yes">a +b</property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</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="x_options">fill</property> + <property name="y_options">fill</property> + </packing> + </child> + </widget> + <packing> + <property name="padding">2</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> + </widget> + </child> +</widget> - <child internal-child="action_area"> - <widget class="GtkHButtonBox" id="dialog-action_area1"> - <property name="layout_style">GTK_BUTTONBOX_END</property> - <property name="spacing">8</property> - <property name="visible">yes</property> - - <child> - <widget class="GtkButton" id="button3"> - <property name="can_default">yes</property> - <property name="can_focus">yes</property> - <property name="visible">yes</property> - <property name="label">gtk-cancel</property> - <property name="use_stock">yes</property> - <property name="use_underline">yes</property> - <property name="response_id">-6</property> - </widget> - </child> - - <child> - <widget class="GtkButton" id="button1"> - <property name="can_default">yes</property> - <property name="has_default">yes</property> - <property name="can_focus">yes</property> - <property name="visible">yes</property> - <property name="label">gtk-ok</property> - <property name="use_stock">yes</property> - <property name="use_underline">yes</property> - <property name="response_id">-5</property> - </widget> - </child> - - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">no</property> - <property name="fill">yes</property> - <property name="pack_type">GTK_PACK_END</property> - </packing> - </child> - - <child> - <widget class="GtkTable" id="table1"> - <property name="homogeneous">no</property> - <property name="row_spacing">3</property> - <property name="column_spacing">3</property> - <property name="n-rows">3</property> - <property name="n-columns">2</property> - <property name="visible">yes</property> - - <child> - <widget class="GtkLabel" id="label1"> - <property name="label" translatable="yes">_Account:</property> - <property name="justify">GTK_JUSTIFY_CENTER</property> - <property name="wrap">no</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="mnemonic_widget">server-option-menu</property> - <property name="visible">yes</property> - <property name="use_underline">yes</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_padding">0</property> - <property name="y_padding">0</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label3"> - <property name="label" translatable="yes">_Folder Name:</property> - <property name="justify">GTK_JUSTIFY_CENTER</property> - <property name="wrap">no</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="mnemonic_widget">folder-name-entry</property> - <property name="visible">yes</property> - <property name="use_underline">yes</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_padding">0</property> - <property name="y_padding">0</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkOptionMenu" id="server-option-menu"> - <property name="can_focus">yes</property> - <property name="history">0</property> - <property name="visible">yes</property> - - <child internal-child="menu"> - <widget class="GtkMenu" id="convertwidget1"> - <property name="visible">yes</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="x_padding">0</property> - <property name="y_padding">0</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkCombo" id="folder-name-combo"> - <property name="value_in_list">no</property> - <property name="case_sensitive">no</property> - <property name="enable_arrow_keys">yes</property> - <property name="enable_arrows_always">no</property> - <property name="allow_empty">yes</property> - <property name="visible">yes</property> - - <child internal-child="entry"> - <widget class="GtkEntry" id="folder-name-entry"> - <property name="can_focus">yes</property> - <property name="editable">yes</property> - <property name="text" translatable="yes"></property> - <property name="max-length">0</property> - <property name="visibility">yes</property> - <property name="visible">yes</property> - </widget> - </child> - - <child internal-child="list"> - <widget class="GtkList" id="convertwidget2"> - <property name="visible">yes</property> - - <child> - <widget class="GtkListItem" id="convertwidget3"> - <property name="visible">yes</property> - - <child> - <widget class="GtkLabel" id="convertwidget4"> - <property name="label" translatable="yes"></property> - <property name="xalign">0.0</property> - <property name="visible">yes</property> - </widget> - </child> - </widget> - </child> - </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="x_padding">0</property> - <property name="y_padding">0</property> - <property name="x_options">expand|fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkHBox" id="user-picker-placeholder"> - <property name="homogeneous">no</property> - <property name="spacing">0</property> - <property name="visible">yes</property> - - <child> - <placeholder /> - </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="x_padding">0</property> - <property name="y_padding">0</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkButton" id="button-user"> - <property name="can_focus">yes</property> - <property name="label" translatable="yes">_User:</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="visible">yes</property> - <property name="use_underline">yes</property> - </widget> - <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="x_padding">0</property> - <property name="y_padding">0</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - </widget> - <packing> - <property name="padding">2</property> - <property name="expand">yes</property> - <property name="fill">yes</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">4</property> - <property name="expand">yes</property> - <property name="fill">yes</property> - </packing> - </child> - </widget> </glade-interface> diff --git a/plugins/exchange-operations/exchange-delegates-user.c b/plugins/exchange-operations/exchange-delegates-user.c index 2cd3eb1c5a..66a7e71014 100644 --- a/plugins/exchange-operations/exchange-delegates-user.c +++ b/plugins/exchange-operations/exchange-delegates-user.c @@ -49,10 +49,9 @@ #include <string.h> -#define EXCHANGE_DELEGATES_USER_SEPARATOR -2 #define EXCHANGE_DELEGATES_USER_CUSTOM -3 /* Can't use E2K_PERMISSIONS_ROLE_CUSTOM, because it's -1, which - * means "end of list" to e_dialog_option_menu_get/set + * means "end of list" to e_dialog_combo_box_get/set */ static const int exchange_perm_map[] = { @@ -61,7 +60,6 @@ static const int exchange_perm_map[] = { E2K_PERMISSIONS_ROLE_AUTHOR, E2K_PERMISSIONS_ROLE_EDITOR, - EXCHANGE_DELEGATES_USER_SEPARATOR, EXCHANGE_DELEGATES_USER_CUSTOM, -1 @@ -79,7 +77,7 @@ static const char *folder_names_for_display[] = { }; static const char *widget_names[] = { - "calendar_perms", "task_perms", "inbox_perms", "contact_perms", + "calendar_perms_combobox", "task_perms_combobox", "inbox_perms_combobox", "contact_perms_combobox", }; @@ -140,26 +138,14 @@ is_delegate_role (E2kPermissionsRole role) } static void -set_perms (GtkWidget *omenu, E2kPermissionsRole role) +set_perms (GtkWidget *combobox, E2kPermissionsRole role) { if (!is_delegate_role (role)) { - GtkWidget *menu, *item; - - menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (omenu)); - - item = gtk_menu_item_new (); - gtk_widget_set_sensitive (item, FALSE); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); - - item = gtk_menu_item_new_with_label (_("Custom")); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); - - gtk_widget_show_all (menu); - + gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), _("Custom")); role = EXCHANGE_DELEGATES_USER_CUSTOM; } - e_dialog_option_menu_set (omenu, role, exchange_perm_map); + e_dialog_combo_box_set (combobox, role, exchange_perm_map); } static void @@ -224,7 +210,7 @@ exchange_delegates_user_edit (ExchangeAccount *account, GtkWidget *parent_window) { GladeXML *xml; - GtkWidget *dialog, *table, *label, *menu, *check, *check_delegate; + GtkWidget *dialog, *table, *label, *combobox, *check, *check_delegate; char *title; int button, i; E2kPermissionsRole role; @@ -257,8 +243,8 @@ exchange_delegates_user_edit (ExchangeAccount *account, /* Set up the permissions */ for (i = 0; i < EXCHANGE_DELEGATES_LAST; i++) { - menu = glade_xml_get_widget (xml, widget_names[i]); - set_perms (menu, user->role[i]); + combobox = glade_xml_get_widget (xml, widget_names[i]); + set_perms (combobox, user->role[i]); } check = glade_xml_get_widget (xml, "see_private_checkbox"); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), @@ -285,8 +271,8 @@ exchange_delegates_user_edit (ExchangeAccount *account, /* And update */ modified = FALSE; for (i = 0; i < EXCHANGE_DELEGATES_LAST; i++) { - menu = glade_xml_get_widget (xml, widget_names[i]); - role = e_dialog_option_menu_get (menu, exchange_perm_map); + combobox = glade_xml_get_widget (xml, widget_names[i]); + role = e_dialog_combo_box_get (combobox, exchange_perm_map); if (is_delegate_role (user->role[i]) && user->role[i] != role) { @@ -350,8 +336,8 @@ exchange_delegates_user_edit (ExchangeAccount *account, camel_stream_printf (stream, "<html><body><p>%s<br><br>%s</p><table border = 0 width=\"40%%\">", msg_part1, msg_part2); for (i = 0; i < EXCHANGE_DELEGATES_LAST; i++) { - menu = glade_xml_get_widget (xml, widget_names[i]); - role = e_dialog_option_menu_get (menu, exchange_perm_map); + combobox = glade_xml_get_widget (xml, widget_names[i]); + role = e_dialog_combo_box_get (combobox, exchange_perm_map); role_name = g_strdup (map_to_full_role_name(role)); role_name_final = g_strconcat (role_name_final, "<tr><td>" , folder_names_for_display[i], ":</td><td>", role_name, "</td> </tr>", NULL); diff --git a/plugins/exchange-operations/exchange-delegates.glade b/plugins/exchange-operations/exchange-delegates.glade index 1731672078..1e099e999a 100644 --- a/plugins/exchange-operations/exchange-delegates.glade +++ b/plugins/exchange-operations/exchange-delegates.glade @@ -305,7 +305,6 @@ and access your folders with the permissions you give them.</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> - <property name="mnemonic_widget">calendar_perms</property> <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> <property name="width_chars">-1</property> <property name="single_line_mode">False</property> @@ -334,7 +333,6 @@ and access your folders with the permissions you give them.</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> - <property name="mnemonic_widget">task_perms</property> <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> <property name="width_chars">-1</property> <property name="single_line_mode">False</property> @@ -363,7 +361,6 @@ and access your folders with the permissions you give them.</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> - <property name="mnemonic_widget">inbox_perms</property> <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> <property name="width_chars">-1</property> <property name="single_line_mode">False</property> @@ -392,7 +389,6 @@ and access your folders with the permissions you give them.</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> - <property name="mnemonic_widget">contact_perms</property> <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> <property name="width_chars">-1</property> <property name="single_line_mode">False</property> @@ -409,214 +405,82 @@ and access your folders with the permissions you give them.</property> </child> <child> - <widget class="GtkOptionMenu" id="calendar_perms"> + <widget class="GtkComboBox" id="calendar_perms_combobox"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">0</property> - - <child internal-child="menu"> - <widget class="GtkMenu" id="convertwidget1"> - <property name="visible">True</property> - - <child> - <widget class="GtkMenuItem" id="convertwidget2"> - <property name="visible">True</property> - <property name="label" translatable="yes">None</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget3"> - <property name="visible">True</property> - <property name="label" translatable="yes">Reviewer (read-only)</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget4"> - <property name="visible">True</property> - <property name="label" translatable="yes">Author (read, create)</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget5"> - <property name="visible">True</property> - <property name="label" translatable="yes">Editor (read, create, edit)</property> - <property name="use_underline">True</property> - </widget> - </child> - </widget> - </child> + <property name="items" translatable="yes">None +Reviewer (read-only) +Author (read, create) +Editor (read, create, edit)</property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</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> + <property name="x_options">fill</property> + <property name="y_options">fill</property> </packing> </child> <child> - <widget class="GtkOptionMenu" id="task_perms"> + <widget class="GtkComboBox" id="task_perms_combobox"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">0</property> - - <child internal-child="menu"> - <widget class="GtkMenu" id="convertwidget6"> - <property name="visible">True</property> - - <child> - <widget class="GtkMenuItem" id="convertwidget7"> - <property name="visible">True</property> - <property name="label" translatable="yes">None</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget8"> - <property name="visible">True</property> - <property name="label" translatable="yes">Reviewer (read-only)</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget9"> - <property name="visible">True</property> - <property name="label" translatable="yes">Author (read, create)</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget10"> - <property name="visible">True</property> - <property name="label" translatable="yes">Editor (read, create, edit)</property> - <property name="use_underline">True</property> - </widget> - </child> - </widget> - </child> + <property name="items" translatable="yes">None +Reviewer (read-only) +Author (read, create) +Editor (read, create, edit)</property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</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="y_options"></property> + <property name="x_options">fill</property> + <property name="y_options">fill</property> </packing> </child> <child> - <widget class="GtkOptionMenu" id="inbox_perms"> + <widget class="GtkComboBox" id="inbox_perms_combobox"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">0</property> - - <child internal-child="menu"> - <widget class="GtkMenu" id="convertwidget11"> - <property name="visible">True</property> - - <child> - <widget class="GtkMenuItem" id="convertwidget12"> - <property name="visible">True</property> - <property name="label" translatable="yes">None</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget13"> - <property name="visible">True</property> - <property name="label" translatable="yes">Reviewer (read-only)</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget14"> - <property name="visible">True</property> - <property name="label" translatable="yes">Author (read, create)</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget15"> - <property name="visible">True</property> - <property name="label" translatable="yes">Editor (read, create, edit)</property> - <property name="use_underline">True</property> - </widget> - </child> - </widget> - </child> + <property name="items" translatable="yes">None +Reviewer (read-only) +Author (read, create) +Editor (read, create, edit)</property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> </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> + <property name="x_options">fill</property> + <property name="y_options">fill</property> </packing> </child> <child> - <widget class="GtkOptionMenu" id="contact_perms"> + <widget class="GtkComboBox" id="contact_perms_combobox"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">0</property> - - <child internal-child="menu"> - <widget class="GtkMenu" id="convertwidget16"> - <property name="visible">True</property> - - <child> - <widget class="GtkMenuItem" id="convertwidget17"> - <property name="visible">True</property> - <property name="label" translatable="yes">None</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget18"> - <property name="visible">True</property> - <property name="label" translatable="yes">Reviewer (read-only)</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget19"> - <property name="visible">True</property> - <property name="label" translatable="yes">Author (read, create)</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget20"> - <property name="visible">True</property> - <property name="label" translatable="yes">Editor (read, create, edit)</property> - <property name="use_underline">True</property> - </widget> - </child> - </widget> - </child> + <property name="items" translatable="yes">None +Reviewer (read-only) +Author (read, create) +Editor (read, create, edit)</property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> </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> + <property name="x_options">fill</property> + <property name="y_options">fill</property> </packing> </child> </widget> diff --git a/plugins/exchange-operations/exchange-folder-subscription.c b/plugins/exchange-operations/exchange-folder-subscription.c index 1ffbd7365c..05229c0838 100644 --- a/plugins/exchange-operations/exchange-folder-subscription.c +++ b/plugins/exchange-operations/exchange-folder-subscription.c @@ -96,8 +96,7 @@ setup_name_selector (GladeXML *glade_xml, ENameSelector **name_selector_ret) static void setup_folder_name_combo (GladeXML *glade_xml, gchar *fname) { - GtkWidget *combo; - GList *string_list; + GtkComboBox *combo; char *strings[] = { "Calendar", "Inbox", @@ -108,16 +107,15 @@ setup_folder_name_combo (GladeXML *glade_xml, gchar *fname) }; int i; - combo = glade_xml_get_widget (glade_xml, "folder-name-combo"); - g_assert (GTK_IS_COMBO (combo)); + combo = GTK_COMBO_BOX (glade_xml_get_widget (glade_xml, "folder-name-combo")); + g_assert (GTK_IS_COMBO_BOX_ENTRY (combo)); + + gtk_list_store_clear (GTK_LIST_STORE (gtk_combo_box_get_model (combo))); - string_list = NULL; for (i = 0; strings[i] != NULL; i ++) - string_list = g_list_append (string_list, strings[i]); - gtk_combo_set_popdown_strings (GTK_COMBO (combo), string_list); - g_list_free (string_list); + gtk_combo_box_append_text (combo, strings[i]); - gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (combo)->entry), fname); + gtk_entry_set_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (combo))), fname); } static void @@ -146,25 +144,17 @@ user_name_entry_changed_callback (GtkEditable *editable, void *data) } static void -setup_server_option_menu (GladeXML *glade_xml, gchar *mail_account) +setup_server_combobox (GladeXML *glade_xml, gchar *mail_account) { GtkWidget *widget; - GtkWidget *menu; - GtkWidget *menu_item; - - widget = glade_xml_get_widget (glade_xml, "server-option-menu"); - g_return_if_fail (GTK_IS_OPTION_MENU (widget)); - - menu = gtk_menu_new (); - gtk_widget_show (menu); - - menu_item = gtk_menu_item_new_with_label (mail_account); - gtk_widget_show (menu_item); - gtk_menu_shell_append(GTK_MENU_SHELL(menu), menu_item); + widget = glade_xml_get_widget (glade_xml, "server-combobox"); + g_return_if_fail (GTK_IS_COMBO_BOX (widget)); + gtk_list_store_clear (GTK_LIST_STORE (gtk_combo_box_get_model (GTK_COMBO_BOX (widget)))); - gtk_option_menu_set_menu (GTK_OPTION_MENU (widget), menu); + gtk_combo_box_append_text (GTK_COMBO_BOX (widget), mail_account); + gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 0); /* FIXME: Default to the current storage in the shell view. */ } @@ -329,9 +319,9 @@ create_folder_subscription_dialog (ExchangeAccount *account, gchar *fname) g_signal_connect (subscription_info->name_selector_widget, "changed", G_CALLBACK (user_name_entry_changed_callback), dialog); - setup_server_option_menu (glade_xml, account->account_name); + setup_server_combobox (glade_xml, account->account_name); setup_folder_name_combo (glade_xml, fname); - subscription_info->folder_name_entry = glade_xml_get_widget (glade_xml, "folder-name-entry"); + subscription_info->folder_name_entry = gtk_bin_get_child (GTK_BIN (glade_xml_get_widget (glade_xml, "folder-name-combo"))); g_signal_connect (dialog, "response", G_CALLBACK (subscribe_to_folder), subscription_info); gtk_widget_show (dialog); diff --git a/plugins/google-account-setup/ChangeLog b/plugins/google-account-setup/ChangeLog index 4d8e8b1ecb..03cf6b4e3e 100644 --- a/plugins/google-account-setup/ChangeLog +++ b/plugins/google-account-setup/ChangeLog @@ -1,3 +1,9 @@ +2009-04-24 Milan Crha <mcrha@redhat.com> + + ** Fix for bug #572348 + + * google-source.c: Remove deprecated Gtk+ symbols. + 2009-04-09 Milan Crha <mcrha@redhat.com> ** Fix for bug #574248 diff --git a/plugins/google-account-setup/google-source.c b/plugins/google-account-setup/google-source.c index 181984c538..a5b846076f 100644 --- a/plugins/google-account-setup/google-source.c +++ b/plugins/google-account-setup/google-source.c @@ -233,10 +233,10 @@ user_changed (GtkEntry *editable, ESource *source) } static char * -get_refresh_minutes (GtkWidget *spin, GtkWidget *option) +get_refresh_minutes (GtkWidget *spin, GtkWidget *combobox) { int setting = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (spin)); - switch (gtk_option_menu_get_history (GTK_OPTION_MENU (option))) { + switch (gtk_combo_box_get_active (GTK_COMBO_BOX (combobox))) { case 0: /* minutes */ break; @@ -264,30 +264,30 @@ static void spin_changed (GtkSpinButton *spin, ECalConfigTargetSource *t) { gchar *refresh_str; - GtkWidget *option; + GtkWidget *combobox; - option = g_object_get_data (G_OBJECT(spin), "option"); + combobox = g_object_get_data (G_OBJECT(spin), "combobox"); - refresh_str = get_refresh_minutes ((GtkWidget *)spin, option); + refresh_str = get_refresh_minutes ((GtkWidget *)spin, combobox); e_source_set_property (t->source, "refresh", refresh_str); g_free (refresh_str); } static void -option_changed (GtkSpinButton *option, ECalConfigTargetSource *t) +combobox_changed (GtkComboBox *combobox, ECalConfigTargetSource *t) { gchar *refresh_str; GtkWidget *spin; - spin = g_object_get_data (G_OBJECT(option), "spin"); + spin = g_object_get_data (G_OBJECT(combobox), "spin"); - refresh_str = get_refresh_minutes (spin, (GtkWidget *)option); + refresh_str = get_refresh_minutes (spin, (GtkWidget *)combobox); e_source_set_property (t->source, "refresh", refresh_str); g_free (refresh_str); } static void -set_refresh_time (ESource *source, GtkWidget *spin, GtkWidget *option) +set_refresh_time (ESource *source, GtkWidget *spin, GtkWidget *combobox) { int time; int item_num = 0; @@ -307,7 +307,7 @@ set_refresh_time (ESource *source, GtkWidget *spin, GtkWidget *option) item_num = 1; time /= 60; } - gtk_option_menu_set_history (GTK_OPTION_MENU (option), item_num); + gtk_combo_box_set_active (GTK_COMBO_BOX (combobox), item_num); gtk_spin_button_set_value (GTK_SPIN_BUTTON (spin), time); } @@ -567,9 +567,7 @@ plugin_google (EPlugin *epl, GtkCellRenderer *renderer; GtkListStore *store; - GtkWidget *option, *spin, *menu, *hbox; - GtkWidget *times [4]; - int i; + GtkWidget *combobox, *spin, *hbox; source = t->source; group = e_source_peek_group (source); @@ -647,28 +645,21 @@ plugin_google (EPlugin *epl, gtk_widget_show (spin); gtk_box_pack_start (GTK_BOX(hbox), spin, FALSE, TRUE, 0); - option = gtk_option_menu_new (); - gtk_widget_show (option); - times[0] = gtk_menu_item_new_with_label (_("minutes")); - times[1] = gtk_menu_item_new_with_label (_("hours")); - times[2] = gtk_menu_item_new_with_label (_("days")); - times[3] = gtk_menu_item_new_with_label (_("weeks")); - - menu = gtk_menu_new (); - gtk_widget_show (menu); - for (i = 0; i < 4; i++) { - gtk_widget_show (times[i]); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), times[i]); - } - gtk_option_menu_set_menu (GTK_OPTION_MENU (option), menu); - set_refresh_time (source, spin, option); - gtk_box_pack_start (GTK_BOX (hbox), option, FALSE, TRUE, 0); - - e_source_set_property (source, "refresh", "30"); - - g_object_set_data (G_OBJECT (option), "spin", spin); - g_signal_connect (G_OBJECT (option), "changed", G_CALLBACK (option_changed), t); - g_object_set_data (G_OBJECT (spin), "option", option); + if (!e_source_get_property (source, "refresh")) + e_source_set_property (source, "refresh", "30"); + + combobox = gtk_combo_box_new_text (); + gtk_widget_show (combobox); + gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), _("minutes")); + gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), _("hours")); + gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), _("days")); + gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), _("weeks")); + set_refresh_time (source, spin, combobox); + gtk_box_pack_start (GTK_BOX (hbox), combobox, FALSE, TRUE, 0); + + g_object_set_data (G_OBJECT (combobox), "spin", spin); + g_signal_connect (G_OBJECT (combobox), "changed", G_CALLBACK (combobox_changed), t); + g_object_set_data (G_OBJECT (spin), "combobox", combobox); g_signal_connect (G_OBJECT (spin), "value-changed", G_CALLBACK (spin_changed), t); gtk_table_attach (GTK_TABLE (parent), hbox, 1, 2, row + 2, row + 3, GTK_EXPAND | GTK_FILL, 0, 0, 0); diff --git a/shell/ChangeLog b/shell/ChangeLog index e83129facc..2de87c8578 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,3 +1,10 @@ +2009-04-24 Milan Crha <mcrha@redhat.com> + + ** Fix for bug #572348 + + * e-shell-importer.c: + Remove deprecated Gtk+ symbols. + 2009-02-24 Matthew Barnes <mbarnes@redhat.com> ** Fixes bug #572962 diff --git a/shell/e-shell-importer.c b/shell/e-shell-importer.c index ff347d7fe2..68ce5abec0 100644 --- a/shell/e-shell-importer.c +++ b/shell/e-shell-importer.c @@ -56,9 +56,6 @@ typedef struct _ImportDialogFilePage { GtkWidget *vbox; GtkWidget *filename; GtkWidget *filetype; - GtkWidget *menu; - - GSList *items; EImportTargetURI *target; EImportImporter *importer; @@ -187,7 +184,10 @@ filename_changed (GtkWidget *widget, fileok = filename && filename[0] && g_file_test(filename, G_FILE_TEST_IS_REGULAR); if (fileok) { - GSList *l, *item; + GtkTreeIter iter; + GtkTreeModel *model; + gboolean valid; + GSList *l; EImportImporter *first = NULL; int i=0, firstitem=0; @@ -195,48 +195,60 @@ filename_changed (GtkWidget *widget, page->target->uri_src = g_filename_to_uri(filename, NULL, NULL); l = e_import_get_importers(data->import, (EImportTarget *)page->target); - item = page->items; - while (item) { - EImportImporter *eii = g_object_get_data(item->data, "importer"); + model = gtk_combo_box_get_model (GTK_COMBO_BOX (page->filetype)); + valid = gtk_tree_model_get_iter_first (model, &iter); + while (valid) { + gpointer eii = NULL; + + gtk_tree_model_get (model, &iter, 2, &eii, -1); - if (g_slist_find(l, eii) != NULL) { + if (g_slist_find (l, eii) != NULL) { if (first == NULL) { firstitem = i; first = eii; } - gtk_widget_set_sensitive(item->data, TRUE); + gtk_list_store_set (GTK_LIST_STORE (model), &iter, 1, TRUE, -1); fileok = TRUE; } else { if (page->importer == eii) page->importer = NULL; - gtk_widget_set_sensitive(item->data, FALSE); + gtk_list_store_set (GTK_LIST_STORE (model), &iter, 1, FALSE, -1); } i++; - item = item->next; + valid = gtk_tree_model_iter_next (model, &iter); } g_slist_free(l); if (page->importer == NULL && first) { page->importer = first; - gtk_option_menu_set_history((GtkOptionMenu *)page->filetype, firstitem); + gtk_combo_box_set_active (GTK_COMBO_BOX (page->filetype), firstitem); } fileok = first != NULL; } else { - GSList *item; - - for (item = page->items;item;item=item->next) - gtk_widget_set_sensitive(item->data, FALSE); + GtkTreeIter iter; + GtkTreeModel *model; + gboolean valid; + + model = gtk_combo_box_get_model (GTK_COMBO_BOX (page->filetype)); + for (valid = gtk_tree_model_get_iter_first (model, &iter); + valid; + valid = gtk_tree_model_iter_next (model, &iter)) { + gtk_list_store_set (GTK_LIST_STORE (model), &iter, 1, FALSE, -1); + } } gnome_druid_set_buttons_sensitive(GNOME_DRUID (data->druid), TRUE, fileok, TRUE, FALSE); } static void -item_selected (GtkWidget *item, - ImportData *data) +filetype_changed_cb (GtkWidget *combobox, ImportData *data) { - data->filepage->importer = g_object_get_data((GObject *)item, "importer"); - filename_changed(data->filepage->filename, data); + GtkTreeIter iter; + + g_return_if_fail (gtk_combo_box_get_active_iter (GTK_COMBO_BOX (combobox), &iter)); + + gtk_tree_model_get (gtk_combo_box_get_model (GTK_COMBO_BOX (combobox)), &iter, 2, &data->filepage->importer, -1); + filename_changed (data->filepage->filename, data); } #if 0 @@ -267,6 +279,8 @@ importer_file_page_new (ImportData *data) { ImportDialogFilePage *page; GtkWidget *table, *label; + GtkCellRenderer *cell; + GtkListStore *store; int row = 0; page = g_new0 (ImportDialogFilePage, 1); @@ -298,7 +312,19 @@ importer_file_page_new (ImportData *data) GTK_FILL, 0, 0, 0); gtk_misc_set_alignment (GTK_MISC (label), 1, 0.5); - page->filetype = gtk_option_menu_new (); + store = gtk_list_store_new (3, G_TYPE_STRING, G_TYPE_BOOLEAN, G_TYPE_POINTER); + page->filetype = gtk_combo_box_new_with_model (GTK_TREE_MODEL (store)); + g_object_unref (store); + + gtk_cell_layout_clear (GTK_CELL_LAYOUT (page->filetype)); + + cell = gtk_cell_renderer_text_new (); + gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (page->filetype), cell, TRUE); + gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (page->filetype), cell, + "text", 0, + "sensitive", 1, + NULL); + gtk_table_attach (GTK_TABLE (table), page->filetype, 1, 2, row, row + 1, GTK_EXPAND | GTK_FILL, 0, 0, 0); gtk_label_set_mnemonic_widget(GTK_LABEL(label), page->filetype); @@ -441,7 +467,6 @@ import_druid_weak_notify (void *blah, if (data->filepage->target) e_import_target_free(data->import, data->filepage->target); - g_slist_free(data->filepage->items); g_object_unref(data->import); @@ -535,8 +560,8 @@ prepare_file_page (GnomeDruidPage *dpage, GnomeDruid *druid, ImportData *data) { - GtkWidget *item, *menu; - GSList *importers; + GSList *importers, *imp; + GtkListStore *store; ImportDialogFilePage *page = data->filepage; if (page->target != NULL) { @@ -545,27 +570,31 @@ prepare_file_page (GnomeDruidPage *dpage, } page->target = e_import_target_new_uri(data->import, NULL, NULL); - importers = e_import_get_importers(data->import, (EImportTarget *)page->target); - - menu = gtk_menu_new(); - while (importers) { - EImportImporter *eii = importers->data; + importers = e_import_get_importers (data->import, (EImportTarget *)page->target); + + store = GTK_LIST_STORE (gtk_combo_box_get_model (GTK_COMBO_BOX (page->filetype))); + gtk_list_store_clear (store); + + for (imp = importers; imp; imp = imp->next) { + GtkTreeIter iter; + EImportImporter *eii = imp->data; + + gtk_list_store_append (store, &iter); + gtk_list_store_set ( + store, &iter, + 0, eii->name, + 1, TRUE, + 2, eii, + -1); + } - item = gtk_menu_item_new_with_label(eii->name); - gtk_widget_show(item); - g_object_set_data((GObject *)item, "importer", eii); - g_signal_connect(item, "activate", G_CALLBACK(item_selected), data); - gtk_menu_shell_append((GtkMenuShell *)menu, item); + g_slist_free (importers); - data->filepage->items = g_slist_append(data->filepage->items, item); - importers = importers->next; - } - g_slist_free(importers); + gtk_combo_box_set_active (GTK_COMBO_BOX (page->filetype), 0); - data->filepage->menu = menu; - gtk_option_menu_set_menu((GtkOptionMenu *)data->filepage->filetype, menu); + filename_changed (data->filepage->filename, data); - filename_changed(data->filepage->filename, data); + g_signal_connect (page->filetype, "changed", G_CALLBACK (filetype_changed_cb), data); return FALSE; } diff --git a/smime/ChangeLog b/smime/ChangeLog index 3677604add..8310f3dbfb 100644 --- a/smime/ChangeLog +++ b/smime/ChangeLog @@ -1,3 +1,11 @@ +2009-04-24 Milan Crha <mcrha@redhat.com> + + ** Fix for bug #572348 + + * gui/smime-ui.glade: + * gui/e-cert-selector.c: + Remove deprecated Gtk+ symbols. + 2009-04-07 Milan Crha <mcrha@redhat.com> ** Fix for bug #539002 diff --git a/smime/gui/e-cert-selector.c b/smime/gui/e-cert-selector.c index dacf33198f..770f95c1cd 100644 --- a/smime/gui/e-cert-selector.c +++ b/smime/gui/e-cert-selector.c @@ -41,7 +41,7 @@ struct _ECertSelectorPrivate { CERTCertList *certlist; - GtkWidget *menu, *description; + GtkWidget *combobox, *description; }; enum { @@ -73,7 +73,7 @@ ecs_find_current(ECertSelector *ecs) if (p->certlist == NULL || CERT_LIST_EMPTY(p->certlist)) return NULL; - n = gtk_option_menu_get_history((GtkOptionMenu *)p->menu); + n = gtk_combo_box_get_active (GTK_COMBO_BOX (p->combobox)); node = CERT_LIST_HEAD(p->certlist); while (n>0 && !CERT_LIST_END(node, p->certlist)) { n--; @@ -149,7 +149,7 @@ e_cert_selector_new(int type, const char *currentid) CERTCertList *certlist; CERTCertListNode *node; GladeXML *gui; - GtkWidget *w, *menu; + GtkWidget *w; int n=0, active=0; char *gladefile; @@ -162,7 +162,7 @@ e_cert_selector_new(int type, const char *currentid) gui = glade_xml_new(gladefile, "cert_selector_vbox", NULL); g_free (gladefile); - p->menu = glade_xml_get_widget(gui, "cert_menu"); + p->combobox = glade_xml_get_widget(gui, "cert_combobox"); p->description = glade_xml_get_widget(gui, "cert_description"); w = glade_xml_get_widget(gui, "cert_selector_vbox"); @@ -179,7 +179,7 @@ e_cert_selector_new(int type, const char *currentid) break; } - menu = gtk_menu_new(); + gtk_list_store_clear (GTK_LIST_STORE (gtk_combo_box_get_model (GTK_COMBO_BOX (p->combobox)))); certlist = CERT_FindUserCertsByUsage(CERT_GetDefaultCertDB(), usage, FALSE, TRUE, NULL); ecs->priv->certlist = certlist; @@ -187,9 +187,7 @@ e_cert_selector_new(int type, const char *currentid) node = CERT_LIST_HEAD(certlist); while (!CERT_LIST_END(node, certlist)) { if (node->cert->nickname || node->cert->emailAddr) { - w = gtk_menu_item_new_with_label(node->cert->nickname?node->cert->nickname:node->cert->emailAddr); - gtk_menu_shell_append((GtkMenuShell *)menu, w); - gtk_widget_show(w); + gtk_combo_box_append_text (GTK_COMBO_BOX (p->combobox), node->cert->nickname?node->cert->nickname:node->cert->emailAddr); if (currentid != NULL && ((node->cert->nickname != NULL && strcmp(node->cert->nickname, currentid) == 0) @@ -203,14 +201,13 @@ e_cert_selector_new(int type, const char *currentid) } } - gtk_option_menu_set_menu((GtkOptionMenu *)p->menu, menu); - gtk_option_menu_set_history((GtkOptionMenu *)p->menu, active); + gtk_combo_box_set_active (GTK_COMBO_BOX (p->combobox), active); - g_signal_connect(p->menu, "changed", G_CALLBACK(ecs_cert_changed), ecs); + g_signal_connect (p->combobox, "changed", G_CALLBACK(ecs_cert_changed), ecs); g_object_unref(gui); - ecs_cert_changed(p->menu, ecs); + ecs_cert_changed(p->combobox, ecs); return GTK_WIDGET(ecs); } diff --git a/smime/gui/smime-ui.glade b/smime/gui/smime-ui.glade index 41d119f2ce..686cc38d02 100644 --- a/smime/gui/smime-ui.glade +++ b/smime/gui/smime-ui.glade @@ -4,7 +4,7 @@ <glade-interface> <widget class="GtkDialog" id="certificate-viewer-dialog"> - <property name="title" translatable="no">dialog1</property> + <property name="title">dialog1</property> <property name="type">GTK_WINDOW_TOPLEVEL</property> <property name="window_position">GTK_WIN_POS_CENTER</property> <property name="modal">False</property> @@ -15,6 +15,8 @@ <property name="skip_pager_hint">False</property> <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property> <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> + <property name="focus_on_map">True</property> + <property name="urgency_hint">False</property> <property name="has_separator">False</property> <child internal-child="vbox"> @@ -94,6 +96,10 @@ <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> @@ -115,6 +121,10 @@ <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> @@ -136,6 +146,10 @@ <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> @@ -157,6 +171,10 @@ <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> @@ -180,6 +198,10 @@ <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="type">label_item</property> @@ -227,6 +249,10 @@ <property name="yalign">1</property> <property name="xpad">0</property> <property name="ypad">3</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> @@ -251,6 +277,10 @@ <property name="yalign">0.5</property> <property name="xpad">6</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> @@ -275,6 +305,10 @@ <property name="yalign">0.5</property> <property name="xpad">6</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> @@ -299,6 +333,10 @@ <property name="yalign">0.5</property> <property name="xpad">6</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> @@ -323,6 +361,10 @@ <property name="yalign">0.5</property> <property name="xpad">6</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> @@ -347,6 +389,10 @@ <property name="yalign">0.5</property> <property name="xpad">6</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> @@ -371,6 +417,10 @@ <property name="yalign">0.5</property> <property name="xpad">6</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> @@ -395,6 +445,10 @@ <property name="yalign">0.5</property> <property name="xpad">6</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> @@ -419,6 +473,10 @@ <property name="yalign">0.5</property> <property name="xpad">6</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> @@ -443,6 +501,10 @@ <property name="yalign">0.5</property> <property name="xpad">6</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> @@ -467,6 +529,10 @@ <property name="yalign">1</property> <property name="xpad">0</property> <property name="ypad">3</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> @@ -491,6 +557,10 @@ <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">3</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> @@ -515,6 +585,10 @@ <property name="yalign">0.5</property> <property name="xpad">6</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> @@ -539,6 +613,10 @@ <property name="yalign">0.5</property> <property name="xpad">6</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> @@ -564,6 +642,10 @@ <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="left_attach">1</property> @@ -589,6 +671,10 @@ <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="left_attach">1</property> @@ -614,6 +700,10 @@ <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="left_attach">1</property> @@ -639,6 +729,10 @@ <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="left_attach">1</property> @@ -664,6 +758,10 @@ <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="left_attach">1</property> @@ -689,6 +787,10 @@ <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="left_attach">1</property> @@ -714,6 +816,10 @@ <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="left_attach">1</property> @@ -739,6 +845,10 @@ <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="left_attach">1</property> @@ -764,6 +874,10 @@ <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="left_attach">1</property> @@ -789,6 +903,10 @@ <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="left_attach">1</property> @@ -814,6 +932,10 @@ <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="left_attach">1</property> @@ -838,6 +960,10 @@ <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">3</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> @@ -875,6 +1001,10 @@ <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="type">tab</property> @@ -913,6 +1043,9 @@ <property name="rules_hint">False</property> <property name="reorderable">False</property> <property name="enable_search">True</property> + <property name="fixed_height_mode">False</property> + <property name="hover_selection">False</property> + <property name="hover_expand">False</property> </widget> </child> </widget> @@ -931,6 +1064,10 @@ <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="type">label_item</property> @@ -969,6 +1106,9 @@ <property name="rules_hint">False</property> <property name="reorderable">False</property> <property name="enable_search">True</property> + <property name="fixed_height_mode">False</property> + <property name="hover_selection">False</property> + <property name="hover_expand">False</property> </widget> </child> </widget> @@ -987,6 +1127,10 @@ <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="type">label_item</property> @@ -1052,6 +1196,10 @@ <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="type">label_item</property> @@ -1084,6 +1232,10 @@ <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="type">tab</property> @@ -1101,7 +1253,7 @@ </widget> <widget class="GtkWindow" id="cert-manager-config-control"> - <property name="title" translatable="no">window1</property> + <property name="title">window1</property> <property name="type">GTK_WINDOW_TOPLEVEL</property> <property name="window_position">GTK_WIN_POS_NONE</property> <property name="modal">False</property> @@ -1112,6 +1264,8 @@ <property name="skip_pager_hint">False</property> <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property> <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> + <property name="focus_on_map">True</property> + <property name="urgency_hint">False</property> <child> <widget class="GtkNotebook" id="cert-manager-notebook"> @@ -1143,6 +1297,10 @@ <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> @@ -1174,6 +1332,9 @@ <property name="rules_hint">False</property> <property name="reorderable">False</property> <property name="enable_search">True</property> + <property name="fixed_height_mode">False</property> + <property name="hover_selection">False</property> + <property name="hover_expand">False</property> <accessibility> <atkproperty name="AtkObject::accessible_name" translatable="yes">Certificates Table</atkproperty> </accessibility> @@ -1263,6 +1424,10 @@ <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> @@ -1333,6 +1498,10 @@ <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> @@ -1405,6 +1574,10 @@ <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="type">tab</property> @@ -1431,6 +1604,10 @@ <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> @@ -1462,6 +1639,9 @@ <property name="rules_hint">False</property> <property name="reorderable">False</property> <property name="enable_search">True</property> + <property name="fixed_height_mode">False</property> + <property name="hover_selection">False</property> + <property name="hover_expand">False</property> <accessibility> <atkproperty name="AtkObject::accessible_name" translatable="yes">Certificates Table</atkproperty> </accessibility> @@ -1551,6 +1731,10 @@ <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> @@ -1623,6 +1807,10 @@ <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="type">tab</property> @@ -1649,6 +1837,10 @@ <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> @@ -1680,6 +1872,9 @@ <property name="rules_hint">False</property> <property name="reorderable">False</property> <property name="enable_search">True</property> + <property name="fixed_height_mode">False</property> + <property name="hover_selection">False</property> + <property name="hover_expand">False</property> </widget> </child> </widget> @@ -1766,6 +1961,10 @@ <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> @@ -1838,6 +2037,10 @@ <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="type">tab</property> @@ -1859,6 +2062,8 @@ <property name="skip_pager_hint">False</property> <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property> <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> + <property name="focus_on_map">True</property> + <property name="urgency_hint">False</property> <property name="has_separator">False</property> <child internal-child="vbox"> @@ -1939,6 +2144,10 @@ <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> @@ -2017,6 +2226,10 @@ <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> @@ -2047,6 +2260,8 @@ <property name="skip_pager_hint">False</property> <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property> <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> + <property name="focus_on_map">True</property> + <property name="urgency_hint">False</property> <child> <widget class="GtkVBox" id="cert_selector_vbox"> @@ -2074,6 +2289,10 @@ <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> @@ -2083,10 +2302,12 @@ </child> <child> - <widget class="GtkOptionMenu" id="cert_menu"> + <widget class="GtkComboBox" id="cert_combobox"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">-1</property> + <property name="items" translatable="yes">a +b</property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> </widget> <packing> <property name="padding">0</property> @@ -2154,6 +2375,10 @@ <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="type">label_item</property> @@ -2182,6 +2407,8 @@ <property name="skip_pager_hint">False</property> <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property> <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> + <property name="focus_on_map">True</property> + <property name="urgency_hint">False</property> <property name="has_separator">False</property> <child internal-child="vbox"> @@ -2249,6 +2476,10 @@ <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> diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog index 92d26c8333..276f80062a 100644 --- a/widgets/misc/ChangeLog +++ b/widgets/misc/ChangeLog @@ -1,3 +1,15 @@ +2009-04-24 Milan Crha <mcrha@redhat.com> + + ** Fix for bug #572348 + + * e-dateedit.c: + * e-combo-button.c: + * e-dropdown-button.c: + * e-canvas.c: + * e-cell-date-edit.h: + * e-cell-date-edit.c: + Remove deprecated Gtk+ symbols. + 2009-04-13 Johnny Jacob <jjohnny@novell.com> ** Fixes #578685 – evolution crashed with SIGSEGV. diff --git a/widgets/misc/e-canvas.c b/widgets/misc/e-canvas.c index a395197df7..3cb85c5839 100644 --- a/widgets/misc/e-canvas.c +++ b/widgets/misc/e-canvas.c @@ -994,7 +994,7 @@ void e_canvas_popup_tooltip (ECanvas *canvas, GtkWidget *widget, int x, int y) G_CALLBACK (e_canvas_visibility), canvas); } } - gtk_widget_set_uposition (widget, x, y); + gtk_window_move (GTK_WINDOW (widget), x, y); gtk_widget_show (widget); } diff --git a/widgets/misc/e-cell-date-edit.c b/widgets/misc/e-cell-date-edit.c index 68cbbb97d4..97947980d9 100644 --- a/widgets/misc/e-cell-date-edit.c +++ b/widgets/misc/e-cell-date-edit.c @@ -96,8 +96,7 @@ static void e_cell_date_edit_on_today_clicked (GtkWidget *button, ECellDateEdit *ecde); static void e_cell_date_edit_update_cell (ECellDateEdit *ecde, char *text); -static void e_cell_date_edit_on_time_selected (GtkList *list, - ECellDateEdit *ecde); +static void e_cell_date_edit_on_time_selected (GtkTreeSelection *selection, ECellDateEdit *ecde); static void e_cell_date_edit_hide_popup (ECellDateEdit *ecde); @@ -213,8 +212,9 @@ static void e_cell_date_edit_init (ECellDateEdit *ecde) { GtkWidget *frame, *vbox, *hbox, *vbox2; - GtkWidget *scrolled_window, *list, *bbox; + GtkWidget *scrolled_window, *bbox, *tree_view; GtkWidget *now_button, *today_button, *none_button, *ok_button; + GtkListStore *store; ecde->lower_hour = 0; ecde->upper_hour = 24; @@ -270,13 +270,24 @@ e_cell_date_edit_init (ECellDateEdit *ecde) GTK_POLICY_ALWAYS); gtk_widget_show (scrolled_window); - list = gtk_list_new (); - gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (scrolled_window), list); - gtk_container_set_focus_vadjustment (GTK_CONTAINER (list), + store = gtk_list_store_new (1, G_TYPE_STRING); + tree_view = gtk_tree_view_new_with_model (GTK_TREE_MODEL (store)); + g_object_unref (store); + + gtk_tree_view_append_column ( + GTK_TREE_VIEW (tree_view), + gtk_tree_view_column_new_with_attributes ("Text", gtk_cell_renderer_text_new (), "text", 0, NULL)); + + gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (tree_view), FALSE); + + gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (scrolled_window), tree_view); + gtk_container_set_focus_vadjustment (GTK_CONTAINER (tree_view), gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (scrolled_window))); - gtk_widget_show (list); - ecde->time_list = list; - g_signal_connect((list), "selection-changed", + gtk_container_set_focus_hadjustment (GTK_CONTAINER (tree_view), + gtk_scrolled_window_get_hadjustment (GTK_SCROLLED_WINDOW (scrolled_window))); + gtk_widget_show (tree_view); + ecde->time_tree_view = tree_view; + g_signal_connect (gtk_tree_view_get_selection (GTK_TREE_VIEW (tree_view)), "changed", G_CALLBACK (e_cell_date_edit_on_time_selected), ecde); @@ -414,10 +425,10 @@ e_cell_date_edit_set_property (GObject *object, case PROP_SHOW_TIME: if (g_value_get_boolean (value)) { gtk_widget_show (ecde->time_entry); - gtk_widget_show (ecde->time_list); + gtk_widget_show (ecde->time_tree_view); } else { gtk_widget_hide (ecde->time_entry); - gtk_widget_hide (ecde->time_list); + gtk_widget_hide (ecde->time_tree_view); } return; case PROP_SHOW_NOW_BUTTON: @@ -526,7 +537,7 @@ e_cell_date_edit_set_popup_values (ECellDateEdit *ecde) if (status == E_TIME_PARSE_NONE || status == E_TIME_PARSE_INVALID) { gtk_entry_set_text (GTK_ENTRY (ecde->time_entry), ""); e_calendar_item_set_selection (calitem, NULL, NULL); - gtk_list_unselect_all (GTK_LIST (ecde->time_list)); + gtk_tree_selection_unselect_all (gtk_tree_view_get_selection (GTK_TREE_VIEW (ecde->time_tree_view))); } else { if (is_date) { buffer[0] = '\0'; @@ -542,7 +553,7 @@ e_cell_date_edit_set_popup_values (ECellDateEdit *ecde) e_calendar_item_set_selection (calitem, &date, &date); if (is_date) { - gtk_list_unselect_all (GTK_LIST (ecde->time_list)); + gtk_tree_selection_unselect_all (gtk_tree_view_get_selection (GTK_TREE_VIEW (ecde->time_tree_view))); } else { e_cell_date_edit_select_matching_time (ecde, buffer); } @@ -556,30 +567,39 @@ static void e_cell_date_edit_select_matching_time (ECellDateEdit *ecde, char *time) { - GtkList *list; - GtkWidget *listitem, *label; - GList *elem; gboolean found = FALSE; - const gchar *list_item_text; + gboolean valid; + GtkTreeSelection *selection; + GtkTreeIter iter; + GtkTreeModel *model; + + model = gtk_tree_view_get_model (GTK_TREE_VIEW (ecde->time_tree_view)); + selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (ecde->time_tree_view)); - list = GTK_LIST (ecde->time_list); - elem = list->children; - while (elem) { - listitem = GTK_WIDGET (elem->data); - label = GTK_BIN (listitem)->child; - list_item_text = gtk_label_get_text (GTK_LABEL (label)); + for (valid = gtk_tree_model_get_iter_first (model, &iter); + valid && !found; + valid = gtk_tree_model_iter_next (model, &iter)) { + char *str = NULL; + + gtk_tree_model_get (model, &iter, 0, &str, -1); + + if (g_str_equal (str, time)) { + GtkTreePath *path = gtk_tree_model_get_path (model, &iter); + + gtk_tree_view_set_cursor (GTK_TREE_VIEW (ecde->time_tree_view), path, NULL, FALSE); + gtk_tree_view_scroll_to_cell (GTK_TREE_VIEW (ecde->time_tree_view), path, NULL, FALSE, 0.0, 0.0); + gtk_tree_path_free (path); - if (!strcmp (list_item_text, time)) { found = TRUE; - gtk_list_select_child (list, listitem); - break; } - elem = elem->next; + g_free (str); } - if (!found) - gtk_list_unselect_all (list); + if (!found) { + gtk_tree_selection_unselect_all (selection); + gtk_tree_view_scroll_to_point (GTK_TREE_VIEW (ecde->time_tree_view), 0, 0); + } } @@ -597,7 +617,7 @@ e_cell_date_edit_show_popup (ECellDateEdit *ecde, e_cell_date_edit_get_popup_pos (ecde, row, view_col, &x, &y, &height, &width); - gtk_widget_set_uposition (ecde->popup_window, x, y); + gtk_window_move (GTK_WINDOW (ecde->popup_window), x, y); gtk_widget_set_size_request (ecde->popup_window, width, height); gtk_widget_realize (ecde->popup_window); gdk_window_resize (ecde->popup_window->window, width, height); @@ -732,15 +752,13 @@ e_cell_date_edit_button_press (GtkWidget *popup_window, static void e_cell_date_edit_rebuild_time_list (ECellDateEdit *ecde) { - GtkList *list; - GtkWidget *listitem; + GtkListStore *store; char buffer[40]; struct tm tmp_tm; gint hour, min; - list = GTK_LIST (ecde->time_list); - - gtk_list_clear_items (list, 0, -1); + store = GTK_LIST_STORE (gtk_tree_view_get_model (GTK_TREE_VIEW (ecde->time_tree_view))); + gtk_list_store_clear (store); /* Fill the struct tm with some sane values. */ tmp_tm.tm_year = 2000; @@ -750,7 +768,6 @@ e_cell_date_edit_rebuild_time_list (ECellDateEdit *ecde) tmp_tm.tm_isdst = 0; for (hour = ecde->lower_hour; hour <= ecde->upper_hour; hour++) { - /* We don't want to display midnight at the end, since that is really in the next day. */ if (hour == 24) @@ -760,13 +777,15 @@ e_cell_date_edit_rebuild_time_list (ECellDateEdit *ecde) for (min = 0; min == 0 || (min < 60 && hour != ecde->upper_hour); min += 30) { + GtkTreeIter iter; + tmp_tm.tm_hour = hour; tmp_tm.tm_min = min; e_time_format_time (&tmp_tm, ecde->use_24_hour_format, FALSE, buffer, sizeof (buffer)); - listitem = gtk_list_item_new_with_label (buffer); - gtk_widget_show (listitem); - gtk_container_add (GTK_CONTAINER (list), listitem); + + gtk_list_store_append (store, &iter); + gtk_list_store_set (store, &iter, 0, buffer, -1); } } @@ -940,19 +959,22 @@ e_cell_date_edit_update_cell (ECellDateEdit *ecde, static void -e_cell_date_edit_on_time_selected (GtkList *list, - ECellDateEdit *ecde) +e_cell_date_edit_on_time_selected (GtkTreeSelection *selection, ECellDateEdit *ecde) { - GtkWidget *listitem, *label; - const gchar *list_item_text; + gchar *list_item_text = NULL; + GtkTreeIter iter; + GtkTreeModel *model; - if (!list->selection) + if (!gtk_tree_selection_get_selected (selection, &model, &iter)) return; - listitem = list->selection->data; - label = GTK_BIN (listitem)->child; - list_item_text = gtk_label_get_text (GTK_LABEL (label)); + gtk_tree_model_get (model, &iter, 0, &list_item_text, -1); + + g_return_if_fail (list_item_text != NULL); + gtk_entry_set_text (GTK_ENTRY (ecde->time_entry), list_item_text); + + g_free (list_item_text); } diff --git a/widgets/misc/e-cell-date-edit.h b/widgets/misc/e-cell-date-edit.h index 938d356e8d..30dee535e8 100644 --- a/widgets/misc/e-cell-date-edit.h +++ b/widgets/misc/e-cell-date-edit.h @@ -53,7 +53,7 @@ struct _ECellDateEdit { GtkWidget *popup_window; GtkWidget *calendar; GtkWidget *time_entry; - GtkWidget *time_list; + GtkWidget *time_tree_view; GtkWidget *now_button; GtkWidget *today_button; diff --git a/widgets/misc/e-combo-button.c b/widgets/misc/e-combo-button.c index 788008a10f..aabb7073f1 100644 --- a/widgets/misc/e-combo-button.c +++ b/widgets/misc/e-combo-button.c @@ -573,7 +573,9 @@ e_combo_button_set_label (EComboButton *combo_button, if (label == NULL) label = ""; - gtk_label_parse_uline (GTK_LABEL (priv->label), label); + gtk_label_set_label (GTK_LABEL (priv->label), label); + gtk_label_set_use_markup (GTK_LABEL (priv->label), FALSE); + gtk_label_set_use_underline (GTK_LABEL (priv->label), TRUE); } void diff --git a/widgets/misc/e-dateedit.c b/widgets/misc/e-dateedit.c index 5169781870..2120483abf 100644 --- a/widgets/misc/e-dateedit.c +++ b/widgets/misc/e-dateedit.c @@ -1253,7 +1253,7 @@ position_date_popup (EDateEdit *dedit) x = CLAMP (x, 0, MAX (0, screen_width - cal_req.width)); y = CLAMP (y, 0, MAX (0, screen_height - cal_req.height)); - gtk_widget_set_uposition (dedit->priv->cal_popup, x, y); + gtk_window_move (GTK_WINDOW (dedit->priv->cal_popup), x, y); } diff --git a/widgets/misc/e-dropdown-button.c b/widgets/misc/e-dropdown-button.c index aa5f84f6c8..6008f64ad9 100644 --- a/widgets/misc/e-dropdown-button.c +++ b/widgets/misc/e-dropdown-button.c @@ -173,7 +173,7 @@ e_dropdown_button_construct (EDropdownButton *dropdown_button, GtkWidget *hbox; GtkWidget *arrow; GtkWidget *label; - unsigned int accel_key; + guint accel_key; g_return_if_fail (dropdown_button != NULL); g_return_if_fail (E_IS_DROPDOWN_BUTTON (dropdown_button)); @@ -188,7 +188,11 @@ e_dropdown_button_construct (EDropdownButton *dropdown_button, gtk_widget_show (hbox); label = gtk_label_new (""); - accel_key = gtk_label_parse_uline (GTK_LABEL (label), label_text); + gtk_label_set_label (GTK_LABEL (label), label_text); + gtk_label_set_use_markup (GTK_LABEL (label), FALSE); + gtk_label_set_use_underline (GTK_LABEL (label), TRUE); + + accel_key = gtk_label_get_mnemonic_keyval (GTK_LABEL (label)); gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0); gtk_widget_show (label); gtk_widget_add_accelerator (GTK_WIDGET (dropdown_button), "clicked", diff --git a/widgets/table/ChangeLog b/widgets/table/ChangeLog index df2e783606..7d556367a8 100644 --- a/widgets/table/ChangeLog +++ b/widgets/table/ChangeLog @@ -1,3 +1,12 @@ +2009-04-24 Milan Crha <mcrha@redhat.com> + + ** Fix for bug #572348 + + * e-table-header-item.c: + * e-cell-combo.h: + * e-cell-combo.c: + Remove deprecated Gtk+ symbols. + 2009-03-26 Matthew Barnes <mbarnes@redhat.com> ** Fixes part of bug #576694 diff --git a/widgets/table/e-cell-combo.c b/widgets/table/e-cell-combo.c index 34de0fb29e..84d58200d2 100644 --- a/widgets/table/e-cell-combo.c +++ b/widgets/table/e-cell-combo.c @@ -74,10 +74,6 @@ /* The height to make the popup list if there aren't any items in it. */ #define E_CELL_COMBO_LIST_EMPTY_HEIGHT 15 -/* The object data key used to store the UTF-8 text of the popup list items. */ -#define E_CELL_COMBO_UTF8_KEY "UTF-8-TEXT" - - static void e_cell_combo_class_init (ECellComboClass *klass); static void e_cell_combo_init (ECellCombo *ecc); static void e_cell_combo_dispose (GObject *object); @@ -98,9 +94,7 @@ static void e_cell_combo_get_popup_pos (ECellCombo *ecc, gint *height, gint *width); -static void e_cell_combo_selection_changed (GtkWidget *popup_list, ECellCombo *ecc); - -static gint e_cell_combo_list_button_press (GtkWidget *popup_list, GdkEvent *event, ECellCombo *ecc); +static void e_cell_combo_selection_changed (GtkTreeSelection *selection, ECellCombo *ecc); static gint e_cell_combo_button_press (GtkWidget *popup_window, GdkEvent *event, @@ -134,6 +128,8 @@ e_cell_combo_init (ECellCombo *ecc) { GtkWidget *frame; AtkObject *a11y; + GtkListStore *store; + GtkTreeSelection *selection; /* We create one popup window for the ECell, since there will only ever be one popup in use at a time. */ @@ -156,27 +152,32 @@ e_cell_combo_init (ECellCombo *ecc) gtk_container_add (GTK_CONTAINER (frame), ecc->popup_scrolled_window); gtk_widget_show (ecc->popup_scrolled_window); - ecc->popup_list = gtk_list_new (); - gtk_list_set_selection_mode (GTK_LIST (ecc->popup_list), - GTK_SELECTION_BROWSE); - gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (ecc->popup_scrolled_window), ecc->popup_list); - gtk_container_set_focus_vadjustment (GTK_CONTAINER (ecc->popup_list), + store = gtk_list_store_new (1, G_TYPE_STRING); + ecc->popup_tree_view = gtk_tree_view_new_with_model (GTK_TREE_MODEL (store)); + g_object_unref (store); + + gtk_tree_view_append_column ( + GTK_TREE_VIEW (ecc->popup_tree_view), + gtk_tree_view_column_new_with_attributes ("Text", gtk_cell_renderer_text_new (), "text", 0, NULL)); + + gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (ecc->popup_tree_view), FALSE); + + selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (ecc->popup_tree_view)); + gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE); + gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (ecc->popup_scrolled_window), ecc->popup_tree_view); + gtk_container_set_focus_vadjustment (GTK_CONTAINER (ecc->popup_tree_view), gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (ecc->popup_scrolled_window))); - gtk_container_set_focus_hadjustment (GTK_CONTAINER (ecc->popup_list), + gtk_container_set_focus_hadjustment (GTK_CONTAINER (ecc->popup_tree_view), gtk_scrolled_window_get_hadjustment (GTK_SCROLLED_WINDOW (ecc->popup_scrolled_window))); - gtk_widget_show (ecc->popup_list); + gtk_widget_show (ecc->popup_tree_view); - a11y = gtk_widget_get_accessible (ecc->popup_list); + a11y = gtk_widget_get_accessible (ecc->popup_tree_view); atk_object_set_name (a11y, _("popup list")); - g_signal_connect (ecc->popup_list, - "selection_changed", + g_signal_connect (selection, + "changed", G_CALLBACK (e_cell_combo_selection_changed), ecc); - g_signal_connect (ecc->popup_list, - "button_press_event", - G_CALLBACK (e_cell_combo_list_button_press), - ecc); g_signal_connect (ecc->popup_window, "button_press_event", G_CALLBACK (e_cell_combo_button_press), @@ -231,26 +232,20 @@ e_cell_combo_set_popdown_strings (ECellCombo *ecc, GList *strings) { GList *elem; - GtkWidget *listitem; + GtkListStore *store; g_return_if_fail (E_IS_CELL_COMBO (ecc)); g_return_if_fail (strings != NULL); - gtk_list_clear_items (GTK_LIST (ecc->popup_list), 0, -1); - elem = strings; - while (elem) { - char *utf8_text = elem->data; - - listitem = gtk_list_item_new_with_label (utf8_text); + store = GTK_LIST_STORE (gtk_tree_view_get_model (GTK_TREE_VIEW (ecc->popup_tree_view))); + gtk_list_store_clear (store); - gtk_widget_show (listitem); - gtk_container_add (GTK_CONTAINER (ecc->popup_list), listitem); - - g_object_set_data_full (G_OBJECT (listitem), - E_CELL_COMBO_UTF8_KEY, - g_strdup (utf8_text), g_free); + for (elem = strings; elem; elem = elem->next) { + GtkTreeIter iter; + char *utf8_text = elem->data; - elem = elem->next; + gtk_list_store_append (store, &iter); + gtk_list_store_set (store, &iter, 0, utf8_text, -1); } } @@ -264,20 +259,22 @@ e_cell_combo_do_popup (ECellPopup *ecp, ECellCombo *ecc = E_CELL_COMBO (ecp); guint32 time; gint error_code; + GtkTreeSelection *selection; + + selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (ecc->popup_tree_view)); - g_signal_handlers_block_by_func(ecc->popup_list, e_cell_combo_selection_changed, ecc); + g_signal_handlers_block_by_func (selection, e_cell_combo_selection_changed, ecc); e_cell_combo_show_popup (ecc, row, view_col); e_cell_combo_select_matching_item (ecc); - g_signal_handlers_unblock_by_func(ecc->popup_list, e_cell_combo_selection_changed, ecc); + g_signal_handlers_unblock_by_func (selection, e_cell_combo_selection_changed, ecc); if (event->type == GDK_BUTTON_PRESS) { - GTK_LIST (ecc->popup_list)->drag_selection = TRUE; time = event->button.time; } else { time = event->key.time; } - error_code = gdk_pointer_grab (ecc->popup_list->window, TRUE, + error_code = gdk_pointer_grab (gtk_widget_get_window (ecc->popup_tree_view), TRUE, GDK_ENTER_NOTIFY_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | @@ -287,7 +284,7 @@ e_cell_combo_do_popup (ECellPopup *ecp, if (error_code != 0) g_warning ("Failed to get pointer grab (%i)", error_code); gtk_grab_add (ecc->popup_window); - gdk_keyboard_grab (ecc->popup_list->window, TRUE, time); + gdk_keyboard_grab (gtk_widget_get_window (ecc->popup_tree_view), TRUE, time); return TRUE; } @@ -301,45 +298,45 @@ e_cell_combo_select_matching_item (ECellCombo *ecc) ECellText *ecell_text = E_CELL_TEXT (ecp->child); ETableItem *eti = E_TABLE_ITEM (ecp->popup_cell_view->cell_view.e_table_item_view); ETableCol *ecol; - GtkList *list; - GtkWidget *listitem; - GList *elem; gboolean found = FALSE; - char *cell_text, *list_item_text; + char *cell_text; + gboolean valid; + GtkTreeSelection *selection; + GtkTreeIter iter; + GtkTreeModel *model; ecol = e_table_header_get_column (eti->header, ecp->popup_view_col); cell_text = e_cell_text_get_text (ecell_text, ecv->e_table_model, ecol->col_idx, ecp->popup_row); - list = GTK_LIST (ecc->popup_list); - elem = list->children; - while (elem) { - listitem = GTK_WIDGET (elem->data); + model = gtk_tree_view_get_model (GTK_TREE_VIEW (ecc->popup_tree_view)); + selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (ecc->popup_tree_view)); + + for (valid = gtk_tree_model_get_iter_first (model, &iter); + valid && !found; + valid = gtk_tree_model_iter_next (model, &iter)) { + char *str = NULL; - /* We need to compare against the UTF-8 text. */ - list_item_text = g_object_get_data (G_OBJECT (listitem), - E_CELL_COMBO_UTF8_KEY); + gtk_tree_model_get (model, &iter, 0, &str, -1); + + if (str && g_str_equal (str, cell_text)) { + GtkTreePath *path = gtk_tree_model_get_path (model, &iter); + + gtk_tree_view_set_cursor (GTK_TREE_VIEW (ecc->popup_tree_view), path, NULL, FALSE); + gtk_tree_path_free (path); - if (list_item_text && !strcmp (list_item_text, cell_text)) { found = TRUE; - gtk_list_select_child (list, listitem); - gtk_widget_grab_focus (listitem); - break; } - elem = elem->next; + g_free (str); } - if (!found) { - gtk_list_unselect_all (list); - if (list->children) - gtk_widget_grab_focus (GTK_WIDGET (list->children->data)); - } + if (!found) + gtk_tree_selection_unselect_all (selection); e_cell_text_free_text (ecell_text, cell_text); } - static void e_cell_combo_show_popup (ECellCombo *ecc, int row, int view_col) { @@ -357,7 +354,7 @@ e_cell_combo_show_popup (ECellCombo *ecc, int row, int view_col) gtk_widget_hide (GTK_SCROLLED_WINDOW (ecc->popup_scrolled_window)->vscrollbar); } - gtk_widget_set_uposition (ecc->popup_window, x, y); + gtk_window_move (GTK_WINDOW (ecc->popup_window), x, y); gtk_widget_set_size_request (ecc->popup_window, width, height); gtk_widget_realize (ecc->popup_window); gdk_window_resize (ecc->popup_window->window, width, height); @@ -429,10 +426,10 @@ e_cell_combo_get_popup_pos (ECellCombo *ecc, screen_width = gdk_screen_width (); avail_width = screen_width - scrollbar_width; - gtk_widget_size_request (ecc->popup_list, &list_requisition); + gtk_widget_size_request (ecc->popup_tree_view, &list_requisition); min_height = MIN (list_requisition.height, popup->vscrollbar->requisition.height); - if (!GTK_LIST (ecc->popup_list)->children) + if (!gtk_tree_model_iter_n_children (gtk_tree_view_get_model (GTK_TREE_VIEW (ecc->popup_tree_view)), NULL)) list_requisition.height += E_CELL_COMBO_LIST_EMPTY_HEIGHT; /* Calculate the desired width. */ @@ -503,32 +500,16 @@ e_cell_combo_get_popup_pos (ECellCombo *ecc, } static void -e_cell_combo_selection_changed(GtkWidget *popup_list, ECellCombo *ecc) +e_cell_combo_selection_changed (GtkTreeSelection *selection, ECellCombo *ecc) { - if (!GTK_LIST(popup_list)->selection || !GTK_WIDGET_REALIZED(ecc->popup_window)) - return; + GtkTreeIter iter; + GtkTreeModel *model; - e_cell_combo_restart_edit (ecc); -} - -static gint -e_cell_combo_list_button_press(GtkWidget *popup_list, GdkEvent *event, ECellCombo *ecc) -{ - g_return_val_if_fail (GTK_IS_LIST(popup_list), FALSE); + if (!GTK_WIDGET_REALIZED (ecc->popup_window) || !gtk_tree_selection_get_selected (selection, &model, &iter)) + return; e_cell_combo_update_cell (ecc); - gtk_grab_remove (ecc->popup_window); - gdk_pointer_ungrab (event->button.time); - gdk_keyboard_ungrab (event->button.time); - gtk_widget_hide (ecc->popup_window); - - e_cell_popup_set_shown (E_CELL_POPUP (ecc), FALSE); - d(g_print("%s: popup_shown = FALSE\n", __FUNCTION__)); - e_cell_combo_restart_edit (ecc); - - return TRUE; - } /* This handles button press events in the popup window. @@ -553,7 +534,7 @@ e_cell_combo_button_press (GtkWidget *popup_window, which is why we hide the popup in this case. */ while (event_widget) { event_widget = event_widget->parent; - if (event_widget == ecc->popup_list) + if (event_widget == ecc->popup_tree_view) return FALSE; } @@ -590,11 +571,11 @@ e_cell_combo_button_release (GtkWidget *popup_window, event_widget = gtk_get_event_widget ((GdkEvent*) event); /* See if the button was released in the list (or its children). */ - while (event_widget && event_widget != ecc->popup_list) + while (event_widget && event_widget != ecc->popup_tree_view) event_widget = event_widget->parent; /* If it wasn't, then we just ignore the event. */ - if (event_widget != ecc->popup_list) + if (event_widget != ecc->popup_tree_view) return FALSE; /* The button was released inside the list, so we hide the popup and @@ -657,18 +638,17 @@ e_cell_combo_update_cell (ECellCombo *ecc) ECellText *ecell_text = E_CELL_TEXT (ecp->child); ETableItem *eti = E_TABLE_ITEM (ecv->e_table_item_view); ETableCol *ecol; - GtkList *list = GTK_LIST (ecc->popup_list); - GtkListItem *listitem; - gchar *text, *old_text; + GtkTreeSelection *selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (ecc->popup_tree_view)); + GtkTreeModel *model; + GtkTreeIter iter; + gchar *text = NULL, *old_text; /* Return if no item is selected. */ - if (list->selection == NULL) + if (!gtk_tree_selection_get_selected (selection, &model, &iter)) return; /* Get the text of the selected item. */ - listitem = list->selection->data; - text = g_object_get_data (G_OBJECT (listitem), - E_CELL_COMBO_UTF8_KEY); + gtk_tree_model_get (model, &iter, 0, &text, -1); g_return_if_fail (text != NULL); /* Compare it with the existing cell contents. */ @@ -684,6 +664,7 @@ e_cell_combo_update_cell (ECellCombo *ecc) } e_cell_text_free_text (ecell_text, old_text); + g_free (text); } diff --git a/widgets/table/e-cell-combo.h b/widgets/table/e-cell-combo.h index b7cc928e25..2e801f3711 100644 --- a/widgets/table/e-cell-combo.h +++ b/widgets/table/e-cell-combo.h @@ -45,7 +45,7 @@ typedef struct { GtkWidget *popup_window; GtkWidget *popup_scrolled_window; - GtkWidget *popup_list; + GtkWidget *popup_tree_view; } ECellCombo; typedef struct { diff --git a/widgets/table/e-table-header-item.c b/widgets/table/e-table-header-item.c index 7ffb1776ae..7aa7a92351 100644 --- a/widgets/table/e-table-header-item.c +++ b/widgets/table/e-table-header-item.c @@ -509,10 +509,10 @@ ethi_add_drop_marker (ETableHeaderItem *ethi, int col, gboolean recreate) rx -= gtk_layout_get_hadjustment (GTK_LAYOUT (GNOME_CANVAS_ITEM (ethi)->canvas))->value; ry -= gtk_layout_get_vadjustment (GTK_LAYOUT (GNOME_CANVAS_ITEM (ethi)->canvas))->value; - gtk_widget_set_uposition (arrow_down, rx + x - ARROW_PTR, ry - ARROW_DOWN_HEIGHT); + gtk_window_move (GTK_WINDOW (arrow_down), rx + x - ARROW_PTR, ry - ARROW_DOWN_HEIGHT); gtk_widget_show_all (arrow_down); - gtk_widget_set_uposition (arrow_up, rx + x - ARROW_PTR, ry + ethi->height); + gtk_window_move (GTK_WINDOW (arrow_up), rx + x - ARROW_PTR, ry + ethi->height); gtk_widget_show_all (arrow_up); } |