Commit 8064872a authored by Rodney Dawes's avatar Rodney Dawes

Switch to using GtkPaned instead of EPaned for GTK2

svn path=/trunk/; revision=19444
parent 5513846c
2003-01-14 Rodney Dawes <dobey@ximian.com>
* gui/gnome-cal.c: Use GtkPaned instead of EPaned
2003-01-14 Hans Petter Jansson <hpj@ximian.com>
* gui/e-day-view.c (e_day_view_init): Work around canvas crashes
......
......@@ -34,8 +34,6 @@
#include <libgnomeui/gnome-dialog.h>
#include <libgnomeui/gnome-dialog-util.h>
#include <bonobo/bonobo-exception.h>
#include <gal/e-paned/e-hpaned.h>
#include <gal/e-paned/e-vpaned.h>
#include "e-util/e-url.h"
#include <cal-util/timeutil.h>
#include "widgets/menus/gal-view-menus.h"
......@@ -749,7 +747,7 @@ setup_widgets (GnomeCalendar *gcal)
/* The main HPaned, with the notebook of calendar views on the left
and the ECalendar and ToDo list on the right. */
priv->hpane = e_hpaned_new ();
priv->hpane = gtk_hpaned_new ();
gtk_widget_show (priv->hpane);
gtk_box_pack_start (GTK_BOX (gcal), priv->hpane, TRUE, TRUE, 0);
......@@ -758,12 +756,12 @@ setup_widgets (GnomeCalendar *gcal)
gtk_notebook_set_show_border (GTK_NOTEBOOK (priv->notebook), FALSE);
gtk_notebook_set_show_tabs (GTK_NOTEBOOK (priv->notebook), FALSE);
gtk_widget_show (priv->notebook);
e_paned_pack1 (E_PANED (priv->hpane), priv->notebook, TRUE, TRUE);
gtk_paned_pack1 (GTK_PANED (priv->hpane), priv->notebook, TRUE, TRUE);
/* The VPaned widget, to contain the GtkCalendar & ToDo list. */
priv->vpane = e_vpaned_new ();
priv->vpane = gtk_vpaned_new ();
gtk_widget_show (priv->vpane);
e_paned_pack2 (E_PANED (priv->hpane), priv->vpane, FALSE, TRUE);
gtk_paned_pack2 (GTK_PANED (priv->hpane), priv->vpane, FALSE, TRUE);
/* The ECalendar. */
w = e_calendar_new ();
......@@ -775,7 +773,7 @@ setup_widgets (GnomeCalendar *gcal)
(ECalendarItemGetTimeCallback) get_current_time,
gcal, NULL);
e_paned_pack1 (E_PANED (priv->vpane), w, FALSE, TRUE);
gtk_paned_pack1 (GTK_PANED (priv->vpane), w, FALSE, TRUE);
g_signal_connect (priv->date_navigator, "style_set",
G_CALLBACK (gnome_calendar_on_date_navigator_style_set), gcal);
g_signal_connect_after (priv->date_navigator, "size_allocate",
......@@ -790,7 +788,7 @@ setup_widgets (GnomeCalendar *gcal)
calendar_config_configure_e_calendar_table (E_CALENDAR_TABLE (priv->todo));
model = e_calendar_table_get_model (E_CALENDAR_TABLE (priv->todo));
calendar_model_set_new_comp_vtype (model, CAL_COMPONENT_TODO);
e_paned_pack2 (E_PANED (priv->vpane), priv->todo, TRUE, TRUE);
gtk_paned_pack2 (GTK_PANED (priv->vpane), priv->todo, TRUE, TRUE);
gtk_widget_show (priv->todo);
filename = g_strdup_printf ("%s/config/TaskPad", evolution_dir);
......@@ -1484,8 +1482,8 @@ gnome_calendar_set_pane_positions (GnomeCalendar *gcal)
top_pane_height = (top_pane_height * (row_height + top_border + bottom_border)
+ 0.5);
e_paned_set_position (E_PANED (priv->hpane), -1);
e_paned_set_position (E_PANED (priv->vpane), -1);
gtk_paned_set_position (GTK_PANED (priv->hpane), -1);
gtk_paned_set_position (GTK_PANED (priv->vpane), -1);
/* We add one to each dimension since we can't use 0. */
......
2003-01-14 Rodney Dawes <dobey@ximian.com>
* folder-browser.c: Use GtkPaned instead of EPaned
2003-01-13 Jeffrey Stedfast <fejj@ximian.com>
* mail-config.c (account_new_from_xml): Perform some sanity
......
......@@ -31,7 +31,6 @@
#include <gdk/gdkkeysyms.h>
#include <gtk/gtkinvisible.h>
#include <gal/e-paned/e-vpaned.h>
#include <gal/e-table/e-table.h>
#include <gal/util/e-util.h>
#include <gal/widgets/e-gui-utils.h>
......@@ -1145,12 +1144,12 @@ folder_browser_set_message_preview (FolderBrowser *folder_browser, gboolean show
if (show_preview) {
y = save_cursor_pos (folder_browser);
e_paned_set_position (E_PANED (folder_browser->vpaned), paned_size);
gtk_paned_set_position (GTK_PANED (folder_browser->vpaned), paned_size);
gtk_widget_show (GTK_WIDGET (folder_browser->mail_display));
do_message_selected (folder_browser);
set_cursor_pos (folder_browser, y);
} else {
e_paned_set_position (E_PANED (folder_browser->vpaned), 10000);
gtk_paned_set_position (GTK_PANED (folder_browser->vpaned), 10000);
gtk_widget_hide (GTK_WIDGET (folder_browser->mail_display));
mail_display_set_message (folder_browser->mail_display, NULL, NULL, NULL);
folder_browser_ui_message_loaded (folder_browser);
......@@ -2357,7 +2356,7 @@ paned_size_changed (GConfClient *client, guint cnxn_id, GConfEntry *entry, gpoin
g_signal_handler_block (fb->message_list, fb->paned_resize_id);
paned_size = gconf_client_get_int (client, "/apps/evolution/mail/display/paned_size", NULL);
e_paned_set_position (E_PANED (fb->vpaned), paned_size);
gtk_paned_set_position (GTK_PANED (fb->vpaned), paned_size);
g_signal_handler_unblock (fb->message_list, fb->paned_resize_id);
}
......@@ -2413,7 +2412,7 @@ folder_browser_gui_init (FolderBrowser *fb)
int paned_size;
/* The panned container */
fb->vpaned = e_vpaned_new ();
fb->vpaned = gtk_vpaned_new ();
gtk_widget_show (fb->vpaned);
gtk_table_attach (GTK_TABLE (fb), fb->vpaned,
......@@ -2452,7 +2451,7 @@ folder_browser_gui_init (FolderBrowser *fb)
g_signal_connect (esm, "cursor_activated", G_CALLBACK (on_cursor_activated), fb);
fb->selection_state = FB_SELSTATE_NONE; /* default to none */
e_paned_add1 (E_PANED (fb->vpaned), GTK_WIDGET (fb->message_list));
gtk_paned_add1 (GTK_PANED (fb->vpaned), GTK_WIDGET (fb->message_list));
gtk_widget_show (GTK_WIDGET (fb->message_list));
fb->paned_resize_id = g_signal_connect (fb->message_list, "size_allocate",
......@@ -2489,8 +2488,8 @@ folder_browser_gui_init (FolderBrowser *fb)
paned_size_changed, fb, NULL, NULL);
paned_size = gconf_client_get_int (gconf, "/apps/evolution/mail/display/paned_size", NULL);
e_paned_add2 (E_PANED (fb->vpaned), GTK_WIDGET (fb->mail_display));
e_paned_set_position (E_PANED (fb->vpaned), paned_size);
gtk_paned_add2 (GTK_PANED (fb->vpaned), GTK_WIDGET (fb->mail_display));
gtk_paned_set_position (GTK_PANED (fb->vpaned), paned_size);
gtk_widget_show (GTK_WIDGET (fb->mail_display));
gtk_widget_show (GTK_WIDGET (fb));
}
......
2003-01-14 Rodney Dawes <dobey@ximian.com>
* e-shell-view.c: Use GtkPaned instead of EPaned
2003-01-13 Dan Winship <danw@ximian.com>
* s/BonoboXObject/BonoboObject/ (for BONOBO_DISABLE_DEPRECATED)
......
......@@ -73,7 +73,6 @@
#include <bonobo/bonobo-widget.h>
#include <bonobo/bonobo-window.h>
#include <gal/e-paned/e-hpaned.h>
#include <gal/util/e-util.h>
#include <gal/widgets/e-gui-utils.h>
#include <gal/widgets/e-scroll-frame.h>
......@@ -415,12 +414,12 @@ setup_defaults (EShellView *shell_view)
width = gconf_client_get_int (client, "/apps/evolution/shell/view_defaults/shortcut_bar/width", NULL);
if (priv->shortcut_bar_shown)
e_paned_set_position (E_PANED (priv->hpaned), width);
gtk_paned_set_position (GTK_PANED (priv->hpaned), width);
priv->hpaned_position = width;
width = gconf_client_get_int (client, "/apps/evolution/shell/view_defaults/folder_bar/width", NULL);
if (priv->folder_bar_shown)
e_paned_set_position (E_PANED (priv->view_hpaned), width);
gtk_paned_set_position (GTK_PANED (priv->view_hpaned), width);
priv->view_hpaned_position = width;
icon_types_list = gconf_client_get_list (client, "/apps/evolution/shell/view_defaults/shortcut_bar/icon_types",
......@@ -652,7 +651,7 @@ reparent_storage_set_view_box_and_destroy_popup (EShellView *shell_view)
gtk_widget_ref (priv->storage_set_view_box);
gtk_container_remove (GTK_CONTAINER (priv->folder_bar_popup), priv->storage_set_view_box);
e_paned_pack1 (E_PANED (priv->view_hpaned), priv->storage_set_view_box, FALSE, FALSE);
gtk_paned_pack1 (GTK_PANED (priv->view_hpaned), priv->storage_set_view_box, FALSE, FALSE);
gtk_widget_unref (priv->storage_set_view_box);
gtk_widget_destroy (priv->folder_bar_popup);
......@@ -695,7 +694,7 @@ storage_set_view_box_button_release_event_cb (GtkWidget *widget,
shell_view = E_SHELL_VIEW (data);
priv = shell_view->priv;
if (button_event->window == E_PANED (priv->view_hpaned)->handle
if (button_event->window == GTK_PANED (priv->view_hpaned)->handle
|| button_event->button != 1)
return FALSE;
......@@ -1326,9 +1325,9 @@ setup_widgets (EShellView *shell_view)
g_signal_connect (priv->folder_title_bar, "forward_clicked",
G_CALLBACK (forward_clicked_callback), shell_view);
priv->view_hpaned = e_hpaned_new ();
e_paned_pack1 (E_PANED (priv->view_hpaned), priv->storage_set_view_box, FALSE, FALSE);
e_paned_pack2 (E_PANED (priv->view_hpaned), priv->notebook, TRUE, FALSE);
priv->view_hpaned = gtk_hpaned_new ();
gtk_paned_pack1 (GTK_PANED (priv->view_hpaned), priv->storage_set_view_box, FALSE, FALSE);
gtk_paned_pack2 (GTK_PANED (priv->view_hpaned), priv->notebook, TRUE, FALSE);
gray_bar = e_gray_bar_new ();
gtk_container_add (GTK_CONTAINER (gray_bar), priv->folder_title_bar);
......@@ -1336,11 +1335,11 @@ setup_widgets (EShellView *shell_view)
gtk_box_pack_start (GTK_BOX (priv->view_vbox), priv->view_hpaned, TRUE, TRUE, 0);
priv->hpaned = e_hpaned_new ();
priv->hpaned = gtk_hpaned_new ();
gtk_container_add (GTK_CONTAINER (priv->shortcut_frame), priv->shortcut_bar);
e_paned_pack1 (E_PANED (priv->hpaned), priv->shortcut_frame, FALSE, FALSE);
e_paned_pack2 (E_PANED (priv->hpaned), priv->view_vbox, TRUE, FALSE);
e_paned_set_position (E_PANED (priv->hpaned), DEFAULT_SHORTCUT_BAR_WIDTH);
gtk_paned_pack1 (GTK_PANED (priv->hpaned), priv->shortcut_frame, FALSE, FALSE);
gtk_paned_pack2 (GTK_PANED (priv->hpaned), priv->view_vbox, TRUE, FALSE);
gtk_paned_set_position (GTK_PANED (priv->hpaned), DEFAULT_SHORTCUT_BAR_WIDTH);
/* The status bar. */
......@@ -2505,16 +2504,16 @@ e_shell_view_show_shortcut_bar (EShellView *shell_view,
if (show) {
if (! GTK_WIDGET_VISIBLE (priv->shortcut_frame)) {
gtk_widget_show (priv->shortcut_frame);
e_paned_set_position (E_PANED (priv->hpaned), priv->hpaned_position);
gtk_paned_set_position (GTK_PANED (priv->hpaned), priv->hpaned_position);
}
} else {
if (GTK_WIDGET_VISIBLE (priv->shortcut_frame)) {
/* FIXME this is a private field! */
priv->hpaned_position = E_PANED (priv->hpaned)->child1_size;
priv->hpaned_position = GTK_PANED (priv->hpaned)->child1_size;
gtk_widget_hide (priv->shortcut_frame);
}
e_paned_set_position (E_PANED (priv->hpaned), 0);
gtk_paned_set_position (GTK_PANED (priv->hpaned), 0);
}
priv->shortcut_bar_shown = !! show;
......@@ -2539,7 +2538,7 @@ e_shell_view_show_folder_bar (EShellView *shell_view,
if (show) {
gtk_widget_show (priv->storage_set_view_box);
e_paned_set_position (E_PANED (priv->view_hpaned), priv->view_hpaned_position);
gtk_paned_set_position (GTK_PANED (priv->view_hpaned), priv->view_hpaned_position);
e_title_bar_set_button_mode (E_TITLE_BAR (priv->storage_set_title_bar),
E_TITLE_BAR_BUTTON_MODE_CLOSE);
......@@ -2549,11 +2548,11 @@ e_shell_view_show_folder_bar (EShellView *shell_view,
} else {
if (GTK_WIDGET_VISIBLE (priv->storage_set_view_box)) {
/* FIXME this is a private field! */
priv->view_hpaned_position = E_PANED (priv->view_hpaned)->child1_size;
priv->view_hpaned_position = GTK_PANED (priv->view_hpaned)->child1_size;
gtk_widget_hide (priv->storage_set_view_box);
}
e_paned_set_position (E_PANED (priv->view_hpaned), 0);
gtk_paned_set_position (GTK_PANED (priv->view_hpaned), 0);
e_title_bar_set_button_mode (E_TITLE_BAR (priv->storage_set_title_bar),
E_TITLE_BAR_BUTTON_MODE_PIN);
......@@ -2788,14 +2787,14 @@ e_shell_view_save_defaults (EShellView *shell_view)
if (priv->shortcut_bar_shown)
gconf_client_set_int (client, "/apps/evolution/shell/view_defaults/shortcut_bar/width",
E_PANED (priv->hpaned)->child1_size, NULL);
GTK_PANED (priv->hpaned)->child1_size, NULL);
else
gconf_client_set_int (client, "/apps/evolution/shell/view_defaults/shortcut_bar/width",
priv->hpaned_position, NULL);
if (priv->folder_bar_shown)
gconf_client_set_int (client, "/apps/evolution/shell/view_defaults/folder_bar/width",
E_PANED (priv->view_hpaned)->child1_size, NULL);
GTK_PANED (priv->view_hpaned)->child1_size, NULL);
else
gconf_client_set_int (client, "/apps/evolution/shell/view_defaults/folder_bar/width",
priv->view_hpaned_position, NULL);
......
......@@ -36,8 +36,6 @@
#include <libgnorba/gnorba.h>
#include <bonobo/bonobo-stream-memory.h>
#include <widgets/e-paned/e-hpaned.h>
static void
print_usage_and_quit()
{
......@@ -793,15 +791,15 @@ main (int argc, char *argv[])
}
}
hpane = e_hpaned_new();
hpane = gtk_hpaned_new();
/* add the tree control view of the message*/
tree_ctrl_window = get_message_tree_ctrl (message);
e_paned_add1 (E_PANED (hpane), tree_ctrl_window);
gtk_paned_add1 (GTK_PANED (hpane), tree_ctrl_window);
/* add the HTML view of the message */
html_window = get_gtk_html_window (message);
e_paned_add2 (E_PANED (hpane), html_window);
gtk_paned_add2 (GTK_PANED (hpane), html_window);
/* rock n roll */
gnome_app_set_contents (GNOME_APP (app),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment