diff options
author | bigbear <ns@bigbear.dk> | 2024-02-08 03:00:44 +0100 |
---|---|---|
committer | bigbear <ns@bigbear.dk> | 2024-02-08 19:52:53 +0100 |
commit | c298027fefc0f5e85f82e486ee3c84aa8a8f9fe4 (patch) | |
tree | 626080c00df2c9c80575900171a83eb73b7c9c00 | |
parent | c7282f2d5e5952f5c76a5225072f6257bc0c5776 (diff) |
CLEANUP - remove old stuff
-rw-r--r-- | hardinfo2/util.c | 16 | ||||
-rw-r--r-- | includes/hardinfo.h | 1 | ||||
-rw-r--r-- | includes/uidefs.h | 6 | ||||
-rw-r--r-- | shell/callbacks.c | 4 | ||||
-rw-r--r-- | shell/shell.c | 6 | ||||
-rw-r--r-- | shell/syncmanager.c | 21 |
6 files changed, 6 insertions, 48 deletions
diff --git a/hardinfo2/util.c b/hardinfo2/util.c index d79b1385..5e3b00aa 100644 --- a/hardinfo2/util.c +++ b/hardinfo2/util.c @@ -388,7 +388,6 @@ void parameters_init(int *argc, char ***argv, ProgramParameters * param) static gboolean show_version = FALSE; static gboolean list_modules = FALSE; static gboolean autoload_deps = FALSE; - static gboolean run_xmlrpc_server = FALSE; static gboolean skip_benchmarks = FALSE; static gboolean quiet = FALSE; static gchar *report_format = NULL; @@ -396,7 +395,7 @@ void parameters_init(int *argc, char ***argv, ProgramParameters * param) static gchar *result_format = NULL; static gchar *bench_user_note = NULL; static gchar **use_modules = NULL; - static gint max_bench_results = 10; + static gint max_bench_results = 50; static GOptionEntry options[] = { { @@ -440,7 +439,8 @@ void parameters_init(int *argc, char ***argv, ProgramParameters * param) .short_name = 'n', .arg = G_OPTION_ARG_INT, .arg_data = &max_bench_results, - .description = N_("maximum number of benchmark results to include (-1 for no limit, default is 10)")}, + .description = N_("maximum number of benchmark results to include (-1 for no limit, default is 50)")}, +//#if NOT_DEFINED { .long_name = "list-modules", .short_name = 'l', @@ -459,14 +459,7 @@ void parameters_init(int *argc, char ***argv, ProgramParameters * param) .arg = G_OPTION_ARG_NONE, .arg_data = &autoload_deps, .description = N_("automatically load module dependencies")}, -#ifdef HAS_LIBSOUP - { - .long_name = "xmlrpc-server", - .short_name = 'x', - .arg = G_OPTION_ARG_NONE, - .arg_data = &run_xmlrpc_server, - .description = N_("run in XML-RPC server mode")}, -#endif /* HAS_LIBSOUP */ +//#endif { .long_name = "version", .short_name = 'v', @@ -513,7 +506,6 @@ void parameters_init(int *argc, char ***argv, ProgramParameters * param) param->result_format = result_format; param->max_bench_results = max_bench_results; param->autoload_deps = autoload_deps; - param->run_xmlrpc_server = run_xmlrpc_server; param->skip_benchmarks = skip_benchmarks; param->force_all_details = force_all_details; param->quiet = quiet; diff --git a/includes/hardinfo.h b/includes/hardinfo.h index ce3ff529..872a29fc 100644 --- a/includes/hardinfo.h +++ b/includes/hardinfo.h @@ -56,7 +56,6 @@ struct _ProgramParameters { gboolean gui_running; gboolean list_modules; gboolean autoload_deps; - gboolean run_xmlrpc_server; gboolean skip_benchmarks; gboolean quiet; diff --git a/includes/uidefs.h b/includes/uidefs.h index e838754a..c3042492 100644 --- a/includes/uidefs.h +++ b/includes/uidefs.h @@ -11,7 +11,6 @@ "<toolitem name=\"ReportBug\" action=\"ReportBugAction\" />" #endif /* !RELEASE */ -#ifdef HAS_LIBSOUP #define SYNC_MANAGER_MENU_ITEMS \ "<separator/>" \ "<menuitem name=\"SyncManager\" action=\"SyncManagerAction\" " \ @@ -20,11 +19,6 @@ #define SYNC_MANAGER_TOOL_ITEMS \ "<toolitem name=\"SyncManager\" action=\"SyncManagerAction\"/>" -#else /* !HAS_LIBSOUP */ -#define SYNC_MANAGER_MENU_ITEMS -#define SYNC_MANAGER_TOOL_ITEMS -#endif /* !HAS_LIBSOUP */ - char *uidefs_str = "<ui>" " <menubar>" diff --git a/shell/callbacks.c b/shell/callbacks.c index d2f4c0d9..af223e19 100644 --- a/shell/callbacks.c +++ b/shell/callbacks.c @@ -213,7 +213,7 @@ void cb_about() "DMI support based on code by Stewart Adam", "SCSI support based on code by Pascal F. Martin", "", - "Translated by:" + "Translated by:", "Alexander Münch", "micrococo", "yolanteng0", @@ -224,7 +224,7 @@ void cb_about() "Sabri Ünal", "yetist", "", - "Artwork by:" + "Artwork by:", "Jakub Szypulka", "Tango Project", "The GNOME Project", diff --git a/shell/shell.c b/shell/shell.c index 81f3e084..57e5598c 100644 --- a/shell/shell.c +++ b/shell/shell.c @@ -818,9 +818,7 @@ void shell_init(GSList * modules) shell->tree->modules = modules ? modules : modules_load_all(); -#ifdef HAS_LIBSOUP check_for_updates(); -#endif g_slist_foreach(shell->tree->modules, shell_add_modules_to_gui, shell->tree); gtk_tree_view_expand_all(GTK_TREE_VIEW(shell->tree->view)); @@ -839,11 +837,7 @@ void shell_init(GSList * modules) shell_action_set_active("SidePaneAction", TRUE); shell_action_set_active("ToolbarAction", TRUE); -#ifndef HAS_LIBSOUP - shell_action_set_enabled("SyncManagerAction", FALSE); -#else shell_action_set_enabled("SyncManagerAction", sync_manager_count_entries() > 0); -#endif /* Should select Computer Summary (note: not Computer/Summary) */ g_idle_add(select_first_tree_item, NULL); diff --git a/shell/syncmanager.c b/shell/syncmanager.c index e034909e..86ba80a3 100644 --- a/shell/syncmanager.c +++ b/shell/syncmanager.c @@ -21,7 +21,6 @@ #include "iconcache.h" #include "syncmanager.h" -#ifdef HAS_LIBSOUP #include <libsoup/soup.h> #include <stdarg.h> @@ -88,47 +87,30 @@ sync_dialog_netarea_start_actions(SyncDialog *sd, SyncNetAction *sna, gint n); if (!sna->error) { \ sna->error = g_error_new(err_quark, code, message, ##__VA_ARGS__); \ } -#endif /* HAS_LIBSOUP */ gint sync_manager_count_entries(void) { -#ifdef HAS_LIBSOUP return g_slist_length(entries); -#else - return 0; -#endif } void sync_manager_add_entry(SyncEntry *entry) { -#ifdef HAS_LIBSOUP DEBUG("registering syncmanager entry ''%s''", entry->name); entry->selected = TRUE; entries = g_slist_append(entries, entry); -#else - DEBUG("libsoup support is disabled."); -#endif /* HAS_LIBSOUP */ } void sync_manager_clear_entries(void) { -#ifdef HAS_LIBSOUP DEBUG("clearing syncmanager entries"); g_slist_free(entries); entries = NULL; -#else - DEBUG("libsoup support is disabled."); -#endif /* HAS_LIBSOUP */ } void sync_manager_show(GtkWidget *parent) { -#ifndef HAS_LIBSOUP - g_warning(_("HardInfo was compiled without libsoup support. (Network " - "Updater requires it.)")); -#else /* !HAS_LIBSOUP */ SyncDialog *sd = sync_dialog_new(parent); err_quark = g_quark_from_static_string("syncmanager"); @@ -146,10 +128,8 @@ void sync_manager_show(GtkWidget *parent) } sync_dialog_destroy(sd); -#endif /* HAS_LIBSOUP */ } -#ifdef HAS_LIBSOUP static gboolean _cancel_sync(GtkWidget *widget, gpointer data) { SyncDialog *sd = (SyncDialog *)data; @@ -706,4 +686,3 @@ void sync_manager_update_on_startup(void) g_idle_add(sync_one, action); } } -#endif /* HAS_LIBSOUP */ |