mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-13 14:00:09 +00:00
Merge branch 'deprecate-keys-changed' into 'main'
treeview: Drop a few unused variables See merge request GNOME/gtk!5314
This commit is contained in:
commit
146cf0bdd4
@ -4395,7 +4395,6 @@ gtk_tree_view_bin_snapshot (GtkWidget *widget,
|
||||
GList *first_column, *last_column;
|
||||
gboolean has_can_focus_cell;
|
||||
gboolean rtl;
|
||||
int n_visible_columns;
|
||||
int expander_size;
|
||||
gboolean draw_vgrid_lines, draw_hgrid_lines;
|
||||
GtkStyleContext *context;
|
||||
@ -4455,14 +4454,6 @@ gtk_tree_view_bin_snapshot (GtkWidget *widget,
|
||||
|| priv->grid_lines == GTK_TREE_VIEW_GRID_LINES_BOTH;
|
||||
expander_size = gtk_tree_view_get_expander_size (tree_view);
|
||||
|
||||
n_visible_columns = 0;
|
||||
for (list = priv->columns; list; list = list->next)
|
||||
{
|
||||
if (!gtk_tree_view_column_get_visible (GTK_TREE_VIEW_COLUMN (list->data)))
|
||||
continue;
|
||||
n_visible_columns ++;
|
||||
}
|
||||
|
||||
/* Find the last column */
|
||||
for (last_column = g_list_last (priv->columns);
|
||||
last_column &&
|
||||
@ -4487,7 +4478,6 @@ gtk_tree_view_bin_snapshot (GtkWidget *widget,
|
||||
do
|
||||
{
|
||||
gboolean is_separator = FALSE;
|
||||
int n_col = 0;
|
||||
|
||||
parity = !parity;
|
||||
is_separator = row_is_separator (tree_view, &iter, NULL);
|
||||
@ -4537,7 +4527,6 @@ gtk_tree_view_bin_snapshot (GtkWidget *widget,
|
||||
if (!gtk_tree_view_column_get_visible (column))
|
||||
continue;
|
||||
|
||||
n_col++;
|
||||
width = gtk_tree_view_column_get_width (column);
|
||||
|
||||
if (cell_offset > clip.x + clip.width ||
|
||||
@ -6098,7 +6087,6 @@ do_validate_rows (GtkTreeView *tree_view, gboolean queue_resize)
|
||||
GtkTreePath *path = NULL;
|
||||
GtkTreeIter iter;
|
||||
GTimer *timer;
|
||||
int i = 0;
|
||||
|
||||
int y = -1;
|
||||
int prev_height = -1;
|
||||
@ -6208,8 +6196,6 @@ do_validate_rows (GtkTreeView *tree_view, gboolean queue_resize)
|
||||
else if (prev_height != height)
|
||||
fixed_height = FALSE;
|
||||
}
|
||||
|
||||
i++;
|
||||
}
|
||||
while (g_timer_elapsed (timer, NULL) < GTK_TREE_VIEW_TIME_MS_PER_IDLE / 1000.);
|
||||
|
||||
|
@ -1428,11 +1428,9 @@ gtk_compose_table_foreach (const GtkComposeTable *table,
|
||||
{
|
||||
int index_stride = table->max_seq_len + 2;
|
||||
gunichar *sequence;
|
||||
int seqno;
|
||||
|
||||
sequence = g_newa (gunichar, table->max_seq_len + 1);
|
||||
|
||||
seqno = 0;
|
||||
for (int idx = 0; idx < table->n_index_size; idx++)
|
||||
{
|
||||
const guint16 *seq_index = table->data + (idx * index_stride);
|
||||
@ -1471,7 +1469,6 @@ gtk_compose_table_foreach (const GtkComposeTable *table,
|
||||
}
|
||||
|
||||
callback (sequence, len, value, data);
|
||||
seqno++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1094,11 +1094,14 @@ gtk_window_class_init (GtkWindowClass *klass)
|
||||
*
|
||||
* emitted when the set of accelerators or mnemonics that
|
||||
* are associated with @window changes.
|
||||
*
|
||||
* Deprecated: 4.10: Use [class@Gtk.Shortcut] and [class@Gtk.EventController]
|
||||
* to implement keyboard shortcuts
|
||||
*/
|
||||
window_signals[KEYS_CHANGED] =
|
||||
g_signal_new (I_("keys-changed"),
|
||||
G_TYPE_FROM_CLASS (gobject_class),
|
||||
G_SIGNAL_RUN_FIRST,
|
||||
G_SIGNAL_RUN_FIRST | G_SIGNAL_DEPRECATED,
|
||||
G_STRUCT_OFFSET (GtkWindowClass, keys_changed),
|
||||
NULL, NULL,
|
||||
NULL,
|
||||
|
@ -230,7 +230,6 @@ create_notebook_with_notebooks (const char **labels,
|
||||
GtkPositionType pos)
|
||||
{
|
||||
GtkWidget *notebook, *title, *page;
|
||||
int count = 0;
|
||||
|
||||
notebook = gtk_notebook_new ();
|
||||
g_signal_connect (notebook, "create-window",
|
||||
@ -251,7 +250,6 @@ create_notebook_with_notebooks (const char **labels,
|
||||
gtk_notebook_set_tab_reorderable (GTK_NOTEBOOK (notebook), page, TRUE);
|
||||
gtk_notebook_set_tab_detachable (GTK_NOTEBOOK (notebook), page, TRUE);
|
||||
|
||||
count++;
|
||||
labels++;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user