diff --git a/lxterminal-0.1.10-fix-desyncronization.patch b/lxterminal-0.1.10-fix-desyncronization.patch new file mode 100644 index 0000000..7fe2ad0 --- /dev/null +++ b/lxterminal-0.1.10-fix-desyncronization.patch @@ -0,0 +1,39 @@ +From 84506b12f892c9504efbfe7d0c484ce423d3f9a5 Mon Sep 17 00:00:00 2001 +From: =?utf8?q?Yao=20Wei=20(=E9=AD=8F=E9=8A=98=E5=BB=B7)?= +Date: Tue, 26 Jul 2011 09:28:52 +0800 +Subject: [PATCH] fix desynchonization of terminal index and notebook index (fixes #3372388) + +--- + src/lxterminal.c | 16 ++++++++++++++++ + 1 files changed, 16 insertions(+), 0 deletions(-) + +diff --git a/src/lxterminal.c b/src/lxterminal.c +index bb1a2b2..5d4940f 100644 +--- a/src/lxterminal.c ++++ b/src/lxterminal.c +@@ -567,6 +567,22 @@ static void terminal_move_tab_execute(LXTerminal * terminal, gint direction) + { + GtkNotebook * notebook = GTK_NOTEBOOK(terminal->notebook); + gint current_page_number = gtk_notebook_get_current_page(notebook); ++ gint target_page_number = current_page_number + direction; ++ ++ /* prevent out of index */ ++ if (target_page_number < 0 || target_page_number >= terminal->terms->len) ++ { ++ return; ++ } ++ ++ /* swap index in terms array and its id */ ++ Term * term_current = g_ptr_array_index(terminal->terms, current_page_number); ++ Term * term_target = g_ptr_array_index(terminal->terms, target_page_number); ++ g_ptr_array_index(terminal->terms, target_page_number) = term_current; ++ g_ptr_array_index(terminal->terms, current_page_number) = term_target; ++ term_current->index = target_page_number; ++ term_target->index = current_page_number; ++ + gtk_notebook_reorder_child(notebook, gtk_notebook_get_nth_page(notebook, current_page_number), current_page_number + direction); + } + +-- +1.7.0.1 + diff --git a/lxterminal-0.1.10-fix-rgba-composite.patch b/lxterminal-0.1.10-fix-rgba-composite.patch new file mode 100644 index 0000000..4badc68 --- /dev/null +++ b/lxterminal-0.1.10-fix-rgba-composite.patch @@ -0,0 +1,37 @@ +From 6d11a3ce447088bb473b4796b6b306edd714894a Mon Sep 17 00:00:00 2001 +From: =?utf8?q?Yao=20Wei=20(=E9=AD=8F=E9=8A=98=E5=BB=B7)?= +Date: Tue, 26 Jul 2011 08:49:12 +0800 +Subject: [PATCH] solve rgba composite problems. (fixed SF#3376800) + +--- + src/lxterminal.c | 13 ++++++++++--- + 1 files changed, 10 insertions(+), 3 deletions(-) + +diff --git a/src/lxterminal.c b/src/lxterminal.c +index 0219d50..bb1a2b2 100644 +--- a/src/lxterminal.c ++++ b/src/lxterminal.c +@@ -1199,9 +1199,16 @@ LXTerminal * lxterminal_initialize(LXTermWindow * lxtermwin, CommandArguments * + terminal->window = gtk_window_new(GTK_WINDOW_TOPLEVEL); + + /* Try to get an RGBA visual (colormap) and assign it to the new window. */ +- GdkVisual *visual = gdk_screen_get_rgba_visual(gtk_widget_get_screen(GTK_WIDGET(terminal->window))); +- if (visual != NULL) +- gtk_widget_set_visual(terminal->window, visual); ++ #if GTK_CHECK_VERSION (2, 90, 8) ++ GdkVisual *visual = gdk_screen_get_rgba_visual(gtk_widget_get_screen(GTK_WIDGET(terminal->window))); ++ if (visual != NULL) ++ gtk_widget_set_visual(terminal->window, visual); ++ #else ++ GdkColormap *colormap = gdk_screen_get_rgba_colormap(gtk_widget_get_screen(GTK_WIDGET(terminal->window))); ++ if (colormap != NULL) ++ gtk_widget_set_colormap(terminal->window, colormap); ++ #endif ++ + + /* Set window title. */ + gtk_window_set_title(GTK_WINDOW(terminal->window), ((arguments->title != NULL) ? arguments->title : _("LXTerminal"))); +-- +1.7.0.1 + + diff --git a/lxterminal.changes b/lxterminal.changes index fc038e5..12e910e 100644 --- a/lxterminal.changes +++ b/lxterminal.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Jul 26 10:33:11 UTC 2011 - andrea@opensuse.org + +- added lxterminal-0.1.10-fix-rgba-composite.patch + and lxterminal-0.1.10-fix-desyncronization.patch + to fix upstream bugs 3372388 and 3376800 + ------------------------------------------------------------------- Sun Jul 24 12:14:57 UTC 2011 - andrea@opensuse.org diff --git a/lxterminal.spec b/lxterminal.spec index a616b87..fb4167b 100644 --- a/lxterminal.spec +++ b/lxterminal.spec @@ -29,6 +29,12 @@ 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 +# PATCH-FIX-UPSTREAM lxterminal-0.1.10-fix-rgba-composite.patch +# Fix sourceforge bug #3376800 +Patch1: %name-0.1.10-fix-rgba-composite.patch +# PATCH-FIX-UPSTREAM lxterminal-0.1.10-fix-desyncronization.patch +# fix sourceforge bug #3372388 +Patch2: %name-0.1.10-fix-desyncronization.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: fdupes gtk2-devel intltool pkg-config update-desktop-files BuildRequires: docbook-utils docbook-xsl-stylesheets libxslt-devel @@ -49,6 +55,8 @@ of the LXDE project %prep %setup -q %patch0 -p1 +%patch1 -p1 +%patch2 -p1 %build %configure --enable-man