/**
 * @brief Slot called when the user changes the win console.
 */
void SettingsDialog::change_win_console() {

  edited_settings[Settings::win_console] = ui.win_console_field->isChecked();
  update_buttons();
}
/**
 * @brief Slot called when the user changes the font family.
 */
void SettingsDialog::change_font_family() {

  edited_settings[Settings::font_family] = ui.font_family_field->currentText();
  update_buttons();
}
/**
 * @brief Slot called when the user changes the sprite previewer background.
 */
void SettingsDialog::change_sprite_previewer_background() {

  edited_settings[Settings::sprite_previewer_background] =
    ui.sprite_previewer_background_field->get_color().name();
  update_buttons();
}
示例#4
0
//The main program (this function is called in an endless loop)
void main_program(void)
{
	uint8_t output[2];
	
	update_buttons();
	dcf77_update(!read_pin(&pin_dcf77), g_ticks);
	
	//Menu button pressed? Switch menu mode
	if(g_buttons[0] && !g_last_buttons[0])
	{
		g_mode = (enum modes_e)((g_mode + 1) % MODE_COUNT);
		switch(g_mode)
		{
			case MODE_SET_HOURS:
			case MODE_SET_DAY:
				g_blink_numbers = 1;
				break;
			case MODE_SET_MINUTES:
			case MODE_SET_MONTH:
				g_blink_numbers = 2;
				break;
			default:
				g_blink_numbers = 0;
		};
		g_last_blink_action = g_ticks;
		g_last_blink_state = 1;
		g_last_inc_action = g_ticks;
		g_inc_pressed_time = g_ticks;
	}

	if(g_mode != MODE_NORMAL) //Inside Setup-mode?
	{
		//date/inc buttons pressed
		if(g_buttons[1])
		{
			if(!g_last_buttons[1])
			{
				on_increment_pressed();
				g_inc_pressed_time = g_ticks;
			}

			//Increment continously if pressed & hold
			if(time_since(g_inc_pressed_time) > 100 && time_since(g_last_inc_action) > 15)
			{
				g_last_inc_action = g_ticks;
				on_increment_pressed();
			}
		}
		
		//Are we currently setting time or date? display the appropriate output
		if(g_mode == MODE_SET_HOURS || g_mode == MODE_SET_MINUTES)
		{
			output[0] = g_time.hours;
			output[1] = g_time.minutes;
		}
		else
		{
			output[0] = g_time.day;
			output[1] = g_time.month;
		}
		
		// handle blinking of modifiable numbers
		if(g_blink_numbers != 0)
		{
			if(time_since(g_last_blink_action) > 50)
			{
				g_last_blink_action = g_ticks;
				g_last_blink_state = !g_last_blink_state;
			}
			// Going beyond single-digit range of the display
			// should turn the digit off
			if(g_last_blink_state == 0)
				output[g_blink_numbers-1] = 0xFF;
		}
	}
	else //normal operation (non-setup)
	{
		if(g_buttons[1])
		{
			output[0] = g_time.day;
			output[1] = g_time.month;
		}
		else
		{
			output[0] = g_time.hours;
			output[1] = g_time.minutes;
		}
	}
	
	write_output(output[0], output[1]);
}
/**
 * @brief Slot called when the user changes the sprite grid size.
 */
void SettingsDialog::change_sprite_grid_size() {

  edited_settings[Settings::sprite_grid_size] =
    ui.sprite_grid_size_field->get_size();
  update_buttons();
}
/**
 * @brief Slot called when the user changes the sprite grid color.
 */
void SettingsDialog::change_sprite_grid_color() {

  edited_settings[Settings::sprite_grid_color] =
    ui.sprite_grid_color_field->get_color().name();
  update_buttons();
}
static void
list_changed (NautilusColumnChooser *chooser) 
{
	update_buttons (chooser);
	g_signal_emit (chooser, signals[CHANGED], 0);
}
/**
 * @brief Slot called when the user changes the map background.
 */
