[PATCH] paned mode for gnomecard
- From: Colin Walters <levanti verbum org>
- To: calendar-list gnome org
- Subject: [PATCH] paned mode for gnomecard
- Date: 08 Jan 2000 16:12:46 -0500
The ChangeLog entry for gnomecard has:
1998-11-12 Michael Fulbright <drmike@redhat.com>
* gnomecard.c: removed hpaned for now, had very funky behavior...
But it seems to work perfectly now. Here's a patch to revert to the
(better) paned view.
--- gnomecard.c.old Sat Jan 8 04:07:07 2000
+++ gnomecard.c Sat Jan 8 04:19:50 2000
@@ -701,9 +705,9 @@
{
GtkWidget *scrollwin;
GnomeAppBar *appbar;
- GtkWidget *canvas, *hbox;
+ GtkWidget *canvas, *hpaned;
gint ncol, i, x, y;
-
+
/* hard coded column headers */
ColumnType defaulthdrs[] = {COLTYPE_CARDNAME, COLTYPE_EMAIL,
COLTYPE_ORG, COLTYPE_END};
@@ -730,17 +734,18 @@
gtk_signal_connect(GTK_OBJECT(gnomecard_window), "delete_event",
GTK_SIGNAL_FUNC(gnomecard_delete), NULL);
- hbox = gtk_hbox_new(FALSE, 0);
-/* gtk_paned_set_gutter_size (GTK_PANED (hpaned), GNOME_PAD_BIG);
- gtk_widget_show (hpaned);*/
+ /* hbox = gtk_hbox_new(FALSE, 0); */
+ hpaned = gtk_hpaned_new();
+ gtk_paned_set_gutter_size (GTK_PANED (hpaned), GNOME_PAD_BIG);
+ gtk_widget_show (hpaned);
gnome_app_create_menus(GNOME_APP(gnomecard_window), mainmenu);
gnome_app_install_menu_hints(GNOME_APP(gnomecard_window), mainmenu);
gnome_app_create_toolbar(GNOME_APP(gnomecard_window), toolbar);
- gnome_app_set_contents(GNOME_APP(gnomecard_window), hbox);
-/* gnome_app_set_contents(GNOME_APP(gnomecard_window), hpaned);*/
+ /* gnome_app_set_contents(GNOME_APP(gnomecard_window), hbox); */
+ gnome_app_set_contents(GNOME_APP(gnomecard_window), hpaned);
cardlist_scrollwin = scrollwin = gtk_scrolled_window_new(NULL, NULL);
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrollwin),
@@ -773,11 +778,13 @@
"button_press_event",
GTK_SIGNAL_FUNC(list_button_press),
NULL);
-/* gtk_widget_set_usize (scrollwin, 200, 0);*/
+
+ /* make the list display 2/3 of the display by default */
+ gtk_widget_set_usize (scrollwin, (gint) (2*x)/3, 0);
gtk_widget_show(scrollwin);
- gtk_box_pack_start(GTK_BOX(hbox), cardlist_scrollwin, TRUE, TRUE, 0);
-/* gtk_paned_pack1 (GTK_PANED (hpaned), scrollwin, TRUE, FALSE);*/
+ /* gtk_box_pack_start(GTK_BOX(hbox), cardlist_scrollwin, TRUE, TRUE, 0); */
+ gtk_paned_pack1 (GTK_PANED (hpaned), scrollwin, TRUE, TRUE);
/* add canvas */
gtk_widget_push_visual(gdk_imlib_get_visual());
@@ -788,10 +795,14 @@
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrollwin),
GTK_POLICY_ALWAYS, GTK_POLICY_ALWAYS);
gtk_container_add(GTK_CONTAINER(scrollwin), canvas);
+
+ /* make the card display 1/3 of the display by default */
+ gtk_widget_set_usize (scrollwin, (gint) x/3, 0);
gtk_widget_show(canvas);
gtk_widget_show(scrollwin);
- gtk_box_pack_start(GTK_BOX(hbox), scrollwin, FALSE, FALSE, 0);
-/* gtk_paned_pack2 (GTK_PANED (hpaned), scrollwin, TRUE, TRUE);*/
+
+ /* gtk_box_pack_start(GTK_BOX(hbox), scrollwin, FALSE, FALSE, 0); */
+ gtk_paned_pack2 (GTK_PANED (hpaned), scrollwin, TRUE, TRUE);
/* no cards yet */
gnomecard_crds = NULL;
--
Colin Walters <levanti@verbum.org>
http://web.verbum.org/levanti
(1024D/C207843A) A580 5AA1 0887 2032 7EFB 19F4 9776 6282 C207 843A
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]