Miscellaneous cleanups.

This commit is contained in:
Matthew Barnes
2011-11-22 18:22:14 -05:00
parent 2e60b6a4a2
commit e64d6fe05c
49 changed files with 213 additions and 192 deletions

View File

@ -106,7 +106,8 @@ process_removal_in_hash (const gchar *uri,
}
static gint
find_slist_source_uri_cb (gconstpointer a, gconstpointer b)
find_slist_source_uri_cb (gconstpointer a,
gconstpointer b)
{
ESource *asource = (ESource *) a;
const gchar *buri = b;

View File

@ -36,7 +36,6 @@
#include "alarm.h"
#include "config-data.h"
/* Our glib timeout */
static guint timeout_id;

View File

@ -29,7 +29,6 @@
#include <time.h>
#include <glib.h>
typedef void (* AlarmFunction) (gpointer alarm_id, time_t trigger, gpointer data);
typedef void (* AlarmDestroyNotify) (gpointer alarm_id, gpointer data);

View File

@ -62,7 +62,7 @@ calendar_config_init (void)
void
calendar_config_remove_notification (CalendarConfigChangedFunc func,
gpointer data)
gpointer data)
{
calendar_config_init ();

View File

@ -30,7 +30,6 @@
#include "calendar-view-factory.h"
#include "calendar-view.h"
/* Private part of the CalendarViewFactory structure */
struct _CalendarViewFactoryPrivate {
/* Type of views created by this factory */

View File

@ -28,7 +28,6 @@
#include "calendar-view.h"
/* Private part of the CalendarView structure */
struct _CalendarViewPrivate {
/* Type of the view */

View File

@ -39,7 +39,6 @@
#include "shell/e-shell-window.h"
#include "shell/e-shell-view.h"
/**
* cal_comp_util_add_exdate:
* @comp: A calendar component object.

View File

@ -45,7 +45,6 @@
#include "comp-editor-util.h"
#include "alarm-dialog.h"
typedef struct {
GtkBuilder *builder;

View File

@ -42,7 +42,6 @@
#include "alarm-dialog.h"
#include "alarm-list-dialog.h"
typedef struct {
GtkBuilder *builder;

View File

@ -31,7 +31,6 @@
#include "e-util/e-alert-dialog.h"
#include "cancel-comp.h"
/* is_past_event:
*
* returns TRUE if @comp is in the past, FALSE otherwise.

View File

@ -29,7 +29,6 @@
#include <glib/gi18n.h>
#include "changed-comp.h"
/**
* changed_component_dialog:
* @parent: Parent window for the dialog.

View File

@ -37,7 +37,6 @@
#include <shell/e-shell.h>
#include "comp-editor-util.h"
/**
* comp_editor_dates:
* @dates: A structure to be filled out with dates of a component

View File

@ -30,7 +30,6 @@
#include "e-util/e-alert-dialog.h"
#include "delete-comp.h"
/**
* delete_component_dialog:
* @comp: A calendar component if a single component is to be deleted, or NULL

View File

@ -30,7 +30,6 @@
#include <glib/gi18n.h>
#include "delete-error.h"
/**
* delete_error_dialog:
*

View File

@ -29,7 +29,6 @@
#include <glib/gi18n.h>
#include "recur-comp.h"
gboolean
recur_component_dialog (ECalClient *client,
ECalComponent *comp,

View File

@ -30,7 +30,6 @@
#include "e-util/e-alert-dialog.h"
#include "send-comp.h"
static gboolean
component_has_new_attendees (ECalComponent *comp)
{

View File

@ -729,7 +729,7 @@ e_day_view_time_item_event (GnomeCanvasItem *item,
static void
edvti_second_zone_changed_cb (GSettings *settings,
const gchar *key,
const gchar *key,
gpointer user_data)
{
EDayViewTimeItem *time_item = user_data;

View File

@ -577,11 +577,11 @@ comp_to_list (ECalComponentItipMethod method,
ECalComponentAttendee *att = l->data;
/* Bugfix: 688711 - Varadhan
Resource is also considered as a "attendee". If the respective backend
is able to successfully book resources automagically, it will appear
in the users list and thereby won't get added to the list of destinations
to send the meeting invite, otherwise, as a safety measure, a meeting
invite will be sent to the resources as well. */
* Resource is also considered as a "attendee". If the respective backend
* is able to successfully book resources automagically, it will appear
* in the users list and thereby won't get added to the list of destinations
* to send the meeting invite, otherwise, as a safety measure, a meeting
* invite will be sent to the resources as well. */
if (att->cutype != ICAL_CUTYPE_INDIVIDUAL &&
att->cutype != ICAL_CUTYPE_GROUP &&
att->cutype != ICAL_CUTYPE_RESOURCE)

View File

@ -58,30 +58,6 @@
#include <X11/XF86keysym.h>
#endif
/* Mail configuration keys */
#define MAIL_GCONF_PREFIX \
"/apps/evolution/mail"
#define MAIL_GCONF_CHARSET_KEY \
MAIL_GCONF_PREFIX "/format/charset"
/* Composer configuration keys */
#define COMPOSER_GCONF_PREFIX \
MAIL_GCONF_PREFIX "/composer"
#define COMPOSER_GCONF_INLINE_SPELLING_KEY \
COMPOSER_GCONF_PREFIX "/inline_spelling"
#define COMPOSER_GCONF_MAGIC_LINKS_KEY \
COMPOSER_GCONF_PREFIX "/magic_links"
#define COMPOSER_GCONF_MAGIC_SMILEYS_KEY \
COMPOSER_GCONF_PREFIX "/magic_smileys"
#define COMPOSER_GCONF_REQUEST_RECEIPT_KEY \
COMPOSER_GCONF_PREFIX "/request_receipt"
#define COMPOSER_GCONF_TOP_SIGNATURE_KEY \
COMPOSER_GCONF_PREFIX "/top_signature"
#define COMPOSER_GCONF_SEND_HTML_KEY \
COMPOSER_GCONF_PREFIX "/send_html"
#define COMPOSER_GCONF_WINDOW_PREFIX \
COMPOSER_GCONF_PREFIX "/window"
/* Shorthand, requires a variable named "composer". */
#define ACTION(name) (E_COMPOSER_ACTION_##name (composer))

View File

@ -128,8 +128,6 @@ static void handle_multipart_signed (EMsgComposer *composer,
static void e_msg_composer_alert_sink_init (EAlertSinkInterface *interface);
gboolean check_blacklisted_file (gchar *filename);
G_DEFINE_TYPE_WITH_CODE (
EMsgComposer,
e_msg_composer,
@ -4006,25 +4004,24 @@ merge_always_cc_and_bcc (EComposerHeaderTable *table,
e_destination_freev (addrv);
}
static const gchar *blacklisted_files [] = {".", "etc", ".."};
static const gchar *blacklisted_files [] = { ".", "etc", ".." };
gboolean check_blacklisted_file (gchar *filename)
static gboolean
check_blacklisted_file (gchar *filename)
{
gboolean blacklisted = FALSE;
gint i,j,len;
guint ii, jj, length;
gchar **filename_part;
filename_part = g_strsplit (filename, G_DIR_SEPARATOR_S, -1);
len = g_strv_length(filename_part);
for(i = 0; !blacklisted && i < G_N_ELEMENTS(blacklisted_files); i++)
{
for (j = 0; !blacklisted && j < len;j++)
if (g_str_has_prefix (filename_part[j], blacklisted_files[i]))
length = g_strv_length (filename_part);
for (ii = 0; !blacklisted && ii < G_N_ELEMENTS (blacklisted_files); ii++) {
for (jj = 0; !blacklisted && jj < length; jj++)
if (g_str_has_prefix (filename_part[jj], blacklisted_files[ii]))
blacklisted = TRUE;
}
g_strfreev (filename_part);
g_strfreev(filename_part);
return blacklisted;
}
@ -4119,14 +4116,13 @@ handle_mailto (EMsgComposer *composer,
} else if (!g_ascii_strcasecmp (header, "attach") ||
!g_ascii_strcasecmp (header, "attachment")) {
EAttachment *attachment;
gboolean check = FALSE;
camel_url_decode (content);
check = check_blacklisted_file(content);
if(check)
if (check_blacklisted_file (content))
e_alert_submit (
E_ALERT_SINK (composer),
"mail:blacklisted-file", content, NULL);
E_ALERT_SINK (composer),
"mail:blacklisted-file",
content, NULL);
if (g_ascii_strncasecmp (content, "file:", 5) == 0)
attachment = e_attachment_new_for_uri (content);
else

View File

@ -664,7 +664,9 @@ e_datetime_format_format_tm (const gchar *component,
}
gboolean
e_datetime_format_includes_day_name (const gchar *component, const gchar *part, DTFormatKind kind)
e_datetime_format_includes_day_name (const gchar *component,
const gchar *part,
DTFormatKind kind)
{
gchar *key;
const gchar *fmt;

View File

@ -1394,7 +1394,7 @@ e_binding_transform_color_to_string (GBinding *binding,
g_value_set_string (target_value, "");
} else {
/* encode color manually, because css styles expect colors in #rrggbb,
not in #rrrrggggbbbb, which is a result of gdk_color_to_string()
* not in #rrrrggggbbbb, which is a result of gdk_color_to_string()
*/
string = g_strdup_printf ("#%02x%02x%02x",
(gint) color->red * 256 / 65536,

View File

@ -67,7 +67,6 @@ static void gnome_canvas_pixbuf_bounds (GnomeCanvasItem *item,
G_DEFINE_TYPE (GnomeCanvasPixbuf, gnome_canvas_pixbuf, GNOME_TYPE_CANVAS_ITEM)
/* Class initialization function for the pixbuf canvas item */
static void
gnome_canvas_pixbuf_class_init (GnomeCanvasPixbufClass *class)

View File

@ -46,7 +46,6 @@
#include "gnome-canvas-util.h"
#include "gnome-canvas-i18n.h"
/* Object argument IDs */
enum {
PROP_0,

View File

@ -166,6 +166,23 @@ mail_label_list_store_get_stock_id (EMailLabelListStore *store,
return stock_id;
}
static void
mail_label_list_store_dispose (GObject *object)
{
EMailLabelListStorePrivate *priv;
priv = E_MAIL_LABEL_LIST_STORE_GET_PRIVATE (object);
if (priv->mail_settings != NULL) {
g_object_unref (priv->mail_settings);
priv->mail_settings = NULL;
}
/* Chain up to parent's dispose() method. */
G_OBJECT_CLASS (e_mail_label_list_store_parent_class)->
dispose (object);
}
static void
mail_label_list_store_finalize (GObject *object)
{
@ -175,24 +192,18 @@ mail_label_list_store_finalize (GObject *object)
g_hash_table_destroy (priv->tag_index);
if (priv->mail_settings != NULL) {
g_object_unref (priv->mail_settings);
priv->mail_settings = NULL;
}
/* Chain up to parent's finalize() method. */
G_OBJECT_CLASS (e_mail_label_list_store_parent_class)->
finalize (object);
}
static void labels_settings_changed_cb (GSettings *settings, const gchar *key, gpointer user_data);
static void
labels_model_changed_cb (GtkTreeModel *model,
GtkTreePath *path,
GtkTreeIter *iter,
gpointer user_data)
GtkTreePath *path,
GtkTreeIter *iter,
gpointer user_data)
{
EMailLabelListStore *store;
GPtrArray *array;
@ -228,8 +239,8 @@ labels_model_changed_cb (GtkTreeModel *model,
static void
labels_settings_changed_cb (GSettings *settings,
const gchar *key,
gpointer user_data)
const gchar *key,
gpointer user_data)
{
EMailLabelListStore *store;
gchar **strv;
@ -326,6 +337,7 @@ e_mail_label_list_store_class_init (EMailLabelListStoreClass *class)
g_type_class_add_private (class, sizeof (EMailLabelListStorePrivate));
object_class = G_OBJECT_CLASS (class);
object_class->dispose = mail_label_list_store_dispose;
object_class->finalize = mail_label_list_store_finalize;
object_class->constructed = mail_label_list_store_constructed;

View File

@ -483,7 +483,7 @@ mail_session_make_key (CamelService *service,
static void
mail_session_check_junk_notify (GSettings *settings,
const gchar *key,
const gchar *key,
CamelSession *session)
{
if (strcmp (key, "junk-check-incoming") == 0)
@ -1089,9 +1089,9 @@ mail_session_forward_to (CamelSession *session,
static void
mail_session_get_socks_proxy (CamelSession *session,
const gchar *for_host,
gchar **host_ret,
gint *port_ret)
const gchar *for_host,
gchar **host_ret,
gint *port_ret)
{
EMailSession *mail_session;
gchar *uri;

View File

@ -3786,8 +3786,12 @@ emae_defaults_page (EConfig *ec,
priv->trash_folder_button, "sensitive",
G_BINDING_SYNC_CREATE);
pspec = !settings ? NULL : g_object_class_find_property (
G_OBJECT_GET_CLASS (settings), "use-real-trash-path");
if (settings != NULL)
pspec = g_object_class_find_property (
G_OBJECT_GET_CLASS (settings),
"use-real-trash-path");
else
pspec = NULL;
if (pspec != NULL)
g_object_bind_property (
@ -3796,12 +3800,20 @@ emae_defaults_page (EConfig *ec,
G_BINDING_BIDIRECTIONAL |
G_BINDING_SYNC_CREATE);
pspec = !settings ? NULL : g_object_class_find_property (
G_OBJECT_GET_CLASS (settings), "real-trash-path");
if (settings != NULL)
pspec = g_object_class_find_property (
G_OBJECT_GET_CLASS (settings),
"real-trash-path");
else
pspec = NULL;
if (pspec != NULL) {
set_real_folder_path (priv->trash_folder_button, settings, "real-trash-path", account);
g_signal_connect (priv->trash_folder_button, "notify::folder-uri", G_CALLBACK (update_real_folder_cb), emae);
set_real_folder_path (
priv->trash_folder_button,
settings, "real-trash-path", account);
g_signal_connect (
priv->trash_folder_button, "notify::folder-uri",
G_CALLBACK (update_real_folder_cb), emae);
}
flags = CAMEL_PROVIDER_ALLOW_REAL_TRASH_FOLDER;
@ -3832,8 +3844,12 @@ emae_defaults_page (EConfig *ec,
priv->junk_folder_button, "sensitive",
G_BINDING_SYNC_CREATE);
pspec = !settings ? NULL : g_object_class_find_property (
G_OBJECT_GET_CLASS (settings), "use-real-junk-path");
if (settings != NULL)
pspec = g_object_class_find_property (
G_OBJECT_GET_CLASS (settings),
"use-real-junk-path");
else
pspec = NULL;
if (pspec != NULL)
g_object_bind_property (
@ -3842,12 +3858,20 @@ emae_defaults_page (EConfig *ec,
G_BINDING_BIDIRECTIONAL |
G_BINDING_SYNC_CREATE);
pspec = !settings ? NULL : g_object_class_find_property (
G_OBJECT_GET_CLASS (settings), "real-junk-path");
if (settings != NULL)
pspec = g_object_class_find_property (
G_OBJECT_GET_CLASS (settings),
"real-junk-path");
else
pspec = NULL;
if (pspec != NULL) {
set_real_folder_path (priv->junk_folder_button, settings, "real-junk-path", account);
g_signal_connect (priv->junk_folder_button, "notify::folder-uri", G_CALLBACK (update_real_folder_cb), emae);
set_real_folder_path (
priv->junk_folder_button,
settings, "real-junk-path", account);
g_signal_connect (
priv->junk_folder_button, "notify::folder-uri",
G_CALLBACK (update_real_folder_cb), emae);
}
flags = CAMEL_PROVIDER_ALLOW_REAL_JUNK_FOLDER;
@ -3861,7 +3885,9 @@ emae_defaults_page (EConfig *ec,
/* Special Folders "Reset Defaults" button */
priv->restore_folders_button = (GtkButton *)e_builder_get_widget (builder, "default_folders_button");
g_signal_connect (priv->restore_folders_button, "clicked", G_CALLBACK (default_folders_clicked), emae);
g_signal_connect (
priv->restore_folders_button, "clicked",
G_CALLBACK (default_folders_clicked), emae);
/* Always Cc/Bcc */
emae_account_toggle (emae, "always_cc", E_ACCOUNT_CC_ALWAYS, builder);
@ -3869,12 +3895,13 @@ emae_defaults_page (EConfig *ec,
emae_account_toggle (emae, "always_bcc", E_ACCOUNT_BCC_ALWAYS, builder);
emae_account_entry (emae, "bcc_addrs", E_ACCOUNT_BCC_ADDRS, builder);
gtk_widget_set_sensitive ( (GtkWidget *) priv->sent_folder_button,
(provider ? !(provider->flags & CAMEL_PROVIDER_DISABLE_SENT_FOLDER): TRUE)
);
gtk_widget_set_sensitive (
GTK_WIDGET (priv->sent_folder_button),
(provider ? !(provider->flags & CAMEL_PROVIDER_DISABLE_SENT_FOLDER) : TRUE));
gtk_widget_set_sensitive ((GtkWidget *) priv->restore_folders_button,
(provider && !(provider->flags & CAMEL_PROVIDER_DISABLE_SENT_FOLDER)));
gtk_widget_set_sensitive (
GTK_WIDGET (priv->restore_folders_button),
(provider && !(provider->flags & CAMEL_PROVIDER_DISABLE_SENT_FOLDER)));
/* Receipt policy */
emae_setup_receipt_policy (emae, builder);

View File

@ -121,7 +121,6 @@ em_config_class_init (EMConfigClass *class)
{
EConfigClass *config_class;
config_class = E_CONFIG_CLASS (class);
config_class->set_target = em_config_set_target;
config_class->target_free = em_config_target_free;

View File

@ -374,10 +374,9 @@ subscription_editor_subscribe_folder_done (CamelSubscribable *subscribable,
gtk_widget_grab_focus (GTK_WIDGET (tree_view));
}
static void
subscription_editor_subscribe_many (EMSubscriptionEditor *editor,
GSList *async_datas)
GSList *async_datas)
{
AsyncData *async_data;
AsyncContext *context;
@ -499,10 +498,9 @@ subscription_editor_unsubscribe_folder_done (CamelSubscribable *subscribable,
gtk_widget_grab_focus (GTK_WIDGET (tree_view));
}
static void
subscription_editor_unsubscribe_many (EMSubscriptionEditor *editor,
GSList *async_datas)
GSList *async_datas)
{
AsyncData *async_data;
AsyncContext *context;
@ -552,9 +550,9 @@ subscription_editor_unsubscribe_many (EMSubscriptionEditor *editor,
static GtkWidget *
subscription_editor_create_menu_item (const gchar *label,
gboolean sensitive,
GCallback activate_cb,
EMSubscriptionEditor *editor)
gboolean sensitive,
GCallback activate_cb,
EMSubscriptionEditor *editor)
{
GtkWidget *item;
@ -570,10 +568,10 @@ subscription_editor_create_menu_item (const gchar *label,
static void
position_below_widget_cb (GtkMenu *menu,
gint *x,
gint *y,
gboolean *push_in,
gpointer under_widget)
gint *x,
gint *y,
gboolean *push_in,
gpointer under_widget)
{
GtkRequisition menu_requisition;
GtkTextDirection direction;
@ -611,9 +609,9 @@ position_below_widget_cb (GtkMenu *menu,
static AsyncData *
subscription_editor_async_data_from_iter (GtkTreeView *tree_view,
GtkTreeModel *model,
GtkTreeIter *iter,
gboolean *is_expanded)
GtkTreeModel *model,
GtkTreeIter *iter,
gboolean *is_expanded)
{
AsyncData *data;
CamelFolderInfo *folder_info = NULL;
@ -650,7 +648,8 @@ typedef enum {
} EPickMode;
static gboolean
can_pick_folder_info (CamelFolderInfo *fi, EPickMode mode)
can_pick_folder_info (CamelFolderInfo *fi,
EPickMode mode)
{
if (!FOLDER_CAN_SELECT (fi))
return FALSE;
@ -670,9 +669,9 @@ struct PickAllData {
static gboolean
pick_all_cb (GtkTreeModel *model,
GtkTreePath *path,
GtkTreeIter *iter,
gpointer user_data)
GtkTreePath *path,
GtkTreeIter *iter,
gpointer user_data)
{
struct PickAllData *data = user_data;
AsyncData *async_data;
@ -696,13 +695,13 @@ pick_all_cb (GtkTreeModel *model,
}
/* skip_folder_infos contains CamelFolderInfo-s to skip;
these should come from the tree view; can be NULL
to include everything.
* these should come from the tree view; can be NULL
* to include everything.
*/
static GSList *
subscription_editor_pick_all (EMSubscriptionEditor *editor,
EPickMode mode,
GHashTable *skip_folder_infos)
EPickMode mode,
GHashTable *skip_folder_infos)
{
GtkTreeView *tree_view;
GtkTreeModel *tree_model;
@ -723,7 +722,7 @@ subscription_editor_pick_all (EMSubscriptionEditor *editor,
static GSList *
subscription_editor_pick_shown (EMSubscriptionEditor *editor,
EPickMode mode)
EPickMode mode)
{
GtkTreeView *tree_view;
GtkTreeModel *tree_model;

View File

@ -58,8 +58,8 @@ static GSettings *mail_settings = NULL;
static void
settings_outlook_filenames_changed (GSettings *settings,
const gchar *key,
gpointer user_data)
const gchar *key,
gpointer user_data)
{
/* pass option to the camel */
if (g_settings_get_boolean (settings, key))
@ -70,8 +70,8 @@ settings_outlook_filenames_changed (GSettings *settings,
static void
settings_jh_headers_changed (GSettings *settings,
const gchar *key,
EMailSession *session)
const gchar *key,
EMailSession *session)
{
GSList *node;
GPtrArray *name, *value;
@ -110,8 +110,8 @@ settings_jh_headers_changed (GSettings *settings,
static void
settings_jh_check_changed (GSettings *settings,
const gchar *key,
EMailSession *session)
const gchar *key,
EMailSession *session)
{
config->jh_check = g_settings_get_boolean (settings, "junk-check-custom-header");
if (!config->jh_check) {
@ -124,16 +124,16 @@ settings_jh_check_changed (GSettings *settings,
static void
settings_bool_value_changed (GSettings *settings,
const gchar *key,
gboolean *save_location)
const gchar *key,
gboolean *save_location)
{
*save_location = g_settings_get_boolean (settings, key);
}
static void
settings_int_value_changed (GSettings *settings,
const gchar *key,
gint *save_location)
const gchar *key,
gint *save_location)
{
*save_location = g_settings_get_int (settings, key);
}

View File

@ -185,8 +185,8 @@ contacts_removed (EBookShellView *book_shell_view,
static void
model_query_changed_cb (EBookShellView *book_shell_view,
GParamSpec *param,
EAddressbookModel *model)
GParamSpec *param,
EAddressbookModel *model)
{
EBookShellContent *book_shell_content;
EAddressbookView *current_view;

View File

@ -903,7 +903,7 @@ e_cal_shell_backend_get_selected_calendars (ECalShellBackend *cal_shell_backend)
{
GSettings *settings;
GSList *selected_calendars = NULL;
char **strv;
gchar **strv;
gint ii;
g_return_val_if_fail (

View File

@ -647,7 +647,7 @@ e_memo_shell_backend_get_selected_memo_lists (EMemoShellBackend *memo_shell_back
{
GSettings *settings;
GSList *selected_memo_lists = NULL;
char **strv;
gchar **strv;
gint ii;
g_return_val_if_fail (
@ -657,7 +657,6 @@ e_memo_shell_backend_get_selected_memo_lists (EMemoShellBackend *memo_shell_back
strv = g_settings_get_strv (settings, "selected-memos");
g_object_unref (settings);
if (strv != NULL) {
for (ii = 0; strv[ii] != NULL; ii++)
selected_memo_lists = g_slist_append (selected_memo_lists, g_strdup (strv[ii]));

View File

@ -652,7 +652,7 @@ e_task_shell_backend_get_selected_task_lists (ETaskShellBackend *task_shell_back
{
GSettings *settings;
GSList *selected_task_lists = NULL;
char **strv;
gchar **strv;
gint ii;
g_return_val_if_fail (
@ -690,5 +690,5 @@ e_task_shell_backend_set_selected_task_lists (ETaskShellBackend *task_shell_back
g_settings_set_strv (settings, "selected-tasks", (const gchar *const *) array->pdata);
g_object_unref (settings);
g_ptr_array_free (array, FALSE);
g_ptr_array_free (array, FALSE);
}

View File

@ -144,7 +144,7 @@ online_accounts_google_sync_mail (GoaObject *goa_object,
if (account) {
/* the account is already configured,
do not change user's changes */
* do not change user's changes */
return;
}

View File

@ -1073,10 +1073,6 @@ e_spam_assassin_class_init (ESpamAssassinClass *class)
junk_filter_class->available = spam_assassin_available;
junk_filter_class->new_config_widget = spam_assassin_new_config_widget;
/* XXX Argh, the boolean sense of the GSettings key is inverted from
* that of the checkbox widget. The checkbox wording is more
* natural, but GConfBridge doesn't support transform functions
* so the property has to match the sense of the GConf key. */
g_object_class_install_property (
object_class,
PROP_LOCAL_ONLY,

View File

@ -321,9 +321,13 @@ set_organizer (ECalComponent *comp,
gchar *res;
if (folder) {
CamelStore *store = camel_folder_get_parent_store (folder);
CamelStore *store;
const gchar *uid;
account = e_get_account_by_uid (camel_service_get_uid (CAMEL_SERVICE (store)));
store = camel_folder_get_parent_store (folder);
uid = camel_service_get_uid (CAMEL_SERVICE (store));
account = e_get_account_by_uid (uid);
}
if (!account)

View File

@ -408,7 +408,6 @@ mar_got_folder (CamelStore *store,
g_return_if_fail (CAMEL_IS_FOLDER (folder));
camel_folder_freeze (folder);
uids = camel_folder_get_uids (folder);

View File

@ -385,7 +385,7 @@ add_source_list_with_check (GtkWidget *frame,
EClientSourceType source_type,
GCallback toggle_callback,
EImportTarget *target,
gboolean active)
gboolean active)
{
GtkWidget *check, *hbox;
ESourceList *source_list = NULL;
@ -1128,7 +1128,10 @@ dequote_string (gchar *str)
}
static gboolean
lookup_address (pst_item *item, const gchar *str, gboolean is_unique, CamelAddress *addr)
lookup_address (pst_item *item,
const gchar *str,
gboolean is_unique,
CamelAddress *addr)
{
gboolean res = FALSE;
gchar *address;
@ -1983,7 +1986,7 @@ static void
pst_process_component (PstImporter *m,
pst_item *item,
const gchar *comp_type,
ECalComponentVType vtype,
ECalComponentVType vtype,
ECalClient *cal)
{
ECalComponent *ec;

View File

@ -396,7 +396,7 @@ e_plugin_lib_get_configure_widget (EPlugin *epl)
GtkTreeSelection *selection;
GtkTreeIter iter;
GtkWidget *hbox;
gchar **clue_list;
gchar **clue_list;
gint i;
GtkTreeModel *model;
GtkWidget *templates_configuration_box;

View File

@ -41,6 +41,10 @@
#include "e-shell.h"
#include "e-shell-view.h"
#define E_SHELL_BACKEND_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE \
((obj), E_TYPE_SHELL_BACKEND, EShellBackendPrivate))
struct _EShellBackendPrivate {
/* We keep a reference to corresponding EShellView subclass
@ -171,7 +175,7 @@ shell_backend_dispose (GObject *object)
{
EShellBackendPrivate *priv;
priv = E_SHELL_BACKEND (object)->priv;
priv = E_SHELL_BACKEND_GET_PRIVATE (object);
if (priv->shell_view_class != NULL) {
g_type_class_unref (priv->shell_view_class);
@ -187,7 +191,7 @@ shell_backend_finalize (GObject *object)
{
EShellBackendPrivate *priv;
priv = E_SHELL_BACKEND (object)->priv;
priv = E_SHELL_BACKEND_GET_PRIVATE (object);
g_warn_if_fail (g_queue_is_empty (priv->activities));
g_queue_free (priv->activities);
@ -294,8 +298,7 @@ e_shell_backend_class_init (EShellBackendClass *class)
static void
e_shell_backend_init (EShellBackend *shell_backend)
{
shell_backend->priv = G_TYPE_INSTANCE_GET_PRIVATE (
shell_backend, E_TYPE_SHELL_BACKEND, EShellBackendPrivate);
shell_backend->priv = E_SHELL_BACKEND_GET_PRIVATE (shell_backend);
shell_backend->priv->activities = g_queue_new ();
}

View File

@ -39,6 +39,10 @@
#include "e-shell-window-actions.h"
#define E_SHELL_SEARCHBAR_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE \
((obj), E_TYPE_SHELL_SEARCHBAR, EShellSearchbarPrivate))
#define SEARCH_OPTION_ADVANCED (-1)
/* Default "state key file" group: [Search Bar] */
@ -629,7 +633,7 @@ shell_searchbar_dispose (GObject *object)
{
EShellSearchbarPrivate *priv;
priv = E_SHELL_SEARCHBAR (object)->priv;
priv = E_SHELL_SEARCHBAR_GET_PRIVATE (object);
if (priv->shell_view != NULL) {
g_object_remove_weak_pointer (
@ -911,8 +915,7 @@ e_shell_searchbar_init (EShellSearchbar *searchbar)
GtkLabel *label;
GtkWidget *widget;
searchbar->priv = G_TYPE_INSTANCE_GET_PRIVATE (
searchbar, E_TYPE_SHELL_SEARCHBAR, EShellSearchbarPrivate);
searchbar->priv = E_SHELL_SEARCHBAR_GET_PRIVATE (searchbar);
gtk_box_set_spacing (GTK_BOX (searchbar), 24);

View File

@ -31,6 +31,10 @@
#include "e-shell-settings.h"
#define E_SHELL_SETTINGS_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE \
((obj), E_TYPE_SHELL_SETTINGS, EShellSettingsPrivate))
struct _EShellSettingsPrivate {
GArray *value_array;
guint debug : 1;
@ -42,7 +46,7 @@ static gpointer parent_class;
static GParamSpec *
shell_settings_pspec_for_key (const gchar *property_name,
const gchar *schema,
const gchar *schema,
const gchar *key)
{
GSettings *settings;
@ -138,7 +142,7 @@ shell_settings_set_property (GObject *object,
EShellSettingsPrivate *priv;
GValue *dest_value;
priv = E_SHELL_SETTINGS (object)->priv;
priv = E_SHELL_SETTINGS_GET_PRIVATE (object);
dest_value = &g_array_index (
priv->value_array, GValue, property_id - 1);
@ -166,7 +170,7 @@ shell_settings_get_property (GObject *object,
EShellSettingsPrivate *priv;
GValue *src_value;
priv = E_SHELL_SETTINGS (object)->priv;
priv = E_SHELL_SETTINGS_GET_PRIVATE (object);
src_value = &g_array_index (
priv->value_array, GValue, property_id - 1);
@ -180,7 +184,7 @@ shell_settings_finalize (GObject *object)
EShellSettingsPrivate *priv;
guint ii;
priv = E_SHELL_SETTINGS (object)->priv;
priv = E_SHELL_SETTINGS_GET_PRIVATE (object);
for (ii = 0; ii < priv->value_array->len; ii++)
g_value_unset (&g_array_index (priv->value_array, GValue, ii));
@ -218,8 +222,7 @@ shell_settings_init (EShellSettings *shell_settings,
value_array = g_array_new (FALSE, TRUE, sizeof (GValue));
g_array_set_size (value_array, property_count);
shell_settings->priv = G_TYPE_INSTANCE_GET_PRIVATE (
shell_settings, E_TYPE_SHELL_SETTINGS, EShellSettingsPrivate);
shell_settings->priv = E_SHELL_SETTINGS_GET_PRIVATE (shell_settings);
shell_settings->priv->value_array = value_array;
g_object_freeze_notify (G_OBJECT (shell_settings));
@ -338,7 +341,7 @@ e_shell_settings_install_property (GParamSpec *pspec)
**/
void
e_shell_settings_install_property_for_key (const gchar *property_name,
const gchar *schema,
const gchar *schema,
const gchar *key)
{
GParamSpec *pspec;

View File

@ -37,6 +37,10 @@
#include <e-util/e-unicode.h>
#include <shell/e-shell-view.h>
#define E_SHELL_SIDEBAR_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE \
((obj), E_TYPE_SHELL_SIDEBAR, EShellSidebarPrivate))
struct _EShellSidebarPrivate {
gpointer shell_view; /* weak pointer */
@ -157,7 +161,7 @@ shell_sidebar_dispose (GObject *object)
{
EShellSidebarPrivate *priv;
priv = E_SHELL_SIDEBAR (object)->priv;
priv = E_SHELL_SIDEBAR_GET_PRIVATE (object);
if (priv->shell_view != NULL) {
g_object_remove_weak_pointer (
@ -184,7 +188,7 @@ shell_sidebar_finalize (GObject *object)
{
EShellSidebarPrivate *priv;
priv = E_SHELL_SIDEBAR (object)->priv;
priv = E_SHELL_SIDEBAR_GET_PRIVATE (object);
g_free (priv->icon_name);
g_free (priv->primary_text);
@ -249,7 +253,7 @@ shell_sidebar_get_preferred_height (GtkWidget *widget,
gint child_min, child_nat;
GtkWidget *child;
priv = E_SHELL_SIDEBAR (widget)->priv;
priv = E_SHELL_SIDEBAR_GET_PRIVATE (widget);
child = gtk_bin_get_child (GTK_BIN (widget));
gtk_widget_get_preferred_height (child, minimum, natural);
@ -270,7 +274,7 @@ shell_sidebar_size_allocate (GtkWidget *widget,
GtkRequisition child_requisition;
GtkWidget *child;
priv = E_SHELL_SIDEBAR (widget)->priv;
priv = E_SHELL_SIDEBAR_GET_PRIVATE (widget);
gtk_widget_set_allocation (widget, allocation);
@ -301,7 +305,7 @@ shell_sidebar_forall (GtkContainer *container,
{
EShellSidebarPrivate *priv;
priv = E_SHELL_SIDEBAR (container)->priv;
priv = E_SHELL_SIDEBAR_GET_PRIVATE (container);
if (include_internals && callback && priv->event_box)
callback (priv->event_box, callback_data);
@ -434,8 +438,7 @@ e_shell_sidebar_init (EShellSidebar *shell_sidebar)
const GdkColor *color;
const gchar *icon_name;
shell_sidebar->priv = G_TYPE_INSTANCE_GET_PRIVATE (
shell_sidebar, E_TYPE_SHELL_SIDEBAR, EShellSidebarPrivate);
shell_sidebar->priv = E_SHELL_SIDEBAR_GET_PRIVATE (shell_sidebar);
gtk_widget_set_has_window (GTK_WIDGET (shell_sidebar), FALSE);

View File

@ -34,6 +34,10 @@
#include <glib/gi18n.h>
#include <libebackend/e-extensible.h>
#define E_SHELL_SWITCHER_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE \
((obj), E_TYPE_SHELL_SWITCHER, EShellSwitcherPrivate))
#define H_PADDING 6
#define V_PADDING 6
@ -235,7 +239,7 @@ shell_switcher_dispose (GObject *object)
{
EShellSwitcherPrivate *priv;
priv = E_SHELL_SWITCHER (object)->priv;
priv = E_SHELL_SWITCHER_GET_PRIVATE (object);
while (priv->proxies != NULL) {
GtkWidget *widget = priv->proxies->data;
@ -255,7 +259,7 @@ shell_switcher_get_preferred_width (GtkWidget *widget,
GtkWidget *child;
GList *iter;
priv = E_SHELL_SWITCHER (widget)->priv;
priv = E_SHELL_SWITCHER_GET_PRIVATE (widget);
*minimum = *natural = 0;
@ -290,7 +294,7 @@ shell_switcher_get_preferred_height (GtkWidget *widget,
GtkWidget *child;
GList *iter;
priv = E_SHELL_SWITCHER (widget)->priv;
priv = E_SHELL_SWITCHER_GET_PRIVATE (widget);
*minimum = *natural = 0;
@ -351,7 +355,7 @@ shell_switcher_screen_changed (GtkWidget *widget,
EShellSwitcherPrivate *priv;
GtkSettings *settings;
priv = E_SHELL_SWITCHER (widget)->priv;
priv = E_SHELL_SWITCHER_GET_PRIVATE (widget);
if (gtk_widget_has_screen (widget))
settings = gtk_widget_get_settings (widget);
@ -386,7 +390,7 @@ shell_switcher_remove (GtkContainer *container,
EShellSwitcherPrivate *priv;
GList *link;
priv = E_SHELL_SWITCHER (container)->priv;
priv = E_SHELL_SWITCHER_GET_PRIVATE (container);
/* Look in the internal widgets first. */
@ -413,7 +417,7 @@ shell_switcher_forall (GtkContainer *container,
{
EShellSwitcherPrivate *priv;
priv = E_SHELL_SWITCHER (container)->priv;
priv = E_SHELL_SWITCHER_GET_PRIVATE (container);
if (include_internals)
g_list_foreach (
@ -551,8 +555,7 @@ e_shell_switcher_class_init (EShellSwitcherClass *class)
static void
e_shell_switcher_init (EShellSwitcher *switcher)
{
switcher->priv = G_TYPE_INSTANCE_GET_PRIVATE (
switcher, E_TYPE_SHELL_SWITCHER, EShellSwitcherPrivate);
switcher->priv = E_SHELL_SWITCHER_GET_PRIVATE (switcher);
gtk_widget_set_has_window (GTK_WIDGET (switcher), FALSE);

View File

@ -36,6 +36,10 @@
#include <e-shell-view.h>
#include <misc/e-activity-proxy.h>
#define E_SHELL_TASKBAR_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE \
((obj), E_TYPE_SHELL_TASKBAR, EShellTaskbarPrivate))
struct _EShellTaskbarPrivate {
gpointer shell_view; /* weak pointer */
@ -204,7 +208,7 @@ shell_taskbar_dispose (GObject *object)
{
EShellTaskbarPrivate *priv;
priv = E_SHELL_TASKBAR (object)->priv;
priv = E_SHELL_TASKBAR_GET_PRIVATE (object);
g_hash_table_foreach_remove (
priv->proxy_table, (GHRFunc)
@ -243,7 +247,7 @@ shell_taskbar_finalize (GObject *object)
{
EShellTaskbarPrivate *priv;
priv = E_SHELL_TASKBAR (object)->priv;
priv = E_SHELL_TASKBAR_GET_PRIVATE (object);
g_hash_table_destroy (priv->proxy_table);
@ -371,8 +375,7 @@ e_shell_taskbar_init (EShellTaskbar *shell_taskbar)
{
GtkWidget *widget;
shell_taskbar->priv = G_TYPE_INSTANCE_GET_PRIVATE (
shell_taskbar, E_TYPE_SHELL_TASKBAR, EShellTaskbarPrivate);
shell_taskbar->priv = E_SHELL_TASKBAR_GET_PRIVATE (shell_taskbar);
shell_taskbar->priv->proxy_table = g_hash_table_new (NULL, NULL);
gtk_box_set_spacing (GTK_BOX (shell_taskbar), 12);

View File

@ -45,6 +45,10 @@
#include "e-shell-searchbar.h"
#include "e-shell-window-actions.h"
#define E_SHELL_VIEW_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE \
((obj), E_TYPE_SHELL_VIEW, EShellViewPrivate))
#define SIMPLE_SEARCHBAR_WIDTH 300
#define STATE_SAVE_TIMEOUT_SECONDS 3
@ -502,7 +506,7 @@ shell_view_dispose (GObject *object)
{
EShellViewPrivate *priv;
priv = E_SHELL_VIEW (object)->priv;
priv = E_SHELL_VIEW_GET_PRIVATE (object);
/* Expedite any pending state saves. */
if (priv->state_save_timeout_id > 0) {
@ -568,7 +572,7 @@ shell_view_finalize (GObject *object)
{
EShellViewPrivate *priv;
priv = E_SHELL_VIEW (object)->priv;
priv = E_SHELL_VIEW_GET_PRIVATE (object);
g_key_file_free (priv->state_key_file);
@ -1107,8 +1111,7 @@ e_shell_view_init (EShellView *shell_view,
size_group = gtk_size_group_new (GTK_SIZE_GROUP_VERTICAL);
shell_view->priv = G_TYPE_INSTANCE_GET_PRIVATE (
shell_view, E_TYPE_SHELL_VIEW, EShellViewPrivate);
shell_view->priv = E_SHELL_VIEW_GET_PRIVATE (shell_view);
shell_view->priv->state_key_file = g_key_file_new ();
shell_view->priv->size_group = size_group;
}

View File

@ -49,6 +49,10 @@
#include <e-shell-window-actions.h>
#include <e-shell-utils.h>
#define E_SHELL_WINDOW_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE \
((obj), E_TYPE_SHELL_WINDOW, EShellWindowPrivate))
/* Shorthand, requires a variable named "shell_window". */
#define ACTION(name) \
(E_SHELL_WINDOW_ACTION_##name (shell_window))

View File

@ -958,8 +958,7 @@ e_shell_window_alert_sink_init (EAlertSinkInterface *interface)
static void
e_shell_window_init (EShellWindow *shell_window)
{
shell_window->priv = G_TYPE_INSTANCE_GET_PRIVATE (
shell_window, E_TYPE_SHELL_WINDOW, EShellWindowPrivate);
shell_window->priv = E_SHELL_WINDOW_GET_PRIVATE (shell_window);
e_shell_window_private_init (shell_window);
}