diff --git a/lxterminal-0.1.8-fix-alt_n-sf3006779.patch b/lxterminal-0.1.8-fix-alt_n-sf3006779.patch deleted file mode 100644 index 72d7b50..0000000 --- a/lxterminal-0.1.8-fix-alt_n-sf3006779.patch +++ /dev/null @@ -1,711 +0,0 @@ -diff -uNr old-lxterminal-0.1.8//data/lxterminal-preferences.glade lxterminal-0.1.8/data/lxterminal-preferences.glade ---- old-lxterminal-0.1.8//data/lxterminal-preferences.glade 2010-07-20 01:13:53.532837321 +0200 -+++ lxterminal-0.1.8/data/lxterminal-preferences.glade 1970-01-01 01:00:00.000000000 +0100 -@@ -1,537 +0,0 @@ -- -- -- -- -- -- -- -- -- -- -- -- Top -- -- -- Bottom -- -- -- Left -- -- -- Right -- -- -- -- -- 5 -- normal -- False -- -- -- True -- vertical -- 2 -- -- -- True -- True -- -- -- True -- 8 -- 2 -- 5 -- 3 -- -- -- True -- 1 -- Terminal font -- -- -- -- -- True -- True -- True -- -- -- 1 -- 2 -- -- -- -- -- True -- 1 -- Background -- -- -- 1 -- 2 -- -- -- -- -- True -- True -- True -- True -- #000000000000 -- -- -- 1 -- 2 -- 1 -- 2 -- -- -- -- -- True -- True -- True -- #000000000000 -- -- -- 1 -- 2 -- 2 -- 3 -- -- -- -- -- True -- 1 -- Foreground -- -- -- 2 -- 3 -- -- -- -- -- True -- 1 -- Allow bold font -- -- -- 3 -- 4 -- -- -- -- -- True -- True -- False -- True -- -- -- 1 -- 2 -- 3 -- 4 -- -- -- -- -- True -- 1 -- Cursor blink -- -- -- 4 -- 5 -- -- -- -- -- True -- True -- False -- True -- -- -- 1 -- 2 -- 4 -- 5 -- -- -- -- -- True -- 1 -- Cursor style -- -- -- 5 -- 7 -- -- -- -- -- Block -- True -- True -- False -- True -- True -- -- -- 1 -- 2 -- 5 -- 6 -- -- -- -- -- Underline -- True -- True -- False -- True -- True -- cursor_style_block -- -- -- 1 -- 2 -- 6 -- 7 -- -- -- -- -- True -- 1 -- Audible bell -- -- -- 7 -- 8 -- -- -- -- -- True -- True -- False -- True -- -- -- 1 -- 2 -- 7 -- 8 -- -- -- -- -- -- -- True -- Style -- -- -- False -- -- -- -- -- True -- 5 -- 2 -- 5 -- 3 -- -- -- True -- 1 -- Tab panel position -- -- -- -- -- True -- 1 -- Scrollback lines -- -- -- 1 -- 2 -- -- -- -- -- True -- 1 -- Hide scroll bar -- -- -- 2 -- 3 -- -- -- -- -- True -- 1 -- Hide menu bar -- -- -- 3 -- 4 -- -- -- -- -- True -- True -- False -- True -- -- -- 1 -- 2 -- 3 -- 4 -- -- -- -- -- True -- liststore1 -- -- -- -- 0 -- -- -- -- -- 1 -- 2 -- GTK_SHRINK -- -- -- -- -- True -- True -- -- scrollback_lines_adjustment -- -- -- 1 -- 2 -- 1 -- 2 -- -- -- -- -- True -- True -- False -- True -- -- -- 1 -- 2 -- 2 -- 3 -- -- -- -- -- True -- 1 -- Hide Close buttons -- -- -- 4 -- 5 -- -- -- -- -- True -- True -- False -- True -- -- -- 1 -- 2 -- 4 -- 5 -- -- -- -- -- 1 -- -- -- -- -- True -- Display -- -- -- 1 -- False -- -- -- -- -- True -- 3 -- 2 -- 5 -- 3 -- -- -- True -- 1 -- Select-by-word characters -- -- -- -- -- True -- 1 -- Disable menu shortcut key (F10 by default) -- -- -- 1 -- 2 -- -- -- -- -- True -- True -- False -- True -- -- -- 1 -- 2 -- 1 -- 2 -- -- -- -- -- True -- 1 -- Disable using Alt-n to switch tabs -- -- -- 2 -- 3 -- -- -- -- -- True -- True -- False -- True -- -- -- 1 -- 2 -- 2 -- 3 -- -- -- -- -- True -- True -- -- -- -- 1 -- 2 -- -- -- -- -- 2 -- -- -- -- -- True -- Advanced -- -- -- 2 -- False -- -- -- -- -- 1 -- -- -- -- -- True -- end -- -- -- gtk-cancel -- True -- True -- True -- True -- -- -- False -- False -- 0 -- -- -- -- -- gtk-ok -- True -- True -- True -- True -- -- -- False -- False -- 1 -- -- -- -- -- False -- end -- 0 -- -- -- -- -- -- Cancel_button -- OK_button -- -- -- -- 1000 -- 100000 -- 10 -- 10 -- -- -diff -uNr old-lxterminal-0.1.8//src/lxterminal.c lxterminal-0.1.8/src/lxterminal.c ---- old-lxterminal-0.1.8//src/lxterminal.c 2010-07-20 01:13:53.516834944 +0200 -+++ lxterminal-0.1.8/src/lxterminal.c 2010-07-20 01:14:24.972842488 +0200 -@@ -68,6 +68,7 @@ - - /* Menu and accelerator event handlers. */ - static void terminal_initialize_switch_tab_accelerator(Term * term); -+static void terminal_set_disable_alt(Term *term, gboolean disable_alt); - static void terminal_switch_tab_accelerator(Term * term); - static void terminal_new_window_activate_event(GtkAction * action, LXTerminal * terminal); - static void terminal_new_window_accelerator(LXTerminal * terminal, guint action, GtkWidget * item); -@@ -300,7 +301,23 @@ - - /* Define the accelerator. */ - term->closure = g_cclosure_new_swap(G_CALLBACK(terminal_switch_tab_accelerator), term, NULL); -- gtk_accel_group_connect(term->parent->accel_group, key, mods, GTK_ACCEL_LOCKED, term->closure); -+ if (gtk_accel_group_from_accel_closure(term->closure) == NULL) -+ gtk_accel_group_connect(term->parent->accel_group, key, mods, GTK_ACCEL_LOCKED, term->closure); -+ } -+} -+ -+/* whether disable alt-n to switch tabs or not. */ -+void terminal_set_disable_alt(Term * term, gboolean disable_alt) -+{ -+ if (GTK_IS_ACCEL_GROUP(term->parent->accel_group)) -+ { -+ if (disable_alt) -+ { -+ if (term->closure != NULL) -+ gtk_accel_group_disconnect(term->parent->accel_group, term->closure); -+ } -+ else -+ terminal_initialize_switch_tab_accelerator(term); - } - } - -@@ -378,7 +395,9 @@ - terminal_window_set_fixed_size(terminal); - gtk_notebook_set_show_tabs(GTK_NOTEBOOK(term->parent->notebook), TRUE); - } -- terminal_initialize_switch_tab_accelerator(term); -+ -+ /* Disable Alt-n switch tabs or not. */ -+ terminal_set_disable_alt(term, terminal->setting->disable_alt); - } - - /* Handler for accelerator T. Open a new tab. */ -@@ -936,7 +955,8 @@ - /* Deallocate a Term structure. */ - static void terminal_free(Term * term) - { -- gtk_accel_group_disconnect(term->parent->accel_group, term->closure); -+ if ((GTK_IS_ACCEL_GROUP(term->parent->accel_group)) && (term->closure != NULL)) -+ gtk_accel_group_disconnect(term->parent->accel_group, term->closure); - g_free(term); - } - -@@ -945,11 +965,11 @@ - { - /* Initialize UI manager. */ - GtkUIManager * manager = gtk_ui_manager_new(); -- GtkActionGroup * action_group = gtk_action_group_new("MenuBar"); -- gtk_action_group_set_translation_domain(action_group, GETTEXT_PACKAGE); -- gtk_action_group_add_actions(action_group, menus, MENUBAR_MENU_COUNT, terminal); -- gtk_action_group_add_actions(action_group, menu_items, MENUBAR_MENUITEM_COUNT, terminal); -- gtk_ui_manager_insert_action_group(manager, action_group, 0); -+ terminal->action_group = gtk_action_group_new("MenuBar"); -+ gtk_action_group_set_translation_domain(terminal->action_group, GETTEXT_PACKAGE); -+ gtk_action_group_add_actions(terminal->action_group, menus, MENUBAR_MENU_COUNT, terminal); -+ gtk_action_group_add_actions(terminal->action_group, menu_items, MENUBAR_MENUITEM_COUNT, terminal); -+ gtk_ui_manager_insert_action_group(manager, terminal->action_group, 0); - - guint merge_id = gtk_ui_manager_new_merge_id(manager); - gtk_ui_manager_add_ui(manager, merge_id, "/", "MenuBar", NULL, GTK_UI_MANAGER_MENUBAR, FALSE); -@@ -1223,7 +1243,6 @@ - - /* Initialize accelerators. */ - terminal_accelerator_initialize(terminal); -- terminal_initialize_switch_tab_accelerator(term); - - /* Update terminal settings. */ - terminal_settings_apply(terminal); -@@ -1248,7 +1267,10 @@ - /* Apply settings to all windows. */ - int i; - for (i = 0; i < terminal->terms->len; i += 1) -+ { - terminal_settings_apply_to_term(terminal, g_ptr_array_index(terminal->terms, i)); -+ terminal_set_disable_alt(g_ptr_array_index(terminal->terms, i), terminal->setting->disable_alt); -+ } - - /* Update tab position. */ - terminal->tab_position = terminal_tab_get_position_id(terminal->setting->tab_position); -diff -uNr old-lxterminal-0.1.8//src/lxterminal.h lxterminal-0.1.8/src/lxterminal.h ---- old-lxterminal-0.1.8//src/lxterminal.h 2010-07-20 01:13:53.524842419 +0200 -+++ lxterminal-0.1.8/src/lxterminal.h 2010-07-20 01:14:24.976839137 +0200 -@@ -52,6 +52,7 @@ - GtkWidget * window; /* Toplevel window */ - GtkWidget * box; /* Vertical box, child of toplevel window */ - GtkWidget * menu; /* Menu bar, child of vertical box */ -+ GtkActionGroup *action_group; /* Action group on this window */ - GtkAccelGroup * accel_group; /* Accelerator group for accelerators on this window */ - GtkWidget * notebook; /* Notebook, child of vertical box */ - GPtrArray * terms; /* Array of pointers to Term structures */ -diff -uNr old-lxterminal-0.1.8//src/preferences.c lxterminal-0.1.8/src/preferences.c ---- old-lxterminal-0.1.8//src/preferences.c 2010-07-20 01:13:53.508834315 +0200 -+++ lxterminal-0.1.8/src/preferences.c 2010-07-20 01:14:24.980837810 +0200 -@@ -41,6 +41,7 @@ - static void preferences_dialog_hide_close_button_toggled_event(GtkToggleButton * widget, LXTerminal * terminal); - static gboolean preferences_dialog_selection_focus_out_event(GtkWidget * widget, GdkEventFocus * event, LXTerminal * terminal); - static void preferences_dialog_disable_f10_toggled_event(GtkToggleButton * widget, LXTerminal * terminal); -+static void preferences_dialog_disable_alt_toggled_event(GtkToggleButton * widget, LXTerminal * terminal); - - /* Handler for "response" signal on preferences dialog. */ - static void preferences_dialog_response_event(GtkWidget * dialog, gint response, LXTerminal * terminal) -@@ -170,6 +171,13 @@ - terminal_settings_apply_to_all(terminal); - } - -+/* Handler for "toggled" signal on Disable Alt toggle button. */ -+static void preferences_dialog_disable_alt_toggled_event(GtkToggleButton * widget, LXTerminal * terminal) -+{ -+ terminal->setting->disable_alt = gtk_toggle_button_get_active(widget); -+ terminal_settings_apply_to_all(terminal); -+} -+ - /* Convert the user preference on tab position, expressed as a string, to the internal representation. - * These have to match the order in the .glade file. */ - gint terminal_tab_get_position_id(gchar * position) -@@ -261,6 +269,10 @@ - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w), setting->disable_f10); - g_signal_connect(G_OBJECT(w), "toggled", G_CALLBACK(preferences_dialog_disable_f10_toggled_event), terminal); - -+ w = GTK_WIDGET(gtk_builder_get_object(builder, "disable_alt")); -+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w), setting->disable_alt); -+ g_signal_connect(G_OBJECT(w), "toggled", G_CALLBACK(preferences_dialog_disable_alt_toggled_event), terminal); -+ - gtk_widget_show_all(dialog); - g_object_unref(builder); - } -diff -uNr old-lxterminal-0.1.8//src/setting.c lxterminal-0.1.8/src/setting.c ---- old-lxterminal-0.1.8//src/setting.c 2010-07-20 01:13:53.520868259 +0200 -+++ lxterminal-0.1.8/src/setting.c 2010-07-20 01:14:24.984836622 +0200 -@@ -55,6 +55,7 @@ - g_key_file_set_boolean(setting->keyfile, "general", "hideclosebutton", setting->hide_close_button); - g_key_file_set_string(setting->keyfile, "general", "selchars", setting->word_selection_characters); - g_key_file_set_boolean(setting->keyfile, "general", "disablef10", setting->disable_f10); -+ g_key_file_set_boolean(setting->keyfile, "general", "disablealt", setting->disable_alt); - - /* Convert GKeyFile to text and build path to configuration file. */ - gchar * file_data = g_key_file_to_data(setting->keyfile, NULL, NULL); -@@ -113,6 +114,7 @@ - setting->hide_close_button = g_key_file_get_boolean(setting->keyfile, "general", "hideclosebutton", NULL); - setting->word_selection_characters = g_key_file_get_string(setting->keyfile, "general", "selchars", NULL); - setting->disable_f10 = g_key_file_get_boolean(setting->keyfile, "general", "disablef10", NULL); -+ setting->disable_alt = g_key_file_get_boolean(setting->keyfile, "general", "disablealt", NULL); - } - - /* Default configuration strings. */ -diff -uNr old-lxterminal-0.1.8//src/setting.h lxterminal-0.1.8/src/setting.h ---- old-lxterminal-0.1.8//src/setting.h 2010-07-20 01:13:53.508834315 +0200 -+++ lxterminal-0.1.8/src/setting.h 2010-07-20 01:14:24.984836622 +0200 -@@ -42,6 +42,7 @@ - gboolean hide_close_button; /* True if close buttons are NOT visible */ - char * word_selection_characters; /* Characters that act as word breaks during selection by word */ - gboolean disable_f10; /* True if F10 will be passed to program; false if it brings up File menu */ -+ gboolean disable_alt; /* True if Alt-n is passed to shell; false if it is used to switch between tabs */ - - gboolean geometry_change; /* True if there is a geometry change, until it has been acted on */ -