コード例 #1
0
void
on_iface_active_changed (GtkWidget *widget, gpointer data)
{
  GstConnectionDialog *dialog;
  GtkWidget *roaming_active;
  gboolean active;

  dialog = GST_NETWORK_TOOL (tool)->dialog;
  active = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));

  connection_dialog_set_sensitive (dialog, active);

  roaming_active = gst_dialog_get_widget (tool->main_dialog, "connection_device_roaming");
  g_signal_handlers_block_by_func (roaming_active, on_iface_roaming_changed, data);
  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (roaming_active), !active);
  g_signal_handlers_unblock_by_func (roaming_active, on_iface_roaming_changed, data);
}
コード例 #2
0
void
connection_dialog_prepare (GstConnectionDialog *dialog, OobsIface *iface)
{
  gboolean active;
  gchar *title;

  dialog->iface = g_object_ref (iface);
  active = oobs_iface_get_configured (dialog->iface);

  title = g_strdup_printf (_("%s Properties"),
			   oobs_iface_get_device_name (dialog->iface));
  gtk_window_set_title (GTK_WINDOW (dialog->dialog), title);
  g_free (title);

  prepare_dialog_layout (dialog, iface);
  connection_dialog_set_sensitive (dialog, active);

  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dialog->roaming_configured), !active);
  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dialog->connection_configured), active);

  general_prepare (dialog, iface);

  if (OOBS_IS_IFACE_PPP (iface))
    ppp_dialog_prepare (dialog);
  else
    {
      if (OOBS_IS_IFACE_WIRELESS (iface))
        {
	  wireless_dialog_prepare (dialog);
	  ethernet_dialog_prepare (dialog);
	}
      else if (OOBS_IS_IFACE_ETHERNET (iface)
	       || OOBS_IS_IFACE_IRLAN (iface))
	ethernet_dialog_prepare (dialog);
      else if (OOBS_IS_IFACE_PLIP (iface))
	plip_dialog_prepare (dialog);
    }

  dialog->changed = FALSE;
  g_object_unref (dialog->iface);
}