Example #1
0
/*! \brief Shows a widget as a dialog box
 *
 *  \param [in]     w_current The toplevel environment.
 *  \param [in]     widget Widget to show
 *  \param [in,out] dialog Dialog which will be a parent of the widget
 *  \param [in]     title  Dialog's title
 *  \param [in]     ini_group Config file section for dialog geometry
 */
static void
x_widgets_show_in_dialog (GschemToplevel* w_current,
                          GtkWidget*      widget,
                          GtkWidget**     dialog,
                          const gchar*    title,
                          const gchar*    ini_group)
{
  g_return_if_fail (widget != NULL);

  if (*dialog != NULL)
  {
    gtk_window_present (GTK_WINDOW (*dialog));
    return;
  }

  GtkWidget* dlg = gschem_dialog_new_with_buttons(
    title,
    GTK_WINDOW (w_current->main_window),
    (GtkDialogFlags) 0,
    ini_group,
    w_current,
    GTK_STOCK_CLOSE, GTK_RESPONSE_NONE,
    NULL);

  g_signal_connect (G_OBJECT (dlg),
                    "response",
                    G_CALLBACK (&gtk_widget_hide),
                    NULL);

  g_signal_connect (G_OBJECT (dlg),
                    "delete-event",
                    G_CALLBACK (&gtk_widget_hide_on_delete),
                    NULL);

  GtkWidget* content_area = gtk_dialog_get_content_area (GTK_DIALOG (dlg));
  gtk_container_add (GTK_CONTAINER (content_area), widget);

  gtk_widget_show_all (dlg);
  gtk_window_present (GTK_WINDOW (dlg));

  *dialog = dlg;

} /* x_widgets_show_in_dialog() */
Example #2
0
/*! \brief Creates the arc angle dialog
 *  \par Function Description
 *  This function creates the arc angle dialog. Depending on the
 *  \a arc_object the entries are filled with the arc OBJECT properties
 *  or with some standard values.
 *
 *  \param [in] w_current   The GschemToplevel object
 *  \param [in] arc_object  an arc OBJECT if used to modify an arc
 *                          or NULL to create a new arc.
 */
