2.10.12
This commit is contained in:
parent
8381955835
commit
d72c900ba4
File diff suppressed because it is too large
Load Diff
15
gtk2.spec
15
gtk2.spec
@ -10,16 +10,16 @@
|
||||
%define cairo_version %{cairo_base_version}-1
|
||||
%define libpng_version 2:1.2.2-16
|
||||
|
||||
%define base_version 2.10.11
|
||||
%define base_version 2.10.12
|
||||
%define bin_version 2.10.0
|
||||
|
||||
Summary: The GIMP ToolKit (GTK+), a library for creating GUIs for X
|
||||
Name: gtk2
|
||||
Version: %{base_version}
|
||||
Release: 6%{?dist}
|
||||
Release: 1%{?dist}
|
||||
License: LGPL
|
||||
Group: System Environment/Libraries
|
||||
Source: http://ftp.gnome.org/pub/gnome/sources/gtk+/2.10/gtk+-%{version}.tar.bz2
|
||||
Source: http://download.gnome.org/sources/gtk+/2.10/gtk+-%{version}.tar.bz2
|
||||
Source1: update-gdk-pixbuf-loaders
|
||||
Source2: update-gtk-immodules
|
||||
|
||||
@ -28,15 +28,13 @@ Patch0: gtk+-2.4.1-lib64.patch
|
||||
# Fedora patch
|
||||
Patch1: gtk+-2.8.10-set-invisible-char-to-bullet.patch
|
||||
# Filechooser search
|
||||
Patch2: gtk+-2.10.8-search.patch
|
||||
Patch2: gtk+-2.10.12-search.patch
|
||||
# use fam for recent-files
|
||||
Patch3: gtk+-2.10.3-fam.patch
|
||||
# backport from HEAD
|
||||
Patch7: gtk+-2.10.7-cursor-blink.patch
|
||||
# fixed in upstream cvs
|
||||
Patch10: gtk+-2.10.4-im-reset.patch
|
||||
# fixed in upstream cvs
|
||||
Patch11: raw-printers.patch
|
||||
Patch12: gtk+-2.10.11-user-dirs.patch
|
||||
|
||||
BuildRequires: atk-devel >= %{atk_version}
|
||||
@ -123,7 +121,6 @@ docs for the GTK+ widget toolkit.
|
||||
%patch3 -p1 -b .fam
|
||||
%patch7 -p1 -b .cursor-blink
|
||||
%patch10 -p1 -b .im-reset
|
||||
%patch11 -p1 -b .raw-printers
|
||||
%patch12 -p1 -b .user-dirs
|
||||
|
||||
for i in config.guess config.sub ; do
|
||||
@ -291,6 +288,10 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%doc tmpdocs/examples
|
||||
|
||||
%changelog
|
||||
* Sat May 19 2007 Matthias Clasen <mclasen@redhat.com> - 1.10.12-1
|
||||
- Update to 2.10.12
|
||||
- Drop upstreamed patches
|
||||
|
||||
* Tue May 15 2007 Matthias Clasen <mclasen@redhat.com> - 1.10.11-6
|
||||
- Backport some fixes for the ftw()-based search engine
|
||||
|
||||
|
@ -1,353 +0,0 @@
|
||||
--- gtk+-2.10.8/modules/printbackends/cups/gtkcupsutils.h.raw-printers 2007-01-16 22:15:15.000000000 -0500
|
||||
+++ gtk+-2.10.8/modules/printbackends/cups/gtkcupsutils.h 2007-03-28 12:22:59.000000000 -0400
|
||||
@@ -33,6 +33,14 @@
|
||||
|
||||
typedef enum
|
||||
{
|
||||
+ GTK_CUPS_ERROR_HTTP,
|
||||
+ GTK_CUPS_ERROR_IPP,
|
||||
+ GTK_CUPS_ERROR_IO,
|
||||
+ GTK_CUPS_ERROR_GENERAL
|
||||
+} GtkCupsErrorType;
|
||||
+
|
||||
+typedef enum
|
||||
+{
|
||||
GTK_CUPS_POST,
|
||||
GTK_CUPS_GET
|
||||
} GtkCupsRequestType;
|
||||
@@ -126,6 +134,9 @@
|
||||
const gchar *value);
|
||||
gboolean gtk_cups_result_is_error (GtkCupsResult *result);
|
||||
ipp_t * gtk_cups_result_get_response (GtkCupsResult *result);
|
||||
+GtkCupsErrorType gtk_cups_result_get_error_type (GtkCupsResult *result);
|
||||
+int gtk_cups_result_get_error_status (GtkCupsResult *result);
|
||||
+int gtk_cups_result_get_error_code (GtkCupsResult *result);
|
||||
const char * gtk_cups_result_get_error_string (GtkCupsResult *result);
|
||||
|
||||
G_END_DECLS
|
||||
--- gtk+-2.10.8/modules/printbackends/cups/gtkprintbackendcups.c.raw-printers 2007-01-16 22:15:15.000000000 -0500
|
||||
+++ gtk+-2.10.8/modules/printbackends/cups/gtkprintbackendcups.c 2007-03-28 12:22:59.000000000 -0400
|
||||
@@ -572,10 +572,17 @@
|
||||
g_print ("CUPS Backend: %s <source %p>\n", G_STRFUNC, source));
|
||||
|
||||
if (gtk_cups_result_is_error (result))
|
||||
- g_warning ("Error result: %s", gtk_cups_result_get_error_string (result));
|
||||
+ {
|
||||
+ GTK_NOTE (PRINTING,
|
||||
+ g_print("Error result: %s (type %i, status %i, code %i)\n",
|
||||
+ gtk_cups_result_get_error_string (result),
|
||||
+ gtk_cups_result_get_error_type (result),
|
||||
+ gtk_cups_result_get_error_status (result),
|
||||
+ gtk_cups_result_get_error_code (result)));
|
||||
+ }
|
||||
|
||||
ep_callback (GTK_PRINT_BACKEND (dispatch->backend), result, user_data);
|
||||
-
|
||||
+
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -1223,7 +1230,18 @@
|
||||
|
||||
if (gtk_cups_result_is_error (result))
|
||||
{
|
||||
- g_signal_emit_by_name (printer, "details-acquired", FALSE);
|
||||
+ gboolean success = FALSE;
|
||||
+
|
||||
+ /* if we get a 404 then it is just a raw printer without a ppd
|
||||
+ and not an error */
|
||||
+ if ((gtk_cups_result_get_error_type (result) == GTK_CUPS_ERROR_HTTP) &&
|
||||
+ (gtk_cups_result_get_error_status (result) == HTTP_NOT_FOUND))
|
||||
+ {
|
||||
+ gtk_printer_set_has_details (printer, TRUE);
|
||||
+ success = TRUE;
|
||||
+ }
|
||||
+
|
||||
+ g_signal_emit_by_name (printer, "details-acquired", success);
|
||||
return;
|
||||
}
|
||||
|
||||
--- gtk+-2.10.8/modules/printbackends/cups/gtkcupsutils.c.raw-printers 2007-01-16 22:15:15.000000000 -0500
|
||||
+++ gtk+-2.10.8/modules/printbackends/cups/gtkcupsutils.c 2007-03-28 12:23:37.000000000 -0400
|
||||
@@ -51,6 +51,11 @@
|
||||
{
|
||||
gchar *error_msg;
|
||||
ipp_t *ipp_response;
|
||||
+ GtkCupsErrorType error_type;
|
||||
+
|
||||
+ /* some error types like HTTP_ERROR have a status and a code */
|
||||
+ int error_status;
|
||||
+ int error_code;
|
||||
|
||||
guint is_error : 1;
|
||||
guint is_ipp_response : 1;
|
||||
@@ -73,15 +78,20 @@
|
||||
_get_read_data};
|
||||
|
||||
static void
|
||||
-gtk_cups_result_set_error (GtkCupsResult *result,
|
||||
- const char *error_msg,
|
||||
+gtk_cups_result_set_error (GtkCupsResult *result,
|
||||
+ GtkCupsErrorType error_type,
|
||||
+ int error_status,
|
||||
+ int error_code,
|
||||
+ const char *error_msg,
|
||||
...)
|
||||
{
|
||||
va_list args;
|
||||
|
||||
result->is_ipp_response = FALSE;
|
||||
-
|
||||
result->is_error = TRUE;
|
||||
+ result->error_type = error_type;
|
||||
+ result->error_status = error_status;
|
||||
+ result->error_code = error_code;
|
||||
|
||||
va_start (args, error_msg);
|
||||
result->error_msg = g_strdup_vprintf (error_msg, args);
|
||||
@@ -206,7 +216,13 @@
|
||||
if (request->attempts > _GTK_CUPS_MAX_ATTEMPTS &&
|
||||
request->state != GTK_CUPS_REQUEST_DONE)
|
||||
{
|
||||
- gtk_cups_result_set_error (request->result, "Too many failed attempts");
|
||||
+ /* TODO: should add a status or error code for too many failed attempts */
|
||||
+ gtk_cups_result_set_error (request->result,
|
||||
+ GTK_CUPS_ERROR_GENERAL,
|
||||
+ 0,
|
||||
+ 0,
|
||||
+ "Too many failed attempts");
|
||||
+
|
||||
request->state = GTK_CUPS_REQUEST_DONE;
|
||||
request->poll_state = GTK_CUPS_HTTP_IDLE;
|
||||
}
|
||||
@@ -622,7 +638,12 @@
|
||||
request->state = GTK_CUPS_POST_DONE;
|
||||
request->poll_state = GTK_CUPS_HTTP_IDLE;
|
||||
|
||||
- gtk_cups_result_set_error (request->result, "Failed Post");
|
||||
+ /* TODO: should add a status or error code for failed post */
|
||||
+ gtk_cups_result_set_error (request->result,
|
||||
+ GTK_CUPS_ERROR_GENERAL,
|
||||
+ 0,
|
||||
+ 0,
|
||||
+ "Failed Post");
|
||||
}
|
||||
|
||||
request->attempts++;
|
||||
@@ -649,10 +670,16 @@
|
||||
|
||||
if (ipp_status == IPP_ERROR)
|
||||
{
|
||||
+ int cups_error = cupsLastError ();
|
||||
request->state = GTK_CUPS_POST_DONE;
|
||||
request->poll_state = GTK_CUPS_HTTP_IDLE;
|
||||
|
||||
- gtk_cups_result_set_error (request->result, "%s",ippErrorString (cupsLastError ()));
|
||||
+ gtk_cups_result_set_error (request->result,
|
||||
+ GTK_CUPS_ERROR_IPP,
|
||||
+ ipp_status,
|
||||
+ cups_error,
|
||||
+ "%s",
|
||||
+ ippErrorString (cups_error));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -708,7 +735,12 @@
|
||||
request->state = GTK_CUPS_POST_DONE;
|
||||
request->poll_state = GTK_CUPS_HTTP_IDLE;
|
||||
|
||||
- gtk_cups_result_set_error (request->result, "Error reading from cache file: %s", error->message);
|
||||
+ gtk_cups_result_set_error (request->result,
|
||||
+ GTK_CUPS_ERROR_IO,
|
||||
+ io_status,
|
||||
+ error->code,
|
||||
+ "Error reading from cache file: %s",
|
||||
+ error->message);
|
||||
|
||||
g_error_free (error);
|
||||
return;
|
||||
@@ -729,10 +761,19 @@
|
||||
if (httpWrite(request->http, buffer, (int) bytes) < bytes)
|
||||
#endif /* HAVE_CUPS_API_1_2 */
|
||||
{
|
||||
+ int http_errno;
|
||||
+
|
||||
+ http_errno = httpError (request->http);
|
||||
+
|
||||
request->state = GTK_CUPS_POST_DONE;
|
||||
request->poll_state = GTK_CUPS_HTTP_IDLE;
|
||||
|
||||
- gtk_cups_result_set_error (request->result, "Error writting to socket in Post %s", strerror (httpError (request->http)));
|
||||
+ gtk_cups_result_set_error (request->result,
|
||||
+ GTK_CUPS_ERROR_HTTP,
|
||||
+ http_status,
|
||||
+ http_errno,
|
||||
+ "Error writing to socket in Post %s",
|
||||
+ g_strerror (http_errno));
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -765,7 +806,12 @@
|
||||
request->state = GTK_CUPS_POST_DONE;
|
||||
request->poll_state = GTK_CUPS_HTTP_IDLE;
|
||||
|
||||
- gtk_cups_result_set_error (request->result, "Can't prompt for authorization");
|
||||
+ /* TODO: create a not implemented error code */
|
||||
+ gtk_cups_result_set_error (request->result,
|
||||
+ GTK_CUPS_ERROR_GENERAL,
|
||||
+ 0,
|
||||
+ 0,
|
||||
+ "Can't prompt for authorization");
|
||||
return;
|
||||
}
|
||||
else if (http_status == HTTP_ERROR)
|
||||
@@ -785,7 +831,12 @@
|
||||
request->state = GTK_CUPS_POST_DONE;
|
||||
request->poll_state = GTK_CUPS_HTTP_IDLE;
|
||||
|
||||
- gtk_cups_result_set_error (request->result, "Unknown HTTP error");
|
||||
+ gtk_cups_result_set_error (request->result,
|
||||
+ GTK_CUPS_ERROR_HTTP,
|
||||
+ http_status,
|
||||
+ error,
|
||||
+ "Unknown HTTP error");
|
||||
+
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -817,7 +868,12 @@
|
||||
else
|
||||
{
|
||||
request->state = GTK_CUPS_POST_DONE;
|
||||
- gtk_cups_result_set_error (request->result, "HTTP Error in POST %s", strerror (http_errno));
|
||||
+ gtk_cups_result_set_error (request->result,
|
||||
+ GTK_CUPS_ERROR_HTTP,
|
||||
+ http_status,
|
||||
+ http_errno,
|
||||
+ "HTTP Error in POST %s",
|
||||
+ g_strerror (http_errno));
|
||||
request->poll_state = GTK_CUPS_HTTP_IDLE;
|
||||
|
||||
httpFlush(request->http);
|
||||
@@ -866,7 +922,13 @@
|
||||
|
||||
if (ipp_status == IPP_ERROR)
|
||||
{
|
||||
- gtk_cups_result_set_error (request->result, "%s", ippErrorString (cupsLastError()));
|
||||
+ int ipp_error = cupsLastError ();
|
||||
+ gtk_cups_result_set_error (request->result,
|
||||
+ GTK_CUPS_ERROR_IPP,
|
||||
+ ipp_status,
|
||||
+ ipp_error,
|
||||
+ "%s",
|
||||
+ ippErrorString (ipp_error));
|
||||
|
||||
ippDelete (request->result->ipp_response);
|
||||
request->result->ipp_response = NULL;
|
||||
@@ -891,7 +953,12 @@
|
||||
|
||||
if (request->data_io == NULL)
|
||||
{
|
||||
- gtk_cups_result_set_error (request->result, "Get requires an open io channel");
|
||||
+ gtk_cups_result_set_error (request->result,
|
||||
+ GTK_CUPS_ERROR_IO,
|
||||
+ G_IO_STATUS_ERROR,
|
||||
+ G_IO_CHANNEL_ERROR_FAILED,
|
||||
+ "Get requires an open io channel");
|
||||
+
|
||||
request->state = GTK_CUPS_GET_DONE;
|
||||
request->poll_state = GTK_CUPS_HTTP_IDLE;
|
||||
|
||||
@@ -909,8 +976,13 @@
|
||||
{
|
||||
request->state = GTK_CUPS_GET_DONE;
|
||||
request->poll_state = GTK_CUPS_HTTP_IDLE;
|
||||
-
|
||||
- gtk_cups_result_set_error (request->result, "Failed Get");
|
||||
+
|
||||
+ /* TODO: should add a status or error code for failed GET */
|
||||
+ gtk_cups_result_set_error (request->result,
|
||||
+ GTK_CUPS_ERROR_GENERAL,
|
||||
+ 0,
|
||||
+ 0,
|
||||
+ "Failed Get");
|
||||
}
|
||||
|
||||
request->attempts++;
|
||||
@@ -947,8 +1019,13 @@
|
||||
g_warning ("NOT IMPLEMENTED: We need to prompt for authorization in a non blocking manner");
|
||||
request->state = GTK_CUPS_GET_DONE;
|
||||
request->poll_state = GTK_CUPS_HTTP_IDLE;
|
||||
-
|
||||
- gtk_cups_result_set_error (request->result, "Can't prompt for authorization");
|
||||
+
|
||||
+ /* TODO: should add a status or error code for not implemented */
|
||||
+ gtk_cups_result_set_error (request->result,
|
||||
+ GTK_CUPS_ERROR_GENERAL,
|
||||
+ 0,
|
||||
+ 0,
|
||||
+ "Can't prompt for authorization");
|
||||
return;
|
||||
}
|
||||
/* TODO: detect ssl in configure.ac */
|
||||
@@ -967,7 +1044,7 @@
|
||||
request->attempts++;
|
||||
goto again;
|
||||
}
|
||||
-#endif
|
||||
+#endif
|
||||
else if (http_status != HTTP_OK)
|
||||
{
|
||||
int http_errno;
|
||||
@@ -979,7 +1056,12 @@
|
||||
else
|
||||
{
|
||||
request->state = GTK_CUPS_GET_DONE;
|
||||
- gtk_cups_result_set_error (request->result, "HTTP Error in GET %s", strerror (http_errno));
|
||||
+ gtk_cups_result_set_error (request->result,
|
||||
+ GTK_CUPS_ERROR_HTTP,
|
||||
+ http_status,
|
||||
+ http_errno,
|
||||
+ "HTTP Error in GET %s",
|
||||
+ g_strerror (http_errno));
|
||||
request->poll_state = GTK_CUPS_HTTP_IDLE;
|
||||
httpFlush(request->http);
|
||||
|
||||
@@ -1055,7 +1137,11 @@
|
||||
request->state = GTK_CUPS_POST_DONE;
|
||||
request->poll_state = GTK_CUPS_HTTP_IDLE;
|
||||
|
||||
- gtk_cups_result_set_error (request->result, error->message);
|
||||
+ gtk_cups_result_set_error (request->result,
|
||||
+ GTK_CUPS_ERROR_IO,
|
||||
+ io_status,
|
||||
+ error->code,
|
||||
+ error->message);
|
||||
g_error_free (error);
|
||||
}
|
||||
}
|
||||
@@ -1078,6 +1164,24 @@
|
||||
return result->ipp_response;
|
||||
}
|
||||
|
||||
+GtkCupsErrorType
|
||||
+gtk_cups_result_get_error_type (GtkCupsResult *result)
|
||||
+{
|
||||
+ return result->error_type;
|
||||
+}
|
||||
+
|
||||
+int
|
||||
+gtk_cups_result_get_error_status (GtkCupsResult *result)
|
||||
+{
|
||||
+ return result->error_status;
|
||||
+}
|
||||
+
|
||||
+int
|
||||
+gtk_cups_result_get_error_code (GtkCupsResult *result)
|
||||
+{
|
||||
+ return result->error_code;
|
||||
+}
|
||||
+
|
||||
const char *
|
||||
gtk_cups_result_get_error_string (GtkCupsResult *result)
|
||||
{
|
Loading…
Reference in New Issue
Block a user