]> git.sur5r.net Git - glabels/blobdiff - src/merge-properties-dialog.c
Be more specific comments for translators
[glabels] / src / merge-properties-dialog.c
index 196cdfc73cf64ddfa5f87d9c0dd1682463fce68e..064223b055e849a0186c7a74e2721f15e6e07c6f 100644 (file)
@@ -30,7 +30,6 @@
 #include "merge.h"
 #include "combo-util.h"
 #include "builder-util.h"
-#include "hig.h"
 
 #include "debug.h"
 
@@ -46,6 +45,7 @@ struct _glMergePropertiesDialogPrivate {
 
         GtkBuilder   *builder;
 
+       GtkWidget    *type_combo_hbox;
        GtkWidget    *type_combo;
        GtkWidget    *location_vbox;
        GtkWidget    *src_entry;
@@ -117,7 +117,7 @@ static void unselect_all_button_clicked_cb        (GtkWidget
 /*****************************************************************************/
 /* Boilerplate object stuff.                                                 */
 /*****************************************************************************/
-G_DEFINE_TYPE (glMergePropertiesDialog, gl_merge_properties_dialog, GTK_TYPE_DIALOG);
+G_DEFINE_TYPE (glMergePropertiesDialog, gl_merge_properties_dialog, GTK_TYPE_DIALOG)
 
 
 /*****************************************************************************/
@@ -155,9 +155,6 @@ gl_merge_properties_dialog_init (glMergePropertiesDialog *dialog)
 
         vbox = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
 
-       gtk_container_set_border_width (GTK_CONTAINER(dialog), GL_HIG_PAD1);
-
-       gtk_dialog_set_has_separator (GTK_DIALOG(dialog), FALSE);
        gtk_dialog_add_button (GTK_DIALOG (dialog),
                                GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL);
        dialog->priv->ok_button = gtk_dialog_add_button (GTK_DIALOG (dialog),
@@ -166,7 +163,7 @@ gl_merge_properties_dialog_init (glMergePropertiesDialog *dialog)
        gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
 
         builder = gtk_builder_new ();
-        builder_filename = g_build_filename (GLABELS_DATA_DIR, "builder", "merge-properties-dialog.builder", NULL);
+        builder_filename = g_build_filename (GLABELS_DATA_DIR, "ui", "merge-properties-dialog.ui", NULL);
         gtk_builder_add_objects_from_file (builder, builder_filename, object_ids, &error);
         g_free (builder_filename);
        if (error) {
@@ -177,7 +174,7 @@ gl_merge_properties_dialog_init (glMergePropertiesDialog *dialog)
 
         gl_builder_util_get_widgets (builder,
                                      "merge_properties_vbox", &merge_properties_vbox,
-                                     "type_combo",            &dialog->priv->type_combo,
+                                     "type_combo_hbox",       &dialog->priv->type_combo_hbox,
                                      "location_vbox",         &dialog->priv->location_vbox,
                                      "treeview",              &dialog->priv->treeview,
                                      "select_all_button",     &dialog->priv->select_all_button,
@@ -187,8 +184,9 @@ gl_merge_properties_dialog_init (glMergePropertiesDialog *dialog)
        gtk_container_add (GTK_CONTAINER (vbox), merge_properties_vbox);
         dialog->priv->builder = builder;
 
-       gl_combo_util_add_text_model (GTK_COMBO_BOX (dialog->priv->type_combo));
-
+        dialog->priv->type_combo = gtk_combo_box_text_new ();
+        gtk_box_pack_start (GTK_BOX (dialog->priv->type_combo_hbox), dialog->priv->type_combo, TRUE, TRUE, 0);
+       gtk_widget_show_all (GTK_WIDGET (dialog->priv->type_combo));
 
        gl_debug (DEBUG_MERGE, "END");
 }
@@ -293,11 +291,9 @@ gl_merge_properties_dialog_construct (glMergePropertiesDialog *dialog,
                        gl_debug (DEBUG_MERGE, "    \"%s\"", p->data);
                }
        }
-       gl_combo_util_set_strings (GTK_COMBO_BOX (dialog->priv->type_combo),
-                                   texts);
+       gl_combo_util_set_strings (GTK_COMBO_BOX_TEXT (dialog->priv->type_combo), texts);
        gl_merge_free_descriptions (&texts);
-       gl_combo_util_set_active_text (GTK_COMBO_BOX (dialog->priv->type_combo),
-                                       description);
+       gl_combo_util_set_active_text (GTK_COMBO_BOX (dialog->priv->type_combo), description);
        g_signal_connect (G_OBJECT (dialog->priv->type_combo), "changed",
                          G_CALLBACK (type_changed_cb), dialog);
 
@@ -401,7 +397,7 @@ type_changed_cb (GtkWidget               *widget,
 
        gl_debug (DEBUG_MERGE, "START");
 
-       description = gtk_combo_box_get_active_text (GTK_COMBO_BOX (dialog->priv->type_combo));
+       description = gtk_combo_box_text_get_active_text (GTK_COMBO_BOX_TEXT (dialog->priv->type_combo));
        name = gl_merge_description_to_name (description);
 
        src = gl_merge_get_src (dialog->priv->merge); /* keep current src if possible */
@@ -436,6 +432,10 @@ type_changed_cb (GtkWidget               *widget,
                                  G_CALLBACK (src_changed_cb), dialog);
                break;
        case GL_MERGE_SRC_IS_FIXED:
+                /* Translators: "Fixed" here means that for the given document-merge method, there are
+                 * no further choices to further define the source of data.  E.g. if you select the
+                 * evolution-data-server, there are no further choices -- the source is "Fixed."
+                 */
                dialog->priv->src_entry = gtk_label_new (_("Fixed"));
                gtk_misc_set_alignment (GTK_MISC (dialog->priv->src_entry), 0.0, 0.5);