Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
why3
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
119
Issues
119
List
Boards
Labels
Service Desk
Milestones
Merge Requests
16
Merge Requests
16
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Why3
why3
Commits
30f8be58
Commit
30f8be58
authored
Apr 18, 2015
by
MARCHE Claude
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
choice of icon family: license
parent
3b400c17
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
57 additions
and
37 deletions
+57
-37
share/images/icons.rc
share/images/icons.rc
+2
-0
src/ide/gconfig.ml
src/ide/gconfig.ml
+53
-24
src/ide/gmain.ml
src/ide/gmain.ml
+2
-13
No files found.
share/images/icons.rc
View file @
30f8be58
[iconset boomy]
name = "Boomy"
license = "license.txt"
default = "undone32"
undone = "undone32"
scheduled = "pausehalf32"
...
...
@@ -36,6 +37,7 @@ cleaning = "trashb32"
[iconset fatcow]
name = "FatCow"
license = "readme-fatcow.txt"
default = "delete"
undone = "bullet_white"
scheduled = "control_pause_blue"
...
...
src/ide/gconfig.ml
View file @
30f8be58
...
...
@@ -99,8 +99,7 @@ let default_ide =
ide_premise_color
=
"chartreuse"
;
ide_goal_color
=
"gold"
;
ide_error_color
=
"orange"
;
ide_iconset
=
"boomy"
;
(* ide_replace_prover = CRP_Ask; *)
ide_iconset
=
"fatcow"
;
ide_default_prover
=
""
;
ide_default_editor
=
(
try
Sys
.
getenv
"EDITOR"
^
" %f"
...
...
@@ -346,16 +345,25 @@ let iconname_cleaning = ref ""
let
iconsets
()
=
let
main
=
get_main
()
in
let
n
=
Filename
.
concat
(
datadir
main
)
(
Filename
.
concat
"images"
"icons.rc"
)
let
dir
=
Filename
.
concat
(
datadir
main
)
"images"
in
let
n
=
Filename
.
concat
dir
"icons.rc"
in
let
d
=
Rc
.
from_file
n
in
Rc
.
get_family
d
"iconset"
(
dir
,
Rc
.
get_family
d
"iconset"
)
let
load_icon_names
()
=
let
ide
=
config
()
in
let
iconset
=
ide
.
iconset
in
let
d
=
List
.
assoc
iconset
(
iconsets
()
)
in
let
_
,
iconsets
=
iconsets
()
in
let
d
=
try
List
.
assoc
iconset
iconsets
with
Not_found
->
try
List
.
assoc
"fatcow"
iconsets
with
Not_found
->
failwith
"No icon set found"
in
let
get_icon_name
n
=
Filename
.
concat
iconset
(
get_string
~
default
:
"default"
d
n
)
in
...
...
@@ -739,26 +747,47 @@ let appearance_settings (c : t) (notebook:GPack.notebook) =
let
icon_sets_box_pack
=
icon_sets_box
#
pack
?
from
:
None
?
expand
:
None
?
fill
:
None
?
padding
:
None
in
let
dir
,
iconsets
=
iconsets
()
in
let
set_icon_set
s
()
=
c
.
iconset
<-
s
in
let
(
_
,
choices
)
=
List
.
fold_left
(
fun
(
acc
,
l
)
(
s
,_
)
->
match
acc
with
|
None
->
let
choice
=
GButton
.
radio_button
~
label
:
s
~
active
:
(
c
.
iconset
=
s
)
~
packing
:
icon_sets_box_pack
()
in
(
Some
choice
,
(
s
,
choice
)
::
l
)
|
Some
c0
->
let
choice
=
GButton
.
radio_button
~
label
:
s
~
active
:
(
c
.
iconset
=
s
)
~
group
:
c0
#
group
~
packing
:
icon_sets_box_pack
()
in
(
acc
,
(
s
,
choice
)
::
l
))
(
None
,
[]
)
(
iconsets
()
)
(
fun
(
acc
,
l
)
(
s
,
fields
)
->
let
name
=
Rc
.
get_string
~
default
:
s
fields
"name"
in
let
license
=
Rc
.
get_string
~
default
:
""
fields
"license"
in
let
acc
,
choice
=
match
acc
with
|
None
->
let
choice
=
GButton
.
radio_button
~
label
:
name
~
active
:
(
c
.
iconset
=
s
)
~
packing
:
icon_sets_box_pack
()
in
(
Some
choice
,
choice
)
|
Some
c0
->
let
choice
=
GButton
.
radio_button
~
label
:
name
~
active
:
(
c
.
iconset
=
s
)
~
group
:
c0
#
group
~
packing
:
icon_sets_box_pack
()
in
(
acc
,
choice
)
in
if
license
<>
""
then
begin
let
f
=
Filename
.
concat
(
Filename
.
concat
dir
s
)
license
in
let
c
=
Sysutil
.
file_contents
f
in
let
text
=
"See license in "
^
f
^
":
\n\n
"
in
let
l
=
String
.
length
c
in
let
text
=
if
l
>=
256
then
text
^
String
.
sub
c
0
255
^
"
\n
[...]"
else
text
^
c
in
choice
#
misc
#
set_tooltip_markup
text
end
;
(
acc
,
(
s
,
choice
)
::
l
))
(
None
,
[]
)
iconsets
in
List
.
iter
(
fun
(
s
,
c
)
->
...
...
src/ide/gmain.ml
View file @
30f8be58
...
...
@@ -109,17 +109,6 @@ let try_convert s =
s
with
Glib
.
Convert
.
Error
_
as
e
->
Printexc
.
to_string
e
let
source_text
fname
=
try
let
ic
=
open_in
fname
in
let
size
=
in_channel_length
ic
in
let
buf
=
String
.
create
size
in
really_input
ic
buf
0
size
;
close_in
ic
;
try_convert
buf
with
e
when
not
(
Debug
.
test_flag
Debug
.
stack_trace
)
->
"Error while opening or reading file '"
^
fname
^
"':
\n
"
^
(
Printexc
.
to_string
e
)
(***************)
(* Main window *)
(***************)
...
...
@@ -610,7 +599,7 @@ let update_tabs a =
let
env
=
env_session
()
in
match
S
.
get_edited_as_abs
env
.
S
.
session
a
with
|
None
->
""
|
Some
f
->
source_text
f
|
Some
f
->
Sysutil
.
file_contents
f
end
|
_
->
""
in
...
...
@@ -1959,7 +1948,7 @@ let scroll_to_file f =
then
why_lang
else
any_lang
f
in
source_view
#
source_buffer
#
set_language
lang
;
source_view
#
source_buffer
#
set_text
(
source_text
f
);
source_view
#
source_buffer
#
set_text
(
Sysutil
.
file_contents
f
);
set_current_file
f
;
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment