Remove vte_char_size_changed() workaround, not needed since r988;

this also fixes an issue where the VTE is limited to 30x5 chars.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1030 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Nick Treleaven 2006-11-25 12:23:49 +00:00
parent d5004f43e4
commit 31aa37fb65
2 changed files with 6 additions and 15 deletions

View File

@ -3,6 +3,9 @@
* src/msgwindow.c, src/notebook.c, src/msgwindow.h, src/notebook.h:
Add some const char* argument modifiers, remove unneeded static from
some local vars.
* src/vte.c:
Remove vte_char_size_changed() workaround, not needed since r988;
this also fixes an issue where the VTE is limited to 30x5 chars.
2006-11-24 Nick Treleaven <nick.treleaven@btinternet.com>

View File

@ -58,8 +58,6 @@ static gboolean vte_keypress(GtkWidget *widget, GdkEventKey *event, gpointer dat
static void vte_register_symbols(GModule *module);
static void vte_popup_menu_clicked(GtkMenuItem *menuitem, gpointer user_data);
static GtkWidget *vte_create_popup_menu(void);
static void vte_char_size_changed(VteTerminal *vteterminal, guint arg1, guint arg2,
gpointer user_data);
/* taken from anjuta, thanks */
@ -151,8 +149,11 @@ void vte_init(void)
gtk_box_pack_start(GTK_BOX(hbox), vte, TRUE, TRUE, 0);
gtk_box_pack_start(GTK_BOX(hbox), scrollbar, FALSE, FALSE, 0);
/* set the default widget size first to prevent VTE expanding too much,
* sometimes causing the hscrollbar to be too big or out of view. */
gtk_widget_set_size_request(GTK_WIDGET(vte), 10, 10);
vf->vte_terminal_set_size(VTE_TERMINAL(vte), 30, 1);
//vf->vte_terminal_set_encoding(VTE_TERMINAL(vte), "UTF-8");
vf->vte_terminal_set_mouse_autohide(VTE_TERMINAL(vte), TRUE);
vf->vte_terminal_set_word_chars(VTE_TERMINAL(vte), VTE_WORDCHARS);
@ -160,8 +161,6 @@ void vte_init(void)
g_signal_connect(G_OBJECT(vte), "child-exited", G_CALLBACK(vte_start), NULL);
g_signal_connect(G_OBJECT(vte), "button-press-event", G_CALLBACK(vte_button_pressed), NULL);
g_signal_connect(G_OBJECT(vte), "event", G_CALLBACK(vte_keypress), NULL);
g_signal_connect(G_OBJECT(vte), "char-size-changed",
G_CALLBACK(vte_char_size_changed), NULL);
//g_signal_connect(G_OBJECT(vte), "drag-data-received", G_CALLBACK(vte_drag_data_received), NULL);
//g_signal_connect(G_OBJECT(vte), "drag-drop", G_CALLBACK(vte_drag_drop), NULL);
@ -252,17 +251,6 @@ static gboolean vte_button_pressed(GtkWidget *widget, GdkEventButton *event, gpo
}
static void vte_char_size_changed(VteTerminal *vteterminal, guint arg1, guint arg2,
gpointer user_data)
{
/* Now the font may have changed, we must limit the width, otherwise the
* vertical scroll bar will disappear e.g. for Monospace > 10.
* We don't want to set height, but there's no way to set just width, so say 5.
* The VTE will be safely enlarged by GTK, above 30, 5 after this callback. */
vf->vte_terminal_set_size(VTE_TERMINAL(vc->vte), 30, 5);
}
static void vte_register_symbols(GModule *mod)
{
g_module_symbol(mod, "vte_terminal_new", (void*)&vf->vte_terminal_new);