Resolve some deprecation warnings

This commit is contained in:
matthiakl 2021-07-09 14:25:05 +02:00
parent 10722140f3
commit b5a6f05654
8 changed files with 74 additions and 74 deletions

View File

@ -27,7 +27,7 @@ namespace Pamac {
class ChooseIgnorepkgsDialog : Gtk.Dialog { class ChooseIgnorepkgsDialog : Gtk.Dialog {
[GtkChild] [GtkChild]
public Gtk.TreeView treeview; public unowned Gtk.TreeView treeview;
public Gtk.ListStore pkgs_list; public Gtk.ListStore pkgs_list;

View File

@ -26,11 +26,11 @@ namespace Pamac {
class ProgressDialog : Gtk.ApplicationWindow { class ProgressDialog : Gtk.ApplicationWindow {
[GtkChild] [GtkChild]
public Gtk.Box box; public unowned Gtk.Box box;
[GtkChild] [GtkChild]
public Gtk.Button close_button; public unowned Gtk.Button close_button;
[GtkChild] [GtkChild]
public Gtk.Expander expander; public unowned Gtk.Expander expander;
public ProgressDialog () { public ProgressDialog () {
Object (); Object ();

View File

@ -26,7 +26,7 @@ namespace Pamac {
class HistoryDialog : Gtk.Dialog { class HistoryDialog : Gtk.Dialog {
[GtkChild] [GtkChild]
public Gtk.TextView textview; public unowned Gtk.TextView textview;
public HistoryDialog (Gtk.ApplicationWindow window) { public HistoryDialog (Gtk.ApplicationWindow window) {
int use_header_bar; int use_header_bar;

View File

@ -53,88 +53,88 @@ namespace Pamac {
// manager objects // manager objects
[GtkChild] [GtkChild]
public Gtk.Stack main_stack; public unowned Gtk.Stack main_stack;
[GtkChild] [GtkChild]
Gtk.Button button_back; unowned Gtk.Button button_back;
[GtkChild] [GtkChild]
Gtk.MenuButton button_menu; unowned Gtk.MenuButton button_menu;
#if ENABLE_HAMBURGER #if ENABLE_HAMBURGER
[GtkChild] [GtkChild]
Gtk.ModelButton preferences_button; unowned Gtk.ModelButton preferences_button;
#else #else
[GtkChild] [GtkChild]
Gtk.HeaderBar headerbar; unowned Gtk.HeaderBar headerbar;
#endif #endif
[GtkChild] [GtkChild]
Gtk.TreeView packages_treeview; unowned Gtk.TreeView packages_treeview;
[GtkChild] [GtkChild]
Gtk.TreeViewColumn packages_state_column; unowned Gtk.TreeViewColumn packages_state_column;
#if DISABLE_AUR #if DISABLE_AUR
[GtkChild] [GtkChild]
Gtk.ScrolledWindow aur_scrolledwindow; unowned Gtk.ScrolledWindow aur_scrolledwindow;
#else #else
[GtkChild] [GtkChild]
Gtk.TreeView aur_treeview; unowned Gtk.TreeView aur_treeview;
[GtkChild] [GtkChild]
Gtk.TreeViewColumn aur_state_column; unowned Gtk.TreeViewColumn aur_state_column;
#endif #endif
[GtkChild] [GtkChild]
public Gtk.Stack filters_stack; public unowned Gtk.Stack filters_stack;
[GtkChild] [GtkChild]
Gtk.StackSwitcher filters_stackswitcher; unowned Gtk.StackSwitcher filters_stackswitcher;
[GtkChild] [GtkChild]
Gtk.SearchEntry search_entry; unowned Gtk.SearchEntry search_entry;
[GtkChild] [GtkChild]
Gtk.TreeView search_treeview; unowned Gtk.TreeView search_treeview;
[GtkChild] [GtkChild]
Gtk.TreeView groups_treeview; unowned Gtk.TreeView groups_treeview;
[GtkChild] [GtkChild]
Gtk.TreeView states_treeview; unowned Gtk.TreeView states_treeview;
[GtkChild] [GtkChild]
Gtk.TreeView repos_treeview; unowned Gtk.TreeView repos_treeview;
[GtkChild] [GtkChild]
Gtk.Stack packages_stack; unowned Gtk.Stack packages_stack;
[GtkChild] [GtkChild]
Gtk.StackSwitcher packages_stackswitcher; unowned Gtk.StackSwitcher packages_stackswitcher;
[GtkChild] [GtkChild]
Gtk.Label updated_label; unowned Gtk.Label updated_label;
[GtkChild] [GtkChild]
Gtk.Stack properties_stack; unowned Gtk.Stack properties_stack;
#if DISABLE_AUR #if DISABLE_AUR
#else #else
[GtkChild] [GtkChild]
Gtk.StackSwitcher properties_stackswitcher; unowned Gtk.StackSwitcher properties_stackswitcher;
#endif #endif
[GtkChild] [GtkChild]
Gtk.Grid deps_grid; unowned Gtk.Grid deps_grid;
[GtkChild] [GtkChild]
Gtk.Grid details_grid; unowned Gtk.Grid details_grid;
[GtkChild] [GtkChild]
Gtk.ScrolledWindow files_scrolledwindow; unowned Gtk.ScrolledWindow files_scrolledwindow;
[GtkChild] [GtkChild]
Gtk.Label name_label; unowned Gtk.Label name_label;
[GtkChild] [GtkChild]
Gtk.Label desc_label; unowned Gtk.Label desc_label;
[GtkChild] [GtkChild]
Gtk.Label link_label; unowned Gtk.Label link_label;
[GtkChild] [GtkChild]
Gtk.Label licenses_label; unowned Gtk.Label licenses_label;
[GtkChild] [GtkChild]
Gtk.ToggleButton remove_togglebutton; unowned Gtk.ToggleButton remove_togglebutton;
[GtkChild] [GtkChild]
Gtk.ToggleButton reinstall_togglebutton; unowned Gtk.ToggleButton reinstall_togglebutton;
[GtkChild] [GtkChild]
Gtk.ToggleButton install_togglebutton; unowned Gtk.ToggleButton install_togglebutton;
[GtkChild] [GtkChild]
Gtk.TextView files_textview; unowned Gtk.TextView files_textview;
[GtkChild] [GtkChild]
Gtk.Box transaction_infobox; unowned Gtk.Box transaction_infobox;
[GtkChild] [GtkChild]
Gtk.Button details_button; unowned Gtk.Button details_button;
[GtkChild] [GtkChild]
Gtk.Button apply_button; unowned Gtk.Button apply_button;
[GtkChild] [GtkChild]
Gtk.Button cancel_button; unowned Gtk.Button cancel_button;
// menu // menu
Gtk.Menu right_click_menu; Gtk.Menu right_click_menu;

View File

@ -1939,8 +1939,8 @@ private int cb_fetch (void *ctx, string fileurl, string localpath, int force) {
// start from scratch only download if our local is out of date. // start from scratch only download if our local is out of date.
system_daemon.curl.setopt (Curl.Option.TIMECONDITION, Curl.TimeCond.IFMODSINCE); system_daemon.curl.setopt (Curl.Option.TIMECONDITION, Curl.TimeCond.IFMODSINCE);
FileInfo info = destfile.query_info ("time::modified", 0); FileInfo info = destfile.query_info ("time::modified", 0);
TimeVal time = info.get_modification_time (); DateTime time = info.get_modification_date_time ();
system_daemon.curl.setopt (Curl.Option.TIMEVALUE, time.tv_sec); system_daemon.curl.setopt (Curl.Option.TIMEVALUE, time.to_unix());
} else if (tempfile.query_exists ()) { } else if (tempfile.query_exists ()) {
// a previous partial download exists, resume from end of file. // a previous partial download exists, resume from end of file.
FileInfo info = tempfile.query_info ("standard::size", 0); FileInfo info = tempfile.query_info ("standard::size", 0);

View File

@ -24,60 +24,60 @@ namespace Pamac {
class PreferencesDialog : Gtk.Dialog { class PreferencesDialog : Gtk.Dialog {
[GtkChild] [GtkChild]
Gtk.Switch remove_unrequired_deps_button; unowned Gtk.Switch remove_unrequired_deps_button;
[GtkChild] [GtkChild]
Gtk.Switch update_files_db_button; unowned Gtk.Switch update_files_db_button;
[GtkChild] [GtkChild]
Gtk.Switch check_space_button; unowned Gtk.Switch check_space_button;
[GtkChild] [GtkChild]
Gtk.Switch check_updates_button; unowned Gtk.Switch check_updates_button;
[GtkChild] [GtkChild]
Gtk.Label refresh_period_label; unowned Gtk.Label refresh_period_label;
[GtkChild] [GtkChild]
Gtk.SpinButton refresh_period_spin_button; unowned Gtk.SpinButton refresh_period_spin_button;
[GtkChild] [GtkChild]
Gtk.CheckButton no_update_hide_icon_checkbutton; unowned Gtk.CheckButton no_update_hide_icon_checkbutton;
[GtkChild] [GtkChild]
Gtk.Box ignorepkgs_box; unowned Gtk.Box ignorepkgs_box;
[GtkChild] [GtkChild]
Gtk.TreeView ignorepkgs_treeview; unowned Gtk.TreeView ignorepkgs_treeview;
[GtkChild] [GtkChild]
Gtk.Box mirrors_config_box; unowned Gtk.Box mirrors_config_box;
[GtkChild] [GtkChild]
Gtk.ComboBoxText mirrors_country_comboboxtext; unowned Gtk.ComboBoxText mirrors_country_comboboxtext;
[GtkChild] [GtkChild]
Gtk.ComboBoxText mirrors_list_generation_method_comboboxtext; unowned Gtk.ComboBoxText mirrors_list_generation_method_comboboxtext;
[GtkChild] [GtkChild]
Gtk.Button generate_mirrors_list_button; unowned Gtk.Button generate_mirrors_list_button;
#if DISABLE_AUR #if DISABLE_AUR
[GtkChild] [GtkChild]
Gtk.Stack stack; unowned Gtk.Stack stack;
[GtkChild] [GtkChild]
Gtk.Box aur_config_box; unowned Gtk.Box aur_config_box;
#else #else
[GtkChild] [GtkChild]
Gtk.Switch enable_aur_button; unowned Gtk.Switch enable_aur_button;
[GtkChild] [GtkChild]
Gtk.CheckButton search_aur_checkbutton; unowned Gtk.CheckButton search_aur_checkbutton;
[GtkChild] [GtkChild]
Gtk.Label aur_build_dir_label; unowned Gtk.Label aur_build_dir_label;
[GtkChild] [GtkChild]
Gtk.FileChooserButton aur_build_dir_file_chooser; unowned Gtk.FileChooserButton aur_build_dir_file_chooser;
[GtkChild] [GtkChild]
Gtk.CheckButton check_aur_updates_checkbutton; unowned Gtk.CheckButton check_aur_updates_checkbutton;
#endif #endif
[GtkChild] [GtkChild]
Gtk.Label cache_keep_nb_label; unowned Gtk.Label cache_keep_nb_label;
[GtkChild] [GtkChild]
Gtk.SpinButton cache_keep_nb_spin_button; unowned Gtk.SpinButton cache_keep_nb_spin_button;
[GtkChild] [GtkChild]
Gtk.CheckButton cache_only_uninstalled_checkbutton; unowned Gtk.CheckButton cache_only_uninstalled_checkbutton;
[GtkChild] [GtkChild]
Gtk.ColorButton terminal_background; unowned Gtk.ColorButton terminal_background;
[GtkChild] [GtkChild]
Gtk.ColorButton terminal_foreground; unowned Gtk.ColorButton terminal_foreground;
[GtkChild] [GtkChild]
Gtk.FontButton terminal_font; unowned Gtk.FontButton terminal_font;
Gtk.ListStore ignorepkgs_liststore; Gtk.ListStore ignorepkgs_liststore;
Transaction transaction; Transaction transaction;

View File

@ -26,9 +26,9 @@ namespace Pamac {
public class ProgressBox : Gtk.Box { public class ProgressBox : Gtk.Box {
[GtkChild] [GtkChild]
public Gtk.ProgressBar progressbar; public unowned Gtk.ProgressBar progressbar;
[GtkChild] [GtkChild]
public Gtk.Label action_label; public unowned Gtk.Label action_label;
public ProgressBox () { public ProgressBox () {
Object (); Object ();

View File

@ -26,9 +26,9 @@ namespace Pamac {
class TransactionSumDialog : Gtk.Dialog { class TransactionSumDialog : Gtk.Dialog {
[GtkChild] [GtkChild]
public Gtk.Label top_label; public unowned Gtk.Label top_label;
[GtkChild] [GtkChild]
Gtk.TreeView treeview; unowned Gtk.TreeView treeview;
public Gtk.ListStore sum_list; public Gtk.ListStore sum_list;