Commit c537b6d6 authored by William Jon McCann's avatar William Jon McCann Committed by William Jon McCann

Replace gnome.h with gtk.h and gi18n.h. Use gtk 2.5 about dialog and HIG

2005-01-07  William Jon McCann  <mccann@jhu.edu>

	* src/whois.c:
	* src/traceroute.c:
	* src/scan.c:
	* src/ping.c:
	* src/nettool.c:
	* src/netstat.c:
	* src/lookup.c:
	* src/info.c:
	* src/finger.c:
	* src/callbacks.c:
	* configure.in:
	Replace gnome.h with gtk.h and gi18n.h.  Use gtk 2.5 about dialog
	and HIG message dialog.

	* AUTHORS: Add all authors to sync with about box.
parent 984f1409
German Poo-Caaman~o <gpoo@ubiobio.cl>
William Jon McCann <mccann@jhu.edu>
Carlos Garcia Campos <carlosgc@gnome.org>
Rodrigo Moya <rodrigo@gnome-db.org>
2005-01-07 William Jon McCann <mccann@jhu.edu>
* src/whois.c:
* src/traceroute.c:
* src/scan.c:
* src/ping.c:
* src/nettool.c:
* src/netstat.c:
* src/lookup.c:
* src/info.c:
* src/finger.c:
* src/callbacks.c:
* configure.in:
Replace gnome.h with gtk.h and gi18n.h. Use gtk 2.5 about dialog
and HIG message dialog.
* AUTHORS: Add all authors to sync with about box.
2004-12-22 Rodrigo Moya <rodrigo@gnome-db.org>
Released 1.0.0.
......
......@@ -26,7 +26,7 @@ dnl ******************************************
LIBGNOMEUI_REQUIRED=2.0.0
LIBGNOME_REQUIRED=2.0.0
GTK_REQUIRED=2.4.0
GTK_REQUIRED=2.5.4
LIBGLADE_REQUIRED=2.0.0
GCONF_REQUIRED=1.1.11
......
......@@ -22,7 +22,8 @@
# include <config.h>
#endif
#include <gnome.h>
#include <gtk/gtk.h>
#include <glib/gi18n.h>
#include <glib/gprintf.h>
#include <sys/wait.h>
......@@ -299,8 +300,7 @@ gn_quit_app (GtkWidget * widget, gpointer data)
void
on_about_activate (GtkWidget *menu_item, gpointer data)
{
static GtkWidget *about_box = NULL;
GdkPixbuf *pixbuf = NULL;
GdkPixbuf *pixbuf = NULL;
const gchar *authors[] = {
"Germán Poo Caamaño <gpoo@ubiobio.cl>",
"William Jon McCann <mccann@jhu.edu>",
......@@ -309,51 +309,36 @@ on_about_activate (GtkWidget *menu_item, gpointer data)
};
const gchar *documentors[] = { NULL };
const gchar *translator_credits = _("translator_credits");
gchar copyright[1024];
GtkWindow *parent;
gchar copyright[1024];
GtkWindow *parent;
parent = (GtkWindow *) data;
g_sprintf (copyright, "Copyright \xc2\xa9 2003-2004 %s", "Germán Poo Caamaño");
if (about_box != NULL) {
gtk_window_present (GTK_WINDOW (about_box));
return;
}
{
gchar *filename = NULL;
filename = g_build_filename (PIXMAPS_DIR, "gnome-nettool.png", NULL);
if (filename != NULL) {
pixbuf = gdk_pixbuf_new_from_file (filename, NULL);
g_free (filename);
}
}
about_box = gnome_about_new (
"GNOME Network Tool",
VERSION,
copyright,
_("Graphical user interface for common network utilities"),
authors, documentors,
strcmp (translator_credits, "translator_credits") != 0 ? translator_credits : NULL,
pixbuf);
if (pixbuf != NULL)
g_object_unref (pixbuf);
gtk_window_set_transient_for (GTK_WINDOW (about_box), parent);
gtk_window_set_screen (GTK_WINDOW (about_box),
gtk_widget_get_screen (GTK_WIDGET (parent)));
g_signal_connect (G_OBJECT (about_box), "destroy",
G_CALLBACK (gtk_widget_destroyed),
&about_box);
gtk_widget_show (about_box);
gtk_show_about_dialog (parent,
"name", "Network Tools",
"logo", pixbuf,
"authors", authors,
"documenters", documentors,
"version", VERSION,
"copyright", copyright,
"comments", _("Graphical user interface for common network utilities"),
"translator-credits", strcmp (translator_credits, "translator_credits") != 0 ? translator_credits : NULL,
NULL);
if (pixbuf != NULL)
g_object_unref (pixbuf);
}
static Netinfo *
......
......@@ -18,7 +18,8 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <gnome.h>
#include <gtk/gtk.h>
#include <glib/gi18n.h>
#include "finger.h"
#include "utils.h"
......
......@@ -17,7 +17,8 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <gnome.h>
#include <gtk/gtk.h>
#include <glib/gi18n.h>
#include <glib/gprintf.h>
#ifdef HAVE_CONFIG_H
......
......@@ -18,7 +18,8 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <gnome.h>
#include <gtk/gtk.h>
#include <glib/gi18n.h>
#include <glib/gprintf.h>
#include "lookup.h"
......
......@@ -17,7 +17,8 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <gnome.h>
#include <gtk/gtk.h>
#include <glib/gi18n.h>
#include "netstat.h"
#include "utils.h"
......
......@@ -18,7 +18,8 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <gnome.h>
#include <gtk/gtk.h>
#include <glib/gi18n.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <signal.h>
......@@ -164,27 +165,21 @@ netinfo_error_message (Netinfo * netinfo,
const gchar * secondary)
{
GtkWidget *dialog;
gchar *message;
g_return_if_fail (primary != NULL);
if (secondary)
message = g_strdup_printf ("<b><big>%s</big></b>\n\n%s",
primary, secondary);
else
message = g_strdup_printf ("<b><big>%s</big></b>",
primary);
dialog = gtk_message_dialog_new_with_markup (GTK_WINDOW (netinfo->main_window),
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_ERROR,
GTK_BUTTONS_CLOSE,
message);
dialog = gtk_message_dialog_new (GTK_WINDOW (netinfo->main_window),
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_ERROR,
GTK_BUTTONS_CLOSE,
primary);
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
secondary ? secondary : " ");
gtk_container_set_border_width (GTK_CONTAINER (dialog), 6);
gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);
g_free (message);
}
gboolean
......@@ -279,11 +274,12 @@ netinfo_text_buffer_insert (Netinfo * netinfo)
netinfo->child_pid = child_pid;
netinfo->pipe_out = pout;
/*netinfo->pipe_err = perr; */
fcntl (pout, F_SETFL, O_NONBLOCK);
fcntl (pout, F_SETFL, O_NONBLOCK);
netinfo->command_output = NULL;
/*netinfo->pipe_err = perr; */
channel = g_io_channel_unix_new (pout);
g_io_add_watch (channel,
G_IO_IN | G_IO_HUP | G_IO_ERR | G_IO_NVAL,
......@@ -373,7 +369,7 @@ netinfo_io_text_buffer_dialog (GIOChannel * channel,
g_string_append_c (netinfo->command_output, buf[0]);
}
} else if (status == G_IO_STATUS_EOF) {
}
}
g_free (text);
......
......@@ -18,7 +18,8 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <gnome.h>
#include <gtk/gtk.h>
#include <glib/gi18n.h>
#include <glib/gprintf.h>
#include <sys/types.h>
#include <signal.h>
......
......@@ -19,7 +19,8 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <gnome.h>
#include <gtk/gtk.h>
#include <glib/gi18n.h>
#include <sys/types.h>
#include <signal.h>
#include <errno.h>
......
......@@ -17,7 +17,8 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <gnome.h>
#include <gtk/gtk.h>
#include <glib/gi18n.h>
#include <glib/gprintf.h>
#include "traceroute.h"
......
......@@ -18,7 +18,8 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <gnome.h>
#include <gtk/gtk.h>
#include <glib/gi18n.h>
#include "whois.h"
#include "utils.h"
......
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