void SettingsDialog::change_map_background() {

  edited_settings[Settings::map_background] =
    ui.map_background_field->get_color().name();
  update_buttons();
}
void
grg_prefs_update (void)
{
	update_buttons ();
	update_entry ();
}
示例#10
0
void
grg_pref_dialog (GtkWidget * parent)
{
	GtkWidget *prefs, *notebook, *tab1, *tab2, *tab3;
	GtkWidget *frame1, *frame2, *frame3;
	GtkWidget *crypt_box, *hash_box, *comp_box;
	GtkWidget *frame_font;
	GtkWidget *frame_file, *but_file, *box_file, *but_file_clear;
	GtkWidget *frame_save, *box_save;
	GtkWidget *frame_misc, *box_misc;
	GtkWidget *frame_xpire, *box_xpire, *xpire_lbl;
	GtkWidget *frame_passes, *box_passes, *lbl_passes;
	GtkWidget *frame_clip, *box_clip;
	gint response;

	PangoFontDescription *fdesc;

	if (active_flag)
		return;

	prefs = gtk_dialog_new_with_buttons (_("Preferences"),
					     GTK_WINDOW (parent),
					     GTK_DIALOG_DESTROY_WITH_PARENT,
					     GTK_STOCK_OK, GTK_RESPONSE_OK,
					     GTK_STOCK_APPLY,
					     GTK_RESPONSE_APPLY,
					     GTK_STOCK_CANCEL,
					     GTK_RESPONSE_CANCEL, NULL);

	//first page: algorithms
	tab1 = gtk_table_new (3, 2, FALSE);

	frame1 = gtk_frame_new (_("Encryption"));
	gtk_table_attach_defaults (GTK_TABLE (tab1), frame1, 0, 1, 0, 3);

	crypt_box = gtk_vbox_new (FALSE, GRG_PAD);
	gtk_container_add (GTK_CONTAINER (frame1), crypt_box);

	NEW_RADIO_BUTTON (rij1_but, NULL, modify_crypto, GRG_AES,
			  "AES (Rijndael 128)", crypt_box);
	NEW_RADIO_BUTTON (ser_but,
			  gtk_radio_button_get_group (GTK_RADIO_BUTTON
						      (rij1_but)),
			  modify_crypto, GRG_SERPENT, "Serpent", crypt_box);
	NEW_RADIO_BUTTON (twof_but,
			  gtk_radio_button_get_group (GTK_RADIO_BUTTON
						      (rij1_but)),
			  modify_crypto, GRG_TWOFISH, "Twofish", crypt_box);
	NEW_RADIO_BUTTON (cast_but,
			  gtk_radio_button_get_group (GTK_RADIO_BUTTON
						      (rij1_but)),
			  modify_crypto, GRG_CAST_256, "Cast 256", crypt_box);
	NEW_RADIO_BUTTON (safer_but,
			  gtk_radio_button_get_group (GTK_RADIO_BUTTON
						      (rij1_but)),
			  modify_crypto, GRG_SAFERPLUS, "Safer+", crypt_box);
	NEW_RADIO_BUTTON (loki_but,
			  gtk_radio_button_get_group (GTK_RADIO_BUTTON
						      (rij1_but)),
			  modify_crypto, GRG_LOKI97, "Loki97", crypt_box);
	NEW_RADIO_BUTTON (tdes_but,
			  gtk_radio_button_get_group (GTK_RADIO_BUTTON
						      (rij1_but)),
			  modify_crypto, GRG_3DES, "3-DES", crypt_box);
	NEW_RADIO_BUTTON (rij2_but,
			  gtk_radio_button_get_group (GTK_RADIO_BUTTON
						      (rij1_but)),
			  modify_crypto, GRG_RIJNDAEL_256, "Rijndael 256",
			  crypt_box);

	NEW_ROW_SEPARATOR (crypt_box);

	NEW_LABEL (crypto_block_lbl, crypt_box, "");
	NEW_LABEL (crypto_key_lbl, crypt_box, "");

	update_crypto_label ();

	frame2 = gtk_frame_new (_("Hashing"));
	gtk_table_attach_defaults (GTK_TABLE (tab1), frame2, 1, 2, 0, 1);

	hash_box = gtk_vbox_new (FALSE, GRG_PAD);
	gtk_container_add (GTK_CONTAINER (frame2), hash_box);

	NEW_RADIO_BUTTON (sha_but, NULL, modify_hash, GRG_SHA1, "SHA1",
			  hash_box);
	NEW_RADIO_BUTTON (ripe_but,
			  gtk_radio_button_get_group (GTK_RADIO_BUTTON
						      (sha_but)), modify_hash,
			  GRG_RIPEMD_160, "RIPEMD 160", hash_box);

	frame3 = gtk_frame_new (_("Compression"));
	gtk_table_attach_defaults (GTK_TABLE (tab1), frame3, 1, 2, 1, 2);

	comp_box = gtk_vbox_new (FALSE, GRG_PAD);
	gtk_container_add (GTK_CONTAINER (frame3), comp_box);

	NEW_RADIO_BUTTON (zlib_but, NULL, modify_comp, GRG_ZLIB, "ZLib",
			  comp_box);
	NEW_RADIO_BUTTON (bz_but,
			  gtk_radio_button_get_group (GTK_RADIO_BUTTON
						      (zlib_but)),
			  modify_comp, GRG_BZIP, "BZip2", comp_box);

	NEW_ROW_SEPARATOR (comp_box);

	NEW_RADIO_BUTTON (r0_but, NULL, modify_ratio, GRG_LVL_NONE, _("None"),
			  comp_box);
	NEW_RADIO_BUTTON (r3_but,
			  gtk_radio_button_get_group (GTK_RADIO_BUTTON
						      (r0_but)), modify_ratio,
			  GRG_LVL_FAST, _("Fast"), comp_box);
	NEW_RADIO_BUTTON (r6_but,
			  gtk_radio_button_get_group (GTK_RADIO_BUTTON
						      (r0_but)), modify_ratio,
			  GRG_LVL_GOOD, _("Good"), comp_box);
	NEW_RADIO_BUTTON (r9_but,
			  gtk_radio_button_get_group (GTK_RADIO_BUTTON
						      (r0_but)), modify_ratio,
			  GRG_LVL_BEST, _("Best"), comp_box);

	notebook = gtk_notebook_new ();
	gtk_notebook_append_page (GTK_NOTEBOOK (notebook), tab1,
				  gtk_label_new (_("Algorithms")));
	gtk_box_pack_start (GTK_BOX (GTK_DIALOG (prefs)->vbox), notebook,
			    TRUE, TRUE, GRG_PAD);

	//second page: General options
	tab2 = gtk_vbox_new (FALSE, GRG_PAD);
	gtk_notebook_append_page (GTK_NOTEBOOK (notebook), tab2,
				  gtk_label_new (_("General options")));

	frame_font = gtk_frame_new (_("Editor font"));
	gtk_box_pack_start (GTK_BOX (tab2), frame_font, FALSE, TRUE, 1);

	but_font =
		gtk_button_new_with_label (_
					   ("Click to change the editor font"));
	gtk_container_add (GTK_CONTAINER (frame_font), but_font);

	fdesc = pango_font_description_from_string (grg_prefs_editor_font);
	gtk_widget_modify_font (but_font, fdesc);
	g_free (fdesc);

	g_signal_connect (G_OBJECT (but_font), "clicked",
			  G_CALLBACK (modify_font), prefs);

	frame_misc = gtk_frame_new (_("Decorations"));
	gtk_box_pack_start (GTK_BOX (tab2), frame_misc, FALSE, TRUE, 1);

	box_misc = gtk_vbox_new (FALSE, GRG_PAD);
	gtk_container_add (GTK_CONTAINER (frame_misc), box_misc);

	NEW_ROW_SEPARATOR (tab2);

	splash_check = gtk_check_button_new_with_label (_("Splash screen"));
	g_signal_connect (G_OBJECT (splash_check), "toggled",
			  G_CALLBACK (modify_splash), NULL);
	gtk_box_pack_start (GTK_BOX (box_misc), splash_check, FALSE, TRUE, 1);

	frame_file = gtk_frame_new (_("File to open at startup"));
	gtk_box_pack_start (GTK_BOX (tab2), frame_file, FALSE, TRUE, 1);

	box_file = gtk_hbox_new (FALSE, GRG_PAD);
	gtk_container_add (GTK_CONTAINER (frame_file), box_file);

	file_entry = gtk_entry_new ();
	gtk_box_pack_start (GTK_BOX (box_file), file_entry, FALSE, TRUE, 1);
	but_file = gtk_button_new_from_stock (GTK_STOCK_OPEN);
	gtk_box_pack_start (GTK_BOX (box_file), but_file, FALSE, TRUE, 1);
	g_signal_connect (G_OBJECT (but_file), "clicked",
			  G_CALLBACK (meta_open_startup_file),
			  (gpointer) prefs);
	but_file_clear = gtk_button_new_from_stock (GTK_STOCK_CLEAR);
	gtk_box_pack_start (GTK_BOX (box_file), but_file_clear, FALSE, TRUE,
			    1);
	g_signal_connect (G_OBJECT (but_file_clear), "clicked",
			  G_CALLBACK (clear_file), NULL);

	frame_save = gtk_frame_new (_("File saving"));
	gtk_box_pack_start (GTK_BOX (tab2), frame_save, FALSE, TRUE, 1);

	box_save = gtk_vbox_new (FALSE, GRG_PAD);
	gtk_container_add (GTK_CONTAINER (frame_save), box_save);

	bak_check =
		gtk_check_button_new_with_label (_("Make backups of files"));
	g_signal_connect (G_OBJECT (bak_check), "toggled",
			  G_CALLBACK (modify_bak), NULL);
	gtk_box_pack_start (GTK_BOX (box_save), bak_check, FALSE, TRUE, 1);
	over_check =
		gtk_check_button_new_with_label (_
						 ("Ask when overwriting files"));
	g_signal_connect (G_OBJECT (over_check), "toggled",
			  G_CALLBACK (modify_over), NULL);
	gtk_box_pack_start (GTK_BOX (box_save), over_check, FALSE, TRUE, 1);

	//third page: Security
	tab3 = gtk_vbox_new (FALSE, GRG_PAD);
	gtk_notebook_append_page (GTK_NOTEBOOK (notebook), tab3,
				  gtk_label_new (_("Security")));

	frame_xpire = gtk_frame_new (_("Password expiration"));
	gtk_box_pack_start (GTK_BOX (tab3), frame_xpire, FALSE, TRUE, 1);

	box_xpire = gtk_hbox_new (FALSE, GRG_PAD);
	gtk_container_add (GTK_CONTAINER (frame_xpire), box_xpire);

	xpire_check =
		gtk_check_button_new_with_label (_("Password expires in"));
	xpire_spin =
		gtk_spin_button_new_with_range (EXP_TIME_MIN, EXP_TIME_MAX,
						1);
	xpire_lbl = gtk_label_new (_("days"));

	g_signal_connect (G_OBJECT (xpire_check), "toggled",
			  G_CALLBACK (modify_xpire), xpire_spin);
	g_signal_connect (G_OBJECT (xpire_spin), "value-changed",
			  G_CALLBACK (modify_xpin), xpire_check);

	gtk_box_pack_start (GTK_BOX (box_xpire), xpire_check, FALSE, TRUE, 1);
	gtk_box_pack_start (GTK_BOX (box_xpire), xpire_spin, FALSE, TRUE, 1);
	gtk_box_pack_start (GTK_BOX (box_xpire), xpire_lbl, FALSE, TRUE, 1);

	//this means "passes in wiping a file", not "wipe the passes" :)
	frame_passes = gtk_frame_new (_("Wipe passes"));
	gtk_box_pack_start (GTK_BOX (tab3), frame_passes, FALSE, TRUE, 1);

	box_passes = gtk_hbox_new (FALSE, GRG_PAD);
	gtk_container_add (GTK_CONTAINER (frame_passes), box_passes);

	lbl_passes = gtk_label_new (_("Number of overwritings with random\n"
				      "data, when wiping a file:"));
	gtk_box_pack_start (GTK_BOX (box_passes), lbl_passes, FALSE, TRUE, 1);

	passes_spin =
		gtk_spin_button_new_with_range (WIPE_PASSES_MIN,
						WIPE_PASSES_MAX, 1);
	gtk_box_pack_start (GTK_BOX (box_passes), passes_spin, FALSE, TRUE,
			    1);

	g_signal_connect (G_OBJECT (passes_spin), "value-changed",
			  G_CALLBACK (modify_passes), NULL);

	frame_clip = gtk_frame_new (_("Clipboard"));
	gtk_box_pack_start (GTK_BOX (tab3), frame_clip, FALSE, TRUE, 1);

	box_clip = gtk_vbox_new (FALSE, GRG_PAD);
	gtk_container_add (GTK_CONTAINER (frame_clip), box_clip);

	cclip_check =
		gtk_check_button_new_with_label (_
						 ("Clear clipboard on closing file"));
	g_signal_connect (G_OBJECT (cclip_check), "toggled",
			  G_CALLBACK (modify_cclip), NULL);
	gtk_box_pack_start (GTK_BOX (box_clip), cclip_check, FALSE, TRUE, 1);

	qclip_check =
		gtk_check_button_new_with_label (_
						 ("Clear clipboard on exit"));
	g_signal_connect (G_OBJECT (qclip_check), "toggled",
			  G_CALLBACK (modify_qclip), NULL);
	gtk_box_pack_start (GTK_BOX (box_clip), qclip_check, FALSE, TRUE, 1);

	//end of last tab
	active_flag = TRUE;
	reset_values (prefs);
	update_buttons ();

	gtk_widget_show_all (prefs);

	while (TRUE)
	{
		gboolean exit = TRUE;
		response = gtk_dialog_run (GTK_DIALOG (prefs));

		switch (response)
		{
		case GTK_RESPONSE_OK:
			apply_values ();
			break;
		case GTK_RESPONSE_APPLY:
			apply_values ();
			exit = FALSE;
			break;
		case GTK_RESPONSE_CANCEL:
		default:
			break;
		}

		if (exit)
		{
			gtk_widget_destroy (prefs);
			active_flag = FALSE;
			break;
		}
	}
}
	void InputDeviceProvider_Win32Hid::update(void *preparse_data, void *report, int report_size)
	{
		update_buttons(preparse_data, report, report_size);
		update_values(preparse_data, report, report_size);
	}
