aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'addressbook/gui/widgets')
-rw-r--r--addressbook/gui/widgets/e-addressbook-view.c6
-rw-r--r--addressbook/gui/widgets/eab-contact-display.c35
-rw-r--r--addressbook/gui/widgets/gal-view-minicard.c12
3 files changed, 27 insertions, 26 deletions
diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c
index c011f385d3..5410bef787 100644
--- a/addressbook/gui/widgets/e-addressbook-view.c
+++ b/addressbook/gui/widgets/e-addressbook-view.c
@@ -1844,12 +1844,13 @@ eab_view_print(EABView *view, int preview)
char *query;
EBook *book;
GtkWidget *print;
+ GList *list;
g_object_get (view->model,
"query", &query,
"book", &book,
NULL);
- GList *list = get_selected_contacts (view);
+ list = get_selected_contacts (view);
print = e_contact_print_dialog_new (book, query, list);
if (!preview)
@@ -1902,13 +1903,14 @@ eab_view_print_preview(EABView *view)
char *query;
EBook *book;
GtkWidget *dialog;
+ GList *list;
g_object_get (view->model,
"query", &query,
"book", &book,
NULL);
- GList *list = get_selected_contacts (view);
+ list = get_selected_contacts (view);
if (list != NULL)
dialog = e_contact_print_contact_list_dialog_new (list);
else
diff --git a/addressbook/gui/widgets/eab-contact-display.c b/addressbook/gui/widgets/eab-contact-display.c
index 6962962b0d..ddade470a2 100644
--- a/addressbook/gui/widgets/eab-contact-display.c
+++ b/addressbook/gui/widgets/eab-contact-display.c
@@ -95,11 +95,10 @@ eab_uri_popup_email_address_copy(EPopup *ep, EPopupItem *item, void *data)
EABContactDisplay *display = data;
struct _EABContactDisplayPrivate *p = display->priv;
EABPopupTargetURI *t = (EABPopupTargetURI *)ep->target;
- const char *url;
+ const char *url = t->uri;
char *html=NULL;
int i=0;
GList *email_list, *l;
- url = t->uri;
int email_num = atoi (url + strlen ("internal-mailto:"));
email_list = e_contact_get (p->contact, E_CONTACT_EMAIL);
@@ -134,11 +133,10 @@ static void
eab_uri_popup_address_send(EPopup *ep, EPopupItem *item, void *data)
{
EABPopupTargetURI *t = (EABPopupTargetURI *)ep->target;
- const char *url;
+ const char *url = t->uri;
EABContactDisplay *display = data;
struct _EABContactDisplayPrivate *p = display->priv;
- url = t->uri;
int mail_num = atoi (url + strlen ("internal-mailto:"));
if (mail_num == -1)
@@ -199,22 +197,19 @@ eab_uri_popup_event(EABContactDisplay *display, GdkEvent *event, const char *uri
EABPopup *emp;
EABPopupTargetURI *t ;
GtkMenu *menu;
-
-
- emp = eab_popup_new("org.gnome.evolution.addressbook.contactdisplay.popup");
-
- GSList *menus = NULL;
- int i;
+ GSList *menus = NULL;
+ int i;
- t = eab_popup_target_new_uri(emp, uri);
- t->target.widget = (GtkWidget *)display;
+ emp = eab_popup_new("org.gnome.evolution.addressbook.contactdisplay.popup");
- for (i=0;i<sizeof(eab_uri_popups)/sizeof(eab_uri_popups[0]);i++) {
- eab_uri_popups[i].user_data = g_strdup(t->uri);
- menus = g_slist_prepend(menus, &eab_uri_popups[i]);
- }
- e_popup_add_items((EPopup *)emp, menus, NULL, eab_uri_popup_free, display);
-
+ t = eab_popup_target_new_uri(emp, uri);
+ t->target.widget = (GtkWidget *)display;
+
+ for (i=0;i<sizeof(eab_uri_popups)/sizeof(eab_uri_popups[0]);i++) {
+ eab_uri_popups[i].user_data = g_strdup(t->uri);
+ menus = g_slist_prepend(menus, &eab_uri_popups[i]);
+ }
+ e_popup_add_items((EPopup *)emp, menus, NULL, eab_uri_popup_free, display);
menu = e_popup_create_menu_once((EPopup *)emp,(EPopupTarget*)t, 0);
@@ -867,9 +862,9 @@ eab_contact_display_new (void)
{
EABContactDisplay *display;
- display = g_object_new (EAB_TYPE_CONTACT_DISPLAY, NULL);
-
struct _EABContactDisplayPrivate *p;
+
+ display = g_object_new (EAB_TYPE_CONTACT_DISPLAY, NULL);
p=display->priv = g_new0 (EABContactDisplayPrivate, 1);
gtk_html_set_default_content_type (GTK_HTML (display), "text/html; charset=utf-8");
diff --git a/addressbook/gui/widgets/gal-view-minicard.c b/addressbook/gui/widgets/gal-view-minicard.c
index 7111cc0cb8..6239ead080 100644
--- a/addressbook/gui/widgets/gal-view-minicard.c
+++ b/addressbook/gui/widgets/gal-view-minicard.c
@@ -188,24 +188,28 @@ static void
column_width_changed (EMinicardViewWidget *w, double width, EABView *address_view)
{
GalViewMinicard *view = GAL_VIEW_MINICARD (gal_view_instance_get_current_view (address_view->view_instance));
+ GtkScrolledWindow *scrolled_window;
+ GtkAdjustment *adj;
+ GtkAdjustment *adj_new;
+
d(g_print("%s: Old width = %f, New width = %f\n", G_GNUC_FUNCTION, view->column_width, width));
if (view->column_width != width) {
view->column_width = width;
gal_view_changed(GAL_VIEW(view));
}
- GtkScrolledWindow * scrolled_window = GTK_SCROLLED_WINDOW(address_view->widget);
- GtkAdjustment *adj = gtk_scrolled_window_get_hadjustment (scrolled_window);
- GtkAdjustment *adj_new = gtk_adjustment_new(adj->value, adj->lower, adj->upper, adj->page_size, adj->page_increment,adj->page_size);
+ scrolled_window = GTK_SCROLLED_WINDOW(address_view->widget);
+ adj = gtk_scrolled_window_get_hadjustment (scrolled_window);
+ adj_new = gtk_adjustment_new(adj->value, adj->lower, adj->upper, adj->page_size, adj->page_increment,adj->page_size);
gtk_scrolled_window_set_hadjustment(scrolled_window, adj_new);
}
void
gal_view_minicard_attach (GalViewMinicard *view, EABView *address_view)
{
+ EMinicardViewWidget *emvw = E_MINICARD_VIEW_WIDGET (address_view->object);
gal_view_minicard_detach (view);
- EMinicardViewWidget *emvw = E_MINICARD_VIEW_WIDGET (address_view->object);
view->emvw = emvw;
g_object_ref (view->emvw);