Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package amtk for openSUSE:Factory checked in at 2022-11-07 13:52:17 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/amtk (Old) and /work/SRC/openSUSE:Factory/.amtk.new.1597 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "amtk" Mon Nov 7 13:52:17 2022 rev:12 rq:1034160 version:5.6.0 Changes: -------- --- /work/SRC/openSUSE:Factory/amtk/amtk.changes 2022-06-25 10:24:09.894665418 +0200 +++ /work/SRC/openSUSE:Factory/.amtk.new.1597/amtk.changes 2022-11-07 13:52:27.164058320 +0100 @@ -1,0 +2,17 @@ +Fri Nov 4 20:51:23 UTC 2022 - Bj??rn Lie <[email protected]> + +- Update to version 5.6.0: + + No changes. +- Changes from version 5.5.2: + + Add a function in AmtkApplicationWindow. + + Build: fix a warning. +- Changes from version 5.5.1: + + The project is now hosted here: + https://gitlab.gnome.org/World/amtk + + Add a utils function. + + Other minor improvement. +- Update URL. +- Bump soname following upstream changes. +- Use ldconfig_scriptlets macro for post(un) handling. + +------------------------------------------------------------------- Old: ---- amtk-5.4.1.tar.xz New: ---- amtk-5.6.0.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ amtk.spec ++++++ --- /var/tmp/diff_new_pack.lRN1C9/_old 2022-11-07 13:52:27.640060996 +0100 +++ /var/tmp/diff_new_pack.lRN1C9/_new 2022-11-07 13:52:27.648061041 +0100 @@ -18,15 +18,15 @@ %define api_ver 5 -%define libamtk libamtk-%{api_ver}-0 +%define libamtk libamtk-%{api_ver}-1 Name: amtk -Version: 5.4.1 +Version: 5.6.0 Release: 0 Summary: An Actions, Menus and Toolbars Kit License: LGPL-3.0-or-later Group: Development/Libraries/GNOME -URL: https://gitlab.gnome.org/swilmet/amtk/ -Source0: https://download.gnome.org/sources/amtk/5.4/%{name}-%{version}.tar.xz +URL: https://gitlab.gnome.org/World/amtk +Source0: https://download.gnome.org/sources/amtk/5.6/%{name}-%{version}.tar.xz BuildRequires: gobject-introspection-devel >= 1.42.0 BuildRequires: gtk-doc >= 1.25 @@ -93,12 +93,11 @@ %meson_install %find_lang %{name}-%{api_ver} +%ldconfig_scriptlets -n %{libamtk} + %check %meson_test -%post -n %{libamtk} -p /sbin/ldconfig -%postun -n %{libamtk} -p /sbin/ldconfig - %files -n %{libamtk} %license LICENSES/* %{_libdir}/libamtk-%{api_ver}.so.* ++++++ amtk-5.4.1.tar.xz -> amtk-5.6.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/amtk-5.4.1/NEWS new/amtk-5.6.0/NEWS --- old/amtk-5.4.1/NEWS 2022-05-25 07:38:19.000000000 +0200 +++ new/amtk-5.6.0/NEWS 2022-11-02 23:20:04.000000000 +0100 @@ -1,3 +1,18 @@ +News in 5.6.0, 2022-11-02 +------------------------- +* No changes. + +News in 5.5.2, 2022-10-24 +------------------------- +* Add a function in AmtkApplicationWindow. +* Build: fix a warning. + +News in 5.5.1, 2022-06-10 +------------------------- +* The project is now hosted here: https://gitlab.gnome.org/World/amtk +* Add a utils function. +* Other minor improvement. + News in 5.4.1, 2022-05-25 ------------------------- * Build system: check if compiler supports --version-script linker option. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/amtk-5.4.1/amtk/amtk-application-window.c new/amtk-5.6.0/amtk/amtk-application-window.c --- old/amtk-5.4.1/amtk/amtk-application-window.c 2022-05-25 07:38:19.000000000 +0200 +++ new/amtk-5.6.0/amtk/amtk-application-window.c 2022-11-02 23:20:04.000000000 +0100 @@ -521,6 +521,40 @@ amtk_application_window_connect_menu_to_statusbar (amtk_window, GTK_MENU_SHELL (menu)); } +/** + * amtk_application_window_create_open_recent_menu_base: + * + * Creates the base of a simple and generic #GtkRecentChooserMenu. + * + * The #GtkRecentChooser is configured to show files only recently used with the + * current application, as returned by g_get_application_name(). If recent files + * are added to the default #GtkRecentManager with + * gtk_recent_manager_add_item(), the files will normally show up in the + * #GtkRecentChooserMenu. + * + * Returns: (transfer floating): a new #GtkRecentChooserMenu. + * Since: 5.6 + */ +GtkRecentChooserMenu * +amtk_application_window_create_open_recent_menu_base (void) +{ + GtkRecentChooserMenu *recent_chooser_menu; + GtkRecentChooser *recent_chooser; + GtkRecentFilter *filter; + + recent_chooser_menu = GTK_RECENT_CHOOSER_MENU (gtk_recent_chooser_menu_new ()); + + recent_chooser = GTK_RECENT_CHOOSER (recent_chooser_menu); + gtk_recent_chooser_set_local_only (recent_chooser, FALSE); + gtk_recent_chooser_set_sort_type (recent_chooser, GTK_RECENT_SORT_MRU); + + filter = gtk_recent_filter_new (); + gtk_recent_filter_add_application (filter, g_get_application_name ()); + gtk_recent_chooser_set_filter (recent_chooser, filter); + + return recent_chooser_menu; +} + static void open_recent_file_cb (GtkRecentChooser *recent_chooser, gpointer user_data) @@ -544,20 +578,16 @@ * amtk_application_window_create_open_recent_menu: * @amtk_window: an #AmtkApplicationWindow. * - * Creates a simple and generic #GtkRecentChooserMenu. - * - * The #GtkRecentChooser is configured to show files only recently used with the - * current application, as returned by g_get_application_name(). If recent files - * are added to the default #GtkRecentManager with - * gtk_recent_manager_add_item(), the files will normally show up in the - * #GtkRecentChooserMenu. + * This function creates a #GtkRecentChooserMenu with + * amtk_application_window_create_open_recent_menu_base(), and setup these + * additional things: * - * The #GtkRecentChooserMenu is connected to the statusbar with - * amtk_application_window_connect_recent_chooser_menu_to_statusbar(). + * - The #GtkRecentChooserMenu is connected to the statusbar with + * amtk_application_window_connect_recent_chooser_menu_to_statusbar(). * - * When the #GtkRecentChooser::item-activated signal is emitted, - * g_application_open() is called (with an empty hint), so the #GApplication - * must have the %G_APPLICATION_HANDLES_OPEN flag set. + * - When the #GtkRecentChooser::item-activated signal is emitted, + * g_application_open() is called (with an empty hint), so the #GApplication + * must have the %G_APPLICATION_HANDLES_OPEN flag set. * * Returns: (transfer floating): a new #GtkRecentChooserMenu. * Since: 3.0 @@ -566,24 +596,14 @@ amtk_application_window_create_open_recent_menu (AmtkApplicationWindow *amtk_window) { GtkRecentChooserMenu *recent_chooser_menu; - GtkRecentChooser *recent_chooser; - GtkRecentFilter *filter; g_return_val_if_fail (AMTK_IS_APPLICATION_WINDOW (amtk_window), NULL); - recent_chooser_menu = GTK_RECENT_CHOOSER_MENU (gtk_recent_chooser_menu_new ()); - - recent_chooser = GTK_RECENT_CHOOSER (recent_chooser_menu); - gtk_recent_chooser_set_local_only (recent_chooser, FALSE); - gtk_recent_chooser_set_sort_type (recent_chooser, GTK_RECENT_SORT_MRU); - - filter = gtk_recent_filter_new (); - gtk_recent_filter_add_application (filter, g_get_application_name ()); - gtk_recent_chooser_set_filter (recent_chooser, filter); + recent_chooser_menu = amtk_application_window_create_open_recent_menu_base (); amtk_application_window_connect_recent_chooser_menu_to_statusbar (amtk_window, recent_chooser_menu); - g_signal_connect_object (recent_chooser, + g_signal_connect_object (recent_chooser_menu, "item-activated", G_CALLBACK (open_recent_file_cb), amtk_window, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/amtk-5.4.1/amtk/amtk-application-window.h new/amtk-5.6.0/amtk/amtk-application-window.h --- old/amtk-5.4.1/amtk/amtk-application-window.h 2022-05-25 07:38:19.000000000 +0200 +++ new/amtk-5.6.0/amtk/amtk-application-window.h 2022-11-02 23:20:04.000000000 +0100 @@ -64,6 +64,9 @@ GtkRecentChooserMenu *menu); G_MODULE_EXPORT +GtkRecentChooserMenu * amtk_application_window_create_open_recent_menu_base (void); + +G_MODULE_EXPORT GtkWidget * amtk_application_window_create_open_recent_menu (AmtkApplicationWindow *amtk_window); G_MODULE_EXPORT diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/amtk-5.4.1/amtk/amtk-utils.c new/amtk-5.6.0/amtk/amtk-utils.c --- old/amtk-5.4.1/amtk/amtk-utils.c 2022-05-25 07:38:19.000000000 +0200 +++ new/amtk-5.6.0/amtk/amtk-utils.c 2022-11-02 23:20:04.000000000 +0100 @@ -1,4 +1,4 @@ -/* SPDX-FileCopyrightText: 2017 - S??bastien Wilmet <[email protected]> +/* SPDX-FileCopyrightText: 2017-2022 - S??bastien Wilmet <[email protected]> * SPDX-License-Identifier: LGPL-3.0-or-later */ @@ -15,57 +15,94 @@ * Utility functions. */ -/* - * _amtk_utils_replace_home_dir_with_tilde: - * @filename: the filename. - * - * Replaces the home directory with a tilde, if the home directory is present in - * the @filename. - * - * Returns: the new filename. Free with g_free(). - */ -/* This function is a copy from tepl-utils, which originally comes from gedit. */ -gchar * -_amtk_utils_replace_home_dir_with_tilde (const gchar *filename) +static gchar * +get_home_dir_without_trailing_slash (const gchar *home_dir) { - gchar *tmp; - gchar *home; + gchar *utf8_home_dir; + gsize length; - g_return_val_if_fail (filename != NULL, NULL); + if (home_dir == NULL) + { + return NULL; + } - /* Note that g_get_home_dir returns a const string */ - tmp = (gchar *) g_get_home_dir (); + utf8_home_dir = g_filename_to_utf8 (home_dir, -1, NULL, NULL, NULL); + if (utf8_home_dir == NULL) + { + return NULL; + } - if (tmp == NULL) + length = strlen (utf8_home_dir); + if (length == 0) { - return g_strdup (filename); + g_free (utf8_home_dir); + return NULL; } - home = g_filename_to_utf8 (tmp, -1, NULL, NULL, NULL); - if (home == NULL) + if (utf8_home_dir[length - 1] == '/') { - return g_strdup (filename); + utf8_home_dir[length - 1] = '\0'; } - if (g_str_equal (filename, home)) + return utf8_home_dir; +} + +/* Like tepl_utils_replace_home_dir_with_tilde() but with an additional home_dir + * parameter, for unit tests. + */ +static gchar * +_tepl_utils_replace_home_dir_with_tilde_with_param (const gchar *filename, + const gchar *home_dir) +{ + gchar *home_dir_without_trailing_slash; + gchar *home_dir_with_trailing_slash; + gchar *ret; + + g_return_val_if_fail (filename != NULL, NULL); + + home_dir_without_trailing_slash = get_home_dir_without_trailing_slash (home_dir); + if (home_dir_without_trailing_slash == NULL) { - g_free (home); - return g_strdup ("~"); + return g_strdup (filename); } - tmp = home; - home = g_strdup_printf ("%s/", tmp); - g_free (tmp); + home_dir_with_trailing_slash = g_strdup_printf ("%s/", home_dir_without_trailing_slash); + + if (g_str_equal (filename, home_dir_without_trailing_slash) || + g_str_equal (filename, home_dir_with_trailing_slash)) + { + ret = g_strdup ("~"); + goto out; + } - if (g_str_has_prefix (filename, home)) + if (g_str_has_prefix (filename, home_dir_with_trailing_slash)) { - gchar *res = g_strdup_printf ("~/%s", filename + strlen (home)); - g_free (home); - return res; + ret = g_strdup_printf ("~/%s", filename + strlen (home_dir_with_trailing_slash)); + goto out; } - g_free (home); - return g_strdup (filename); + ret = g_strdup (filename); + +out: + g_free (home_dir_without_trailing_slash); + g_free (home_dir_with_trailing_slash); + return ret; +} + +/* + * _amtk_utils_replace_home_dir_with_tilde: + * @filename: the filename. + * + * Replaces the home directory with a tilde, if the home directory is present in + * the @filename. + * + * Returns: the new filename. Free with g_free(). + */ +/* This function is a copy from tepl-utils, which originally comes from gedit. */ +gchar * +_amtk_utils_replace_home_dir_with_tilde (const gchar *filename) +{ + return _tepl_utils_replace_home_dir_with_tilde_with_param (filename, g_get_home_dir ()); } /** @@ -428,3 +465,42 @@ gtk_action_name); } G_GNUC_END_IGNORE_DEPRECATIONS + +/** + * amtk_utils_get_shrinkable_menubar: + * @menubar: a #GtkMenuBar. + * + * This function wraps @menubar into a container, to allow the menubar to shrink + * below its minimum width. + * + * A possible use-case: have two applications side-by-side on a single screen. + * + * Returns: (transfer floating): a new widget that contains @menubar. + * Since: 5.6 + */ +GtkWidget * +amtk_utils_get_shrinkable_menubar (GtkMenuBar *menubar) +{ + GtkWidget *viewport; + GtkWidget *hpaned; + + /* Note, this solution might work with other kinds of widgets than a + * GtkMenuBar. But it would require more testing. If a more general + * solution is desirable, another function can be added. + */ + + g_return_val_if_fail (GTK_IS_MENU_BAR (menubar), NULL); + + viewport = gtk_viewport_new (NULL, NULL); + gtk_widget_show (viewport); + gtk_viewport_set_shadow_type (GTK_VIEWPORT (viewport), GTK_SHADOW_NONE); + + hpaned = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL); + gtk_widget_show (hpaned); + + /* Packing */ + gtk_container_add (GTK_CONTAINER (viewport), GTK_WIDGET (menubar)); + gtk_paned_add1 (GTK_PANED (hpaned), viewport); + + return hpaned; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/amtk-5.4.1/amtk/amtk-utils.h new/amtk-5.6.0/amtk/amtk-utils.h --- old/amtk-5.4.1/amtk/amtk-utils.h 2022-05-25 07:38:19.000000000 +0200 +++ new/amtk-5.6.0/amtk/amtk-utils.h 2022-11-02 23:20:04.000000000 +0100 @@ -43,6 +43,9 @@ const gchar *gtk_action_name); G_GNUC_END_IGNORE_DEPRECATIONS +G_MODULE_EXPORT +GtkWidget * amtk_utils_get_shrinkable_menubar (GtkMenuBar *menubar); + G_END_DECLS #endif /* AMTK_UTILS_H */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/amtk-5.4.1/amtk/meson.build new/amtk-5.6.0/amtk/meson.build --- old/amtk-5.4.1/amtk/meson.build 2022-05-25 07:38:19.000000000 +0200 +++ new/amtk-5.6.0/amtk/meson.build 2022-11-02 23:20:04.000000000 +0100 @@ -73,7 +73,7 @@ link_args: amtk_lib_link_args, link_depends: symbol_map, # link_whole is not supported with MSVC, so we use extract_all_objects(). - objects: amtk_static_lib.extract_all_objects(), + objects: amtk_static_lib.extract_all_objects(recursive: false), version: AMTK_LT_VERSION, install: true ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/amtk-5.4.1/amtk.doap new/amtk-5.6.0/amtk.doap --- old/amtk-5.4.1/amtk.doap 2022-05-25 07:38:19.000000000 +0200 +++ new/amtk-5.6.0/amtk.doap 2022-11-02 23:20:04.000000000 +0100 @@ -10,9 +10,9 @@ Toolbars Kit???. It is a basic GtkUIManager replacement based on GAction. It is suitable for both a traditional UI or a modern UI with a GtkHeaderBar.</description> - <homepage rdf:resource="https://gitlab.gnome.org/swilmet/amtk/" /> + <homepage rdf:resource="https://gitlab.gnome.org/World/amtk" /> <download-page rdf:resource="https://download.gnome.org/sources/amtk/" /> - <bug-database rdf:resource="https://gitlab.gnome.org/swilmet/amtk/-/issues" /> + <bug-database rdf:resource="https://gitlab.gnome.org/World/amtk/-/issues" /> <programming-language>C</programming-language> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/amtk-5.4.1/docs/reference/amtk-docs.xml new/amtk-5.6.0/docs/reference/amtk-docs.xml --- old/amtk-5.4.1/docs/reference/amtk-docs.xml 2022-05-25 07:38:19.000000000 +0200 +++ new/amtk-5.6.0/docs/reference/amtk-docs.xml 2022-11-02 23:20:04.000000000 +0100 @@ -61,5 +61,9 @@ <title>Index of new symbols in 5.0</title> <xi:include href="xml/api-index-5.0.xml"><xi:fallback /></xi:include> </index> + <index id="api-index-5-6" role="5.6"> + <title>Index of new symbols in 5.6</title> + <xi:include href="xml/api-index-5.6.xml"><xi:fallback /></xi:include> + </index> </part> </book> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/amtk-5.4.1/docs/reference/amtk-sections.txt new/amtk-5.6.0/docs/reference/amtk-sections.txt --- old/amtk-5.4.1/docs/reference/amtk-sections.txt 2022-05-25 07:38:19.000000000 +0200 +++ new/amtk-5.6.0/docs/reference/amtk-sections.txt 2022-11-02 23:20:04.000000000 +0100 @@ -18,6 +18,7 @@ amtk_application_window_set_statusbar amtk_application_window_connect_menu_to_statusbar amtk_application_window_connect_recent_chooser_menu_to_statusbar +amtk_application_window_create_open_recent_menu_base amtk_application_window_create_open_recent_menu amtk_application_window_create_open_recent_menu_item <SUBSECTION Standard> @@ -181,4 +182,5 @@ amtk_utils_recent_chooser_menu_get_item_uri amtk_utils_bind_g_action_to_gtk_action amtk_utils_create_gtk_action +amtk_utils_get_shrinkable_menubar </SECTION> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/amtk-5.4.1/meson.build new/amtk-5.6.0/meson.build --- old/amtk-5.4.1/meson.build 2022-05-25 07:38:19.000000000 +0200 +++ new/amtk-5.6.0/meson.build 2022-11-02 23:20:04.000000000 +0100 @@ -6,7 +6,7 @@ project( 'amtk', 'c', meson_version: '>= 0.53', - version: '5.4.1', + version: '5.6.0', default_options: ['warning_level=2'] ) @@ -33,9 +33,9 @@ # # When incrementing the API version (usually for a new major package version), # set CURRENT, REVISION and AGE to 0 since it's like a new library. -lt_current = 0 -lt_revision = 1 -lt_age = 0 +lt_current = 1 +lt_revision = 0 +lt_age = 1 AMTK_LT_VERSION = '@0@.@1@.@2@'.format(lt_current, lt_revision, lt_age) # API version, used for parallel installability.
