Browse Source

Resolve some deprecation warnings

pull/10/head
matthiakl 5 months ago
parent
commit
b5a6f05654
  1. 2
      src/choose_ignorepkgs_dialog.vala
  2. 6
      src/pamac-install/progress_dialog.vala
  3. 2
      src/pamac-manager/history_dialog.vala
  4. 74
      src/pamac-manager/manager_window.vala
  5. 4
      src/pamac-system-daemon/system_daemon.vala
  6. 52
      src/preferences_dialog.vala
  7. 4
      src/progress_box.vala
  8. 4
      src/transaction_sum_dialog.vala

2
src/choose_ignorepkgs_dialog.vala

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

6
src/pamac-install/progress_dialog.vala

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

2
src/pamac-manager/history_dialog.vala

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

74
src/pamac-manager/manager_window.vala

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

4
src/pamac-system-daemon/system_daemon.vala

@ -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.
system_daemon.curl.setopt (Curl.Option.TIMECONDITION, Curl.TimeCond.IFMODSINCE);
FileInfo info = destfile.query_info ("time::modified", 0);
TimeVal time = info.get_modification_time ();
system_daemon.curl.setopt (Curl.Option.TIMEVALUE, time.tv_sec);
DateTime time = info.get_modification_date_time ();
system_daemon.curl.setopt (Curl.Option.TIMEVALUE, time.to_unix());
} else if (tempfile.query_exists ()) {
// a previous partial download exists, resume from end of file.
FileInfo info = tempfile.query_info ("standard::size", 0);

52
src/preferences_dialog.vala

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

4
src/progress_box.vala

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

4
src/transaction_sum_dialog.vala

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

Loading…
Cancel
Save