/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2011 Hiroyuki Yamamoto and the Claws Mail team
+ * Copyright (C) 1999-2012 Hiroyuki Yamamoto and the Claws Mail team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
#ifdef HAVE_CONFIG_H
# include "config.h"
+#include "claws-features.h"
#endif
#include "defs.h"
GNode *node;
FolderItem *item;
- if (dialog && gtkut_widget_get_visible(dialog)) return NULL;
+ if (dialog && gtk_widget_get_visible(dialog)) return NULL;
if (!dialog)
grouplist_dialog_create();
gtk_widget_hide(dialog);
if (!ack) {
- slist_free_strings(subscribed);
- g_slist_free(subscribed);
+ slist_free_strings_full(subscribed);
subscribed = NULL;
for (node = folder->node->children; node != NULL;
dialog = gtk_dialog_new();
gtk_window_set_resizable(GTK_WINDOW(dialog), TRUE);
gtk_container_set_border_width
- (GTK_CONTAINER(GTK_DIALOG(dialog)->action_area), 5);
+ (GTK_CONTAINER(gtk_dialog_get_action_area(GTK_DIALOG(dialog))), 5);
gtk_window_set_position(GTK_WINDOW(dialog), GTK_WIN_POS_CENTER);
gtk_window_set_title(GTK_WINDOW(dialog), _("Newsgroup subscription"));
g_signal_connect(G_OBJECT(dialog), "delete_event",
MANAGE_WINDOW_SIGNALS_CONNECT(dialog);
vbox = gtk_vbox_new(FALSE, 8);
- gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), vbox);
+ gtk_container_add(GTK_CONTAINER(
+ gtk_dialog_get_content_area(GTK_DIALOG(dialog))), vbox);
gtk_container_set_border_width(GTK_CONTAINER(vbox), 8);
hbox = gtk_hbox_new(FALSE, 0);
gtk_cmclist_set_column_auto_resize(GTK_CMCLIST(ctree), 0, TRUE);
gtk_cmclist_set_selection_mode(GTK_CMCLIST(ctree), GTK_SELECTION_MULTIPLE);
- if (prefs_common.enable_dotted_lines) {
- gtk_cmctree_set_line_style(GTK_CMCTREE(ctree), GTK_CMCTREE_LINES_DOTTED);
- gtk_cmctree_set_expander_style(GTK_CMCTREE(ctree),
- GTK_CMCTREE_EXPANDER_SQUARE);
- } else {
- gtk_cmctree_set_line_style(GTK_CMCTREE(ctree), GTK_CMCTREE_LINES_NONE);
- gtk_cmctree_set_expander_style(GTK_CMCTREE(ctree),
- GTK_CMCTREE_EXPANDER_TRIANGLE);
- }
+ gtk_cmctree_set_line_style(GTK_CMCTREE(ctree), GTK_CMCTREE_LINES_NONE);
+ gtk_cmctree_set_expander_style(GTK_CMCTREE(ctree),
+ GTK_CMCTREE_EXPANDER_TRIANGLE);
for (i = 0; i < 3; i++)
gtkut_widget_set_can_focus(GTK_CMCLIST(ctree)->column[i].button, FALSE);
&refresh_button, GTK_STOCK_REFRESH,
&cancel_button, GTK_STOCK_CANCEL,
&ok_button, GTK_STOCK_OK);
- gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->action_area),
+ gtk_container_add(GTK_CONTAINER(gtk_dialog_get_action_area(GTK_DIALOG(dialog))),
confirm_area);
gtk_widget_grab_default(ok_button);
prefs_common.news_subscribe_width,
prefs_common.news_subscribe_height);
- gtk_widget_show_all(GTK_DIALOG(dialog)->vbox);
+ gtk_widget_show_all(gtk_dialog_get_content_area(GTK_DIALOG(dialog)));
}
static GHashTable *branch_node_table;
parent = grouplist_create_parent(parent_name, pattern);
node = grouplist_hash_get_branch_node(name);
if (node) {
- gtk_sctree_set_node_info(GTK_CMCTREE(ctree), node, cols[0], 0,
+ gtk_cmctree_set_node_info(GTK_CMCTREE(ctree), node, cols[0], 0,
NULL, NULL, FALSE, FALSE);
gtk_cmctree_node_set_text(GTK_CMCTREE(ctree), node, 1, cols[1]);
gtk_cmctree_node_set_text(GTK_CMCTREE(ctree), node, 2, cols[2]);
GSList *cur;
GtkCMCTreeNode *node;
GPatternSpec *pspec;
+ GdkWindow *window;
if (locked) return;
locked = TRUE;
if (!watch_cursor)
watch_cursor = gdk_cursor_new(GDK_WATCH);
- gdk_window_set_cursor(dialog->window, watch_cursor);
+ window = gtk_widget_get_window(dialog);
+ gdk_window_set_cursor(window, watch_cursor);
main_window_cursor_wait(mainwindow_get_mainwindow());
GTK_EVENTS_FLUSH();
if (group_list == NULL && ack == TRUE) {
alertpanel_error(_("Can't retrieve newsgroup list."));
locked = FALSE;
- gdk_window_set_cursor(dialog->window, NULL);
+ gdk_window_set_cursor(window, NULL);
main_window_cursor_normal(mainwindow_get_mainwindow());
return;
}
gtk_label_set_text(GTK_LABEL(status_label), _("Done."));
- gdk_window_set_cursor(dialog->window, NULL);
+ gdk_window_set_cursor(window, NULL);
main_window_cursor_normal(mainwindow_get_mainwindow());
locked = FALSE;
static gboolean key_pressed(GtkWidget *widget, GdkEventKey *event, gpointer data)
{
- if (event && event->keyval == GDK_Escape)
+ if (event && event->keyval == GDK_KEY_Escape)
cancel_clicked(NULL, NULL);
return FALSE;
}