From 507499e696e8ceeadab8558d737688c6e6eaca8c Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Thu, 2 Nov 2023 11:47:19 +0600 Subject: [PATCH] incons changes, window order fix --- Makefile | 1 + ...ux.ubl-settings-logging.check-symbolic.svg | 44 +---- ...nux.ubl-settings-logging.play-symbolic.svg | 170 +--------------- ...ubl-settings-logging.settings-symbolic.svg | 1 + ...nux.ubl-settings-logging.stop-symbolic.svg | 186 +----------------- ....ubl-settings-logging.uncheck-symbolic.svg | 39 +--- source/ubl-settings-logging.c | 15 ++ ubl-settings-logging-journald.glade | 102 +++++----- ubl-settings-logging-logrotate.glade | 107 +++++----- ubl-settings-logging.glade | 4 +- 10 files changed, 133 insertions(+), 536 deletions(-) create mode 100644 icons/com.ublinux.ubl-settings-logging.settings-symbolic.svg diff --git a/Makefile b/Makefile index d23ee79..5daec21 100644 --- a/Makefile +++ b/Makefile @@ -135,6 +135,7 @@ install: check uninstall @install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/actions/" "icons/com.ublinux.${PKGNAME}.edit-symbolic.svg" @install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/actions/" "icons/com.ublinux.${PKGNAME}.check-symbolic.svg" @install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/actions/" "icons/com.ublinux.${PKGNAME}.uncheck-symbolic.svg" + @install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/actions/" "icons/com.ublinux.${PKGNAME}.settings-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.check-symbolic.svg b/icons/com.ublinux.ubl-settings-logging.check-symbolic.svg index a49c2d1..5d9f3a3 100644 --- a/icons/com.ublinux.ubl-settings-logging.check-symbolic.svg +++ b/icons/com.ublinux.ubl-settings-logging.check-symbolic.svg @@ -1,43 +1 @@ - - - - - - - + \ No newline at end of file diff --git a/icons/com.ublinux.ubl-settings-logging.play-symbolic.svg b/icons/com.ublinux.ubl-settings-logging.play-symbolic.svg index 3ebe8f3..146bda8 100644 --- a/icons/com.ublinux.ubl-settings-logging.play-symbolic.svg +++ b/icons/com.ublinux.ubl-settings-logging.play-symbolic.svg @@ -1,169 +1 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - + \ No newline at end of file diff --git a/icons/com.ublinux.ubl-settings-logging.settings-symbolic.svg b/icons/com.ublinux.ubl-settings-logging.settings-symbolic.svg new file mode 100644 index 0000000..67d3487 --- /dev/null +++ b/icons/com.ublinux.ubl-settings-logging.settings-symbolic.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/com.ublinux.ubl-settings-logging.stop-symbolic.svg b/icons/com.ublinux.ubl-settings-logging.stop-symbolic.svg index 91f45bc..ef24159 100644 --- a/icons/com.ublinux.ubl-settings-logging.stop-symbolic.svg +++ b/icons/com.ublinux.ubl-settings-logging.stop-symbolic.svg @@ -1,185 +1 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - + \ No newline at end of file diff --git a/icons/com.ublinux.ubl-settings-logging.uncheck-symbolic.svg b/icons/com.ublinux.ubl-settings-logging.uncheck-symbolic.svg index 305416e..c55bf8e 100644 --- a/icons/com.ublinux.ubl-settings-logging.uncheck-symbolic.svg +++ b/icons/com.ublinux.ubl-settings-logging.uncheck-symbolic.svg @@ -1,38 +1 @@ - - - - - - + \ No newline at end of file diff --git a/source/ubl-settings-logging.c b/source/ubl-settings-logging.c index 95ac22a..46c789e 100644 --- a/source/ubl-settings-logging.c +++ b/source/ubl-settings-logging.c @@ -282,6 +282,7 @@ void on_inspector_open(GtkWidget *self, main_window *widgets){ window->LoggingTerminal=yon_gtk_builder_get_widget(builder,"LoggingTerminal"); window->JournalActionsBox=yon_gtk_builder_get_widget(builder,"JournalActionsBox"); gtk_window_set_title(GTK_WINDOW(window->MainWindow),TITLE_LABEL); + gtk_window_set_transient_for(GTK_WINDOW(window->MainWindow),GTK_WINDOW(widgets->Window)); GtkTreeModel *model = GTK_TREE_MODEL(widgets->list); GtkTreeIter iter; char *name; @@ -572,6 +573,7 @@ void on_filechooser_open(GtkWidget *self, logrotate_configure_window *window){ dialog->FileOrDirCheck = yon_gtk_builder_get_widget(builder,"FileOrDirCheck"); dialog->CancelButton = yon_gtk_builder_get_widget(builder,"CancelButton"); dialog->AcceptButton = yon_gtk_builder_get_widget(builder,"AcceptButton"); + gtk_window_set_transient_for(GTK_WINDOW(window->MainWindow),GTK_WINDOW(window->MainWindow)); dictionary *dict = NULL; gtk_window_set_title(GTK_WINDOW(dialog->FileChooser),TITLE_LABEL); @@ -882,6 +884,8 @@ logrotate_configure_window *yon_logrotate_window_new(char *paths, logrotate_wind window->CommandAfterEntry=yon_gtk_builder_get_widget(builder,"CommandAfterEntry"); window->EndworkCommandEntry=yon_gtk_builder_get_widget(builder,"EndworkCommandEntry"); gtk_window_set_title(GTK_WINDOW(window->MainWindow),TITLE_LABEL); + if (dialog) + gtk_window_set_transient_for(GTK_WINDOW(window->MainWindow),GTK_WINDOW(dialog->Window)); window->paths=paths; if (paths){ @@ -1427,6 +1431,7 @@ journald_window *yon_journald_open(GtkWidget *self, main_window *widgets){ window->LowerTimeButton=yon_gtk_builder_get_widget(builder,"LowerTimeButton"); window->headerTopic=yon_gtk_builder_get_widget(builder,"headerTopic"); + gtk_window_set_transient_for(GTK_WINDOW(window->MainWindow),GTK_WINDOW(widgets->Window)); { int sz; config_str logsize = yon_config_load(journald_size_command,&sz); @@ -1575,6 +1580,7 @@ add_log_window *on_add_open(main_window *widgets){ window->ControlSectionBox=yon_gtk_builder_get_widget(builder,"ControlSectionBox"); window->LogPathsBox=yon_gtk_builder_get_widget(builder,"LogPathsBox"); gtk_window_set_title(GTK_WINDOW(window->MainWindow),TITLE_LABEL); + gtk_window_set_transient_for(GTK_WINDOW(window->MainWindow),GTK_WINDOW(widgets->Window)); dictionary *dict = NULL; yon_dictionary_add_or_create_if_exists_with_data(dict,"widgets",widgets); yon_dictionary_add_or_create_if_exists_with_data(dict,"window",window); @@ -2106,6 +2112,15 @@ int main(int argc, char *argv[]){ 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_load(config_path); + GList *list = gtk_tree_view_get_columns(GTK_TREE_VIEW(widgets->ServicesTree)); + for (int i = 0; i < g_list_length(list); i++){ + yon_gtk_column_minimal_fixed_size_set((GtkTreeViewColumn*)g_list_nth_data(list,i)); + } + g_list_free(list); + list = gtk_tree_view_get_columns(GTK_TREE_VIEW(widgets->MainTree)); + for (int i = 0; i < g_list_length(list); i++){ + yon_gtk_column_minimal_fixed_size_set((GtkTreeViewColumn*)g_list_nth_data(list,i)); + } yon_load_proceed(YON_CONFIG_LOCAL); update_loaded_logrotate(); GtkCssProvider *css=gtk_css_provider_new(); diff --git a/ubl-settings-logging-journald.glade b/ubl-settings-logging-journald.glade index 9e576a5..ade9b25 100644 --- a/ubl-settings-logging-journald.glade +++ b/ubl-settings-logging-journald.glade @@ -79,61 +79,19 @@ False emblem-ok-symbolic - - 450 - 450 + + 800 + 600 False - True - com.ublinux.ubl-settings-logging - dialog - + + True False 5 5 5 5 vertical - 5 - - - False - end - - - Cancel - True - True - True - image1 - - - True - True - 0 - - - - - Save - True - True - True - image2 - - - True - True - 1 - - - - - False - False - 2 - - True @@ -330,6 +288,7 @@ True False True + 0 adjustment11 @@ -428,6 +387,7 @@ True False True + 0 adjustment4 @@ -456,6 +416,7 @@ True False True + 0 adjustment5 @@ -495,6 +456,7 @@ True False True + 0 adjustment6 @@ -552,6 +514,7 @@ True False True + 0 adjustment7 @@ -609,6 +572,7 @@ True False True + 0 adjustment8 @@ -849,6 +813,7 @@ True True + 0 adjustment9 @@ -916,6 +881,7 @@ True True + 0 adjustment10 @@ -986,6 +952,48 @@ False True + 0 + + + + + True + False + end + 5 + + + Cancel + True + True + True + image1 + + + True + True + 0 + + + + + Save + True + True + True + image2 + + + True + True + 1 + + + + + False + True + end 1 diff --git a/ubl-settings-logging-logrotate.glade b/ubl-settings-logging-logrotate.glade index f70862f..754e6ad 100644 --- a/ubl-settings-logging-logrotate.glade +++ b/ubl-settings-logging-logrotate.glade @@ -53,16 +53,6 @@ 1 10 - - True - False - process-stop-symbolic - - - True - False - emblem-ok-symbolic - True False @@ -88,21 +78,31 @@ False com.ublinux.ubl-settings-logging.increase-symbolic + + True + False + process-stop-symbolic + + + True + False + emblem-ok-symbolic + - + 800 600 False True com.ublinux.ubl-settings-logging - dialog - + + True False 5 5 @@ -110,45 +110,6 @@ 5 vertical 5 - - - False - end - - - Cancel - True - True - True - image1 - - - True - True - 0 - - - - - Save - True - True - True - image2 - - - True - True - 1 - - - - - False - False - 2 - - True @@ -2076,6 +2037,48 @@ True True + 0 + + + + + True + False + end + 5 + + + Save + True + True + True + image9 + + + True + True + end + 0 + + + + + Cancel + True + True + True + image8 + + + True + True + 1 + + + + + False + True 1 diff --git a/ubl-settings-logging.glade b/ubl-settings-logging.glade index d664772..fc2274d 100644 --- a/ubl-settings-logging.glade +++ b/ubl-settings-logging.glade @@ -227,7 +227,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. True False - document-edit-symbolic + com.ublinux.ubl-settings-logging.settings-symbolic True @@ -252,7 +252,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. True False - document-edit-symbolic + com.ublinux.ubl-settings-logging.settings-symbolic True