From be64836de83855382af2ac12f5e9199d58137285 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E6=98=95?= Date: Thu, 4 May 2023 18:07:23 +0800 Subject: [PATCH] =?UTF-8?q?OCT=201.=20=E4=BF=AE=E6=94=B9DHCP=20=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E5=B7=A5=E5=85=B7=E6=95=B0=E6=8D=AE=E5=8C=85=E6=B5=8F?= =?UTF-8?q?=E8=A7=88=E7=AA=97=E5=8F=A3=E6=BB=9A=E5=8A=A8=E6=9D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dhcp_tools/detail_wnd.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dhcp_tools/detail_wnd.c b/dhcp_tools/detail_wnd.c index d141a9d..2cd42a0 100644 --- a/dhcp_tools/detail_wnd.c +++ b/dhcp_tools/detail_wnd.c @@ -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; } \ No newline at end of file