Commit 6a0e1dd77867f140bb71ff6bf855a3a10219101f
1 parent
24398852
Exists in
master
and in
4 other branches
Implementing the classic UI.
Showing
5 changed files
with
28 additions
and
16 deletions
Show diff stats
src/objects/actions/abstract.c
| ... | ... | @@ -388,7 +388,7 @@ |
| 388 | 388 | |
| 389 | 389 | if(action && action->terminal) { |
| 390 | 390 | enabled = PW3270_ACTION_GET_CLASS(object)->get_enabled(object,action->terminal); |
| 391 | - debug("Action %s is %s",g_action_get_name(object),enabled ? "enabled" : "disabled"); | |
| 391 | +// debug("Action %s is %s",g_action_get_name(object),enabled ? "enabled" : "disabled"); | |
| 392 | 392 | } |
| 393 | 393 | |
| 394 | 394 | return enabled; |
| ... | ... | @@ -420,8 +420,6 @@ |
| 420 | 420 | } |
| 421 | 421 | |
| 422 | 422 | const gchar * pw3270_action_get_icon_name(GAction *action) { |
| 423 | - debug("***********%s(%p)=%p",__FUNCTION__,action,PW3270_ACTION_GET_CLASS(action)->get_icon_name); | |
| 424 | - debug("*************** %s",g_action_get_name(action)); | |
| 425 | 423 | return PW3270_ACTION_GET_CLASS(action)->get_icon_name(action); |
| 426 | 424 | } |
| 427 | 425 | ... | ... |
src/objects/toolbar/toolbutton.c
| ... | ... | @@ -54,8 +54,23 @@ |
| 54 | 54 | .name = "preferences", |
| 55 | 55 | .icon_name = "preferences-other", |
| 56 | 56 | .label = N_("Preferences"), |
| 57 | + }, | |
| 58 | + | |
| 59 | + { | |
| 60 | + .name = "quit", | |
| 61 | + .icon_name = "gtk-quit", | |
| 62 | + .label = N_("Quit"), | |
| 63 | + .tooltip = N_("Quit application") | |
| 64 | + }, | |
| 65 | + | |
| 66 | + { | |
| 67 | + .name = "file.transfer", | |
| 68 | + .icon_name = "drive-harddisk", | |
| 69 | + .label = N_("Send/Receive"), | |
| 70 | + .tooltip = N_("Send/Receive files") | |
| 57 | 71 | } |
| 58 | 72 | |
| 73 | + | |
| 59 | 74 | }; |
| 60 | 75 | |
| 61 | 76 | static const struct Button * get_button_info(const gchar *name) { |
| ... | ... | @@ -133,7 +148,7 @@ |
| 133 | 148 | |
| 134 | 149 | const gchar * icon_name = pw3270_action_get_icon_name(action); |
| 135 | 150 | if(!icon_name) { |
| 136 | - g_message("Action doesn't have an icon"); | |
| 151 | + g_message("Action \"%s\" doesn't have an icon",g_action_get_name(action)); | |
| 137 | 152 | return NULL; |
| 138 | 153 | } |
| 139 | 154 | ... | ... |
src/objects/window/actions/preferences.c
| ... | ... | @@ -36,20 +36,21 @@ |
| 36 | 36 | |
| 37 | 37 | GAction * pw3270_session_preferences_action_new(void) { |
| 38 | 38 | |
| 39 | - pw3270Action * action = PW3270_ACTION(pw3270_action_new()); | |
| 39 | + pw3270SimpleAction * action = pw3270_simple_action_new(); | |
| 40 | 40 | |
| 41 | - action->activate = activate; | |
| 42 | - action->name = "preferences"; | |
| 43 | - | |
| 44 | - debug("action=%p",__FUNCTION__); | |
| 45 | - debug("\n\n%s\n\n",pw3270_action_get_icon_name(G_ACTION(action))); | |
| 41 | + action->parent.activate = activate; | |
| 42 | + action->parent.name = "preferences"; | |
| 43 | + action->icon_name = "preferences-other"; | |
| 44 | + action->label = N_("Session properties"); | |
| 46 | 45 | |
| 47 | 46 | return G_ACTION(action); |
| 48 | 47 | |
| 48 | + | |
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | void activate(GAction G_GNUC_UNUSED(*action), GVariant G_GNUC_UNUSED(*parameter), GtkWidget *terminal) { |
| 52 | 52 | |
| 53 | + debug("%s","Activating session properties dialog"); | |
| 53 | 54 | |
| 54 | 55 | } |
| 55 | 56 | ... | ... |
src/objects/window/window.c
| ... | ... | @@ -105,10 +105,6 @@ |
| 105 | 105 | pw3270_session_preferences_action_new() |
| 106 | 106 | }; |
| 107 | 107 | |
| 108 | - debug("****************************** %s",__FUNCTION__); | |
| 109 | - debug("color is %s",g_action_get_enabled(actions[1]) ? "enabled" : "disabled"); | |
| 110 | - debug("****************************** %s",__FUNCTION__); | |
| 111 | - | |
| 112 | 108 | for(ix = 0; ix < G_N_ELEMENTS(actions); ix++) { |
| 113 | 109 | debug("Inserting %s",g_action_get_name(actions[ix])); |
| 114 | 110 | g_action_map_add_action(G_ACTION_MAP(widget),actions[ix]); |
| ... | ... | @@ -155,7 +151,9 @@ |
| 155 | 151 | "separator", |
| 156 | 152 | "win.set.colors", |
| 157 | 153 | "win.preferences", |
| 158 | - "win.print" | |
| 154 | + "win.file.transfer", | |
| 155 | + "win.print", | |
| 156 | + "app.quit" | |
| 159 | 157 | |
| 160 | 158 | }; |
| 161 | 159 | ... | ... |
ui/application.xml
| ... | ... | @@ -162,7 +162,7 @@ |
| 162 | 162 | </item> |
| 163 | 163 | |
| 164 | 164 | <item> |
| 165 | - <attribute name="label" translatable="yes">Remove selection</attribute> | |
| 165 | + <attribute name="label" translatable="yes">Unselect</attribute> | |
| 166 | 166 | <attribute name="action">win.unselect</attribute> |
| 167 | 167 | </item> |
| 168 | 168 | ... | ... |