示例#12
0
 void AccountsPage::init_with_step(const int _step)
 {
     active_step_ = _step;
     
     MacProfileType active_account_type =
         (_step == 1 ? MacProfileType::Agent : MacProfileType::ICQ);
     
     icq_accounts_count_ = 0;
     agent_accounts_count_ = 0;
     selected_icq_accounts_count_ = 0;
     selected_agent_accounts_count_ = 0;
     
     for (auto _widget : account_widgets_)
     {
         accounts_layout_->removeWidget(_widget);
         delete _widget;
     }
     
     account_widgets_.clear();
     
     for (MacProfile &account : profiles_)
     {
         if (account.type() == active_account_type)
         {
             account_widget* widget = new account_widget(accounts_area_widget_, account);
             
             connect(widget, SIGNAL(checked()), this, SLOT(updateNextButtonState()), Qt::QueuedConnection);
             
             accounts_layout_->addWidget(widget);
             
             account_widgets_.push_back(widget);
             
             connect(widget, &QPushButton::toggled, [this, widget](bool _checked)
             {
                 if (_checked)
                 {
                     for (auto _widget : account_widgets_)
                     {
                         if (_widget != widget && _widget->isChecked())
                         {
                             _widget->setChecked(false);
                         }
                     }
                 }
                 
                 selected_agent_accounts_count_ = 0;
                 selected_icq_accounts_count_ = 0;
                 
                 for (auto _widget : account_widgets_)
                 {
                     if (_widget->isChecked())
                     {
                         if (_widget->profileType() == MacProfileType::Agent)
                             selected_agent_accounts_count_ = 1;
                         else if (_widget->profileType() == MacProfileType::ICQ)
                             selected_icq_accounts_count_ = 1;
                     }
                     
                     for (MacProfile &account : profiles_)
                     {
                         if (account.uin() == _widget->uid()) {
                             account.setSelected(_widget->isChecked());
                         }
                     }
                 }
                 
                 update_tabs();
                 update_buttons();
             });
         }
         
         if (account.type() == MacProfileType::ICQ)
         {
             ++icq_accounts_count_;
             if (account.selected())
                 ++selected_icq_accounts_count_;
         }
         else if (account.type() == MacProfileType::Agent)
         {
             ++agent_accounts_count_;
             if (account.selected())
                 ++selected_agent_accounts_count_;
         }
     }
     
     updateNextButtonState();
     buttonSkip_->setVisible(build::is_agent() && active_step_ == 2);
     
     update_tabs();
     update_buttons();
 }
