Added new status icons

pull/41/head
parent 2f49c37c72
commit f124869f2b

@ -127,6 +127,11 @@ install: check uninstall
@install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/status/" "com.ublinux.${PKGNAME}.folder-symbolic.svg" @install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/status/" "com.ublinux.${PKGNAME}.folder-symbolic.svg"
@install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/status/" "com.ublinux.${PKGNAME}.folder-green-symbolic.svg" @install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/status/" "com.ublinux.${PKGNAME}.folder-green-symbolic.svg"
@install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/status/" "com.ublinux.${PKGNAME}.folder-red-symbolic.svg" @install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/status/" "com.ublinux.${PKGNAME}.folder-red-symbolic.svg"
@install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/status/" "com.ublinux.${PKGNAME}.folder-red-symbolic.svg"
@install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/status/" "com.ublinux.${PKGNAME}.document-sign-error-symbolic.svg"
@install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/status/" "com.ublinux.${PKGNAME}.warning-symbolic.svg"
@install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/status/" "com.ublinux.${PKGNAME}.chain-error-symbolic.svg"
@install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/status/" "com.ublinux.${PKGNAME}.chain-symbolic.svg"
@install -Dm755 -t "${DESTDIR}/usr/share/${PKGNAME}/csv/" "crypt-key.csv" @install -Dm755 -t "${DESTDIR}/usr/share/${PKGNAME}/csv/" "crypt-key.csv"
@install -Dm644 -t "${DESTDIR}${PREFIX}/share/applications/" "${PKGNAME}.desktop" @install -Dm644 -t "${DESTDIR}${PREFIX}/share/applications/" "${PKGNAME}.desktop"
@install -Dm755 -t "${DESTDIR}${PREFIX}/bin/" "${CMAKE_BUILD_DIR}/${PKGNAME}" @install -Dm755 -t "${DESTDIR}${PREFIX}/bin/" "${CMAKE_BUILD_DIR}/${PKGNAME}"

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
viewBox="0 0 640 512"
version="1.1"
id="svg4"
sodipodi:docname="com.ublinux.ubl-settings-repomanager.chain-error-symbolic.svg"
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04, custom)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs8" />
<sodipodi:namedview
id="namedview6"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
showgrid="false"
inkscape:zoom="1.4199219"
inkscape:cx="319.7359"
inkscape:cy="255.64787"
inkscape:window-width="1920"
inkscape:window-height="1023"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg4" />
<!--!Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.-->
<g>
<path class="error" d="M579.8 267.7c56.5-56.5 56.5-148 0-204.5c-50-50-128.8-56.5-186.3-15.4l-1.6 1.1c-14.4 10.3-17.7 30.3-7.4 44.6s30.3 17.7 44.6 7.4l1.6-1.1c32.1-22.9 76-19.3 103.8 8.6c31.5 31.5 31.5 82.5 0 114L422.3 334.8c-31.5 31.5-82.5 31.5-114 0c-27.9-27.9-31.5-71.8-8.6-103.8l1.1-1.6c10.3-14.4 6.9-34.4-7.4-44.6s-34.4-6.9-44.6 7.4l-1.1 1.6C206.5 251.2 213 330 263 380c56.5 56.5 148 56.5 204.5 0L579.8 267.7zM60.2 244.3c-56.5 56.5-56.5 148 0 204.5c50 50 128.8 56.5 186.3 15.4l1.6-1.1c14.4-10.3 17.7-30.3 7.4-44.6s-30.3-17.7-44.6-7.4l-1.6 1.1c-32.1 22.9-76 19.3-103.8-8.6C74 372 74 321 105.5 289.5L217.7 177.2c31.5-31.5 82.5-31.5 114 0c27.9 27.9 31.5 71.8 8.6 103.9l-1.1 1.6c-10.3 14.4-6.9 34.4 7.4 44.6s34.4 6.9 44.6-7.4l1.1-1.6C433.5 260.8 427 182 377 132c-56.5-56.5-148-56.5-204.5 0L60.2 244.3z" id="path2" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--!Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M579.8 267.7c56.5-56.5 56.5-148 0-204.5c-50-50-128.8-56.5-186.3-15.4l-1.6 1.1c-14.4 10.3-17.7 30.3-7.4 44.6s30.3 17.7 44.6 7.4l1.6-1.1c32.1-22.9 76-19.3 103.8 8.6c31.5 31.5 31.5 82.5 0 114L422.3 334.8c-31.5 31.5-82.5 31.5-114 0c-27.9-27.9-31.5-71.8-8.6-103.8l1.1-1.6c10.3-14.4 6.9-34.4-7.4-44.6s-34.4-6.9-44.6 7.4l-1.1 1.6C206.5 251.2 213 330 263 380c56.5 56.5 148 56.5 204.5 0L579.8 267.7zM60.2 244.3c-56.5 56.5-56.5 148 0 204.5c50 50 128.8 56.5 186.3 15.4l1.6-1.1c14.4-10.3 17.7-30.3 7.4-44.6s-30.3-17.7-44.6-7.4l-1.6 1.1c-32.1 22.9-76 19.3-103.8-8.6C74 372 74 321 105.5 289.5L217.7 177.2c31.5-31.5 82.5-31.5 114 0c27.9 27.9 31.5 71.8 8.6 103.9l-1.1 1.6c-10.3 14.4-6.9 34.4 7.4 44.6s34.4 6.9 44.6-7.4l1.1-1.6C433.5 260.8 427 182 377 132c-56.5-56.5-148-56.5-204.5 0L60.2 244.3z"/></svg>

