Пример #1
0
int     m_private(struct Client *cptr,
                  struct Client *sptr,
                  int parc,
                  char *parv[])
{
  return m_message(cptr, sptr, parc, parv, 0);
}
Пример #2
0
bool wxFontDialog::DoCreate(wxWindow *parent)
{
    m_needParent = false;

    if (!PreCreation( parent, wxDefaultPosition, wxDefaultSize ) ||
        !CreateBase( parent, -1, wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE,
                     wxDefaultValidator, wxT("fontdialog") ))
    {
        wxFAIL_MSG( wxT("wxFontDialog creation failed") );
        return false;
    }

    wxString m_message( _("Choose font") );
    m_widget = gtk_font_selection_dialog_new( wxGTK_CONV( m_message ) );

    if (parent)
        gtk_window_set_transient_for(GTK_WINDOW(m_widget),
                                     GTK_WINDOW(parent->m_widget));

    GtkFontSelectionDialog *sel = GTK_FONT_SELECTION_DIALOG(m_widget);

    gtk_signal_connect( GTK_OBJECT(sel->ok_button), "clicked",
      GTK_SIGNAL_FUNC(gtk_fontdialog_ok_callback), (gpointer*)this );

    // strange way to internationalize
    gtk_label_set( GTK_LABEL( BUTTON_CHILD(sel->ok_button) ), _("OK") );

    gtk_signal_connect( GTK_OBJECT(sel->cancel_button), "clicked",
      GTK_SIGNAL_FUNC(gtk_fontdialog_cancel_callback), (gpointer*)this );

    // strange way to internationalize
    gtk_label_set( GTK_LABEL( BUTTON_CHILD(sel->cancel_button) ), _("Cancel") );

    gtk_signal_connect( GTK_OBJECT(m_widget), "delete_event",
        GTK_SIGNAL_FUNC(gtk_fontdialog_delete_callback), (gpointer)this );

    wxFont font = m_fontData.GetInitialFont();
    if( font.IsOk() )
    {
        const wxNativeFontInfo *info = font.GetNativeFontInfo();

        if ( info )
        {

            const wxString& fontname = info->GetXFontName();
            if ( !fontname )
                font.GetInternalFont();

            gtk_font_selection_dialog_set_font_name(sel, wxGTK_CONV(fontname));
        }
        else
        {
            // this is not supposed to happen!
            wxFAIL_MSG(wxT("font is ok but no native font info?"));
        }
    }

    return true;
}
Пример #3
0
int     m_notice(struct Client *cptr,
                 struct Client *sptr,
                 int parc,
                 char *parv[])
{
  if (!IsRegistered(cptr))
    return 0;
  return m_message(cptr, sptr, parc, parv, 1);
}
Пример #4
0
static void
m_privmsg(struct Client *client_p, struct Client *source_p, int parc, char *parv[])
{
	/* servers have no reason to send privmsgs, yet sometimes there is cause
	 * for a notice.. (for example remote kline replies) --fl_
	 */
	if(!IsClient(source_p))
		return;

	m_message(PRIVMSG, "PRIVMSG", client_p, source_p, parc, parv);
}
Пример #5
0
bool wxFontDialog::DoCreate(wxWindow *parent)
{
    m_needParent = false;

    if (!PreCreation( parent, wxDefaultPosition, wxDefaultSize ) ||
        !CreateBase( parent, -1, wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE,
                     wxDefaultValidator, wxT("fontdialog") ))
    {
        wxFAIL_MSG( wxT("wxFontDialog creation failed") );
        return false;
    }

    wxString m_message( _("Choose font") );
    m_widget = gtk_font_selection_dialog_new( wxGTK_CONV( m_message ) );

    if (parent)
        gtk_window_set_transient_for(GTK_WINDOW(m_widget),
                                     GTK_WINDOW(parent->m_widget));

    GtkFontSelectionDialog *sel = GTK_FONT_SELECTION_DIALOG(m_widget);

    g_signal_connect (sel->ok_button, "clicked",
                      G_CALLBACK (gtk_fontdialog_ok_callback), this);

    g_signal_connect (sel->cancel_button, "clicked",
                      G_CALLBACK (gtk_fontdialog_cancel_callback), this);

    g_signal_connect (m_widget, "delete_event",
                      G_CALLBACK (gtk_fontdialog_delete_callback), this);

    wxFont font = m_fontData.GetInitialFont();
    if( font.Ok() )
    {
        const wxNativeFontInfo *info = font.GetNativeFontInfo();

        if ( info )
        {

            const wxString& fontname = info->ToString();
            gtk_font_selection_dialog_set_font_name(sel, wxGTK_CONV(fontname));
        }
        else
        {
            // this is not supposed to happen!
            wxFAIL_MSG(_T("font is ok but no native font info?"));
        }
    }

    return true;
}
Пример #6
0
static int
m_privmsg(struct Client *source_p, int parc, char *parv[])
{
  /*
   * Servers have no reason to send privmsgs, yet sometimes there is cause
   * for a notice.. (for example remote kline replies) --fl_
   */
  if (!IsClient(source_p))
    return 0;

  if (MyConnect(source_p))
    source_p->connection->last_privmsg = CurrentTime;

  m_message(PRIVMSG, "PRIVMSG", source_p, parc, parv);
  return 0;
}
Пример #7
0
static void
m_notice(struct Client *client_p,
         struct Client *source_p, int parc, char *parv[])
{
  char equiv[NICKLEN + 1];

  cluster_prefix(client_p, parc, parv, 0, 0, 0);
  if (strchr(parv[1], ','))
  	cluster_prefix(client_p, parc, parv, 1, 0, 3);
  else
  	cluster_prefix(client_p, parc, parv, 1, IsChannelName(parv[1]), 0);

  if (parc > 1)
    if (parv[1][0] && get_equiv_nick(parv[1], equiv))
      parv[1] = equiv;

  m_message(NOTICE, "NOTICE", client_p, source_p, parc, parv);
}
Пример #8
0
static void
m_privmsg(struct Client *client_p,
          struct Client *source_p, int parc, char *parv[])
{
  char equiv[NICKLEN + 1];
  
  cluster_prefix(client_p, parc, parv, 0, 0, 0);
  if (strchr(parv[1], ','))
  	cluster_prefix(client_p, parc, parv, 1, 0, 3);
  else
  	cluster_prefix(client_p, parc, parv, 1, IsChannelName(parv[1]), 0);

  /* servers have no reason to send privmsgs, yet sometimes there is cause
   * for a notice.. (for example remote kline replies) --fl_
   */
  if (!IsPerson(source_p))
    return;

  if (parc > 1)
    if (parv[1][0] && get_equiv_nick(parv[1], equiv))
      parv[1] = equiv;

  m_message(PRIVMSG, "PRIVMSG", client_p, source_p, parc, parv);
}
Пример #9
0
static int
m_notice(struct Client *source_p, int parc, char *parv[])
{
  m_message(NOTICE, "NOTICE", source_p, parc, parv);
  return 0;
}
Пример #10
0
static void
m_notice(struct Client *client_p, struct Client *source_p, int parc, char *parv[])
{
	m_message(NOTICE, "NOTICE", client_p, source_p, parc, parv);
}