void arc_angle_dialog (GschemToplevel *w_current, OBJECT *arc_object)
{
  GtkWidget *label[3];
  GtkWidget *vbox;
  GtkWidget *alignment, *table;
  GtkWidget *widget[3];

  if (!w_current->aawindow) {
    w_current->aawindow = gschem_dialog_new_with_buttons(_("Arc Params"),
                                                         GTK_WINDOW(w_current->main_window),
                                                         GTK_DIALOG_MODAL,
                                                         "arc-angle", w_current,
                                                         GTK_STOCK_CANCEL,
                                                         GTK_RESPONSE_REJECT,
                                                         GTK_STOCK_OK,
                                                         GTK_RESPONSE_ACCEPT,
                                                         NULL);

  /* Set the alternative button order (ok, cancel, help) for other systems */
    gtk_dialog_set_alternative_button_order(GTK_DIALOG(w_current->aawindow),
                                            GTK_RESPONSE_ACCEPT,
                                            GTK_RESPONSE_REJECT,
                                            -1);

    gtk_window_set_position (GTK_WINDOW (w_current->aawindow), GTK_WIN_POS_MOUSE);

    g_signal_connect (G_OBJECT (w_current->aawindow), "response",
                      G_CALLBACK (arc_angle_dialog_response),
                      w_current);

    gtk_dialog_set_default_response(GTK_DIALOG(w_current->aawindow),
                                    GTK_RESPONSE_ACCEPT);

    gtk_container_set_border_width (GTK_CONTAINER (w_current->aawindow),
                                    DIALOG_BORDER_SPACING);
    vbox = GTK_DIALOG(w_current->aawindow)->vbox;
    gtk_box_set_spacing(GTK_BOX(vbox), DIALOG_V_SPACING);


    alignment = gtk_alignment_new(0,0,1,1);
    gtk_alignment_set_padding(GTK_ALIGNMENT(alignment), 0, 0,
                              0 /*DIALOG_INDENTATION */, 0);
    gtk_box_pack_start(GTK_BOX(vbox), alignment, FALSE, FALSE, 0);

    label[0] = gschem_dialog_misc_create_property_label (_("Arc Radius:"));
    label[1] = gschem_dialog_misc_create_property_label (_("Start Angle:"));
    label[2] = gschem_dialog_misc_create_property_label (_("Degrees of Sweep:"));

    widget[0] = gtk_spin_button_new_with_range (1, 100000, 100);
    gtk_entry_set_activates_default (GTK_ENTRY(widget[0]), TRUE);

    widget[1] = gtk_spin_button_new_with_range (-360,360,1);
    gtk_entry_set_activates_default (GTK_ENTRY(widget[1]), TRUE);

    widget[2] = gtk_spin_button_new_with_range (-360,360,1);
    gtk_entry_set_activates_default(GTK_ENTRY(widget[2]), TRUE);

	table = gschem_dialog_misc_create_property_table (label, widget, 3);
    gtk_container_add (GTK_CONTAINER(alignment), table);

    GLADE_HOOKUP_OBJECT(w_current->aawindow, widget[0], "radius");
    GLADE_HOOKUP_OBJECT(w_current->aawindow, widget[1],"spin_start");
    GLADE_HOOKUP_OBJECT(w_current->aawindow, widget[2],"spin_sweep");
    g_object_set_data(G_OBJECT(w_current->aawindow), "arc_object", arc_object);
    gtk_widget_show_all (w_current->aawindow);
  }

  else {  /* dialog already created */
    gtk_window_present (GTK_WINDOW(w_current->aawindow));
    widget[0] = g_object_get_data(G_OBJECT(w_current->aawindow),"radius");
    widget[1] = g_object_get_data(G_OBJECT(w_current->aawindow),"spin_start");
    widget[2] = g_object_get_data(G_OBJECT(w_current->aawindow),"spin_sweep");
  }

  if (arc_object == NULL) {
    gtk_spin_button_set_value(GTK_SPIN_BUTTON(widget[0]), w_current->distance);
    gtk_spin_button_set_value(GTK_SPIN_BUTTON(widget[1]),0);
    gtk_spin_button_set_value(GTK_SPIN_BUTTON(widget[2]), 90);
  } else {
    gtk_spin_button_set_value(GTK_SPIN_BUTTON(widget[0]),
			      arc_object->arc->radius);
    gtk_spin_button_set_value(GTK_SPIN_BUTTON(widget[1]),
			      arc_object->arc->start_angle);
    gtk_spin_button_set_value(GTK_SPIN_BUTTON(widget[2]),
			      arc_object->arc->sweep_angle);
  }

  gtk_widget_grab_focus(widget[0]);
}
/*! \brief Create the slot entry dialog
 *  \par Function Description
 *  This function creates the slot edit dialog.
 */
