update deprecated code

This commit is contained in:
2019-07-06 20:28:51 -04:00
parent d7cf388ece
commit 3b66f68b2c
38 changed files with 592 additions and 361 deletions

View File

@@ -31,8 +31,10 @@ namespace Pamac {
public override void startup () {
// i18n
Intl.textdomain ("pamac");
Intl.bindtextdomain(Constants.GETTEXT_PACKAGE, Path.build_filename(Constants.DATADIR,"locale"));
Intl.setlocale (LocaleCategory.ALL, "");
Intl.textdomain(Constants.GETTEXT_PACKAGE);
Intl.bind_textdomain_codeset(Constants.GETTEXT_PACKAGE, "utf-8" );
base.startup ();

View File

@@ -100,8 +100,11 @@ namespace Pamac {
Gtk.Label updated_label;
[GtkChild]
Gtk.Stack properties_stack;
#if DISABLE_AUR
#else
[GtkChild]
Gtk.StackSwitcher properties_stackswitcher;
#endif
[GtkChild]
Gtk.Grid deps_grid;
[GtkChild]
@@ -1525,7 +1528,7 @@ namespace Pamac {
}
}
}
right_click_menu.popup (null, null, null, event.button, event.time);
right_click_menu.popup_at_pointer (event);
return true;
}
}
@@ -1606,7 +1609,7 @@ namespace Pamac {
upgrade_item.sensitive = true;
}
}
right_click_menu.popup (null, null, null, event.button, event.time);
right_click_menu.popup_at_pointer (event);
return true;
}
}
@@ -1887,12 +1890,11 @@ namespace Pamac {
refresh_packages_list ();
}
void on_menu_button_toggled () {
#if ENABLE_HAMBURGER
void on_menu_button_toggled () {
preferences_button.sensitive = !(transaction_running || sysupgrade_running);
#endif
}
#endif
[GtkCallback]
void on_history_button_clicked () {
@@ -1902,7 +1904,7 @@ namespace Pamac {
}
var file = GLib.File.new_for_path ("/var/log/pacman.log");
if (!file.query_exists ()) {
GLib.stderr.printf ("File '%s' doesn't exist.\n", file.get_path ());
stderr.printf ("File '%s' doesn't exist.\n", file.get_path ());
} else {
StringBuilder text = new StringBuilder ();
try {
@@ -1916,7 +1918,7 @@ namespace Pamac {
text.prepend (line + "\n");
}
} catch (GLib.Error e) {
GLib.stderr.printf ("%s\n", e.message);
stderr.printf ("%s\n", e.message);
}
var history_dialog = new HistoryDialog (this);
history_dialog.textview.buffer.set_text (text.str, (int) text.len);

View File

@@ -4,7 +4,7 @@ cfg_pamac_manager.set('PKGDATADIR', join_paths(get_option('prefix'),get_option('
cfg_pamac_manager.set('GETTEXT_PACKAGE', 'pamac')
cfg_pamac_manager.set('RELEASE_NAME', 'pamac')
cfg_pamac_manager.set('PREFIX', get_option('prefix'))
cfg_pamac_manager.set('VERSION', '6.7.2')
cfg_pamac_manager.set('VERSION', '7.0.0')
cfg_pamac_manager.set('TESTSRCDIR', meson.source_root())
cfgfile_6 = configure_file(
@@ -22,9 +22,10 @@ pamac_manager_sources += ['history_dialog.vala']
pamac_manager_sources += ['manager.vala']
pamac_manager_sources += ['manager_window.vala']
pamac_manager_sources += [pamac_manager_gresource_xml_file_c]
pamac_manager_sources += [join_paths(meson.current_source_dir(),'../vapis/libalpm.vapi')]
pamac_manager_vala_args = ['--vapidir='+join_paths(meson.source_root(),'src/vapis')]
pamac_manager_vala_args += ['--gresources='+join_paths(meson.source_root(),'data/pamac.manager.gresource.xml')]
pamac_manager_dependencies = [pamacclassic_library]
pamac_manager_dependencies = [Pamac_library]
pamac_manager_c_args = []
if ENABLE_UPDATE_ICON
pamac_manager_vala_args += ['-D', 'ENABLE_UPDATE_ICON']