Hello community, here is the log from the commit of package mate-applets for openSUSE:Factory checked in at 2019-05-16 22:03:35 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/mate-applets (Old) and /work/SRC/openSUSE:Factory/.mate-applets.new.5148 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "mate-applets" Thu May 16 22:03:35 2019 rev:22 rq:682557 version:1.22.0 Changes: -------- --- /work/SRC/openSUSE:Factory/mate-applets/mate-applets.changes 2019-01-08 12:28:26.584274492 +0100 +++ /work/SRC/openSUSE:Factory/.mate-applets.new.5148/mate-applets.changes 2019-05-16 22:03:39.470644467 +0200 @@ -1,0 +2,28 @@ +Tue Mar 5 15:19:33 UTC 2019 - [email protected] + +- Update to version 1.22.0: + * Remove unused png files. + * accessx-status: Fix another leak. + * Fix memory leak on accessx-status. + * sticky-notes: Fix a memory leak. + * timerapplet: Allow reseting timer when inactive. + * Avoid newly deprecated gtk_css_provider_get_default. + * Weather: Apply a widget name to the textview. + * weather: Add cssprovider for widget, not for screen. + * mateweather-dialog.c: Avoid deprecated + "gtk_widget_override_font". + * cpufreq: Stop a segfault with GTK+ 3.23. + * trash applet: Avoid deprecated "gtk_window_set_wmclass". + * cpufreq: Fix a -Wimplicit-function-declaration. + * trash: Fix a -Wincompatible-pointer-types warning. + * weather: Replace deprecated GtkAlignment. + * stickynotes: Replace deprecated gdk_error_trap_push/pop + functions. + * Replace deprecated gtk_menu_popup. + * multiload: Ignore priviledged mount points. + * Disable deprecation warnings for distcheck. + * Silent output when building. + * Update translations. +- Rebase mate-applets-gtk-3.20.patch. + +------------------------------------------------------------------- Old: ---- mate-applets-1.20.3.tar.xz New: ---- mate-applets-1.22.0.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ mate-applets.spec ++++++ --- /var/tmp/diff_new_pack.HbcIed/_old 2019-05-16 22:03:40.082643894 +0200 +++ /var/tmp/diff_new_pack.HbcIed/_new 2019-05-16 22:03:40.086643890 +0200 @@ -1,7 +1,7 @@ # # spec file for package mate-applets # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,14 +16,14 @@ # -%define _version 1.20 +%define _version 1.22 Name: mate-applets -Version: 1.20.3 +Version: 1.22.0 Release: 0 Summary: A set of applets for the MATE Desktop License: GFDL-1.1-only AND GPL-2.0-or-later Group: System/GUI/Other -Url: https://mate-desktop.org/ +URL: https://mate-desktop.org/ Source: https://pub.mate-desktop.org/releases/%{_version}/%{name}-%{version}.tar.xz # PATCH-FEATURE-OPENSUSE mate-applets-gtk-3.20.patch -- Restore GLib 2.48 and GTK+ 3.20 support. Patch0: mate-applets-gtk-3.20.patch ++++++ mate-applets-1.20.3.tar.xz -> mate-applets-1.22.0.tar.xz ++++++ /work/SRC/openSUSE:Factory/mate-applets/mate-applets-1.20.3.tar.xz /work/SRC/openSUSE:Factory/.mate-applets.new.5148/mate-applets-1.22.0.tar.xz differ: char 25, line 1 ++++++ mate-applets-gtk-3.20.patch ++++++ --- /var/tmp/diff_new_pack.HbcIed/_old 2019-05-16 22:03:40.122643856 +0200 +++ /var/tmp/diff_new_pack.HbcIed/_new 2019-05-16 22:03:40.122643856 +0200 @@ -1,6 +1,6 @@ --- a/accessx-status/applet.c +++ b/accessx-status/applet.c -@@ -153,10 +153,17 @@ static void help_cb(GtkAction* action, A +@@ -107,10 +107,17 @@ static void help_cb(GtkAction* action, A GError* error = NULL; GdkScreen* screen = gtk_widget_get_screen(GTK_WIDGET(sapplet->applet)); @@ -20,7 +20,7 @@ { --- a/battstat/battstat_applet.c +++ b/battstat/battstat_applet.c -@@ -1136,10 +1136,17 @@ battstat_show_help( ProgressData *battst +@@ -769,10 +769,17 @@ battstat_show_help( ProgressData *battst else uri = g_strdup ("help:mate-battstat"); @@ -40,7 +40,77 @@ --- a/charpick/charpick.c +++ b/charpick/charpick.c -@@ -627,10 +627,17 @@ help_cb (GtkAction *action, +@@ -328,6 +328,48 @@ populate_menu (charpick_data *curr_data) + gtk_style_context_add_class(context,"mate-panel-menu-bar"); + } + ++#if !GTK_CHECK_VERSION (3, 22, 0) ++static void ++popup_menu_position (GtkMenu *menu, ++ gint *x, ++ gint *y, ++ gboolean *push_in, ++ gpointer user_data) ++{ ++ charpick_data *curr_data = user_data; ++ GdkScreen *screen; ++ GdkWindow *applet_window; ++ GtkRequisition reqmenu; ++ gint tempx, tempy, width, height; ++ ++ screen = gtk_widget_get_screen (curr_data->applet); ++ applet_window = gtk_widget_get_window (curr_data->applet); ++ gtk_widget_get_preferred_size (GTK_WIDGET (menu), NULL, &reqmenu); ++ gdk_window_get_origin (applet_window, &tempx, &tempy); ++ gdk_window_get_geometry (applet_window, NULL, NULL, &width, &height); ++ ++ switch (mate_panel_applet_get_orient (MATE_PANEL_APPLET (curr_data->applet))) { ++ case MATE_PANEL_APPLET_ORIENT_DOWN: ++ tempy += height; ++ break; ++ case MATE_PANEL_APPLET_ORIENT_UP: ++ tempy -= reqmenu.height; ++ break; ++ case MATE_PANEL_APPLET_ORIENT_LEFT: ++ tempx -= reqmenu.width; ++ break; ++ case MATE_PANEL_APPLET_ORIENT_RIGHT: ++ tempx += width; ++ break; ++ } ++ ++ *x = CLAMP (tempx, 0, ++ MAX (0, gdk_screen_get_width (screen) - reqmenu.width)); ++ *y = CLAMP (tempy, 0, ++ MAX (0, gdk_screen_get_height (screen) - reqmenu.height)); ++} ++#endif ++ + static void + chooser_button_clicked (GtkButton *button, charpick_data *curr_data) + { +@@ -336,12 +378,19 @@ chooser_button_clicked (GtkButton *butto + else { + gtk_menu_set_screen (GTK_MENU (curr_data->menu), + gtk_widget_get_screen (GTK_WIDGET (curr_data->applet))); +- ++ ++#if GTK_CHECK_VERSION (3, 22, 0) + gtk_menu_popup_at_widget (GTK_MENU (curr_data->menu), + GTK_WIDGET (button), + GDK_GRAVITY_SOUTH_WEST, + GDK_GRAVITY_NORTH_WEST, + NULL); ++#else ++ gtk_menu_popup (GTK_MENU (curr_data->menu), ++ NULL, NULL, ++ popup_menu_position, curr_data, ++ 0, GDK_CURRENT_TIME); ++#endif + } + } + +@@ -596,10 +645,17 @@ help_cb (GtkAction *action, { GError *error = NULL; @@ -60,7 +130,7 @@ g_warning ("help error: %s\n", error->message); --- a/charpick/properties.c +++ b/charpick/properties.c -@@ -499,10 +499,17 @@ phelp_cb (GtkDialog *dialog, gint tab, g +@@ -515,10 +515,17 @@ phelp_cb (GtkDialog *dialog, gint tab, g { GError *error = NULL; @@ -80,7 +150,7 @@ g_warning ("help error: %s\n", error->message); --- a/configure.ac +++ b/configure.ac -@@ -11,9 +11,9 @@ AC_CONFIG_MACRO_DIR(m4) +@@ -12,9 +12,9 @@ AC_CONFIG_MACRO_DIR(m4) dnl *************************************************************************** dnl *** Minimum library versions for MATE-APPLETS *** dnl *************************************************************************** @@ -95,7 +165,81 @@ LIBNOTIFY_REQUIRED=0.7.0 --- a/cpufreq/src/cpufreq-applet.c +++ b/cpufreq/src/cpufreq-applet.c -@@ -593,10 +593,17 @@ cpufreq_applet_help_cb (GtkAction *a +@@ -301,6 +301,53 @@ get_max_text_width (GtkWidget *widget, + return logical_rect.width; + } + ++#if !GTK_CHECK_VERSION (3, 22, 0) ++static void ++cpufreq_applet_popup_position_menu (GtkMenu *menu, ++ gint *x, ++ gint *y, ++ gboolean *push_in, ++ gpointer user_data) ++{ ++ GtkWidget *widget = GTK_WIDGET (user_data); ++ GtkRequisition requisition; ++ GtkAllocation allocation; ++ gint menu_xpos, menu_ypos; ++ ++ gtk_widget_get_preferred_size (GTK_WIDGET (menu), &requisition, NULL); ++ gdk_window_get_origin (gtk_widget_get_window (widget), &menu_xpos, &menu_ypos); ++ gtk_widget_get_allocation (widget, &allocation); ++ ++ menu_xpos += allocation.x; ++ menu_ypos += allocation.y; ++ ++ switch (mate_panel_applet_get_orient (MATE_PANEL_APPLET (widget))) { ++ case MATE_PANEL_APPLET_ORIENT_DOWN: ++ case MATE_PANEL_APPLET_ORIENT_UP: ++ if (menu_ypos > gdk_screen_get_height (gtk_widget_get_screen (widget)) / 2) { ++ menu_ypos -= requisition.height; ++ } else { ++ menu_ypos += allocation.height; ++ } ++ break; ++ case MATE_PANEL_APPLET_ORIENT_RIGHT: ++ case MATE_PANEL_APPLET_ORIENT_LEFT: ++ if (menu_xpos > gdk_screen_get_width (gtk_widget_get_screen (widget)) / 2) { ++ menu_xpos -= requisition.width; ++ } else { ++ menu_xpos += allocation.width; ++ } ++ break; ++ } ++ *x = menu_xpos; ++ *y = menu_ypos; ++ ++ if (push_in != NULL) { ++ *push_in = FALSE; ++ } ++} ++#endif ++ + static void + cpufreq_applet_menu_popup (CPUFreqApplet *applet, + guint32 time) +@@ -333,11 +380,19 @@ cpufreq_applet_menu_popup (CPUFreqApplet + gtk_style_context_add_class(context,"gnome-panel-menu-bar"); + gtk_style_context_add_class(context,"mate-panel-menu-bar"); + ++#if GTK_CHECK_VERSION (3, 22, 0) + gtk_menu_popup_at_widget (GTK_MENU (menu), + GTK_WIDGET (applet), + GDK_GRAVITY_SOUTH_WEST, + GDK_GRAVITY_NORTH_WEST, + NULL); ++#else ++ gtk_menu_popup (GTK_MENU (menu), ++ NULL, NULL, ++ cpufreq_applet_popup_position_menu, ++ (gpointer) applet, ++ 1, time); ++#endif + } + + static gboolean +@@ -443,10 +498,17 @@ cpufreq_applet_help_cb (GtkAction *a { GError *error = NULL; @@ -143,55 +287,112 @@ static int _gtk_get_monitor_num (GdkMonitor *monitor) { -@@ -182,6 +183,7 @@ _gtk_get_monitor_num (GdkMonitor *monito +@@ -182,6 +183,67 @@ _gtk_get_monitor_num (GdkMonitor *monito return -1; } -+#endif - - /* the following function is adapted from gtkmenuitem.c */ - static void -@@ -195,7 +197,11 @@ position_menu (GtkMenu *menu, gint *x, g - GtkRequisition requisition; - GtkTextDirection direction; - GdkRectangle monitor; -+#if GTK_CHECK_VERSION (3, 22, 0) - GdkMonitor *monitor_num; -+#else -+ int monitor_num; -+#endif - GdkDisplay *display; - - g_return_if_fail (menu != NULL); -@@ -212,10 +218,16 @@ position_menu (GtkMenu *menu, gint *x, g - - screen = gtk_widget_get_screen (GTK_WIDGET (menu)); - display =gdk_screen_get_display (screen); -+#if GTK_CHECK_VERSION (3, 22, 0) - monitor_num = gdk_display_get_monitor_at_window (display, gtk_widget_get_window (widget)); - if (monitor_num == NULL) - monitor_num = gdk_display_get_monitor (display, 0); - gdk_monitor_get_geometry (monitor_num, &monitor); +#else ++/* the following function is adapted from gtkmenuitem.c */ ++static void ++popup_menu_position (GtkMenu *menu, ++ gint *x, ++ gint *y, ++ gboolean *push_in, ++ gpointer user_data) ++{ ++ GtkWidget *widget = GTK_WIDGET (user_data); ++ GdkScreen *screen; ++ gint monitor_num, twidth, theight, tx, ty; ++ GtkTextDirection direction; ++ GtkAllocation allocation; ++ GtkRequisition requisition; ++ GdkRectangle monitor; ++ ++ g_return_if_fail (menu != NULL); ++ g_return_if_fail (x != NULL); ++ g_return_if_fail (y != NULL); ++ ++ if (push_in) ++ *push_in = FALSE; ++ ++ ++ screen = gtk_widget_get_screen (GTK_WIDGET (menu)); ++ + monitor_num = gdk_screen_get_monitor_at_window (screen, gtk_widget_get_window (widget)); -+ monitor_num = monitor_num > 0 ? monitor_num : 0; ++ if (monitor_num > 0) ++ monitor_num = 0; + gdk_screen_get_monitor_geometry (screen, monitor_num, &monitor); -+#endif - - if (!gdk_window_get_origin (gtk_widget_get_window (widget), &tx, &ty)) { - g_warning ("Menu not on screen"); -@@ -241,7 +253,11 @@ position_menu (GtkMenu *menu, gint *x, g - *x = CLAMP (tx, monitor.x, MAX (monitor.x, monitor.x + monitor.width - twidth)); - *y = ty; - -+#if GTK_CHECK_VERSION (3, 22, 0) - gtk_menu_set_monitor (menu, _gtk_get_monitor_num (monitor_num)); -+#else ++ ++ if (gdk_window_get_origin (gtk_widget_get_window (widget), &tx, &ty) == 0) { ++ g_warning ("Menu is not on screen"); ++ return; ++ } ++ ++ direction = gtk_widget_get_direction (widget); ++ gtk_widget_get_allocation (widget, &allocation); ++ tx += allocation.x; ++ ty += allocation.y; ++ gtk_widget_get_preferred_size (GTK_WIDGET (menu), &requisition, NULL); ++ twidth = requisition.width; ++ theight = requisition.height; ++ ++ if (direction == GTK_TEXT_DIR_RTL) ++ tx += allocation.width - twidth; ++ if ((ty + allocation.height + theight) <= monitor.y + monitor.height) ++ ty += allocation.height; ++ else if ((ty - theight) >= monitor.y) ++ ty -= theight; ++ else if (monitor.y + monitor.height - (ty + allocation.height) > ty) ++ ty += allocation.height; ++ else ++ ty -= theight; ++ *x = CLAMP (tx, monitor.x, MAX (monitor.x, monitor.x + monitor.width - twidth)); ++ *y = ty; ++ + gtk_menu_set_monitor (menu, monitor_num); ++} +#endif - } static gboolean + drive_button_button_press (GtkWidget *widget, +@@ -193,11 +255,18 @@ drive_button_button_press (GtkWidget + if (event->button == 1) { + drive_button_ensure_popup (self); + if (self->popup_menu) { ++#if GTK_CHECK_VERSION (3, 22, 0) + gtk_menu_popup_at_widget (GTK_MENU (self->popup_menu), + widget, + GDK_GRAVITY_SOUTH_WEST, + GDK_GRAVITY_NORTH_WEST, + (const GdkEvent*) event); ++#else ++ gtk_menu_popup (GTK_MENU (self->popup_menu), ++ NULL, NULL, ++ popup_menu_position, self, ++ event->button, event->time); ++#endif + } + return TRUE; + } +@@ -217,11 +286,18 @@ drive_button_key_press (GtkWidget * + case GDK_KEY_Return: + drive_button_ensure_popup (self); + if (self->popup_menu) { ++#if GTK_CHECK_VERSION (3, 22, 0) + gtk_menu_popup_at_widget (GTK_MENU (self->popup_menu), + widget, + GDK_GRAVITY_SOUTH_WEST, + GDK_GRAVITY_NORTH_WEST, + (const GdkEvent*) event); ++#else ++ gtk_menu_popup (GTK_MENU (self->popup_menu), ++ NULL, NULL, ++ popup_menu_position, self, ++ 0, event->time); ++#endif + } + return TRUE; + } --- a/drivemount/drivemount.c +++ b/drivemount/drivemount.c @@ -132,10 +132,17 @@ display_help (GtkAction *action, @@ -354,7 +555,7 @@ g_warning ("help error: %s\n", error->message); --- a/netspeed/src/netspeed.c +++ b/netspeed/src/netspeed.c -@@ -739,10 +742,17 @@ display_help (GtkWidget *dialog, const g +@@ -777,10 +777,17 @@ display_help (GtkWidget *dialog, const g else uri = g_strdup ("help:mate-netspeed-applet"); @@ -412,7 +613,7 @@ _("There was an error displaying help: %s"), error->message); --- a/stickynotes/stickynotes.c +++ b/stickynotes/stickynotes.c -@@ -378,10 +378,17 @@ static void +@@ -379,10 +379,17 @@ static void response_cb (GtkWidget *dialog, gint id, gpointer data) { if (id == GTK_RESPONSE_HELP) @@ -430,6 +631,24 @@ else if (id == GTK_RESPONSE_CLOSE) gtk_widget_hide (dialog); } +--- a/stickynotes/stickynotes_callbacks.c ++++ b/stickynotes/stickynotes_callbacks.c +@@ -95,8 +95,15 @@ stickynote_show_popup_menu (GtkWidget *w + { + if (event->type == GDK_BUTTON_PRESS && event->button == 3) + { ++#if GTK_CHECK_VERSION (3, 22, 0) + gtk_menu_popup_at_pointer (GTK_MENU (popup_menu), + (const GdkEvent*) event); ++#else ++ gtk_menu_popup (GTK_MENU (popup_menu), ++ NULL, NULL, ++ NULL, NULL, ++ event->button, event->time); ++#endif + } + + return FALSE; --- a/trashapplet/src/trashapplet.c +++ b/trashapplet/src/trashapplet.c @@ -368,10 +368,17 @@ trash_applet_open_folder (GtkAction *a @@ -477,7 +696,7 @@ +#if GTK_CHECK_VERSION (3, 22, 0) GdkMonitor *monitor; +#else -+ int monitor; ++ gint monitor; +#endif if (opt_rect)
