Ejemplo n.º 1
0
void
on_iface_properties_clicked (GtkWidget *widget, gpointer data)
{
  GstConnectionDialog *dialog;
  GtkTreeSelection *selection;
  GtkTreeModel *model;
  GtkTreeIter iter;
  OobsIface *iface;

  selection = gtk_tree_view_get_selection (GST_NETWORK_TOOL (tool)->interfaces_list);

  if (gtk_tree_selection_get_selected (selection, &model, &iter))
    {
      gtk_tree_model_get (model, &iter,
			  COL_OBJECT, &iface,
			  -1);

      dialog = GST_NETWORK_TOOL (tool)->dialog;
      connection_dialog_prepare (dialog, iface);
      gtk_window_set_transient_for (GTK_WINDOW (dialog->dialog), GTK_WINDOW (tool->main_dialog));

      gst_dialog_add_edit_dialog (tool->main_dialog, dialog->dialog);
      gtk_widget_show (dialog->dialog);
    }
}
Ejemplo n.º 2
0
static void
init_standalone_dialog (GstTool         *tool,
			IfaceSearchTerm  search_term,
			const gchar     *term)
{
  GstNetworkTool *network_tool;
  OobsIface      *iface;
  GtkWidget      *d;

  network_tool = GST_NETWORK_TOOL (tool);
  gst_tool_update_gui (tool);
  iface = ifaces_model_search_iface (search_term, term);

  if (iface)
    {
      connection_dialog_prepare (network_tool->dialog, iface);
      network_tool->dialog->standalone = TRUE;
      g_object_unref (iface);

      gtk_widget_show (network_tool->dialog->dialog);
    }
  else
    {
      d = gtk_message_dialog_new (GTK_WINDOW (tool->main_dialog),
                                  GTK_DIALOG_MODAL,
                                  GTK_MESSAGE_WARNING,
                                  GTK_BUTTONS_CLOSE,
                                  _("The interface does not exist"));
      gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (d),
                                                _("Check that it is correctly typed "
                                                  "and that it is correctly supported "
                                                  "by your system."),
                                                NULL);
      gtk_dialog_run (GTK_DIALOG (d));
      gtk_widget_destroy (d);
      exit (-1);
    }
}