Merge pull request 'master' (#7) from YanTheKaller/ubl-settings-repomanager:master into master

Reviewed-on: #7
pull/22/head
Dmitry Razumov 2 years ago
commit 198ad04d18

3
.gitignore vendored

@ -1,6 +1,7 @@
.vscode/ .vscode/
*# *#
ubl-settings-repomanager ubl-settings-repomanager
ubl-settings-TEMPLATE
ubl-settings-repo-back/ubl-settings-repo-back ubl-settings-repo-back/ubl-settings-repo-back
*~ *~
build/ build/
@ -9,3 +10,5 @@ terminal-commands/
source/ubl-cmake.h source/ubl-cmake.h
.BUILD.md .BUILD.md
.updatebuild.sh .updatebuild.sh
.install.sh
*vgcore*

@ -12,6 +12,7 @@ DEPENDS = /bin/cmake
PREFIX ?= /usr/local PREFIX ?= /usr/local
PKGNAME = $(MAKEFILE_DIR) PKGNAME = $(MAKEFILE_DIR)
FILE_VER = source/${PKGNAME}.h FILE_VER = source/${PKGNAME}.h
PKGIDENT=$(subst /,-,${PREFIX})
default_target: all default_target: all
@ -74,7 +75,7 @@ uninstall:
@for FILE_PO in $(wildcard *.po); do \ @for FILE_PO in $(wildcard *.po); do \
LANG=$${FILE_PO##*_};LANG=$${LANG%.*}; \ LANG=$${FILE_PO##*_};LANG=$${LANG%.*}; \
FILE_MO=$${FILE_PO##*/}; FILE_MO="$${FILE_MO%_*.po}.mo"; \ FILE_MO=$${FILE_PO##*/}; FILE_MO="$${FILE_MO%_*.po}.mo"; \
PATH_FILE_MO="${DESTDIR}${PREFIX}/share/locale/$${LANG}/LC_MESSAGES/$${FILE_MO}"; \ PATH_FILE_MO="${DESTDIR}/usr/share/locale/$${LANG}/LC_MESSAGES/$${FILE_MO}"; \
$(RM) "$${PATH_FILE_MO}"; \ $(RM) "$${PATH_FILE_MO}"; \
done done
@for SIZE in 16x16 32x32 48x48 scalable; do \ @for SIZE in 16x16 32x32 48x48 scalable; do \
@ -89,7 +90,7 @@ uninstall:
@$(RM) "${DESTDIR}${PREFIX}/bin/${PKGNAME}" @$(RM) "${DESTDIR}${PREFIX}/bin/${PKGNAME}"
@$(RM) "${DESTDIR}${PREFIX}/share/applications/${PKGNAME}.desktop" @$(RM) "${DESTDIR}${PREFIX}/share/applications/${PKGNAME}.desktop"
@$(RM) "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps/com.ublinux.${PKGNAME}.svg" @$(RM) "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps/com.ublinux.${PKGNAME}.svg"
@$(RM) "${DESTDIR}/usr/share/polkit-1/actions/com.ublinux.${PKGNAME}.policy" @$(RM) "${DESTDIR}/usr/share/polkit-1/actions/com.ublinux.${PKGNAME}${PKGIDENT}.policy"
@if [ -z ${DESTDIR} ]; then \ @if [ -z ${DESTDIR} ]; then \
[ -d "${DESTDIR}${PREFIX}/share/icons/hicolor/" ] && gtk-update-icon-cache -fiq "${DESTDIR}${PREFIX}/share/icons/hicolor/" &>/dev/null || true; \ [ -d "${DESTDIR}${PREFIX}/share/icons/hicolor/" ] && gtk-update-icon-cache -fiq "${DESTDIR}${PREFIX}/share/icons/hicolor/" &>/dev/null || true; \
update-desktop-database --quiet &>/dev/null || true; \ update-desktop-database --quiet &>/dev/null || true; \
@ -101,9 +102,9 @@ install: check uninstall
@echo "Install ..." @echo "Install ..."
@for FILE_PO in $(wildcard *.po); do \ @for FILE_PO in $(wildcard *.po); do \
LANG=$${FILE_PO##*_};LANG=$${LANG%.*}; \ LANG=$${FILE_PO##*_};LANG=$${LANG%.*}; \
install -dm755 "${DESTDIR}${PREFIX}/share/locale/$${LANG}/LC_MESSAGES"; \ install -dm755 "${DESTDIR}/usr/share/locale/$${LANG}/LC_MESSAGES"; \
FILE_MO=$${FILE_PO##*/}; FILE_MO="$${FILE_MO%_*.po}.mo"; \ FILE_MO=$${FILE_PO##*/}; FILE_MO="$${FILE_MO%_*.po}.mo"; \
PATH_FILE_MO="${DESTDIR}${PREFIX}/share/locale/$${LANG}/LC_MESSAGES/$${FILE_MO}"; \ PATH_FILE_MO="${DESTDIR}/usr/share/locale/$${LANG}/LC_MESSAGES/$${FILE_MO}"; \
echo "$${FILE_PO}"; \ echo "$${FILE_PO}"; \
msgfmt "$${FILE_PO}" -v -f -o "$${PATH_FILE_MO}"; \ msgfmt "$${FILE_PO}" -v -f -o "$${PATH_FILE_MO}"; \
done done
@ -112,9 +113,8 @@ install: check uninstall
rsvg-convert -w $${SIZE} -h $${SIZE} -f svg --keep-image-data "com.ublinux.${PKGNAME}.svg" -o "${DESTDIR}${PREFIX}/share/icons/hicolor/$${SIZE}x$${SIZE}/apps/com.ublinux.${PKGNAME}.svg"; \ rsvg-convert -w $${SIZE} -h $${SIZE} -f svg --keep-image-data "com.ublinux.${PKGNAME}.svg" -o "${DESTDIR}${PREFIX}/share/icons/hicolor/$${SIZE}x$${SIZE}/apps/com.ublinux.${PKGNAME}.svg"; \
done done
@install -Dm644 -t "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps/" "com.ublinux.${PKGNAME}.svg" @install -Dm644 -t "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps/" "com.ublinux.${PKGNAME}.svg"
@install -Dm644 -t "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/status/" "com.ublinux.${PKGNAME}.checked.svg" @cp ./com.ublinux.${PKGNAME}.policy ./compile/com.ublinux.${PKGNAME}${PKGIDENT}.policy
@install -Dm644 -t "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/status/" "com.ublinux.${PKGNAME}.warning.svg" @sed -e 's+/usr/bin+${PREFIX}/bin+' -e 's+.run+${PKGIDENT}.run+g' ./compile/com.ublinux.${PKGNAME}${PKGIDENT}.policy -i
@install -Dm644 -t "${DESTDIR}/usr/share/polkit-1/actions/" "com.ublinux.${PKGNAME}.policy"
@install -Dm755 -t "${DESTDIR}${PREFIX}/bin/" "${CMAKE_BUILD_DIR}/${PKGNAME}" @install -Dm755 -t "${DESTDIR}${PREFIX}/bin/" "${CMAKE_BUILD_DIR}/${PKGNAME}"
@install -Dm644 -t "${DESTDIR}${PREFIX}/share/applications/" "${PKGNAME}.desktop" @install -Dm644 -t "${DESTDIR}${PREFIX}/share/applications/" "${PKGNAME}.desktop"
@install -Dm644 -t "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/status/" "com.ublinux.${PKGNAME}.checked.svg" @install -Dm644 -t "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/status/" "com.ublinux.${PKGNAME}.checked.svg"
@ -122,10 +122,12 @@ install: check uninstall
@install -Dm644 -t "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/status/" "com.ublinux.${PKGNAME}.document-symbolic.svg" @install -Dm644 -t "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/status/" "com.ublinux.${PKGNAME}.document-symbolic.svg"
@install -Dm644 -t "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/status/" "com.ublinux.${PKGNAME}.document-green-symbolic.svg" @install -Dm644 -t "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/status/" "com.ublinux.${PKGNAME}.document-green-symbolic.svg"
@install -Dm644 -t "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/status/" "com.ublinux.${PKGNAME}.document-red-symbolic.svg" @install -Dm644 -t "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/status/" "com.ublinux.${PKGNAME}.document-red-symbolic.svg"
@install -Dm644 -t "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/status/" "com.ublinux.${PKGNAME}.document-sign-symbolic.svg"
@install -Dm644 -t "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/status/" "com.ublinux.${PKGNAME}.folder-symbolic.svg" @install -Dm644 -t "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/status/" "com.ublinux.${PKGNAME}.folder-symbolic.svg"
@install -Dm644 -t "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/status/" "com.ublinux.${PKGNAME}.folder-green-symbolic.svg" @install -Dm644 -t "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/status/" "com.ublinux.${PKGNAME}.folder-green-symbolic.svg"
@install -Dm644 -t "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/status/" "com.ublinux.${PKGNAME}.folder-red-symbolic.svg" @install -Dm644 -t "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/status/" "com.ublinux.${PKGNAME}.folder-red-symbolic.svg"
@install -Dm644 -t "${DESTDIR}/usr/share/polkit-1/actions/" "${CMAKE_BUILD_DIR}/com.ublinux.${PKGNAME}${PKGIDENT}.policy"
@if [ -z ${DESTDIR} ]; then \ @if [ -z ${DESTDIR} ]; then \
[ -d "${DESTDIR}${PREFIX}/share/icons/hicolor/" ] && gtk-update-icon-cache -fiq "${DESTDIR}${PREFIX}/share/icons/hicolor/" &>/dev/null || true; \ [ -d "${DESTDIR}${PREFIX}/share/icons/hicolor/" ] && gtk-update-icon-cache -fiq "${DESTDIR}${PREFIX}/share/icons/hicolor/" &>/dev/null || true; \
update-desktop-database --quiet &>/dev/null || true; \ update-desktop-database --quiet &>/dev/null || true; \

@ -0,0 +1,60 @@
<?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"
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
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.6 KiB

@ -1 +1,48 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path d="M1 1a1 1 0 00-1 1v11s-.014.459.23.947C.476 14.436 1.168 15 2 15h12s.459.014.947-.23C15.436 14.525 16 13.833 16 13V6H3v7H2V6s0-1 1-1h11v-.832A1 1 0 0013 3H8.414L6.707 1.293A1 1 0 006 1z" style="line-height:normal;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000;text-transform:none;text-orientation:mixed;white-space:normal;shape-padding:0;isolation:auto;mix-blend-mode:normal;solid-color:#000;solid-opacity:1" color="#000" font-weight="400" font-family="sans-serif" overflow="visible" fill="#2e3436" fill-rule="evenodd"/></svg> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="16"
height="16"
version="1.1"
id="svg4"
sodipodi:docname="folder-symbolic-green.svg"
inkscape:version="1.2.1 (9c6d41e410, 2022-07-14)"
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:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
showgrid="false"
inkscape:zoom="32"
inkscape:cx="2.09375"
inkscape:cy="5.84375"
inkscape:window-width="1920"
inkscape:window-height="1017"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="layer1" />
<path
id="path2"
style="line-height:normal;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;text-transform:none;text-orientation:mixed;white-space:normal;shape-padding:0;display:inline;isolation:auto;mix-blend-mode:normal;solid-color:#000000;solid-opacity:1"
d="M 1 1 A 1 1 0 0 0 0 2 L 0 13 C 0 13 -0.013531006 13.459266 0.23046875 13.947266 C 0.4764685 14.436265 1.1680008 15 2 15 L 8.1484375 15 A 4.9792154 4.9792154 0 0 1 7.3964844 12.375 A 4.9792154 4.9792154 0 0 1 12.375 7.3964844 A 4.9792154 4.9792154 0 0 1 16 8.9628906 L 16 6 L 3 6 L 3 13 L 2 13 L 2 6 C 2 6 2.000001 5 3 5 L 14 5 L 14 4.1679688 A 1 1 0 0 0 13 3 L 8.4140625 3 L 6.7070312 1.2929688 A 1 1 0 0 0 6 1 L 1 1 z " />
<g
inkscape:groupmode="layer"
id="layer1"
inkscape:label="Layer 1">
<path
id="path854"
class="success"
style="fill:#00ff00;stroke:none;stroke-width:0;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;fill-opacity:1"
d="M 15.979216,12.375 A 3.6042156,3.6042156 0 0 1 12.375,15.979216 3.6042156,3.6042156 0 0 1 8.7707831,12.375 3.6042156,3.6042156 0 0 1 12.375,8.7707837 3.6042156,3.6042156 0 0 1 15.979216,12.375 Z" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 834 B

After

Width:  |  Height:  |  Size: 2.4 KiB

@ -1 +1,48 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path d="M1 1a1 1 0 00-1 1v11s-.014.459.23.947C.476 14.436 1.168 15 2 15h12s.459.014.947-.23C15.436 14.525 16 13.833 16 13V6H3v7H2V6s0-1 1-1h11v-.832A1 1 0 0013 3H8.414L6.707 1.293A1 1 0 006 1z" style="line-height:normal;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000;text-transform:none;text-orientation:mixed;white-space:normal;shape-padding:0;isolation:auto;mix-blend-mode:normal;solid-color:#000;solid-opacity:1" color="#000" font-weight="400" font-family="sans-serif" overflow="visible" fill="#2e3436" fill-rule="evenodd"/></svg> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="16"
height="16"
version="1.1"
id="svg4"
sodipodi:docname="folder-symbolic-red.svg"
inkscape:version="1.2.1 (9c6d41e410, 2022-07-14)"
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:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
showgrid="false"
inkscape:zoom="32"
inkscape:cx="2.09375"
inkscape:cy="5.84375"
inkscape:window-width="1920"
inkscape:window-height="1017"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="svg4" />
<path
id="path2"
style="line-height:normal;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;text-transform:none;text-orientation:mixed;white-space:normal;shape-padding:0;display:inline;isolation:auto;mix-blend-mode:normal;solid-color:#000000;solid-opacity:1"
d="M 1 1 A 1 1 0 0 0 0 2 L 0 13 C 0 13 -0.013531006 13.459266 0.23046875 13.947266 C 0.4764685 14.436265 1.1680008 15 2 15 L 8.1484375 15 A 4.9792154 4.9792154 0 0 1 7.3964844 12.375 A 4.9792154 4.9792154 0 0 1 12.375 7.3964844 A 4.9792154 4.9792154 0 0 1 16 8.9628906 L 16 6 L 3 6 L 3 13 L 2 13 L 2 6 C 2 6 2.000001 5 3 5 L 14 5 L 14 4.1679688 A 1 1 0 0 0 13 3 L 8.4140625 3 L 6.7070312 1.2929688 A 1 1 0 0 0 6 1 L 1 1 z " />
<g
inkscape:groupmode="layer"
id="layer1"
inkscape:label="Layer 1">
<path
id="path854"
class="error"
style="fill:#ff2a2a;stroke:none;stroke-width:0;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none"
d="M 15.979216,12.375 A 3.6042156,3.6042156 0 0 1 12.375,15.979216 3.6042156,3.6042156 0 0 1 8.7707831,12.375 3.6042156,3.6042156 0 0 1 12.375,8.7707837 3.6042156,3.6042156 0 0 1 15.979216,12.375 Z" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 834 B

After

Width:  |  Height:  |  Size: 2.4 KiB

@ -3,6 +3,7 @@
<gresource prefix="/com/ublinux/ui"> <gresource prefix="/com/ublinux/ui">
<file>ubl-settings-repomanager.glade</file> <file>ubl-settings-repomanager.glade</file>
<file>ubl-settings-repomanager-windows.glade</file> <file>ubl-settings-repomanager-windows.glade</file>
<file>ubl-settings-repomanager-sign.glade</file>
</gresource> </gresource>
<gresource prefix="/com/ublinux/css"> <gresource prefix="/com/ublinux/css">
<file>ubl-settings-repomanager.css</file> <file>ubl-settings-repomanager.css</file>

@ -32,6 +32,7 @@ add_custom_target(GLADE ubl-settings-repomanager.glade)
set(DEPENDFILES set(DEPENDFILES
../ubl-settings-repomanager.glade ../ubl-settings-repomanager.glade
../ubl-settings-repomanager-windows.glade ../ubl-settings-repomanager-windows.glade
../ubl-settings-repomanager-sign.glade
../gresource.xml ../gresource.xml
../ubl-settings-repomanager-banner.png ../ubl-settings-repomanager-banner.png
../ubl-settings-repomanager.css ../ubl-settings-repomanager.css

@ -98,43 +98,205 @@ void on_about(){
gtk_widget_show(window); gtk_widget_show(window);
} }
void on_load(){
gsize size=0;
config_str repos = yon_window_config_get_section("repos",&size);
gtk_tree_store_clear(main_config.tree_store);
for (int i=0;i<size;i++){
char *name = yon_char_new(repos[i]);
char *path = yon_char_new(name);
yon_char_divide(name,yon_char_find_last(name,'/'));
GtkTreeIter iter;
gtk_tree_store_append(main_config.tree_store,&iter,NULL);
gtk_tree_store_set(main_config.tree_store,&iter,0,folder_no_edits,1,name,2,path,3,0,4,0,9,name,-1);
char *parameter_string = NULL;
yon_window_config_get_parameter("repos",repos[i],(void*)&parameter_string,YON_TYPE_STRING);
if (parameter_string){
int packsize=0;
config_str packs = yon_char_parse(parameter_string,&packsize," ");
GtkTreeIter packIter;
if (!packs){
FILE *file = popen(get_saved_package_info_command(path,parameter_string),"r");
char *cur_string=g_malloc0(sizeof(char)*4096);
char *packname=NULL, *packver=NULL, *packarch=NULL, *packdepends=NULL;
while (fgets(cur_string,4096,file)){
char *steer = yon_char_divide_search(cur_string,"\n",-1);
char *p = yon_char_divide_search(steer,":",-1);
if (strstr(p,"Name")) packname = yon_char_new(steer);
else if (strstr(p,"Version")) packver = yon_char_new(steer);
else if (strstr(p,"Architecture")) packarch = yon_char_new(steer);
else if (strstr(p,"Depends On")) packdepends = yon_char_new(steer);
}
gtk_tree_store_append(main_config.tree_store,&packIter,&iter);
gtk_tree_store_set(main_config.tree_store,&packIter,0,document_no_edits,1,yon_char_unite(packname,"-",packver,"-",packarch,NULL),2,yon_char_unite(path,"/pool/overlay/",parameter_string,NULL),3,0,4,0,9,packname,10,packver,11,packarch,12,packdepends,-1);
}
else
for (int j=0;j<packsize;j++){
char *command = get_saved_package_info_command(path,packs[j]);
FILE *file = popen(command,"r");
char *cur_string=g_malloc0(sizeof(char)*4096);
char *packname=NULL, *packver=NULL, *packarch=NULL, *packdepends=NULL;
while (fgets(cur_string,4096,file)){
char *steer = yon_char_divide_search(cur_string,"\n",-1);
char *p = yon_char_divide_search(steer,":",-1);
if (strstr(p,"Name")) packname = yon_char_new(steer);
else if (strstr(p,"Version")) packver = yon_char_new(steer);
else if (strstr(p,"Architecture")) packarch = yon_char_new(steer);
else if (strstr(p,"Depends On")) packdepends = yon_char_new(steer);
}
gtk_tree_store_append(main_config.tree_store,&packIter,&iter);
gtk_tree_store_set(main_config.tree_store,&packIter,0,document_no_edits,1,yon_char_unite(packname,"-",packver,"-",packarch,NULL),2,yon_char_unite(path,"/pool/overlay/",parameter_string,NULL),3,0,4,0,9,packname,10,packver,11,packarch,12,packdepends,-1);
}
}
}
}
void on_save(){ void on_save(){
char *command = "repo-manager"; char *command = "repo-manager";
dictionary *pack_groups=NULL;
GtkTreeIter iter, childIter, *deleteIter;
int valid = gtk_tree_model_get_iter_first(GTK_TREE_MODEL(main_config.tree_store),&iter);
for (;valid;valid=gtk_tree_model_iter_next(GTK_TREE_MODEL(main_config.tree_store),&iter)){
char *remove_command=NULL; char *remove_command=NULL;
char *add_signed_command=NULL;
char *add_command=NULL; char *add_command=NULL;
char *remove_flagged = NULL; char *remove_flagged = NULL;
char *add_flagged = NULL; char *add_flagged = NULL;
char *origin_flagged = NULL; char *origin_flagged = NULL;
char *name_flagged = NULL; char *name_flagged = NULL;
GtkTreeIter iter, childIter;
int valid = gtk_tree_model_get_iter_first(GTK_TREE_MODEL(main_config.tree_store),&iter); char *packnames = NULL;
for (;valid;valid=gtk_tree_model_iter_next(GTK_TREE_MODEL(main_config.tree_store),&iter)){ char *sign_flagged = NULL;
remove_flagged = NULL; char *repo_sign_flagged = NULL;
add_flagged = NULL;
int repostatus=0; int repostatus=0;
gboolean renamed=0; gboolean renamed=0;
char *old_name=NULL; char *old_name=NULL;
gtk_tree_model_get(GTK_TREE_MODEL(main_config.tree_store),&iter,1,&name_flagged,3,&origin_flagged,4,&repostatus,6,&old_name,7,&renamed,-1);
// if (!strstr(name_flagged,".db.tar.gz")) name_flagged = yon_char_append(name_flagged,".db.tar.gz"); char *add_packages=NULL;
remove_command = yon_char_unite(command," remove -d ", origin_flagged, " -r ", name_flagged, NULL); char *signed_packages=NULL;
add_command = yon_char_unite(command," add -d ", origin_flagged, " -r ", name_flagged, NULL); char *remove_packages=NULL;
int valid_child=gtk_tree_model_iter_children(GTK_TREE_MODEL(main_config.tree_store),&childIter,&iter);
gtk_tree_model_get(GTK_TREE_MODEL(main_config.tree_store),&iter,1,&name_flagged,2,&origin_flagged,3,&repostatus,4,&old_name,5,&renamed,13,&repo_sign_flagged,-1);
yon_char_divide_search(repo_sign_flagged,"<",-1);
repo_sign_flagged=yon_char_divide_search(repo_sign_flagged,">",-1);
if (repostatus == 1) gtk_tree_store_set(main_config.tree_store,&iter,0,folder_no_edits,3,0,-1);
else if (repostatus == -1){
system(yon_char_unite("rm -rfd ",origin_flagged,NULL));
yon_window_config_erase_custom_parameter(origin_flagged,"repos");
GtkTreeIter *deleteIter = gtk_tree_iter_copy(&iter);
if (!gtk_tree_model_iter_previous(GTK_TREE_MODEL(main_config.tree_store),deleteIter)){
gtk_tree_iter_free(deleteIter);
deleteIter = gtk_tree_iter_copy(&iter);
if (!gtk_tree_model_iter_next(GTK_TREE_MODEL(main_config.tree_store),deleteIter)){
gtk_tree_iter_free(deleteIter);
deleteIter = gtk_tree_iter_copy(&iter);
gtk_tree_store_remove(main_config.tree_store,deleteIter);
break;
} else {
gtk_tree_store_remove(main_config.tree_store,&iter);
}
} else {
gtk_tree_store_remove(main_config.tree_store,&iter);
}
continue;
}
gboolean valid_child=gtk_tree_model_iter_children(GTK_TREE_MODEL(main_config.tree_store),&childIter,&iter);
for (;valid_child;valid_child=gtk_tree_model_iter_next(GTK_TREE_MODEL(main_config.tree_store),&childIter)){ for (;valid_child;valid_child=gtk_tree_model_iter_next(GTK_TREE_MODEL(main_config.tree_store),&childIter)){
int status = 0,deleted = 0; char *pack_name, *pack_path;
char *path=NULL; char *pack_old_repo, *pack_new_repo;
gtk_tree_model_get(GTK_TREE_MODEL(main_config.tree_store),&childIter,3,&path,4,&status,5,&deleted,-1); char *pack_code_name, *pack_version, *pack_arch, *pack_depends;
gtk_tree_store_set(main_config.tree_store,&childIter,4,0,5,0,-1); int pack_status=0;
if (status==-1) { remove_flagged = yon_char_unite(remove_flagged ? yon_char_append(remove_flagged,",") : " -p ",path,NULL); /*gtk_tree_store_remove(main_config.tree_store,&childIter);*/} gboolean moved=0;
else if (status == 1&&deleted==0) { add_flagged = yon_char_unite(add_flagged ? yon_char_append(add_flagged,",") : " -p ",path,NULL);gtk_tree_store_set(main_config.tree_store,&childIter,0,"com.ublinux.ubl-settings-repomanager.document-symbolic",-1); } char *pack_sign;
gboolean pack_signed=0;
gtk_tree_model_get(GTK_TREE_MODEL(main_config.tree_store),&childIter,1,&pack_name,2,&pack_path,3,&pack_status,4,&pack_old_repo,5,&pack_new_repo,6,&moved,9,&pack_code_name,10,&pack_version,11,&pack_arch,12,&pack_depends,13,&pack_sign,14,&pack_signed,-1);
if (!pack_path) continue;
char *pack_sign_paths;
pack_sign_paths = yon_char_new(pack_path);
yon_char_divide(pack_sign_paths,yon_char_find_last(pack_sign_paths,'/'));
packnames = yon_char_unite(packnames ? yon_char_append(packnames," "):"",pack_sign_paths,NULL);
if (pack_sign&&pack_signed==1){
yon_char_divide_search(pack_sign,"<",-1);
pack_sign=yon_char_divide_search(pack_sign,">",-1);
if (!pack_groups||!(yon_dictionary_get(&pack_groups,pack_sign))){
dictionary *dict = yon_dictionary_new();
dict->key = pack_sign_paths;
yon_dictionary_add_or_create_if_exists_with_data(pack_groups,yon_char_new(pack_sign),dict);
} else {
dictionary *dict = yon_dictionary_new();
dict->key = pack_sign_paths;
yon_dictionary_add_or_create_if_exists_with_data(pack_groups->data,yon_char_new(pack_sign),dict);
}
}
if (pack_status==1){
add_packages = yon_char_unite(add_packages ? yon_char_append(add_packages,",") : "",pack_path,NULL);
pack_path = yon_char_unite(origin_flagged,"/pool/overlay/",yon_char_divide(pack_path,yon_char_find_last(pack_path,'/')));
gtk_tree_store_set(main_config.tree_store,&childIter,2,pack_path,-1);
} else if (pack_status==-1){
remove_packages = yon_char_unite(remove_packages ? yon_char_append(remove_packages,",") : "",pack_code_name,NULL);
}
if (pack_status==1) gtk_tree_store_set(main_config.tree_store,&childIter,0,document_no_edits,3,0,-1);
if (pack_status == -1){
GtkTreeIter *deleteIter = gtk_tree_iter_copy(&childIter);
if (!gtk_tree_model_iter_previous(GTK_TREE_MODEL(main_config.tree_store),deleteIter)){
gtk_tree_iter_free(deleteIter);
deleteIter = gtk_tree_iter_copy(&childIter);
if (!gtk_tree_model_iter_next(GTK_TREE_MODEL(main_config.tree_store),deleteIter)){
gtk_tree_iter_free(deleteIter);
deleteIter = gtk_tree_iter_copy(&childIter);
gtk_tree_store_remove(main_config.tree_store,deleteIter);
break;
} else {
gtk_tree_store_remove(main_config.tree_store,&childIter);
}
} else {
gtk_tree_store_remove(main_config.tree_store,&childIter);
}
}
}
if (origin_flagged&&name_flagged){
if (add_packages){
char *sign_check = repo_sign_flagged ? yon_char_new(repo_sign_flagged) : NULL;
repo_sign_flagged=NULL;
add_command = yon_char_unite(command, " add -d \"",origin_flagged,"\" -r \"",name_flagged, sign_flagged ? yon_char_append("\" --sign-repo ",sign_flagged):"\"" ," -p ", add_packages,NULL);
}
if (remove_packages){
char *sign_check = repo_sign_flagged ? yon_char_new(repo_sign_flagged) : NULL;
repo_sign_flagged=NULL;
remove_command = yon_char_unite(command, " remove -d \"",origin_flagged,"\" -r \"",name_flagged, sign_flagged ? yon_char_append("\" --sign-repo ",sign_flagged):"\"" , " -p ", remove_packages,NULL);
}
if (repostatus == 1){
yon_window_config_add_custom_parameter(yon_char_unite(origin_flagged,NULL),"repos",packnames,YON_TYPE_STRING);
}
if (!add_packages&&!signed_packages&&!remove_packages&&repostatus==1)
add_command = yon_char_unite(command, " add -d \"",origin_flagged,"\" -r \"",name_flagged,sign_flagged ? yon_char_append("\" --sign-repo ",sign_flagged):"\"" ,NULL);
if (add_signed_command){/*printf("%s\n",add_signed_command);*/ system(add_signed_command);
yon_ubl_status_box_render(OPERATION_DONE_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE);}
if (add_command) {/*printf("%s\n",add_command);*/system(add_command);
yon_ubl_status_box_render(OPERATION_DONE_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE);}
if (remove_command) {/*printf("%s\n",remove_command);*/system(remove_command);
yon_ubl_status_box_render(OPERATION_DONE_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE);}
if (pack_groups){
dictionary *dct;
for_dictionaries(dct,pack_groups){
char *signed_packs=NULL;
dictionary *pck;
for_dictionaries(pck,yon_dictionary_get_data(dct,dictionary*)){
signed_packs=yon_char_unite(signed_packs ? yon_char_append(signed_packs,","): "" ,pck->key,NULL);
} char *sign_check = repo_sign_flagged ? yon_char_new(repo_sign_flagged) : NULL;
repo_sign_flagged=NULL;
char *sign_command = yon_char_unite(command, " add -f -d ",origin_flagged," -r ",name_flagged," --sign-pkg ", dct->key," -p $(find ",origin_flagged,"/pool/overlay -name ", signed_packs,")",NULL);
printf("%s\n",sign_command);
system(sign_command);
}
} }
if (origin_flagged) }
remove_command = remove_flagged ? yon_char_unite(remove_command,remove_flagged,NULL) : NULL;
add_command = add_flagged ? yon_char_unite(add_command, add_flagged,NULL) : add_command;
printf("%s\n%s\n",remove_command,add_command);
if (remove_command) system(remove_command);
if (add_command) system(add_command);
} }
} }
@ -160,26 +322,48 @@ void on_search(GtkCellEditable *self, main_window *widgets){
} }
gtk_tree_view_expand_row(GTK_TREE_VIEW(widgets->RepoTree),gtk_tree_model_get_path(GTK_TREE_MODEL(main_config.tree_store),&iter),0); gtk_tree_view_expand_row(GTK_TREE_VIEW(widgets->RepoTree),gtk_tree_model_get_path(GTK_TREE_MODEL(main_config.tree_store),&iter),0);
} }
yon_ubl_status_box_render(OPERATION_DONE_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE);
} }
void on_tree_selection_changed(GtkWidget *self,main_window *widgets){ void on_tree_selection_changed(GtkWidget *self,main_window *widgets){
GtkTreeModel *model = GTK_TREE_MODEL(main_config.tree_store); GtkTreeModel *model = GTK_TREE_MODEL(main_config.tree_store);
GtkTreeIter iter; GtkTreeIter iter;
if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->RepoTree)),&model,&iter)){ if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->RepoTree)),&model,&iter)){
char *codeName=NULL,*version=NULL,*architecture=NULL; char *codeName=NULL,*version=NULL,*architecture=NULL, *dependeces=NULL, *signature=NULL;
int serverType=0,trusted=0,published=0; int serverType=0,trusted=0,published=0;
gtk_tree_model_get(model,&iter,11,&codeName,12,&version,13,&architecture,-1); gtk_tree_model_get(model,&iter,9,&codeName,10,&version,11,&architecture,12,&dependeces,13,&signature,-1);
gtk_label_set_text(GTK_LABEL(widgets->CodeNameInfoLabel),codeName ? codeName : ""); gtk_label_set_text(GTK_LABEL(widgets->CodeNameInfoLabel),codeName ? codeName : "");
gtk_label_set_text(GTK_LABEL(widgets->VersionInfoLabel),version ? version : ""); gtk_label_set_text(GTK_LABEL(widgets->VersionInfoLabel),version ? version : "");
gtk_label_set_text(GTK_LABEL(widgets->ArchitectureInfoLabel),architecture ? architecture : ""); gtk_label_set_text(GTK_LABEL(widgets->ArchitectureInfoLabel),architecture ? architecture : "");
gtk_label_set_text(GTK_LABEL(widgets->DependencesInfoLabel),dependeces ? dependeces : "");
gtk_label_set_text(GTK_LABEL(widgets->SignatureInfoLabel),signature ? signature : ABSENT_LABEL);
int depth = gtk_tree_store_iter_depth(main_config.tree_store,&iter);
if (depth == 0){
gtk_widget_set_sensitive(widgets->CreateButton,1);
gtk_widget_set_sensitive(widgets->LoadFromLocalButton,1);
gtk_widget_set_sensitive(widgets->ConfigureButton,1);
gtk_widget_set_sensitive(widgets->DeleteButton,1);
gtk_widget_set_sensitive(widgets->AddPackageButton,1);
gtk_widget_set_sensitive(widgets->RemovePackageButton,0);
gtk_widget_set_visible(widgets->NameBox,1);
gtk_widget_set_visible(widgets->DependenceBox,0);
gtk_widget_set_visible(widgets->VersionBox,0);
gtk_widget_set_visible(widgets->ArchitectureBox,0);
gtk_widget_set_visible(widgets->SignatureBox,1);
} else if (depth == 1){
gtk_widget_set_sensitive(widgets->CreateButton,1);
gtk_widget_set_sensitive(widgets->LoadFromLocalButton,1);
gtk_widget_set_sensitive(widgets->ConfigureButton,0);
gtk_widget_set_sensitive(widgets->DeleteButton,0);
gtk_widget_set_sensitive(widgets->AddPackageButton,1);
gtk_widget_set_sensitive(widgets->RemovePackageButton,1);
gtk_widget_set_visible(widgets->NameBox,1);
gtk_widget_set_visible(widgets->DependenceBox,1);
gtk_widget_set_visible(widgets->VersionBox,1);
gtk_widget_set_visible(widgets->ArchitectureBox,1);
gtk_widget_set_visible(widgets->SignatureBox,1);
} }
} }
int yon_char_find_last(char *source, char find){
int size = strlen(source);
int i=size;
for (;source[i]!=find&&i>0;i--);
return i;
} }
void on_repo_add_new(GtkWidget *self, dictionary *dict){ void on_repo_add_new(GtkWidget *self, dictionary *dict){
@ -189,35 +373,18 @@ void on_repo_add_new(GtkWidget *self, dictionary *dict){
char *name=NULL; char *name=NULL;
name = window->path; name = window->path;
window->path = yon_char_divide(name,yon_char_find_last(window->path, '/'));
if (!name||strcmp(name,"")!=0){ if (!name||strcmp(name,"")!=0){
GtkTreeIter *iter = yon_repo_append(widgets, name, YON_REPO_LINE_REPO_TYPE); GtkTreeIter *iter = yon_repo_append(widgets, name, YON_REPO_LINE_REPO_TYPE);
gtk_tree_store_set(main_config.tree_store,iter,0,"com.ublinux.ubl-settings-repomanager.folder-green-symbolic",2,window->BranchesListStore,3,window->path,-1); gtk_tree_store_set(main_config.tree_store,iter,0,folder_added,2,window->path,3,1,-1);
yon_ubl_status_box_render(OPERATION_DONE_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE); yon_ubl_status_box_render(OPERATION_DONE_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE);
} else { } else {
yon_ubl_status_box_render(EMPTY_NAME_LABEL,BACKGROUND_IMAGE_FAIL_TYPE); yon_ubl_status_box_render(EMPTY_NAME_LABEL,BACKGROUND_IMAGE_FAIL_TYPE);
} }
} }
void on_branch_add(GtkCellRendererText *self, char*path,char *new_text, repo_create_window *window){
if (new_text&&strcmp(new_text,"")!=0){
GtkTreeIter iter;
gboolean used, use=1;
gtk_tree_model_get_iter_from_string(GTK_TREE_MODEL(window->BranchesListStore),&iter,path);
gtk_tree_model_get(GTK_TREE_MODEL(window->BranchesListStore),&iter,1,&used,-1);
used;
gtk_list_store_set(window->BranchesListStore,&iter,0,new_text,1,&use,-1);
if (used==0)
gtk_list_store_append(window->BranchesListStore,&iter);
}
}
char *on_choose_repo_folder(GtkWidget *self,repo_create_window *window){ char *on_choose_repo_folder(GtkWidget *self,repo_create_window *window){
GtkFileFilter *file_filter = gtk_file_filter_new(); GtkWidget *chooser = gtk_file_chooser_dialog_new(ADD_REPO_LABEL,NULL,GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER,CANCEL_LABEL,GTK_RESPONSE_CANCEL,OPEN_LABEL,GTK_RESPONSE_ACCEPT,NULL);
gtk_file_filter_add_pattern(file_filter,"*db.tar.gz"); gtk_window_set_icon_name(GTK_WINDOW(chooser),icon_path);
GtkWidget *chooser = gtk_file_chooser_dialog_new(ADD_PACKAGE_REPO_LABEL,NULL,GTK_FILE_CHOOSER_ACTION_SAVE,CANCEL_LABEL,GTK_RESPONSE_CANCEL,OPEN_LABEL,GTK_RESPONSE_ACCEPT,NULL);
gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(chooser),file_filter);
int res = gtk_dialog_run(GTK_DIALOG(chooser)); int res = gtk_dialog_run(GTK_DIALOG(chooser));
if (res==GTK_RESPONSE_ACCEPT){ if (res==GTK_RESPONSE_ACCEPT){
@ -234,6 +401,7 @@ void on_repo_new (GtkWidget *self, main_window *widgets){
dictionary *dict = yon_dictionary_new_with_data("",widgets); dictionary *dict = yon_dictionary_new_with_data("",widgets);
dict = yon_dictionary_append_with_data(dict,"",window); dict = yon_dictionary_append_with_data(dict,"",window);
on_repo_add_new(self,dict); on_repo_add_new(self,dict);
yon_ubl_status_box_render(OPERATION_DONE_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE);
} }
void on_repo_add_file(GtkWidget *self, main_window *widgets){ void on_repo_add_file(GtkWidget *self, main_window *widgets){
@ -248,6 +416,54 @@ void on_repo_remove(GtkWidget *self, main_window *widgets){
yon_repo_remove(widgets); yon_repo_remove(widgets);
} }
void on_sign_save(GtkWidget *self, dictionary *dict){
GtkTreeIter iter;
main_window *widgets = yon_dictionary_get_data(dict->first,main_window*);
repo_sign_window *window = yon_dictionary_get_data(dict->first->next,repo_sign_window*);
GtkTreeModel *model = GTK_TREE_MODEL(main_config.tree_store);
if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->RepoTree)),&model,&iter)){
char *key = (char*)gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(window->KeysCombo));
gtk_tree_store_set(main_config.tree_store,&iter,13,key,14,1,-1);
}
on_tree_selection_changed(self,widgets);
yon_ubl_status_box_render(OPERATION_DONE_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE);
on_close_subwindow(self);
}
void on_repo_sign(GtkWidget *self, main_window *widgets){
repo_sign_window *window = g_malloc(sizeof(repo_sign_window));
GtkBuilder *builder = gtk_builder_new_from_resource(glade_sign_path);
window->Window = yon_gtk_builder_get_widget(builder,"repoSignWindow");
window->HeaderLabel = yon_gtk_builder_get_widget(builder,"signHeaderNameLabel");
window->KeysCombo = yon_gtk_builder_get_widget(builder,"repoSignKeysCombo");
window->SaveButton = yon_gtk_builder_get_widget(builder,"repoSignSaveButton");
window->CloseButton = yon_gtk_builder_get_widget(builder,"repoSignCancelButton");
GtkTreeModel *model = GTK_TREE_MODEL(main_config.tree_store);
GtkTreeIter iter;
if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->RepoTree)),&model,&iter)){
if (gtk_tree_store_iter_depth(main_config.tree_store,&iter)==1)
gtk_label_set_text(GTK_LABEL( window->HeaderLabel),yon_char_unite(DIGITAL_SIGNATURE_LABEL," - ",PACKAGE_LABEL,NULL));
else
gtk_label_set_text(GTK_LABEL( window->HeaderLabel),yon_char_unite(DIGITAL_SIGNATURE_LABEL," - ",REPOSITORY_LABEL,NULL));
int size=0;
config_str ret = yon_config_load(get_gpg_keys_command,&size);
for (int i=0;i<size;i++){
ret[i] = yon_char_divide_search(ret[i],"\n",-1);
if (!strstr(ret[i],"]")&&!strstr(ret[i],"["))
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(window->KeysCombo),ret[i]);
}
dictionary *dict = yon_dictionary_new_with_data("",widgets);
dict = yon_dictionary_append_with_data(dict,"",window);
g_signal_connect(G_OBJECT(window->SaveButton),"clicked", G_CALLBACK(on_sign_save),dict);
g_signal_connect(G_OBJECT(window->CloseButton),"clicked", G_CALLBACK(on_close_subwindow),NULL);
gtk_widget_show(window->Window);
} else {
yon_ubl_status_box_render(SIGN_CHOOSE_LABEL,BACKGROUND_IMAGE_FAIL_TYPE);
}
}
void on_repo_configure(GtkWidget *self, main_window *widgets){ void on_repo_configure(GtkWidget *self, main_window *widgets){
GtkTreeModel *model = GTK_TREE_MODEL(main_config.tree_store); GtkTreeModel *model = GTK_TREE_MODEL(main_config.tree_store);
GtkTreeIter iter; GtkTreeIter iter;
@ -280,19 +496,21 @@ void on_repo_configure_done(GtkWidget *self, dictionary *dict){
char *oldname=NULL; char *oldname=NULL;
int status=0; int status=0;
char *name = (char*)gtk_entry_get_text(GTK_ENTRY(window->NameEntry)); char *name = (char*)gtk_entry_get_text(GTK_ENTRY(window->NameEntry));
gtk_tree_model_get(model,&iter,1,&oldname,4,&status,-1); gtk_tree_model_get(model,&iter,1,&oldname,3,&status,-1);
if (status==0) if (status==0)
gtk_tree_store_set(main_config.tree_store,&iter,1,name,6,oldname,7,1,-1); gtk_tree_store_set(main_config.tree_store,&iter,1,name,4,oldname,6,1,-1);
else if (status==1) else if (status==1)
gtk_tree_store_set(main_config.tree_store,&iter,1,name,-1); gtk_tree_store_set(main_config.tree_store,&iter,1,name,-1);
} }
yon_ubl_status_box_render(OPERATION_DONE_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE);
on_close_subwindow(self); on_close_subwindow(self);
} }
void on_repo_load_local(GtkWidget *self, main_window *widgets){ void on_repo_load_local(GtkWidget *self, main_window *widgets){
GtkFileFilter *file_filter = gtk_file_filter_new(); GtkFileFilter *file_filter = gtk_file_filter_new();
GtkWidget *chooser = gtk_file_chooser_dialog_new(LOAD_REPO_LABEL,NULL,GTK_FILE_CHOOSER_ACTION_OPEN,CANCEL_LABEL,GTK_RESPONSE_CANCEL,OPEN_LABEL,GTK_RESPONSE_ACCEPT,NULL);
gtk_file_filter_add_pattern(file_filter,"*db.tar.gz"); gtk_file_filter_add_pattern(file_filter,"*db.tar.gz");
GtkWidget *chooser = gtk_file_chooser_dialog_new(ADD_PACKAGE_REPO_LABEL,NULL,GTK_FILE_CHOOSER_ACTION_OPEN,CANCEL_LABEL,GTK_RESPONSE_CANCEL,OPEN_LABEL,GTK_RESPONSE_ACCEPT,NULL); gtk_file_filter_set_name(file_filter, "*db.tar.gz");
gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(chooser),file_filter); gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(chooser),file_filter);
int res = gtk_dialog_run(GTK_DIALOG(chooser)); int res = gtk_dialog_run(GTK_DIALOG(chooser));
if (res==GTK_RESPONSE_ACCEPT){ if (res==GTK_RESPONSE_ACCEPT){
@ -310,7 +528,6 @@ void on_repo_load_local(GtkWidget *self, main_window *widgets){
GtkTreeIter *yon_repo_append(main_window *widgets, char *name, YON_REPO_LINE_TYPE type){ GtkTreeIter *yon_repo_append(main_window *widgets, char *name, YON_REPO_LINE_TYPE type){
GtkTreeIter *retIter=g_malloc0(sizeof(GtkTreeIter)); GtkTreeIter *retIter=g_malloc0(sizeof(GtkTreeIter));
GtkTreeIter iter,parentIter; GtkTreeIter iter,parentIter;
GdkPixbuf *icon = NULL;
GtkIconTheme *theme = gtk_icon_theme_get_default(); GtkIconTheme *theme = gtk_icon_theme_get_default();
char *name_short = yon_char_new(name); char *name_short = yon_char_new(name);
gboolean fls = 0; gboolean fls = 0;
@ -321,23 +538,21 @@ GtkTreeIter *yon_repo_append(main_window *widgets, char *name, YON_REPO_LINE_TYP
GtkTreeModel *model = GTK_TREE_MODEL(main_config.tree_store); GtkTreeModel *model = GTK_TREE_MODEL(main_config.tree_store);
if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->RepoTree)),&model,&parentIter)){ if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->RepoTree)),&model,&parentIter)){
if (type==YON_REPO_LINE_REPO_TYPE){ if (type==YON_REPO_LINE_REPO_TYPE){
icon = gtk_icon_theme_load_icon_for_scale(theme,"com.ublinux.ubl-settings-repomanager.folder-symbolic",16,1,GTK_ICON_LOOKUP_FORCE_SIZE,NULL);
gtk_tree_store_append(main_config.tree_store,&iter,NULL); gtk_tree_store_append(main_config.tree_store,&iter,NULL);
gtk_tree_store_set(main_config.tree_store,&iter,0, "com.ublinux.ubl-settings-repomanager.folder-symbolic", 1, name_short,3,name,4,1,5,fls,-1); gtk_tree_store_set(main_config.tree_store,&iter,0, folder_no_edits, 1, name_short,2,name,3,1,4,fls,-1);
retIter = gtk_tree_iter_copy(&iter); retIter = gtk_tree_iter_copy(&iter);
} }
else if (type==YON_REPO_LINE_FILE_TYPE){ else if (type==YON_REPO_LINE_FILE_TYPE){
GtkTreeIter branch; GtkTreeIter branch;
icon = gtk_icon_theme_load_icon_for_scale(theme,"com.ublinux.ubl-settings-repomanager.follder-symbolic",16,1,GTK_ICON_LOOKUP_FORCE_SIZE,NULL);
if (gtk_tree_model_iter_parent(model,&branch,&parentIter)){ if (gtk_tree_model_iter_parent(model,&branch,&parentIter)){
GtkTreeIter repo; GtkTreeIter repo;
gtk_tree_store_append(main_config.tree_store,&iter,&branch); gtk_tree_store_append(main_config.tree_store,&iter,&branch);
gtk_tree_store_set(main_config.tree_store,&iter,0, "com.ublinux.ubl-settings-repomanager.document-symbolic", 1, name_short,3,name,4,1,5,fls,-1); gtk_tree_store_set(main_config.tree_store,&iter,0, document_no_edits, 1, name_short,2,name,3,1,4,fls,-1);
retIter = gtk_tree_iter_copy(&iter); retIter = gtk_tree_iter_copy(&iter);
} else { } else {
gtk_tree_store_append(main_config.tree_store,&iter,&parentIter); gtk_tree_store_append(main_config.tree_store,&iter,&parentIter);
gtk_tree_store_set(main_config.tree_store,&iter,0, "com.ublinux.ubl-settings-repomanager.document-symbolic", 1, name_short,3,name,4,1,5,fls,-1); gtk_tree_store_set(main_config.tree_store,&iter,0, document_no_edits, 1, name_short,2,name,3,1,4,fls,-1);
retIter = gtk_tree_iter_copy(&iter); retIter = gtk_tree_iter_copy(&iter);
} }
yon_ubl_status_box_render(OPERATION_DONE_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE); yon_ubl_status_box_render(OPERATION_DONE_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE);
@ -345,9 +560,8 @@ GtkTreeIter *yon_repo_append(main_window *widgets, char *name, YON_REPO_LINE_TYP
gtk_tree_selection_select_iter(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->RepoTree)),&iter); gtk_tree_selection_select_iter(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->RepoTree)),&iter);
} }
else if (type==YON_REPO_LINE_REPO_TYPE){ else if (type==YON_REPO_LINE_REPO_TYPE){
icon = gtk_icon_theme_load_icon_for_scale(theme,"com.ublinux.ubl-settings-repomanager.folder-symbolic",16,1,GTK_ICON_LOOKUP_FORCE_SIZE,NULL);
gtk_tree_store_append(main_config.tree_store,&iter,NULL); gtk_tree_store_append(main_config.tree_store,&iter,NULL);
gtk_tree_store_set(main_config.tree_store,&iter,0, "com.ublinux.ubl-settings-repomanager.folder-symbolic", 1, name_short,3,name,4,1,5,fls,-1); gtk_tree_store_set(main_config.tree_store,&iter,0, folder_no_edits, 1, name_short,2,name,3,1,4,fls,-1);
retIter = gtk_tree_iter_copy(&iter); retIter = gtk_tree_iter_copy(&iter);
gtk_tree_selection_select_iter(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->RepoTree)),&iter); gtk_tree_selection_select_iter(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->RepoTree)),&iter);
} else { } else {
@ -362,12 +576,11 @@ void yon_repo_remove_package(main_window *widgets){
if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->RepoTree)),&model,&iter)){ if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->RepoTree)),&model,&iter)){
GtkTreeIter iterparent; GtkTreeIter iterparent;
if (gtk_tree_model_iter_parent(model,&iterparent,&iter)){ if (gtk_tree_model_iter_parent(model,&iterparent,&iter)){
// gtk_tree_store_remove(main_config.tree_store,&iter);
int status = 0; int status = 0;
gtk_tree_model_get(GTK_TREE_MODEL(main_config.tree_store),&iter,4,&status,-1); gtk_tree_model_get(GTK_TREE_MODEL(main_config.tree_store),&iter,3,&status,-1);
if (status != 1){ if (status != 1){
gtk_tree_store_set(main_config.tree_store,&iter,4,-1,-1); gtk_tree_store_set(main_config.tree_store,&iter,3,-1,-1);
gtk_tree_store_set(main_config.tree_store,&iter,0,"com.ublinux.ubl-settings-repomanager.document-red-symbolic",-1); gtk_tree_store_set(main_config.tree_store,&iter,0,document_deleted,-1);
} else gtk_tree_store_remove(main_config.tree_store,&iter); } else gtk_tree_store_remove(main_config.tree_store,&iter);
yon_ubl_status_box_render(OPERATION_DONE_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE); yon_ubl_status_box_render(OPERATION_DONE_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE);
}else yon_ubl_status_box_render(CHOOSE_PACK_LABEL,BACKGROUND_IMAGE_FAIL_TYPE); }else yon_ubl_status_box_render(CHOOSE_PACK_LABEL,BACKGROUND_IMAGE_FAIL_TYPE);
@ -375,40 +588,66 @@ void yon_repo_remove_package(main_window *widgets){
} }
void yon_repo_remove(main_window *widgets){ void yon_repo_remove(main_window *widgets){
GtkTreeIter iter; GtkTreeIter iter, childIter, *deletecopy;
GtkTreeModel *model = GTK_TREE_MODEL(main_config.tree_store); GtkTreeModel *model = GTK_TREE_MODEL(main_config.tree_store);
if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->RepoTree)),&model,&iter)){ if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->RepoTree)),&model,&iter)){
if(gtk_tree_store_iter_depth(main_config.tree_store,&iter)==0){ if(gtk_tree_store_iter_depth(main_config.tree_store,&iter)==0){
gtk_tree_store_set(main_config.tree_store,&iter,4,-1,0,"com.ublinux.ubl-settings-repomanager.folder-red-symbolic",-1); int repostatus=0;
gtk_tree_model_get(GTK_TREE_MODEL(main_config.tree_store),&iter,3,&repostatus,-1);
if (repostatus ==0){
gtk_tree_store_set(main_config.tree_store,&iter,3,-1,0,folder_deleted,-1);
int valid=gtk_tree_model_iter_children(model,&childIter,&iter);
for (;valid;valid=gtk_tree_model_iter_next(model,&childIter)){
int status=5;
gtk_tree_model_get(model,&childIter,3,&status,-1);
if (status==1){
deletecopy = gtk_tree_iter_copy(&childIter);
gtk_tree_model_iter_previous(model,&childIter);
gtk_tree_store_remove(main_config.tree_store,deletecopy);
} else if (status == 0){
gtk_tree_store_set(main_config.tree_store,&childIter, 0,document_deleted,3,-1,-1);
}
}
} else if (repostatus == 1) {
gtk_tree_store_remove(main_config.tree_store,&iter);
}
}else yon_ubl_status_box_render(CHOOSE_REPO_LABEL,BACKGROUND_IMAGE_FAIL_TYPE); }else yon_ubl_status_box_render(CHOOSE_REPO_LABEL,BACKGROUND_IMAGE_FAIL_TYPE);
} else yon_ubl_status_box_render(NOTHING_CHOSEN_LABEL,BACKGROUND_IMAGE_FAIL_TYPE); } else yon_ubl_status_box_render(NOTHING_CHOSEN_LABEL,BACKGROUND_IMAGE_FAIL_TYPE);
} }
void yon_add_file(main_window *widgets){ void yon_add_file(main_window *widgets){
GtkWidget *chooser = gtk_file_chooser_dialog_new(ADD_PACKAGE_REPO_LABEL,NULL,GTK_FILE_CHOOSER_ACTION_OPEN,CANCEL_LABEL,GTK_RESPONSE_CANCEL,OPEN_LABEL,GTK_RESPONSE_ACCEPT,NULL);
GtkFileFilter *file_filter = gtk_file_filter_new(); GtkFileFilter *file_filter = gtk_file_filter_new();
file_filter = gtk_file_filter_new();
gtk_file_filter_add_pattern(file_filter,"*.pkg.tar.*"); gtk_file_filter_add_pattern(file_filter,"*.pkg.tar.*");
gtk_file_filter_set_name(file_filter,"*.pkg.tar.*"); gtk_file_filter_set_name(file_filter,".pkg.tar.*");
GtkWidget *chooser = gtk_file_chooser_dialog_new(ADD_PACKAGE_REPO_LABEL,NULL,GTK_FILE_CHOOSER_ACTION_OPEN,CANCEL_LABEL,GTK_RESPONSE_CANCEL,OPEN_LABEL,GTK_RESPONSE_ACCEPT,NULL); gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(chooser),file_filter);
file_filter = gtk_file_filter_new();
gtk_file_filter_add_pattern(file_filter,"*");
gtk_file_filter_set_name(file_filter,"All");
gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(chooser),file_filter); gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(chooser),file_filter);
int res = gtk_dialog_run(GTK_DIALOG(chooser)); int res = gtk_dialog_run(GTK_DIALOG(chooser));
if (res==GTK_RESPONSE_ACCEPT){ if (res==GTK_RESPONSE_ACCEPT){
char *filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(chooser)); char *filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(chooser));
FILE *file = popen(get_package_info_command(filename),"r"); FILE *file = popen(get_package_info_command(filename),"r");
char *cur_string=g_malloc0(sizeof(char)*4096); char *cur_string=g_malloc0(sizeof(char)*4096);
char *packname=NULL, *packver=NULL, *packarch=NULL; char *packname=NULL, *packver=NULL, *packarch=NULL, *packdepends=NULL;
while (fgets(cur_string,4096,file)){ while (fgets(cur_string,4096,file)){
cur_string = yon_char_divide_search(cur_string,"\n",-1); char *stringe = yon_char_divide_search(cur_string,"\n",-1);
char *p = yon_char_divide_search(cur_string,":",-1); char *p = yon_char_divide_search(stringe,":",-1);
if (strstr(p,"Name")) packname = yon_char_new(cur_string); if (strstr(p,"Name")) packname = yon_char_new(stringe);
else if (strstr(p,"Version")) packver = yon_char_new(cur_string); else if (strstr(p,"Version")) packver = yon_char_new(stringe);
else if (strstr(p,"Architecture")) packarch = yon_char_new(cur_string); else if (strstr(p,"Architecture")) packarch = yon_char_new(stringe);
else if (strstr(p,"Depends On")) packdepends = yon_char_new(stringe);
else if (strstr(p,"Depends On")) packdepends = yon_char_new(stringe);
} }
GtkTreeIter *iter = yon_repo_append(widgets,filename,YON_REPO_LINE_FILE_TYPE); GtkTreeIter *iter = yon_repo_append(widgets,filename,YON_REPO_LINE_FILE_TYPE);
gtk_tree_store_set(main_config.tree_store,iter,0,"com.ublinux.ubl-settings-repomanager.document-green-symbolic",11,packname,12,packver,13,packarch,-1); gtk_tree_view_expand_to_path(GTK_TREE_VIEW(widgets->RepoTree),gtk_tree_model_get_path(GTK_TREE_MODEL(main_config.tree_store),iter));
gtk_tree_store_set(main_config.tree_store,iter,0,document_added,1,yon_char_unite(packname,"-",packver,"-",packarch,NULL),2,filename,9,packname,10,packver,11,packarch,12,packdepends,-1);
} }
on_tree_selection_changed(NULL,widgets);
yon_ubl_status_box_render(OPERATION_DONE_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE);
on_close_subwindow(chooser); on_close_subwindow(chooser);
@ -440,6 +679,7 @@ main_window *setup_window(){
widgets->Window = yon_gtk_builder_get_widget(builder,"MainWindow"); widgets->Window = yon_gtk_builder_get_widget(builder,"MainWindow");
widgets->HatLabel = yon_gtk_builder_get_widget(builder,"headerTopic"); widgets->HatLabel = yon_gtk_builder_get_widget(builder,"headerTopic");
widgets->PlugBox = yon_gtk_builder_get_widget(builder,"plugBox"); widgets->PlugBox = yon_gtk_builder_get_widget(builder,"plugBox");
widgets->MovePaned = yon_gtk_builder_get_widget(builder,"MovePaned");
widgets->HeadOverlay = yon_gtk_builder_get_widget(builder,"HeadOverlay"); widgets->HeadOverlay = yon_gtk_builder_get_widget(builder,"HeadOverlay");
widgets->HeadImage = yon_gtk_builder_get_widget(builder,"HeadBackgroundImage"); widgets->HeadImage = yon_gtk_builder_get_widget(builder,"HeadBackgroundImage");
@ -462,9 +702,6 @@ main_window *setup_window(){
widgets->LoadLocalMenuItem = yon_gtk_builder_get_widget(builder,"LoadLocalConfigurationMenuItem"); widgets->LoadLocalMenuItem = yon_gtk_builder_get_widget(builder,"LoadLocalConfigurationMenuItem");
widgets->LeftBox = yon_gtk_builder_get_widget(builder,"HeaderLeftBox"); widgets->LeftBox = yon_gtk_builder_get_widget(builder,"HeaderLeftBox");
// widgets->DocumentationMenuItem = yon_gtk_builder_get_widget(builder,"DocumentationMenuItem");
// widgets->AboutMenuItem = yon_gtk_builder_get_widget(builder,"AboutMenuItem");
widgets->GeneralTabLabel = yon_gtk_builder_get_widget(builder,"GeneralTabLabel"); widgets->GeneralTabLabel = yon_gtk_builder_get_widget(builder,"GeneralTabLabel");
widgets->PublicationTabLabel = yon_gtk_builder_get_widget(builder,"PublicationTabLabel"); widgets->PublicationTabLabel = yon_gtk_builder_get_widget(builder,"PublicationTabLabel");
widgets->CreateButton = yon_gtk_builder_get_widget(builder,"CreateButton"); widgets->CreateButton = yon_gtk_builder_get_widget(builder,"CreateButton");
@ -497,15 +734,20 @@ main_window *setup_window(){
widgets->ArchitectureLabel = yon_gtk_builder_get_widget(builder,"ArchitectureLabel"); widgets->ArchitectureLabel = yon_gtk_builder_get_widget(builder,"ArchitectureLabel");
widgets->ArchitectureInfoLabel = yon_gtk_builder_get_widget(builder,"ArchitectureInfoLabel"); widgets->ArchitectureInfoLabel = yon_gtk_builder_get_widget(builder,"ArchitectureInfoLabel");
widgets->ComponentsLabel = yon_gtk_builder_get_widget(builder,"ComponentsLabel"); widgets->ComponentsLabel = yon_gtk_builder_get_widget(builder,"ComponentsLabel");
widgets->ComponentsInfoLabel = yon_gtk_builder_get_widget(builder,"ComponentsInfoLabel"); widgets->DependencesInfoLabel = yon_gtk_builder_get_widget(builder,"DependencesInfoLabel");
widgets->SignatureLabel = yon_gtk_builder_get_widget(builder,"SignatureLabel"); widgets->SignatureLabel = yon_gtk_builder_get_widget(builder,"SignatureLabel");
widgets->SignatureInfoLabel = yon_gtk_builder_get_widget(builder,"SignatureInfoLabel"); widgets->SignatureInfoLabel = yon_gtk_builder_get_widget(builder,"SignatureInfoLabel");
widgets->Finder = yon_gtk_builder_get_widget(builder,"RepoFinder"); widgets->Finder = yon_gtk_builder_get_widget(builder,"RepoFinder");
widgets->NameBox = yon_gtk_builder_get_widget(builder,"nameBox");
widgets->VersionBox = yon_gtk_builder_get_widget(builder,"versionBox");
widgets->ArchitectureBox = yon_gtk_builder_get_widget(builder,"archBox");
widgets->DependenceBox = yon_gtk_builder_get_widget(builder,"dependBox");
widgets->SignatureBox = yon_gtk_builder_get_widget(builder,"signatureBox");
widgets->SaveButton = yon_gtk_builder_get_widget(builder,"mainSaveButton"); widgets->SaveButton = yon_gtk_builder_get_widget(builder,"mainSaveButton");
main_config.tree_store = GTK_TREE_STORE(gtk_builder_get_object(builder,"RepoStore")); main_config.tree_store = GTK_TREE_STORE(gtk_builder_get_object(builder,"RepoStore"));
widgets->DocumentationMenuItem = yon_ubl_menu_item_documentation_new(DOCUMENTATION_LABEL); // yon_gtk_builder_get_widget(builder,"DocumentationMenuItem"); widgets->DocumentationMenuItem = yon_ubl_menu_item_documentation_new(DOCUMENTATION_LABEL);
widgets->AboutMenuItem = yon_ubl_menu_item_about_new(ABOUT_LABEL); // yon_gtk_builder_get_widget(builder,"AboutMenuItem"); widgets->AboutMenuItem = yon_ubl_menu_item_about_new(ABOUT_LABEL);
gtk_window_set_title(GTK_WINDOW(widgets->Window),TITLE_LABEL); gtk_window_set_title(GTK_WINDOW(widgets->Window),TITLE_LABEL);
@ -529,6 +771,10 @@ main_window *setup_window(){
} }
} }
/* Widget registration for config monitoring | Регистрация виджетов для мониторинга конфига */
yon_window_config_add_listener(widgets->MovePaned,"pane_position","position",YON_TYPE_INT);
/* Signal connection | Присоединение сигналов */ /* Signal connection | Присоединение сигналов */
g_signal_connect(G_OBJECT(widgets->Window), "destroy", G_CALLBACK(gtk_main_quit), NULL); g_signal_connect(G_OBJECT(widgets->Window), "destroy", G_CALLBACK(gtk_main_quit), NULL);
g_signal_connect(G_OBJECT(widgets->DocumentationMenuItem),"activate",G_CALLBACK(on_open_documentation_confirmation),WIKI_LINK); g_signal_connect(G_OBJECT(widgets->DocumentationMenuItem),"activate",G_CALLBACK(on_open_documentation_confirmation),WIKI_LINK);
@ -539,6 +785,7 @@ main_window *setup_window(){
g_signal_connect(G_OBJECT(widgets->DeleteButton),"clicked",G_CALLBACK(on_repo_remove),widgets); g_signal_connect(G_OBJECT(widgets->DeleteButton),"clicked",G_CALLBACK(on_repo_remove),widgets);
g_signal_connect(G_OBJECT(widgets->LoadFromLocalButton),"clicked",G_CALLBACK(on_repo_load_local),widgets); g_signal_connect(G_OBJECT(widgets->LoadFromLocalButton),"clicked",G_CALLBACK(on_repo_load_local),widgets);
g_signal_connect(G_OBJECT(widgets->ConfigureButton),"clicked",G_CALLBACK(on_repo_configure),widgets); g_signal_connect(G_OBJECT(widgets->ConfigureButton),"clicked",G_CALLBACK(on_repo_configure),widgets);
g_signal_connect(G_OBJECT(widgets->SignButton),"clicked",G_CALLBACK(on_repo_sign),widgets);
g_signal_connect(G_OBJECT(widgets->SaveButton),"clicked",G_CALLBACK(on_save),widgets); g_signal_connect(G_OBJECT(widgets->SaveButton),"clicked",G_CALLBACK(on_save),widgets);
g_signal_connect(G_OBJECT(widgets->RepoTree),"cursor-changed",G_CALLBACK(on_tree_selection_changed),widgets); g_signal_connect(G_OBJECT(widgets->RepoTree),"cursor-changed",G_CALLBACK(on_tree_selection_changed),widgets);
g_signal_connect(G_OBJECT(widgets->Finder),"changed",G_CALLBACK(on_search),widgets); g_signal_connect(G_OBJECT(widgets->Finder),"changed",G_CALLBACK(on_search),widgets);
@ -623,18 +870,30 @@ int main(int argc, char *argv[]){
main_config.lock_load_global=1; main_config.lock_load_global=1;
main_config.lock_save_global=1; main_config.lock_save_global=1;
main_config.lock_save_local=1; main_config.lock_save_local=1;
main_config.lock_root=1;
} }
gtk_init(&argc,&argv); gtk_init(&argc,&argv);
main_window *widgets = setup_window(); main_window *widgets = setup_window();
yon_ubl_header_setup_resource(widgets->HeadOverlay,widgets->HeadBox,widgets->HeadImage,banner_path); yon_ubl_header_setup_resource(widgets->HeadOverlay,widgets->HeadBox,widgets->HeadImage,banner_path);
yon_ubl_status_box_setup(widgets->StatusIcon,widgets->StatusBox,widgets->StatusLabel); yon_ubl_status_box_setup(widgets->StatusIcon,widgets->StatusBox,widgets->StatusLabel);
yon_ubl_status_box_render(TITLE_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE); yon_ubl_status_box_render(LOAD_SUCCESS_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE);
yon_ubl_setup_sockets(widgets->PlugBox,widgets->LeftBox,widgets->RightBox,main_config.socket_id,main_config.load_socket_id,main_config.save_socket_id); yon_ubl_setup_sockets(widgets->PlugBox,widgets->LeftBox,widgets->RightBox,main_config.socket_id,main_config.load_socket_id,main_config.save_socket_id);
yon_window_config_setup(GTK_WINDOW(widgets->Window)); yon_window_config_setup(GTK_WINDOW(widgets->Window));
yon_window_config_load(config_path); yon_window_config_load(config_path);
/*Check for null config parameter | Проверка на отсутствующий в конфигурации параметр */
GValue *val = g_malloc0(sizeof(GValue));
g_object_get_property(G_OBJECT(widgets->MovePaned),"position",val);
int paned_size = g_value_get_int(val);
if (paned_size<100)
gtk_paned_set_position(GTK_PANED(widgets->MovePaned),400);
on_load();
GtkTreeIter *iter = g_malloc0(sizeof(GtkTreeIter));
if (gtk_tree_model_get_iter_first(GTK_TREE_MODEL(main_config.tree_store),iter))
gtk_tree_selection_select_iter(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->RepoTree)),iter);
GtkCssProvider *css=gtk_css_provider_new(); GtkCssProvider *css=gtk_css_provider_new();
gtk_css_provider_load_from_resource(css,CssPath); gtk_css_provider_load_from_resource(css,CssPath);
gtk_style_context_add_provider_for_screen(gdk_screen_get_default(), gtk_style_context_add_provider_for_screen(gdk_screen_get_default(),

@ -22,15 +22,28 @@
#define glade_path "/com/ublinux/ui/ubl-settings-repomanager.glade" #define glade_path "/com/ublinux/ui/ubl-settings-repomanager.glade"
#define glade_repo_path "/com/ublinux/ui/ubl-settings-repomanager-windows.glade" #define glade_repo_path "/com/ublinux/ui/ubl-settings-repomanager-windows.glade"
#define glade_sign_path "/com/ublinux/ui/ubl-settings-repomanager-sign.glade"
#define banner_path "/com/ublinux/images/ubl-settings-repomanager-banner.png" #define banner_path "/com/ublinux/images/ubl-settings-repomanager-banner.png"
#define CssPath "/com/ublinux/css/ubl-settings-repomanager.css" #define CssPath "/com/ublinux/css/ubl-settings-repomanager.css"
#define config_path yon_char_unite(yon_ubl_user_get_home_directory(),"/.config/",LocaleName,"/",LocaleName,".conf",NULL) #define config_path yon_char_unite(yon_ubl_user_get_home_directory(),"/.config/",LocaleName,"/",LocaleName,".conf",NULL)
#define icon_path "com.ublinux.ubl-settings-repomanager"
#define folder_no_edits "com.ublinux.ubl-settings-repomanager.folder-symbolic"
#define folder_deleted "com.ublinux.ubl-settings-repomanager.folder-red-symbolic"
#define folder_added "com.ublinux.ubl-settings-repomanager.folder-green-symbolic"
#define document_no_edits "com.ublinux.ubl-settings-repomanager.document-symbolic"
#define document_deleted "com.ublinux.ubl-settings-repomanager.document-red-symbolic"
#define document_added "com.ublinux.ubl-settings-repomanager.document-green-symbolic"
#define LocalePath "/usr/share/locale" #define LocalePath "/usr/share/locale"
#define LocaleName "ubl-settings-repomanager" #define LocaleName "ubl-settings-repomanager"
typedef char* string; typedef char* string;
#define get_package_info_command(filename) yon_char_unite("LC_ALL=EN pacman -Q --info --file ",filename," |grep -E \"Name|Version|Architecture\" |sed -e 's/ *//g'",NULL) #define get_package_info_command(filename) yon_char_unite("LC_ALL=EN pacman -Q --info --file ",filename," ||sed -e 's/ */ /g' -e 's/ : /:/g' -e 's/\\n/ /g'",NULL)
#define get_saved_package_info_command(path,filename) yon_char_unite("LC_ALL=EN pacman -Q --info --file $(find \"",path,"\" -name *",filename,"* -not -name *.sig |head -n 1)|sed -e 's/ */ /g' -e 's/ : /:/g' -e 's/\\n/ /g'",NULL)
#define get_gpg_keys_command yon_char_unite(yon_ubl_check_root()==1 ? yon_char_unite("su - ",yon_ubl_root_user_get()," -c \"gpg --list-signatures\"",NULL):"gpg --list-signatures"," | grep '^sig 3' | cut -d' ' -f10,11,13- | sort -u |sed -e 's/[0-9]*-[0-9]*-[0-9]* //g'",NULL)
string version_application; string version_application;
char *local; char *local;
@ -51,6 +64,7 @@ typedef struct {
int lock_save_local; int lock_save_local;
int lock_save_global; int lock_save_global;
int lock_load_global; int lock_load_global;
int lock_root;
} config; } config;
typedef struct { typedef struct {
@ -58,6 +72,8 @@ typedef struct {
GtkWidget *HatLabel; GtkWidget *HatLabel;
GtkWidget *PlugBox; GtkWidget *PlugBox;
GtkWidget *MovePaned;
GtkWidget *HeadOverlay; GtkWidget *HeadOverlay;
GtkWidget *HeadImage; GtkWidget *HeadImage;
GtkWidget *HeadBox; GtkWidget *HeadBox;
@ -114,11 +130,16 @@ typedef struct {
GtkWidget *ArchitectureLabel; GtkWidget *ArchitectureLabel;
GtkWidget *ArchitectureInfoLabel; GtkWidget *ArchitectureInfoLabel;
GtkWidget *ComponentsLabel; GtkWidget *ComponentsLabel;
GtkWidget *ComponentsInfoLabel; GtkWidget *DependencesInfoLabel;
GtkWidget *SignatureLabel; GtkWidget *SignatureLabel;
GtkWidget *SignatureInfoLabel; GtkWidget *SignatureInfoLabel;
GtkWidget *Finder; GtkWidget *Finder;
GtkWidget *SaveButton; GtkWidget *SaveButton;
GtkWidget *NameBox;
GtkWidget *VersionBox;
GtkWidget *ArchitectureBox;
GtkWidget *DependenceBox;
GtkWidget *SignatureBox;
} main_window; } main_window;
typedef struct { typedef struct {
@ -135,6 +156,15 @@ typedef struct {
char *path; char *path;
} repo_create_window; } repo_create_window;
typedef struct {
GtkWidget *Window;
GtkWidget *HeaderLabel;
GtkWidget *KeysCombo;
GtkWidget *CloseButton;
GtkWidget *SaveButton;
} repo_sign_window;
typedef struct { typedef struct {
GtkWidget *Window; GtkWidget *Window;

@ -1,6 +1,8 @@
#define VERSION_LABEL yon_char_unite(_("Version:")," ",version_application,"\n",NULL) #define VERSION_LABEL yon_char_unite(_("Version:")," ",version_application,"\n",NULL)
#define HELP_LABEL yon_char_unite(_("ubl-settings-repomanager version:")," ", version_application,"\n",TITLE_LABEL,"\n",_("Usage:"), " ubl-settings-repomanager ",_("[OPTIONS]"),"\n",_("Options:"),"\n\t--help, -h\t\t\t",_("Show this help"),"\n\t--version, -V\t\t\t",_("Show package version"),"\n\t--lock-help\t\t\t",_("Lock this help menu"),"\n\t--lock-save\t\t\t",_("Lock configuration saving"),"\n\t--lock-save-local\t\t",_("Lock local configration saving"),"\n\t--lock-save-global\t\t",_("Lock global configration saving"),"\n\t--lock-load-global\t\t",_("Lock global configration loading"),"\n",NULL) #define HELP_LABEL yon_char_unite(_("ubl-settings-repomanager version:")," ", version_application,"\n",TITLE_LABEL,"\n",_("Usage:"), " ubl-settings-repomanager ",_("[OPTIONS]"),"\n",_("Options:"),"\n\t--help, -h\t\t\t",_("Show this help"),"\n\t--version, -V\t\t\t",_("Show package version"),"\n\t--lock-help\t\t\t",_("Lock this help menu"),"\n\t--lock-save\t\t\t",_("Lock configuration saving"),"\n\t--lock-save-local\t\t",_("Lock local configration saving"),"\n\t--lock-save-global\t\t",_("Lock global configration saving"),"\n\t--lock-load-global\t\t",_("Lock global configration loading"),"\n",NULL)
#define ROOT_WARNING_LABEL _("Warning! Application was launched without root - root-dependent actions are locked")
#define TITLE_LABEL _("Repository manager") #define TITLE_LABEL _("Repository manager")
#define TITLE_INFO_LABEL _("Repository management and configuring") #define TITLE_INFO_LABEL _("Repository management and configuring")
#define SUCCESS_LABEL _("Operation succeeded") #define SUCCESS_LABEL _("Operation succeeded")
@ -26,20 +28,9 @@
#define PROJECT_HOME_LABEL _("Project Home Page") #define PROJECT_HOME_LABEL _("Project Home Page")
#define NOTHING_CHOSEN_LABEL _("Nothing were chosen") #define NOTHING_CHOSEN_LABEL _("Nothing were chosen")
#define GLOBAL_LOAD_SUCCESS_LABEL _("Global configuration loading succseeded.") #define LOAD_SUCCESS_LABEL _("Repository data has been loaded successfully")
#define LOCAL_LOAD_SUCCESS_LABEL _("Local configuration loading succseeded.")
#define LOAD_FAILED_LABEL _("Config loading failed")
#define GLOBAL_LOCAL_SAVE_SUCCESS_LABEL _("Local and global configuration saving succseeded.")
#define GLOBAL_SAVE_SUCCESS_LABEL _("Global configuration saving succseeded.")
#define LOCAL_SAVE_SUCCESS_LABEL _("Local configuration saving succseeded.")
#define SAVE_FAILED_LABEL
#define GLOBAL_LOAD_SUCCESS _("Global configuration loading succseeded.")
#define LOCAL_LOAD_SUCCESS _("Local configuration loading succseeded.")
#define GLOBAL_LOCAL_SAVE_SUCCESS _("Local and global configuration saving succseeded.") #define SAVE_SUCCESS_LABEL _("Saving has succseeded")
#define GLOBAL_SAVE_SUCCESS _("Global configuration saving succseeded.")
#define LOCAL_SAVE_SUCCESS _("Local configuration saving succseeded.")
#define GENERAL_TAB_LABEL _("General") #define GENERAL_TAB_LABEL _("General")
#define PUBLICATION_TAB_LABEL _("Publication") #define PUBLICATION_TAB_LABEL _("Publication")
@ -53,6 +44,7 @@
#define ARCHITECRURE_LABEL _("Architecture:") #define ARCHITECRURE_LABEL _("Architecture:")
#define COMPONENTS_LABEL _("Components:") #define COMPONENTS_LABEL _("Components:")
#define SIGNATURE_LABEL _("Signature:") #define SIGNATURE_LABEL _("Signature:")
#define SIGN_LABEL _("Sign")
#define CREATE_REPO_LABEL _("Create repository") #define CREATE_REPO_LABEL _("Create repository")
#define OPEN_REPO_LABEL _("Open existing repository") #define OPEN_REPO_LABEL _("Open existing repository")
@ -72,9 +64,20 @@
#define CHOOSE_REPO_BRANCH_LABEL _("Choose repository or branch!") #define CHOOSE_REPO_BRANCH_LABEL _("Choose repository or branch!")
#define CHOOSE_PACK_LABEL _("Choose pack to delete!") #define CHOOSE_PACK_LABEL _("Choose pack to delete!")
#define CHOOSE_REPO_LABEL _("Choose repository to delete!") #define CHOOSE_REPO_LABEL _("Choose repository to delete!")
#define SIGN_CHOOSE_LABEL _("Choose repository or package to sign")
#define NAME_LABEL _("Name:") #define NAME_LABEL _("Name:")
#define BRANCHES_LABEL _("Branches:") #define BRANCHES_LABEL _("Branches:")
#define TYPE_BRANCH_NAME_LABEL _("< Type branch name >") #define TYPE_BRANCH_NAME_LABEL _("< Type branch name >")
#define EMPTY_NAME_LABEL _("Name must be filled!") #define EMPTY_NAME_LABEL _("Name must be filled!")
#define CHOOSE_PATH_LABEL _("Choose path for new repository") #define CHOOSE_PATH_LABEL _("Choose path for new repository")
#define ADD_REPO_LABEL _("Choose repository folder")
#define LOAD_REPO_LABEL _("Choose repository")
#define ABSENT_LABEL _("Absent")
#define DEPENDENCE_LABEL _("Dependences:")
#define DIGITAL_SIGNATURE_LABEL _("Digital signature")
#define PACKAGE_LABEL _("package")
#define REPOSITORY_LABEL _("repository")

@ -2,7 +2,7 @@
// dictionary functions // dictionary functions
/**yon_dictionary_create_empty(): /**yon_dictionary_new():
* [EN] * [EN]
* Creates and returns empty dictionary * Creates and returns empty dictionary
* [RU] * [RU]
@ -29,6 +29,7 @@ dictionary *yon_dictionary_new()
dictionary *yon_dictinoary_copy(dictionary *dict){ dictionary *yon_dictinoary_copy(dictionary *dict){
dictionary *dct = yon_dictionary_new_with_data(dict->key,dict->data); dictionary *dct = yon_dictionary_new_with_data(dict->key,dict->data);
dct->data_type= dict->data_type; dct->data_type= dict->data_type;
return dct;
} }
/**yon_dictionary_copy_deep(dictionary *dict) /**yon_dictionary_copy_deep(dictionary *dict)
@ -65,6 +66,7 @@ int yon_dictionary_set_data(dictionary *dict, void *data){
*/ */
int yon_dictionary_set_key(dictionary *dict, char *key){ int yon_dictionary_set_key(dictionary *dict, char *key){
dict->key=key; dict->key=key;
return 1;
} }
/** int yon_dictionary_set(dictionary *dict, char *key, void *data) /** int yon_dictionary_set(dictionary *dict, char *key, void *data)
@ -76,6 +78,7 @@ int yon_dictionary_set_key(dictionary *dict, char *key){
int yon_dictionary_set(dictionary *dict, char *key, void *data){ int yon_dictionary_set(dictionary *dict, char *key, void *data){
dict->key=key; dict->key=key;
dict->data=data; dict->data=data;
return 1;
} }
/**int yon_dictionary_empty(dictionary *dict) /**int yon_dictionary_empty(dictionary *dict)
@ -87,6 +90,7 @@ int yon_dictionary_set(dictionary *dict, char *key, void *data){
int yon_dictionary_empty(dictionary *dict){ int yon_dictionary_empty(dictionary *dict){
dict->data=NULL; dict->data=NULL;
dict->data_type=DICTIONARY_OTHER_TYPE; dict->data_type=DICTIONARY_OTHER_TYPE;
return 1;
} }
/**yon_dictionary_switch_to_last(dictionary **dict) /**yon_dictionary_switch_to_last(dictionary **dict)
@ -433,6 +437,13 @@ dictionary *yon_dictionary_get_nth(dictionary *dict, int place)
// char functions // char functions
int yon_char_find_last(char *source, char find){
int size = strlen(source);
int i=size;
for (;source[i]!=find&&i>0;i--);
return i;
}
/**[EN] /**[EN]
* *
* creates new char string by combining two char strings. * creates new char string by combining two char strings.
@ -570,9 +581,8 @@ char *yon_char_divide_search(char *source, char *dividepos, int delete_divider)
cut = yon_char_divide(source, leng); cut = yon_char_divide(source, leng);
return cut; return cut;
} }
else
return source;
} }
return source;
} }
/**yon_char_from_int(int int_to_convert) /**yon_char_from_int(int int_to_convert)
@ -604,6 +614,9 @@ char *yon_char_from_int(int int_to_convert)
* Заменяет в строке [source] все вхождения строки [find] на [replace] * Заменяет в строке [source] все вхождения строки [find] на [replace]
*/ */
char *yon_char_replace(char *source, char *find, char*replace){ char *yon_char_replace(char *source, char *find, char*replace){
if (!strstr(replace,find)){
char *final=NULL; char *final=NULL;
char *temp=NULL; char *temp=NULL;
if(!strstr(replace,find)){ if(!strstr(replace,find)){
@ -614,9 +627,11 @@ char *yon_char_replace(char *source, char *find, char*replace){
temp=yon_char_append(temp,replace); temp=yon_char_append(temp,replace);
source=yon_char_append(temp,final+1); source=yon_char_append(temp,final+1);
} }
return source;
} }
} }
return source;
}
/**yon_char_parse(char *parameters, int *size, char *divider) /**yon_char_parse(char *parameters, int *size, char *divider)
* [EN] * [EN]
@ -630,19 +645,18 @@ char **yon_char_parse(char *parameters, int *size, char *divider){
string=malloc(sizeof(char*)); string=malloc(sizeof(char*));
char *paramline=yon_char_new(parameters); char *paramline=yon_char_new(parameters);
char *param; char *param;
if (!strstr(parameters,divider)) return NULL;
while ((param=yon_char_divide_search(paramline,divider,1))){ while ((param=yon_char_divide_search(paramline,divider,1))){
if (strcmp(param,paramline)==0||param[0]=='\0') break;
string=realloc(string,sizeof(char*)*i); string=realloc(string,sizeof(char*)*i);
string[i-1]=yon_char_new(param); string[i-1]=yon_char_new(param);
i++; i++;
if (strcmp(param,paramline)==0) break;
} }
string=realloc(string,sizeof(char*)*i); string=realloc(string,sizeof(char*)*i);
string[i-1]=yon_char_new(paramline); string[i-1]=yon_char_new(paramline);
i++; i++;
// printf("%d\n",i);
*size=i-1; *size=i-1;
return string; return string;
} }
/**yon_char_parsed_rip(char **char_string, int *size, int item_to_delete) /**yon_char_parsed_rip(char **char_string, int *size, int item_to_delete)
@ -802,7 +816,11 @@ char *yon_ubl_root_user_get(){
} }
char *yon_ubl_user_get_home_directory(){ char *yon_ubl_user_get_home_directory(){
return getenv("HOME"); FILE *path = popen(get_home_dir_command,"r");
char *ret = g_malloc(4096);
fgets(ret,4096,path);
ret=yon_char_divide_search(ret,"\n",-1);
return ret;
} }
// parsing functions // parsing functions
@ -1370,12 +1388,29 @@ void yon_terminal_integrated_start(GtkWidget *terminal, char* command, void *end
#define check_window_config_setup if(__yon_window_config_target_window) #define check_window_config_setup if(__yon_window_config_target_window)
typedef struct {
char *parameter_name;
enum YON_TYPE containing_type;
GtkWidget *track_widget;
char *property_name;
} __yon_listener_parameter;
typedef struct {
char *parameter_name;
char *section;
enum YON_TYPE containing_type;
void *property;
} __yon_custom_parameter;
struct { struct {
int x; int x;
int y; int y;
int width; int width;
int height; int height;
int fullscreen; int fullscreen;
dictionary *custom_listeners;
dictionary *custom_parameters;
dictionary *deleted_parameters;
} __yon_main_window_config; } __yon_main_window_config;
static GtkWindow *__yon_window_config_target_window = NULL; static GtkWindow *__yon_window_config_target_window = NULL;
@ -1388,6 +1423,47 @@ void yon_terminal_integrated_start(GtkWidget *terminal, char* command, void *end
g_key_file_set_integer(__yon_window_config_file,"window","WindowWidth",__yon_main_window_config.width); g_key_file_set_integer(__yon_window_config_file,"window","WindowWidth",__yon_main_window_config.width);
g_key_file_set_integer(__yon_window_config_file,"window","WindowHeight",__yon_main_window_config.height); g_key_file_set_integer(__yon_window_config_file,"window","WindowHeight",__yon_main_window_config.height);
g_key_file_set_integer(__yon_window_config_file,"window","fullscreen",__yon_main_window_config.fullscreen); g_key_file_set_integer(__yon_window_config_file,"window","fullscreen",__yon_main_window_config.fullscreen);
dictionary *dict=NULL;
if (__yon_main_window_config.custom_listeners)
for_dictionaries(dict,__yon_main_window_config.custom_listeners){
__yon_listener_parameter *param = yon_dictionary_get_data(dict,__yon_listener_parameter*);
GValue *val = g_malloc0(sizeof(GValue));
g_object_get_property(G_OBJECT(param->track_widget),param->property_name,val);
switch(param->containing_type){
case YON_TYPE_STRING:
g_key_file_set_string(__yon_window_config_file,"window",param->parameter_name, g_value_get_string(val));
break;
case YON_TYPE_INT:
g_key_file_set_integer(__yon_window_config_file,"window",param->parameter_name, g_value_get_int(val));
break;
case YON_TYPE_BOOLEAN:
g_key_file_set_boolean(__yon_window_config_file,"window",param->parameter_name, g_value_get_boolean(val));
break;
case YON_TYPE_OTHER:printf("\033[0;31mCannot save %s property with %s key\033[0m\n",param->property_name,param->parameter_name);break;
}
}
if (__yon_main_window_config.custom_parameters)
for_dictionaries(dict,__yon_main_window_config.custom_parameters){
__yon_custom_parameter *param = yon_dictionary_get_data(dict,__yon_custom_parameter*);
switch (param->containing_type){
case YON_TYPE_STRING:
g_key_file_set_string(__yon_window_config_file,param->section,param->parameter_name, (char*)param->property);
break;
case YON_TYPE_INT:
g_key_file_set_integer(__yon_window_config_file,param->section,param->parameter_name, *(int*)param->property);
break;
case YON_TYPE_BOOLEAN:
g_key_file_set_boolean(__yon_window_config_file,param->section,param->parameter_name, *(gboolean*)param->property);
break;
default:
break;
}
}
if (__yon_main_window_config.deleted_parameters)
for_dictionaries(dict,__yon_main_window_config.deleted_parameters){
__yon_custom_parameter *param = yon_dictionary_get_data(dict,__yon_custom_parameter*);
g_key_file_remove_key(__yon_window_config_file,param->section,param->parameter_name,NULL);
}
g_key_file_save_to_file(__yon_window_config_file,__yon_window_config_path,NULL); g_key_file_save_to_file(__yon_window_config_file,__yon_window_config_path,NULL);
} }
@ -1449,8 +1525,7 @@ void yon_terminal_integrated_start(GtkWidget *terminal, char* command, void *end
if (!g_key_file_load_from_file(__yon_window_config_file,__yon_window_config_path,G_KEY_FILE_NONE,NULL)){ if (!g_key_file_load_from_file(__yon_window_config_file,__yon_window_config_path,G_KEY_FILE_NONE,NULL)){
struct stat st; struct stat st;
int size; int size;
config_str conf = yon_char_parse(yon_char_new(__yon_window_config_path),&size,"/"); char *path = yon_char_divide(yon_char_new(__yon_window_config_path),yon_char_find_last(__yon_window_config_path,'/'));
char *path = yon_char_unite(conf[0],"/",conf[1],"/",conf[2],"/",conf[3],"/",conf[4],"/",NULL);
if (stat(path, &st) == -1) { if (stat(path, &st) == -1) {
mkdir(path, 0777); mkdir(path, 0777);
} }
@ -1464,6 +1539,27 @@ void yon_terminal_integrated_start(GtkWidget *terminal, char* command, void *end
__yon_main_window_config.width = g_key_file_get_integer(__yon_window_config_file,"window","WindowWidth",NULL); __yon_main_window_config.width = g_key_file_get_integer(__yon_window_config_file,"window","WindowWidth",NULL);
__yon_main_window_config.height = g_key_file_get_integer(__yon_window_config_file,"window","WindowHeight",NULL); __yon_main_window_config.height = g_key_file_get_integer(__yon_window_config_file,"window","WindowHeight",NULL);
__yon_main_window_config.fullscreen = g_key_file_get_integer(__yon_window_config_file,"window","fullscreen",NULL); __yon_main_window_config.fullscreen = g_key_file_get_integer(__yon_window_config_file,"window","fullscreen",NULL);
dictionary *dict=NULL;
if (__yon_main_window_config.custom_listeners)
for_dictionaries(dict,__yon_main_window_config.custom_listeners){
__yon_listener_parameter *param = yon_dictionary_get_data(dict,__yon_listener_parameter*);
GValue *val = g_malloc0(sizeof(GValue));
g_object_get_property(G_OBJECT(param->track_widget),param->property_name,val);
switch(param->containing_type){
case YON_TYPE_STRING:
g_value_set_string(val,g_key_file_get_string(__yon_window_config_file,"window",param->parameter_name, NULL));
break;
case YON_TYPE_INT:
g_value_set_int(val,g_key_file_get_integer(__yon_window_config_file,"window",param->parameter_name, NULL));
break;
case YON_TYPE_BOOLEAN:
gboolean res = g_key_file_get_boolean(__yon_window_config_file,"window",param->parameter_name, NULL);
g_value_set_boolean(val,res);
break;
default:printf("\033[0;31mCannot load %s property with %s key\033[0m\n",param->property_name,param->parameter_name);break;
}
g_object_set_property(G_OBJECT(param->track_widget),param->property_name,val);
}
if (__yon_main_window_config.width==0) __yon_main_window_config.width=800; if (__yon_main_window_config.width==0) __yon_main_window_config.width=800;
if (__yon_main_window_config.height==0) __yon_main_window_config.height=600; if (__yon_main_window_config.height==0) __yon_main_window_config.height=600;
gtk_window_resize(__yon_window_config_target_window,__yon_main_window_config.width,__yon_main_window_config.height); gtk_window_resize(__yon_window_config_target_window,__yon_main_window_config.width,__yon_main_window_config.height);
@ -1479,6 +1575,70 @@ void yon_terminal_integrated_start(GtkWidget *terminal, char* command, void *end
gtk_window_resize(__yon_window_config_target_window,__yon_main_window_config.width,__yon_main_window_config.height); gtk_window_resize(__yon_window_config_target_window,__yon_main_window_config.width,__yon_main_window_config.height);
} }
config_str yon_window_config_get_section(char *section, gsize *size){
config_str key = g_key_file_get_keys(__yon_window_config_file,section,size,NULL);
return key;
}
/**yon_window_config_add_listener(GtkWidget *widget, char *param_name, char *widget_property, enum YON_TYPE val_type)
* [EN]
*
* [RU]
* Добавляет параметр виджета [widget] по названию [widget_property] для отслеживания и сохраняет его в конфиг под ключом [param_name].
*/
void yon_window_config_add_listener(GtkWidget *widget, char *param_name, char *widget_property, enum YON_TYPE val_type){
__yon_listener_parameter *param = NULL;
param = yon_remalloc(param,sizeof(__yon_listener_parameter));
param->parameter_name = yon_char_new(param_name);
param->track_widget = widget;
param->property_name = yon_char_new(widget_property);
param->containing_type = val_type;
yon_dictionary_add_or_create_if_exists_with_data(__yon_main_window_config.custom_listeners,param->parameter_name,param);
}
void yon_window_config_add_custom_parameter(char *param_name, char *section, void *tracked_value, enum YON_TYPE val_type){
__yon_custom_parameter *param = NULL;
param = yon_remalloc(param,sizeof(__yon_custom_parameter));
param->parameter_name = yon_char_new(param_name);
param->section=section;
param->property = tracked_value;
param->containing_type = val_type;
yon_dictionary_add_or_create_if_exists_with_data(__yon_main_window_config.custom_parameters,param->parameter_name,param);
}
void yon_window_config_erase_custom_parameter(char *param_name, char *section){
__yon_custom_parameter *param = NULL;
param = yon_remalloc(param,sizeof(__yon_custom_parameter));
param->parameter_name=param_name;
param->section=section;
yon_dictionary_add_or_create_if_exists_with_data(__yon_main_window_config.deleted_parameters,param->parameter_name,param);
}
int yon_window_config_get_parameter(char *section, char *config_parameter, void *return_value, enum YON_TYPE type){
GError *err=NULL;
switch (type){
case YON_TYPE_BOOLEAN:
*((int*)return_value) = g_key_file_get_boolean(__yon_window_config_file,section,config_parameter,&err);
if (err) return 0; else return 1;
break;
case YON_TYPE_INT:
*((int*)return_value) = g_key_file_get_integer(__yon_window_config_file,section,config_parameter,&err);
if (err) return 0; else return 1;
break;
case YON_TYPE_STRING:
*((char**)return_value) = g_key_file_get_string(__yon_window_config_file,section,config_parameter,&err);
if (err) return 0; else return 1;
break;
case YON_TYPE_STRING_LIST:
gsize size=0;
*((char***)return_value) = g_key_file_get_string_list(__yon_window_config_file,section,config_parameter,&size,&err);
*((char***)return_value)=yon_remalloc(return_value,size+1);
*((char***)return_value)[size]=NULL;
if (err) return 0; else return 1;
break;
}
}
GtkWidget *yon_ubl_menu_item_about_new(char *buttonname){ GtkWidget *yon_ubl_menu_item_about_new(char *buttonname){
GtkWidget *menu_item = gtk_menu_item_new(); GtkWidget *menu_item = gtk_menu_item_new();
gtk_style_context_add_class(gtk_widget_get_style_context(menu_item),"menuitembottom"); gtk_style_context_add_class(gtk_widget_get_style_context(menu_item),"menuitembottom");

@ -9,6 +9,8 @@
#include <dirent.h> #include <dirent.h>
#include <unistd.h> #include <unistd.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/types.h>
#include <pwd.h>
#include <locale.h> #include <locale.h>
#include <gtk/gtk.h> #include <gtk/gtk.h>
#include <gtk/gtkx.h> #include <gtk/gtkx.h>
@ -24,6 +26,7 @@
#define new(type) malloc(sizeof(type)) #define new(type) malloc(sizeof(type))
#define new_arr(type,size) malloc(sizeof(type)*size) #define new_arr(type,size) malloc(sizeof(type)*size)
#define get_home_dir_command yon_char_unite("getent passwd \"",yon_ubl_root_user_get(),"\" | cut -d: -f6",NULL)
typedef enum typedef enum
{ {
@ -121,6 +124,8 @@ void *yon_dictionary_free_all(dictionary *dictionary,void (data_manipulation)(vo
// char functions // char functions
int yon_char_find_last(char *source, char find);
char *yon_char_append(char *source, char *append); char *yon_char_append(char *source, char *append);
char *yon_char_new(char *chr); char *yon_char_new(char *chr);
@ -211,6 +216,14 @@ void yon_terminal_integrated_start(GtkWidget *terminal, char* command, void *end
#endif #endif
enum YON_TYPE{
YON_TYPE_STRING,
YON_TYPE_STRING_LIST,
YON_TYPE_INT,
YON_TYPE_BOOLEAN,
YON_TYPE_OTHER
};
GtkWidget *yon_ubl_menu_item_about_new(char *buttonname); GtkWidget *yon_ubl_menu_item_about_new(char *buttonname);
GtkWidget *yon_ubl_menu_item_documentation_new(char *buttonname); GtkWidget *yon_ubl_menu_item_documentation_new(char *buttonname);
@ -234,6 +247,16 @@ void yon_window_config_setup(GtkWindow *window);
int yon_window_config_load(char *path); int yon_window_config_load(char *path);
config_str yon_window_config_get_section(char *section, gsize *size);
void yon_window_config_add_listener(GtkWidget *widget, char *param_name, char *widget_property, enum YON_TYPE val_type);
void yon_window_config_add_custom_parameter(char *param_name, char *section, void *tracked_value, enum YON_TYPE val_type);
void yon_window_config_erase_custom_parameter(char *param_name, char *section);
int yon_window_config_get_parameter(char *section, char *config_parameter, void *return_value, enum YON_TYPE type);
int yon_gtk_combo_box_fill(GtkWidget *combo, char **parameters,int size); int yon_gtk_combo_box_fill(GtkWidget *combo, char **parameters,int size);
int yon_gtk_combo_box_text_find(GtkWidget *combo_box, char *text_to_find); int yon_gtk_combo_box_text_find(GtkWidget *combo_box, char *text_to_find);

@ -0,0 +1,132 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.38.2 -->
<interface>
<requires lib="gtk+" version="3.24"/>
<object class="GtkImage" id="image16">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">process-stop-symbolic</property>
</object>
<object class="GtkImage" id="image17">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">emblem-ok-symbolic</property>
</object>
<object class="GtkApplicationWindow" id="repoSignWindow">
<property name="width-request">450</property>
<property name="can-focus">False</property>
<property name="modal">True</property>
<property name="icon-name">com.ublinux.ubl-settings-repomanager</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-left">5</property>
<property name="margin-right">5</property>
<property name="margin-start">5</property>
<property name="margin-end">5</property>
<property name="margin-top">5</property>
<property name="margin-bottom">5</property>
<property name="orientation">vertical</property>
<property name="spacing">10</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">5</property>
<child>
<object class="GtkComboBoxText" id="repoSignKeysCombo">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">end</property>
<property name="spacing">5</property>
<property name="homogeneous">True</property>
<child>
<object class="GtkButton" id="repoSignCancelButton">
<property name="label" translatable="yes">Cancel</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image16</property>
<style>
<class name="button"/>
</style>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="repoSignSaveButton">
<property name="label" translatable="yes">Save</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image17</property>
<style>
<class name="button"/>
</style>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
<child type="titlebar">
<object class="GtkHeaderBar" id="SettingsBar2">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="show-close-button">True</property>
<child type="title">
<object class="GtkLabel" id="signHeaderNameLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Repository manager</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="pixel-size">32</property>
<property name="icon-name">com.ublinux.ubl-settings-repomanager</property>
</object>
</child>
</object>
</child>
</object>
</interface>

@ -118,3 +118,20 @@ background:transparent;
.boxInfoMessOK{ .boxInfoMessOK{
background-color: #f3f0ac; background-color: #f3f0ac;
} }
.invisprogress {
background-color:transparent;
color:transparent;
}
.invisprogress.osd {
background:transparent;
color:transparent;
}
.invisprogress.trough * {
background:transparent;
color:transparent;
}
.invisprogress.trough.empty {
background:transparent;
color:transparent;
}

@ -196,14 +196,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<column type="gchararray"/> <column type="gchararray"/>
<!-- column-name DisplayName --> <!-- column-name DisplayName -->
<column type="gchararray"/> <column type="gchararray"/>
<!-- column-name BranchList -->
<column type="gpointer"/>
<!-- column-name Path --> <!-- column-name Path -->
<column type="gchararray"/> <column type="gchararray"/>
<!-- column-name Status --> <!-- column-name Status -->
<column type="gint"/> <column type="gint"/>
<!-- column-name HideDeleted -->
<column type="gboolean"/>
<!-- column-name OldName --> <!-- column-name OldName -->
<column type="gchararray"/> <column type="gchararray"/>
<!-- column-name Renamed --> <!-- column-name Renamed -->
@ -220,6 +216,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<column type="gchararray"/> <column type="gchararray"/>
<!-- column-name PackageArch --> <!-- column-name PackageArch -->
<column type="gchararray"/> <column type="gchararray"/>
<!-- column-name PackageDepends -->
<column type="gchararray"/>
<!-- column-name SignAdress -->
<column type="gchararray"/>
<!-- column-name Signed -->
<column type="gboolean"/>
</columns> </columns>
</object> </object>
<object class="GtkAdjustment" id="adjustment1"> <object class="GtkAdjustment" id="adjustment1">
@ -262,6 +264,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="icon-name">user-trash-symbolic</property> <property name="icon-name">user-trash-symbolic</property>
</object> </object>
<object class="GtkImage" id="image5">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">com.ublinux.ubl-settings-repomanager.document-sign-symbolic</property>
</object>
<object class="GtkImage" id="image8"> <object class="GtkImage" id="image8">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
@ -684,7 +691,7 @@ translated and supported by community.</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkPaned"> <object class="GtkPaned" id="MovePaned">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">True</property>
<property name="position">395</property> <property name="position">395</property>
@ -749,7 +756,6 @@ translated and supported by community.</property>
</child> </child>
<child> <child>
<object class="GtkButton" id="ConfigureButton"> <object class="GtkButton" id="ConfigureButton">
<property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">True</property>
<property name="receives-default">True</property> <property name="receives-default">True</property>
<property name="tooltip-text" translatable="yes">Configure repository</property> <property name="tooltip-text" translatable="yes">Configure repository</property>
@ -792,6 +798,34 @@ translated and supported by community.</property>
<property name="position">5</property> <property name="position">5</property>
</packing> </packing>
</child> </child>
<child>
<object class="GtkButton" id="SignButton">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="tooltip-text" translatable="yes">Sign</property>
<property name="image">image5</property>
<style>
<class name="thin"/>
</style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">6</property>
</packing>
</child>
<child>
<object class="GtkSeparator">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">7</property>
</packing>
</child>
<child> <child>
<object class="GtkButton" id="AddPackageButton"> <object class="GtkButton" id="AddPackageButton">
<property name="visible">True</property> <property name="visible">True</property>
@ -944,14 +978,14 @@ translated and supported by community.</property>
<property name="orientation">vertical</property> <property name="orientation">vertical</property>
<property name="spacing">5</property> <property name="spacing">5</property>
<child> <child>
<object class="GtkBox"> <object class="GtkBox" id="nameBox">
<property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="spacing">20</property> <property name="spacing">5</property>
<child> <child>
<object class="GtkLabel" id="CodeNameLabel"> <object class="GtkLabel" id="CodeNameLabel">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="valign">start</property>
<property name="label" translatable="yes">Code name:</property> <property name="label" translatable="yes">Code name:</property>
<property name="xalign">0</property> <property name="xalign">0</property>
<attributes> <attributes>
@ -968,6 +1002,8 @@ translated and supported by community.</property>
<object class="GtkLabel" id="CodeNameInfoLabel"> <object class="GtkLabel" id="CodeNameInfoLabel">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="wrap">True</property>
<property name="xalign">0</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -983,13 +1019,14 @@ translated and supported by community.</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkBox"> <object class="GtkBox" id="branchBox">
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="spacing">20</property> <property name="spacing">5</property>
<child> <child>
<object class="GtkLabel" id="BranchLabel"> <object class="GtkLabel" id="BranchLabel">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="valign">start</property>
<property name="label" translatable="yes">Branch:</property> <property name="label" translatable="yes">Branch:</property>
<property name="xalign">0</property> <property name="xalign">0</property>
<attributes> <attributes>
@ -1006,6 +1043,8 @@ translated and supported by community.</property>
<object class="GtkLabel" id="BranchInfoLabel"> <object class="GtkLabel" id="BranchInfoLabel">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="wrap">True</property>
<property name="xalign">0</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -1021,14 +1060,14 @@ translated and supported by community.</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkBox"> <object class="GtkBox" id="versionBox">
<property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="spacing">20</property> <property name="spacing">5</property>
<child> <child>
<object class="GtkLabel" id="VersionLabel"> <object class="GtkLabel" id="VersionLabel">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="valign">start</property>
<property name="label" translatable="yes">Version:</property> <property name="label" translatable="yes">Version:</property>
<property name="xalign">0</property> <property name="xalign">0</property>
<attributes> <attributes>
@ -1045,6 +1084,8 @@ translated and supported by community.</property>
<object class="GtkLabel" id="VersionInfoLabel"> <object class="GtkLabel" id="VersionInfoLabel">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="wrap">True</property>
<property name="xalign">0</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -1060,14 +1101,14 @@ translated and supported by community.</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkBox"> <object class="GtkBox" id="archBox">
<property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="spacing">20</property> <property name="spacing">5</property>
<child> <child>
<object class="GtkLabel" id="ArchitectureLabel"> <object class="GtkLabel" id="ArchitectureLabel">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="valign">start</property>
<property name="label" translatable="yes">Architecture:</property> <property name="label" translatable="yes">Architecture:</property>
<property name="xalign">0</property> <property name="xalign">0</property>
<attributes> <attributes>
@ -1084,6 +1125,8 @@ translated and supported by community.</property>
<object class="GtkLabel" id="ArchitectureInfoLabel"> <object class="GtkLabel" id="ArchitectureInfoLabel">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="wrap">True</property>
<property name="xalign">0</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -1099,14 +1142,15 @@ translated and supported by community.</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkBox"> <object class="GtkBox" id="dependBox">
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="spacing">20</property> <property name="spacing">5</property>
<child> <child>
<object class="GtkLabel" id="ComponentsLabel"> <object class="GtkLabel" id="ComponentsLabel">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">Components:</property> <property name="valign">start</property>
<property name="label" translatable="yes">Dependences:</property>
<property name="xalign">0</property> <property name="xalign">0</property>
<attributes> <attributes>
<attribute name="weight" value="bold"/> <attribute name="weight" value="bold"/>
@ -1119,9 +1163,11 @@ translated and supported by community.</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkLabel" id="ComponentsInfoLabel"> <object class="GtkLabel" id="DependencesInfoLabel">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="wrap">True</property>
<property name="xalign">0</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -1137,13 +1183,14 @@ translated and supported by community.</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkBox"> <object class="GtkBox" id="signatureBox">
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="spacing">20</property> <property name="spacing">5</property>
<child> <child>
<object class="GtkLabel" id="SignatureLabel"> <object class="GtkLabel" id="SignatureLabel">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="valign">start</property>
<property name="label" translatable="yes">Signature:</property> <property name="label" translatable="yes">Signature:</property>
<property name="xalign">0</property> <property name="xalign">0</property>
<attributes> <attributes>
@ -1160,6 +1207,8 @@ translated and supported by community.</property>
<object class="GtkLabel" id="SignatureInfoLabel"> <object class="GtkLabel" id="SignatureInfoLabel">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="wrap">True</property>
<property name="xalign">0</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -1633,4 +1682,14 @@ translated and supported by community.</property>
</object> </object>
</child> </child>
</object> </object>
<object class="GtkSizeGroup" id="labels">
<widgets>
<widget name="CodeNameLabel"/>
<widget name="BranchLabel"/>
<widget name="VersionLabel"/>
<widget name="ArchitectureLabel"/>
<widget name="ComponentsLabel"/>
<widget name="SignatureLabel"/>
</widgets>
</object>
</interface> </interface>

@ -66,237 +66,263 @@ msgid "Lock global configration loading"
msgstr "" msgstr ""
#: source/ubl-strings.h:4 #: source/ubl-strings.h:4
msgid ""
"Warning! Application was launched without root - root-dependent actions are "
"locked"
msgstr ""
#: source/ubl-strings.h:6
msgid "Repository manager" msgid "Repository manager"
msgstr "" msgstr ""
#: source/ubl-strings.h:5 #: source/ubl-strings.h:7
msgid "Repository management and configuring" msgid "Repository management and configuring"
msgstr "" msgstr ""
#: source/ubl-strings.h:6 #: source/ubl-strings.h:8
msgid "Operation succeeded" msgid "Operation succeeded"
msgstr "" msgstr ""
#: source/ubl-strings.h:9 #: source/ubl-strings.h:10
msgid "About" msgid "About"
msgstr "" msgstr ""
#: source/ubl-strings.h:10 #: source/ubl-strings.h:11
msgid "Documentation" msgid "Documentation"
msgstr "" msgstr ""
#: source/ubl-strings.h:12 #: source/ubl-strings.h:13
msgid "Save to local configuration" msgid "Save to local configuration"
msgstr "" msgstr ""
#: source/ubl-strings.h:13 #: source/ubl-strings.h:14
msgid "Save to global configuration" msgid "Save to global configuration"
msgstr "" msgstr ""
#: source/ubl-strings.h:14 #: source/ubl-strings.h:15
msgid "Save configuration" msgid "Save configuration"
msgstr "" msgstr ""
#: source/ubl-strings.h:15 #: source/ubl-strings.h:16
msgid "Save" msgid "Save"
msgstr "" msgstr ""
#: source/ubl-strings.h:17 #: source/ubl-strings.h:18
msgid "Load local configuration" msgid "Load local configuration"
msgstr "" msgstr ""
#: source/ubl-strings.h:18 #: source/ubl-strings.h:19
msgid "Load global configuration" msgid "Load global configuration"
msgstr "" msgstr ""
#: source/ubl-strings.h:19 #: source/ubl-strings.h:20
msgid "Load" msgid "Load"
msgstr "" msgstr ""
#: source/ubl-strings.h:21 #: source/ubl-strings.h:22
msgid "Cancel" msgid "Cancel"
msgstr "" msgstr ""
#: source/ubl-strings.h:23 #: source/ubl-strings.h:24
msgid "Would you like to read documentation in the Web?" msgid "Would you like to read documentation in the Web?"
msgstr "" msgstr ""
#: source/ubl-strings.h:24 #: source/ubl-strings.h:25
msgid "" msgid ""
"You will be redirected to documentation website where documentation is\n" "You will be redirected to documentation website where documentation is\n"
"translated and supported by community." "translated and supported by community."
msgstr "" msgstr ""
#: source/ubl-strings.h:25 #: source/ubl-strings.h:26
msgid "Always redirect to online documentation" msgid "Always redirect to online documentation"
msgstr "" msgstr ""
#: source/ubl-strings.h:26 #: source/ubl-strings.h:27
msgid "Open documentation" msgid "Open documentation"
msgstr "" msgstr ""
#: source/ubl-strings.h:27 #: source/ubl-strings.h:28
msgid "Project Home Page" msgid "Project Home Page"
msgstr "" msgstr ""
#: source/ubl-strings.h:28 #: source/ubl-strings.h:29
msgid "Nothing were chosen" msgid "Nothing were chosen"
msgstr "" msgstr ""
#: source/ubl-strings.h:30 source/ubl-strings.h:38 #: source/ubl-strings.h:31
msgid "Global configuration loading succseeded." msgid "Repository data has been loaded successfully"
msgstr "" msgstr ""
#: source/ubl-strings.h:31 source/ubl-strings.h:39 #: source/ubl-strings.h:33
msgid "Local configuration loading succseeded." msgid "Saving has succseeded"
msgstr "" msgstr ""
#: source/ubl-strings.h:32 #: source/ubl-strings.h:35
msgid "Config loading failed"
msgstr ""
#: source/ubl-strings.h:34 source/ubl-strings.h:41
msgid "Local and global configuration saving succseeded."
msgstr ""
#: source/ubl-strings.h:35 source/ubl-strings.h:42
msgid "Global configuration saving succseeded."
msgstr ""
#: source/ubl-strings.h:36 source/ubl-strings.h:43
msgid "Local configuration saving succseeded."
msgstr ""
#: source/ubl-strings.h:45
msgid "General" msgid "General"
msgstr "" msgstr ""
#: source/ubl-strings.h:46 #: source/ubl-strings.h:36
msgid "Publication" msgid "Publication"
msgstr "" msgstr ""
#: source/ubl-strings.h:47 #: source/ubl-strings.h:37
msgid "Trusted repository" msgid "Trusted repository"
msgstr "" msgstr ""
#: source/ubl-strings.h:48 #: source/ubl-strings.h:38
msgid "Server type:" msgid "Server type:"
msgstr "" msgstr ""
#: source/ubl-strings.h:49 #: source/ubl-strings.h:39
msgid "IP adress:" msgid "IP adress:"
msgstr "" msgstr ""
#: source/ubl-strings.h:50 #: source/ubl-strings.h:40
msgid "Port:" msgid "Port:"
msgstr "" msgstr ""
#: source/ubl-strings.h:51 #: source/ubl-strings.h:41
msgid "Publish" msgid "Publish"
msgstr "" msgstr ""
#: source/ubl-strings.h:52 #: source/ubl-strings.h:42
msgid "Code name:" msgid "Code name:"
msgstr "" msgstr ""
#: source/ubl-strings.h:53 #: source/ubl-strings.h:43
msgid "Branch:" msgid "Branch:"
msgstr "" msgstr ""
#: source/ubl-strings.h:54 #: source/ubl-strings.h:44
msgid "Architecture:" msgid "Architecture:"
msgstr "" msgstr ""
#: source/ubl-strings.h:55 #: source/ubl-strings.h:45
msgid "Components:" msgid "Components:"
msgstr "" msgstr ""
#: source/ubl-strings.h:56 #: source/ubl-strings.h:46
msgid "Signature:" msgid "Signature:"
msgstr "" msgstr ""
#: source/ubl-strings.h:58 #: source/ubl-strings.h:47
msgid "Sign"
msgstr ""
#: source/ubl-strings.h:49
msgid "Create repository" msgid "Create repository"
msgstr "" msgstr ""
#: source/ubl-strings.h:59 #: source/ubl-strings.h:50
msgid "Open existing repository" msgid "Open existing repository"
msgstr "" msgstr ""
#: source/ubl-strings.h:60 #: source/ubl-strings.h:51
msgid "Configure repository" msgid "Configure repository"
msgstr "" msgstr ""
#: source/ubl-strings.h:61 #: source/ubl-strings.h:52
msgid "Delete repository" msgid "Delete repository"
msgstr "" msgstr ""
#: source/ubl-strings.h:62 #: source/ubl-strings.h:53
msgid "" msgid ""
"Add/Remove repository from\n" "Add/Remove repository from\n"
"local package sources" "local package sources"
msgstr "" msgstr ""
#: source/ubl-strings.h:63 #: source/ubl-strings.h:54
msgid "Enable/disable repository publish" msgid "Enable/disable repository publish"
msgstr "" msgstr ""
#: source/ubl-strings.h:64 #: source/ubl-strings.h:55
msgid "Check dependences" msgid "Check dependences"
msgstr "" msgstr ""
#: source/ubl-strings.h:65 #: source/ubl-strings.h:56
msgid "Sign ripository" msgid "Sign ripository"
msgstr "" msgstr ""
#: source/ubl-strings.h:66 #: source/ubl-strings.h:57
msgid "Add package" msgid "Add package"
msgstr "" msgstr ""
#: source/ubl-strings.h:67 #: source/ubl-strings.h:58
msgid "Remove package" msgid "Remove package"
msgstr "" msgstr ""
#: source/ubl-strings.h:68 #: source/ubl-strings.h:59
msgid "Open" msgid "Open"
msgstr "" msgstr ""
#: source/ubl-strings.h:70 #: source/ubl-strings.h:61
msgid "Operation done" msgid "Operation done"
msgstr "" msgstr ""
#: source/ubl-strings.h:72 #: source/ubl-strings.h:63
msgid "Choose branch or pack in branch to add file!" msgid "Choose branch or pack in branch to add file!"
msgstr "" msgstr ""
#: source/ubl-strings.h:73 #: source/ubl-strings.h:64
msgid "Choose repository or branch!" msgid "Choose repository or branch!"
msgstr "" msgstr ""
#: source/ubl-strings.h:74 #: source/ubl-strings.h:65
msgid "Choose pack to delete!" msgid "Choose pack to delete!"
msgstr "" msgstr ""
#: source/ubl-strings.h:75 #: source/ubl-strings.h:66
msgid "Choose repository to delete!" msgid "Choose repository to delete!"
msgstr "" msgstr ""
#: source/ubl-strings.h:77 #: source/ubl-strings.h:67
msgid "Choose repository or package to sign"
msgstr ""
#: source/ubl-strings.h:69
msgid "Name:" msgid "Name:"
msgstr "" msgstr ""
#: source/ubl-strings.h:78 #: source/ubl-strings.h:70
msgid "Branches:" msgid "Branches:"
msgstr "" msgstr ""
#: source/ubl-strings.h:79 #: source/ubl-strings.h:71
msgid "< Type branch name >" msgid "< Type branch name >"
msgstr "" msgstr ""
#: source/ubl-strings.h:80 #: source/ubl-strings.h:72
msgid "Name must be filled!" msgid "Name must be filled!"
msgstr "" msgstr ""
#: source/ubl-strings.h:81 #: source/ubl-strings.h:73
msgid "Choose path for new repository" msgid "Choose path for new repository"
msgstr "" msgstr ""
#: source/ubl-strings.h:75
msgid "Choose repository folder"
msgstr ""
#: source/ubl-strings.h:76
msgid "Choose repository"
msgstr ""
#: source/ubl-strings.h:78
msgid "Absent"
msgstr ""
#: source/ubl-strings.h:79
msgid "Dependences:"
msgstr ""
#: source/ubl-strings.h:80
msgid "Digital signature"
msgstr ""
#: source/ubl-strings.h:82
msgid "package"
msgstr ""
#: source/ubl-strings.h:83
msgid "repository"
msgstr ""

@ -50,7 +50,6 @@ msgid "Lock this help menu"
msgstr "Блокировка вызова справки" msgstr "Блокировка вызова справки"
#: source/ubl-strings.h:2 #: source/ubl-strings.h:2
#, fuzzy
msgid "Lock configuration saving" msgid "Lock configuration saving"
msgstr "Блокировка сохранения локальной и глобальной конфигурации" msgstr "Блокировка сохранения локальной и глобальной конфигурации"
@ -67,63 +66,70 @@ msgid "Lock global configration loading"
msgstr "Блокировка загрузки глобальной конфигурации" msgstr "Блокировка загрузки глобальной конфигурации"
#: source/ubl-strings.h:4 #: source/ubl-strings.h:4
msgid ""
"Warning! Application was launched without root - root-dependent actions are "
"locked"
msgstr ""
"Внимание! Приложение было запущено без прав суперпользователя - действия, "
"требующие их наличия заблокированы"
#: source/ubl-strings.h:6
msgid "Repository manager" msgid "Repository manager"
msgstr "Менеджер репозиториев" msgstr "Менеджер репозиториев"
#: source/ubl-strings.h:5 #: source/ubl-strings.h:7
msgid "Repository management and configuring" msgid "Repository management and configuring"
msgstr "Настройка параметров и управление репозиториями системы" msgstr "Настройка параметров и управление репозиториями системы"
#: source/ubl-strings.h:6 #: source/ubl-strings.h:8
#, fuzzy
msgid "Operation succeeded" msgid "Operation succeeded"
msgstr "Операция завершена" msgstr "Операция завершена"
#: source/ubl-strings.h:9 #: source/ubl-strings.h:10
msgid "About" msgid "About"
msgstr "О программе" msgstr "О программе"
#: source/ubl-strings.h:10 #: source/ubl-strings.h:11
msgid "Documentation" msgid "Documentation"
msgstr "Справка" msgstr "Справка"
#: source/ubl-strings.h:12 #: source/ubl-strings.h:13
msgid "Save to local configuration" msgid "Save to local configuration"
msgstr "Сохранить в локальную конфигурацию" msgstr "Сохранить в локальную конфигурацию"
#: source/ubl-strings.h:13 #: source/ubl-strings.h:14
msgid "Save to global configuration" msgid "Save to global configuration"
msgstr "Сохранить в глобальную конфигурацию" msgstr "Сохранить в глобальную конфигурацию"
#: source/ubl-strings.h:14 #: source/ubl-strings.h:15
msgid "Save configuration" msgid "Save configuration"
msgstr "Сохранить конфигурацию" msgstr "Сохранить конфигурацию"
#: source/ubl-strings.h:15 #: source/ubl-strings.h:16
msgid "Save" msgid "Save"
msgstr "Сохранить" msgstr "Сохранить"
#: source/ubl-strings.h:17 #: source/ubl-strings.h:18
msgid "Load local configuration" msgid "Load local configuration"
msgstr "Загрузить локальную конфигуруцию" msgstr "Загрузить локальную конфигуруцию"
#: source/ubl-strings.h:18 #: source/ubl-strings.h:19
msgid "Load global configuration" msgid "Load global configuration"
msgstr "Загрузить глобальную конфигурацию" msgstr "Загрузить глобальную конфигурацию"
#: source/ubl-strings.h:19 #: source/ubl-strings.h:20
msgid "Load" msgid "Load"
msgstr "Загрузить" msgstr "Загрузить"
#: source/ubl-strings.h:21 #: source/ubl-strings.h:22
msgid "Cancel" msgid "Cancel"
msgstr "Отмена" msgstr "Отмена"
#: source/ubl-strings.h:23 #: source/ubl-strings.h:24
msgid "Would you like to read documentation in the Web?" msgid "Would you like to read documentation in the Web?"
msgstr "Вы хотите прочитать справку в Сети?" msgstr "Вы хотите прочитать справку в Сети?"
#: source/ubl-strings.h:24 #: source/ubl-strings.h:25
msgid "" msgid ""
"You will be redirected to documentation website where documentation is\n" "You will be redirected to documentation website where documentation is\n"
"translated and supported by community." "translated and supported by community."
@ -131,111 +137,100 @@ msgstr ""
"Вы будете перенаправлены на сайт с документацией где страницы помощи\n" "Вы будете перенаправлены на сайт с документацией где страницы помощи\n"
"переводятся и поддерживаются сообществом." "переводятся и поддерживаются сообществом."
#: source/ubl-strings.h:25 #: source/ubl-strings.h:26
msgid "Always redirect to online documentation" msgid "Always redirect to online documentation"
msgstr "Всегда перенаправлять" msgstr "Всегда перенаправлять"
#: source/ubl-strings.h:26 #: source/ubl-strings.h:27
msgid "Open documentation" msgid "Open documentation"
msgstr "Прочитать справку" msgstr "Прочитать справку"
#: source/ubl-strings.h:27 #: source/ubl-strings.h:28
msgid "Project Home Page" msgid "Project Home Page"
msgstr "Домашняя страница проекта" msgstr "Домашняя страница проекта"
#: source/ubl-strings.h:28 #: source/ubl-strings.h:29
msgid "Nothing were chosen" msgid "Nothing were chosen"
msgstr "Ничего не было выбрано" msgstr "Ничего не было выбрано"
#: source/ubl-strings.h:30 source/ubl-strings.h:38 #: source/ubl-strings.h:31
msgid "Global configuration loading succseeded." msgid "Repository data has been loaded successfully"
msgstr "Успешно загружена глобальная конфигурация" msgstr "Информация о пакетах успешно загружена"
#: source/ubl-strings.h:31 source/ubl-strings.h:39
msgid "Local configuration loading succseeded."
msgstr "Успешно загружена локальная конфигурация"
#: source/ubl-strings.h:32
msgid "Config loading failed"
msgstr ""
#: source/ubl-strings.h:34 source/ubl-strings.h:41
msgid "Local and global configuration saving succseeded."
msgstr "Успешно записаны локальная и глобальная конфигурация"
#: source/ubl-strings.h:35 source/ubl-strings.h:42
msgid "Global configuration saving succseeded."
msgstr "Успешно записана глобальная конфигурация"
#: source/ubl-strings.h:36 source/ubl-strings.h:43 #: source/ubl-strings.h:33
msgid "Local configuration saving succseeded." #, fuzzy
msgstr "Успешно записана локальная конфигурация" msgid "Saving has succseeded"
msgstr "Успешно сохранено"
#: source/ubl-strings.h:45 #: source/ubl-strings.h:35
msgid "General" msgid "General"
msgstr "Общие" msgstr "Общие"
#: source/ubl-strings.h:46 #: source/ubl-strings.h:36
msgid "Publication" msgid "Publication"
msgstr "Публикация" msgstr "Публикация"
#: source/ubl-strings.h:47 #: source/ubl-strings.h:37
msgid "Trusted repository" msgid "Trusted repository"
msgstr "Доверенный репозиторий" msgstr "Доверенный репозиторий"
#: source/ubl-strings.h:48 #: source/ubl-strings.h:38
msgid "Server type:" msgid "Server type:"
msgstr "Тип сервера:" msgstr "Тип сервера:"
#: source/ubl-strings.h:49 #: source/ubl-strings.h:39
msgid "IP adress:" msgid "IP adress:"
msgstr "IP-адрес:" msgstr "IP-адрес:"
#: source/ubl-strings.h:50 #: source/ubl-strings.h:40
msgid "Port:" msgid "Port:"
msgstr "Порт:" msgstr "Порт:"
#: source/ubl-strings.h:51 #: source/ubl-strings.h:41
msgid "Publish" msgid "Publish"
msgstr "Опубликовать" msgstr "Опубликовать"
#: source/ubl-strings.h:52 #: source/ubl-strings.h:42
msgid "Code name:" msgid "Code name:"
msgstr "Кодовое имя:" msgstr "Кодовое имя:"
#: source/ubl-strings.h:53 #: source/ubl-strings.h:43
msgid "Branch:" msgid "Branch:"
msgstr "Ветка:" msgstr "Ветка:"
#: source/ubl-strings.h:54 #: source/ubl-strings.h:44
msgid "Architecture:" msgid "Architecture:"
msgstr "Архитектура:" msgstr "Архитектура:"
#: source/ubl-strings.h:55 #: source/ubl-strings.h:45
msgid "Components:" msgid "Components:"
msgstr "Компоненты" msgstr "Компоненты"
#: source/ubl-strings.h:56 #: source/ubl-strings.h:46
msgid "Signature:" msgid "Signature:"
msgstr "Подпись" msgstr "Подпись:"
#: source/ubl-strings.h:58 #: source/ubl-strings.h:47
msgid "Sign"
msgstr "Подписать"
#: source/ubl-strings.h:49
msgid "Create repository" msgid "Create repository"
msgstr "Создать репозиторий" msgstr "Создать репозиторий"
#: source/ubl-strings.h:59 #: source/ubl-strings.h:50
msgid "Open existing repository" msgid "Open existing repository"
msgstr "Открыть и добавить репозиторий" msgstr "Открыть и добавить репозиторий"
#: source/ubl-strings.h:60 #: source/ubl-strings.h:51
msgid "Configure repository" msgid "Configure repository"
msgstr "Редактировать репозиторий" msgstr "Редактировать репозиторий"
#: source/ubl-strings.h:61 #: source/ubl-strings.h:52
msgid "Delete repository" msgid "Delete repository"
msgstr "Удалить репозиторий" msgstr "Удалить репозиторий"
#: source/ubl-strings.h:62 #: source/ubl-strings.h:53
msgid "" msgid ""
"Add/Remove repository from\n" "Add/Remove repository from\n"
"local package sources" "local package sources"
@ -243,68 +238,98 @@ msgstr ""
"Добавить/удалить репу из\n" "Добавить/удалить репу из\n"
" локальных источников пакетов" " локальных источников пакетов"
#: source/ubl-strings.h:63 #: source/ubl-strings.h:54
msgid "Enable/disable repository publish" msgid "Enable/disable repository publish"
msgstr "Включить/отключить публикацию" msgstr "Включить/отключить публикацию"
#: source/ubl-strings.h:64 #: source/ubl-strings.h:55
msgid "Check dependences" msgid "Check dependences"
msgstr "Проверить на битые зависимости" msgstr "Проверить на битые зависимости"
#: source/ubl-strings.h:65 #: source/ubl-strings.h:56
msgid "Sign ripository" msgid "Sign ripository"
msgstr "Подпись пакетов" msgstr "Подпись пакетов"
#: source/ubl-strings.h:66 #: source/ubl-strings.h:57
msgid "Add package" msgid "Add package"
msgstr "Добавить пакет" msgstr "Добавить пакет"
#: source/ubl-strings.h:67 #: source/ubl-strings.h:58
msgid "Remove package" msgid "Remove package"
msgstr "Удалить пакет" msgstr "Удалить пакет"
#: source/ubl-strings.h:68 #: source/ubl-strings.h:59
msgid "Open" msgid "Open"
msgstr "Открыть" msgstr "Открыть"
#: source/ubl-strings.h:70 #: source/ubl-strings.h:61
msgid "Operation done" msgid "Operation done"
msgstr "Операция завершена" msgstr "Операция завершена"
#: source/ubl-strings.h:72 #: source/ubl-strings.h:63
msgid "Choose branch or pack in branch to add file!" msgid "Choose branch or pack in branch to add file!"
msgstr "Выберите ветку чтобы добавить пакет!" msgstr "Выберите ветку чтобы добавить пакет!"
#: source/ubl-strings.h:73 #: source/ubl-strings.h:64
msgid "Choose repository or branch!" msgid "Choose repository or branch!"
msgstr "Выберите репозиторий!" msgstr "Выберите репозиторий!"
#: source/ubl-strings.h:74 #: source/ubl-strings.h:65
msgid "Choose pack to delete!" msgid "Choose pack to delete!"
msgstr "Выберите пакет для удаления!" msgstr "Выберите пакет для удаления!"
#: source/ubl-strings.h:75 #: source/ubl-strings.h:66
msgid "Choose repository to delete!" msgid "Choose repository to delete!"
msgstr "Выберите репозиторий для удаления!" msgstr "Выберите репозиторий для удаления!"
#: source/ubl-strings.h:77 #: source/ubl-strings.h:67
msgid "Choose repository or package to sign"
msgstr "Выберите репозиторий или пакет для подписи"
#: source/ubl-strings.h:69
msgid "Name:" msgid "Name:"
msgstr "Название:" msgstr "Название:"
#: source/ubl-strings.h:78 #: source/ubl-strings.h:70
#, fuzzy
msgid "Branches:" msgid "Branches:"
msgstr "Ветки:" msgstr "Ветки:"
#: source/ubl-strings.h:79 #: source/ubl-strings.h:71
msgid "< Type branch name >" msgid "< Type branch name >"
msgstr "< Введите название ветки >" msgstr "< Введите название ветки >"
#: source/ubl-strings.h:80 #: source/ubl-strings.h:72
msgid "Name must be filled!" msgid "Name must be filled!"
msgstr "Введите название!" msgstr "Введите название!"
#: source/ubl-strings.h:81 #: source/ubl-strings.h:73
#, fuzzy
msgid "Choose path for new repository" msgid "Choose path for new repository"
msgstr "Выбрать расположение нового репозитория" msgstr "Выбрать расположение нового репозитория"
#: source/ubl-strings.h:75
msgid "Choose repository folder"
msgstr "Выбрать директорию для репозитория"
#: source/ubl-strings.h:76
msgid "Choose repository"
msgstr "Выбрать репозиторий"
#: source/ubl-strings.h:78
msgid "Absent"
msgstr "Отсутствует"
#: source/ubl-strings.h:79
msgid "Dependences:"
msgstr "Зависит от:"
#: source/ubl-strings.h:80
msgid "Digital signature"
msgstr "Цифровая подпись"
#: source/ubl-strings.h:82
msgid "package"
msgstr "пакет"
#: source/ubl-strings.h:83
msgid "repository"
msgstr "репозиторий"
Loading…
Cancel
Save