void slot_edit_dialog (GschemToplevel *w_current, const char *count, const char *string)
{
  GtkWidget *label[2];
  GtkWidget *table;
  GtkWidget *vbox;
  GtkWidget *widget[2];

  if (!w_current->sewindow) {
    w_current->sewindow = gschem_dialog_new_with_buttons(_("Edit slot number"),
                                                         GTK_WINDOW(w_current->main_window),
                                                         GTK_DIALOG_MODAL,
                                                         "slot-edit", w_current,
                                                         GTK_STOCK_CANCEL,
                                                         GTK_RESPONSE_REJECT,
                                                         GTK_STOCK_OK,
                                                         GTK_RESPONSE_ACCEPT,
                                                         NULL);

  /* Set the alternative button order (ok, cancel, help) for other systems */
    gtk_dialog_set_alternative_button_order(GTK_DIALOG(w_current->sewindow),
                                            GTK_RESPONSE_ACCEPT,
                                            GTK_RESPONSE_REJECT,
                                            -1);

    gtk_window_set_position (GTK_WINDOW (w_current->sewindow), GTK_WIN_POS_MOUSE);

    gtk_dialog_set_default_response (GTK_DIALOG (w_current->sewindow),
                                     GTK_RESPONSE_ACCEPT);

    g_signal_connect (G_OBJECT (w_current->sewindow), "response",
                      G_CALLBACK (slot_edit_dialog_response),
                      w_current);

    gtk_container_set_border_width (GTK_CONTAINER (w_current->sewindow),
                                    DIALOG_BORDER_SPACING);
    vbox = GTK_DIALOG(w_current->sewindow)->vbox;
    gtk_box_set_spacing(GTK_BOX(vbox), DIALOG_V_SPACING);

    label[0] = gschem_dialog_misc_create_property_label (_("Number of Slots:"));
    label[1] = gschem_dialog_misc_create_property_label (_("Slot Number:"));

    widget[0] = gtk_entry_new();
    gtk_entry_set_max_length(GTK_ENTRY(widget[0]), 80);
    gtk_editable_set_editable (GTK_EDITABLE(widget[0]), FALSE);
	gtk_widget_set_sensitive (GTK_WIDGET(widget[0]), FALSE);

	widget[1] = gtk_entry_new();
    gtk_entry_set_max_length(GTK_ENTRY(widget[1]), 80);
    gtk_entry_set_activates_default (GTK_ENTRY(widget[1]),TRUE);

    table = gschem_dialog_misc_create_property_table(label, widget, 2);

	gtk_box_pack_start (GTK_BOX (vbox),                          /* box     */
                        table,                                   /* child   */
                        FALSE,                                   /* expand  */
                        FALSE,                                   /* fill    */
                        0);                                      /* padding */

	GLADE_HOOKUP_OBJECT(w_current->sewindow, widget[0], "countentry");
    GLADE_HOOKUP_OBJECT(w_current->sewindow, widget[1], "textentry");
    gtk_widget_show_all (w_current->sewindow);
  }

  else { /* dialog already created */
    gtk_window_present (GTK_WINDOW(w_current->sewindow));
  }

  if (count != NULL) {
    widget[0] = GTK_WIDGET (g_object_get_data (G_OBJECT (w_current->sewindow),
                                               "countentry"));
    gtk_entry_set_text(GTK_ENTRY(widget[0]), count);
  }

  /* always set the current text and select the number of the slot */
  if (string != NULL) {
    widget[1] = GTK_WIDGET (g_object_get_data (G_OBJECT (w_current->sewindow),
                                               "textentry"));
    gtk_entry_set_text(GTK_ENTRY(widget[1]), string);
    gtk_editable_select_region (GTK_EDITABLE(widget[1]), 0, -1);
  }
}
Example #4
0
/** @brief Creates the autonumber text dialog.
 *
 * Dialog is not shown. No callbacks are registered. This is basically
 * unmodified code returned by Glade.
 *
 * Only modification was the following substitution:
 *
 * %s/create_pixmap (autonumber_text, "\(.*\)")/autonumber_create_pixmap("gschem-\1", w_current)/
 * 
 * and addition of the "w_current" parameter.
 *
 * @param w_current Pointer to the top level struct.
 * @return Pointer to the dialog window.
 */
