Make changes for Gtk3 compatibility

This commit is contained in:
Robert Fewell 2017-12-04 14:25:02 +00:00
parent b94b2f8ac2
commit 5b02021550
3 changed files with 131 additions and 156 deletions

View File

@ -503,10 +503,12 @@ CsvImpPriceAssist::CsvImpPriceAssist ()
file_chooser = gtk_file_chooser_widget_new (GTK_FILE_CHOOSER_ACTION_OPEN);
g_signal_connect (G_OBJECT(file_chooser), "file-activated",
G_CALLBACK(csv_price_imp_file_confirm_cb), this);
auto button = gtk_button_new_from_stock (GTK_STOCK_OK);
auto button = gtk_button_new_with_label (_("OK"));
gtk_widget_set_size_request (button, 100, -1);
gtk_widget_show (button);
auto h_box = gtk_hbox_new (TRUE, 0);
auto h_box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_box_set_homogeneous (GTK_BOX (h_box), TRUE);
gtk_widget_set_hexpand (GTK_WIDGET(h_box), TRUE);
gtk_box_pack_start (GTK_BOX(h_box), button, FALSE, FALSE, 0);
gtk_file_chooser_set_extra_widget (GTK_FILE_CHOOSER(file_chooser), h_box);
g_signal_connect (G_OBJECT(button), "clicked",
@ -792,7 +794,9 @@ CsvImpPriceAssist::preview_settings_name (GtkEntry* entry)
if (text)
price_imp->settings_name(text);
auto combo = gtk_widget_get_parent (GTK_WIDGET(entry));
auto box = gtk_widget_get_parent (GTK_WIDGET(entry));
auto combo = gtk_widget_get_parent (GTK_WIDGET(box));
preview_handle_save_del_sensitivity (GTK_COMBO_BOX(combo));
}
@ -1239,11 +1243,11 @@ enum
static GnumericPopupMenuElement const popup_elements[] =
{
{
N_("Merge with column on _left"), GTK_STOCK_REMOVE,
N_("Merge with column on _left"), "list-remove",
0, 1 << CONTEXT_STF_IMPORT_MERGE_LEFT, CONTEXT_STF_IMPORT_MERGE_LEFT
},
{
N_("Merge with column on _right"), GTK_STOCK_REMOVE,
N_("Merge with column on _right"), "list-remove",
0, 1 << CONTEXT_STF_IMPORT_MERGE_RIGHT, CONTEXT_STF_IMPORT_MERGE_RIGHT
},
{ "", nullptr, 0, 0, 0 },
@ -1253,11 +1257,11 @@ static GnumericPopupMenuElement const popup_elements[] =
},
{ "", nullptr, 0, 0, 0 },
{
N_("_Widen this column"), GTK_STOCK_GO_FORWARD,
N_("_Widen this column"), "go-next",
0, 1 << CONTEXT_STF_IMPORT_WIDEN, CONTEXT_STF_IMPORT_WIDEN
},
{
N_("_Narrow this column"), GTK_STOCK_GO_BACK,
N_("_Narrow this column"), "go-previous",
0, 1 << CONTEXT_STF_IMPORT_NARROW, CONTEXT_STF_IMPORT_NARROW
},
{ nullptr, nullptr, 0, 0, 0 },
@ -1429,7 +1433,7 @@ CsvImpPriceAssist::preview_row_fill_state_cells (GtkListStore *store, GtkTreeIte
fcolor = "black";
bcolor = "pink";
c_err_msg = err_msg.c_str();
icon_name = GTK_STOCK_DIALOG_ERROR;
icon_name = "dialog-error";
}
gtk_list_store_set (store, iter,
PREV_COL_FCOLOR, fcolor,
@ -1480,13 +1484,13 @@ void
CsvImpPriceAssist::preview_style_column (uint32_t col_num, GtkTreeModel* model)
{
auto col = gtk_tree_view_get_column (treeview, col_num);
auto renderer = static_cast<GtkCellRenderer*>(gtk_tree_view_column_get_cell_renderers(col)->data);
auto renderer = static_cast<GtkCellRenderer*>(gtk_cell_layout_get_cells(GTK_CELL_LAYOUT(col))->data);
/* First column -the error status column- is rendered differently */
if (col_num == 0)
{
gtk_tree_view_column_set_attributes (col, renderer,
"stock-id", PREV_COL_ERR_ICON,
"icon-name", PREV_COL_ERR_ICON,
"cell-background", PREV_COL_BCOLOR, nullptr);
g_object_set (G_OBJECT(renderer), "stock-size", GTK_ICON_SIZE_MENU, nullptr);
g_object_set (G_OBJECT(col), "sizing", GTK_TREE_VIEW_COLUMN_FIXED,

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.20.0 -->
<interface>
<requires lib="gtk+" version="2.24"/>
<!-- interface-naming-policy project-wide -->
<requires lib="gtk+" version="3.10"/>
<object class="GtkAdjustment" id="end_row_adj">
<property name="upper">1000</property>
<property name="step_increment">1</property>
@ -38,11 +38,11 @@
<property name="title" translatable="yes">CSV Price Import</property>
<property name="default_width">400</property>
<property name="default_height">500</property>
<signal name="apply" handler="csv_price_imp_assist_finish_cb" swapped="no"/>
<signal name="cancel" handler="csv_price_imp_assist_cancel_cb" swapped="no"/>
<signal name="close" handler="csv_price_imp_assist_close_cb" swapped="no"/>
<signal name="destroy" handler="csv_price_imp_assist_destroy_cb" swapped="no"/>
<signal name="apply" handler="csv_price_imp_assist_finish_cb" swapped="no"/>
<signal name="prepare" handler="csv_price_imp_assist_prepare_cb" swapped="no"/>
<signal name="cancel" handler="csv_price_imp_assist_cancel_cb" swapped="no"/>
<child>
<placeholder/>
</child>
@ -76,10 +76,11 @@ Click on 'Forward' to proceed or 'Cancel' to Abort Import.</property>
</packing>
</child>
<child>
<object class="GtkVBox" id="file_page">
<object class="GtkBox" id="file_page">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">12</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkLabel" id="label7">
<property name="visible">True</property>
@ -101,20 +102,19 @@ Select location and file name for the Import, then click 'OK'...
</packing>
</child>
<child>
<object class="GtkVBox" id="preview_page">
<object class="GtkBox" id="preview_page">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="border_width">12</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<child>
<object class="GtkTable" id="table1">
<object class="GtkGrid" id="table1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="n_rows">2</property>
<property name="n_columns">2</property>
<property name="column_spacing">5</property>
<property name="row_spacing">5</property>
<property name="column_spacing">5</property>
<child>
<object class="GtkFrame" id="frame6">
<property name="visible">True</property>
@ -129,7 +129,7 @@ Select location and file name for the Import, then click 'OK'...
<property name="left_padding">5</property>
<property name="right_padding">5</property>
<child>
<object class="GtkHBox" id="combo_hbox">
<object class="GtkBox" id="combo_hbox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
@ -143,7 +143,7 @@ Select location and file name for the Import, then click 'OK'...
<object class="GtkImage" id="image2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-delete</property>
<property name="icon_name">edit-delete</property>
</object>
</child>
</object>
@ -165,7 +165,7 @@ Select location and file name for the Import, then click 'OK'...
<object class="GtkImage" id="image1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-save</property>
<property name="icon_name">document-save</property>
</object>
</child>
</object>
@ -184,6 +184,7 @@ Select location and file name for the Import, then click 'OK'...
<object class="GtkLabel" id="label12">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes"> &lt;b&gt;Load and Save Settings&lt;/b&gt;</property>
<property name="use_markup">True</property>
<property name="track_visited_links">False</property>
@ -191,8 +192,8 @@ Select location and file name for the Import, then click 'OK'...
</child>
</object>
<packing>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
@ -210,15 +211,14 @@ Select location and file name for the Import, then click 'OK'...
<property name="left_padding">5</property>
<property name="right_padding">5</property>
<child>
<object class="GtkVBox" id="vbox1">
<object class="GtkBox" id="vbox1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkTable" id="table4">
<object class="GtkGrid" id="table4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="n_rows">2</property>
<property name="n_columns">2</property>
<child>
<object class="GtkRadioButton" id="csv_button">
<property name="label" translatable="yes">Separators</property>
@ -226,10 +226,15 @@ Select location and file name for the Import, then click 'OK'...
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="halign">start</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="csv_price_imp_preview_sep_fixed_sel_cb" swapped="no"/>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="fixed_button">
@ -238,24 +243,24 @@ Select location and file name for the Import, then click 'OK'...
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="halign">start</property>
<property name="draw_indicator">True</property>
<property name="group">csv_button</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkHSeparator" id="hseparator1">
<object class="GtkSeparator" id="hseparator1">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="right_attach">2</property>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="y_options">GTK_FILL</property>
<property name="width">2</property>
</packing>
</child>
</object>
@ -266,12 +271,10 @@ Select location and file name for the Import, then click 'OK'...
</packing>
</child>
<child>
<object class="GtkTable" id="separator_table">
<object class="GtkGrid" id="separator_table">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="n_rows">3</property>
<property name="n_columns">3</property>
<property name="column_spacing">3</property>
<child>
<object class="GtkCheckButton" id="space_cbutton">
@ -280,12 +283,13 @@ Select location and file name for the Import, then click 'OK'...
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="halign">start</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="csv_price_imp_preview_sep_button_cb" swapped="no"/>
</object>
<packing>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
@ -295,14 +299,13 @@ Select location and file name for the Import, then click 'OK'...
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="halign">start</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="csv_price_imp_preview_sep_button_cb" swapped="no"/>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
@ -312,15 +315,14 @@ Select location and file name for the Import, then click 'OK'...
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="halign">start</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="csv_price_imp_preview_sep_button_cb" swapped="no"/>
</object>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
@ -330,14 +332,13 @@ Select location and file name for the Import, then click 'OK'...
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="halign">start</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="csv_price_imp_preview_sep_button_cb" swapped="no"/>
</object>
<packing>
<property name="left_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
@ -347,16 +348,13 @@ Select location and file name for the Import, then click 'OK'...
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="halign">start</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="csv_price_imp_preview_sep_button_cb" swapped="no"/>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
@ -366,16 +364,13 @@ Select location and file name for the Import, then click 'OK'...
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="halign">start</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="csv_price_imp_preview_sep_button_cb" swapped="no"/>
</object>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
<property name="left_attach">1</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
@ -385,14 +380,13 @@ Select location and file name for the Import, then click 'OK'...
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="halign">start</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="csv_price_imp_preview_sep_button_cb" swapped="no"/>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
@ -401,22 +395,18 @@ Select location and file name for the Import, then click 'OK'...
<property name="can_focus">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="invisible_char">●</property>
<property name="invisible_char_set">True</property>
<property name="primary_icon_activatable">False</property>
<property name="secondary_icon_activatable">False</property>
<property name="primary_icon_sensitive">True</property>
<property name="secondary_icon_sensitive">True</property>
<signal name="changed" handler="csv_price_imp_preview_sep_button_cb" swapped="no"/>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">3</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">False</property>
@ -425,7 +415,7 @@ Select location and file name for the Import, then click 'OK'...
</packing>
</child>
<child>
<object class="GtkHBox" id="fw_instructions_hbox">
<object class="GtkBox" id="fw_instructions_hbox">
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
<child>
@ -433,8 +423,7 @@ Select location and file name for the Import, then click 'OK'...
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="yalign">0</property>
<property name="stock">gtk-dialog-info</property>
<property name="icon_name">dialog-information</property>
</object>
<packing>
<property name="expand">False</property>
@ -444,67 +433,61 @@ Select location and file name for the Import, then click 'OK'...
</packing>
</child>
<child>
<object class="GtkTable" id="table2">
<object class="GtkGrid" id="table2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="n_rows">2</property>
<property name="n_columns">2</property>
<child>
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="yalign">0</property>
<property name="xpad">5</property>
<property name="label" translatable="yes">•</property>
<property name="use_markup">True</property>
<property name="wrap">True</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="halign">start</property>
<property name="label" translatable="yes">Double-click anywhere on the table below to insert a column break</property>
<property name="use_markup">True</property>
<property name="wrap">True</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="y_options"/>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="yalign">0</property>
<property name="xpad">5</property>
<property name="label" translatable="yes">•</property>
<property name="use_markup">True</property>
<property name="wrap">True</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label5">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="halign">start</property>
<property name="label" translatable="yes">Right-click anywhere in a column to modify it (widen, narrow, merge)</property>
<property name="use_markup">True</property>
<property name="wrap">True</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="y_options"/>
</packing>
</child>
</object>
@ -522,17 +505,17 @@ Select location and file name for the Import, then click 'OK'...
</packing>
</child>
<child>
<object class="GtkTable" id="table5">
<object class="GtkGrid" id="table5">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="n_rows">2</property>
<child>
<object class="GtkHSeparator" id="hseparator4">
<object class="GtkSeparator" id="hseparator4">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="y_options">GTK_FILL</property>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
@ -540,15 +523,15 @@ Select location and file name for the Import, then click 'OK'...
<property name="label" translatable="yes">Allow existing prices to be over written.</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="focus_on_click">False</property>
<property name="receives_default">False</property>
<property name="tooltip_text" translatable="yes">Normally prices are not over written, select this to change that. This setting is not saved.</property>
<property name="focus_on_click">False</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="csv_price_imp_preview_overwrite_cb" swapped="no"/>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
</packing>
</child>
</object>
@ -567,16 +550,15 @@ Select location and file name for the Import, then click 'OK'...
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="halign">start</property>
<property name="label" translatable="yes">&lt;b&gt;File Format&lt;/b&gt;</property>
<property name="use_markup">True</property>
</object>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
@ -592,18 +574,17 @@ Select location and file name for the Import, then click 'OK'...
<property name="left_padding">5</property>
<property name="right_padding">5</property>
<child>
<object class="GtkVBox" id="vbox6">
<object class="GtkBox" id="vbox6">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkTable" id="table3">
<object class="GtkGrid" id="table3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="n_rows">6</property>
<property name="n_columns">2</property>
<property name="column_spacing">5</property>
<property name="row_spacing">5</property>
<property name="column_spacing">5</property>
<child>
<object class="GtkAlignment" id="date_format_container">
<property name="visible">True</property>
@ -613,23 +594,19 @@ Select location and file name for the Import, then click 'OK'...
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label20">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="halign">start</property>
<property name="label" translatable="yes">Date Format</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_SHRINK | GTK_FILL</property>
</packing>
</child>
<child>
@ -640,34 +617,31 @@ Select location and file name for the Import, then click 'OK'...
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label21">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="halign">start</property>
<property name="label" translatable="yes">Currency Format</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options">GTK_SHRINK | GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label16">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="halign">start</property>
<property name="label" translatable="yes">Encoding</property>
</object>
<packing>
<property name="x_options">GTK_SHRINK | GTK_FILL</property>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
@ -678,38 +652,35 @@ Select location and file name for the Import, then click 'OK'...
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label17">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="halign">start</property>
<property name="label" translatable="yes">Leading Lines to Skip</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">4</property>
<property name="bottom_attach">5</property>
<property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label18">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="halign">start</property>
<property name="label" translatable="yes">Trailing Lines to Skip</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">5</property>
<property name="bottom_attach">6</property>
<property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkHBox" id="hbox2">
<object class="GtkBox" id="hbox2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
@ -717,11 +688,8 @@ Select location and file name for the Import, then click 'OK'...
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">●</property>
<property name="invisible_char_set">True</property>
<property name="primary_icon_activatable">False</property>
<property name="secondary_icon_activatable">False</property>
<property name="primary_icon_sensitive">True</property>
<property name="secondary_icon_sensitive">True</property>
<property name="adjustment">start_row_adj</property>
<property name="numeric">True</property>
<signal name="value-changed" handler="csv_price_imp_preview_srow_cb" swapped="no"/>
@ -735,13 +703,11 @@ Select location and file name for the Import, then click 'OK'...
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">4</property>
<property name="bottom_attach">5</property>
</packing>
</child>
<child>
<object class="GtkHBox" id="hbox3">
<object class="GtkBox" id="hbox3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
@ -749,11 +715,8 @@ Select location and file name for the Import, then click 'OK'...
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">●</property>
<property name="invisible_char_set">True</property>
<property name="primary_icon_activatable">False</property>
<property name="secondary_icon_activatable">False</property>
<property name="primary_icon_sensitive">True</property>
<property name="secondary_icon_sensitive">True</property>
<property name="adjustment">end_row_adj</property>
<property name="numeric">True</property>
<signal name="value-changed" handler="csv_price_imp_preview_erow_cb" swapped="no"/>
@ -767,20 +730,18 @@ Select location and file name for the Import, then click 'OK'...
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">5</property>
<property name="bottom_attach">6</property>
</packing>
</child>
<child>
<object class="GtkHSeparator" id="hseparator2">
<object class="GtkSeparator" id="hseparator2">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="right_attach">2</property>
<property name="left_attach">0</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
<property name="width">2</property>
</packing>
</child>
</object>
@ -800,6 +761,7 @@ Select location and file name for the Import, then click 'OK'...
For example
* if 'Leading Lines to Skip' is set to 3, the first line to import will be line 4. Lines 5, 7, 9,... will be skipped.
* if 'Leading Lines to Skip' is set to 4, the first line to import will be line 5. Lines 6, 8, 10,... will be skipped.</property>
<property name="halign">start</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="csv_price_imp_preview_skiprows_cb" swapped="no"/>
</object>
@ -817,6 +779,7 @@ For example
<object class="GtkLabel" id="label13">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes">&lt;b&gt;Miscellaneous&lt;/b&gt;</property>
<property name="use_markup">True</property>
</object>
@ -824,11 +787,7 @@ For example
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
@ -842,7 +801,7 @@ For example
</packing>
</child>
<child>
<object class="GtkHBox" id="hbox1">
<object class="GtkBox" id="hbox1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
@ -859,7 +818,7 @@ For example
<property name="left_padding">5</property>
<property name="right_padding">5</property>
<child>
<object class="GtkHBox" id="commodity_hbox">
<object class="GtkBox" id="commodity_hbox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
@ -913,7 +872,7 @@ For example
<property name="left_padding">5</property>
<property name="right_padding">5</property>
<child>
<object class="GtkHBox" id="currency_hbox">
<object class="GtkBox" id="currency_hbox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
@ -964,16 +923,15 @@ For example
<object class="GtkScrolledWindow" id="scrolledwindow2">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hscrollbar_policy">automatic</property>
<property name="vscrollbar_policy">automatic</property>
<child>
<object class="GtkViewport" id="viewport2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkVBox" id="vbox8">
<object class="GtkBox" id="vbox8">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkTreeView" id="ctreeview">
<property name="visible">True</property>
@ -981,6 +939,9 @@ For example
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="headers_visible">False</property>
<property name="enable_grid_lines">both</property>
<child internal-child="selection">
<object class="GtkTreeSelection"/>
</child>
</object>
<packing>
<property name="expand">False</property>
@ -994,6 +955,9 @@ For example
<property name="can_focus">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="enable_grid_lines">both</property>
<child internal-child="selection">
<object class="GtkTreeSelection"/>
</child>
</object>
<packing>
<property name="expand">True</property>
@ -1013,7 +977,7 @@ For example
</packing>
</child>
<child>
<object class="GtkHBox" id="hbox13">
<object class="GtkBox" id="hbox13">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
@ -1022,8 +986,7 @@ For example
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="yalign">0</property>
<property name="stock">gtk-dialog-info</property>
<property name="icon_name">dialog-information</property>
</object>
<packing>
<property name="expand">False</property>
@ -1037,7 +1000,7 @@ For example
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="xalign">0</property>
<property name="halign">start</property>
<property name="label" translatable="yes">Select the type of each column to import.</property>
</object>
<packing>
@ -1055,7 +1018,7 @@ For example
</packing>
</child>
<child>
<object class="GtkHBox" id="hbox14">
<object class="GtkBox" id="hbox14">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
@ -1063,7 +1026,6 @@ For example
<property name="label" translatable="yes">Skip Errors</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="xalign">1</property>
<property name="image_position">right</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="csv_price_imp_preview_skiperrors_cb" swapped="no"/>
@ -1089,10 +1051,11 @@ For example
</packing>
</child>
<child>
<object class="GtkVBox" id="confirm_page">
<object class="GtkBox" id="confirm_page">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">12</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkAlignment" id="alignment2">
<property name="visible">True</property>
@ -1122,10 +1085,11 @@ Cancel to abort.&lt;/b&gt;</property>
</packing>
</child>
<child>
<object class="GtkVBox" id="summary_page">
<object class="GtkBox" id="summary_page">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">12</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkLabel" id="summary_label">
<property name="visible">True</property>
@ -1147,5 +1111,12 @@ Cancel to abort.&lt;/b&gt;</property>
<property name="complete">True</property>
</packing>
</child>
<child internal-child="action_area">
<object class="GtkBox">
<property name="can_focus">False</property>
</object>
<packing>
</packing>
</child>
</object>
</interface>

View File

@ -57,7 +57,7 @@ static GtkActionEntry gnc_plugin_actions [] =
G_CALLBACK (gnc_plugin_csv_import_trans_cmd)
},
{
"CsvImportPriceAction", GTK_STOCK_CONVERT, N_("Import _Prices from a CSV file..."), NULL,
"CsvImportPriceAction", "go-previous", N_("Import _Prices from a CSV file..."), NULL,
N_("Import Prices from a CSV file"),
G_CALLBACK (gnc_plugin_csv_import_price_cmd)
},