Commit b4da8b74 authored by German Poo-Caaman~o's avatar German Poo-Caaman~o Committed by Germán Poó Caamaño

removed libgnome* depedencies. Applied Kristof Vansant's patches #38844

2005-03-22  German Poo-Caaman~o <gpoo@ubiobio.cl>

	* configure.in:
	* src/callbacks.c:
	* src/callbacks.h:
	* src/finger.h:
	* src/gn-combo-history.c:
	* src/gnome-nettool.glade:
	* src/info.h:
	* src/lookup.h:
	* src/main.c:
	* src/netstat.h:
	* src/nettool.h:
	* src/ping.h:
	* src/scan.h:
	* src/traceroute.h:
	* src/utils.c:
	* src/utils.h:
	* src/whois.h: removed libgnome* depedencies. Applied Kristof
	  Vansant's patches #38844 and #38893, from bug #167218.
parent 8369be39
2005-03-22 German Poo-Caaman~o <gpoo@ubiobio.cl>
* configure.in:
* src/callbacks.c:
* src/callbacks.h:
* src/finger.h:
* src/gn-combo-history.c:
* src/gnome-nettool.glade:
* src/info.h:
* src/lookup.h:
* src/main.c:
* src/netstat.h:
* src/nettool.h:
* src/ping.h:
* src/scan.h:
* src/traceroute.h:
* src/utils.c:
* src/utils.h:
* src/whois.h: removed libgnome* depedencies. Applied Kristof
Vansant's patches #38844 and #38893, from bug #167218.
2005-03-22 German Poo-Caaman~o <gpoo@ubiobio.cl>
Reverted patch #38884 from bugzilla (#167218), becuase
......
......@@ -24,15 +24,12 @@ dnl ******************************************
dnl ** pkg-config dependacy checks **
dnl ******************************************
LIBGNOMEUI_REQUIRED=2.0.0
LIBGNOME_REQUIRED=2.0.0
GTK_REQUIRED=2.5.4
LIBGLADE_REQUIRED=2.0.0
GCONF_REQUIRED=1.1.11
PKG_CHECK_MODULES(NETTOOL,
libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED
libgnome-2.0 >= $LIBGNOME_REQUIRED
gtk+-2.0 >= $GTK_REQUIRED
libglade-2.0 >= $LIBGLADE_REQUIRED
gconf-2.0 >= $GCONF_REQUIRED)
......
......@@ -379,11 +379,13 @@ get_netinfo_for_page (GtkNotebook * notebook, gint page_num)
}
void
on_copy_activate (GtkWidget * notebook, gpointer data)
on_copy_activate (GtkWidget *menu_item, gpointer data)
{
gint page;
Netinfo *netinfo;
GtkNotebook *notebook = (GtkNotebook *) data;
g_return_if_fail (GTK_IS_NOTEBOOK (notebook));
page = gtk_notebook_get_current_page (GTK_NOTEBOOK (notebook));
......@@ -398,10 +400,12 @@ on_copy_activate (GtkWidget * notebook, gpointer data)
}
void
on_clear_history_activate (GtkWidget *notebook, gpointer data)
on_clear_history_activate (GtkWidget *menu_item, gpointer data)
{
Netinfo *netinfo;
GtkNotebook *notebook = (GtkNotebook *) data;
g_return_if_fail (GTK_IS_NOTEBOOK (notebook));
/* Pages all share a history id for host entry except whois */
......
#include <gnome.h>
#include <glib.h>
#include <gtk/gtk.h>
typedef void* (* NetinfoActivateFn) (GtkWidget *widget, gpointer data);
void on_ping_activate (GtkWidget * editable, gpointer data);
......@@ -27,9 +27,9 @@ gboolean gn_quit_app (GtkWidget * widget, gpointer data);
void on_about_activate (GtkWidget *menu_item, gpointer data);
void on_copy_activate (GtkWidget * notebook, gpointer data);
void on_copy_activate (GtkWidget *menu_item, gpointer data);
void on_clear_history_activate (GtkWidget * notebook, gpointer data);
void on_clear_history_activate (GtkWidget *menu_item, gpointer data);
void on_page_switch (GtkNotebook * notebook,
GtkNotebookPage * page,
......
......@@ -17,7 +17,7 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <gnome.h>
#include <glib.h>
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
......
/* -*- Mode: C; indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8 -*- */
/*
* Copyright (C) 2004 by Carlos Garca Campos
* Copyright (C) 2004 by Carlos Garca Campos
*
* 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
......@@ -18,7 +18,6 @@
*/
#include <gtk/gtk.h>
#include <libgnome/gnome-program.h>
#include <gconf/gconf-client.h>
#include "gn-combo-history.h"
......@@ -240,7 +239,7 @@ gn_combo_history_gconf_load (GnComboHistory *history)
}
key = g_strconcat ("/apps/gnome-settings/",
gnome_program_get_app_id (gnome_program_get ()),
"gnome-nettool",
"/history-",
history->priv->id,
NULL);
......@@ -270,7 +269,7 @@ gn_combo_history_gconf_save (GnComboHistory *history)
g_return_if_fail (history->priv->id != NULL);
key = g_strconcat ("/apps/gnome-settings/",
gnome_program_get_app_id (gnome_program_get ()),
"gnome-nettool",
"/history-",
history->priv->id,
NULL);
......@@ -389,7 +388,7 @@ gn_combo_history_gconf_register_id (GnComboHistory *history)
history->priv->gconf_client = gconf_client_get_default ();
key = g_strconcat ("/apps/gnome-settings/",
gnome_program_get_app_id (gnome_program_get ()),
"gnome-nettool",
"/history-",
history->priv->id,
NULL);
......
This diff is collapsed.
......@@ -16,7 +16,7 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <gnome.h>
#include <glib.h>
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
......
......@@ -17,7 +17,7 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <gnome.h>
#include <glib.h>
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
......
......@@ -22,7 +22,7 @@
# include <config.h>
#endif
#include <gnome.h>
#include <glib/gi18n.h>
#include <glade/glade.h>
#include "callbacks.h"
......@@ -51,7 +51,7 @@ int
main (int argc, char *argv[])
{
GtkWidget *window;
GtkWidget *menu_about;
GtkWidget *menu_about, *menu_copy, *menu_clear_history;
GladeXML *xml;
GtkWidget *notebook;
const gchar *dialog = DATADIR "gnome-nettool.glade";
......@@ -73,33 +73,41 @@ main (int argc, char *argv[])
static gchar *lookup_input = NULL;
static gchar *finger_input = NULL;
static gchar *whois_input = NULL;
static const struct poptOption options[] = {
{ "info", 'i', POPT_ARG_STRING, &info_input, 0,
N_("Load information for a network device"),
N_("DEVICE") },
{ "ping", 'p', POPT_ARG_STRING, &ping_input, 0,
N_("Send a ping to a network address"),
N_("HOST") },
{ "netstat", 'n', POPT_ARG_STRING, &netstat_input, 0,
N_("Get netstat information. Valid options are: route, active, multicast."),
N_("COMMAND") },
{ "traceroute", 't', POPT_ARG_STRING, &traceroute_input, 0,
N_("Trace a route to a network address"),
N_("HOST") },
{ "port-scan", 's', POPT_ARG_STRING, &scan_input, 0,
N_("Port scan a network address"),
N_("HOST") },
{ "lookup", 'l', POPT_ARG_STRING, &lookup_input, 0,
N_("Look up a network address"),
N_("HOST") },
{ "finger", 'f', POPT_ARG_STRING, &finger_input, 0,
N_("Finger command to run"),
N_("USER") },
{ "whois", 'w', POPT_ARG_STRING, &whois_input, 0,
N_("Perform a whois lookup for a network domain"),
N_("DOMAIN") },
{ NULL, '\0', 0, NULL, 0 }
};
GOptionEntry options[] = {
{ "info", 'i', 0, G_OPTION_ARG_STRING, &info_input,
N_("Load information for a network device"),
N_("DEVICE") },
{ "ping", 'p', 0, G_OPTION_ARG_STRING, &ping_input,
N_("Send a ping to a network address"),
N_("HOST") },
{ "netstat", 'n', 0, G_OPTION_ARG_STRING, &netstat_input,
N_("Get netstat information. Valid options are: route, active, multicast."),
N_("COMMAND") },
{ "traceroute", 't', 0, G_OPTION_ARG_STRING, &traceroute_input,
N_("Trace a route to a network address"),
N_("HOST") },
{ "port-scan", 's', 0, G_OPTION_ARG_STRING, &scan_input,
N_("Port scan a network address"),
N_("HOST") },
{ "lookup", 'l', 0, G_OPTION_ARG_STRING, &lookup_input,
N_("Look up a network address"),
N_("HOST") },
{ "finger", 'f', 0, G_OPTION_ARG_STRING, &finger_input,
N_("Finger command to run"),
N_("USER") },
{ "whois", 'w', 0, G_OPTION_ARG_STRING, &whois_input,
N_("Perform a whois lookup for a network domain"),
N_("DOMAIN") },
{ NULL, '\0', 0, 0, NULL, NULL, NULL }
};
#ifdef ENABLE_NLS
bindtextdomain (GETTEXT_PACKAGE, GNOME_NETTOOL_LOCALEDIR);
......@@ -107,13 +115,7 @@ main (int argc, char *argv[])
textdomain (GETTEXT_PACKAGE);
#endif
gnome_program_init (PACKAGE, VERSION, LIBGNOMEUI_MODULE,
argc, argv,
GNOME_PARAM_HUMAN_READABLE_NAME,
_("Network Information"),
GNOME_PARAM_POPT_TABLE, options,
GNOME_PARAM_APP_DATADIR, DATADIR,
GNOME_PARAM_NONE);
gtk_init_with_args (&argc, &argv,NULL,options,NULL,NULL);
if (!g_file_test (dialog, G_FILE_TEST_EXISTS)) {
g_critical (_("The file %s doesn't exist, "
......@@ -134,12 +136,6 @@ main (int argc, char *argv[])
g_signal_connect (G_OBJECT (window), "delete-event",
G_CALLBACK (gn_quit_app), NULL);
menu_about = glade_xml_get_widget (xml, "m_about");
g_signal_connect (G_OBJECT (menu_about), "activate",
G_CALLBACK (on_about_activate),
(gpointer) window);
pinger = load_ping_widgets_from_xml (xml);
tracer = load_traceroute_widgets_from_xml (xml);
netstat = load_netstat_widgets_from_xml (xml);
......@@ -213,6 +209,28 @@ main (int argc, char *argv[])
g_object_set_data (G_OBJECT (notebook), "finger", finger);
g_object_set_data (G_OBJECT (notebook), "whois", whois);
menu_about = glade_xml_get_widget (xml, "m_about");
g_signal_connect (G_OBJECT (menu_about), "activate",
G_CALLBACK (on_about_activate),
(gpointer) window);
menu_copy = glade_xml_get_widget (xml, "m_copy");
g_signal_connect (G_OBJECT (menu_copy), "activate",
G_CALLBACK (on_copy_activate),
(gpointer) notebook);
menu_clear_history = glade_xml_get_widget (xml, "m_clear_history");
g_signal_connect (G_OBJECT (menu_clear_history), "activate",
G_CALLBACK (on_clear_history_activate),
(gpointer) notebook);
glade_xml_signal_autoconnect (xml);
g_object_unref (G_OBJECT (xml));
......
......@@ -16,7 +16,7 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <gnome.h>
#include <glib.h>
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
......
......@@ -17,7 +17,8 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <gnome.h>
#include <glib.h>
#include <gtk/gtk.h>
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
......
......@@ -16,7 +16,7 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <gnome.h>
#include <glib.h>
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
......
......@@ -16,7 +16,7 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <gnome.h>
#include <glib.h>
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
......
......@@ -16,7 +16,7 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <gnome.h>
#include <glib.h>
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
......
......@@ -24,9 +24,10 @@
on GNOME 2.0 */
#include "utils.h"
#include <glib/gi18n.h>
#if (GLIB_MINOR_VERSION < 2)
#include <glib.h>
#include <string.h>
gint
......
......@@ -23,7 +23,8 @@
/* This is a backport of g_sprintf to allow compile gnome-netinfo
on GNOME 2.0 */
#include <gnome.h>
#include <glib.h>
#include <gtk/gtk.h>
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
......
......@@ -17,7 +17,7 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <gnome.h>
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment