Skip to content
Browse files

usbview 1.0

	- fixed problem for devices that grabed more than one interface, the
	  name of the device would show up repeated a bunch.  This was true
	  for a lot of audio and video devices.
	- Tweaked the configuration dialog a bit.
	- Tweaked the about dialog a bit.
	- Everything seems stable, so let's put a major number on this release.
	- added a pixmap hacked up from an image by M G Berberich
	  <berberic@fmi.uni-passau.de> to the about screen
	- cleaned up the spec file to hopefully build a bit better on
	  different versions of different distros.
  • Loading branch information...
1 parent 35903be commit 91a583002deda644b9188dbfd7d31191fc56db7d @gregkh committed Oct 22, 2007
Showing with 16,629 additions and 41 deletions.
  1. +1 −1 AUTHORS
  2. +12 −0 ChangeLog
  3. +6 −1 Makefile.am
  4. +3 −10 Makefile.in
  5. +1 −1 README
  6. +17 −5 about-dialog.c
  7. +1 −1 configure
  8. +35 −5 configure-dialog.c
  9. +1 −1 configure.in
  10. +3 −0 interface.c
  11. +6 −3 showmessage.c
  12. +5 −3 usbparse.c
  13. +1 −1 usbparse.h
  14. +5 −5 usbtree.c
  15. +2 −2 usbtree.h
  16. +15 −2 usbview.spec
  17. BIN usbview_logo.xcf
  18. +16,515 −0 usbview_logo.xpm
