diff -Nru gtk+2.0-2.24.10/debian/changelog gtk+2.0-2.24.10/debian/changelog --- gtk+2.0-2.24.10/debian/changelog 2012-03-26 16:56:07.000000000 +0530 +++ gtk+2.0-2.24.10/debian/changelog 2014-02-04 11:48:36.000000000 +0530 @@ -1,3 +1,10 @@ +gtk+2.0 (2.24.10-0ubuntu7) precise; urgency=low + + * debian/patches/print-search.patch: + - The list of printers should be searchable/sortable (lp: #1188571) + + -- Ritesh Khadgaray Mon, 03 Feb 2014 16:19:55 +0530 + gtk+2.0 (2.24.10-0ubuntu6) precise-proposed; urgency=low * debian/control.in: Add an extra Breaks: gir1.0-gtk-2.0, to nudge apt to diff -Nru gtk+2.0-2.24.10/debian/control gtk+2.0-2.24.10/debian/control --- gtk+2.0-2.24.10/debian/control 2012-03-26 16:56:24.000000000 +0530 +++ gtk+2.0-2.24.10/debian/control 2014-02-04 14:44:44.000000000 +0530 @@ -3,7 +3,7 @@ Priority: optional Maintainer: Ubuntu Desktop Team XSBC-Original-Maintainer: Debian GNOME Maintainers -Uploaders: Debian GNOME Maintainers , Josselin Mouette +Uploaders: Debian GNOME Maintainers Build-Depends: debhelper (>= 8.1.3), gettext, gtk-doc-tools (>= 1.11), diff -Nru gtk+2.0-2.24.10/debian/patches/print-search.patch gtk+2.0-2.24.10/debian/patches/print-search.patch --- gtk+2.0-2.24.10/debian/patches/print-search.patch 1970-01-01 05:30:00.000000000 +0530 +++ gtk+2.0-2.24.10/debian/patches/print-search.patch 2014-02-04 11:46:32.000000000 +0530 @@ -0,0 +1,111 @@ +diff -Naurp gtk+3.0-3.4.2/gtk/gtkprintunixdialog.c gtk+3.0-3.4.2.orig/gtk/gtkprintunixdialog.c +--- gtk+3.0-3.4.2/gtk/gtkprintunixdialog.c 2012-03-19 02:14:22.000000000 +0530 ++++ gtk+3.0-3.4.2.orig/gtk/gtkprintunixdialog.c 2014-02-04 11:30:37.677795000 +0530 +@@ -172,7 +172,13 @@ static void set_cell_sensitivity_fun + gpointer data); + static gboolean set_active_printer (GtkPrintUnixDialog *dialog, + const gchar *printer_name); ++ + static void redraw_page_layout_preview (GtkPrintUnixDialog *dialog); ++static gboolean printer_compare (GtkTreeModel *model, ++ gint column, ++ const gchar *key, ++ GtkTreeIter *iter, ++ gpointer search_data); + + /* GtkBuildable */ + static void gtk_print_unix_dialog_buildable_init (GtkBuildableIface *iface); +@@ -2027,6 +2033,85 @@ selected_printer_changed (GtkTreeSelecti + g_object_notify ( G_OBJECT(dialog), "selected-printer"); + } + ++static gboolean ++printer_compare (GtkTreeModel *model, ++ gint column, ++ const gchar *key, ++ GtkTreeIter *iter, ++ gpointer search_data) ++{ ++ gboolean matches = FALSE; ++ ++ if (key != NULL) ++ { ++ gchar *name = NULL; ++ gchar *location = NULL; ++ gchar *casefold_key = NULL; ++ gchar *casefold_name = NULL; ++ gchar *casefold_location = NULL; ++ gchar **keys; ++ gchar *tmp1, *tmp2; ++ gint i; ++ ++ gtk_tree_model_get (model, iter, ++ PRINTER_LIST_COL_NAME, &name, ++ PRINTER_LIST_COL_LOCATION, &location, ++ -1); ++ ++ casefold_key = g_utf8_casefold (key, -1); ++ ++ if (name != NULL) ++ { ++ casefold_name = g_utf8_casefold (name, -1); ++ g_free (name); ++ } ++ ++ if (location != NULL) ++ { ++ casefold_location = g_utf8_casefold (location, -1); ++ g_free (location); ++ } ++ ++ if (casefold_name != NULL || ++ casefold_location != NULL) ++ { ++ keys = g_strsplit_set (casefold_key, " \t", 0); ++ if (keys != NULL) ++ { ++ matches = TRUE; ++ ++ for (i = 0; keys[i] != NULL; i++) ++ { ++ if (keys[i][0] != '\0') ++ { ++ tmp1 = tmp2 = NULL; ++ ++ if (casefold_name != NULL) ++ tmp1 = g_strstr_len (casefold_name, -1, keys[i]); ++ ++ if (casefold_location != NULL) ++ tmp2 = g_strstr_len (casefold_location, -1, keys[i]); ++ ++ if (tmp1 == NULL && tmp2 == NULL) ++ { ++ matches = FALSE; ++ break; ++ } ++ } ++ } ++ ++ g_strfreev (keys); ++ } ++ } ++ ++ g_free (casefold_location); ++ g_free (casefold_name); ++ g_free (casefold_key); ++ } ++ ++ return !matches; ++} ++ + static void + update_collate_icon (GtkToggleButton *toggle_button, + GtkPrintUnixDialog *dialog) +@@ -2216,6 +2301,7 @@ create_main_page (GtkPrintUnixDialog *di + gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (treeview), TRUE); + gtk_tree_view_set_search_column (GTK_TREE_VIEW (treeview), PRINTER_LIST_COL_NAME); + gtk_tree_view_set_enable_search (GTK_TREE_VIEW (treeview), TRUE); ++ gtk_tree_view_set_search_equal_func (GTK_TREE_VIEW (treeview), printer_compare, treeview, NULL); + selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview)); + gtk_tree_selection_set_mode (selection, GTK_SELECTION_BROWSE); + g_signal_connect (selection, "changed", G_CALLBACK (selected_printer_changed), dialog); diff -Nru gtk+2.0-2.24.10/debian/patches/series gtk+2.0-2.24.10/debian/patches/series --- gtk+2.0-2.24.10/debian/patches/series 2012-03-26 16:56:07.000000000 +0530 +++ gtk+2.0-2.24.10/debian/patches/series 2014-02-04 11:46:49.000000000 +0530 @@ -25,4 +25,4 @@ 098_multiarch_module_path.patch 099_printer_filename_fix.patch 100_overlay_scrollbar_loading.patch - +print-search.patch