diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2014-04-29 15:08:56 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2014-05-26 08:41:02 +0200 |
commit | fd07d07ba931a9c3eb82439c5923a888922734d6 (patch) | |
tree | 0f4b8ca518482f05d66f0f68b3c6573cdd106761 /ui | |
parent | 178ac111bca16c08a79b2609ebdc75197bea976a (diff) | |
download | qemu-fd07d07ba931a9c3eb82439c5923a888922734d6.zip qemu-fd07d07ba931a9c3eb82439c5923a888922734d6.tar.gz qemu-fd07d07ba931a9c3eb82439c5923a888922734d6.tar.bz2 |
gtk: zap scrolled_window
The vte widget implements the scrollable interface, placing it into
a scrolled window is pointless and creates a bunch of strange effects.
Zap it.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'ui')
-rw-r--r-- | ui/gtk.c | 19 |
1 files changed, 2 insertions, 17 deletions
@@ -110,7 +110,6 @@ typedef struct VirtualConsole GtkWidget *menu_item; GtkWidget *terminal; #if defined(CONFIG_VTE) - GtkWidget *scrolled_window; CharDriverState *chr; #endif } VirtualConsole; @@ -1189,8 +1188,6 @@ static GSList *gd_vc_init(GtkDisplayState *s, VirtualConsole *vc, int index, GSL const char *label; char buffer[32]; char path[32]; - GtkWidget *scrolled_window; - GtkAdjustment *vadjustment; snprintf(buffer, sizeof(buffer), "vc%d", index); snprintf(path, sizeof(path), "<QEMU>/View/VC%d", index); @@ -1213,24 +1210,12 @@ static GSList *gd_vc_init(GtkDisplayState *s, VirtualConsole *vc, int index, GSL vte_terminal_set_scrollback_lines(VTE_TERMINAL(vc->terminal), -1); -#if VTE_CHECK_VERSION(0, 28, 0) && GTK_CHECK_VERSION(3, 0, 0) - vadjustment = gtk_scrollable_get_vadjustment(GTK_SCROLLABLE(vc->terminal)); -#else - vadjustment = vte_terminal_get_adjustment(VTE_TERMINAL(vc->terminal)); -#endif - - scrolled_window = gtk_scrolled_window_new(NULL, vadjustment); - gtk_container_add(GTK_CONTAINER(scrolled_window), vc->terminal); - vte_terminal_set_size(VTE_TERMINAL(vc->terminal), 80, 25); vc->chr->opaque = vc; - vc->scrolled_window = scrolled_window; - - gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(vc->scrolled_window), - GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); - gtk_notebook_append_page(GTK_NOTEBOOK(s->notebook), scrolled_window, gtk_label_new(label)); + gtk_notebook_append_page(GTK_NOTEBOOK(s->notebook), vc->terminal, + gtk_label_new(label)); g_signal_connect(vc->menu_item, "activate", G_CALLBACK(gd_menu_switch_vc), s); |