1 static MergeBranch _MergeBranch;
3 public class MergeBranch : Object
6 private MergeBranch _this;
8 public static MergeBranch singleton()
10 if (_MergeBranch == null) {
11 _MergeBranch= new MergeBranch();
15 public Xcls_table table;
16 public Xcls_actionsel actionsel;
17 public Xcls_actioncellrenderer actioncellrenderer;
18 public Xcls_actionmodel actionmodel;
19 public Xcls_projectsel projectsel;
20 public Xcls_prcellrenderer prcellrenderer;
21 public Xcls_prmodel prmodel;
22 public Xcls_ticketsel ticketsel;
23 public Xcls_dbcellrenderer dbcellrenderer;
24 public Xcls_dbmodel dbmodel;
25 public Xcls_btn_not_me btn_not_me;
26 public Xcls_btn_closed btn_closed;
27 public Xcls_name name;
28 public Xcls_label_diff label_diff;
29 public Xcls_label_ticket label_ticket;
30 public Xcls_diff_view diff_view;
31 public Xcls_scrolled_window scrolled_window;
32 public Xcls_view view;
33 public Xcls_spinner spinner;
34 public Xcls_mergebtn mergebtn;
38 public RooTicket? ticket;
45 this.el = new Gtk.Dialog();
52 this.el.title = "Merge Branch";
53 this.el.default_height = 200;
54 this.el.default_width = 500;
55 this.el.deletable = true;
57 var child_0 = new Xcls_Box2( _this );
59 this.el.get_content_area().add ( child_0.el );
60 var child_1 = new Xcls_Button32( _this );
62 this.el.add_action_widget ( child_1.el , 0 );
63 var child_2 = new Xcls_mergebtn( _this );
65 this.el.add_action_widget ( child_2.el , 1 );
68 this.el.delete_event.connect( (self, event) => {
73 this.el.response.connect( (self, response_id) => {
75 GLib.debug("got %d", (int) response_id);
76 if (response_id < 1) {
79 GitMonitor.gitmonitor.start();
86 // have they selected a ticket..
87 // make that the current active ticket?
88 // we really need to store locally what ticket is being worked on..
89 // in theory we could be working on multiple project and not merging..
90 // -- each repo would have their active ticket (only one per repo)
91 // -- so we could just store that in there
92 // -- initial load can check the contents of the ticket files on first scan.
93 var ticket_id = _this.ticketsel.selectedTicketId();
95 if (this.repo != null) {
96 var bn = _this.name.el.get_text();
97 if (ticket_id != "" ) {
98 this.repo.setActiveTicket( RooTicket.singleton().getById(ticket_id), bn);
100 this.repo.createBranchNamed(bn);
105 if (this.repo != null) {
107 _this.actionsel.selectedAction(),
108 _this.ticketsel.selectedTicketId(),
109 _this.name.el.get_text()
114 _this.actionsel.selectedAction(),
115 _this.ticketsel.selectedTicketId(),
116 _this.name.el.get_text()
119 this.running = false;
123 GitMonitor.gitmonitor.start();
129 // user defined functions
130 public void show ( RooTicket ticket, GitRepo? repo )
132 // this.el.set_gravity(Gdk.Gravity.NORTH);
136 GitMonitor.gitmonitor.stop();
140 _this.table.el.hide();
141 _this.scrolled_window.el.hide();
142 _this.spinner.el.show();
143 _this.spinner.el.start();
144 this.el.set_keep_above(true);
145 this.el.move((Gdk.Screen.width() / 2)- 250 ,0);
146 GLib.debug("Loading tickets");
149 this.ticket = ticket;
153 Timeout.add_seconds(1, () => {
155 _this.prmodel.loadProjects(ticket.project_id);
157 _this.diff_view.el.get_buffer().set_text(
158 repo != null ? repo.previewMerge() : GitRepo.previewMerges(ticket.id)
160 // if we are not working on a ticket, then we should be able to pick one?
161 _this.dbmodel.loadTickets(ticket.project_id);
162 _this.actionmodel.loadActions();
163 _this.mergebtn.updateState();
164 _this.view.loadTicket(ticket.id);
165 _this.spinner.el.stop();
166 _this.spinner.el.hide();
168 this.table.el.show();
175 public class Xcls_Box2 : Object
178 private MergeBranch _this;
184 public Xcls_Box2(MergeBranch _owner )
187 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
191 // set gobject values
192 var child_0 = new Xcls_table( _this );
194 this.el.pack_start ( child_0.el , false,false,0 );
195 var child_1 = new Xcls_Notebook22( _this );
197 this.el.add ( child_1.el );
198 var child_2 = new Xcls_spinner( _this );
200 this.el.add ( child_2.el );
203 // user defined functions
205 public class Xcls_table : Object
208 private MergeBranch _this;
214 public Xcls_table(MergeBranch _owner )
218 this.el = new Gtk.Table( 4, 2, false );
222 // set gobject values
224 this.el.column_spacing = 2;
225 this.el.vexpand = false;
226 var child_0 = new Xcls_Label4( _this );
228 this.el.attach_defaults ( child_0.el , 0,1,0,1 );
229 var child_1 = new Xcls_actionsel( _this );
231 this.el.attach_defaults ( child_1.el , 1,2,0,1 );
232 var child_2 = new Xcls_Label8( _this );
234 this.el.attach_defaults ( child_2.el , 0,1,1,2 );
235 var child_3 = new Xcls_projectsel( _this );
237 this.el.attach_defaults ( child_3.el , 1,2,1,2 );
238 var child_4 = new Xcls_Label12( _this );
240 this.el.attach_defaults ( child_4.el , 0,1,2,3 );
241 var child_5 = new Xcls_ticketsel( _this );
243 this.el.attach_defaults ( child_5.el , 1,2,2,3 );
244 var child_6 = new Xcls_Box16( _this );
246 this.el.attach_defaults ( child_6.el , 0,2,3,4 );
247 var child_7 = new Xcls_Label20( _this );
249 this.el.attach_defaults ( child_7.el , 0,1,4,5 );
250 var child_8 = new Xcls_name( _this );
252 this.el.attach_defaults ( child_8.el , 1,2,4,5 );
255 // user defined functions
257 public class Xcls_Label4 : Object
260 private MergeBranch _this;
266 public Xcls_Label4(MergeBranch _owner )
269 this.el = new Gtk.Label( "Do what?" );
273 // set gobject values
274 this.el.margin_right = 3;
275 this.el.halign = Gtk.Align.END;
276 this.el.visible = true;
279 // user defined functions
282 public class Xcls_actionsel : Object
284 public Gtk.ComboBox el;
285 private MergeBranch _this;
292 public Xcls_actionsel(MergeBranch _owner )
295 _this.actionsel = this;
296 this.el = new Gtk.ComboBox();
299 this.loading = false;
301 // set gobject values
302 this.el.hexpand = true;
303 var child_0 = new Xcls_actioncellrenderer( _this );
305 this.el.pack_start ( child_0.el , true );
306 var child_1 = new Xcls_actionmodel( _this );
308 this.el.set_model ( child_1.el );
312 this.el.add_attribute(_this.actioncellrenderer.el , "markup", 1 );
315 this.el.changed.connect( () => {
319 _this.name.updateText();
320 _this.mergebtn.updateState();
321 //GLib.debug (//"Selection: %s, %s\n", (string) val1, (string) val2);
325 // user defined functions
326 public string selectedAction () {
330 this.el.get_active_iter (out iter);
331 _this.actionmodel.el.get_value (iter, 0, out val1);
333 return (string) val1;
336 public class Xcls_actioncellrenderer : Object
338 public Gtk.CellRendererText el;
339 private MergeBranch _this;
345 public Xcls_actioncellrenderer(MergeBranch _owner )
348 _this.actioncellrenderer = this;
349 this.el = new Gtk.CellRendererText();
353 // set gobject values
356 // user defined functions
359 public class Xcls_actionmodel : Object
361 public Gtk.ListStore el;
362 private MergeBranch _this;
368 public Xcls_actionmodel(MergeBranch _owner )
371 _this.actionmodel = this;
372 this.el = new Gtk.ListStore( 2, typeof(string),typeof(string) );
376 // set gobject values
379 // user defined functions
380 public void loadActions () {
384 _this.actionsel.loading = true;
393 el.set_value(iter, 0, "");
394 el.set_value(iter, 1, "-- select action --");
396 _this.actionsel.el.set_active_iter(iter);
399 el.set_value(iter, 0, "CLOSE");
400 el.set_value(iter, 1, "Merge changes to master - and CLOSE ticket");
404 el.set_value(iter, 0, "LEAVE");
405 el.set_value(iter, 1, "Merge changes to master - and LEAVE ticket open");
408 el.set_value(iter, 0, "MASTER");
409 el.set_value(iter, 1, "Merge changes FROM master into this branch");
412 el.set_value(iter, 0, "EXIT");
413 el.set_value(iter, 1, "Switch back to MASTER branch - no merge");
417 _this.actionsel.loading = false;
418 //this.el.set_sort_column_id(0, Gtk.SortType.ASCENDING);
424 public class Xcls_Label8 : Object
427 private MergeBranch _this;
433 public Xcls_Label8(MergeBranch _owner )
436 this.el = new Gtk.Label( "Project" );
440 // set gobject values
441 this.el.margin_right = 3;
442 this.el.halign = Gtk.Align.END;
443 this.el.visible = true;
446 // user defined functions
449 public class Xcls_projectsel : Object
451 public Gtk.ComboBox el;
452 private MergeBranch _this;
459 public Xcls_projectsel(MergeBranch _owner )
462 _this.projectsel = this;
463 this.el = new Gtk.ComboBox.with_entry();
466 this.loading = false;
468 // set gobject values
469 this.el.hexpand = true;
470 var child_0 = new Xcls_prcellrenderer( _this );
472 this.el.pack_start ( child_0.el , true );
473 var child_1 = new Xcls_prmodel( _this );
475 this.el.set_model ( child_1.el );
479 this.el.set_entry_text_column(1);
482 this.el.changed.connect( () => {
486 var project_id = this.selectedProjectId();
487 _this.dbmodel.loadTickets(project_id);
490 /*if (this.loading) {
493 var ticket_id = this.selectedTicketId();
495 var name = RooTicket.singleton().usernameLocal();
497 if (ticket_id == "" || ticket_id == null) {
499 var dt = new DateTime.now_local();
500 _this.name.el.set_text("wip_%s_%s".printf(name,dt.format("%Y_%b_%d")));
505 var ticket = RooTicket.singleton().getById(ticket_id);
507 _this.name.el.set_text("wip_%s_T%s_%s".printf(name,ticket.id, ticket.summaryToBranchName()));
509 //GLib.debug (//"Selection: %s, %s\n", (string) val1, (string) val2);
514 // user defined functions
515 public string selectedProjectId () {
520 this.el.get_active_iter (out iter);
521 _this.prmodel.el.get_value (iter, 0, out val1);
524 return (string) val1;
531 public class Xcls_prcellrenderer : Object
533 public Gtk.CellRendererText el;
534 private MergeBranch _this;
540 public Xcls_prcellrenderer(MergeBranch _owner )
543 _this.prcellrenderer = this;
544 this.el = new Gtk.CellRendererText();
548 // set gobject values
551 // user defined functions
554 public class Xcls_prmodel : Object
556 public Gtk.ListStore el;
557 private MergeBranch _this;
563 public Xcls_prmodel(MergeBranch _owner )
566 _this.prmodel = this;
567 this.el = new Gtk.ListStore( 2, typeof(string),typeof(string) );
571 // set gobject values
574 // user defined functions
575 public void loadProjects (string id) {
579 _this.projectsel.loading = true;
588 el.set_value(iter, 0, "");
589 el.set_value(iter, 1, "-- select a project --");
591 _this.projectsel.el.set_active_iter(iter);
594 foreach(var project in RooProject.projects()) {
598 el.set_value(iter, 0, project.id);
599 el.set_value(iter, 1, project.name );
600 if (id == project.id) {
601 _this.projectsel.el.set_active_iter(iter);
606 _this.projectsel.loading = false;
607 //this.el.set_sort_column_id(0, Gtk.SortType.ASCENDING);
613 public class Xcls_Label12 : Object
616 private MergeBranch _this;
622 public Xcls_Label12(MergeBranch _owner )
625 this.el = new Gtk.Label( "Select Ticket" );
629 // set gobject values
630 this.el.margin_right = 3;
631 this.el.halign = Gtk.Align.END;
632 this.el.justify = Gtk.Justification.RIGHT;
633 this.el.xalign = 0.900000f;
634 this.el.visible = true;
637 // user defined functions
640 public class Xcls_ticketsel : Object
642 public Gtk.ComboBox el;
643 private MergeBranch _this;
650 public Xcls_ticketsel(MergeBranch _owner )
653 _this.ticketsel = this;
654 this.el = new Gtk.ComboBox.with_entry();
657 this.loading = false;
659 // set gobject values
660 var child_0 = new Xcls_dbcellrenderer( _this );
662 this.el.pack_start ( child_0.el , true );
663 var child_1 = new Xcls_dbmodel( _this );
665 this.el.set_model ( child_1.el );
669 //this.el.add_attribute(_this.dbcellrenderer.el , "markup", 1 );
670 this.el.set_entry_text_column(1);
673 this.el.changed.connect( () => {
678 _this.view.loadTicket(ticket.id);
679 _this.name.updateText();
680 //GLib.debug (//"Selection: %s, %s\n", (string) val1, (string) val2);
684 // user defined functions
685 public string selectedTicketId () {
690 this.el.get_active_iter (out iter);
691 _this.dbmodel.el.get_value (iter, 0, out val1);
694 return (string) val1;
701 public class Xcls_dbcellrenderer : Object
703 public Gtk.CellRendererText el;
704 private MergeBranch _this;
710 public Xcls_dbcellrenderer(MergeBranch _owner )
713 _this.dbcellrenderer = this;
714 this.el = new Gtk.CellRendererText();
718 // set gobject values
721 // user defined functions
724 public class Xcls_dbmodel : Object
726 public Gtk.ListStore el;
727 private MergeBranch _this;
733 public Xcls_dbmodel(MergeBranch _owner )
736 _this.dbmodel = this;
737 this.el = new Gtk.ListStore( 2, typeof(string),typeof(string) );
741 // set gobject values
744 // user defined functions
745 public void loadTickets (string project_id , string tid = "") {
749 // fixme .. get project id from selection..
751 RooTicket.singleton().loadTickets(
753 _this.btn_not_me.el.active ? RooTicket.Who.ANYBODY : RooTicket.Who.ME,
754 _this.btn_closed.el.active ? RooTicket.Status.ALL : RooTicket.Status.ACTIVE
757 _this.ticketsel.loading = true;
766 el.set_value(iter, 0, "");
767 el.set_value(iter, 1, "-- select a ticket --");
769 _this.ticketsel.el.set_active_iter(iter);
770 var tickets = RooTicket.singleton().tickets;
771 foreach(var ticket in tickets) {
775 el.set_value(iter, 0, ticket.id);
776 el.set_value(iter, 1, "#%s [%s] %s".printf( ticket.id, ticket.project_id_name , ticket.summary));
778 if (ticket.id == tid) {
779 _this.ticketsel.el.set_active_iter(iter);
784 _this.ticketsel.loading = false;
785 //this.el.set_sort_column_id(0, Gtk.SortType.ASCENDING);
791 public class Xcls_Box16 : Object
794 private MergeBranch _this;
800 public Xcls_Box16(MergeBranch _owner )
803 this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
807 // set gobject values
808 var child_0 = new Xcls_btn_not_me( _this );
810 this.el.add ( child_0.el );
811 var child_1 = new Xcls_btn_closed( _this );
813 this.el.add ( child_1.el );
814 var child_2 = new Xcls_Label19( _this );
816 this.el.add ( child_2.el );
819 // user defined functions
821 public class Xcls_btn_not_me : Object
823 public Gtk.CheckButton el;
824 private MergeBranch _this;
830 public Xcls_btn_not_me(MergeBranch _owner )
833 _this.btn_not_me = this;
834 this.el = new Gtk.CheckButton();
838 // set gobject values
839 this.el.label = "Show tickets not assigned to me";
842 this.el.toggled.connect( () => {
843 var project_id = _this.projectsel.selectedProjectId();
844 _this.dbmodel.loadTickets(project_id);
848 // user defined functions
851 public class Xcls_btn_closed : Object
853 public Gtk.CheckButton el;
854 private MergeBranch _this;
860 public Xcls_btn_closed(MergeBranch _owner )
863 _this.btn_closed = this;
864 this.el = new Gtk.CheckButton();
868 // set gobject values
869 this.el.label = "Show closed Tickets";
872 this.el.toggled.connect( () => {
873 var project_id = _this.projectsel.selectedProjectId();
874 _this.dbmodel.loadTickets(project_id);
879 // user defined functions
882 public class Xcls_Label19 : Object
885 private MergeBranch _this;
891 public Xcls_Label19(MergeBranch _owner )
894 this.el = new Gtk.Label( "<a href=\"refresh\">Refresh Ticket list</a>" );
898 // set gobject values
899 this.el.halign = Gtk.Align.END;
900 this.el.hexpand = true;
901 this.el.use_markup = true;
904 this.el.activate_link.connect( (uri) => {
905 if (uri == "refresh") {
907 var curproj = RooProject.getProjectByRepo(_this.repo);
908 _this.prmodel.loadProjects(curproj == null ? "": curproj.id);
910 _this.dbmodel.loadTickets(curproj == null ? "": curproj.id);
916 // user defined functions
920 public class Xcls_Label20 : Object
923 private MergeBranch _this;
929 public Xcls_Label20(MergeBranch _owner )
932 this.el = new Gtk.Label( "Use this commit message" );
936 // set gobject values
937 this.el.margin_right = 3;
938 this.el.halign = Gtk.Align.END;
941 // user defined functions
944 public class Xcls_name : Object
947 private MergeBranch _this;
953 public Xcls_name(MergeBranch _owner )
957 this.el = new Gtk.Entry();
961 // set gobject values
962 this.el.visible = true;
965 // user defined functions
966 public void updateText () {
967 var ticket_id = _this.ticketsel.selectedTicketId();
969 RooTicket ticket = null;
970 if (ticket_id.length > 0){
971 ticket = RooTicket.singleton().getById(ticket_id);
974 var name = RooTicket.singleton().usernameLocal();
975 var action = _this.actionsel.selectedAction();
976 this.el.set_editable(true);
978 case "CLOSE": // merge changes and close..
979 this.el.set_text("Fix #%s - %s".printf(ticket_id, ticket != null ? ticket.summary : ""));
981 case "LEAVE": // partial fix
982 this.el.set_text("Partial Fix #%s - %s".printf(ticket_id, ticket != null ? ticket.summary : ""));
984 case "MASTER": // merge master
985 case "EXIT": // just switch back...
986 this.el.set_editable(false);
987 this.el.set_text(""); // not relivant..
991 break; /// don't fix the text value.
998 public class Xcls_Notebook22 : Object
1000 public Gtk.Notebook el;
1001 private MergeBranch _this;
1007 public Xcls_Notebook22(MergeBranch _owner )
1010 this.el = new Gtk.Notebook();
1014 // set gobject values
1015 this.el.vexpand = true;
1016 var child_0 = new Xcls_label_diff( _this );
1018 var child_1 = new Xcls_label_ticket( _this );
1020 var child_2 = new Xcls_Box25( _this );
1022 this.el.append_page ( child_2.el , _this.label_diff.el );
1023 var child_3 = new Xcls_Box28( _this );
1025 this.el.append_page ( child_3.el , _this.label_ticket.el );
1028 // user defined functions
1030 public class Xcls_label_diff : Object
1032 public Gtk.Label el;
1033 private MergeBranch _this;
1039 public Xcls_label_diff(MergeBranch _owner )
1042 _this.label_diff = this;
1043 this.el = new Gtk.Label( "Projected Commit Diff" );
1047 // set gobject values
1050 // user defined functions
1053 public class Xcls_label_ticket : Object
1055 public Gtk.Label el;
1056 private MergeBranch _this;
1062 public Xcls_label_ticket(MergeBranch _owner )
1065 _this.label_ticket = this;
1066 this.el = new Gtk.Label( "Ticket Details" );
1070 // set gobject values
1073 // user defined functions
1076 public class Xcls_Box25 : Object
1079 private MergeBranch _this;
1085 public Xcls_Box25(MergeBranch _owner )
1088 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
1092 // set gobject values
1093 this.el.homogeneous = false;
1094 var child_0 = new Xcls_ScrolledWindow26( _this );
1096 this.el.pack_start ( child_0.el , true,true,0 );
1099 // user defined functions
1101 public class Xcls_ScrolledWindow26 : Object
1103 public Gtk.ScrolledWindow el;
1104 private MergeBranch _this;
1110 public Xcls_ScrolledWindow26(MergeBranch _owner )
1113 this.el = new Gtk.ScrolledWindow( null, null );
1117 // set gobject values
1118 this.el.height_request = 400;
1119 var child_0 = new Xcls_diff_view( _this );
1121 this.el.add ( child_0.el );
1124 // user defined functions
1126 public class Xcls_diff_view : Object
1128 public Gtk.SourceView el;
1129 private MergeBranch _this;
1135 public Xcls_diff_view(MergeBranch _owner )
1138 _this.diff_view = this;
1139 this.el = new Gtk.SourceView();
1145 var description = Pango.FontDescription.from_string("monospace");
1146 description.set_size(9000);
1147 this.el.override_font(description);
1148 var lm = Gtk.SourceLanguageManager.get_default();
1150 ((Gtk.SourceBuffer)(this.el.get_buffer())).set_language(
1151 lm.get_language("diff")
1155 // user defined functions
1160 public class Xcls_Box28 : Object
1163 private MergeBranch _this;
1169 public Xcls_Box28(MergeBranch _owner )
1172 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
1176 // set gobject values
1177 this.el.homogeneous = false;
1178 var child_0 = new Xcls_scrolled_window( _this );
1180 this.el.add ( child_0.el );
1183 // user defined functions
1185 public class Xcls_scrolled_window : Object
1187 public Gtk.ScrolledWindow el;
1188 private MergeBranch _this;
1194 public Xcls_scrolled_window(MergeBranch _owner )
1197 _this.scrolled_window = this;
1198 this.el = new Gtk.ScrolledWindow( null, null );
1202 // set gobject values
1203 this.el.height_request = 500;
1204 this.el.vexpand = true;
1205 var child_0 = new Xcls_view( _this );
1207 this.el.add ( child_0.el );
1212 this.el.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);
1216 // user defined functions
1218 public class Xcls_view : Object
1220 public WebKit.WebView el;
1221 private MergeBranch _this;
1227 public Xcls_view(MergeBranch _owner )
1231 this.el = new WebKit.WebView();
1235 // set gobject values
1238 // user defined functions
1239 public void loadTicket (string tid) {
1241 _this.el.get_size(out w, out h);
1244 _this.scrolled_window.el.hide();
1245 _this.el.resize(w, 150);
1247 _this.scrolled_window.el.show();
1248 _this.el.resize(w, 800);
1251 var rs = RooTicket.singleton();
1252 var uri = new WebKit.URIRequest("https://roojs.com/admin.php/MTrack/View/" + tid);
1253 var hd = uri.get_http_headers();
1254 var authCode = Base64.encode ("%s:%s".printf(rs.username, rs.password).data);
1255 hd.append("Authorization", "Basic %s".printf(authCode));
1257 this.el.load_request(uri);
1264 public class Xcls_spinner : Object
1266 public Gtk.Spinner el;
1267 private MergeBranch _this;
1273 public Xcls_spinner(MergeBranch _owner )
1276 _this.spinner = this;
1277 this.el = new Gtk.Spinner();
1281 // set gobject values
1282 this.el.hexpand = true;
1283 this.el.vexpand = true;
1286 // user defined functions
1290 public class Xcls_Button32 : Object
1292 public Gtk.Button el;
1293 private MergeBranch _this;
1299 public Xcls_Button32(MergeBranch _owner )
1302 this.el = new Gtk.Button();
1306 // set gobject values
1307 this.el.relief = Gtk.ReliefStyle.NONE;
1308 this.el.label = "Cancel";
1311 // user defined functions
1314 public class Xcls_mergebtn : Object
1316 public Gtk.Button el;
1317 private MergeBranch _this;
1323 public Xcls_mergebtn(MergeBranch _owner )
1326 _this.mergebtn = this;
1327 this.el = new Gtk.Button();
1331 // set gobject values
1332 this.el.label = "Do Merge";
1337 this.el.get_style_context().add_class("suggested-action");
1341 // user defined functions
1342 public void updateState () {
1343 if (_this.actionsel.selectedAction() == "") {
1344 // need to select an action..
1345 this.el.set_sensitive(false);
1350 this.el.set_sensitive(true);