Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 49e93f6ee4 | |||
| 4ec2234537 | |||
| 5a3755b233 |
@@ -1,57 +1,5 @@
|
||||
Overview of Changes in 4.10.0, xx-xx-xxxx
|
||||
=========================================
|
||||
|
||||
* GtkTextView
|
||||
- Document hanging indentation
|
||||
|
||||
* GtkListView
|
||||
- Fix a size allocation problem
|
||||
|
||||
* GtkFileChooser
|
||||
- Fix paned behavior
|
||||
- Fix a crash
|
||||
|
||||
* GtkText
|
||||
- Fix various problems with undo
|
||||
|
||||
* Accessibility
|
||||
- Allow setting accessible parents and siblings
|
||||
- Add a role for toggle buttons
|
||||
- Miscellaneous property fixes and improvements
|
||||
|
||||
* gtk
|
||||
- Improve the handling resize-during-size-allocate
|
||||
|
||||
* gdk
|
||||
- Introduce GdkTextureDownloader and use it
|
||||
- Make gdk_texture_get_format public
|
||||
|
||||
* gsk
|
||||
- Make mask nodes more versatile
|
||||
|
||||
* X11
|
||||
- Fix key handling during DND
|
||||
|
||||
* Tools
|
||||
- gtk-builder-tool: Try harder to handle templates
|
||||
- gtk-builder-tool: Prefer properties over <child>
|
||||
|
||||
* Translation updates
|
||||
Basque
|
||||
Belarusian
|
||||
Bulgarian
|
||||
Indonesian
|
||||
Galician
|
||||
Georgian
|
||||
German
|
||||
Hebrew
|
||||
Lithuanian
|
||||
Portuguese
|
||||
Spanish
|
||||
Swedish
|
||||
Turkish
|
||||
Ukrainian
|
||||
|
||||
Overview of Changes in 4.9.5, xx-xx-xxxx
|
||||
========================================
|
||||
|
||||
Overview of Changes in 4.9.4, 12-02-2023
|
||||
========================================
|
||||
|
||||
@@ -13,13 +13,20 @@
|
||||
static GtkWidget *app_picker;
|
||||
|
||||
static void
|
||||
set_file (GFile *file,
|
||||
gpointer data)
|
||||
file_opened (GObject *source,
|
||||
GAsyncResult *result,
|
||||
void *data)
|
||||
{
|
||||
GFile *file;
|
||||
GError *error = NULL;
|
||||
char *name;
|
||||
|
||||
file = gtk_file_dialog_open_finish (GTK_FILE_DIALOG (source), result, &error);
|
||||
|
||||
if (!file)
|
||||
{
|
||||
g_print ("%s\n", error->message);
|
||||
g_error_free (error);
|
||||
gtk_widget_set_sensitive (app_picker, FALSE);
|
||||
g_object_set_data (G_OBJECT (app_picker), "file", NULL);
|
||||
return;
|
||||
@@ -33,25 +40,6 @@ set_file (GFile *file,
|
||||
g_object_set_data_full (G_OBJECT (app_picker), "file", g_object_ref (file), g_object_unref);
|
||||
}
|
||||
|
||||
static void
|
||||
file_opened (GObject *source,
|
||||
GAsyncResult *result,
|
||||
void *data)
|
||||
{
|
||||
GFile *file;
|
||||
GError *error = NULL;
|
||||
|
||||
file = gtk_file_dialog_open_finish (GTK_FILE_DIALOG (source), result, &error);
|
||||
|
||||
if (!file)
|
||||
{
|
||||
g_print ("%s\n", error->message);
|
||||
g_error_free (error);
|
||||
}
|
||||
|
||||
set_file (file, data);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
abort_mission (gpointer data)
|
||||
{
|
||||
@@ -142,28 +130,11 @@ launch_uri (GtkButton *picker)
|
||||
g_object_unref (launcher);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
on_drop (GtkDropTarget *target,
|
||||
const GValue *value,
|
||||
double x,
|
||||
double y,
|
||||
gpointer data)
|
||||
{
|
||||
if (G_VALUE_HOLDS (value, G_TYPE_FILE))
|
||||
{
|
||||
set_file (g_value_get_object (value), data);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
do_pickers (GtkWidget *do_widget)
|
||||
{
|
||||
static GtkWidget *window = NULL;
|
||||
GtkWidget *table, *label, *picker, *button;
|
||||
GtkDropTarget *drop_target;
|
||||
|
||||
if (!window)
|
||||
{
|
||||
@@ -208,13 +179,7 @@ do_pickers (GtkWidget *do_widget)
|
||||
|
||||
picker = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
|
||||
button = gtk_button_new_from_icon_name ("document-open-symbolic");
|
||||
|
||||
label = gtk_label_new ("None");
|
||||
|
||||
drop_target = gtk_drop_target_new (G_TYPE_FILE, GDK_ACTION_COPY);
|
||||
g_signal_connect (drop_target, "drop", G_CALLBACK (on_drop), label);
|
||||
gtk_widget_add_controller (button, GTK_EVENT_CONTROLLER (drop_target));
|
||||
|
||||
gtk_label_set_xalign (GTK_LABEL (label), 0.);
|
||||
gtk_label_set_ellipsize (GTK_LABEL (label), PANGO_ELLIPSIZE_MIDDLE);
|
||||
gtk_widget_set_hexpand (label, TRUE);
|
||||
|
||||
@@ -22,7 +22,6 @@ show_shortcuts (GtkWidget *window,
|
||||
gtk_window_set_transient_for (GTK_WINDOW (overlay), GTK_WINDOW (window));
|
||||
g_object_set (overlay, "view-name", view, NULL);
|
||||
g_object_unref (builder);
|
||||
gtk_window_present (GTK_WINDOW (overlay));
|
||||
}
|
||||
|
||||
G_MODULE_EXPORT void
|
||||
|
||||
@@ -584,6 +584,8 @@ gdk_frame_clock_paint_idle (void *data)
|
||||
{
|
||||
priv->requested &= ~GDK_FRAME_CLOCK_PHASE_LAYOUT;
|
||||
_gdk_frame_clock_emit_layout (clock);
|
||||
if (priv->requested & GDK_FRAME_CLOCK_PHASE_LAYOUT)
|
||||
g_print ("looping in layout %d\n", iter);
|
||||
}
|
||||
if (iter == 5)
|
||||
g_warning ("gdk-frame-clock: layout continuously requested, giving up after 4 tries");
|
||||
@@ -809,3 +811,12 @@ _gdk_frame_clock_idle_new (void)
|
||||
|
||||
return GDK_FRAME_CLOCK (clock);
|
||||
}
|
||||
|
||||
GdkFrameClockPhase
|
||||
gdk_frame_clock_get_current_phase (GdkFrameClock *clock)
|
||||
{
|
||||
GdkFrameClockIdle *clock_idle = GDK_FRAME_CLOCK_IDLE (clock);
|
||||
GdkFrameClockIdlePrivate *priv = clock_idle->priv;
|
||||
|
||||
return priv->phase;
|
||||
}
|
||||
|
||||
@@ -127,6 +127,8 @@ void _gdk_frame_clock_emit_paint (GdkFrameClock *frame_clock);
|
||||
void _gdk_frame_clock_emit_after_paint (GdkFrameClock *frame_clock);
|
||||
void _gdk_frame_clock_emit_resume_events (GdkFrameClock *frame_clock);
|
||||
|
||||
GdkFrameClockPhase gdk_frame_clock_get_current_phase (GdkFrameClock *frame_clock);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_FRAME_CLOCK_PRIVATE_H__ */
|
||||
|
||||
@@ -246,7 +246,7 @@ collect_states (GtkAtSpiContext *self,
|
||||
case GTK_ACCESSIBLE_INVALID_TRUE:
|
||||
case GTK_ACCESSIBLE_INVALID_GRAMMAR:
|
||||
case GTK_ACCESSIBLE_INVALID_SPELLING:
|
||||
set_atspi_state (&states, ATSPI_STATE_INVALID_ENTRY);
|
||||
set_atspi_state (&states, ATSPI_STATE_INVALID);
|
||||
break;
|
||||
case GTK_ACCESSIBLE_INVALID_FALSE:
|
||||
default:
|
||||
@@ -282,34 +282,6 @@ collect_states (GtkAtSpiContext *self,
|
||||
}
|
||||
}
|
||||
|
||||
if (gtk_at_context_has_accessible_property (ctx, GTK_ACCESSIBLE_PROPERTY_REQUIRED))
|
||||
{
|
||||
value = gtk_at_context_get_accessible_property (ctx, GTK_ACCESSIBLE_PROPERTY_REQUIRED);
|
||||
if (gtk_boolean_accessible_value_get (value))
|
||||
set_atspi_state (&states, ATSPI_STATE_REQUIRED);
|
||||
}
|
||||
|
||||
if (gtk_at_context_has_accessible_property (ctx, GTK_ACCESSIBLE_PROPERTY_MULTI_SELECTABLE))
|
||||
{
|
||||
value = gtk_at_context_get_accessible_property (ctx, GTK_ACCESSIBLE_PROPERTY_MULTI_SELECTABLE);
|
||||
if (gtk_boolean_accessible_value_get (value))
|
||||
set_atspi_state (&states, ATSPI_STATE_MULTISELECTABLE);
|
||||
}
|
||||
|
||||
if (gtk_at_context_has_accessible_property (ctx, GTK_ACCESSIBLE_PROPERTY_HAS_POPUP))
|
||||
{
|
||||
value = gtk_at_context_get_accessible_property (ctx, GTK_ACCESSIBLE_PROPERTY_HAS_POPUP);
|
||||
if (gtk_boolean_accessible_value_get (value))
|
||||
set_atspi_state (&states, ATSPI_STATE_HAS_POPUP);
|
||||
}
|
||||
|
||||
if (gtk_at_context_has_accessible_property (ctx, GTK_ACCESSIBLE_PROPERTY_AUTOCOMPLETE))
|
||||
{
|
||||
value = gtk_at_context_get_accessible_property (ctx, GTK_ACCESSIBLE_PROPERTY_AUTOCOMPLETE);
|
||||
if (gtk_autocomplete_accessible_value_get (value) != GTK_ACCESSIBLE_AUTOCOMPLETE_NONE)
|
||||
set_atspi_state (&states, ATSPI_STATE_SUPPORTS_AUTOCOMPLETION);
|
||||
}
|
||||
|
||||
g_variant_builder_add (builder, "u", (guint32) (states & 0xffffffff));
|
||||
g_variant_builder_add (builder, "u", (guint32) (states >> 32));
|
||||
}
|
||||
|
||||
@@ -273,8 +273,6 @@ gtk_accessible_role_to_atspi_role (GtkAccessibleRole role)
|
||||
case GTK_ACCESSIBLE_ROLE_WINDOW:
|
||||
return ATSPI_ROLE_FRAME;
|
||||
|
||||
case GTK_ACCESSIBLE_ROLE_TOGGLE_BUTTON:
|
||||
return ATSPI_ROLE_TOGGLE_BUTTON;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
+4
-1
@@ -19,7 +19,7 @@
|
||||
* Modified by the GTK+ Team and others 1997-2001. 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/.
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -63,6 +63,7 @@
|
||||
|
||||
#include "gtkactionhelperprivate.h"
|
||||
#include "gtkbuildable.h"
|
||||
#include "gtkcheckbutton.h"
|
||||
#include "gtkgestureclick.h"
|
||||
#include "gtkeventcontrollerkey.h"
|
||||
#include "gtkbinlayout.h"
|
||||
@@ -828,6 +829,8 @@ gtk_button_set_label (GtkButton *button,
|
||||
gtk_label_set_use_underline (GTK_LABEL (child), priv->use_underline);
|
||||
gtk_label_set_mnemonic_widget (GTK_LABEL (child), GTK_WIDGET (button));
|
||||
}
|
||||
if (GTK_IS_CHECK_BUTTON (button))
|
||||
gtk_label_set_xalign (GTK_LABEL (child), 0.0);
|
||||
|
||||
gtk_button_set_child (button, child);
|
||||
}
|
||||
|
||||
+1
-5
@@ -1306,9 +1306,6 @@ typedef enum {
|
||||
* @GTK_ACCESSIBLE_ROLE_WIDGET: An interactive component of a graphical user
|
||||
* interface. This is the role that GTK uses by default for widgets.
|
||||
* @GTK_ACCESSIBLE_ROLE_WINDOW: An application window.
|
||||
* @GTK_ACCESSIBLE_ROLE_TOGGLE_BUTTON: A type of push button
|
||||
* which stays pressed until depressed by a second activation.
|
||||
* Since: 4.10
|
||||
*
|
||||
* The accessible role for a [iface@Accessible] implementation.
|
||||
*
|
||||
@@ -1393,8 +1390,7 @@ typedef enum {
|
||||
GTK_ACCESSIBLE_ROLE_TREE_GRID,
|
||||
GTK_ACCESSIBLE_ROLE_TREE_ITEM,
|
||||
GTK_ACCESSIBLE_ROLE_WIDGET,
|
||||
GTK_ACCESSIBLE_ROLE_WINDOW,
|
||||
GTK_ACCESSIBLE_ROLE_TOGGLE_BUTTON
|
||||
GTK_ACCESSIBLE_ROLE_WINDOW
|
||||
} GtkAccessibleRole;
|
||||
|
||||
/**
|
||||
|
||||
@@ -31,10 +31,6 @@
|
||||
#include "gtkselectionmodel.h"
|
||||
#include "gtkfilechooserutils.h"
|
||||
#include "gtkfilechooserwidgetprivate.h"
|
||||
#include "gtklistitem.h"
|
||||
#include "gtklistitemwidgetprivate.h"
|
||||
#include "gtkcolumnviewcellprivate.h"
|
||||
#include "deprecated/gtkfilechooser.h"
|
||||
|
||||
struct _GtkFileChooserCell
|
||||
{
|
||||
@@ -201,48 +197,6 @@ gtk_file_chooser_cell_dispose (GObject *object)
|
||||
G_OBJECT_CLASS (gtk_file_chooser_cell_parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
static void
|
||||
update_selectable (GtkFileChooserCell *self)
|
||||
{
|
||||
GtkWidget *ancestor;
|
||||
GtkListItem *item = NULL;
|
||||
GtkListItem *item2 = NULL;
|
||||
gboolean selectable = TRUE;
|
||||
|
||||
if (!self->item)
|
||||
return;
|
||||
|
||||
ancestor = gtk_widget_get_ancestor (GTK_WIDGET (self), GTK_TYPE_FILE_CHOOSER);
|
||||
if (!ancestor)
|
||||
return;
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
if (gtk_file_chooser_get_action (GTK_FILE_CHOOSER (ancestor)) == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER)
|
||||
selectable = g_file_info_get_file_type (self->item) == G_FILE_TYPE_DIRECTORY;
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
|
||||
ancestor = gtk_widget_get_ancestor (GTK_WIDGET (self), GTK_TYPE_LIST_ITEM_WIDGET);
|
||||
if (ancestor)
|
||||
item = gtk_list_item_widget_get_list_item (GTK_LIST_ITEM_WIDGET (ancestor));
|
||||
|
||||
if (GTK_IS_COLUMN_VIEW_CELL (ancestor))
|
||||
{
|
||||
ancestor = gtk_widget_get_ancestor (gtk_widget_get_parent (GTK_WIDGET (ancestor)), GTK_TYPE_LIST_ITEM_WIDGET);
|
||||
if (ancestor)
|
||||
item2 = gtk_list_item_widget_get_list_item (GTK_LIST_ITEM_WIDGET (ancestor));
|
||||
}
|
||||
|
||||
if (item)
|
||||
gtk_list_item_set_selectable (item, selectable);
|
||||
if (item2)
|
||||
gtk_list_item_set_selectable (item2, selectable);
|
||||
|
||||
if (selectable)
|
||||
gtk_widget_remove_css_class (GTK_WIDGET (self), "dim-label");
|
||||
else
|
||||
gtk_widget_add_css_class (GTK_WIDGET (self), "dim-label");
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_file_chooser_cell_set_property (GObject *object,
|
||||
guint prop_id,
|
||||
@@ -263,7 +217,6 @@ gtk_file_chooser_cell_set_property (GObject *object,
|
||||
|
||||
case PROP_ITEM:
|
||||
self->item = g_value_get_object (value);
|
||||
update_selectable (self);
|
||||
break;
|
||||
|
||||
case PROP_SHOW_TIME:
|
||||
@@ -308,15 +261,6 @@ gtk_file_chooser_cell_get_property (GObject *object,
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_file_chooser_cell_root (GtkWidget *widget)
|
||||
{
|
||||
GtkFileChooserCell *self = GTK_FILE_CHOOSER_CELL (widget);
|
||||
|
||||
GTK_WIDGET_CLASS (gtk_file_chooser_cell_parent_class)->root (widget);
|
||||
|
||||
update_selectable (self);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_file_chooser_cell_class_init (GtkFileChooserCellClass *klass)
|
||||
@@ -328,8 +272,6 @@ gtk_file_chooser_cell_class_init (GtkFileChooserCellClass *klass)
|
||||
object_class->set_property = gtk_file_chooser_cell_set_property;
|
||||
object_class->get_property = gtk_file_chooser_cell_get_property;
|
||||
|
||||
widget_class->root = gtk_file_chooser_cell_root;
|
||||
|
||||
g_object_class_install_property (object_class, PROP_POSITION,
|
||||
g_param_spec_uint ("position", NULL, NULL,
|
||||
0, G_MAXUINT, 0,
|
||||
|
||||
@@ -459,7 +459,7 @@ remove_file (GtkFileSystemModel *model,
|
||||
g_return_if_fail (G_IS_FILE (file));
|
||||
|
||||
id = node_get_for_file (model, file);
|
||||
if (id == GTK_INVALID_LIST_POSITION)
|
||||
if (id == 0)
|
||||
return;
|
||||
|
||||
node = get_node (model, id);
|
||||
|
||||
+3
-5
@@ -4033,6 +4033,9 @@ gtk_notebook_insert_notebook_page (GtkNotebook *notebook,
|
||||
g_signal_connect (controller, "enter", G_CALLBACK (gtk_notebook_tab_drop_enter), page);
|
||||
g_signal_connect (controller, "leave", G_CALLBACK (gtk_notebook_tab_drop_leave), page);
|
||||
gtk_widget_add_controller (page->tab_widget, controller);
|
||||
gtk_accessible_update_property (GTK_ACCESSIBLE (page->tab_widget),
|
||||
GTK_ACCESSIBLE_PROPERTY_LABEL, _("Tab"),
|
||||
-1);
|
||||
|
||||
page->expand = FALSE;
|
||||
page->fill = TRUE;
|
||||
@@ -4332,11 +4335,6 @@ gtk_notebook_update_labels (GtkNotebook *notebook)
|
||||
text = page->tab_text;
|
||||
else
|
||||
text = string;
|
||||
|
||||
gtk_accessible_update_property (GTK_ACCESSIBLE (page->tab_widget),
|
||||
GTK_ACCESSIBLE_PROPERTY_LABEL, text,
|
||||
-1);
|
||||
|
||||
if (notebook->show_tabs)
|
||||
{
|
||||
if (page->default_tab)
|
||||
|
||||
+7
-44
@@ -247,7 +247,6 @@ struct _GtkTextPrivate
|
||||
guint populate_all : 1;
|
||||
guint propagate_text_width : 1;
|
||||
guint text_handles_enabled : 1;
|
||||
guint enable_undo : 1;
|
||||
};
|
||||
|
||||
struct _GtkTextPasswordHint
|
||||
@@ -398,9 +397,6 @@ static void gtk_text_set_max_width_chars (GtkText *self,
|
||||
static void gtk_text_set_alignment (GtkText *self,
|
||||
float xalign);
|
||||
|
||||
static void gtk_text_set_enable_undo (GtkText *self,
|
||||
gboolean enable_undo);
|
||||
|
||||
/* Default signal handlers
|
||||
*/
|
||||
static GMenuModel *gtk_text_get_menu_model (GtkText *self);
|
||||
@@ -565,7 +561,6 @@ static void begin_change (GtkText *self);
|
||||
static void end_change (GtkText *self);
|
||||
static void emit_changed (GtkText *self);
|
||||
|
||||
static void gtk_text_update_history (GtkText *self);
|
||||
static void gtk_text_update_clipboard_actions (GtkText *self);
|
||||
static void gtk_text_update_emoji_action (GtkText *self);
|
||||
static void gtk_text_update_handles (GtkText *self);
|
||||
@@ -1607,7 +1602,11 @@ gtk_text_set_property (GObject *object,
|
||||
break;
|
||||
|
||||
case NUM_PROPERTIES + GTK_EDITABLE_PROP_ENABLE_UNDO:
|
||||
gtk_text_set_enable_undo (self, g_value_get_boolean (value));
|
||||
if (g_value_get_boolean (value) != gtk_text_history_get_enabled (priv->history))
|
||||
{
|
||||
gtk_text_history_set_enabled (priv->history, g_value_get_boolean (value));
|
||||
g_object_notify_by_pspec (object, pspec);
|
||||
}
|
||||
break;
|
||||
|
||||
/* GtkText properties */
|
||||
@@ -1733,7 +1732,7 @@ gtk_text_get_property (GObject *object,
|
||||
break;
|
||||
|
||||
case NUM_PROPERTIES + GTK_EDITABLE_PROP_ENABLE_UNDO:
|
||||
g_value_set_boolean (value, priv->enable_undo);
|
||||
g_value_set_boolean (value, gtk_text_history_get_enabled (priv->history));
|
||||
break;
|
||||
|
||||
/* GtkText properties */
|
||||
@@ -1859,7 +1858,6 @@ gtk_text_init (GtkText *self)
|
||||
priv->cursor_alpha = 1.0;
|
||||
priv->invisible_char = 0;
|
||||
priv->history = gtk_text_history_new (&history_funcs, self);
|
||||
priv->enable_undo = TRUE;
|
||||
|
||||
gtk_text_history_set_max_undo_levels (priv->history, DEFAULT_MAX_UNDO);
|
||||
|
||||
@@ -3402,15 +3400,11 @@ gtk_text_insert_text (GtkText *self,
|
||||
* The incoming text may a password or other secret. We make sure
|
||||
* not to copy it into temporary buffers.
|
||||
*/
|
||||
if (priv->change_count == 0)
|
||||
gtk_text_history_begin_irreversible_action (priv->history);
|
||||
begin_change (self);
|
||||
|
||||
n_inserted = gtk_entry_buffer_insert_text (get_buffer (self), *position, text, n_chars);
|
||||
|
||||
end_change (self);
|
||||
if (priv->change_count == 0)
|
||||
gtk_text_history_end_irreversible_action (priv->history);
|
||||
|
||||
if (n_inserted != n_chars)
|
||||
gtk_widget_error_bell (GTK_WIDGET (self));
|
||||
@@ -3432,16 +3426,11 @@ gtk_text_delete_text (GtkText *self,
|
||||
if (start_pos == end_pos)
|
||||
return;
|
||||
|
||||
if (priv->change_count == 0)
|
||||
gtk_text_history_begin_irreversible_action (priv->history);
|
||||
begin_change (self);
|
||||
|
||||
gtk_entry_buffer_delete_text (get_buffer (self), start_pos, end_pos - start_pos);
|
||||
|
||||
end_change (self);
|
||||
if (priv->change_count == 0)
|
||||
gtk_text_history_end_irreversible_action (priv->history);
|
||||
|
||||
update_placeholder_visibility (self);
|
||||
if (priv->propagate_text_width)
|
||||
gtk_widget_queue_resize (GTK_WIDGET (self));
|
||||
@@ -5536,7 +5525,6 @@ gtk_text_set_editable (GtkText *self,
|
||||
gtk_event_controller_key_set_im_context (GTK_EVENT_CONTROLLER_KEY (priv->key_controller),
|
||||
is_editable ? priv->im_context : NULL);
|
||||
|
||||
gtk_text_update_history (self);
|
||||
gtk_text_update_clipboard_actions (self);
|
||||
gtk_text_update_emoji_action (self);
|
||||
|
||||
@@ -5617,7 +5605,7 @@ gtk_text_set_visibility (GtkText *self,
|
||||
gtk_text_recompute (self);
|
||||
|
||||
/* disable undo when invisible text is used */
|
||||
gtk_text_update_history (self);
|
||||
gtk_text_history_set_enabled (priv->history, visible);
|
||||
|
||||
gtk_text_update_clipboard_actions (self);
|
||||
}
|
||||
@@ -7296,28 +7284,3 @@ gtk_text_history_select_cb (gpointer funcs_data,
|
||||
selection_insert,
|
||||
selection_bound);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_text_set_enable_undo (GtkText *self,
|
||||
gboolean enable_undo)
|
||||
{
|
||||
GtkTextPrivate *priv = gtk_text_get_instance_private (self);
|
||||
|
||||
if (priv->enable_undo == enable_undo)
|
||||
return;
|
||||
|
||||
priv->enable_undo = enable_undo;
|
||||
gtk_text_update_history (self);
|
||||
g_object_notify (G_OBJECT (self), "enable-undo");
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_text_update_history (GtkText *self)
|
||||
{
|
||||
GtkTextPrivate *priv = gtk_text_get_instance_private (self);
|
||||
|
||||
gtk_text_history_set_enabled (priv->history,
|
||||
priv->enable_undo &&
|
||||
priv->visible &&
|
||||
priv->editable);
|
||||
}
|
||||
|
||||
+5
-4
@@ -4689,10 +4689,6 @@ gtk_text_view_size_allocate (GtkWidget *widget,
|
||||
}
|
||||
g_object_unref (layout);
|
||||
|
||||
/* The GTK resize loop processes all the pending exposes right
|
||||
* after doing the resize stuff, so the idle sizer won't have a
|
||||
* chance to run. So we do the work here.
|
||||
*/
|
||||
gtk_text_view_flush_first_validate (text_view);
|
||||
|
||||
chooser = g_object_get_data (G_OBJECT (text_view), "gtk-emoji-chooser");
|
||||
@@ -4876,6 +4872,8 @@ gtk_text_view_invalidate (GtkTextView *text_view)
|
||||
DV (g_print (G_STRLOC": adding incremental validate idle %d\n",
|
||||
priv->incremental_validate_idle));
|
||||
}
|
||||
|
||||
gtk_widget_queue_allocate (GTK_WIDGET (text_view));
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -5843,6 +5841,9 @@ gtk_text_view_paint (GtkWidget *widget,
|
||||
g_return_if_fail (priv->xoffset >= - priv->left_padding);
|
||||
g_return_if_fail (priv->yoffset >= - priv->top_margin);
|
||||
|
||||
if (priv->first_validate_idle != 0)
|
||||
g_critical ("textview: paint with unfinished validation\n");
|
||||
|
||||
while (priv->first_validate_idle != 0)
|
||||
{
|
||||
DV (g_print (G_STRLOC": first_validate_idle: %d\n",
|
||||
|
||||
@@ -67,10 +67,6 @@
|
||||
* `GtkToggleButton` has a single CSS node with name button. To differentiate
|
||||
* it from a plain `GtkButton`, it gets the `.toggle` style class.
|
||||
*
|
||||
* ## Accessibility
|
||||
*
|
||||
* `GtkToggleButton` uses the %GTK_ACCESSIBLE_ROLE_TOGGLE_BUTTON role.
|
||||
*
|
||||
* ## Creating two `GtkToggleButton` widgets.
|
||||
*
|
||||
* ```c
|
||||
@@ -315,8 +311,6 @@ gtk_toggle_button_class_init (GtkToggleButtonClass *class)
|
||||
G_TYPE_NONE, 0);
|
||||
|
||||
gtk_widget_class_set_css_name (widget_class, I_("button"));
|
||||
|
||||
gtk_widget_class_set_accessible_role (widget_class, GTK_ACCESSIBLE_ROLE_TOGGLE_BUTTON);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
+10
-2
@@ -75,6 +75,7 @@
|
||||
|
||||
#include "gdk/gdkeventsprivate.h"
|
||||
#include "gdk/gdkprofilerprivate.h"
|
||||
#include "gdk/gdkframeclockprivate.h"
|
||||
#include "gsk/gskdebugprivate.h"
|
||||
#include "gsk/gskrendererprivate.h"
|
||||
|
||||
@@ -4032,8 +4033,6 @@ gtk_widget_allocate (GtkWidget *widget,
|
||||
priv->height = adjusted.height;
|
||||
priv->baseline = baseline;
|
||||
|
||||
priv->alloc_needed_on_child = FALSE;
|
||||
|
||||
if (priv->layout_manager != NULL)
|
||||
{
|
||||
gtk_layout_manager_allocate (priv->layout_manager, widget,
|
||||
@@ -4061,6 +4060,7 @@ gtk_widget_allocate (GtkWidget *widget,
|
||||
|
||||
gtk_widget_ensure_resize (widget);
|
||||
priv->alloc_needed = FALSE;
|
||||
priv->alloc_needed_on_child = FALSE;
|
||||
|
||||
gtk_widget_update_paintables (widget);
|
||||
|
||||
@@ -10572,6 +10572,14 @@ static void
|
||||
gtk_widget_set_alloc_needed (GtkWidget *widget)
|
||||
{
|
||||
GtkWidgetPrivate *priv = gtk_widget_get_instance_private (widget);
|
||||
GdkFrameClock *frame_clock = gtk_widget_get_frame_clock (widget);
|
||||
|
||||
if (frame_clock != NULL &&
|
||||
gdk_frame_clock_get_current_phase (frame_clock) == GDK_FRAME_CLOCK_PHASE_PAINT)
|
||||
{
|
||||
g_warning ("%s %p set alloc-needed during PAINT\n",
|
||||
G_OBJECT_TYPE_NAME (widget), widget);
|
||||
}
|
||||
|
||||
priv->alloc_needed = TRUE;
|
||||
|
||||
|
||||
@@ -630,8 +630,6 @@ fill_icons (const char *path,
|
||||
const char *dir_entry;
|
||||
GDir *dir;
|
||||
|
||||
g_print ("fill icons from %s\n", path);
|
||||
|
||||
dir = g_dir_open (path, 0, NULL);
|
||||
if (!dir)
|
||||
return;
|
||||
@@ -660,7 +658,6 @@ init_icons (GtkInspectorVisual *vis)
|
||||
GList *list, *l;
|
||||
int i;
|
||||
GtkStringList *names;
|
||||
const char * const *dirs;
|
||||
|
||||
t = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
|
||||
|
||||
@@ -672,14 +669,6 @@ init_icons (GtkInspectorVisual *vis)
|
||||
fill_icons (path, t);
|
||||
g_free (path);
|
||||
|
||||
dirs = g_get_system_data_dirs ();
|
||||
for (i = 0; dirs[i]; i++)
|
||||
{
|
||||
path = g_build_filename (dirs[i], "icons", NULL);
|
||||
fill_icons (path, t);
|
||||
g_free (path);
|
||||
}
|
||||
|
||||
list = NULL;
|
||||
g_hash_table_iter_init (&iter, t);
|
||||
while (g_hash_table_iter_next (&iter, (gpointer *)&theme, NULL))
|
||||
@@ -734,7 +723,6 @@ init_cursors (GtkInspectorVisual *vis)
|
||||
GList *list, *l;
|
||||
GtkStringList *names;
|
||||
int i;
|
||||
const char * const *dirs;
|
||||
|
||||
t = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
|
||||
|
||||
@@ -746,14 +734,6 @@ init_cursors (GtkInspectorVisual *vis)
|
||||
fill_cursors (path, t);
|
||||
g_free (path);
|
||||
|
||||
dirs = g_get_system_data_dirs ();
|
||||
for (i = 0; dirs[i]; i++)
|
||||
{
|
||||
path = g_build_filename (dirs[i], "icons", NULL);
|
||||
fill_cursors (path, t);
|
||||
g_free (path);
|
||||
}
|
||||
|
||||
list = NULL;
|
||||
g_hash_table_iter_init (&iter, t);
|
||||
while (g_hash_table_iter_next (&iter, (gpointer *)&theme, NULL))
|
||||
|
||||
Reference in New Issue
Block a user