2
* $Id: nodes_cb.c,v 1.8 2005/06/25 01:37:45 daichik Exp $
4
* Copyright (c) 2001-2003, Raphael Manfredi, Richard Eckart
6
*----------------------------------------------------------------------
7
* This file is part of gtk-gnutella.
9
* gtk-gnutella is free software; you can redistribute it and/or modify
10
* it under the terms of the GNU General Public License as published by
11
* the Free Software Foundation; either version 2 of the License, or
12
* (at your option) any later version.
14
* gtk-gnutella is distributed in the hope that it will be useful,
15
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
* GNU General Public License for more details.
19
* You should have received a copy of the GNU General Public License
20
* along with gtk-gnutella; if not, write to the Free Software
22
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23
*----------------------------------------------------------------------
30
* GUI filtering functions.
32
* @author Raphael Manfredi
33
* @author Richard Eckart
39
RCSID("$Id: nodes_cb.c,v 1.8 2005/06/25 01:37:45 daichik Exp $");
42
#include "gtk/gtkcolumnchooser.h"
43
#include "gtk/nodes_common.h"
45
#include "if/bridge/ui2c.h"
47
#include "lib/iso3166.h"
48
#include "lib/override.h" /* Must be the last header included */
54
GtkEditable *editable = GTK_EDITABLE
55
(lookup_widget(main_window, "entry_host"));
57
addr = gtk_editable_get_chars(editable, 0, -1);
58
nodes_gui_common_connect_by_name(addr);
60
gtk_entry_set_text(GTK_ENTRY(editable), "");
64
on_button_nodes_remove_clicked(GtkButton *unused_button, gpointer unused_udata)
68
nodes_gui_remove_selected();
72
on_popup_nodes_disconnect_activate(GtkItem *unused_item, gpointer unused_udata)
76
nodes_gui_remove_selected();
81
on_popup_nodes_reverse_lookup_activate(GtkItem *unused_item,
82
gpointer unused_udata)
86
nodes_gui_reverse_lookup_selected();
91
on_button_nodes_add_clicked(GtkButton *unused_button, gpointer unused_udata)
99
on_entry_host_activate(GtkEditable *unused_editable, gpointer unused_udata)
101
(void) unused_editable;
107
on_entry_host_changed(GtkEditable *editable, gpointer unused_udata)
112
e = gtk_editable_get_chars(editable, 0, -1);
114
gtk_widget_set_sensitive(lookup_widget(main_window, "button_nodes_add"),
120
on_treeview_nodes_button_press_event(GtkWidget *unused_widget,
121
GdkEventButton *event, gpointer unused_udata)
123
(void) unused_widget;
126
if (3 == event->button) {
127
/* right click section (popup menu) */
129
gtk_menu_popup(GTK_MENU(popup_nodes), NULL, NULL, NULL, NULL, 1, 0);
136
* Creates and pops up the column chooser for ``treeview_nodes''
139
on_popup_nodes_config_cols_activate(GtkItem *unused_menuitem,
140
gpointer unused_udata)
144
(void) unused_menuitem;
146
cc = gtk_column_chooser_new(lookup_widget(main_window, "treeview_nodes"));
147
gtk_menu_popup(GTK_MENU(cc), NULL, NULL, NULL, NULL, 1, 0);
149
/* GtkColumnChooser takes care of cleaning up itself */
153
/* vi: set ts=4 sw=4 cindent: */