diff options
Diffstat (limited to 'mate-panel/panel-applet-frame.c')
-rw-r--r-- | mate-panel/panel-applet-frame.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/mate-panel/panel-applet-frame.c b/mate-panel/panel-applet-frame.c index ebb8cb14..f0b5bfa9 100644 --- a/mate-panel/panel-applet-frame.c +++ b/mate-panel/panel-applet-frame.c @@ -4,6 +4,7 @@ * * Copyright (C) 2010 Carlos Garcia Campos <[email protected]> * Copyright (C) 2001 - 2003 Sun Microsystems, Inc. + * Copyright (C) 2012-2021 MATE Developers * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -437,8 +438,7 @@ mate_panel_applet_frame_finalize (GObject *object) panel_lockdown_notify_remove (G_CALLBACK (mate_panel_applet_frame_sync_menu_state), frame); - g_free (frame->priv->iid); - frame->priv->iid = NULL; + g_clear_pointer (&frame->priv->iid, g_free); G_OBJECT_CLASS (mate_panel_applet_frame_parent_class)->finalize (object); } @@ -551,8 +551,7 @@ void _mate_panel_applet_frame_set_iid (MatePanelAppletFrame *frame, const gchar *iid) { - if (frame->priv->iid) - g_free (frame->priv->iid); + g_free (frame->priv->iid); frame->priv->iid = g_strdup (iid); } @@ -614,7 +613,7 @@ _mate_panel_applet_frame_update_flags (MatePanelAppletFrame *frame, frame->priv->panel, GTK_WIDGET (frame), major, minor); old_has_handle = frame->priv->has_handle; - frame->priv->has_handle = has_handle; + frame->priv->has_handle = (has_handle != FALSE); if (!old_has_handle && frame->priv->has_handle) { /* we've added an handle, so we need to get the background for @@ -628,12 +627,12 @@ _mate_panel_applet_frame_update_flags (MatePanelAppletFrame *frame, void _mate_panel_applet_frame_update_size_hints (MatePanelAppletFrame *frame, - gint *size_hints, - guint n_elements) + gint *size_hints, + gsize n_elements) { if (frame->priv->has_handle) { gint extra_size = HANDLE_SIZE + 1; - gint i; + gsize i; for (i = 0; i < n_elements; i++) size_hints[i] += extra_size; @@ -646,6 +645,7 @@ _mate_panel_applet_frame_update_size_hints (MatePanelAppletFrame *frame, n_elements); } +#ifdef HAVE_X11 char * _mate_panel_applet_frame_get_background_string (MatePanelAppletFrame *frame, PanelWidget *panel, @@ -680,6 +680,8 @@ _mate_panel_applet_frame_get_background_string (MatePanelAppletFrame *frame, return panel_background_make_string (&panel->toplevel->background, x, y); } +#endif + static void mate_panel_applet_frame_reload_response (GtkWidget *dialog, @@ -963,8 +965,8 @@ mate_panel_applet_frame_loading_failed (const char *iid, _("Do you want to delete the applet " "from your configuration?")); - gtk_dialog_add_button (GTK_DIALOG (dialog), - PANEL_STOCK_DONT_DELETE, LOADING_FAILED_RESPONSE_DONT_DELETE); + panel_dialog_add_button (GTK_DIALOG (dialog), + _("_Don't Delete"), "gtk-cancel", LOADING_FAILED_RESPONSE_DONT_DELETE); panel_dialog_add_button (GTK_DIALOG (dialog), _("_Delete"), "edit-delete", LOADING_FAILED_RESPONSE_DELETE); |