mirror of
https://gitlab.gnome.org/GNOME/nautilus
synced 2024-06-30 23:46:35 +00:00
files-view: Stop getting active slot from the window
We can ask the slot directly whether it is the active one. This removes one NautilusWindow method call from inner widgets, which is a layer violation and gets in the way of reusing them for the upcoming FileChooser window. Part of: https://gitlab.gnome.org/GNOME/nautilus/-/work_items/3402
This commit is contained in:
parent
095f699da1
commit
c3d4cbdd0e
|
@ -9360,7 +9360,6 @@ on_parent_changed (GObject *object,
|
|||
gpointer user_data)
|
||||
{
|
||||
GtkWidget *widget;
|
||||
NautilusWindow *window;
|
||||
NautilusFilesView *view;
|
||||
NautilusFilesViewPrivate *priv;
|
||||
GtkWidget *parent;
|
||||
|
@ -9370,11 +9369,10 @@ on_parent_changed (GObject *object,
|
|||
priv = nautilus_files_view_get_instance_private (view);
|
||||
|
||||
parent = gtk_widget_get_parent (widget);
|
||||
window = nautilus_files_view_get_window (view);
|
||||
|
||||
if (parent != NULL)
|
||||
{
|
||||
if (priv->slot == nautilus_window_get_active_slot (window))
|
||||
if (nautilus_window_slot_get_active (priv->slot))
|
||||
{
|
||||
priv->active = TRUE;
|
||||
gtk_widget_insert_action_group (GTK_WIDGET (nautilus_files_view_get_window (view)),
|
||||
|
|
Loading…
Reference in New Issue
Block a user