configure-dialog.c (usbview-2.0) | : | configure-dialog.c (usbview-2.1) | ||
---|---|---|---|---|
/************************************************************************* | // SPDX-License-Identifier: GPL-2.0-only | |||
** configure-dialog.c for USBView - a USB device viewer | /* | |||
** Copyright (c) 1999, 2000 by Greg Kroah-Hartman, <greg@kroah.com> | * configure-dialog.c for USBView - a USB device viewer | |||
** | * 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 | ||||
** the Free Software Foundation; version 2 of the License. | ||||
** | ||||
** 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. | ||||
** | ||||
** (See the included file COPYING) | ||||
*************************************************************************/ | ||||
#ifdef HAVE_CONFIG_H | #ifdef HAVE_CONFIG_H | |||
#include <config.h> | #include <config.h> | |||
#endif | #endif | |||
#include <gtk/gtk.h> | #include <gtk/gtk.h> | |||
#include <string.h> | #include <string.h> | |||
#include "usbtree.h" | #include "usbtree.h" | |||
#include "usbparse.h" | #include "usbparse.h" | |||
static GtkWidget *fileEntry; | static GtkWidget *fileEntry; | |||
static void fileSelectButtonClick (GtkWidget *widget, gpointer data) | static void fileSelectButtonClick (GtkWidget *widget, gpointer data) | |||
{ | { | |||
GtkWidget *dialog; | GtkWidget *dialog; | |||
gchar *filename; | gchar *filename; | |||
dialog = gtk_file_chooser_dialog_new ( | dialog = gtk_file_chooser_dialog_new ( | |||
"locate usbdevfs devices file", | "locate usbdevfs devices file", | |||
GTK_WINDOW (windowMain), | GTK_WINDOW (windowMain), | |||
GTK_FILE_CHOOSER_ACTION_OPEN, | GTK_FILE_CHOOSER_ACTION_OPEN, | |||
GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, | "_OK", GTK_RESPONSE_ACCEPT, | |||
GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT, | "_Cancel", GTK_RESPONSE_REJECT, | |||
NULL); | NULL); | |||
if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) | if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) | |||
{ | { | |||
filename = gtk_file_chooser_get_filename( | filename = gtk_file_chooser_get_filename( | |||
GTK_FILE_CHOOSER (dialog)); | GTK_FILE_CHOOSER (dialog)); | |||
gtk_entry_set_text (GTK_ENTRY (fileEntry), filename); | gtk_entry_set_text (GTK_ENTRY (fileEntry), filename); | |||
g_free (filename); | g_free (filename); | |||
} | } | |||
skipping to change at line 65 | skipping to change at line 54 | |||
GtkWidget *hbox1; | GtkWidget *hbox1; | |||
GtkWidget *label1; | GtkWidget *label1; | |||
GtkWidget *fileSelectButton; | GtkWidget *fileSelectButton; | |||
gchar *editString; | gchar *editString; | |||
gint result; | gint result; | |||
dialog = gtk_dialog_new_with_buttons ( | dialog = gtk_dialog_new_with_buttons ( | |||
"USB View Configuration", | "USB View Configuration", | |||
GTK_WINDOW (windowMain), | GTK_WINDOW (windowMain), | |||
GTK_DIALOG_DESTROY_WITH_PARENT, | GTK_DIALOG_DESTROY_WITH_PARENT, | |||
GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, | "_OK", GTK_RESPONSE_ACCEPT, | |||
GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT, | "_Cancel", GTK_RESPONSE_REJECT, | |||
NULL); | NULL); | |||
content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog)); | content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog)); | |||
hbox1 = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); | hbox1 = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); | |||
gtk_container_add (GTK_CONTAINER (content_area), hbox1); | gtk_container_add (GTK_CONTAINER (content_area), hbox1); | |||
label1 = gtk_label_new ("Location of usbdevfs devices file"); | label1 = gtk_label_new ("Location of usbdevfs devices file"); | |||
gtk_box_pack_start (GTK_BOX (hbox1), label1, FALSE, FALSE, 5); | gtk_box_pack_start (GTK_BOX (hbox1), label1, FALSE, FALSE, 5); | |||
End of changes. 3 change blocks. | ||||
20 lines changed or deleted | 9 lines changed or added |