diff --git a/Makefile b/Makefile index 1399ffb..e333928 100644 --- a/Makefile +++ b/Makefile @@ -132,6 +132,7 @@ install: check uninstall @install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/actions/" "icons/com.ublinux.${PKGNAME}.increase-symbolic.svg" @install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/actions/" "icons/com.ublinux.${PKGNAME}.decrease-symbolic.svg" @install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/actions/" "icons/com.ublinux.${PKGNAME}.profile-symbolic.svg" + @install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/actions/" "icons/com.ublinux.${PKGNAME}.edit-symbolic.svg" @install -Dm644 -t "${DESTDIR}/usr/share/${PKGNAME}/csv/" "journals_list.csv" @install -Dm644 -t "${DESTDIR}/usr/share/${PKGNAME}/csv/" "logging_services.csv" @install -Dm644 -t "${DESTDIR}/usr/share/polkit-1/actions/" "${CMAKE_BUILD_DIR}/com.ublinux.${PKGNAME}${PKGIDENT}.policy" diff --git a/icons/com.ublinux.ubl-settings-logging.edit-symbolic.svg b/icons/com.ublinux.ubl-settings-logging.edit-symbolic.svg new file mode 100644 index 0000000..baba3f9 --- /dev/null +++ b/icons/com.ublinux.ubl-settings-logging.edit-symbolic.svg @@ -0,0 +1,4 @@ + + + + diff --git a/source/ubl-settings-logging.c b/source/ubl-settings-logging.c index 3b35ba2..cfde1e3 100644 --- a/source/ubl-settings-logging.c +++ b/source/ubl-settings-logging.c @@ -93,6 +93,7 @@ void on_about(){ gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(window),version_application); gtk_about_dialog_set_website_label(GTK_ABOUT_DIALOG(window),PROJECT_HOME_LABEL); gtk_about_dialog_set_comments(GTK_ABOUT_DIALOG(window),TITLE_LABEL); + gtk_window_set_title(GTK_WINDOW(window),TITLE_LABEL); gtk_label_set_text(GTK_LABEL(title),TITLE_LABEL); g_signal_connect(G_OBJECT(window),"activate-link",G_CALLBACK(on_link),NULL); gtk_widget_set_visible(hideButtonBox,0); @@ -187,6 +188,7 @@ void on_inspector_open(GtkWidget *self, main_window *widgets){ window->UpdateButton=yon_gtk_builder_get_widget(builder,"UpdateButton"); window->LoggingTextView=yon_gtk_builder_get_widget(builder,"LoggingTextView"); window->JournalActionsBox=yon_gtk_builder_get_widget(builder,"JournalActionsBox"); + gtk_window_set_title(GTK_WINDOW(window->MainWindow),TITLE_LABEL); GtkTreeModel *model = GTK_TREE_MODEL(widgets->list); GtkTreeIter iter; char *name; @@ -279,6 +281,7 @@ logrotate_configure_window *yon_logrotate_window_new(){ window->headerTopic=yon_gtk_builder_get_widget(builder,"headerTopic"); window->LogNameDescriptionLabel=yon_gtk_builder_get_widget(builder,"LogNameDescriptionLabel"); window->list=GTK_LIST_STORE(gtk_builder_get_object(builder,"liststore1")); + gtk_window_set_title(GTK_WINDOW(window->MainWindow),TITLE_LABEL); g_signal_connect(G_OBJECT(window->CancelButton),"clicked",G_CALLBACK(on_close_subwindow),NULL); g_signal_connect(G_OBJECT(window->SaveButton),"clicked",G_CALLBACK(on_close_subwindow),NULL); @@ -288,13 +291,7 @@ logrotate_configure_window *yon_logrotate_window_new(){ void on_logrotate_add(GtkWidget *self, main_window *widgets){ logrotate_configure_window *window = yon_logrotate_window_new(); gtk_widget_show(window->MainWindow); - add_log_window *dialog = on_add_open(); - gtk_widget_hide(dialog->StatisticsFrame); - gtk_widget_hide(dialog->JournaldButton); - gtk_label_set_text(GTK_LABEL(window->LogNamelabel),""); - gtk_label_set_text(GTK_LABEL(window->LogNameDescriptionLabel),""); gtk_label_set_text(GTK_LABEL(window->LogSizeLabel),""); - gtk_window_present(GTK_WINDOW(dialog->MainWindow)); } void on_logrotate_edit(GtkWidget *self, logrotate_tab_window *window){ @@ -454,7 +451,7 @@ void on_service_edit(GtkWidget *self,main_window *widgets){ GtkTreeIter iter; if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->ServicesTree)),&model,&iter)){ char *name; - gtk_tree_model_get(model,&iter,1,&name,-1); + gtk_tree_model_get(model,&iter,2,&name,-1); if (!strcmp(name,"journald")){ on_journald_open(NULL,widgets); } else { @@ -564,7 +561,7 @@ main_window *setup_window(){ services[i]=yon_char_divide_search(services[i],"\n",-1); config_str log = yon_char_parse(services[i],&log_size,";"); gtk_list_store_append(widgets->ServicesList,&iter); - gtk_list_store_set(widgets->ServicesList,&iter,0,0,1,log[0],2,log[1],-1); + gtk_list_store_set(widgets->ServicesList,&iter,0,0,1,0,2,log[0],3,log[1],-1); // yon_char_parsed_free(log,log_size); } // yon_char_parsed_free(services,service_size); diff --git a/source/ubl-strings.h b/source/ubl-strings.h index 58c1749..fccda42 100644 --- a/source/ubl-strings.h +++ b/source/ubl-strings.h @@ -36,4 +36,101 @@ #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 ACCEPT_LABEL _("Accept") \ No newline at end of file +#define ACCEPT_LABEL _("Accept") +//ubl-settings-logging.glade +#define JOURNALS_LABEL _("Journals") +#define SERVICES_LABEL _("Services") +#define LOG_JOURNAL_TAB_LABEL _("Log/Journal") +#define PATH_LABEL _("Path") +#define DESCRIPTION_LABEL _("Description") +#define INSPECT_LABEL _("Inspect log") +#define CONFIGURE_LOG_LABEL _("Configure log") +#define ADD_LOG_LABEL _("Add log") +#define REMOVE_LOG_LABEL _("Remove log") +#define STOP_SERVICE_LABEL _("Stop service") +#define START_SERVICE_LABEL _("Start service") +#define CONFIGURE_SERVICE_LABEL _("Configure service") +#define STATUS_LABEL _("Status") +#define SERVICE_LABEL _("Service") +#define AUTOSTART_LABEL _("Autostart") + +//ubl-settings-logging-inspector.glade +#define TOOLTIP_BOOT_LABEL _("Show messages since the current system boot") +#define TOOLTIP_FOLLOW_LABEL _("Follow for new messages") +#define TOOLTIP_KERNEL_LABEL _("Show kernel ring buffer") +#define TOOLTIP_PRIORITY_LABEL _("Show only priority error messages, critical messages and warnings") +// #define LABEL _("Cancel") +// #define LABEL _("Cancel") +// #define LABEL _("Cancel") +#define UPDATE_LABEL _("Update") + +//ubl-settings-logging-journald.glade +#define JOURNAL_DESCRIPTION_LABEL _("Description:") +#define JOURNAL_STORAGE_LABEL _("Journal storage place:") +#define COMPRESSION_LABEL _("Use compression:") +#define DIVIDE_LABEL _("Divide journal files:") +#define INTERVAL_LABEL _("Log recording journal interval:") +#define RECORDS_COUNT_LABEL _("Records amount:") +#define MAX_SIZE_LABEL _("Maximum size of all logs:") +#define MAX_ROTATION_SIZE_LABEL _("Maximum size of rotation journal:") +#define FREE_SPACE_LABEL _("Leave free space at storage:") +#define REDIRECT_LABEL _("Redirect to console:") +#define TTY_LABEL _("TTY:") +#define MESSAGES_TYPE_LABEL _("Type of forwarded messages:") +#define COURNAL_CONFIGURATION_LABEL _("Journal configuration") +#define TOTAL_SIZE_LABEL _("Total log size:") +#define LOWER_SIZE_LABEL _("Lower size to:") +#define APPLY_LABEL _("Apply") +#define STATISTICS_LABEL _("Statistics") + +//ubl-settings-logging-logrotate.glade +#define LOGROTATE_LOG_JOURNAL_TAB_LABEL _("Log/Journal:") +#define PATHS_LABEL _("Paths to log and journals files") +#define DEFAULT_LABEL _("Default") +#define ON_LABEL _("On") +#define OFF_LABEL _("Off") +#define SCENARIOS_LABEL _("Scenarios") +#define SCENARIO_RUN_LABEL _("Scenarios are running for each rotated journal") +#define COMMAND_SINGLE_BEFORE_LABEL _("Command before rotation (one time):") +#define COMMAND_SINGLE_AFTER_LABEL _("Command after rotation (one time):") +#define COMMAND_BEFORE_LABEL _("Command before rotation:") +#define COMMAND_AFTER_LABEL _("Command after rotation:") +#define ROTATION_LABEL _("Rotation period:") +#define FILE_SIZE_LABEL _("Maximum size of file:") +#define FREQUENCY_LABEL _("Checking frequency configuration") +#define FILE_AMOUNT_LABEL _("File amount:") +#define STORE_LABEL _("Store at:") +#define ROTATION_USER_LABEL _("Rotation as user:") +#define ROTATION_GROUP_LABEL _("Rotation as group:") +#define ROTATION_CONFIGURATION_LABEL _("Rotation configuration") +#define ERROR_LABEL _("Error processing:") +#define ROTATION_EMPTY_LABEL _("Rotation of jurnal even when it is empty:") +#define DONT_ROTATE_YOUNGER_LABEL _("Do not rotate journal younger than") +#define DAYS_LABEL _("days") +#define DELETE_ROTATED_LABEL _("Delete rotated journals older than") +#define ROTATE_SIZE_LABEL _("Rotate journals if size more than") +#define ROTATE_TIME_LABEL _("but not earlier than the specified time interval") +#define ROTATE_BEFORE_LABEL _("before specified time interval") +#define FILE_CHOOSE_LABEL _("File choosing configuration") +#define CREATE_LOG_LABEL _("Create log") +#define AS_USER_LABEL _("as user:") +#define AS_GROUP_LABEL _("as group:") +#define RULES_LABEL _("rules:") +#define CUT_SOURCE_LABEL _("Cut source journal fileafter copy creating instead of moving old journal file and creating new one") +#define FILES_DIRS_CONFIGURATION_LABEL _("Files and directories configuration") +#define DELAY_LABEL _("Delay compression by one journal in queue:") +#define COMPRESSION_CONFIGURATION_LABEL _("Compression configuration") +#define SAVE_ORIGINAL_LABEL _("Save original log file after rotation if it has specified extension:") +#define ADD_DATE_LABEL _("Add date of rotation before log header") +#define START_NUMBER_LABEL _("Number from which numbering of old logs will begin") +#define FILENAME_CONFIGURATION_LABEL _("Filename configuration") +#define EMAIL_AT_ROTATION_LABEL _("Email after rotation:") +#define ADRESS_LABEL _("adress:") +#define CONTENTS_LABEL _("contents:") +#define MESSAGE_CONFIGURATION_LABEL _("Message configuration") +#define MANUAL_LABEL _("Manual input:") +#define LOG_SIZE_LABEL _("Log size:") + +//ubl-settings-logging-logrotate-table.glade +#define SYSTEM_CONFIGURATION_LABEL _("System configuration") +#define APPLITATIONS_CONFIGURATION_LABEL _("Applications configuration") \ No newline at end of file diff --git a/ubl-settings-logging-journald.glade b/ubl-settings-logging-journald.glade index 28c9956..185ec96 100644 --- a/ubl-settings-logging-journald.glade +++ b/ubl-settings-logging-journald.glade @@ -128,6 +128,8 @@ True False + vertical + 5 True diff --git a/ubl-settings-logging-logrotate.glade b/ubl-settings-logging-logrotate.glade index ce37634..12023f7 100644 --- a/ubl-settings-logging-logrotate.glade +++ b/ubl-settings-logging-logrotate.glade @@ -3,7 +3,6 @@ - 1024 1 @@ -62,7 +61,7 @@ True False - document-edit-symbolic + com.ublinux.ubl-settings-logging.edit-symbolic True @@ -133,6 +132,7 @@ True True + never in @@ -160,7 +160,7 @@ False 5 - + True False Log/Journal: @@ -172,28 +172,14 @@ - - True - False - Logname - - - False - True - 1 - - - - + True True - True - image3 - False + True True - 2 + 1 @@ -209,7 +195,7 @@ False 5 - + True False Description: @@ -221,13 +207,12 @@ - + True - False - logdescription + True - False + True True 1 @@ -239,6 +224,124 @@ 1 + + + True + False + 0.019999999552965164 + in + + + True + False + 5 + 5 + 5 + + + True + False + 5 + + + True + False + vertical + 5 + + + True + True + True + image3 + + + + False + True + 0 + + + + + True + True + True + image7 + + + + False + True + 1 + + + + + True + True + True + image6 + + + + False + True + 2 + + + + + False + True + 0 + + + + + True + True + in + + + True + True + + + + + + + + True + True + 1 + + + + + + + + + True + False + Paths to log and journals files + + + + + False + True + 2 + + False @@ -250,7 +353,7 @@ True False - 0 + 0.019999999552965164 in @@ -269,7 +372,7 @@ True False - 0 + 0.019999999552965164 in @@ -414,7 +517,7 @@ True False - 0 + 0.019999999552965164 in @@ -597,7 +700,7 @@ True False - 0 + 0.019999999552965164 in @@ -837,6 +940,7 @@ True False but not earlier than the specified time interval + True False @@ -903,6 +1007,7 @@ True False before specified time interval + True False @@ -939,7 +1044,7 @@ True False - 0 + 0.019999999552965164 in @@ -1128,7 +1233,7 @@ True False - 0 + 0.019999999552965164 in @@ -1180,7 +1285,7 @@ True False - Delay compressin by one journal in queue: + Delay compression by one journal in queue: False @@ -1232,7 +1337,7 @@ True False - 0 + 0.019999999552965164 in @@ -1372,6 +1477,7 @@ True True + digits False @@ -1408,7 +1514,7 @@ True False - 0 + 0.019999999552965164 in @@ -1530,6 +1636,201 @@ 6 + + + True + False + 0.019999999552965164 + in + + + True + False + 5 + 5 + 5 + + + True + False + vertical + 5 + + + Scenarios are running for each rotated journal + True + True + False + True + + + False + True + 0 + + + + + True + False + 5 + + + True + False + Command before rotation (one time): + 0 + + + False + True + 0 + + + + + True + True + + + True + True + 1 + + + + + False + True + 1 + + + + + True + False + 5 + + + True + False + Command after rotation (one time): + 0 + + + False + True + 0 + + + + + True + True + + + True + True + 1 + + + + + False + True + 2 + + + + + True + False + 5 + + + True + False + Command before rotation: + 0 + + + False + True + 0 + + + + + True + True + + + True + True + 1 + + + + + False + True + 3 + + + + + True + False + 5 + + + True + False + Command after rotation: + 0 + + + False + True + 0 + + + + + True + True + + + True + True + 1 + + + + + False + True + 4 + + + + + + + + + True + False + Scenarios + + + + + False + True + 7 + + True @@ -1562,7 +1863,7 @@ False True - 7 + 8 @@ -1587,7 +1888,7 @@ True False - 0 + 0.019999999552965164 in @@ -1696,5 +1997,33 @@ + + + + + + + + + + + + + + + + + + + + True + False + com.ublinux.ubl-settings-logging.decrease-symbolic + + + True + False + com.ublinux.ubl-settings-logging.increase-symbolic + diff --git a/ubl-settings-logging.glade b/ubl-settings-logging.glade index 2247491..46d62d2 100644 --- a/ubl-settings-logging.glade +++ b/ubl-settings-logging.glade @@ -201,6 +201,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + @@ -681,6 +683,7 @@ translated and supported by community. True True True + Inspect log image1