diff options
| -rw-r--r-- | hardinfo2/callbacks.c | 3 | ||||
| -rw-r--r-- | hardinfo2/egg-markdown.c | 4 | ||||
| -rw-r--r-- | hardinfo2/markdown-text-view.c | 12 | ||||
| -rw-r--r-- | hardinfo2/markdown-text-view.h | 2 | ||||
| -rw-r--r-- | hardinfo2/remote.c | 13 | ||||
| -rw-r--r-- | hardinfo2/remote.h | 29 | ||||
| -rw-r--r-- | hardinfo2/ssh-conn.c | 5 | ||||
| -rw-r--r-- | hardinfo2/vendor.c | 2 | ||||
| -rw-r--r-- | hardinfo2/xmlrpc-server.c | 13 | 
9 files changed, 43 insertions, 40 deletions
| diff --git a/hardinfo2/callbacks.c b/hardinfo2/callbacks.c index e9669a26..021560e2 100644 --- a/hardinfo2/callbacks.c +++ b/hardinfo2/callbacks.c @@ -25,6 +25,7 @@  #include "shell.h"  #include "report.h" +#include "remote.h"  #include "syncmanager.h"  #include "help-viewer.h"  #include "xmlrpc-server.h" @@ -112,7 +113,7 @@ void cb_local_computer()      Shell *shell = shell_get_main_shell();      shell_status_update("Disconnecting..."); -    remote_disconnect_all(); +    remote_disconnect_all(TRUE);      shell_status_update("Unloading modules...");      module_unload_all(); diff --git a/hardinfo2/egg-markdown.c b/hardinfo2/egg-markdown.c index 7ef8bbfe..4056d4f9 100644 --- a/hardinfo2/egg-markdown.c +++ b/hardinfo2/egg-markdown.c @@ -347,7 +347,6 @@ egg_markdown_to_text_line_formatter_image (EggMarkdown *self, const gchar *line)  	gchar *end = NULL;  	gchar *copy = NULL;  	gchar *data = NULL; -	gchar *temp;  	/* find sections */  	copy = g_strdup (line); @@ -414,7 +413,6 @@ egg_markdown_to_text_line_formatter_link (EggMarkdown *self, const gchar *line)  	gchar *end = NULL;  	gchar *copy = NULL;  	gchar *data = NULL; -	gchar *temp;  	/* find sections */  	copy = g_strdup (line); @@ -455,7 +453,7 @@ egg_markdown_to_text_line_formatter_link (EggMarkdown *self, const gchar *line)  		/* not found, keep return as-is */  		data = g_strdup (line);  	} -out: +  	g_free (copy);  	return data;  } diff --git a/hardinfo2/markdown-text-view.c b/hardinfo2/markdown-text-view.c index 44a5998d..6bfcc131 100644 --- a/hardinfo2/markdown-text-view.c +++ b/hardinfo2/markdown-text-view.c @@ -22,6 +22,7 @@   * along with this program; if not, write to the Free Software   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.   */ +#include <stdlib.h>  #include <gdk/gdkkeysyms.h>  #include "markdown-text-view.h" @@ -29,8 +30,6 @@  static GdkCursor *hand_cursor = NULL; -static void markdown_textview_finalize(GObject * object); -  G_DEFINE_TYPE(MarkdownTextView, markdown_textview, GTK_TYPE_TEXT_VIEW);  enum { @@ -636,12 +635,3 @@ static void markdown_textview_init(MarkdownTextView * self)  		     G_CALLBACK(visibility_notify_event), NULL);  } -static void markdown_textview_finalize(GObject * object) -{ -    MarkdownTextView *self; - -    g_return_if_fail(IS_MARKDOWN_TEXTVIEW(object)); - -    self = MARKDOWN_TEXTVIEW(object); -    g_object_unref(self->markdown); -} diff --git a/hardinfo2/markdown-text-view.h b/hardinfo2/markdown-text-view.h index 36a81fb1..648ea39c 100644 --- a/hardinfo2/markdown-text-view.h +++ b/hardinfo2/markdown-text-view.h @@ -64,7 +64,7 @@ gboolean 	 markdown_textview_set_text(MarkdownTextView * textview,  void		 markdown_textview_clear(MarkdownTextView * textview);  void		 markdown_textview_set_image_directory(MarkdownTextView * self,                                                         const gchar * directory); - +GType		 markdown_textview_get_type();  G_END_DECLS  #endif				/* __MARKDOWN_TEXTVIEW_H__ */ diff --git a/hardinfo2/remote.c b/hardinfo2/remote.c index b2ac3617..5b30b030 100644 --- a/hardinfo2/remote.c +++ b/hardinfo2/remote.c @@ -25,6 +25,7 @@  #ifdef HAS_LIBSOUP  #include "shell.h" +#include "callbacks.h"  #include "iconcache.h"  #include "hardinfo.h"  #include "xmlrpc-client.h" @@ -211,7 +212,6 @@ static gchar *remote_module_entry_func()  static void remote_module_entry_scan_func(gboolean reload)  {      Shell *shell = shell_get_main_shell(); -    gchar *response;      if (reload) {  	xmlrpc_get_string(xmlrpc_server_uri, @@ -497,8 +497,6 @@ gboolean remote_connect_host(gchar * hostname)  	gtk_dialog_run(GTK_DIALOG(dialog));  	gtk_widget_destroy(dialog); - -	return;      } else {  	const gint port =  	    g_key_file_get_integer(shell->hosts, hostname, "port", NULL); @@ -575,7 +573,6 @@ void connect_dialog_show(GtkWidget * parent)  void host_manager_show(GtkWidget * parent)  { -    gboolean success;      HostManager *rd = host_manager_new(parent);      gtk_dialog_run(GTK_DIALOG(rd->dialog)); @@ -587,9 +584,9 @@ static void populate_store(HostManager * rd, GtkListStore * store)  {      Shell *shell;      GtkTreeIter iter; -    gchar *path;      gchar **hosts; -    gint i, no_groups; +    gint i; +    gsize no_groups;      gtk_list_store_clear(store);      shell = shell_get_main_shell(); @@ -724,9 +721,7 @@ static HostDialog *host_dialog_new(GtkWidget * parent,      GtkWidget *label9;      GtkWidget *txt_ssh_user;      GtkWidget *txt_ssh_password; -    GtkWidget *label6;      GtkWidget *label10; -    GtkWidget *label7;      GtkWidget *label5;      GtkWidget *dialog_action_area1;      GtkWidget *btn_cancel; @@ -1171,7 +1166,6 @@ static void host_manager_destroy(HostManager * rd)  static HostManager *host_manager_new(GtkWidget * parent)  {      HostManager *rd; -    gchar *path;      GtkWidget *dialog;      GtkWidget *dialog_vbox;      GtkWidget *scrolledwindow; @@ -1182,7 +1176,6 @@ static HostManager *host_manager_new(GtkWidget * parent)      GtkWidget *dialog_action_area;      GtkWidget *btn_cancel;      GtkWidget *btn_remove; -    GtkWidget *label;      GtkWidget *hbox;      GtkTreeSelection *sel;      GtkTreeViewColumn *column; diff --git a/hardinfo2/remote.h b/hardinfo2/remote.h new file mode 100644 index 00000000..6a988a3b --- /dev/null +++ b/hardinfo2/remote.h @@ -0,0 +1,29 @@ +/* + *    Remote Client + *    HardInfo - Displays System Information + *    Copyright (C) 2003-2009 Leandro A. F. Pereira <leandro@hardinfo.org> + * + *    This program is free software; you can redistribute it and/or modify + *    it under the terms of the GNU General Public License as published by + *    the Free Software Foundation, version 2. + * + *    This program is distributed in the hope that it will be useful, + *    but WITHOUT ANY WARRANTY; without even the implied warranty of + *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the + *    GNU General Public License for more details. + * + *    You should have received a copy of the GNU General Public License + *    along with this program; if not, write to the Free Software + *    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA + */ + +#ifndef __REMOTE_H__ +#define __REMOTE_H__ + +void remote_disconnect_all(gboolean ssh); +gboolean remote_connect_host(gchar * hostname); +void connect_dialog_show(GtkWidget * parent); +void host_manager_show(GtkWidget * parent); + +#endif	/* __REMOTE_H__ */ + diff --git a/hardinfo2/ssh-conn.c b/hardinfo2/ssh-conn.c index b14310c2..7f099d35 100644 --- a/hardinfo2/ssh-conn.c +++ b/hardinfo2/ssh-conn.c @@ -25,13 +25,16 @@  #include "config.h"  #ifdef HAS_LIBSOUP +#include <glib/gstdio.h> +#include <glib.h> +#include <unistd.h> +#include <sys/ioctl.h>  #include <sys/types.h>  #include <sys/stat.h>  #include <fcntl.h>  #include <stdio.h>  #include <string.h>  #include <errno.h> -#include <linux/termios.h>  #include <sys/types.h>  #include <sys/wait.h> diff --git a/hardinfo2/vendor.c b/hardinfo2/vendor.c index 1c5a6d2c..86dba97a 100644 --- a/hardinfo2/vendor.c +++ b/hardinfo2/vendor.c @@ -159,7 +159,6 @@ void vendor_init(void)  const gchar *vendor_get_name(const gchar * id)  {      GSList *vendor; -    int i;      if (!id) {        return NULL; @@ -179,7 +178,6 @@ const gchar *vendor_get_name(const gchar * id)  const gchar *vendor_get_url(const gchar * id)  {      GSList *vendor; -    int i;      if (!id) {        return NULL; diff --git a/hardinfo2/xmlrpc-server.c b/hardinfo2/xmlrpc-server.c index 439a7dc4..e953cfd1 100644 --- a/hardinfo2/xmlrpc-server.c +++ b/hardinfo2/xmlrpc-server.c @@ -323,7 +323,7 @@ static void method_entry_reload(SoupMessage * msg, GValueArray * params)  {      ShellModule *module;      GSList *modules; -    gchar *module_name, *field_name; +    gchar *module_name;      gint entry_number;      gboolean found = FALSE, answer = FALSE;      MethodParameter method_params[] = { @@ -502,7 +502,6 @@ static void method_get_about_info(SoupMessage * msg, GValueArray * params)      ShellModule *module;      GSList *modules;      gchar *module_name; -    gint entry_number;      gboolean found = FALSE;      GValueArray *out;      MethodParameter method_params[] = { @@ -539,11 +538,7 @@ static void method_get_about_info(SoupMessage * msg, GValueArray * params)  static void method_call_method(SoupMessage * msg, GValueArray * params)  { -    ShellModule *module; -    GSList *modules;      gchar *method_name, *answer = NULL; -    gint entry_number; -    gboolean found = FALSE;      MethodParameter method_params[] = {          { G_TYPE_STRING, &method_name },      }; @@ -563,11 +558,7 @@ static void method_call_method(SoupMessage * msg, GValueArray * params)  static void method_call_method_param(SoupMessage * msg,  				     GValueArray * params)  { -    ShellModule *module; -    GSList *modules;      gchar *method_name, *parameter, *answer = NULL; -    gint entry_number; -    gboolean found = FALSE;      MethodParameter method_params[] = {          { G_TYPE_STRING, &method_name },          { G_TYPE_STRING, ¶meter }, @@ -704,7 +695,7 @@ static void icon_server_callback(SoupServer * server,                                        "500 :(", 6);          } else {              gchar  *file, *icon; -            gint   size; +            gsize   size;              file = g_build_filename(params.path_data,                                      "pixmaps", | 