View
2 AUTHORS
@@ -1,5 +1,5 @@
-- AUTHORS for USBView - a USB device viewer
--- Copyright (c) 1999 by Greg Kroah-Hartman, greg@kroah.com
+-- Copyright (c) 1999, 2000 by Greg Kroah-Hartman, greg@kroah.com
--
-- 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
View
12 ChangeLog
@@ -1,3 +1,15 @@
+version 1.0
+ - fixed problem for devices that grabed more than one interface, the
+ name of the device would show up repeated a bunch. This was true
+ for a lot of audio and video devices.
+ - Tweaked the configuration dialog a bit.
+ - Tweaked the about dialog a bit.
+ - Everything seems stable, so let's put a major number on this release.
+ - added a pixmap hacked up from an image by M G Berberich
+ <berberic@fmi.uni-passau.de> to the about screen
+ - cleaned up the spec file to hopefully build a bit better on
+ different versions of different distros.
+
version 0.9.0
- added Trond Eivind Glomsr�d's patch to always try to populate the
device tree when the program is started.
View
7 Makefile.am
@@ -3,6 +3,8 @@
INCLUDES = \
@GTK_CFLAGS@
+VERSION = 1.0
+
bin_PROGRAMS = usbview
usbview_SOURCES = \
@@ -13,7 +15,10 @@ usbview_SOURCES = \
showmessage.c \
usbparse.c usbparse.h \
configure-dialog.c \
- about-dialog.c
+ about-dialog.c \
+ usbview_logo.xpm \
+ usbview_logo.xcf \
+ usbview.spec
usbview_LDADD = @GTK_LIBS@
View
13 Makefile.in
@@ -63,14 +63,15 @@ GTK_CONFIG = @GTK_CONFIG@
GTK_LIBS = @GTK_LIBS@
MAKEINFO = @MAKEINFO@
PACKAGE = @PACKAGE@
-VERSION = @VERSION@
INCLUDES = @GTK_CFLAGS@
+VERSION = 1.0
+
bin_PROGRAMS = usbview
-usbview_SOURCES = main.c interface.c callbacks.c usbtree.c usbtree.h showmessage.c usbparse.c usbparse.h configure-dialog.c about-dialog.c
+usbview_SOURCES = main.c interface.c callbacks.c usbtree.c usbtree.h showmessage.c usbparse.c usbparse.h configure-dialog.c about-dialog.c usbview_logo.xpm usbview_logo.xcf usbview.spec
usbview_LDADD = @GTK_LIBS@
@@ -276,14 +277,6 @@ distdir: $(DISTFILES)
|| cp -p $$d/$$file $(distdir)/$$file || :; \
fi; \
done
-about-dialog.o: about-dialog.c config.h usbtree.h usbparse.h
-callbacks.o: callbacks.c config.h usbtree.h
-configure-dialog.o: configure-dialog.c config.h usbtree.h usbparse.h
-interface.o: interface.c config.h usbtree.h
-main.o: main.c config.h usbtree.h
-showmessage.o: showmessage.c usbtree.h
-usbparse.o: usbparse.c config.h usbtree.h usbparse.h
-usbtree.o: usbtree.c config.h usbtree.h usbparse.h
info-am:
info: info-am
View
2 README
@@ -1,5 +1,5 @@
-- README for USBView - a USB device viewer
--- Copyright (c) 1999 by Greg Kroah-Hartman, greg@kroah.com
+-- Copyright (c) 1999, 2000 by Greg Kroah-Hartman, greg@kroah.com
--
-- 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
View
22 about-dialog.c
@@ -34,6 +34,7 @@
#include "usbtree.h"
#include "usbparse.h"
+#include "usbview_logo.xpm" /* logo */
static void OkAboutDialog (GtkWidget *widget, gpointer data)
@@ -54,29 +55,41 @@ void about_dialog (void)
GtkWidget *label1;
GtkWidget *dialog_action_area1;
GtkWidget *okButton;
+ static GdkPixmap *logo;
+ GdkBitmap *logoMask;
+ GtkWidget *logoWidget;
aboutDialog = gtk_dialog_new ();
gtk_object_set_data (GTK_OBJECT (aboutDialog), "aboutDialog", aboutDialog);
- gtk_window_set_title (GTK_WINDOW (aboutDialog), "aboutDialog");
+ gtk_window_set_title (GTK_WINDOW (aboutDialog), "About usbview");
gtk_window_set_policy (GTK_WINDOW (aboutDialog), TRUE, TRUE, FALSE);
dialog_vbox1 = GTK_DIALOG (aboutDialog)->vbox;
gtk_object_set_data (GTK_OBJECT (aboutDialog), "dialog_vbox1", dialog_vbox1);
gtk_widget_show (dialog_vbox1);
- label1 = gtk_label_new ("\n\tUSB View\n\tVersion " VERSION "\n\n\tby Greg Kroah-Hartman\n\t<greg@kroah.com>\n\n\thttp://usbview.sourceforge.net/\t\n");
+ logo = gdk_pixmap_create_from_xpm_d (aboutDialog->window, &logoMask, NULL, usbview_logo_xpm);
+ logoWidget = gtk_pixmap_new (logo, logoMask);
+ gtk_box_pack_start (GTK_BOX (dialog_vbox1), logoWidget, FALSE, FALSE, 0);
+ gtk_widget_show (logoWidget);
+
+ label1 = gtk_label_new (//"\n"
+ //" USBView Version " VERSION "\n\n"
+ //" Copyright (C) 1999, 2000\n"
+ //" Greg Kroah-Hartman <greg@kroah.com> \n\n"
+ "http://usbview.sourceforge.net/");
gtk_widget_ref (label1);
gtk_object_set_data_full (GTK_OBJECT (aboutDialog), "label1", label1,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (label1);
gtk_box_pack_start (GTK_BOX (dialog_vbox1), label1, FALSE, FALSE, 0);
- gtk_label_set_justify (GTK_LABEL (label1), GTK_JUSTIFY_LEFT);
+// gtk_label_set_justify (GTK_LABEL (label1), GTK_JUSTIFY_LEFT);
dialog_action_area1 = GTK_DIALOG (aboutDialog)->action_area;
gtk_object_set_data (GTK_OBJECT (aboutDialog), "dialog_action_area1", dialog_action_area1);
gtk_widget_show (dialog_action_area1);
gtk_container_set_border_width (GTK_CONTAINER (dialog_action_area1), 10);
- okButton = gtk_button_new_with_label ("Ok");
+ okButton = gtk_button_new_with_label (" Ok ");
gtk_widget_ref (okButton);
gtk_object_set_data_full (GTK_OBJECT (aboutDialog), "okButton", okButton,
(GtkDestroyNotify) gtk_widget_unref);
@@ -98,4 +111,3 @@ void about_dialog (void)
return;
}
-
View
2 configure
@@ -697,7 +697,7 @@ fi
PACKAGE=usbview
-VERSION=0.9.0
+VERSION=1.0
if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
{ echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
View
40 configure-dialog.c
@@ -170,6 +170,10 @@ void configure_dialog (void)
GtkWidget *dialog_vbox2;
GtkWidget *hbox1;
GtkWidget *label1;
+ GtkWidget *label41;
+ GtkWidget *label42;
+ GtkWidget *label43;
+ GtkWidget *vbox1;
GtkWidget *dialog_action_area2;
GtkWidget *hbuttonbox2;
GtkWidget *okButton;
@@ -185,13 +189,33 @@ void configure_dialog (void)
gtk_object_set_data (GTK_OBJECT (configDialog), "dialog_vbox2", dialog_vbox2);
gtk_widget_show (dialog_vbox2);
+ vbox1 = gtk_vbox_new (FALSE, 0);
+ gtk_widget_ref (vbox1);
+ gtk_object_set_data_full (GTK_OBJECT (configDialog), "vbox1", vbox1, (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (vbox1);
+ gtk_box_pack_start (GTK_BOX (dialog_vbox2), vbox1, TRUE, TRUE, 0);
+
+ label41 = gtk_label_new ("");
+ gtk_widget_ref (label41);
+ gtk_object_set_data_full (GTK_OBJECT (configDialog), "label41", label41, (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (label41);
+ gtk_box_pack_start (GTK_BOX (vbox1), label41, FALSE, FALSE, 0);
+
hbox1 = gtk_hbox_new (FALSE, 0);
gtk_widget_ref (hbox1);
gtk_object_set_data_full (GTK_OBJECT (configDialog), "hbox1", hbox1, (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (hbox1);
- gtk_box_pack_start (GTK_BOX (dialog_vbox2), hbox1, TRUE, TRUE, 0);
+// gtk_box_pack_start (GTK_BOX (dialog_vbox2), hbox1, TRUE, TRUE, 0);
+ gtk_box_pack_start (GTK_BOX (vbox1), hbox1, TRUE, TRUE, 0);
+
+ label42 = gtk_label_new ("");
+ gtk_widget_ref (label42);
+ gtk_object_set_data_full (GTK_OBJECT (configDialog), "label42", label42, (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (label42);
+ gtk_box_pack_start (GTK_BOX (vbox1), label42, FALSE, FALSE, 0);
+
- label1 = gtk_label_new ("location of usbdevfs devices file");
+ label1 = gtk_label_new (" Location of usbdevfs devices file");
gtk_widget_ref (label1);
gtk_object_set_data_full (GTK_OBJECT (configDialog), "label1", label1, (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (label1);
@@ -215,14 +239,14 @@ void configure_dialog (void)
gtk_widget_show (hbuttonbox2);
gtk_box_pack_start (GTK_BOX (dialog_action_area2), hbuttonbox2, TRUE, TRUE, 11);
- okButton = gtk_button_new_with_label ("OK");
+ okButton = gtk_button_new_with_label (" OK ");
gtk_widget_ref (okButton);
gtk_object_set_data_full (GTK_OBJECT (configDialog), "okButton", okButton, (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (okButton);
gtk_container_add (GTK_CONTAINER (hbuttonbox2), okButton);
GTK_WIDGET_SET_FLAGS (okButton, GTK_CAN_DEFAULT);
- cancelButton = gtk_button_new_with_label ("Cancel");
+ cancelButton = gtk_button_new_with_label (" Cancel ");
gtk_widget_ref (cancelButton);
gtk_object_set_data_full (GTK_OBJECT (configDialog), "cancelButton", cancelButton, (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (cancelButton);
@@ -234,8 +258,14 @@ void configure_dialog (void)
gtk_object_set_data_full (GTK_OBJECT (configDialog), "fileSelectButton", fileSelectButton, (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (fileSelectButton);
- gtk_box_pack_start (GTK_BOX (hbox1), fileSelectButton, TRUE, TRUE, 1);
+ gtk_box_pack_start (GTK_BOX (hbox1), fileSelectButton, TRUE, FALSE, 1);
+ label43 = gtk_label_new (" ");
+ gtk_widget_ref (label43);
+ gtk_object_set_data_full (GTK_OBJECT (configDialog), "label43", label43, (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (label43);
+ gtk_box_pack_start (GTK_BOX (hbox1), label43, FALSE, FALSE, 0);
+
gtk_signal_connect (GTK_OBJECT (okButton), "clicked", GTK_SIGNAL_FUNC (OkConfigureDialog), configDialog);
gtk_signal_connect (GTK_OBJECT (cancelButton), "clicked", GTK_SIGNAL_FUNC (CancelConfigureDialog), configDialog);
gtk_signal_connect (GTK_OBJECT (fileSelectButton), "clicked", GTK_SIGNAL_FUNC (fileSelectButtonClick), configDialog);
View
2 configure.in
@@ -1,7 +1,7 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT(configure.in)
-AM_INIT_AUTOMAKE(usbview, 0.1)
+AM_INIT_AUTOMAKE(usbview, 1.0)
AM_CONFIG_HEADER(config.h)
AC_ISC_POSIX
View
3 interface.c
@@ -105,6 +105,9 @@ create_windowMain ()
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (hbuttonbox1);
gtk_box_pack_start (GTK_BOX (vbox1), hbuttonbox1, FALSE, FALSE, 5);
+ //gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbuttonbox1), 10);
+ //gtk_button_box_set_child_size (GTK_BUTTON_BOX (hbuttonbox1), 50, 25);
+ //gtk_button_box_set_child_ipadding (GTK_BUTTON_BOX (hbuttonbox1), 25, 10);
buttonRefresh = gtk_button_new_with_label ("Refresh");
gtk_widget_set_name (buttonRefresh, "buttonRefresh");
View
9 showmessage.c
@@ -73,7 +73,7 @@ static void ClearShowMessage (GtkWidget *widget, gpointer data)
*
* Show a popup message to the user.
*/
-void ShowMessage (gchar *title, gchar *message)
+void ShowMessage (gchar *title, gchar *message, gboolean centered)
{
GtkWidget *label;
GtkWidget *button;
@@ -91,13 +91,13 @@ void ShowMessage (gchar *title, gchar *message)
gtk_container_border_width (GTK_CONTAINER (dialog_window), 0);
/* --- Create an "Ok" button with the focus --- */
- button = gtk_button_new_with_label ("OK");
+ button = gtk_button_new_with_label (" OK ");
gtk_signal_connect (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (CloseShowMessage), dialog_window);
/* --- Default the "Ok" button --- */
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog_window)->action_area), button, TRUE, TRUE, 0);
+ gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog_window)->action_area), button, TRUE, FALSE, 10);
gtk_widget_grab_default (button);
gtk_widget_show (button);
@@ -111,6 +111,9 @@ void ShowMessage (gchar *title, gchar *message)
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog_window)->vbox),
label, TRUE, TRUE, 0);
+ if (centered == FALSE) {
+ gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT);
+ }
/* --- Show the label --- */
gtk_widget_show (label);
View
8 usbparse.c
@@ -569,10 +569,12 @@ static void NameDevice (Device *device)
}
}
}
- if (strlen (device->name) > 0) {
- strcat (device->name, " / ");
+ if (strstr (device->name, interface->name) == NULL) {
+ if (strlen (device->name) > 0) {
+ strcat (device->name, " / ");
+ }
+ strcat (device->name, interface->name);
}
- strcat (device->name, interface->name);
}
}
}
View
2 usbparse.h
@@ -1,6 +1,6 @@
/*************************************************************************
** usbparse.h for USBView - a USB device viewer
-** Copyright (c) 1999 by Greg Kroah-Hartman, greg@kroah.com
+** Copyright (c) 1999, 2000 by Greg Kroah-Hartman, greg@kroah.com
**
** 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
View
10 usbtree.c
@@ -273,15 +273,15 @@ gchar devicesFile[1000];
static gchar previousDevicesFile[1000];
static time_t previousChange;
-const char *verifyMessage = "Verify that you have USB compiled into your kernel,\n"
- "have the USB core modules loaded, and have the\n"
- "usbdevfs filesystem mounted.";
+const char *verifyMessage = " Verify that you have USB compiled into your kernel, \n"
+ " have the USB core modules loaded, and have the \n"
+ " usbdevfs filesystem mounted. ";
static void FileError (void)
{
gchar *tempString = g_malloc0(strlen (verifyMessage) + strlen (devicesFile) + 50);
- sprintf (tempString, "Can not open %s\n%s", devicesFile, verifyMessage);
- ShowMessage ("USBView Error", tempString);
+ sprintf (tempString, " Can not open the file %s \n\n%s", devicesFile, verifyMessage);
+ ShowMessage ("USBView Error", tempString, FALSE);
g_free (tempString);
return;
}
View
4 usbtree.h
@@ -1,6 +1,6 @@
/*************************************************************************
** usbtree.h for USBView - a USB device viewer
-** Copyright (c) 1999 by Greg Kroah-Hartman, greg@kroah.com
+** Copyright (c) 1999, 2000 by Greg Kroah-Hartman, greg@kroah.com
**
** 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
@@ -39,7 +39,7 @@ extern void on_buttonConfigure_clicked (GtkButton *button, gpointer user_data);
extern void on_buttonAbout_clicked (GtkButton *button, gpointer user_data);
extern gint on_timer_timeout (gpointer user_data);
-extern void ShowMessage (gchar *title, gchar *message);
+extern void ShowMessage (gchar *title, gchar *message, gboolean centered);
extern gboolean MessageShown (void);
View
17 usbview.spec
@@ -1,5 +1,5 @@
%define name usbview
-%define version 0.9.0
+%define version 1.0
%define release 1
%define serial 1
%define prefix /usr
@@ -27,7 +27,7 @@ a device is working properly or not.
%setup -q
%build
-%configure --prefix=%{prefix}
+./configure
make
%install
@@ -43,6 +43,19 @@ if [ -d $RPM_BUILD_ROOT ]; then rm -rf $RPM_BUILD_ROOT; fi
%{prefix}/bin/usbview
%changelog
+* Mon Dec 5 2000 Greg Kroah-Hartman <greg@kroah.com>
+[usbview-1.0]
+- fixed problem for devices that grabed more than one interface, the
+ name of the device would show up repeated a bunch. This was true
+ for a lot of audio and video devices.
+- Tweaked the configuration dialog a bit.
+- Tweaked the about dialog a bit.
+- Everything seems stable, so let's put a major number on this release.
+- added a pixmap hacked up from an image by M G Berberich
+ <berberic@fmi.uni-passau.de> to the about screen
+- cleaned up the spec file to hopefully build a bit better on different
+ versions of different distros.
+
* Sun Sep 10 2000 Greg Kroah-Hartman <greg@kroah.com>
[usbview-0.9.0]
- added Trond Eivind Glomsr�d's patch to always try to populate the
View
BIN usbview_logo.xcf
Binary file not shown.
View
16,515 usbview_logo.xpm
16,515 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.

0 comments on commit 91a5830

Please sign in to comment.
Something went wrong with that request. Please try again.