Commit 3d042e76215ac59f56ec5a8479adefe93e10661b
1 parent
08219022
Exists in
master
and in
1 other branch
Implementing the accelerator dialog.
Showing
2 changed files
with
11 additions
and
9 deletions
Show diff stats
src/dialogs/settings/accelerator.c
| ... | ... | @@ -76,13 +76,14 @@ |
| 76 | 76 | |
| 77 | 77 | enum |
| 78 | 78 | { |
| 79 | - DESCRIPTION, | |
| 80 | - MAIN_MASK, | |
| 81 | - MAIN_VALUE, | |
| 82 | - ALTERNATIVE_MASK, | |
| 83 | - ALTERNATIVE_VALUE, | |
| 84 | - | |
| 85 | - COLUMNS | |
| 79 | + ACTION, ///< @brief The action object. | |
| 80 | + DESCRIPTION, ///< @brief The action description. | |
| 81 | + MAIN_MASK, ///< @brief The mask for the main accelerator. | |
| 82 | + MAIN_VALUE, ///< @brief The value for the main accelerator. | |
| 83 | + ALTERNATIVE_MASK, ///< @brief The mask for the alternative accelerator. | |
| 84 | + ALTERNATIVE_VALUE, ///< @brief The value for the alternative accelerator. | |
| 85 | + | |
| 86 | + COLUMNS ///< @brief Number of view columns. | |
| 86 | 87 | }; |
| 87 | 88 | |
| 88 | 89 | static void V3270AcceleratorSettings_init(V3270AcceleratorSettings *widget) |
| ... | ... | @@ -93,7 +94,7 @@ |
| 93 | 94 | GtkCellRenderer * accel_renderer = gtk_cell_renderer_accel_new(); |
| 94 | 95 | g_object_set(accel_renderer, "accel-mode", GTK_CELL_RENDERER_ACCEL_MODE_GTK,"editable", TRUE, NULL); |
| 95 | 96 | |
| 96 | - GtkTreeModel * model = (GtkTreeModel *) gtk_tree_store_new(COLUMNS, G_TYPE_STRING, G_TYPE_INT, G_TYPE_UINT, G_TYPE_INT, G_TYPE_UINT); | |
| 97 | + GtkTreeModel * model = (GtkTreeModel *) gtk_tree_store_new(COLUMNS, G_TYPE_POINTER, G_TYPE_STRING, G_TYPE_INT, G_TYPE_UINT, G_TYPE_INT, G_TYPE_UINT); | |
| 97 | 98 | GtkWidget * view = gtk_tree_view_new_with_model(model); |
| 98 | 99 | |
| 99 | 100 | gtk_widget_set_tooltip_markup(view,_("Keyboard accelerators")); | ... | ... |
src/include/v3270/settings.h
| ... | ... | @@ -135,12 +135,13 @@ |
| 135 | 135 | LIB3270_EXPORT void v3270_settings_dialog_revert(GtkWidget *widget); |
| 136 | 136 | |
| 137 | 137 | LIB3270_EXPORT GtkWidget * v3270_host_settings_new(); |
| 138 | - LIB3270_EXPORT GtkWidget * v3270_accelerator_settings_new(); | |
| 139 | 138 | LIB3270_EXPORT GtkWidget * v3270_font_settings_new(); |
| 140 | 139 | |
| 141 | 140 | LIB3270_EXPORT GtkWidget * v3270_font_chooser_widget_new() G_GNUC_DEPRECATED; |
| 142 | 141 | LIB3270_EXPORT GtkWidget * v3270_host_select_new() G_GNUC_DEPRECATED; |
| 143 | 142 | |
| 143 | + // Accelerator settings. | |
| 144 | + LIB3270_EXPORT GtkWidget * v3270_accelerator_settings_new(); | |
| 144 | 145 | |
| 145 | 146 | |
| 146 | 147 | G_END_DECLS | ... | ... |