[gtranslator] Make source-code-view plugin build with GSEAL
- From: Jonh Wendell <jwendell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtranslator] Make source-code-view plugin build with GSEAL
- Date: Mon, 16 Aug 2010 13:21:08 +0000 (UTC)
commit 2e592de9fba187ae1a734c67808889d3dd07fa9d
Author: Jonh Wendell <jwendell gnome org>
Date: Sat Aug 14 12:09:35 2010 -0300
Make source-code-view plugin build with GSEAL
.../source-code-view/gtr-source-code-view-plugin.c | 4 ++--
plugins/source-code-view/gtr-viewer.c | 19 ++++++++++---------
2 files changed, 12 insertions(+), 11 deletions(-)
---
diff --git a/plugins/source-code-view/gtr-source-code-view-plugin.c b/plugins/source-code-view/gtr-source-code-view-plugin.c
index 1ad8a29..9ed4ed0 100644
--- a/plugins/source-code-view/gtr-source-code-view-plugin.c
+++ b/plugins/source-code-view/gtr-source-code-view-plugin.c
@@ -368,7 +368,7 @@ motion_notify_event (GtkWidget * text_view, GdkEventMotion * event)
set_cursor_if_appropriate (GTK_TEXT_VIEW (text_view), x, y);
- gdk_window_get_pointer (text_view->window, NULL, NULL, NULL);
+ gdk_window_get_pointer (gtk_widget_get_window (text_view), NULL, NULL, NULL);
return FALSE;
}
@@ -380,7 +380,7 @@ visibility_notify_event (GtkWidget * text_view, GdkEventVisibility * event)
{
gint wx, wy, bx, by;
- gdk_window_get_pointer (text_view->window, &wx, &wy, NULL);
+ gdk_window_get_pointer (gtk_widget_get_window (text_view), &wx, &wy, NULL);
gtk_text_view_window_to_buffer_coords (GTK_TEXT_VIEW (text_view),
GTK_TEXT_WINDOW_WIDGET,
diff --git a/plugins/source-code-view/gtr-viewer.c b/plugins/source-code-view/gtr-viewer.c
index adc1f9d..d36f0d8 100644
--- a/plugins/source-code-view/gtr-viewer.c
+++ b/plugins/source-code-view/gtr-viewer.c
@@ -60,7 +60,8 @@ static void
gtr_viewer_init (GtrViewer * dlg)
{
gboolean ret;
- GtkWidget *error_widget;
+ GtkWidget *error_widget, *action_area;
+ GtkBox *content_area;
GtkWidget *sw;
gchar *path;
gchar *root_objects[] = {
@@ -79,12 +80,14 @@ gtr_viewer_init (GtrViewer * dlg)
gtk_dialog_set_has_separator (GTK_DIALOG (dlg), FALSE);
gtk_window_set_destroy_with_parent (GTK_WINDOW (dlg), TRUE);
+ action_area = gtk_dialog_get_action_area (GTK_DIALOG (dlg));
+ content_area = GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dlg)));
+
/* HIG defaults */
gtk_container_set_border_width (GTK_CONTAINER (dlg), 5);
- gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dlg)->vbox), 2); /* 2 * 5 + 2 = 12 */
- gtk_container_set_border_width (GTK_CONTAINER
- (GTK_DIALOG (dlg)->action_area), 5);
- gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dlg)->action_area), 4);
+ gtk_box_set_spacing (content_area, 2); /* 2 * 5 + 2 = 12 */
+ gtk_container_set_border_width (GTK_CONTAINER (action_area), 5);
+ gtk_box_set_spacing (GTK_BOX (action_area), 4);
g_signal_connect (dlg,
"response", G_CALLBACK (dialog_response_handler), NULL);
@@ -103,14 +106,12 @@ gtr_viewer_init (GtrViewer * dlg)
if (!ret)
{
gtk_widget_show (error_widget);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox),
- error_widget, TRUE, TRUE, 0);
+ gtk_box_pack_start (content_area, error_widget, TRUE, TRUE, 0);
return;
}
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox),
- dlg->priv->main_box, TRUE, TRUE, 0);
+ gtk_box_pack_start (content_area, dlg->priv->main_box, TRUE, TRUE, 0);
gtk_container_set_border_width (GTK_CONTAINER (dlg->priv->main_box), 5);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]