Esempio n. 1
0
static void
keyserver_selected_from_list_cb (SettingsDlg *dialog)
{
  char *text;

  if (dialog->gnupg21)
    return;

  text = gtk_combo_box_get_active_text (dialog->keyserver.combo);
  g_message ("got `%s'", text);
  xfree (dialog->keyserver.url);
  dialog->keyserver.url = (text && *text)? text : NULL;
  update_modified (dialog, 1);
}
Esempio n. 2
0
/*
   Default key section.
 */
static void
key_selected_cb (SettingsDlg *dialog)
{
  GList *selected;

  selected = gpa_key_selector_get_selected_keys (dialog->default_key.list);
  gpgme_key_unref (dialog->default_key.key);
  dialog->default_key.key = selected? selected->data : NULL;
  if (dialog->default_key.key)
    gpgme_key_ref (dialog->default_key.key);

  g_list_free (selected);
  update_modified (dialog, 1);
}
Esempio n. 3
0
static void
akl_method_changed_cb (SettingsDlg *dialog)
{
  int idx;

  dialog->akl.require_addr = 0;
  idx = gtk_combo_box_get_active (dialog->akl.methods);
  if (idx < 0 || idx > DIM(akl_table))
    {
      dialog->akl.method_idx = -1;
      return;
    }
  dialog->akl.method_idx = idx;

  if (akl_table[idx].list && strchr (akl_table[idx].list, 'D'))
    dialog->akl.require_addr = 1;

  update_modified (dialog, 1);
}
Esempio n. 4
0
Gobby::TextTabLabel::TextTabLabel(Folder& folder, TextSessionView& view):
	TabLabel(folder, view, Gtk::Stock::EDIT), m_dot_char(0)
{
	update_modified();
	update_dots();

	m_modified_changed_handle = g_signal_connect_after(
		G_OBJECT(view.get_text_buffer()), "modified-changed",
		G_CALLBACK(on_modified_changed_static), this);

	InfTextBuffer* buffer = 
		INF_TEXT_BUFFER(
			inf_session_get_buffer(
				INF_SESSION(view.get_session())));
	m_insert_text_handle = g_signal_connect_after(
		G_OBJECT(buffer), "text-inserted",
		G_CALLBACK(on_text_inserted_static), this);
	m_erase_text_handle = g_signal_connect_after(
		G_OBJECT(buffer), "text-erased",
		G_CALLBACK(on_text_erased_static), this);

	m_extra.pack_start(m_dots, Gtk::PACK_SHRINK);
}
Esempio n. 5
0
static void
load_settings (SettingsDlg *dialog)
{
  GpaOptions *options = gpa_options_get_instance ();

  g_return_if_fail (IS_SETTINGS_DLG (dialog));

  /* UI section.  */
  gtk_toggle_button_set_active
    (dialog->ui.advanced_mode, !gpa_options_get_simplified_ui (options));
  gtk_toggle_button_set_active
    (dialog->ui.show_advanced_options,
     !!gpa_options_get_show_advanced_options (options));

  /* Default key section.  */
  /*gpa_options_get_default_key (options);*/
  /* FIXME: Need to select the one from the list. */


  /* Default keyserver section.  */
#ifdef ENABLE_KEYSERVER_SUPPORT
  if (!dialog->gnupg21)
    {
      gtk_entry_set_text (GTK_ENTRY
                          (gtk_bin_get_child
                           (GTK_BIN (dialog->keyserver.combo))),
                          gpa_options_get_default_keyserver (options));
    }
#endif /*ENABLE_KEYSERVER_SUPPORT*/

  /* AKL section. */
  if (dialog->akl.enabled)
    parse_akl (dialog);


  update_modified (dialog, 0);
}
Esempio n. 6
0
static void
akl_addr_changed_cb (SettingsDlg *dialog)
{
  const char *addr;
  struct in_addr binaddr;

  xfree (dialog->akl.ip_addr );
  dialog->akl.ip_addr = NULL;

  if (!GTK_WIDGET_IS_SENSITIVE (dialog->akl.addr_entry))
    return;

  addr = gtk_entry_get_text (dialog->akl.addr_entry);
  if (!addr || !*addr || !inet_aton (addr, &binaddr) )
    {
      g_message ("IP-address is '%s' is NOT valid", addr? addr:"[none]");
      return;
    }

  dialog->akl.ip_addr = xstrdup (addr);
  g_message ("IP-address is '%s' is valid", addr);

  update_modified (dialog, 1);
}
Esempio n. 7
0
void Gobby::TextTabLabel::on_modified_changed()
{
	update_modified();
}
Esempio n. 8
0
void Gobby::TextTabLabel::on_notify_status()
{
	TabLabel::on_notify_status();
	update_modified();
}