GtkWidget* autonumber_create_dialog(GschemToplevel *w_current)
{
  GtkWidget *autonumber_text;
  GtkWidget *vbox1;
  GtkWidget *alignment1;
  GtkWidget *vbox3;
  GtkWidget *table1;
  GtkWidget *label4;
  GtkWidget *scope_text;
  GtkWidget *label8;
  GtkWidget *label6;
  GtkWidget *scope_number;
  GtkWidget *scope_skip;
  GtkWidget *scope_overwrite;
  GtkWidget *label1;
  GtkWidget *alignment3;
  GtkWidget *vbox4;
  GtkWidget *table3;
  GtkWidget *label12;
  GtkWidget *label13;
  GtkObject *opt_startnum_adj;
  GtkWidget *opt_startnum;
  GtkWidget *sort_order;
  GtkWidget *opt_removenum;
  GtkWidget *opt_slotting;
  GtkWidget *label3;


  autonumber_text = gschem_dialog_new_with_buttons(_("Autonumber text"),
                                                   GTK_WINDOW(w_current->main_window),
                                                   0, /* not modal */
                                                   "autonumber", w_current,
                                                   GTK_STOCK_CLOSE,
                                                   GTK_RESPONSE_REJECT,
                                                   GTK_STOCK_APPLY,
                                                   GTK_RESPONSE_ACCEPT,
                                                   NULL);
  /* Set the alternative button order (ok, cancel, help) for other systems */
  gtk_dialog_set_alternative_button_order(GTK_DIALOG(autonumber_text),
					  GTK_RESPONSE_ACCEPT,
					  GTK_RESPONSE_REJECT,
					  -1);

  gtk_window_set_position (GTK_WINDOW (autonumber_text), GTK_WIN_POS_MOUSE);
  
  gtk_container_set_border_width (GTK_CONTAINER (autonumber_text),
                                  DIALOG_BORDER_SPACING);
  vbox1 = GTK_DIALOG(autonumber_text)->vbox;
  gtk_box_set_spacing(GTK_BOX(vbox1), DIALOG_V_SPACING);

  /* scope section */
  label1 = gtk_label_new (_("<b>Scope</b>"));
  gtk_label_set_use_markup (GTK_LABEL (label1), TRUE);
  gtk_misc_set_alignment (GTK_MISC(label1), 0, 0);
  gtk_box_pack_start (GTK_BOX(vbox1), label1, TRUE, TRUE, 0);
  gtk_widget_show (label1);

  alignment1 = gtk_alignment_new (0, 0, 1, 1);
  gtk_widget_show (alignment1);
  gtk_box_pack_start (GTK_BOX (vbox1), alignment1, TRUE, TRUE, 0);
  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment1), 
			     0, 0, DIALOG_INDENTATION, 0);

  vbox3 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox3);
  gtk_container_add (GTK_CONTAINER (alignment1), vbox3);

  table1 = gtk_table_new (3, 2, FALSE);
  gtk_widget_show (table1);
  gtk_box_pack_start (GTK_BOX (vbox3), table1, TRUE, TRUE, 0);
  gtk_table_set_row_spacings (GTK_TABLE (table1), DIALOG_V_SPACING);
  gtk_table_set_col_spacings (GTK_TABLE (table1), DIALOG_H_SPACING);

  label4 = gtk_label_new (_("Search for:"));
  gtk_widget_show (label4);
  gtk_table_attach (GTK_TABLE (table1), label4, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label4), 0, 0.5);

  scope_text = gtk_combo_box_entry_new_text ();
  gtk_entry_set_activates_default(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(scope_text))), TRUE);
  gtk_widget_show (scope_text);
  gtk_table_attach (GTK_TABLE (table1), scope_text, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (GTK_FILL), 0, 0);

  label8 = gtk_label_new (_("Autonumber text in:"));
  gtk_widget_show (label8);
  gtk_table_attach (GTK_TABLE (table1), label8, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label8), 0, 0.5);

  label6 = gtk_label_new (_("Skip numbers found in:"));
  gtk_widget_show (label6);
  gtk_table_attach (GTK_TABLE (table1), label6, 0, 1, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label6), 0, 0.5);

  scope_number = gtk_combo_box_new_text ();
  gtk_widget_show (scope_number);
  gtk_table_attach (GTK_TABLE (table1), scope_number, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_FILL), 0, 0);
  gtk_combo_box_append_text (GTK_COMBO_BOX (scope_number), _("Selected objects"));
  gtk_combo_box_append_text (GTK_COMBO_BOX (scope_number), _("Current page"));
  gtk_combo_box_append_text (GTK_COMBO_BOX (scope_number), _("Whole hierarchy"));

  scope_skip = gtk_combo_box_new_text ();
  gtk_widget_show (scope_skip);
  gtk_table_attach (GTK_TABLE (table1), scope_skip, 1, 2, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_FILL), 0, 0);
  gtk_combo_box_append_text (GTK_COMBO_BOX (scope_skip), _("Selected objects"));
  gtk_combo_box_append_text (GTK_COMBO_BOX (scope_skip), _("Current page"));
  gtk_combo_box_append_text (GTK_COMBO_BOX (scope_skip), _("Whole hierarchy"));

  scope_overwrite = gtk_check_button_new_with_mnemonic (_("Overwrite existing numbers"));
  gtk_widget_show (scope_overwrite);
  gtk_box_pack_start (GTK_BOX (vbox3), scope_overwrite, FALSE, FALSE, 6);

  /* Options section */
  label3 = gtk_label_new (_("<b>Options</b>"));
  gtk_label_set_use_markup (GTK_LABEL (label3), TRUE);
  gtk_misc_set_alignment(GTK_MISC(label3), 0, 0);
  gtk_widget_show (label3);
  gtk_box_pack_start(GTK_BOX(vbox1), label3, TRUE, TRUE, 0);

  alignment3 = gtk_alignment_new (0, 0, 1, 1);
  gtk_widget_show (alignment3);
  gtk_box_pack_start(GTK_BOX(vbox1), alignment3, TRUE, TRUE, 0);
  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment3), 
			     0, 0, DIALOG_INDENTATION, 0);

  vbox4 = gtk_vbox_new (FALSE, 3);
  gtk_widget_show (vbox4);
  gtk_container_add (GTK_CONTAINER (alignment3), vbox4);

  table3 = gtk_table_new (2, 2, FALSE);
  gtk_widget_show (table3);
  gtk_box_pack_start (GTK_BOX (vbox4), table3, TRUE, TRUE, 0);
  gtk_table_set_row_spacings (GTK_TABLE (table3), DIALOG_V_SPACING);
  gtk_table_set_col_spacings (GTK_TABLE (table3), DIALOG_H_SPACING);

  label12 = gtk_label_new (_("Starting number:"));
  gtk_widget_show (label12);
  gtk_table_attach (GTK_TABLE (table3), label12, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label12), 0, 0.5);

  label13 = gtk_label_new (_("Sort order:"));
  gtk_widget_show (label13);
  gtk_table_attach (GTK_TABLE (table3), label13, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label13), 0, 0.5);

  opt_startnum_adj = gtk_adjustment_new (1, 0, 10000, 1, 10, 10);
  opt_startnum = gtk_spin_button_new (GTK_ADJUSTMENT (opt_startnum_adj), 1, 0);
  gtk_entry_set_activates_default(GTK_ENTRY(opt_startnum), TRUE);
  gtk_widget_show (opt_startnum);
  gtk_table_attach (GTK_TABLE (table3), opt_startnum, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);

  sort_order = gtk_combo_box_new();
  gtk_widget_show (sort_order);
  gtk_table_attach (GTK_TABLE (table3), sort_order, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_FILL), 0, 0);

  opt_removenum = gtk_check_button_new_with_mnemonic (_("Remove numbers"));
  gtk_widget_show (opt_removenum);
  gtk_box_pack_start (GTK_BOX (vbox4), opt_removenum, FALSE, FALSE, 0);

  opt_slotting = gtk_check_button_new_with_mnemonic (_("Automatic slotting"));
  gtk_widget_show (opt_slotting);
  gtk_box_pack_start (GTK_BOX (vbox4), opt_slotting, FALSE, FALSE, 0);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT (autonumber_text, scope_text, "scope_text");
  GLADE_HOOKUP_OBJECT (autonumber_text, scope_number, "scope_number");
  GLADE_HOOKUP_OBJECT (autonumber_text, scope_skip, "scope_skip");
  GLADE_HOOKUP_OBJECT (autonumber_text, scope_overwrite, "scope_overwrite");
  GLADE_HOOKUP_OBJECT (autonumber_text, opt_startnum, "opt_startnum");
  GLADE_HOOKUP_OBJECT (autonumber_text, sort_order, "sort_order");
  GLADE_HOOKUP_OBJECT (autonumber_text, opt_removenum, "opt_removenum");
  GLADE_HOOKUP_OBJECT (autonumber_text, opt_slotting, "opt_slotting");

  return autonumber_text;
}
Example #5
0
/*! \brief Creates the hotkeys dialog
 *  \par Function Description
 *  This function creates the hotkey dialog and puts the list of hotkeys
 *  into it.
 */
