forked from AuroraMiddleware/gtk
Merge branch 'otte/for-master' into 'master'
Otte/for master See merge request GNOME/gtk!1153
This commit is contained in:
commit
4b41dd4eb1
@ -104,7 +104,7 @@ gdk_vulkan_strerror (VkResult result)
|
||||
* Becuse the Vulkan people don't make adding this too easy, here's
|
||||
* the process to manage it:
|
||||
* 1. go to
|
||||
* https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers/blame/master/include/vulkan/vulkan.h
|
||||
* https://github.com/KhronosGroup/Vulkan-Headers/blob/master/include/vulkan/vulkan_core.h
|
||||
* 2. Find the line where this enum value was added.
|
||||
* 3. Click the commit that added this line.
|
||||
* 4. The commit you're looking at now should also change
|
||||
@ -201,6 +201,10 @@ gdk_vulkan_strerror (VkResult result)
|
||||
case VK_ERROR_INVALID_DEVICE_ADDRESS_EXT:
|
||||
return "Invalid device address";
|
||||
#endif
|
||||
#if VK_HEADER_VERSION >= 105
|
||||
case VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT:
|
||||
return "An operation on a swapchain created with VK_FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT failed as it did not have exlusive full-screen access.";
|
||||
#endif
|
||||
|
||||
case VK_RESULT_RANGE_SIZE:
|
||||
case VK_RESULT_MAX_ENUM:
|
||||
|
@ -2095,6 +2095,10 @@ gtk_builder_value_from_string_type (GtkBuilder *builder,
|
||||
gchar **vector = g_strsplit (string, "\n", 0);
|
||||
g_value_take_boxed (value, vector);
|
||||
}
|
||||
else if (G_VALUE_HOLDS (value, G_TYPE_BYTES))
|
||||
{
|
||||
g_value_take_boxed (value, g_bytes_new (string, strlen (string)));
|
||||
}
|
||||
else
|
||||
{
|
||||
g_set_error (error,
|
||||
|
@ -122,7 +122,6 @@ static void gtk_message_dialog_get_property (GObject *object,
|
||||
GParamSpec *pspec);
|
||||
static void gtk_message_dialog_add_buttons (GtkMessageDialog *message_dialog,
|
||||
GtkButtonsType buttons);
|
||||
static void gtk_message_dialog_buildable_interface_init (GtkBuildableIface *iface);
|
||||
|
||||
enum {
|
||||
PROP_0,
|
||||
@ -136,20 +135,7 @@ enum {
|
||||
PROP_MESSAGE_AREA
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE_WITH_CODE (GtkMessageDialog, gtk_message_dialog, GTK_TYPE_DIALOG,
|
||||
G_ADD_PRIVATE (GtkMessageDialog)
|
||||
G_IMPLEMENT_INTERFACE (GTK_TYPE_BUILDABLE,
|
||||
gtk_message_dialog_buildable_interface_init))
|
||||
|
||||
static GtkBuildableIface *parent_buildable_iface;
|
||||
|
||||
static void
|
||||
gtk_message_dialog_buildable_interface_init (GtkBuildableIface *iface)
|
||||
{
|
||||
parent_buildable_iface = g_type_interface_peek_parent (iface);
|
||||
iface->custom_tag_start = parent_buildable_iface->custom_tag_start;
|
||||
iface->custom_finished = parent_buildable_iface->custom_finished;
|
||||
}
|
||||
G_DEFINE_TYPE_WITH_PRIVATE (GtkMessageDialog, gtk_message_dialog, GTK_TYPE_DIALOG)
|
||||
|
||||
static void
|
||||
gtk_message_dialog_class_init (GtkMessageDialogClass *class)
|
||||
|
@ -27,7 +27,6 @@
|
||||
#include "gtkradiobutton.h"
|
||||
|
||||
#include "gtkwidgetprivate.h"
|
||||
#include "gtktogglebuttonprivate.h"
|
||||
#include "gtkcheckbuttonprivate.h"
|
||||
#include "gtklabel.h"
|
||||
#include "gtkmarshalers.h"
|
||||
@ -242,7 +241,7 @@ gtk_radio_button_init (GtkRadioButton *radio_button)
|
||||
|
||||
gtk_widget_set_receives_default (GTK_WIDGET (radio_button), FALSE);
|
||||
|
||||
_gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (radio_button), TRUE);
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (radio_button), TRUE);
|
||||
|
||||
priv->group = g_slist_prepend (NULL, radio_button);
|
||||
|
||||
@ -729,9 +728,6 @@ gtk_radio_button_clicked (GtkButton *button)
|
||||
GtkToggleButton *toggle_button = GTK_TOGGLE_BUTTON (button);
|
||||
GtkToggleButton *tmp_button;
|
||||
GSList *tmp_list;
|
||||
gint toggled;
|
||||
|
||||
toggled = FALSE;
|
||||
|
||||
g_object_ref (GTK_WIDGET (button));
|
||||
|
||||
@ -753,17 +749,13 @@ gtk_radio_button_clicked (GtkButton *button)
|
||||
}
|
||||
|
||||
if (tmp_button)
|
||||
{
|
||||
toggled = TRUE;
|
||||
_gtk_toggle_button_set_active (toggle_button,
|
||||
!gtk_toggle_button_get_active (toggle_button));
|
||||
}
|
||||
gtk_toggle_button_set_active (toggle_button,
|
||||
!gtk_toggle_button_get_active (toggle_button));
|
||||
}
|
||||
else
|
||||
{
|
||||
toggled = TRUE;
|
||||
_gtk_toggle_button_set_active (toggle_button,
|
||||
!gtk_toggle_button_get_active (toggle_button));
|
||||
gtk_toggle_button_set_active (toggle_button,
|
||||
!gtk_toggle_button_get_active (toggle_button));
|
||||
|
||||
tmp_list = priv->group;
|
||||
while (tmp_list)
|
||||
@ -779,13 +771,6 @@ gtk_radio_button_clicked (GtkButton *button)
|
||||
}
|
||||
}
|
||||
|
||||
if (toggled)
|
||||
{
|
||||
gtk_toggle_button_toggled (toggle_button);
|
||||
|
||||
g_object_notify (G_OBJECT (toggle_button), "active");
|
||||
}
|
||||
|
||||
gtk_widget_queue_draw (GTK_WIDGET (button));
|
||||
|
||||
g_object_unref (button);
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "gtktogglebuttonprivate.h"
|
||||
#include "gtktogglebutton.h"
|
||||
|
||||
#include "gtkbuttonprivate.h"
|
||||
#include "gtkintl.h"
|
||||
@ -293,8 +293,9 @@ gtk_toggle_button_get_property (GObject *object,
|
||||
*
|
||||
* Sets the status of the toggle button. Set to %TRUE if you want the
|
||||
* GtkToggleButton to be “pressed in”, and %FALSE to raise it.
|
||||
* This action causes the #GtkToggleButton::toggled signal and the
|
||||
* #GtkButton::clicked signal to be emitted.
|
||||
*
|
||||
* If the status of the button changes, this action causes the
|
||||
* #GtkToggleButton::toggled signal to be emitted.
|
||||
*/
|
||||
void
|
||||
gtk_toggle_button_set_active (GtkToggleButton *toggle_button,
|
||||
@ -306,18 +307,8 @@ gtk_toggle_button_set_active (GtkToggleButton *toggle_button,
|
||||
|
||||
is_active = is_active != FALSE;
|
||||
|
||||
if (priv->active != is_active)
|
||||
{
|
||||
g_signal_emit_by_name (toggle_button, "clicked");
|
||||
g_object_notify_by_pspec (G_OBJECT (toggle_button), toggle_button_props[PROP_ACTIVE]);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
_gtk_toggle_button_set_active (GtkToggleButton *toggle_button,
|
||||
gboolean is_active)
|
||||
{
|
||||
GtkToggleButtonPrivate *priv = gtk_toggle_button_get_instance_private (toggle_button);
|
||||
if (priv->active == is_active)
|
||||
return;
|
||||
|
||||
priv->active = is_active;
|
||||
|
||||
@ -326,6 +317,9 @@ _gtk_toggle_button_set_active (GtkToggleButton *toggle_button,
|
||||
else
|
||||
gtk_widget_unset_state_flags (GTK_WIDGET (toggle_button), GTK_STATE_FLAG_CHECKED);
|
||||
|
||||
gtk_toggle_button_toggled (toggle_button);
|
||||
|
||||
g_object_notify_by_pspec (G_OBJECT (toggle_button), toggle_button_props[PROP_ACTIVE]);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -387,11 +381,7 @@ gtk_toggle_button_clicked (GtkButton *button)
|
||||
GtkToggleButton *toggle_button = GTK_TOGGLE_BUTTON (button);
|
||||
GtkToggleButtonPrivate *priv = gtk_toggle_button_get_instance_private (toggle_button);
|
||||
|
||||
_gtk_toggle_button_set_active (toggle_button, !priv->active);
|
||||
|
||||
gtk_toggle_button_toggled (toggle_button);
|
||||
|
||||
g_object_notify_by_pspec (G_OBJECT (toggle_button), toggle_button_props[PROP_ACTIVE]);
|
||||
gtk_toggle_button_set_active (toggle_button, !priv->active);
|
||||
|
||||
if (GTK_BUTTON_CLASS (gtk_toggle_button_parent_class)->clicked)
|
||||
GTK_BUTTON_CLASS (gtk_toggle_button_parent_class)->clicked (button);
|
||||
|
@ -1,40 +0,0 @@
|
||||
/* GTK - The GIMP Toolkit
|
||||
* Copyright (C) 2014 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
|
||||
* file for a list of people on the GTK+ Team. See the ChangeLog
|
||||
* files for a list of changes. These files are distributed with
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
*/
|
||||
|
||||
#ifndef __GTK_TOGGLE_BUTTON_PRIVATE_H__
|
||||
#define __GTK_TOGGLE_BUTTON_PRIVATE_H__
|
||||
|
||||
|
||||
#include <gtk/gtktogglebutton.h>
|
||||
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
void _gtk_toggle_button_set_active (GtkToggleButton *toggle_button,
|
||||
gboolean is_active);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
||||
#endif /* __GTK_TOGGLE_BUTTON_PRIVATE_H__ */
|
Loading…
Reference in New Issue
Block a user