version_application implementation, auto remove version value from files after building

pull/4/head
parent 7668b022bf
commit 4fc5a5521f

@ -19,6 +19,12 @@ all: init build
init:
@echo "Initialize ..."; \
version="$$(cat VERSION.md)"; \
version=$${version:8}; \
search="s/string version_application.*$&"; \
echo $$search; \
replace="string version_application = \"$${version}\";"; \
sed -i -e "$$search/$$replace/gi" source/ubl-settings-info.c; \
echo "-- Build path: ${CMAKE_BUILD_DIR}"
depend:
@ -123,6 +129,12 @@ clean:
else \
echo "Clean: OK"; \
fi
@version="$$(cat VERSION.md)"; \
version=$${version:8}; \
search="s/string version_application.*$&"; \
echo $$search; \
replace="string version_application = ;"; \
sed -i -e "$$search/$$replace/gi" source/ubl-settings-info.c; \
help:
@echo "The following are some of the valid targets for this Makefile:"

@ -0,0 +1 @@
VERSION 1.2

@ -11,6 +11,9 @@
#define LocaleName "ubl-settings-info"
#define LocalePath "/usr/share/locale"
typedef char* string;
string version_application = ;
#define _(String) gettext(String)
@ -34,6 +37,7 @@ void on_about(GtkWidget *button){
GtkWidget *AboutButtons = GTK_WIDGET(gtk_builder_get_object(builder,"AboutButtons"));
GtkWidget *About = GTK_WIDGET(gtk_builder_get_object(builder, "About"));
GtkWidget *HeaderAboutTopic = GTK_WIDGET(gtk_builder_get_object(builder, "headerAboutTopic"));
gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(About),version_application);
gtk_about_dialog_set_comments(GTK_ABOUT_DIALOG(About),_("Sum up system information"));
gtk_about_dialog_set_program_name(GTK_ABOUT_DIALOG(About),_("UBLinux System Info"));
gtk_widget_show(GTK_WIDGET(gtk_builder_get_object(builder,"About")));

@ -21,6 +21,7 @@ inline returnstruct *ubl_make_plugs(GtkWidget *LeftWidget, GtkWidget *RightWidge
GtkStyleContext *context = gtk_widget_get_style_context(plug);
gtk_style_context_add_class(context,"primary-toolbar");
gtk_style_context_add_class(gtk_widget_get_style_context(toplug),"button");
}
if (right_plug_id>0&&RightWidget){
GtkWidget *plug=gtk_plug_new(right_plug_id);
@ -37,6 +38,7 @@ inline returnstruct *ubl_make_plugs(GtkWidget *LeftWidget, GtkWidget *RightWidge
GtkStyleContext *context = gtk_widget_get_style_context(plug);
gtk_style_context_add_class(context,"primary-toolbar");
gtk_style_context_add_class(gtk_widget_get_style_context(toplug),"button");
}
return ret;
}

@ -4,6 +4,15 @@
.textHead{
text-shadow: 1px 1px #ffffff;
}
.button {
background-image: -gtk-gradient(linear,
left top, left bottom,
from(@entry_background_a),
color-stop(0.20, @entry_background_b),
color-stop(0.85, @entry_background_c),
to(@entry_background_d));
}
.menuitemsolo {
border-color:alpha(@theme_text_color, 0.4);
border-style:solid;

Loading…
Cancel
Save