Skip to content

Commit

Permalink
refactor: switch to gtk_window_present()
Browse files Browse the repository at this point in the history
Since `gtk_window_present_with_time()` is deprecated in gtk-4.14 and
we always pass `GDK_CURRENT_TIME` anyways, just make the switch now.
  • Loading branch information
andyholmes committed Apr 14, 2024
1 parent 9047ec4 commit 40260ef
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/libvalent/ui/valent-ui-manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ main_window_action (GSimpleAction *action,
G_ACTION_GROUP (application));
}

gtk_window_present_with_time (self->main_window, GDK_CURRENT_TIME);
gtk_window_present (self->main_window);
gtk_widget_activate_action_variant (GTK_WIDGET (self->main_window),
"win.page",
parameter);
Expand All @@ -83,7 +83,7 @@ input_remote_action (GSimpleAction *action,
(gpointer)&self->input_remote);
}

gtk_window_present_with_time (self->input_remote, GDK_CURRENT_TIME);
gtk_window_present (self->input_remote);
}

static void
Expand All @@ -104,7 +104,7 @@ media_remote_action (GSimpleAction *action,
(gpointer)&self->media_remote);
}

gtk_window_present_with_time (self->media_remote, GDK_CURRENT_TIME);
gtk_window_present (self->media_remote);
}

static const GActionEntry app_actions[] = {
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/findmyphone/valent-findmyphone-ringer.c
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ valent_findmyphone_ringer_show (ValentFindmyphoneRinger *ringer)
ringer->dialog);

/* Show the dialog */
gtk_window_present_with_time (ringer->dialog, GDK_CURRENT_TIME);
gtk_window_present (ringer->dialog);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/runcommand/valent-runcommand-preferences.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ runcommand_edit_action (GtkWidget *widget,
G_CALLBACK (on_command_changed),
self, 0);

gtk_window_present_with_time (self->editor, GDK_CURRENT_TIME);
gtk_window_present (self->editor);
}

static void
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/share/valent-share-plugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -1115,7 +1115,7 @@ valent_share_plugin_handle_text (ValentSharePlugin *self,
G_CONNECT_SWAPPED);
g_ptr_array_add (self->windows, window);

gtk_window_present_with_time (window, GDK_CURRENT_TIME);
gtk_window_present (window);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/plugins/sms/valent-sms-plugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ messaging_action (GSimpleAction *action,
self, 0);
}

gtk_window_present_with_time (GTK_WINDOW (self->window), GDK_CURRENT_TIME);
gtk_window_present (GTK_WINDOW (self->window));
}

static const GActionEntry actions[] = {
Expand Down

0 comments on commit 40260ef

Please sign in to comment.