示例#13
0
void Question_widget::resizeEvent(QResizeEvent* e) {
  if (e->oldSize().width() != width()) {
    update_buttons();
  }
}
/**
 * @brief Slot called when the user changes the font size.
 */
void SettingsDialog::change_font_size() {

  edited_settings[Settings::font_size] = ui.font_size_field->value();
  update_buttons();
}
示例#15
0
static void
selection_changed_callback (GtkTreeSelection *selection, gpointer user_data)
{
	update_buttons (NAUTILUS_COLUMN_CHOOSER (user_data));
}
/**
 * @brief Slot called when the user changes the tab length.
 */
void SettingsDialog::change_tab_length() {

  edited_settings[Settings::tab_length] = ui.tab_length_field->value();
  update_buttons();
}
/**
 * @brief Slot called when the user want to reset settings (reload from file).
 */
void SettingsDialog::reset() {

  update();
  edited_settings.clear();
  update_buttons();
}
/**
 * @brief Slot called when the user changes the map grid show at opening.
 */
void SettingsDialog::change_map_grid_show_at_opening() {

  edited_settings[Settings::map_grid_show_at_opening] =
    ui.map_grid_show_at_opening_field->isChecked();
  update_buttons();
}
/**
 * @brief Slot called when the user changes the working directory.
 */