After

Width:  |  Height:  |  Size: 1009 B

@ -0,0 +1,62 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
id="svg2"
viewBox="0 0 100 100"
version="1.1"
sodipodi:docname="com.ublinux.ubl-settings-repomanager.document-sign-symbolic.svg"
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04, custom)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs498" />
<sodipodi:namedview
id="namedview496"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
showgrid="false"
inkscape:zoom="5.1406663"
inkscape:cx="-3.7932826"
inkscape:cy="51.938792"
inkscape:window-width="1920"
inkscape:window-height="1023"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg2" />
<linearGradient
id="SVGID_1_"
gradientUnits="userSpaceOnUse"
x1="50"
y1="754.7531"
x2="50"
y2="828.357"
gradientTransform="translate(0,-742.08062)">
<stop
offset="0"
style="stop-color:#35762e"
id="stop488" />
<stop
offset="1"
style="stop-color:#6daa43"
id="stop490" />
</linearGradient>
<path
id="path493"
class="error"
style="display:inline;fill:#1a1a1a;stroke-width:1.16507"
d="M 50.361177,1.5488617 A 23.427829,24.021389 0 0 0 28.297887,17.661878 c -0.02133,0.01144 -0.04386,0.02079 -0.06517,0.03225 v 0.145162 a 23.427829,24.021389 0 0 0 -1.298898,7.730469 23.427829,24.021389 0 0 0 4.539401,14.110698 c 0,0 0.0023,0.0024 0.0023,0.0024 2.246699,3.69522 5.500248,6.687335 9.393416,8.562272 v 41.408124 l 9.550721,9.792695 9.550721,-9.792695 -0.57529,-8.61066 4.485468,-4.601414 -4.485468,-4.601415 6.78663,-6.960878 -6.78663,-6.960878 0.57529,-9.672879 c 4.004586,-1.958268 7.371165,-5.141825 9.645105,-9.064579 a 23.427829,24.021389 0 0 0 4.175351,-13.610695 23.427829,24.021389 0 0 0 -0.885408,-6.51387 v -0.552999 c -0.06101,-0.03572 -0.125335,-0.06593 -0.186521,-0.101386 A 23.427829,24.021389 0 0 0 50.361177,1.5488617 Z m 0.09888,11.9816513 A 11.933611,3.3885097 0 0 1 62.392839,16.919938 11.933611,3.3885097 0 0 1 50.460055,20.309362 11.933611,3.3885097 0 0 1 38.525024,16.919938 11.933611,3.3885097 0 0 1 50.460055,13.530513 Z M 44.09141,53.671347 h 3.222525 V 86.351298 H 44.09141 Z" />
<rect
class="error"
style="fill:#1a1a1a;stroke-width:1.899"
id="rect2334"
width="9.6674757"
height="39.283848"
x="40.868935"
y="50.3694" />
</svg>

After

