[gtranslator] Make dialogs build with GSEAL



commit e423bdb1113534eef763ef6ed0630f2b2c882684
Author: Jonh Wendell <jwendell gnome org>
Date:   Sat Aug 14 11:47:39 2010 -0300

    Make dialogs build with GSEAL

 src/dialogs/gtr-close-confirmation-dialog.c |    6 +++---
 src/dialogs/gtr-header-dialog.c             |   19 ++++++++++---------
 src/dialogs/gtr-jump-dialog.c               |   19 ++++++++++---------
 src/dialogs/gtr-preferences-dialog.c        |   19 ++++++++++---------
 src/dialogs/gtr-profile-dialog.c            |   19 ++++++++++---------
 src/dialogs/gtr-search-dialog.c             |   19 ++++++++++---------
 6 files changed, 53 insertions(+), 48 deletions(-)
---
diff --git a/src/dialogs/gtr-close-confirmation-dialog.c b/src/dialogs/gtr-close-confirmation-dialog.c
index 63cdb63..0db434c 100644
--- a/src/dialogs/gtr-close-confirmation-dialog.c
+++ b/src/dialogs/gtr-close-confirmation-dialog.c
@@ -142,7 +142,7 @@ gtr_close_confirmation_dialog_init (GtrCloseConfirmationDialog * dlg)
   dlg->priv = GTR_CLOSE_CONFIRMATION_DIALOG_GET_PRIVATE (dlg);
 
   gtk_container_set_border_width (GTK_CONTAINER (dlg), 5);
-  gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dlg)->vbox), 14);
+  gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dlg))), 14);
   gtk_window_set_resizable (GTK_WINDOW (dlg), FALSE);
   gtk_dialog_set_has_separator (GTK_DIALOG (dlg), FALSE);
   gtk_window_set_skip_taskbar_hint (GTK_WINDOW (dlg), TRUE);
@@ -392,7 +392,7 @@ build_single_doc_dialog (GtrCloseConfirmationDialog * dlg)
 
   gtk_box_pack_start (GTK_BOX (vbox), primary_label, FALSE, FALSE, 0);
 
-  gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox),
+  gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dlg))),
                       hbox, FALSE, FALSE, 0);
 
   gtk_widget_show_all (hbox);
@@ -511,7 +511,7 @@ build_multiple_docs_dialog (GtrCloseConfirmationDialog * dlg)
 
   hbox = gtk_hbox_new (FALSE, 12);
   gtk_container_set_border_width (GTK_CONTAINER (hbox), 5);
-  gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox), hbox, TRUE, TRUE, 0);
+  gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dlg))), hbox, TRUE, TRUE, 0);
 
   /* Image */
   image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_WARNING,
diff --git a/src/dialogs/gtr-header-dialog.c b/src/dialogs/gtr-header-dialog.c
index dedd404..72918dc 100644
--- a/src/dialogs/gtr-header-dialog.c
+++ b/src/dialogs/gtr-header-dialog.c
@@ -221,7 +221,8 @@ static void
 gtr_header_dialog_init (GtrHeaderDialog * dlg)
 {
   gboolean ret;
-  GtkWidget *error_widget;
+  GtkWidget *error_widget, *action_area;
+  GtkBox *content_area;
   gchar *path;
   gchar *root_objects[] = {
     "main_box",
@@ -238,11 +239,13 @@ gtr_header_dialog_init (GtrHeaderDialog * 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)));
+
   gtk_container_set_border_width (GTK_CONTAINER (dlg), 5);
-  gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dlg)->vbox), 2);
-  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);
+  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 (gtk_widget_destroy), NULL);
 
@@ -276,14 +279,12 @@ gtr_header_dialog_init (GtrHeaderDialog * 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, FALSE, FALSE, 0);
+  gtk_box_pack_start (content_area, dlg->priv->main_box, FALSE, FALSE, 0);
 
   gtk_container_set_border_width (GTK_CONTAINER (dlg->priv->notebook), 5);
 
