Commit 8822ca30a43b592f77832a9428f45bb6fcc461ee

Authored by Perry Werneck
1 parent 858b95b6

Implementing toolbar.

src/objects/window/terminal.c
... ... @@ -72,6 +72,8 @@
72 72  
73 73 for(ix = 0; actions[ix]; ix++) {
74 74  
  75 +// debug("%s",actions[ix]);
  76 +
75 77 GAction * action = g_action_map_lookup_action(G_ACTION_MAP(window), actions[ix]);
76 78  
77 79 if(action && PW3270_IS_ACTION(action)) {
... ...
src/objects/window/window.c
... ... @@ -68,9 +68,26 @@
68 68 //
69 69 pw3270_window_add_actions(GTK_WIDGET(widget));
70 70  
71   - pw3270_toolbar_insert_action(GTK_WIDGET(widget->toolbar), g_action_map_lookup_action(G_ACTION_MAP(widget), "win.reconnect"), -1);
  71 + {
  72 + static const gchar *actions[] = {
  73 + "win.select_all",
  74 + "win.copy",
  75 + "win.paste",
  76 + "win.reconnect",
  77 + "win.disconnect",
  78 + "win.print",
  79 + "app.quit"
  80 + };
  81 +
  82 + size_t ix;
  83 +
  84 + for(ix = 0; ix < G_N_ELEMENTS(actions); ix++) {
  85 + pw3270_toolbar_insert_action(GTK_WIDGET(widget->toolbar), g_action_map_lookup_action(G_ACTION_MAP(widget), actions[ix]), -1);
  86 + }
  87 +
  88 + }
  89 +
72 90  
73   - //gtk_widget_show_all(GTK_WIDGET(widget->toolbar));
74 91  
75 92 //
76 93 // Setup Window actions.
... ...