Width:  |  Height:  |  Size: 2.7 KiB

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Free 6.4.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2023 Fonticons, Inc. --><path class="warning" d="M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480H40c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24V296c0 13.3 10.7 24 24 24s24-10.7 24-24V184c0-13.3-10.7-24-24-24zm32 224a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"/></svg>

After

Width:  |  Height:  |  Size: 610 B

@ -1244,7 +1244,7 @@ void yon_config_load_update(main_window *widgets){
char *name = yon_char_new(storages[i]); char *name = yon_char_new(storages[i]);
free(yon_char_divide(name,yon_char_find_last(name,'/'))); free(yon_char_divide(name,yon_char_find_last(name,'/')));
gtk_tree_store_append(widgets->RepoList,&iter,NULL); gtk_tree_store_append(widgets->RepoList,&iter,NULL);
gtk_tree_store_set(widgets->RepoList,&iter,1,folder_no_edits,2,name,3,storages[i],-1); gtk_tree_store_set(widgets->RepoList,&iter,0,folder_no_edits,2,name,3,storages[i],-1);
free(name); free(name);
yon_window_config_get_parameter("storage_info",storages[i],&name,YON_TYPE_STRING); yon_window_config_get_parameter("storage_info",storages[i],&name,YON_TYPE_STRING);
if (!yon_char_is_empty(name)){ if (!yon_char_is_empty(name)){
@ -1254,14 +1254,23 @@ void yon_config_load_update(main_window *widgets){
char *nm = yon_char_new(name_parsed[j]); char *nm = yon_char_new(name_parsed[j]);
free(yon_char_divide(nm,yon_char_find_last(nm,'/'))); free(yon_char_divide(nm,yon_char_find_last(nm,'/')));
gtk_tree_store_append(widgets->RepoList,&itar,&iter); gtk_tree_store_append(widgets->RepoList,&itar,&iter);
gtk_tree_store_set(widgets->RepoList,&itar,1,document_no_edits,3,name_parsed[j],2,nm,-1); gtk_tree_store_set(widgets->RepoList,&itar,2,nm,3,name_parsed[j],-1);
int size; int size;
config_str dirs = yon_file_list_dirs(name_parsed[j],&size); config_str dirs = yon_file_list_dirs(name_parsed[j],&size);
for (int k=0;k<size;k++){ for (int k=0;k<size;k++){
if (strcmp(dirs[k],"pool")&&strcmp(dirs[k],nm)){ if (strcmp(dirs[k],"pool")&&strcmp(dirs[k],nm)){
char *arch_path = yon_char_unite(name_parsed[j],"/",dirs[k],NULL); char *arch_path = yon_char_unite(name_parsed[j],"/",dirs[k],NULL);
int arch_status = system(yon_repo_get_signature_status_arch(storages[i],nm,dirs[k]));
int packages_status = system(yon_repo_get_signature_status_packages(storages[i],nm,dirs[k]));
char *sign_status_image = "";
if (arch_status==2||packages_status==2)
sign_status_image = warning_icon_name;
else if (!arch_status&&!packages_status){
sign_status_image = key_icon_name;
} else
sign_status_image = "";
gtk_tree_store_append(widgets->RepoList,&childiter,&itar); gtk_tree_store_append(widgets->RepoList,&childiter,&itar);
gtk_tree_store_set(widgets->RepoList,&childiter,1,folder_no_edits,2,dirs[k],3,arch_path,-1); gtk_tree_store_set(widgets->RepoList,&childiter,0,sign_status_image,2,dirs[k],3,arch_path,-1);
} }
} }
free(nm); free(nm);
@ -1412,8 +1421,14 @@ void on_main_tree_selection_changed(GtkWidget *self, main_window *widgets){
config_str load = yon_config_load(yon_get_package_name_from_filename(name),&load_size); config_str load = yon_config_load(yon_get_package_name_from_filename(name),&load_size);
if (load_size>0){ if (load_size>0){
yon_char_remove_last_symbol(load[0],'\n'); yon_char_remove_last_symbol(load[0],'\n');
int package_status = system(yon_debug_output("%s\n",yon_repo_get_signature_status(storage,repo,arch,load[0])));
char *sign_status_icon = "";
if (!package_status)
sign_status_icon = package_signature_icon_name;
else
sign_status_icon = package_signature_error_icon_name;
gtk_list_store_append(widgets->RepoFileList,&itar); gtk_list_store_append(widgets->RepoFileList,&itar);
gtk_list_store_set(widgets->RepoFileList,&itar,1,line[0],2,line[1],-1); gtk_list_store_set(widgets->RepoFileList,&itar,0,sign_status_icon,1,line[0],2,line[1],-1);
yon_char_parsed_free(load,load_size); yon_char_parsed_free(load,load_size);
} }
} else { } else {

@ -41,6 +41,12 @@
#define LocaleName "ubl-settings-repomanager" #define LocaleName "ubl-settings-repomanager"
#define key_icon_name "com.ublinux.libublsettingsui-gtk3.key-symbolic" #define key_icon_name "com.ublinux.libublsettingsui-gtk3.key-symbolic"
#define key_error_icon_name "com.ublinux.ubl-settings-repomanager.document-sign-error-symbolic"
#define package_signature_icon_name "com.ublinux.ubl-settings-repomanager.chain-symbolic"
#define package_signature_error_icon_name "com.ublinux.ubl-settings-repomanager.chain-error-symbolic"
#define warning_icon_name "com.ublinux.ubl-settings-repomanager.warning-symbolic"
#define package_linked_icon "com.ublinux.ubl-settings-repomanager.package-linked-symbolic" #define package_linked_icon "com.ublinux.ubl-settings-repomanager.package-linked-symbolic"
#define package_unlinked_icon "com.ublinux.ubl-settings-repomanager.package-unlinked-symbolic" #define package_unlinked_icon "com.ublinux.ubl-settings-repomanager.package-unlinked-symbolic"
@ -66,6 +72,9 @@ typedef char* string;
#define yon_get_packages_command(path,repo,arch) yon_char_unite("repo-manager show --quiet -d ",path," -a ",arch," -r ",repo," | sed -E 's/(\\S+)(\\s+)(\\S+)/\\1 \\3/g'",NULL) #define yon_get_packages_command(path,repo,arch) yon_char_unite("repo-manager show --quiet -d ",path," -a ",arch," -r ",repo," | sed -E 's/(\\S+)(\\s+)(\\S+)/\\1 \\3/g'",NULL)
#define yon_repo_get_signature(path, repo) yon_char_unite("repo-manager verify --quiet -d ",path," -r ",repo," . 2>&1 | cut -d: -f2 |sed -E 's/ *//g'",NULL) #define yon_repo_get_signature(path, repo) yon_char_unite("repo-manager verify --quiet -d ",path," -r ",repo," . 2>&1 | cut -d: -f2 |sed -E 's/ *//g'",NULL)
#define yon_repo_get_signature_status(path,repo,arch, package) yon_char_unite("repo-manager verify --quiet -d ",path," -r ",repo," ",package,NULL)
#define yon_repo_get_signature_status_arch(path,repo,arch) yon_char_unite("repo-manager verify --quiet -d ",path," -r ",repo," .",NULL)
#define yon_repo_get_signature_status_packages(path,repo,arch) yon_char_unite("repo-manager verify --quiet -d ",path," -r ",repo,NULL)
#define yon_get_package_name_from_filename(path) yon_char_unite("[[ '",path,"' =~ (.*/)*(.*)-[^-]+-[^-]+-[^-]+\\.pkg\\.tar\\.[^.-]+ ]] && echo ${BASH_REMATCH[2]}",NULL) #define yon_get_package_name_from_filename(path) yon_char_unite("[[ '",path,"' =~ (.*/)*(.*)-[^-]+-[^-]+-[^-]+\\.pkg\\.tar\\.[^.-]+ ]] && echo ${BASH_REMATCH[2]}",NULL)

@ -241,13 +241,6 @@
<attribute name="icon-name">0</attribute> <attribute name="icon-name">0</attribute>
</attributes> </attributes>
</child> </child>
<child>
<object class="GtkCellRendererPixbuf"/>
<attributes>
<attribute name="visible">4</attribute>
<attribute name="icon-name">1</attribute>
</attributes>
</child>
<child> <child>
<object class="GtkCellRendererText"/> <object class="GtkCellRendererText"/>
<attributes> <attributes>

Loading…
Cancel
Save