- Run gtk-update-icon-cache in %post and %postun (RH bug #234018).

This commit is contained in:
Matthew Barnes 2007-03-27 01:59:00 +00:00
parent 8c7c2b0697
commit e7cd765a7c
4 changed files with 3674 additions and 6 deletions

View File

@ -0,0 +1,39 @@
--- evolution-2.10.0/mail/em-utils.c.drop-old-glib-support 2007-03-18 08:17:46.000000000 -0400
+++ evolution-2.10.0/mail/em-utils.c 2007-03-18 08:24:07.000000000 -0400
@@ -42,10 +42,6 @@
#undef interface
#endif
-#if !GLIB_CHECK_VERSION (2, 8, 0)
-#define g_access access
-#endif
-
#include <camel/camel-stream-fs.h>
#include <camel/camel-url-scanner.h>
#include <camel/camel-file-utils.h>
--- evolution-2.10.0/mail/mail-config.c.drop-old-glib-support 2007-01-03 10:34:12.000000000 -0500
+++ evolution-2.10.0/mail/mail-config.c 2007-03-18 08:24:07.000000000 -0400
@@ -76,10 +76,6 @@
#include "mail-mt.h"
#include "mail-tools.h"
-#if !GLIB_CHECK_VERSION (2, 8, 0)
-#define g_creat creat
-#endif
-
/* Note, the first element of each MailConfigLabel must NOT be translated */
MailConfigLabel label_defaults[5] = {
{ "important", N_("I_mportant"), "#ff0000" }, /* red */
--- evolution-2.10.0/plugins/save-attachments/save-attachments.c.drop-old-glib-support 2007-03-18 08:17:29.000000000 -0400
+++ evolution-2.10.0/plugins/save-attachments/save-attachments.c 2007-03-18 08:24:07.000000000 -0400
@@ -32,10 +32,6 @@
#include <glib/gi18n.h>
#include <glib/gstdio.h>
-#if !GLIB_CHECK_VERSION (2, 8, 0)
-#define g_access access
-#endif
-
#include <gtk/gtkcheckbutton.h>
#include <gtk/gtkdialog.h>
#include <gtk/gtkmessagedialog.h>

View File

@ -0,0 +1,274 @@
--- evolution-2.10.0/shell/main.c.shell-main-cleanups 2007-03-17 22:19:29.000000000 -0400
+++ evolution-2.10.0/shell/main.c 2007-03-17 22:21:01.000000000 -0400
@@ -88,6 +88,9 @@
#include "e-util/e-plugin.h"
+#define SKIP_WARNING_DIALOG_KEY \
+ "/apps/evolution/shell/skip_warning_dialog"
+
static EShell *shell = NULL;
/* Command-line options. */
@@ -100,7 +103,7 @@
#endif
static gboolean disable_eplugin = FALSE;
-static gint idle_cb (void *data);
+static gboolean idle_cb (gchar **uris);
static char *default_component_id = NULL;
static char *evolution_debug_log = NULL;
@@ -133,6 +136,7 @@
system (KILL_PROCESS_CMD " -9 evolution-data-server-1.2 2> /dev/null");
system (KILL_PROCESS_CMD " -9 evolution-data-server-1.4 2> /dev/null");
system (KILL_PROCESS_CMD " -9 evolution-data-server-1.6 2> /dev/null");
+ system (KILL_PROCESS_CMD " -9 evolution-data-server-1.8 2> /dev/null");
system (KILL_PROCESS_CMD " -9 lt-evolution-alarm-notify 2> /dev/null");
system (KILL_PROCESS_CMD " -9 evolution-alarm-notify 2> /dev/null");
@@ -182,35 +186,15 @@
/* Warning dialog to scare people off a little bit. */
-static void
-warning_dialog_response_callback (GtkDialog *dialog,
- int button_number,
- void *data)
-{
- GtkCheckButton *dont_bother_me_again_checkbox;
- GConfClient *client;
-
- dont_bother_me_again_checkbox = GTK_CHECK_BUTTON (data);
-
- client = gconf_client_get_default ();
- gconf_client_set_bool (client, "/apps/evolution/shell/skip_warning_dialog",
- gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dont_bother_me_again_checkbox)),
- NULL);
- g_object_unref (client);
-
- gtk_widget_destroy (GTK_WIDGET (dialog));
-
- idle_cb(NULL);
-}
-
-static void
+static gboolean
show_development_warning(void)
{
GtkWidget *vbox;
GtkWidget *label;
GtkWidget *warning_dialog;
- GtkWidget *dont_bother_me_again_checkbox;
+ GtkWidget *checkbox;
GtkWidget *alignment;
+ gboolean skip;
char *text;
warning_dialog = gtk_dialog_new ();
@@ -262,59 +246,58 @@
gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, TRUE, 0);
- dont_bother_me_again_checkbox = gtk_check_button_new_with_label (_("Do not tell me again"));
+ checkbox = gtk_check_button_new_with_label (_("Do not tell me again"));
alignment = gtk_alignment_new (0.0, 0.0, 0.0, 0.0);
- gtk_container_add (GTK_CONTAINER (alignment), dont_bother_me_again_checkbox);
+ gtk_container_add (GTK_CONTAINER (alignment), checkbox);
gtk_box_pack_start (GTK_BOX (vbox), alignment, TRUE, TRUE, 0);
gtk_widget_show_all (warning_dialog);
- g_signal_connect (warning_dialog, "response",
- G_CALLBACK (warning_dialog_response_callback),
- dont_bother_me_again_checkbox);
+ gtk_dialog_run (GTK_DIALOG (warning_dialog));
+
+ skip = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (checkbox));
+
+ gtk_widget_destroy (warning_dialog);
+
+ idle_cb (NULL);
+
+ return skip;
}
static void
-destroy_config (void)
+destroy_config (GConfClient *client)
{
- GConfClient *gconf;
-
- gconf = gconf_client_get_default ();
-
/* Unset the source stuff */
- gconf_client_unset (gconf, "/apps/evolution/calendar/sources", NULL);
- gconf_client_unset (gconf, "/apps/evolution/tasks/sources", NULL);
- gconf_client_unset (gconf, "/apps/evolution/addressbook/sources", NULL);
- gconf_client_unset (gconf, "/apps/evolution/addressbook/sources", NULL);
+ gconf_client_unset (client, "/apps/evolution/calendar/sources", NULL);
+ gconf_client_unset (client, "/apps/evolution/tasks/sources", NULL);
+ gconf_client_unset (client, "/apps/evolution/addressbook/sources", NULL);
/* Reset the version */
- gconf_client_set_string (gconf, "/apps/evolution/version", "1.4.0", NULL);
+ gconf_client_set_string (client, "/apps/evolution/version", "1.4.0", NULL);
/* Clear the dir */
system ("rm -Rf ~/.evolution");
-
- g_object_unref (gconf);
}
#endif /* DEVELOPMENT */
static void
-open_uris (GNOME_Evolution_Shell corba_shell, GSList *uri_list)
+open_uris (GNOME_Evolution_Shell corba_shell, gchar **uris)
{
- GSList *p;
CORBA_Environment ev;
+ guint n_uris, ii;
- CORBA_exception_init (&ev);
+ g_assert (uris != NULL);
+ n_uris = g_strv_length (uris);
- for (p = uri_list; p != NULL; p = p->next) {
- const char *uri;
+ CORBA_exception_init (&ev);
- uri = (const char *) p->data;
- GNOME_Evolution_Shell_handleURI (corba_shell, uri, &ev);
+ for (ii = 0; ii < n_uris; ii++) {
+ GNOME_Evolution_Shell_handleURI (corba_shell, uris[ii], &ev);
if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning ("Invalid URI: %s", uri);
+ g_warning ("Invalid URI: %s", uris[ii]);
CORBA_exception_free (&ev);
}
}
@@ -324,23 +307,22 @@
/* This is for doing stuff that requires the GTK+ loop to be running already. */
-static gint
-idle_cb (void *data)
+static gboolean
+idle_cb (gchar **uris)
{
- GSList *uri_list;
GNOME_Evolution_Shell corba_shell;
CORBA_Environment ev;
EShellConstructResult result;
EShellStartupLineMode startup_line_mode;
+ g_assert (uris == NULL || g_strv_length (uris) > 0);
+
#ifdef KILL_PROCESS_CMD
kill_old_dataserver ();
#endif
CORBA_exception_init (&ev);
- uri_list = (GSList *) data;
-
if (! start_online && ! start_offline)
startup_line_mode = E_SHELL_STARTUP_LINE_MODE_CONFIG;
else if (start_online)
@@ -378,15 +360,16 @@
}
if (shell != NULL) {
- if (g_slist_length (uri_list) == 0)
+ if (uris != NULL)
+ open_uris (corba_shell, uris);
+ else
e_shell_create_window (shell, default_component_id, NULL);
- open_uris (corba_shell, uri_list);
} else {
CORBA_Environment ev;
CORBA_exception_init (&ev);
- if (uri_list != NULL)
- open_uris (corba_shell, uri_list);
+ if (uris != NULL)
+ open_uris (corba_shell, uris);
else
if (default_component_id == NULL)
GNOME_Evolution_Shell_createNewWindow (corba_shell, "", &ev);
@@ -396,8 +379,6 @@
CORBA_exception_free (&ev);
}
- g_slist_free (uri_list);
-
CORBA_Object_release (corba_shell, &ev);
CORBA_exception_free (&ev);
@@ -501,7 +482,6 @@
GConfClient *client;
gboolean skip_warning_dialog;
#endif
- GSList *uri_list;
GnomeProgram *program;
GOptionContext *context;
char *filename;
@@ -543,8 +523,10 @@
#endif
#if DEVELOPMENT
+ client = g_conf_client_get_default ();
+
if (force_migrate) {
- destroy_config ();
+ destroy_config (client);
}
#endif
@@ -571,17 +553,6 @@
if (setup_only)
exit (0);
- uri_list = NULL;
-
- if (remaining_args != NULL) {
- const char **p;
-
- for (p = (const char**)remaining_args; *p != NULL; p++)
- uri_list = g_slist_prepend (uri_list, (char *) *p);
- }
- uri_list = g_slist_reverse (uri_list);
-
-
gnome_sound_init ("localhost");
if (!disable_eplugin) {
@@ -597,15 +568,20 @@
}
#if DEVELOPMENT
- client = gconf_client_get_default ();
- skip_warning_dialog = gconf_client_get_bool (client, "/apps/evolution/shell/skip_warning_dialog", NULL);
- g_object_unref (client);
+ skip_warning_dialog = gconf_client_get_bool (
+ client, SKIP_WARNING_DIALOG_KEY, NULL);
if (!skip_warning_dialog && !getenv ("EVOLVE_ME_HARDER"))
- show_development_warning();
+ gconf_client_set_bool (
+ client, SKIP_WARNING_DIALOG_KEY,
+ show_development_warning (), NULL);
else
+ g_idle_add ((GSourceFunc) idle_cb, remaining_args);
+
+ g_object_unref (client);
+#else
+ g_idle_add ((GSourceFunc) idle_cb, remaining_args);
#endif
- g_idle_add (idle_cb, uri_list);
bonobo_main ();

File diff suppressed because it is too large Load Diff

View File

@ -47,7 +47,7 @@
Name: evolution
Version: 2.10.0
Release: 2%{?dist}
Release: 4%{?dist}
License: GPL
Group: Applications/Productivity
Summary: GNOME's next-generation groupware suite
@ -149,6 +149,15 @@ Patch43: evolution-2.10.0-e-passwords.patch
# GNOME bug #417999
Patch44: evolution-2.10.0-e-source-combo-box.patch
# GNOME bug #419469
Patch45: evolution-2.10.0-shell-main-cleanups.patch
# GNOME bug #419524
Patch46: evolution-2.10.0-use-glib-i18n.patch
# GNOME bug #418971
Patch47: evolution-2.10.0-drop-old-glib-support.patch
## Dependencies ###
Requires(post): GConf2
@ -297,6 +306,9 @@ Development files needed for building things which link against evolution.
%patch42 -p1 -b .view-message-source
%patch43 -p1 -b .e-passwords
%patch44 -p1 -b .e-source-combo-box
%patch45 -p1 -b .shell-main-cleanups
%patch46 -p1 -b .use-glib-i18n
%patch47 -p1 -b .drop-old-glib-support
mkdir -p krb5-fakeprefix/include
mkdir -p krb5-fakeprefix/lib
@ -370,6 +382,7 @@ CFLAGS="$CFLAGS \
-DGDK_PIXBUF_DISABLE_DEPRECATED=1 \
-DGDK_DISABLE_DEPRECATED=1 \
-DEDS_DISABLE_DEPRECATED=1 \
-DCAMEL_DISABLE_DEPRECATED=1 \
-Werror-implicit-function-declaration"
%endif
@ -442,16 +455,21 @@ done
%post
/sbin/ldconfig
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
SCHEMAS="apps-evolution-mail-prompts-checkdefault-%{evo_major}.schemas apps_evolution_addressbook-%{evo_major}.schemas apps_evolution_calendar-%{evo_major}.schemas apps_evolution_shell-%{evo_major}.schemas evolution-mail-%{evo_major}.schemas"
for S in $SCHEMAS; do
gconftool-2 --makefile-install-rule %{_sysconfdir}/gconf/schemas/$S > /dev/null
done
scrollkeeper-update -q
touch --no-create %{_datadir}/icons/hicolor || :
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
gconftool-2 --makefile-install-rule %{_sysconfdir}/gconf/schemas/apps-evolution-mail-prompts-checkdefault-%{evo_major}.schemas > /dev/null
gconftool-2 --makefile-install-rule %{_sysconfdir}/gconf/schemas/apps_evolution_addressbook-%{evo_major}.schemas > /dev/null
gconftool-2 --makefile-install-rule %{_sysconfdir}/gconf/schemas/apps_evolution_calendar-%{evo_major}.schemas > /dev/null
gconftool-2 --makefile-install-rule %{_sysconfdir}/gconf/schemas/apps_evolution_shell-%{evo_major}.schemas > /dev/null
gconftool-2 --makefile-install-rule %{_sysconfdir}/gconf/schemas/evolution-mail-%{evo_major}.schemas > /dev/null
%postun
/sbin/ldconfig
scrollkeeper-update -q
touch --no-create %{_datadir}/icons/hicolor || :
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
%clean
rm -rf $RPM_BUILD_ROOT
@ -706,6 +724,15 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/evolution/%{evo_major}/libmenus.so
%changelog
* Mon Mar 26 2007 Matthew Barnes <mbarnes@redhat.com> - 2.10.0-4.fc7
- Run gtk-update-icon-cache in %post and %postun (RH bug #234018).
* Sat Mar 17 2007 Matthew Barnes <mbarnes@redhat.com> - 2.10.0-3.fc7
- Add flag to disable deprecated Camel symbols.
- Add patch for GNOME bug #419469 (refactor shell/main.c).
- Add patch for GNOME bug #419524 (use GLib's i18n macros).
- Add patch for GNOME bug #418971 (drop support for GLib < 2.8).
* Wed Mar 14 2007 Matthew Barnes <mbarnes@redhat.com> - 2.10.0-2.fc7
- Add patch for GNOME bug #417999 (use ESourceComboBox).