diff --git a/src/dialogs/gtr-jump-dialog.c b/src/dialogs/gtr-jump-dialog.c
index b6edb11..f9bf92b 100644
--- a/src/dialogs/gtr-jump-dialog.c
+++ b/src/dialogs/gtr-jump-dialog.c
@@ -73,7 +73,8 @@ static void
 gtr_jump_dialog_init (GtrJumpDialog * dlg)
 {
   gboolean ret;
-  GtkWidget *error_widget;
+  GtkWidget *error_widget, *action_area;
+  GtkBox *content_area;
   gchar *path;
   gchar *root_objects[] = {
     "adjustment1",
@@ -94,12 +95,14 @@ gtr_jump_dialog_init (GtrJumpDialog * 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);
 
   gtk_dialog_set_default_response (GTK_DIALOG (dlg), GTK_RESPONSE_OK);
 
@@ -118,14 +121,12 @@ gtr_jump_dialog_init (GtrJumpDialog * 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);
 }
diff --git a/src/dialogs/gtr-preferences-dialog.c b/src/dialogs/gtr-preferences-dialog.c
index aa154b4..8345a88 100644
--- a/src/dialogs/gtr-preferences-dialog.c
+++ b/src/dialogs/gtr-preferences-dialog.c
@@ -1168,7 +1168,8 @@ static void
 gtr_preferences_dialog_init (GtrPreferencesDialog * dlg)
 {
   gboolean ret;
-  GtkWidget *error_widget;
+  GtkWidget *error_widget, *action_area;
+  GtkBox *content_area;
   gchar *root_objects[] = {
     "notebook",
     "adjustment1",
@@ -1191,12 +1192,14 @@ gtr_preferences_dialog_init (GtrPreferencesDialog * 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);
@@ -1264,16 +1267,14 @@ gtr_preferences_dialog_init (GtrPreferencesDialog * 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->notebook, FALSE, FALSE, 0);
+  gtk_box_pack_start (content_area, dlg->priv->notebook, FALSE, FALSE, 0);
 
   gtk_container_set_border_width (GTK_CONTAINER (dlg->priv->notebook), 5);
 
diff --git a/src/dialogs/gtr-profile-dialog.c b/src/dialogs/gtr-profile-dialog.c
index df44ea4..e739521 100644
--- a/src/dialogs/gtr-profile-dialog.c
+++ b/src/dialogs/gtr-profile-dialog.c
@@ -69,7 +69,8 @@ static void
 gtr_profile_dialog_init (GtrProfileDialog *dlg)
 {
   gboolean ret;
-  GtkWidget *error_widget;
+  GtkWidget *error_widget, *action_area;
+  GtkBox *content_area;
   gchar *path;
   gchar *root_objects[] = {
     "profiles_dialog",
@@ -88,12 +89,14 @@ gtr_profile_dialog_init (GtrProfileDialog *dlg)
   gtk_window_set_destroy_with_parent (GTK_WINDOW (dlg), TRUE);
   gtk_window_set_modal (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);
 
   path = gtr_dirs_get_ui_file ("gtr-profile-dialog.ui");
   ret = gtr_utils_get_ui_objects (path,
@@ -124,14 +127,12 @@ gtr_profile_dialog_init (GtrProfileDialog *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, FALSE, FALSE, 0);
+  gtk_box_pack_start (content_area, dlg->priv->main_box, FALSE, FALSE, 0);
 }
 
 static void
diff --git a/src/dialogs/gtr-search-dialog.c b/src/dialogs/gtr-search-dialog.c
index 6385d8c..04f3bea 100644
--- a/src/dialogs/gtr-search-dialog.c
+++ b/src/dialogs/gtr-search-dialog.c
@@ -359,7 +359,8 @@ static void
 gtr_search_dialog_init (GtrSearchDialog * dlg)
 {
   GtkWidget *content;
-  GtkWidget *error_widget;
+  GtkWidget *error_widget, *action_area;
+  GtkBox *content_area;
   gboolean ret;
   gchar *path;
   gchar *root_objects[] = {
@@ -376,12 +377,14 @@ gtr_search_dialog_init (GtrSearchDialog * dlg)
   gtk_dialog_add_buttons (GTK_DIALOG (dlg),
                           GTK_STOCK_CLOSE, GTK_RESPONSE_CANCEL, NULL);
 
+  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), 6);
+  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), 6);
 
   path = gtr_dirs_get_ui_file ("gtr-search-dialog.ui");
   ret = gtr_utils_get_ui_objects (path,
@@ -413,8 +416,7 @@ gtr_search_dialog_init (GtrSearchDialog * dlg)
     {
       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);
 
       gtk_container_set_border_width (GTK_CONTAINER (error_widget), 5);
 
@@ -490,8 +492,7 @@ gtr_search_dialog_init (GtrSearchDialog * dlg)
                                      GTR_SEARCH_DIALOG_REPLACE_ALL_RESPONSE,
                                      FALSE);
 
-  gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox),
-                      content, FALSE, FALSE, 0);
+  gtk_box_pack_start (content_area, content, FALSE, FALSE, 0);
   gtk_container_set_border_width (GTK_CONTAINER (content), 5);
 
   g_signal_connect (dlg->priv->search_text_entry,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]