void SettingsDialog::change_working_directory() {

  edited_settings[Settings::working_directory] =
    ui.working_directory_field->text();
  update_buttons();
}
/**
 * @brief Slot called when the user changes the sprite grid style.
 */
void SettingsDialog::change_sprite_grid_style() {

  edited_settings[Settings::sprite_grid_style] =
    static_cast<int>(ui.sprite_grid_style_field->get_selected_value());
  update_buttons();
}
/**
 * @brief Slot called when the user changes the no audio.
 */
void SettingsDialog::change_no_audio() {

  edited_settings[Settings::no_audio] = ui.no_audio_field->isChecked();
  update_buttons();
}
/**
 * @brief Slot called when the user changes the sprite auto detect grid.
 */
void SettingsDialog::change_sprite_auto_detect_grid() {

  edited_settings[Settings::sprite_auto_detect_grid] =
    ui.sprite_auto_detect_grid_field->isChecked();
  update_buttons();
}
/**
 * @brief Slot called when the user changes the video acceleration.
 */
void SettingsDialog::change_video_acceleration() {

  edited_settings[Settings::video_acceleration] =
    ui.video_acceleration_field->isChecked();
  update_buttons();
}
/**
 * @brief Slot called when the user changes the sprite origin show at opening.
 */
void SettingsDialog::change_sprite_origin_show_at_opening() {

  edited_settings[Settings::sprite_origin_show_at_opening] =
    ui.sprite_origin_show_at_opening_field->isChecked();
  update_buttons();
}
示例#25
0
文件: gtkft.c 项目: bf4/pidgin-mac
void
pidgin_xfer_dialog_update_xfer(PidginXferDialog *dialog,
								PurpleXfer *xfer)
{
	PidginXferUiData *data;
	char *size_str, *remaining_str;
	GtkTreeSelection *selection;
	time_t current_time;
	GtkTreeIter iter;
	gboolean valid;

	g_return_if_fail(dialog != NULL);
	g_return_if_fail(xfer != NULL);

	if ((data = PIDGINXFER(xfer)) == NULL)
		return;

	if (data->in_list == FALSE)
		return;

	current_time = time(NULL);
	if (((current_time - data->last_updated_time) == 0) &&
		(!purple_xfer_is_completed(xfer)))
	{
		/* Don't update the window more than once per second */
		return;
	}
	data->last_updated_time = current_time;

	size_str      = purple_str_size_to_units(purple_xfer_get_size(xfer));
	remaining_str = purple_str_size_to_units(purple_xfer_get_bytes_remaining(xfer));

	gtk_list_store_set(xfer_dialog->model, &data->iter,
					   COLUMN_PROGRESS, purple_xfer_get_progress(xfer),
					   COLUMN_SIZE, size_str,
					   COLUMN_REMAINING, remaining_str,
					   -1);

	g_free(size_str);
	g_free(remaining_str);

	if (purple_xfer_is_completed(xfer))
	{
		GdkPixbuf *pixbuf;

		pixbuf = gtk_widget_render_icon(dialog->window,
										PIDGIN_STOCK_FILE_DONE,
										GTK_ICON_SIZE_MENU, NULL);

		gtk_list_store_set(GTK_LIST_STORE(xfer_dialog->model), &data->iter,
						   COLUMN_STATUS, pixbuf,
						   COLUMN_REMAINING, _("Finished"),
						   -1);

		g_object_unref(pixbuf);
	}

	selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(xfer_dialog->tree));

	update_title_progress(dialog);
	if (xfer == dialog->selected_xfer)
		update_detailed_info(xfer_dialog, xfer);

	if (purple_xfer_is_completed(xfer) && dialog->auto_clear)
		pidgin_xfer_dialog_remove_xfer(dialog, xfer);
	else
		update_buttons(dialog, xfer);

	/*
	 * If all transfers are finished, and the pref is set, then
	 * close the dialog.  Otherwise just exit this function.
	 */
	if (dialog->keep_open)
		return;

	valid = gtk_tree_model_get_iter_first(GTK_TREE_MODEL(dialog->model), &iter);
	while (valid)
	{
		GValue val;
		PurpleXfer *next;

		val.g_type = 0;
		gtk_tree_model_get_value(GTK_TREE_MODEL(dialog->model),
				&iter, COLUMN_DATA, &val);

		next = g_value_get_pointer(&val);
		if (!purple_xfer_is_completed(next))
			return;

		valid = gtk_tree_model_iter_next(GTK_TREE_MODEL(dialog->model), &iter);
	}

	/* If we got to this point then we know everything is finished */
	pidgin_xfer_dialog_hide(dialog);
}