aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/component
diff options
context:
space:
mode:
authorMatthew Loper <mloper@src.gnome.org>2000-04-09 14:47:20 +0800
committerMatthew Loper <mloper@src.gnome.org>2000-04-09 14:47:20 +0800
commit01bf08bdbc72d2183d40aa88b503b07bea8fff11 (patch)
tree23faef1c782bb6c5b55dad147126502cafc301e2 /addressbook/gui/component
parent75513364f1db91b894cacb8853d9486e74b45caf (diff)
downloadgsoc2013-evolution-01bf08bdbc72d2183d40aa88b503b07bea8fff11.tar.gz
gsoc2013-evolution-01bf08bdbc72d2183d40aa88b503b07bea8fff11.tar.zst
gsoc2013-evolution-01bf08bdbc72d2183d40aa88b503b07bea8fff11.zip
+ * addressbook/gui/component/addressbook.c (addressbook_factory):
+ Added gtk_widget_push/pop_colormap/visual, which I assume is + necessary for canvas use. + + * folder-browser.c (folder_browser_new): set folder_browser->uri + to NULL, so that we know when to free it. + + * e-table-col.c (e_table_col_new_with_pixbuf): ref etc->ecell, + like in e_table_col_new, since that same ECell is unref'd in + etc_destroy(). + svn path=/trunk/; revision=2350
Diffstat (limited to 'addressbook/gui/component')
-rw-r--r--addressbook/gui/component/addressbook.c47
1 files changed, 30 insertions, 17 deletions
diff --git a/addressbook/gui/component/addressbook.c b/addressbook/gui/component/addressbook.c
index 3fb9a036ca..28422e4194 100644
--- a/addressbook/gui/component/addressbook.c
+++ b/addressbook/gui/component/addressbook.c
@@ -68,7 +68,8 @@ control_activate (BonoboControl *control, BonoboUIHandler *uih)
remote_uih = bonobo_control_get_remote_ui_handler (control);
bonobo_ui_handler_set_container (uih, remote_uih);
- bonobo_ui_handler_menu_new_item (uih, "/Actions/New Contact", N_("_New Contact"),
+ bonobo_ui_handler_menu_new_item (uih, "/Actions/New Contact",
+ N_("_New Contact"),
NULL, -1,
BONOBO_UI_HANDLER_PIXMAP_NONE, NULL,
0, 0, do_nothing_cb, NULL);
@@ -198,24 +199,32 @@ addressbook_factory (BonoboGenericFactory *Factory, void *closure)
EBook *book;
GtkWidget *vbox, *scrollbar;
AddressbookView *view;
+
+ gtk_widget_push_visual (gdk_rgb_get_visual ());
+ gtk_widget_push_colormap (gdk_rgb_get_cmap ());
+
view = g_new (AddressbookView, 1);
vbox = gtk_vbox_new(FALSE, 0);
view->canvas = e_canvas_new();
- view->rect = gnome_canvas_item_new( gnome_canvas_root( GNOME_CANVAS( view->canvas ) ),
- gnome_canvas_rect_get_type(),
- "x1", (double) 0,
- "y1", (double) 0,
- "x2", (double) 100,
- "y2", (double) 100,
- "fill_color", "white",
- NULL );
- view->view = gnome_canvas_item_new( gnome_canvas_root( GNOME_CANVAS( view->canvas ) ),
- e_minicard_view_get_type(),
- "height", (double) 100,
- "minimum_width", (double) 100,
- NULL );
+ view->rect = gnome_canvas_item_new(
+ gnome_canvas_root( GNOME_CANVAS( view->canvas ) ),
+ gnome_canvas_rect_get_type(),
+ "x1", (double) 0,
+ "y1", (double) 0,
+ "x2", (double) 100,
+ "y2", (double) 100,
+ "fill_color", "white",
+ NULL );
+
+ view->view = gnome_canvas_item_new(
+ gnome_canvas_root( GNOME_CANVAS( view->canvas ) ),
+ e_minicard_view_get_type(),
+ "height", (double) 100,
+ "minimum_width", (double) 100,
+ NULL );
+
gtk_signal_connect( GTK_OBJECT( view->canvas ), "reflow",
GTK_SIGNAL_FUNC( resize ),
view);
@@ -226,7 +235,8 @@ addressbook_factory (BonoboGenericFactory *Factory, void *closure)
gtk_box_pack_start(GTK_BOX(vbox), view->canvas, TRUE, TRUE, 0);
- scrollbar = gtk_hscrollbar_new(gtk_layout_get_hadjustment(GTK_LAYOUT(view->canvas)));
+ scrollbar = gtk_hscrollbar_new(
+ gtk_layout_get_hadjustment(GTK_LAYOUT(view->canvas)));
gtk_box_pack_start(GTK_BOX(vbox), scrollbar, FALSE, FALSE, 0);
@@ -241,10 +251,10 @@ addressbook_factory (BonoboGenericFactory *Factory, void *closure)
gtk_widget_show_all( vbox );
#if 0
- gdk_window_set_back_pixmap( GTK_LAYOUT(view->canvas)->bin_window, NULL, FALSE);
+ gdk_window_set_back_pixmap(
+ GTK_LAYOUT(view->canvas)->bin_window, NULL, FALSE);
#endif
-
book = ebook_create(view);
/* Create the control. */
@@ -253,6 +263,9 @@ addressbook_factory (BonoboGenericFactory *Factory, void *closure)
gtk_signal_connect (GTK_OBJECT (control), "activate",
control_activate_cb, NULL);
+ gtk_widget_pop_visual ();
+ gtk_widget_pop_colormap ();
+
return BONOBO_OBJECT (control);
}