void x_dialog_hotkeys (GschemToplevel *w_current)
{
  GtkWidget *vbox, *scrolled_win;
  GtkTreeModel *store;
  GtkWidget *treeview;
  GtkCellRenderer *renderer;
  GtkTreeViewColumn *column;

  if (!w_current->hkwindow) {
    w_current->hkwindow = gschem_dialog_new_with_buttons(_("Hotkeys"),
                                                         GTK_WINDOW(w_current->main_window),
                                                         0, /* not modal */
                                                         "hotkeys", w_current,
                                                         GTK_STOCK_CLOSE,
                                                         GTK_RESPONSE_REJECT,
                                                         NULL);

    gtk_window_set_position (GTK_WINDOW (w_current->hkwindow), GTK_WIN_POS_NONE);

    g_signal_connect (G_OBJECT (w_current->hkwindow), "response",
                      G_CALLBACK (x_dialog_hotkeys_response),
                      w_current);

    gtk_dialog_set_default_response(GTK_DIALOG(w_current->hkwindow),
                                    GTK_RESPONSE_ACCEPT);

    gtk_container_set_border_width (GTK_CONTAINER (w_current->hkwindow),
                                    DIALOG_BORDER_SPACING);
    gtk_widget_set_size_request (w_current->hkwindow, 300, 300);

    vbox = GTK_DIALOG(w_current->hkwindow)->vbox;
    gtk_box_set_spacing(GTK_BOX(vbox), DIALOG_V_SPACING);

    scrolled_win = gtk_scrolled_window_new (NULL, NULL);
    gtk_box_pack_start (GTK_BOX (vbox), scrolled_win, TRUE, TRUE, 0);
    gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_win),
                                    GTK_POLICY_AUTOMATIC,
                                    GTK_POLICY_AUTOMATIC);

    /* the model */
    store = GTK_TREE_MODEL (gschem_hotkey_store_new ());

    /* the tree view */
    treeview = gtk_tree_view_new_with_model (store);
    gtk_container_add(GTK_CONTAINER(scrolled_win), treeview);

    /* the columns */
    /* The first column contains the action's icon (if one was set)
     * and its label. */
    renderer = gtk_cell_renderer_pixbuf_new ();
    column = gtk_tree_view_column_new_with_attributes (_("Action"),
                                                       renderer,
                                                       "stock-id",
                                                       GSCHEM_HOTKEY_STORE_COLUMN_ICON,
                                                       NULL);
    /* Fix things up to show stock icons *and* theme icons. */
    g_signal_connect (renderer, "notify::stock-id",
                      G_CALLBACK (x_dialog_hotkeys_cell_stock_id_notify),
                      NULL);

    renderer = gtk_cell_renderer_text_new ();
    gtk_tree_view_column_pack_start (column, renderer, FALSE);
    gtk_tree_view_column_set_attributes (column, renderer,
                                         "text", GSCHEM_HOTKEY_STORE_COLUMN_LABEL,
                                         NULL);

    /* The second column contains the action's keybinding */
    gtk_tree_view_append_column (GTK_TREE_VIEW(treeview), column);
    column = gtk_tree_view_column_new_with_attributes (_("Keystroke(s)"),
                                                       renderer,
                                                       "text",
                                                       GSCHEM_HOTKEY_STORE_COLUMN_KEYS,
                                                       NULL);
    gtk_tree_view_append_column (GTK_TREE_VIEW(treeview), column);

    /* show all recursively */
    gtk_widget_show_all(w_current->hkwindow);
  }

  else { /* dialog already created */
    gtk_window_present(GTK_WINDOW(w_current->hkwindow));
  }
}