From 7c00cf317849bfe9e565336e5a911effe16b98bb Mon Sep 17 00:00:00 2001 From: rbuj Date: Fri, 17 Dec 2021 22:27:47 +0100 Subject: Use gresources for ui files --- src/Makefile.am | 21 +- src/caja-bookmarks-window.c | 8 +- src/caja-bookmarks-window.ui | 299 ---- src/caja-file-management-properties.c | 2 +- src/caja-file-management-properties.ui | 2568 -------------------------------- src/ui-a11y.suppr | 35 - 6 files changed, 15 insertions(+), 2918 deletions(-) delete mode 100644 src/caja-bookmarks-window.ui delete mode 100644 src/caja-file-management-properties.ui delete mode 100644 src/ui-a11y.suppr (limited to 'src') diff --git a/src/Makefile.am b/src/Makefile.am index f4ee563f..391df3a2 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -21,7 +21,6 @@ AM_CPPFLAGS = \ -DLIBDIR=\""$(libdir)"\" \ -DCAJA_DATADIR=\""$(datadir)/caja"\" \ -DMATELOCALEDIR=\""$(datadir)/locale"\" \ - -DUIDIR=\""$(datadir)/caja/ui"\" \ -DCAJA_PIXMAPDIR=\""$(datadir)/pixmaps/caja"\" \ -DPREFIX=\""$(prefix)"\" \ -DSYSCONFDIR=\""$(sysconfdir)"\" \ @@ -52,7 +51,15 @@ $(dbus_freedesktop_built_sources) : Makefile.am $(top_srcdir)/data/freedesktop-d $(top_srcdir)/data/freedesktop-dbus-interfaces.xml \ $(NULL) +caja-resources.c: $(srcdir)/../data/caja-resources.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir)/../data --generate-dependencies $(srcdir)/../data/caja-resources.gresource.xml) + $(AM_V_GEN)$(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir)/../data --generate --c-name caja $< + +caja-resources.h: $(srcdir)/../data/caja-resources.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir)/../data --generate-dependencies $(srcdir)/../data/caja-resources.gresource.xml) + $(AM_V_GEN)$(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir)/../data --generate --c-name caja $< + BUILT_SOURCES = \ + caja-resources.c \ + caja-resources.h \ caja-src-marshal.c \ caja-src-marshal.h \ $(dbus_freedesktop_built_sources) \ @@ -177,6 +184,11 @@ caja_file_management_properties_SOURCES = \ caja-file-management-properties-main.c \ $(NULL) +nodist_caja_file_management_properties_SOURCES = \ + caja-resources.c \ + caja-resources.h \ + $(NULL) + caja_autorun_software_SOURCES = \ caja-autorun-software.c \ $(NULL) @@ -203,18 +215,12 @@ endif uidir = $(datadir)/caja/ui -ui_files = \ - caja-file-management-properties.ui \ - caja-bookmarks-window.ui \ - $(NULL) - include $(top_srcdir)/gla11y.mk ui_DATA = \ caja-shell-ui.xml \ caja-navigation-window-ui.xml \ caja-spatial-window-ui.xml \ - $(ui_files) \ $(NULL) CLEANFILES = \ @@ -229,7 +235,6 @@ EXTRA_DIST = \ $(ui_DATA) \ check-caja \ $(about_DATA) \ - ui-a11y.suppr \ $(NULL) dist-hook: diff --git a/src/caja-bookmarks-window.c b/src/caja-bookmarks-window.c index 4abff840..d713d483 100644 --- a/src/caja-bookmarks-window.c +++ b/src/caja-bookmarks-window.c @@ -264,13 +264,7 @@ create_bookmarks_window (CajaBookmarkList *list, CajaWindow *window_source) bookmarks = list; - builder = gtk_builder_new (); - if (!gtk_builder_add_from_file (builder, - UIDIR "/caja-bookmarks-window.ui", - NULL)) - { - return NULL; - } + builder = gtk_builder_new_from_resource ("/org/mate/caja/caja-bookmarks-window.ui"); window = (GtkWidget *)gtk_builder_get_object (builder, "bookmarks_dialog"); bookmark_list_widget = (GtkTreeView *)gtk_builder_get_object (builder, "bookmark_tree_view"); diff --git a/src/caja-bookmarks-window.ui b/src/caja-bookmarks-window.ui deleted file mode 100644 index c8da6090..00000000 --- a/src/caja-bookmarks-window.ui +++ /dev/null @@ -1,299 +0,0 @@ - - - - - - - True - False - help-browser - - - True - False - go-jump - - - True - False - list-remove - - - True - False - window-close - - - False - 5 - Edit Bookmarks - center - 500 - 300 - normal - - - True - False - vertical - 2 - - - True - False - end - - - _Help - True - True - True - False - image1 - True - - - True - True - 0 - - - - - _Jump to - True - True - True - False - image2 - True - - - True - True - 1 - - - - - _Remove - True - True - True - False - image3 - True - - - True - True - 2 - - - - - _Close - True - True - True - False - image4 - True - - - True - True - 3 - - - - - False - True - end - 0 - - - - - True - False - 5 - 18 - True - - - True - False - vertical - 6 - - - True - False - _Bookmarks - True - bookmark_tree_view - 0 - 0.5 - - - - - - False - False - 0 - - - - - True - True - never - in - - - True - True - False - True - - - - - - - - True - True - 1 - - - - - False - True - 0 - - - - - True - False - vertical - 18 - - - True - False - vertical - 6 - - - True - False - _Name - True - 0 - 0.5 - - - - - - False - False - 0 - - - - - True - False - - - - - - False - True - 1 - - - - - False - True - 0 - - - - - True - False - vertical - 6 - - - True - False - _Location - True - 0 - 0.5 - - - - - - False - False - 0 - - - - - True - False - - - - - - False - True - 1 - - - - - False - True - 1 - - - - - False - True - 1 - - - - - True - True - 1 - - - - - - helpbutton1 - bookmark_jump_button - bookmark_delete_button - button2 - - - diff --git a/src/caja-file-management-properties.c b/src/caja-file-management-properties.c index 957a87d2..a01e058a 100644 --- a/src/caja-file-management-properties.c +++ b/src/caja-file-management-properties.c @@ -1261,7 +1261,7 @@ caja_file_management_properties_dialog_show (GCallback close_callback, GtkWindow { GtkBuilder *builder; - builder = gtk_builder_new_from_file (UIDIR "/caja-file-management-properties.ui"); + builder = gtk_builder_new_from_resource ("/org/mate/caja/caja-file-management-properties.ui"); g_signal_connect (gtk_builder_get_object (builder, "file_management_dialog"), "response", close_callback, NULL); diff --git a/src/caja-file-management-properties.ui b/src/caja-file-management-properties.ui deleted file mode 100644 index 3207c800..00000000 --- a/src/caja-file-management-properties.ui +++ /dev/null @@ -1,2568 +0,0 @@ - - - - - - - - - - - - - - - - - - True - False - help-about - - - True - False - preferences-desktop - - - True - False - help-browser - - - True - False - window-close - - - - - - - - - Icon View - - - List View - - - Compact View - - - - - - - - - - - Always - - - Local Files Only - - - Never - - - - - - - - - - - By Name - - - By Path - - - By Size - - - By Size on Disk - - - By Type - - - By Modification Date - - - By Creation Date - - - By Access Date - - - By Emblems - - - By Extension - - - By Trashed Date - - - - - - - - - - - 33% - - - 50% - - - 66% - - - 100% - - - 150% - - - 200% - - - 400% - - - - - - - - - - - 33% - - - 50% - - - 66% - - - 100% - - - 150% - - - 200% - - - 400% - - - - - - - - - - - 33% - - - 50% - - - 66% - - - 100% - - - 150% - - - 200% - - - 400% - - - - - - - - - - - Always - - - Local Files Only - - - Never - - - - - - - - - - - Always - - - Local Files Only - - - Never - - - - - - - - - - - 100 KB - - - 500 KB - - - 1 MB - - - 3 MB - - - 5 MB - - - 10 MB - - - 100 MB - - - 1 GB - - - 2 GB - - - 4 GB - - - - - - - - - - - Always - - - Local Files Only - - - Never - - - - - False - 5 - File Management Preferences - center - 400 - 400 - dialog - - - True - False - vertical - 2 - - - True - False - end - - - _Help - True - True - True - False - image3 - True - - - False - False - 0 - - - - - _Close - True - True - True - False - image4 - True - - - False - False - 1 - - - - - False - True - end - 0 - - - - - True - True - 5 - - - True - False - 12 - vertical - 18 - - - True - False - vertical - 6 - - - True - False - <b>Default View</b> - True - 0 - - - False - False - 0 - - - - - True - False - 12 - vertical - 6 - - - True - False - 12 - - - True - False - View _new folders using: - True - default_view_combobox - 0 - - - False - False - 0 - - - - - True - False - model1 - - - - 0 - - - - - False - True - 1 - - - - - False - True - 0 - - - - - True - False - 12 - - - True - False - _Arrange items: - True - sort_order_combobox - 0 - - - False - False - 0 - - - - - True - False - model2 - - - - 0 - - - - - False - True - 1 - - - - - False - True - 1 - - - - - Sort _folders before files - True - True - False - start - True - True - - - False - False - 2 - - - - - Show hidden files - True - True - False - start - True - True - - - False - False - 3 - - - - - Show backup files - True - True - False - start - True - True - - - False - False - 4 - - - - - False - True - 1 - - - - - False - True - 0 - - - - - True - False - True - True - 0 - none - - - True - True - True - True - - - True - False - 12 - vertical - 6 - - - True - False - 12 - - - True - False - Default _zoom level: - True - icon_view_zoom_combobox - 0 - - - False - False - 0 - - - - - True - False - model3 - - - - 0 - - - - - False - True - 1 - - - - - False - True - 0 - - - - - _Use compact layout - True - True - False - start - True - True - - - False - False - 1 - - - - - _Text beside icons - True - True - False - start - True - True - - - False - False - 2 - - - - - - - True - False - Icon View - - - False - - - - - True - False - 12 - vertical - 6 - - - True - False - 12 - - - True - False - _Default zoom level: - True - compact_view_zoom_combobox - 0 - - - False - False - 0 - - - - - True - False - model4 - - - - 0 - - - - - False - True - 1 - - - - - False - True - 0 - - - - - A_ll columns have the same width - True - True - False - start - True - True - - - False - False - 1 - - - - - 1 - - - - - True - False - Compact View - - - 1 - False - - - - - True - False - 12 - vertical - 6 - - - True - False - 12 - - - True - False - D_efault zoom level: - True - list_view_zoom_combobox - 0 - - - False - False - 0 - - - - - True - False - model5 - - - - 0 - - - - - False - True - 1 - - - - - False - True - 0 - - - - - _Show icons - True - True - False - start - True - True - - - False - True - 1 - - - - - 2 - - - - - True - False - List View - - - 2 - False - - - - - True - False - 12 - vertical - 6 - - - Show _only folders - True - True - False - start - True - True - - - False - False - 0 - - - - - 3 - - - - - True - False - Tree View - - - 3 - False - - - - - - - True - False - 6 - Defaults - - - - - - - - False - True - 1 - - - - - - - True - False - Views - - - False - - - - - True - False - 12 - vertical - 18 - - - True - False - vertical - 6 - - - True - False - <b>Behavior</b> - True - 0 - - - False - False - 0 - - - - - True - False - 12 - vertical - - - _Single click to open items - True - True - False - start - True - True - - - False - False - 0 - - - - - _Double click to open items - True - True - False - start - True - True - single_click_radiobutton - - - False - False - 6 - 1 - - - - - Open each _folder in its own window - True - True - False - start - True - True - - - False - False - 2 - - - - - False - True - 1 - - - - - False - True - 0 - - - - - True - False - vertical - 6 - - - True - False - <b>Executable Text Files</b> - True - 0 - - - False - False - 0 - - - - - True - False - 12 - vertical - 6 - - - _Run executable text files when they are opened - True - True - False - start - True - True - - - False - False - 0 - - - - - _View executable text files when they are opened - True - True - False - start - True - True - scripts_execute_radiobutton - - - False - False - 1 - - - - - _Ask each time - True - True - False - start - True - True - scripts_execute_radiobutton - - - False - False - 2 - - - - - False - True - 1 - - - - - False - True - 1 - - - - - True - False - vertical - 6 - - - True - False - <b>Trash</b> - True - 0 - - - False - False - 0 - - - - - True - False - 12 - vertical - 6 - - - Ask before _emptying the Trash or deleting files - True - True - False - start - True - True - - - False - False - 0 - - - - - Ask before moving files to the _Trash - True - True - False - start - True - True - - - False - False - 1 - - - - - I_nclude a Delete command that bypasses Trash - True - True - False - start - True - True - - - False - False - 2 - - - - - False - True - 1 - - - - - False - True - 2 - - - - - 1 - - - - - True - False - Behavior - - - 1 - False - - - - - True - False - 12 - vertical - 18 - - - True - False - vertical - 6 - - - True - False - <b>Icon Captions</b> - True - 0 - - - False - False - 0 - - - - - True - False - 12 - vertical - 6 - - - True - False - Choose the order of information to appear beneath icon names. More information will appear when zooming in closer. - True - 0 - - - False - False - 0 - - - - - True - False - - - True - False - - - False - False - 0 - - - - - True - False - - - False - False - 1 - - - - - False - False - 1 - - - - - True - False - - - True - False - True - - - False - False - 0 - - - - - True - False - - - False - False - 1 - - - - - False - False - 2 - - - - - True - False - - - True - False - - - False - False - 0 - - - - - True - False - - - False - False - 1 - - - - - False - False - 3 - - - - - False - True - 1 - - - - - False - True - 0 - - - - - True - False - vertical - 6 - - - True - False - <b>Date</b> - True - 0 - - - False - False - 0 - - - - - True - False - 12 - 12 - - - True - False - _Format: - True - date_format_combobox - - - False - False - 0 - - - - - True - False - - - False - False - 1 - - - - - False - True - 1 - - - - - False - False - 1 - - - - - True - False - vertical - 6 - - - True - False - <b>Size</b> - True - 0 - - - False - False - 0 - - - - - _Show file sizes with IEC units - True - True - False - start - 12 - True - True - - - False - True - 1 - - - - - False - False - 2 - - - - - 2 - - - - - True - False - Display - - - 2 - False - - - - - True - False - 12 - vertical - 18 - - - True - False - vertical - 6 - - - True - False - <b>List Columns</b> - True - 0 - - - False - False - 0 - - - - - True - False - vertical - 6 - - - True - False - Choose the order of information to appear in the list view. - True - 0 - - - False - False - 0 - - - - - - - - True - True - 1 - - - - - True - True - 0 - - - - - 3 - - - - - True - False - List Columns - - - 3 - False - - - - - True - False - 12 - vertical - 18 - - - True - False - vertical - 6 - - - True - False - <b>Text Files</b> - True - 0 - - - False - False - 0 - - - - - True - False - 12 - vertical - 6 - - - True - False - 12 - - - True - False - Show te_xt in icons: - True - preview_text_combobox - 0 - - - False - False - 0 - - - - - True - False - model6 - - - - 0 - - - - - False - False - 1 - - - - - False - False - 0 - - - - - False - True - 1 - - - - - False - True - 0 - - - - - True - False - vertical - 6 - - - True - False - <b>Other Previewable Files</b> - True - 0 - - - False - False - 0 - - - - - True - False - 12 - vertical - 6 - - - True - False - 12 - - - True - False - Show _thumbnails: - True - preview_image_combobox - 0 - - - False - False - 0 - - - - - True - False - model7 - - - - 0 - - - - - False - False - 1 - - - - - False - False - 0 - - - - - True - False - 12 - - - True - False - _Only for files smaller than: - True - preview_image_size_combobox - 0 - - - False - False - 0 - - - - - True - False - model8 - - - - 0 - - - - - False - True - 1 - - - - - False - True - 1 - - - - - False - True - 1 - - - - - False - True - 1 - - - - - True - False - vertical - 6 - - - True - False - <b>Sound Files</b> - True - 0 - - - False - False - 0 - - - - - True - False - 12 - vertical - 6 - - - True - False - 12 - - - True - False - Preview _sound files: - True - preview_sound_combobox - 0 - - - False - False - 0 - - - - - True - False - model9 - - - - 0 - - - - - False - True - 1 - - - - - False - True - 0 - - - - - False - True - 1 - - - - - False - True - 2 - - - - - True - False - vertical - 6 - - - True - False - <b>Folders</b> - True - 0 - - - False - False - 0 - - - - - True - False - 12 - vertical - 6 - - - True - False - 12 - - - True - False - Count _number of items: - True - preview_folder_combobox - 0 - - - False - False - 0 - - - - - True - False - model10 - - - - 0 - - - - - False - True - 1 - - - - - False - True - 0 - - - - - False - True - 1 - - - - - False - True - 3 - - - - - 4 - - - - - True - False - Preview - - - 4 - False - - - - - True - False - 12 - vertical - 6 - - - True - False - vertical - 6 - - - True - False - vertical - 6 - - - True - False - <b>Media Handling</b> - True - 0 - - - False - False - 0 - - - - - True - False - 12 - vertical - 6 - - - True - False - Choose what happens when inserting media or connecting devices to the system - True - True - 0 - - - False - False - 0 - - - - - - True - False - 6 - 6 - - - True - False - CD _Audio: - True - media_audio_cdda_combobox - 0 - - - 0 - 0 - - - - - True - False - True - - - 1 - 0 - - - - - True - False - _DVD Video: - True - media_video_dvd_combobox - 0 - - - 0 - 1 - - - - - True - False - True - - - 1 - 1 - - - - - True - False - _Music Player: - True - media_music_player_combobox - 0 - - - 0 - 2 - - - - - True - False - True - - - 1 - 2 - - - - - True - False - _Photos: - True - media_dcf_combobox - 0 - - - 0 - 3 - - - - - True - False - True - - - 1 - 3 - - - - - True - False - _Software: - True - media_software_combobox - 0 - - - 0 - 4 - - - - - True - False - True - - - 1 - 4 - - - - - - - - - - - - - - - - - - - - False - True - 1 - - - - - False - True - 1 - - - - - False - True - 0 - - - - - True - False - vertical - 6 - - - True - False - <b>Other Media</b> - True - 0 - - - False - False - 0 - - - - - True - False - 12 - vertical - 6 - - - True - False - Less common media formats can be configured here - True - True - 0 - - - False - False - 0 - - - - - - True - False - 6 - 6 - - - True - False - _Type: - True - media_other_type_combobox - 0 - - - 0 - 0 - - - - - True - False - Acti_on: - True - media_other_action_combobox - 0 - - - 0 - 1 - - - - - True - False - True - - - 1 - 0 - - - - - True - False - True - - - 1 - 1 - - - - - - - - - - - - - - - - - - - - False - True - 1 - - - - - False - True - 1 - - - - - False - True - 1 - - - - - False - False - 0 - - - - - _Never prompt or start programs on media insertion - True - True - False - start - True - True - - - False - False - 1 - - - - - B_rowse media when inserted - True - True - False - start - True - True - - - False - False - 2 - - - - - 5 - - - - - True - False - Media - - - 5 - False - - - - - True - False - 12 - vertical - 6 - - - True - False - <b>Available _Extensions:</b> - True - True - 0 - - - False - True - 0 - - - - - True - True - in - - - 100 - 270 - True - True - extension_store - False - True - - - - - - True - column - True - - - - 0 - - - - - - - True - Extension - - - - - - - - column - - - - 2 - - - - - - - - - True - True - 1 - - - - - True - False - 8 - end - - - _About Extension - True - False - True - True - image1 - True - - - False - False - 0 - - - - - C_onfigure Extension - True - False - True - True - image2 - True - - - False - False - 1 - - - - - False - False - 2 - - - - - 6 - - - - - True - False - Extensions - - - 3 - False - - - - - True - True - 1 - - - - - - helpbutton1 - closebutton1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/ui-a11y.suppr b/src/ui-a11y.suppr deleted file mode 100644 index c257b3c7..00000000 --- a/src/ui-a11y.suppr +++ /dev/null @@ -1,35 +0,0 @@ -caja-bookmarks-window.ui://GtkLabel[@id='label4'] orphan-label -caja-bookmarks-window.ui://GtkLabel[@id='bookmark_name_label'] orphan-label -caja-bookmarks-window.ui://GtkLabel[@id='label3'] orphan-label -caja-bookmarks-window.ui://GtkLabel[@id='bookmark_location_label'] orphan-label -caja-bookmarks-window.ui://GtkLabel[@id='label2'] orphan-label -caja-file-management-properties.ui://GtkLabel[@id='label4'] orphan-label -caja-file-management-properties.ui://GtkLabel[@id='label5'] orphan-label -caja-file-management-properties.ui://GtkLabel[@id='label'] orphan-label -caja-file-management-properties.ui://GtkLabel[@id='label6'] orphan-label -caja-file-management-properties.ui://GtkLabel[@id='label25'] orphan-label -caja-file-management-properties.ui://GtkLabel[@id='label10'] orphan-label -caja-file-management-properties.ui://GtkLabel[@id='label12'] orphan-label -caja-file-management-properties.ui://GtkLabel[@id='label14'] orphan-label -caja-file-management-properties.ui://GtkLabel[@id='label28'] orphan-label -caja-file-management-properties.ui://GtkLabel[@id='label29'] orphan-label -caja-file-management-properties.ui://GtkLabel[@id='captions_label_0'] orphan-label -caja-file-management-properties.ui://GtkComboBoxText[@id='captions_0_combobox'] no-labelled-by -caja-file-management-properties.ui://GtkLabel[@id='captions_label_1'] orphan-label -caja-file-management-properties.ui://GtkComboBoxText[@id='captions_1_combobox'] no-labelled-by -caja-file-management-properties.ui://GtkLabel[@id='captions_label_2'] orphan-label -caja-file-management-properties.ui://GtkComboBoxText[@id='captions_2_combobox'] no-labelled-by -caja-file-management-properties.ui://GtkLabel[@id='label34'] orphan-label -caja-file-management-properties.ui://GtkLabel[@id='label40'] orphan-label -caja-file-management-properties.ui://GtkLabel[@id='label31'] orphan-label -caja-file-management-properties.ui://GtkLabel[@id='label33'] orphan-label -caja-file-management-properties.ui://GtkLabel[@id='label16'] orphan-label -caja-file-management-properties.ui://GtkLabel[@id='label18'] orphan-label -caja-file-management-properties.ui://GtkLabel[@id='label20'] orphan-label -caja-file-management-properties.ui://GtkLabel[@id='label22'] orphan-label -caja-file-management-properties.ui://GtkLabel[@id='label42'] orphan-label -caja-file-management-properties.ui://GtkLabel[@id='label60'] orphan-label -caja-file-management-properties.ui://GtkLabel[@id='label61'] orphan-label -caja-file-management-properties.ui://GtkLabel[@id='label65'] orphan-label -caja-file-management-properties.ui://GtkLabel[@id='label7'] orphan-label -caja-file-management-properties.ui://GtkTreeView[@id='extension_view'] no-labelled-by -- cgit v1.2.1