OCT 1. 修改DHCP 测试工具数据包浏览窗口滚动条
This commit is contained in:
parent
9d6dae9171
commit
be64836de8
|
@ -384,7 +384,7 @@ static gboolean button_release_event(GtkWidget *self, GdkEventButton event, gpoi
|
|||
GtkTextMark *mark = gtk_text_buffer_get_insert(buffer);
|
||||
gtk_text_buffer_get_iter_at_mark(buffer, &start_sel, mark);
|
||||
gtk_text_buffer_get_iter_at_line_offset(buffer, &end_sel, row, 59);
|
||||
char *text = (char *)gtk_text_buffer_get_text(buffer, &iter, &end_sel, FALSE);
|
||||
//char *text = (char *)gtk_text_buffer_get_text(buffer, &iter, &end_sel, FALSE);
|
||||
//printf("Select %s(%d, %d)\n", text, row, col);
|
||||
}
|
||||
}
|
||||
|
@ -427,12 +427,13 @@ void details_wnd_create(GtkBuilder *builder) {
|
|||
GtkWidget *scMsg = gtk_scrolled_window_new(NULL, NULL);
|
||||
// 上下分割面板
|
||||
GtkWidget *vpaned = gtk_paned_new(GTK_ORIENTATION_VERTICAL);
|
||||
gtk_container_add(GTK_CONTAINER(scMsg), vpaned);
|
||||
|
||||
// 上半部分控件
|
||||
GtkWidget *tvDhcp = gtk_tree_view_new();
|
||||
gtk_tree_view_set_grid_lines(GTK_TREE_VIEW(tvDhcp), GTK_TREE_VIEW_GRID_LINES_BOTH);
|
||||
gtk_container_add(GTK_CONTAINER(scMsg), tvDhcp);
|
||||
|
||||
gtk_paned_pack1(GTK_PANED(vpaned), tvDhcp, TRUE, FALSE);
|
||||
gtk_paned_pack1(GTK_PANED(vpaned), scMsg, TRUE, FALSE);
|
||||
gtk_widget_set_size_request(tvDhcp, -1, 300);
|
||||
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scMsg), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
|
||||
|
||||
|
@ -462,7 +463,7 @@ void details_wnd_create(GtkBuilder *builder) {
|
|||
// 控件布局
|
||||
gtk_box_pack_start(GTK_BOX(boxTab), scHex, TRUE, TRUE, 1);
|
||||
gtk_box_pack_start(GTK_BOX(boxTab), vSepar, FALSE, FALSE, 1);
|
||||
gtk_box_pack_start(GTK_BOX(boxTab), scMsg, TRUE, TRUE, 1);
|
||||
gtk_box_pack_start(GTK_BOX(boxTab), vpaned, TRUE, TRUE, 1);
|
||||
gtk_widget_set_size_request(scHex, 580, -1);
|
||||
gtk_widget_set_size_request(tvDhcp, 300, -1);
|
||||
|
||||
|
@ -482,7 +483,6 @@ void details_wnd_create(GtkBuilder *builder) {
|
|||
}
|
||||
|
||||
g_signal_connect(G_OBJECT(window), "delete_event", G_CALLBACK(delete_event), builder);
|
||||
//g_signal_connect(G_OBJECT(window), "delete_event", G_CALLBACK(delete_event), builder);
|
||||
|
||||
g_detailWnd = window;
|
||||
}
|
Loading…
Reference in New Issue