From 07533424b6dbabebde558eac8b8645df408a6db1b5926d9fc6c4beea25e2bdd3 Mon Sep 17 00:00:00 2001 From: andrea florio Date: Thu, 2 Sep 2010 17:40:12 +0000 Subject: [PATCH] Accepting request 47022 from home:bmanojlovic:branches:X11:lxde Copy from home:bmanojlovic:branches:X11:lxde/lxterminal via accept of submit request 47022 revision 2. Request was accepted with message: thanks OBS-URL: https://build.opensuse.org/request/show/47022 OBS-URL: https://build.opensuse.org/package/show/X11:lxde/lxterminal?expand=0&rev=46 --- lxterminal-fix-char_widthheight.patch | 46 +++++++++++++++++++++++++++ lxterminal.spec | 2 ++ 2 files changed, 48 insertions(+) create mode 100644 lxterminal-fix-char_widthheight.patch diff --git a/lxterminal-fix-char_widthheight.patch b/lxterminal-fix-char_widthheight.patch new file mode 100644 index 0000000..94954a2 --- /dev/null +++ b/lxterminal-fix-char_widthheight.patch @@ -0,0 +1,46 @@ +Index: src/lxterminal.c +=================================================================== +--- src/lxterminal.c.orig 2010-08-17 02:20:35.000000000 +0200 ++++ src/lxterminal.c 2010-09-02 19:11:47.792423947 +0200 +@@ -259,8 +259,8 @@ static void terminal_geometry_restore(Te + vte_terminal_get_column_count(VTE_TERMINAL(term->vte)), + vte_terminal_get_row_count(VTE_TERMINAL(term->vte))); + gtk_window_resize(GTK_WINDOW(term->parent->window), +- border->left + VTE_TERMINAL(term->vte)->char_width, +- border->top + VTE_TERMINAL(term->vte)->char_height); ++ border->left + vte_terminal_get_char_width(VTE_TERMINAL(term->vte)), ++ border->top + vte_terminal_get_char_height(VTE_TERMINAL(term->vte))); + gtk_border_free(border); + } + +@@ -632,8 +632,8 @@ static gboolean terminal_window_size_req + Term * term = g_ptr_array_index(terminal->terms, 0); + GtkBorder * border = terminal_get_border(term); + GdkGeometry hints; +- hints.width_inc = VTE_TERMINAL(term->vte)->char_width; +- hints.height_inc = VTE_TERMINAL(term->vte)->char_height; ++ hints.width_inc = vte_terminal_get_char_width(VTE_TERMINAL(term->vte)); ++ hints.height_inc = vte_terminal_get_char_height(VTE_TERMINAL(term->vte)); + hints.base_width = border->left; + hints.base_height = border->top; + hints.min_width = hints.base_width + hints.width_inc * 4; +@@ -803,8 +803,8 @@ static gboolean terminal_vte_button_pres + GtkBorder * border = terminal_get_border(term); + gint tag; + gchar * match = vte_terminal_match_check(vte, +- (event->x - border->left) / vte->char_width, +- (event->y - border->top) / vte->char_height, ++ (event->x - border->left) / vte_terminal_get_char_width(vte), ++ (event->y - border->top) / vte_terminal_get_char_height(vte), + &tag); + gtk_border_free(border); + +@@ -929,7 +929,7 @@ static Term * terminal_new(LXTerminal * + gtk_widget_show_all(term->tab); + + /* Set up scrollbar. */ +- gtk_range_set_adjustment(GTK_RANGE(term->scrollbar), VTE_TERMINAL(term->vte)->adjustment); ++ gtk_range_set_adjustment(GTK_RANGE(term->scrollbar), vte_terminal_get_adjustment(VTE_TERMINAL(term->vte))); + + /* Fork the process that will have the VTE as its controlling terminal. */ + if (exec != NULL) diff --git a/lxterminal.spec b/lxterminal.spec index e37877f..d920d02 100644 --- a/lxterminal.spec +++ b/lxterminal.spec @@ -29,6 +29,7 @@ Source0: %name-%version.tar.bz2 # PATCH-FEATURE-OPENSUSE lxterminal-0.1.8-disable-f10.patch andrea@opensuse.org # disable f10 shortcut because yast use it Patch0: %name-0.1.8-disable-f10.patch +Patch1: %name-fix-char_widthheight.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: fdupes gtk2-devel intltool pkg-config update-desktop-files BuildRequires: docbook-utils docbook-xsl-stylesheets libxslt-devel vte-devel @@ -44,6 +45,7 @@ of the LXDE project %prep %setup -q %patch0 -p1 +%patch1 %build export CFLAGS="$RPM_OPT_FLAGS"