aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui
diff options
context:
space:
mode:
authorRodney Dawes <dobey@novell.com>2005-01-22 06:07:31 +0800
committerRodney Dawes <dobey@src.gnome.org>2005-01-22 06:07:31 +0800
commit60fdfc9af6bc4f2100eced7c57c3b3948f0d0eab (patch)
treed7201f39cceb2ca4bec8c43855c749b95dd979c0 /addressbook/gui
parent637fbe0446df03189f7f2989ad8d5a574edc3489 (diff)
downloadgsoc2013-evolution-60fdfc9af6bc4f2100eced7c57c3b3948f0d0eab.tar
gsoc2013-evolution-60fdfc9af6bc4f2100eced7c57c3b3948f0d0eab.tar.gz
gsoc2013-evolution-60fdfc9af6bc4f2100eced7c57c3b3948f0d0eab.tar.bz2
gsoc2013-evolution-60fdfc9af6bc4f2100eced7c57c3b3948f0d0eab.tar.lz
gsoc2013-evolution-60fdfc9af6bc4f2100eced7c57c3b3948f0d0eab.tar.xz
gsoc2013-evolution-60fdfc9af6bc4f2100eced7c57c3b3948f0d0eab.tar.zst
gsoc2013-evolution-60fdfc9af6bc4f2100eced7c57c3b3948f0d0eab.zip
Change the xpad and ypad to 0 here, we don't need the extra padding Add
2005-01-21 Rodney Dawes <dobey@novell.com> * gui/contact-editor/e-contact-quick-add.c (build_quick_add_dialog): Change the xpad and ypad to 0 here, we don't need the extra padding Add the GTK_DIALOG_NO_SEPARATOR flag for creating the dialog Set proper border widths on some dialog containers for the HIG Set the row/column spacings for the table widget Create the labels outside of the table packing calls and set the proper alignment for them to be HIG compliant Set the border width of the table widget to 12 for HIG compliance * gui/widgets/eab-popup-control.c (edit_contact_info_cb): Removed (eab_popup_control_display_contact): Just go ahead and open the editor, no need to have an intermittent window with a button for it (add_contacts_cb): Remove this as we don't need it any more (eab_popup_control_no_matches): Just go straight to the quick-add dialog, and don't pop up an intermittent window with a button Fixes #41210 #60852 svn path=/trunk/; revision=28499
Diffstat (limited to 'addressbook/gui')
-rw-r--r--addressbook/gui/contact-editor/e-contact-quick-add.c42
-rw-r--r--addressbook/gui/widgets/eab-popup-control.c41
2 files changed, 30 insertions, 53 deletions
diff --git a/addressbook/gui/contact-editor/e-contact-quick-add.c b/addressbook/gui/contact-editor/e-contact-quick-add.c
index 7a167dc5ff..d3765314ba 100644
--- a/addressbook/gui/contact-editor/e-contact-quick-add.c
+++ b/addressbook/gui/contact-editor/e-contact-quick-add.c
@@ -268,19 +268,26 @@ static GtkWidget *
build_quick_add_dialog (QuickAdd *qa)
{
GtkWidget *dialog;
+ GtkWidget *label;
GtkTable *table;
- const gint xpad=6, ypad=6;
+ const gint xpad=0, ypad=0;
g_return_val_if_fail (qa != NULL, NULL);
dialog = gtk_dialog_new_with_buttons (_("Contact Quick-Add"),
NULL, /* XXX */
- (GtkDialogFlags) 0,
+ GTK_DIALOG_NO_SEPARATOR,
_("_Edit Full"), QUICK_ADD_RESPONSE_EDIT_FULL,
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+ GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OK, GTK_RESPONSE_OK,
NULL);
+ gtk_widget_ensure_style (dialog);
+ gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox),
+ 0);
+ gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dialog)->action_area),
+ 12);
+
g_signal_connect (dialog, "response", G_CALLBACK (clicked_cb), qa);
qa->name_entry = gtk_entry_new ();
@@ -293,27 +300,34 @@ build_quick_add_dialog (QuickAdd *qa)
gtk_entry_set_text (GTK_ENTRY (qa->email_entry), qa->email);
table = GTK_TABLE (gtk_table_new (2, 2, FALSE));
+ gtk_table_set_row_spacings (table, 6);
+ gtk_table_set_col_spacings (table, 12);
- gtk_table_attach (table, gtk_label_new_with_mnemonic (_("_Full Name:")),
+ label = gtk_label_new_with_mnemonic (_("_Full name:"));
+ gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
+
+ gtk_table_attach (table, label,
0, 1, 0, 1,
- 0, 0, xpad, ypad);
+ GTK_FILL, 0, xpad, ypad);
gtk_table_attach (table, qa->name_entry,
1, 2, 0, 1,
- GTK_EXPAND | GTK_FILL, GTK_EXPAND, xpad, ypad);
- gtk_table_attach (table, gtk_label_new_with_mnemonic (_("E-_mail:")),
+ GTK_EXPAND | GTK_FILL, 0, xpad, ypad);
+
+ label = gtk_label_new_with_mnemonic (_("E-_mail:"));
+ gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
+
+ gtk_table_attach (table, label,
0, 1, 1, 2,
- 0, 0, xpad, ypad);
+ GTK_FILL, 0, xpad, ypad);
gtk_table_attach (table, qa->email_entry,
1, 2, 1, 2,
- GTK_EXPAND | GTK_FILL, GTK_EXPAND, xpad, ypad);
- gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox),
- 6);
-
- gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->vbox),6);
+ GTK_EXPAND | GTK_FILL, 0, xpad, ypad);
+ gtk_container_set_border_width (GTK_CONTAINER (table),
+ 12);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox),
GTK_WIDGET (table),
- TRUE, TRUE, 6);
+ FALSE, FALSE, 0);
gtk_widget_show_all (GTK_WIDGET (table));
diff --git a/addressbook/gui/widgets/eab-popup-control.c b/addressbook/gui/widgets/eab-popup-control.c
index 10ef769632..1ff1544958 100644
--- a/addressbook/gui/widgets/eab-popup-control.c
+++ b/addressbook/gui/widgets/eab-popup-control.c
@@ -924,14 +924,6 @@ contact_editor_cb (EBook *book, EBookStatus status, gpointer closure)
}
static void
-edit_contact_info_cb (GtkWidget *button, EABPopupControl *pop)
-{
- emit_event (pop, "Hide");
-
- addressbook_load_default_book (contact_editor_cb, pop);
-}
-
-static void
eab_popup_control_display_contact (EABPopupControl *pop, EContact *contact)
{
GtkWidget *b;
@@ -943,23 +935,11 @@ eab_popup_control_display_contact (EABPopupControl *pop, EContact *contact)
pop->contact = contact;
g_object_ref (pop->contact);
- eab_contact_display_render (EAB_CONTACT_DISPLAY (pop->contact_display),
- contact,
- EAB_CONTACT_DISPLAY_RENDER_COMPACT);
- gtk_widget_show (pop->contact_display);
- gtk_widget_hide (pop->generic_view);
-
- b = gtk_button_new_with_label (_("Edit Contact Info"));
- gtk_box_pack_start (GTK_BOX (pop->main_vbox), b, TRUE, TRUE, 0);
- g_signal_connect (b,
- "clicked",
- G_CALLBACK (edit_contact_info_cb),
- pop);
- gtk_widget_show (b);
+ addressbook_load_default_book (contact_editor_cb, pop);
}
static void
-add_contacts_cb (GtkWidget *button, EABPopupControl *pop)
+eab_popup_control_no_matches (EABPopupControl *pop)
{
if (pop->email && *pop->email) {
if (pop->name && *pop->name)
@@ -973,23 +953,6 @@ add_contacts_cb (GtkWidget *button, EABPopupControl *pop)
}
static void
-eab_popup_control_no_matches (EABPopupControl *pop)
-{
- GtkWidget *b;
-
- g_return_if_fail (pop && EAB_IS_POPUP_CONTROL (pop));
-
- b = e_button_new_with_stock_icon (_("Add to Contacts"), "gtk-add");
-
- gtk_box_pack_start (GTK_BOX (pop->main_vbox), b, TRUE, TRUE, 0);
- g_signal_connect (b,
- "clicked",
- G_CALLBACK (add_contacts_cb),
- pop);
- gtk_widget_show (b);
-}
-
-static void
wizard_destroy_cb (MiniWizard *wiz, gpointer closure)
{
gtk_widget_destroy (GTK_WIDGET (closure));