From: Claudio Sacerdoti Coen Date: Thu, 6 Nov 2003 16:56:53 +0000 (+0000) Subject: First release that compiles under lablgtk2 (but it does not work, actually!) X-Git-Tag: V_0_2_2~30 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=de5806b393edcff7f4c7cda2e48b11b1a002dde2;p=helm.git First release that compiles under lablgtk2 (but it does not work, actually!) --- diff --git a/helm/hbugs/client/Makefile b/helm/hbugs/client/Makefile index 19491ded7..5cb7c6c6d 100644 --- a/helm/hbugs/client/Makefile +++ b/helm/hbugs/client/Makefile @@ -1,6 +1,6 @@ NAME = hbugs_client METADIR = ../meta -REQUIRES = lablgtk threads hbugs-common +REQUIRES = lablgtk2 threads hbugs-common PREDICATES = glade init COMMONOPTS = -package "$(REQUIRES)" -predicates "$(PREDICATES)" OCAMLC = OCAMLPATH="$(METADIR)" ocamlfind ocamlc $(COMMONOPTS) @@ -16,7 +16,7 @@ byte: $(NAME) opt: $(NAME).opt hbugs_client_gui.ml: hbugs_gui.glade - lablgladecc $< > $@ + lablgladecc2 $< > $@ hbugs_client_gui.cmo: hbugs_client_gui.ml $(OCAMLC) -c $< hbugs_client_gui.cmx: hbugs_client_gui.ml diff --git a/helm/hbugs/client/hbugs_client.ml b/helm/hbugs/client/hbugs_client.ml index 1cab49c76..f15a6357b 100644 --- a/helm/hbugs/client/hbugs_client.ml +++ b/helm/hbugs/client/hbugs_client.ml @@ -133,6 +133,7 @@ class hbugsClient subscribeWindow#subscribeWindow#show ())); (* GUI: hints list *) +(*CSC: per farlo compilare ignore (mainWindow#hintsCList#connect#select_row (fun ~row ~column ~event -> match event with @@ -141,6 +142,7 @@ class hbugsClient | Some event -> describe_hint_callback (self#hint row) | _ -> ())); +*) (* GUI: main status bar *) let ctxt = mainWindow#mainWindowStatusBar#new_context "0" in @@ -151,7 +153,8 @@ class hbugsClient ignore (subscribeWindow#subscribeWindow#event#connect#delete (fun _ -> subscribeWindow#subscribeWindow#misc#hide (); true)); ignore (subscribeWindow#listTutorsButton#connect#clicked self#listTutors); - let tutor_id_of_row row = subscribeWindow#tutorsCList#cell_text row 0 in + let tutor_id_of_row row = (*CSC: per farlo compilare subscribeWindow#tutorsCList#cell_text row 0*) "Kaboom" in +(*CSC: per farlo compilare ignore (subscribeWindow#tutorsCList#connect#select_row (fun ~row ~column ~event -> let new_id = tutor_id_of_row row in @@ -162,11 +165,12 @@ class hbugsClient (fun ~row ~column ~event -> selectedTutors <- List.filter ((<>) (tutor_id_of_row row)) selectedTutors)); +*) ignore (subscribeWindow#subscribeButton#connect#clicked self#subscribeSelected); ignore (subscribeWindow#subscribeAllButton#connect#clicked self#subscribeAll); - subscribeWindow#tutorsCList#set_column ~visibility:false 0; + (subscribeWindow#tutorsCList#get_column 0)#set_visible false; let ctxt = subscribeWindow#subscribeWindowStatusBar#new_context "0" in subscribeWindowStatusContext <- Some ctxt; ignore (ctxt#push "Ready"); @@ -248,7 +252,8 @@ Error: %s" List.iter (fun h -> (match h with Hints _ -> assert false | _ -> ()); - ignore (mainWindow#hintsCList#append [string_of_hint h])) +(*CSC: per farlo compilare + ignore (mainWindow#hintsCList#append [string_of_hint h])*)) received_hints; hints <- hints @ received_hints; Hbugs_messages.respond_msg (Wow myOwnId) outchan @@ -336,7 +341,9 @@ Error: %s" *) method stateChange new_state = +(*CSC: per farlo compilare mainWindow#hintsCList#clear (); +*) hints <- []; self#sendReq ~msg:(State_change (myOwnId, new_state)) @@ -358,10 +365,12 @@ Error: %s" availableTutors <- (* sort accordingly to tutor description *) List.sort (fun (a,b) (c,d) -> compare (b,a) (d,c)) descriptions; selectedTutors <- []; +(*CSC: per farlo compilare subscribeWindow#tutorsCList#clear (); +*) List.iter (fun (id, dsc) -> - ignore (subscribeWindow#tutorsCList#append [id; dsc])) + (*CSC: per farlo compilare ignore (subscribeWindow#tutorsCList#append [id; dsc])*)()) availableTutors | unexpected_msg -> self#showDialog @@ -374,14 +383,17 @@ Error: %s" (function | (Subscribed (_, subscribedTutors)) as msg -> let sort = List.sort compare in +(*CSC: per farlo compilare mainWindow#subscriptionCList#clear (); +*) List.iter (fun tutor_id -> +(*CSC: per farlo compilare ignore (mainWindow#subscriptionCList#append [ try List.assoc tutor_id availableTutors; - with Not_found -> assert false ])) + with Not_found -> assert false ])*)()) tutors_id; subscribeWindow#subscribeWindow#misc#hide (); if sort subscribedTutors <> sort tutors_id then @@ -389,7 +401,9 @@ Error: %s" (sprintf "Subscription mismatch\n: %s" (Hbugs_messages.string_of_msg msg)) | unexpected_msg -> +(*CSC: per farlo compilare mainWindow#subscriptionCList#clear (); +*) self#showDialog (sprintf "Subscription FAILED, unexpected message:\n%s" (Hbugs_messages.string_of_msg unexpected_msg))) diff --git a/helm/hbugs/client/hbugs_gui.glade b/helm/hbugs/client/hbugs_gui.glade index 46b78c2e1..f88a8c388 100644 --- a/helm/hbugs/client/hbugs_gui.glade +++ b/helm/hbugs/client/hbugs_gui.glade @@ -1,661 +1,672 @@ - - - - - hbugs_gui - hbugs_gui - - src - pixmaps - C - False - False - - - - GtkWindow - hbugsMainWindow - False - Hbugs: your personal proof trainer! - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - False - True - False - - - GtkVBox - vbox1 - False - 0 - - - GtkMenuBar - menubar - False - GTK_SHADOW_OUT + + + + + + + + Hbugs: your personal proof trainer! + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + False + True + False + + + + True + False + 0 + - 0 - False - False - + - - GtkMenuItem - toolsMenu - - False - - - GtkMenu - toolsMenu_menu - - - GtkCheckMenuItem - toggleDebuggingMenuItem - - False - True - + + + True + Tools + True + + + + True + + + + True + Debugging + True + False + + + + + + - - - - - GtkHBox - hbox4 - False - 2 - - 0 - False - False + + 0 + False + False + - - GtkLabel - label11 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - 0 - False - False - - - - - GtkEntry - clientUrlEntry - Local HTTP daemon URL - True - False - True - 0 - - - 0 - True - True - - - - - GtkButton - startLocalHttpDaemonButton - Start the local HTTP daemon listening on the specified URL - True - - GTK_RELIEF_NORMAL - - 0 - False - False - - - - - GtkButton - testLocalHttpDaemonButton - True - - GTK_RELIEF_NORMAL - - 0 - False - False - - - - - - GtkVBox - vbox4 - False - 0 - 0 - False - True - + + True + False + 2 - - GtkHBox - hbox1 - False - 2 - - 0 - False - False - - - - GtkLabel - label1 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - 0 - False - False + + True + My URL: + False + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + - - - GtkEntry - brokerUrlEntry - HBugs broker URL - True - False - True - 0 - - 0 - True - True + + True + Local HTTP daemon URL + True + False + True + 0 + + True + * + False + + + 0 + True + True + - - - GtkButton - testBrokerButton - True - - GTK_RELIEF_NORMAL - 0 - False - False + + True + Start the local HTTP daemon listening on the specified URL + True + Start! + True + GTK_RELIEF_NORMAL + + + 0 + False + False + - - - - - GtkHBox - hbox2 - False - 2 - - 0 - False - False - - - - GtkLabel - label2 - False - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 + - 0 - False - False + + True + True + Test! + True + GTK_RELIEF_NORMAL + + + 0 + False + False + + + 0 + False + False + + + + + + True + False + 0 - - GtkLabel - clientIdLabel - False - - GTK_JUSTIFY_LEFT - False - 0.5 - 0.5 - 0 - 0 - 0 - True - True + + True + False + 2 + + + + True + Broker: + False + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + True + HBugs broker URL + True + False + True + 0 + + True + * + False + + + 0 + True + True + + + + + + True + True + Test! + True + GTK_RELIEF_NORMAL + + + 0 + False + False + + + + + 0 + False + False + - - - GtkButton - registerClientButton - True - - GTK_RELIEF_NORMAL - 0 - False - False + + True + False + 2 + + + + Client ID: + False + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + + + 0 + True + True + + + + + + True + True + (Re)Register + True + GTK_RELIEF_NORMAL + + + 0 + False + False + + + + + 0 + False + False + - - + + 0 + False + True + + - - GtkVPaned - vpaned1 - 10 - 6 - 0 - 0 - True - True - + + True + 0 - - GtkFrame - frame3 - 4 - - 0 - GTK_SHADOW_ETCHED_IN - - False - False - - - - GtkHBox - hbox6 - False - 2 - - - GtkScrolledWindow - scrolledwindow3 - GTK_POLICY_ALWAYS - GTK_POLICY_ALWAYS - GTK_UPDATE_CONTINUOUS - GTK_UPDATE_CONTINUOUS - - 0 - True - True - - - - GtkCList - subscriptionCList - True - 1 - 80 - GTK_SELECTION_SINGLE - False - GTK_SHADOW_IN - - - GtkLabel - CList:title - label7 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - - - - GtkFixed - fixed1 - - 0 - False - False - - - - GtkButton - showSubscriptionWindowButton - 0 - 0 - 0 - 0 - True - - GTK_RELIEF_NORMAL + + + 4 + True + 0 + 0.5 + GTK_SHADOW_ETCHED_IN + + + + True + False + 2 + + + + True + GTK_POLICY_ALWAYS + GTK_POLICY_ALWAYS + GTK_SHADOW_IN + GTK_CORNER_TOP_LEFT + + + + True + True + True + False + False + True + + + + + 0 + True + True + + + + + + True + + + + 0 + 0 + True + True + Subscribe ... + True + GTK_RELIEF_NORMAL + + + 0 + 0 + + + + + 0 + False + False + + + + + + + + True + Subscriptions + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + + + label_item + + - - - - - - GtkFrame - frame2 - 4 - 250 - - 0 - GTK_SHADOW_ETCHED_IN - - True - True - - - - GtkVBox - vbox6 - False - 0 - - - GtkScrolledWindow - scrolledwindow2 - 400 - GTK_POLICY_ALWAYS - GTK_POLICY_ALWAYS - GTK_UPDATE_CONTINUOUS - GTK_UPDATE_CONTINUOUS - - 0 - True - True - - - - GtkCList - hintsCList - True - 1 - 80 - GTK_SELECTION_SINGLE - False - GTK_SHADOW_IN - - - GtkLabel - CList:title - label6 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - + + False + False + + + + + + 4 + True + 0 + 0.5 + GTK_SHADOW_ETCHED_IN + + + + True + False + 0 + + + + True + GTK_POLICY_ALWAYS + GTK_POLICY_ALWAYS + GTK_SHADOW_IN + GTK_CORNER_TOP_LEFT + + + + True + True + True + False + False + True + + + + + 0 + True + True + + + + + + + + True + Hints + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + + + label_item + + - + + True + True + + - - + + 0 + True + True + + - - GtkStatusbar - mainWindowStatusBar - False - 0 - False - False + + True + + + 0 + False + False + - + - - GtkWindow - subscribeWindow - False - Hbugs: subscribe ... - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - False - True - False - - - GtkVBox - vbox8 - False - 0 - - - GtkButton - listTutorsButton - True - - GTK_RELIEF_NORMAL - - 0 - False - False - - + + Hbugs: subscribe ... + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + False + True + False + + + + True + False + 0 - - GtkScrolledWindow - scrolledwindow4 - GTK_POLICY_ALWAYS - GTK_POLICY_ALWAYS - GTK_UPDATE_CONTINUOUS - GTK_UPDATE_CONTINUOUS - 0 - True - True + + True + True + Refresh + True + GTK_RELIEF_NORMAL + + + 0 + False + False + - - GtkCList - tutorsCList - 600 - 300 - True - 2 - 205,80 - GTK_SELECTION_EXTENDED - True - GTK_SHADOW_IN - - - GtkLabel - CList:title - label12 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - + + + True + GTK_POLICY_ALWAYS + GTK_POLICY_ALWAYS + GTK_SHADOW_IN + GTK_CORNER_TOP_LEFT - - GtkLabel - CList:title - label13 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 + + + True + True + True + False + False + True + + - - + + 0 + True + True + + - - GtkHBox - hbox5 - False - 0 - 0 - False - False - + + True + False + 0 - - GtkButton - subscribeButton - True - - GTK_RELIEF_NORMAL - - 0 - True - True - - - - - GtkButton - subscribeAllButton - True - - GTK_RELIEF_NORMAL - - 0 - True - True - - - + + + True + True + Subscribe to Selected + True + GTK_RELIEF_NORMAL + + + 0 + True + True + + + + + + True + True + Subscribe to All + True + GTK_RELIEF_NORMAL + + + 0 + True + True + + + + + 0 + False + False + + - - GtkStatusbar - subscribeWindowStatusBar - 0 - False - False + + True + True + + + 0 + False + False + - + - - GtkDialog - messageDialog - False - Message - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_CENTER - True - 220 - 150 - True - True - False - - - GtkVBox - Dialog:vbox - dialogVbox1 - False - 0 - - - GtkHBox - Dialog:action_area - dialogAction_area1 - 2 - True - 5 - - 0 - False - True - GTK_PACK_END - + + Message + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + True + 220 + 150 + True + False + True + + + + True + False + 0 + + + + True + GTK_BUTTONBOX_END - - GtkButton - okDialogButton - True - - GTK_RELIEF_NORMAL - - 0 - False - True - - - + + + True + True + OK + True + GTK_RELIEF_NORMAL + 0 + + + + + 0 + False + True + GTK_PACK_END + + - - GtkTable - table1 - 5 - 1 - 1 - False - 0 - 0 - 0 - True - True - + + 5 + True + 1 + 1 + False + 0 + 0 - - GtkLabel - dialogLabel - - GTK_JUSTIFY_CENTER - True - 0.5 - 0.5 - 0 - 0 - - 0 - 1 - 0 - 1 - 0 - 0 - True - True - False - False - True - True - - + + + True + + False + False + GTK_JUSTIFY_CENTER + True + False + 0.5 + 0.5 + 0 + 0 + + + 0 + 1 + 0 + 1 + + + + + 0 + True + True + + - + - +