#include "merge.h"
#include "combo-util.h"
#include "builder-util.h"
-#include "hig.h"
#include "debug.h"
GtkBuilder *builder;
+ GtkWidget *type_combo_hbox;
GtkWidget *type_combo;
GtkWidget *location_vbox;
GtkWidget *src_entry;
/*****************************************************************************/
/* 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)
/*****************************************************************************/
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),
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) {
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,
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");
}
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);
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 */
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);