Exemplo n.º 1
0
void
fe_notify_update (char *name)
{
    if (name)
        update_all_of (name);
    else
        notify_gui_update ();
}
Exemplo n.º 2
0
void
notify_opengui (void)
{
	GtkWidget *vbox, *bbox;
	GtkWidget *view;

	if (notify_window)
	{
		mg_bring_tofront (notify_window);
		return;
	}

	notify_window =
		mg_create_generic_tab ("Notify", _(DISPLAY_NAME": Friends List"), FALSE, TRUE,
							   notify_closegui, NULL, 400, 250, &vbox, 0);
	gtkutil_destroy_on_esc (notify_window);

	view = notify_treeview_new (vbox);
	g_object_set_data (G_OBJECT (notify_window), "view", view);
  
	bbox = gtk_hbutton_box_new ();
	gtk_button_box_set_layout (GTK_BUTTON_BOX (bbox), GTK_BUTTONBOX_SPREAD);
	gtk_container_set_border_width (GTK_CONTAINER (bbox), 5);
	gtk_box_pack_end (GTK_BOX (vbox), bbox, 0, 0, 0);
	gtk_widget_show (bbox);

	gtkutil_button(bbox, GTK_STOCK_NEW, 0, G_CALLBACK(notify_add_clicked), 0,
					_("Add..."));

	notify_button_remove =
		gtkutil_button(bbox, GTK_STOCK_DELETE, 0, G_CALLBACK(notify_remove_clicked), 0,
					_("Remove"));

	notify_button_opendialog =
		gtkutil_button(bbox, NULL, 0, G_CALLBACK(notify_opendialog_clicked), 0,
					_("Open Dialog"));

	gtk_widget_set_sensitive (notify_button_opendialog, FALSE);
	gtk_widget_set_sensitive (notify_button_remove, FALSE);

	notify_gui_update ();

	gtk_widget_show (notify_window);
}
Exemplo n.º 3
0
void
notify_opengui (void)
{
	GtkWidget *vbox, *bbox;
	gchar *titles[] = { _("User"), _("Status"), _("Server"), _("Last Seen") };

	if (notify_window)
	{
		wins_bring_tofront (notify_window);
		return;
	}

	notify_window =
		maingui_window ("notify", _("X-Chat: Notify List"), FALSE, TRUE,
							 notify_closegui, NULL, 400, 120, &notify_window);
	vbox = wins_get_vbox (notify_window);

	notify_guilist = gtkutil_clist_new (4, titles, vbox, GTK_POLICY_ALWAYS,
													0, 0, 0, 0, GTK_SELECTION_BROWSE);
	gtk_clist_set_column_width (GTK_CLIST (notify_guilist), 0, 100);
	gtk_clist_set_column_width (GTK_CLIST (notify_guilist), 1, 60);
	gtk_clist_set_column_width (GTK_CLIST (notify_guilist), 2, 100);
	gtk_clist_set_auto_sort (GTK_CLIST (notify_guilist), FALSE);

	bbox = gtk_hbox_new (FALSE, 0);
	gtk_container_set_border_width (GTK_CONTAINER (bbox), 4);
	gtk_box_pack_start (GTK_BOX (vbox), bbox, FALSE, FALSE, 0);
	gtk_widget_show (bbox);

	gtkutil_button (notify_window, GNOME_STOCK_PIXMAP_NEW, _("Add"),
								 notify_add_clicked, 0, bbox);
	gtkutil_button (notify_window, GNOME_STOCK_PIXMAP_CLOSE, _("Remove"),
									 notify_remove_clicked, 0, bbox);

	notify_gui_update ();

	gtk_widget_show (notify_window);
}