GtkWidget *total_avail_msg;
PrefsAccount *account;
gboolean visible;
-#if !GTK_CHECK_VERSION(2,12,0)
- GtkTooltips *tips;
-#endif
};
struct _VCalAttendee {
{
GtkWidget *att_hbox = gtk_hbox_new(FALSE, 6);
VCalAttendee *attendee = g_new0(VCalAttendee, 1);
-#if !(GTK_CHECK_VERSION(2,12,0))
- GtkTooltips *tips = meet->tips;
-#endif
attendee->address = gtk_entry_new();
attendee->cutype = gtk_combo_box_new_text();
cur = cur->next;
i++;
}
- if (cur)
+ if (cur && cur->data)
return g_strdup(((PrefsAccount *)(cur->data))->address);
else
return g_strdup("");
cur = cur->next;
i++;
}
- if (cur)
+ if (cur && cur->data)
return g_strdup(((PrefsAccount *)(cur->data))->name);
else
return g_strdup("");
static void att_update_icon(VCalMeeting *meet, VCalAttendee *attendee, gint avail, gchar *text)
{
const gchar *icon = GTK_STOCK_DIALOG_INFO;
-#if !(GTK_CHECK_VERSION(2,12,0))
- GtkTooltips *tips = meet->tips;
-#endif
switch (avail) {
case 0: icon = GTK_STOCK_DIALOG_WARNING; break;
GHashTable *avail_table_avail = g_hash_table_new(NULL, g_direct_equal);
GHashTable *avail_table_before = g_hash_table_new(NULL, g_direct_equal);
GHashTable *avail_table_after = g_hash_table_new(NULL, g_direct_equal);
-#if !(GTK_CHECK_VERSION(2,12,0))
- GtkTooltips *tips = meet->tips;
-#endif
for (cur = attendees; cur; cur = cur->next) {
VCalAttendee *attendee = (VCalAttendee *)cur->data;
"internal.ifb", NULL);
gboolean local_only = FALSE;
GSList *attlist;
-#if !(GTK_CHECK_VERSION(2,12,0))
- GtkTooltips *tips = meet->tips;
-#endif
if (vcalprefs.freebusy_get_url == NULL
|| *vcalprefs.freebusy_get_url == '\0') {
if (strncmp(tmp, "http://", 7)
&& strncmp(tmp, "https://", 8)
&& strncmp(tmp, "webcal://", 9)
+ && strncmp(tmp, "webcals://", 10)
&& strncmp(tmp, "ftp://", 6))
contents = file_read_to_str(tmp);
else {
gchar *label = g_strdup_printf(_("Fetching planning for %s..."), email);
- if (!strncmp(tmp, "webcal://", 9)) {
- gchar *tmp2 = g_strdup_printf("http://%s", tmp+9);
+ if (!strncmp(tmp, "webcal", 6)) {
+ gchar *tmp2 = g_strdup_printf("http%s", tmp+6);
g_free(tmp);
tmp = tmp2;
}
gdk_window_set_cursor(meet->window->window, watch_cursor);
organizer = get_organizer(meet);
- organizer_name = get_organizer_name(meet);
account = account_find_from_address(organizer, FALSE);
- if (account && account->set_domain && account->domain) {
+ if(account == NULL) {
+ debug_print("can't get account from address %s\n", organizer);
+ g_free(organizer);
+ return FALSE;
+ }
+
+ organizer_name = get_organizer_name(meet);
+
+ if (account->set_domain && account->domain) {
g_snprintf(buf, sizeof(buf), "%s", account->domain);
} else if (!strncmp(get_domain_name(), "localhost", strlen("localhost"))) {
g_snprintf(buf, sizeof(buf), "%s",
GtkTextBuffer *buffer = NULL;
GtkWidget *date_hbox, *date_vbox, *save_hbox, *label, *hbox;
gchar *s = NULL;
- GtkObject *start_h_adj, *start_m_adj, *end_h_adj, *end_m_adj;
int i = 0, num = 0;
GtkWidget *scrolledwin;
GList *times = NULL;
GList *accounts;
- GtkListStore *menu;
gchar *time_text = NULL;
#ifdef GENERIC_UMPC
GtkWidget *notebook;
if (!watch_cursor)
watch_cursor = gdk_cursor_new(GDK_WATCH);
-#if !(GTK_CHECK_VERSION(2,12,0))
- meet->tips = tips;
-#endif
meet->visible = visible;
- start_h_adj = gtk_adjustment_new (0, 0, 23, 1, 10, 10);
- start_m_adj = gtk_adjustment_new (0, 0, 59, 1, 10, 10);
- end_h_adj = gtk_adjustment_new (0, 0, 23, 1, 10, 10);
- end_m_adj = gtk_adjustment_new (0, 0, 59, 1, 10, 10);
meet->window = gtkut_window_new(GTK_WINDOW_TOPLEVEL, "vcal_meeting_gtk");
#ifndef GENERIC_UMPC
meet->start_time = gtk_combo_box_text_new_with_entry();
#endif
gtk_combo_box_set_active(GTK_COMBO_BOX(meet->start_time), -1);
- menu = GTK_LIST_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(meet->start_time)));
#if !GTK_CHECK_VERSION(2, 24, 0)
combobox_set_popdown_strings(GTK_COMBO_BOX(meet->start_time), times);
#else
meet->end_time = gtk_combo_box_text_new_with_entry();
#endif
gtk_combo_box_set_active(GTK_COMBO_BOX(meet->end_time), -1);
- menu = GTK_LIST_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(meet->end_time)));
#if !GTK_CHECK_VERSION(2, 24, 0)
combobox_set_popdown_strings(GTK_COMBO_BOX(meet->end_time), times);
#else
icalcomponent *calendar = NULL;
FILE *fp;
- if (is_dir_exist(path))
- remove_dir_recursive(path);
- if (!is_dir_exist(path))
- make_dir(path);
- if (!is_dir_exist(path)) {
- perror(path);
+ if (is_dir_exist(path) && remove_dir_recursive(path) < 0) {
+ g_free(path);
+ return;
+ }
+ if (make_dir(path) != 0) {
g_free(path);
return;
}
&& strncmp(file, "http://", 7)
&& strncmp(file, "https://", 8)
&& strncmp(file, "webcal://", 9)
+ && strncmp(file, "webcals://", 10)
&& strncmp(file, "ftp://", 6)) {
gchar *afile = NULL;
if (file[0] != G_DIR_SEPARATOR)
g_free(file);
} else if (file) {
FILE *fp = g_fopen(tmpfile, "rb");
- if (!strncmp(file, "webcal://", 9)) {
- gchar *tmp = g_strdup_printf("http://%s", file+9);
+ if (!strncmp(file, "webcal", 6)) {
+ gchar *tmp = g_strdup_printf("http%s", file+6);
g_free(file);
file = tmp;
}
&& strncmp(file, "http://", 7)
&& strncmp(file, "https://", 8)
&& strncmp(file, "webcal://", 9)
+ && strncmp(file, "webcals://", 10)
&& strncmp(file, "ftp://", 6)) {
gchar *afile = NULL;
if (file[0] != G_DIR_SEPARATOR)
g_free(file);
} else if (file) {
FILE *fp = g_fopen(tmpfile, "rb");
- if (!strncmp(file, "webcal://", 9)) {
- gchar *tmp = g_strdup_printf("http://%s", file+9);
+ if (!strncmp(file, "webcal", 6)) {
+ gchar *tmp = g_strdup_printf("http%s", file+6);
g_free(file);
file = tmp;
}