remove gnome directory.

git-svn-id: svn+ssh://svn.savannah.nongnu.org/linphone/trunk@532 3f6dc0c8-ddfe-455d-9043-3cd528dc4637
This commit is contained in:
smorlat 2009-07-13 09:33:44 +00:00
parent 540715f94c
commit 8782663b39
24 changed files with 0 additions and 7206 deletions

View file

@ -1,8 +0,0 @@
.deps
.libs
Makefile
Makefile.in
linphone
linphone_applet
GNOME_LinphoneApplet.server
GNOME_LinphoneApplet.server.in

View file

@ -1,32 +0,0 @@
<oaf_info>
<oaf_server iid="OAFIID:GNOME_LinphoneApplet_Factory"
type="exe"
location="@LIBEXECDIR@/linphone_applet">
<oaf_attribute name="repo_ids" type="stringv">
<item value="IDL:Bonobo/GenericFactory:1.0"/>
<item value="IDL:Bonobo/Unknown:1.0"/>
</oaf_attribute>
<oaf_attribute name="name" type="string" value="Linphone Applet Factory"/>
<oaf_attribute name="description" type="string" value="Linphone Applet Factory"/>
</oaf_server>
<oaf_server iid="OAFIID:GNOME_LinphoneApplet"
type="factory"
location="OAFIID:GNOME_LinphoneApplet_Factory">
<oaf_attribute name="repo_ids" type="stringv">
<item value="IDL:GNOME/Vertigo/PanelAppletShell:1.0"/>
<item value="IDL:Bonobo/Control:1.0"/>
<item value="IDL:Bonobo/Unknown:1.0"/>
</oaf_attribute>
<oaf_attribute name="name" type="string" _value="Linphone"/>
<oaf_attribute name="description" type="string" _value="Linphone"/>
<oaf_attribute name="panel:category" type="string" _value="Internet"/>
<oaf_attribute name="panel:icon" type="string" value="linphone/linphone2.png"/>
</oaf_server>
</oaf_info>

View file

@ -1,7 +0,0 @@
<Root>
<popups>
<popup name="button3">
<menuitem name="About" verb="About" _label="_About..." pixtype="stock" pixname="gnome-stock-about"/>
</popup>
</popups>
</Root>

View file

@ -1,80 +0,0 @@
## Process this file with automake to produce Makefile.in
linphone_common_sources=\
linphone.c linphone.h \
gui_utils.c gui_utils.h \
support.c support.h \
interface.c interface.h \
callbacks.c callbacks.h \
presence.c presence.h \
propertybox.c propertybox.h \
addressbook.c addressbook.h \
friends.c friends.h
if BUILD_GNOME
INCLUDES = \
-I$(top_srcdir)\
-I$(top_srcdir)/intl \
$(ORTP_CFLAGS) \
-I$(top_srcdir)/coreapi \
-I$(top_srcdir)/mediastreamer2/include \
$(OSIP_CFLAGS)
bin_PROGRAMS = linphone
linphone_SOURCES = \
main.c \
$(linphone_common_sources)
linphone_LDADD = $(LIBGNOMEUI_LIBS) $(INTLLIBS) \
$(LIBGNOME_LIBS) \
$(top_builddir)/coreapi/liblinphone.la \
$(OSIP_LIBS)
endif
AM_CFLAGS=$(STRICT_OPTIONS) $(LIBGNOMEUI_CFLAGS) $(LIBGNOME_CFLAGS) $(GNOME_APPLETS_CFLAGS) $(IPV6_CFLAGS)
@INTLTOOL_SERVER_RULE@
if BUILD_GNOME_APPLET
gnome_appletdir=$(libexecdir)
gnome_applet_PROGRAMS = linphone_applet
linphone_applet_SOURCES = \
$(linphone_common_sources)\
applet.c
linphone_applet_CFLAGS=$(AM_CFLAGS) -DLINPHONE_APPLET
linphone_applet_LDADD = \
$(GNOME_APPLETS_LIBS) \
$(top_builddir)/coreapi/liblinphone.la \
$(OSIP_LIBS)
serverdir = $(libdir)/bonobo/servers
server_in_files = GNOME_LinphoneApplet.server.in
server_DATA = $(server_in_files:.server.in=.server)
$(server_in_files): $(server_in_files:.server.in=.server.in.in)
sed -e "s|\@LIBEXECDIR\@|$(libexecdir)|" $< > $@
uidir = $(datadir)/gnome-2.0/ui
ui_DATA = GNOME_LinphoneApplet.xml
endif
EXTRA_DIST = \
GNOME_LinphoneApplet.server.in.in \
applet.c \
$(ui_DATA)
DISTCLEANFILES=GNOME_LinphoneApplet.server.in GNOME_LinphoneApplet.server

View file

@ -1,306 +0,0 @@
/***************************************************************************
addressbook.c -
-------------------
begin : Wed Jan 30 2002
copyright : (C) 2002 by Simon Morlat
email : simon.morlat@linphone.org
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#include "linphone.h"
#define get_address_book() (&uiobj->addressbook)
#define get_main_window() (&uiobj->main_window)
#define get_core() (uiobj->core)
#define get_uiobj() (uiobj)
void fill_address_book(GtkWidget *address_list);
void ab_destroyed(){
get_uiobj()->ab=NULL;
}
void show_address_book(){
if (get_uiobj()->ab!=NULL){
gtk_window_present(GTK_WINDOW(get_uiobj()->ab));
}else{
get_uiobj()->ab=create_and_fill_address_book();
g_signal_connect(G_OBJECT(get_uiobj()->ab),"destroy",G_CALLBACK(ab_destroyed),NULL);
gtk_widget_show(get_uiobj()->ab);
}
}
#define GLADE_HOOKUP_OBJECT(component,widget,name) \
g_object_set_data_full (G_OBJECT (component), name, \
gtk_widget_ref (widget), (GDestroyNotify) gtk_widget_unref)
void contact_draw(GtkWidget *w, LinphoneProxyConfig *cfg){
GtkWidget *table=lookup_widget(w,"table10");
GtkWidget *combo;
combo=proxy_combo_box_new(cfg);
gtk_widget_show(combo);
gtk_table_attach(GTK_TABLE(table),combo,1,2,2,3, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
GLADE_HOOKUP_OBJECT(w,combo,"proxy");
combo=gtk_combo_box_new_text();
gtk_combo_box_append_text(GTK_COMBO_BOX(combo),_("Wait"));
gtk_combo_box_append_text(GTK_COMBO_BOX(combo),_("Deny"));
gtk_combo_box_append_text(GTK_COMBO_BOX(combo),_("Accept"));
gtk_widget_show(combo);
gtk_table_attach(GTK_TABLE(table),combo,1,2,3,4, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
GLADE_HOOKUP_OBJECT(w,combo,"pol");
}
GtkWidget * contact_new(LinphoneFriend *lf, GtkWidget *ab){
GtkWidget *w=create_contact_box();
contact_draw(w,NULL);
gtk_widget_show(w);
g_object_set_data(G_OBJECT(w),"friend_ref",(gpointer)lf);
g_object_set_data(G_OBJECT(w),"address_book",(gpointer)ab);
g_object_set_data(G_OBJECT(w),"add",GINT_TO_POINTER(TRUE));
gtk_combo_box_set_active(GTK_COMBO_BOX(lookup_widget(w,"pol")),lf->pol);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(lookup_widget(w,"send_subscribe")),lf->subscribe);
return w;
}
GtkWidget * contact_edit(LinphoneFriend *lf, GtkWidget *ab){
GtkWidget *w=create_contact_box();
gchar *tmpstr;
contact_draw(w,lf->proxy);
g_object_set_data(G_OBJECT(w),"friend_ref",(gpointer)lf);
linphone_friend_edit(lf);
tmpstr=linphone_friend_get_name(lf);
if (tmpstr!=NULL) {
gtk_entry_set_text(GTK_ENTRY(lookup_widget(w,"name")),tmpstr);
g_free(tmpstr);
}
tmpstr=linphone_friend_get_addr(lf);
gtk_entry_set_text(GTK_ENTRY(lookup_widget(w,"sipaddr")),tmpstr);
g_free(tmpstr);
gtk_combo_box_set_active(GTK_COMBO_BOX(lookup_widget(w,"pol")),lf->pol);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(lookup_widget(w,"send_subscribe")),lf->subscribe);
gtk_widget_show(w);
if (ab!=NULL) g_object_set_data(G_OBJECT(w),"address_book",(gpointer)ab);
return w;
}
GtkWidget * subscriber_edit(LinphoneFriend *lf){
GtkWidget *w=contact_edit(lf,NULL);
g_object_set_data(G_OBJECT(w),"add",GINT_TO_POINTER(TRUE));
return w;
}
gint contact_ok(GtkWidget *dialog){
gchar *name,*sipaddr;
gchar *url;
gboolean add=FALSE;
GtkWidget *ab;
LinphoneFriend *lf;
int err;
lf=(LinphoneFriend*)g_object_get_data(G_OBJECT(dialog),"friend_ref");
add=GPOINTER_TO_INT(g_object_get_data(G_OBJECT(dialog),"add"));
name=gtk_editable_get_chars(GTK_EDITABLE(lookup_widget(dialog,"name")),0,-1);
sipaddr=gtk_editable_get_chars(GTK_EDITABLE(lookup_widget(dialog,"sipaddr")),0,-1);
url=g_strdup_printf("%s <%s>",name,sipaddr);
/* workaround a bug in osip ? */
/* something doesn't like addresses like "machin <<sip:truc@bidule>>" */
if (strchr(sipaddr,'<')==NULL){
err=linphone_friend_set_sip_addr(lf,url);
}else err=-1;
if (err<0){
linphone_gnome_ui_display_something(get_uiobj(),GTK_MESSAGE_WARNING,_("Bad sip address: a sip address looks like sip:user@domain"));
linphone_friend_destroy(lf);
g_free(name);
g_free(sipaddr);
g_free(url);
return -1;
}
g_free(name);
g_free(sipaddr);
g_free(url);
linphone_friend_set_proxy(lf,proxy_combo_box_get_selected(lookup_widget(dialog,"proxy")));
linphone_friend_set_inc_subscribe_policy(lf,gtk_combo_box_get_active(GTK_COMBO_BOX(lookup_widget(dialog,"pol"))));
linphone_friend_send_subscribe(lf,gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(lookup_widget(dialog,"send_subscribe"))));
if (add){
linphone_core_add_friend(get_core(),lf);
}
else linphone_friend_done(lf);
/* ask the address book to redraw itself */
ab=g_object_get_data(G_OBJECT(dialog),"address_book");
if (ab!=NULL) fill_address_book(lookup_widget(ab,"address_list"));
return 0;
}
enum{
SIP_ADDRESS_COLUMN,
FRIEND_REFERENCE,
AB_NCOLUMNS
};
void choose_address_and_close(GtkWidget *ab){
GtkTreeSelection *select;
GtkWidget *addressentry=get_main_window()->addressentry;
GtkTreeIter iter;
GtkTreeModel *model;
gchar *address=NULL;
GtkWidget *address_list=lookup_widget(ab,"address_list");
select = gtk_tree_view_get_selection (GTK_TREE_VIEW (address_list));
if (select==NULL) return;
if (gtk_tree_selection_get_selected (select, &model, &iter))
{
gtk_tree_model_get (model, &iter,SIP_ADDRESS_COLUMN , &address, -1);
}
if (address!=NULL){
gtk_entry_set_text (GTK_ENTRY(addressentry),address);
g_free(address);
}
gtk_widget_destroy(ab);
}
void
address_book_close (GtkWidget *object,
gpointer user_data)
{
gtk_widget_destroy(gtk_widget_get_toplevel(object));
}
void address_selection_changed_cb(GtkTreeSelection *selection, gpointer data)
{
}
gboolean address_button_press(GtkWidget *widget,GdkEventButton *event,gpointer user_data)
{
GtkWidget *ab=(GtkWidget*)user_data;
if (event->type==GDK_2BUTTON_PRESS){
choose_address_and_close(ab);
return TRUE;
}
return FALSE;
}
void fill_address_book(GtkWidget *address_list){
GtkListStore *store;
GtkTreeIter iter;
GtkTreeModel *model;
MSList *elem;
gchar *tmpstr;
/* fill the store */
elem=linphone_core_get_friend_list(get_core());
model=gtk_tree_view_get_model(GTK_TREE_VIEW(address_list));
store=GTK_LIST_STORE(model);
gtk_list_store_clear(store);
for(;elem!=NULL;elem=ms_list_next(elem)){
LinphoneFriend *lf=(LinphoneFriend*)elem->data;
tmpstr=linphone_friend_get_url(lf);
gtk_list_store_append(store,&iter);
gtk_list_store_set(store,&iter,SIP_ADDRESS_COLUMN,tmpstr,FRIEND_REFERENCE,(gpointer)lf,-1);
ms_free(tmpstr);
}
}
GtkWidget *create_and_fill_address_book(){
GtkListStore *store;
GtkCellRenderer *renderer;
GtkTreeViewColumn *column;
GtkTreeSelection *select;
GtkWidget *address_list;
GtkWidget *ret=create_address_book();
address_list=lookup_widget(ret,"address_list");
store = gtk_list_store_new (AB_NCOLUMNS, G_TYPE_STRING,G_TYPE_POINTER);
gtk_tree_view_set_model(GTK_TREE_VIEW(address_list),GTK_TREE_MODEL(store));
g_object_unref(G_OBJECT(store));
renderer = gtk_cell_renderer_text_new ();
column = gtk_tree_view_column_new_with_attributes (_("Contact list"),
renderer,
"text", SIP_ADDRESS_COLUMN,
NULL);
gtk_tree_view_append_column (GTK_TREE_VIEW (address_list), column);
/* Setup the selection handler */
select = gtk_tree_view_get_selection (GTK_TREE_VIEW (address_list));
gtk_tree_selection_set_mode (select, GTK_SELECTION_SINGLE);
g_signal_connect (G_OBJECT (select), "changed",
G_CALLBACK (address_selection_changed_cb),
NULL);
/* setup handler for double click */
g_signal_connect(G_OBJECT(address_list),"button-press-event",G_CALLBACK(address_button_press),(gpointer)ret);
fill_address_book(address_list);
return ret;
}
void
on_modify_address_clicked (GtkButton *button,
gpointer user_data)
{
GtkTreeSelection *select;
GtkTreeIter iter;
GtkTreeModel *model;
GtkWidget *address_list=lookup_widget(gtk_widget_get_toplevel(GTK_WIDGET(button)),"address_list");
/* change the address in the view */
select = gtk_tree_view_get_selection (GTK_TREE_VIEW (address_list));
if (gtk_tree_selection_get_selected (select, &model, &iter))
{
LinphoneFriend *lf=NULL;
gtk_tree_model_get(model,&iter,FRIEND_REFERENCE,&lf,-1);
contact_edit(lf,gtk_widget_get_toplevel(GTK_WIDGET(button)));
}
}
void on_add_address_clicked(GtkButton *button,gpointer user_data)
{
LinphoneFriend *lf=linphone_friend_new();
contact_new(lf,gtk_widget_get_toplevel(GTK_WIDGET(button)));
}
void on_remove_address_clicked(GtkButton *button,gpointer user_data)
{
GtkTreeSelection *select;
GtkTreeIter iter;
GtkTreeModel *model;
GtkWidget *address_list=lookup_widget(gtk_widget_get_toplevel(GTK_WIDGET(button)),"address_list");
select = gtk_tree_view_get_selection (GTK_TREE_VIEW (address_list));
if (gtk_tree_selection_get_selected (select, &model, &iter))
{
LinphoneFriend *lf=NULL;
gtk_tree_model_get(model,&iter,FRIEND_REFERENCE,&lf,-1);
linphone_core_remove_friend(get_core(),lf);
gtk_list_store_remove(GTK_LIST_STORE(model), &iter);
}
}
void on_select_address_clicked(GtkButton *button,gpointer user_data)
{
choose_address_and_close(gtk_widget_get_toplevel(GTK_WIDGET(button)));
}
void
on_contact_box_response (GtkDialog *dialog,
gint response_id,
gpointer user_data)
{
switch (response_id){
case GTK_RESPONSE_OK:
contact_ok(GTK_WIDGET(dialog));
break;
default:
break;
}
gtk_widget_destroy(GTK_WIDGET(dialog));
}

View file

@ -1,28 +0,0 @@
/***************************************************************************
addressbook.h -
-------------------
begin : Wed Jan 30 2002
copyright : (C) 2002 by Simon Morlat
email : simon.morlat@linphone.org
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef ADDRESSBOOK_H
#define ADDRESSBOOK_H
GtkWidget *create_and_fill_address_book();
void show_address_book();
GtkWidget * contact_new(LinphoneFriend *lf, GtkWidget *ab);
GtkWidget * contact_edit(LinphoneFriend *lf, GtkWidget *ab);
GtkWidget * subscriber_edit(LinphoneFriend *lf);
#endif

View file

@ -1,182 +0,0 @@
/***************************************************************************
applet.c - Applet code for linphone's gnome
interface
-------------------
begin : Sat Dec 14 2002
copyright : (C) 2001 by Simon Morlat
email : simon.morlat@linphone.org
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#include "linphone.h"
#include <panel-applet.h>
#define get_uiobj() (uiobj)
LinphoneCore core;
LinphoneGnomeUI ui;
static int show=0;
static gulong signal_ref;
static GtkWidget *applet_button=NULL;
static GdkPixbuf *original_icon=NULL;
static GtkWidget *icon=NULL;
void draw_icon(GtkWidget *button, int size)
{
GdkPixbuf *resized;
if (original_icon==NULL){
original_icon=gdk_pixbuf_new_from_file(PACKAGE_DATA_DIR "/pixmaps/linphone/linphone2.xpm",
NULL);
g_return_if_fail( original_icon!=NULL);
}
if (icon!=NULL){
gtk_container_remove(GTK_CONTAINER(button),icon);
gtk_widget_destroy(icon);
}
resized=gdk_pixbuf_scale_simple(original_icon,size,size,GDK_INTERP_BILINEAR);
g_return_if_fail(resized!=NULL);
icon=gtk_image_new_from_pixbuf(resized);
g_return_if_fail(icon!=NULL);
gdk_pixbuf_unref(resized);
gtk_container_add(GTK_CONTAINER(button),icon);
gtk_widget_show(icon);
}
void linphone_applet_about_cb(gpointer p)
{
GtkWidget *about2;
about2 = create_about2 ();
gtk_widget_show (about2);
}
static void applet_change_pixel_size(GtkWidget *applet, int size)
{
g_return_if_fail(applet_button!=NULL);
draw_icon(applet_button,size);
}
static void applet_destroy_cb(GtkWidget *widget, gpointer data)
{
if (get_uiobj()->main_window.window!=NULL){
gtk_widget_destroy(get_uiobj()->main_window.window);
}
linphone_gnome_uninit(get_uiobj());
}
static gboolean
gui_destroy_cb (GtkWidget *widget, gpointer data)
{
linphone_gnome_ui_uninit(get_uiobj());
show=0;
return FALSE;
}
static gboolean button_press_cb(GtkWidget *applet, GdkEventButton* event, gpointer data)
{
if (event->button!=1) return FALSE;
if (show){
g_signal_handlers_disconnect_by_func(G_OBJECT(get_uiobj()->main_window.window),
G_CALLBACK(gui_destroy_cb),NULL);
linphone_gnome_ui_hide(get_uiobj());
show=0;
}else {
linphone_gnome_ui_show(get_uiobj());
signal_ref=g_signal_connect(G_OBJECT(get_uiobj()->main_window.window),
"destroy",
G_CALLBACK(gui_destroy_cb),NULL);
show=1;
}
return FALSE;
}
const BonoboUIVerb linphone_applet_menu_verbs [] = {
BONOBO_UI_UNSAFE_VERB ("About", linphone_applet_about_cb),
BONOBO_UI_VERB_END
};
static gboolean
linphone_applet_fill (PanelApplet *applet)
{
gint size=panel_applet_get_size(applet);
applet_button=gtk_frame_new(NULL);
gtk_container_add(GTK_CONTAINER(applet),applet_button);
gtk_widget_show(applet_button);
draw_icon(applet_button,size);
g_signal_connect(G_OBJECT(applet),"button-press-event",G_CALLBACK(button_press_cb),NULL);
g_signal_connect(G_OBJECT(applet),"change_size",
G_CALLBACK(applet_change_pixel_size),
NULL);
g_signal_connect (G_OBJECT (applet), "destroy",
G_CALLBACK (applet_destroy_cb), NULL);
//sizehint = panel_applet_get_size (PANEL_APPLET (applet));
panel_applet_setup_menu_from_file (applet,
NULL,
"GNOME_LinphoneApplet.xml",
NULL,
linphone_applet_menu_verbs,
NULL);
/* tracing for osip */
TRACE_INITIALIZE(5,stdout);
linphone_gnome_init(&ui,&core);
gtk_widget_show_all (GTK_WIDGET (applet));
return TRUE;
}
static gboolean
linphone_applet_factory (PanelApplet *applet,
const gchar *iid,
gpointer data)
{
static int instances=0;
GtkWidget *dialog;
if (!strcmp (iid, "OAFIID:GNOME_LinphoneApplet")){
if (instances>0){
dialog = gtk_message_dialog_new (GTK_WINDOW(applet),
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_WARNING,
GTK_BUTTONS_CLOSE,
(const gchar*) _("Cannot run multiples instances of the linphone applet."));
/* Destroy the dialog when the user responds to it (e.g. clicks a button) */
g_signal_connect_swapped (G_OBJECT (dialog), "response",
G_CALLBACK (gtk_widget_destroy),
G_OBJECT (dialog));
gtk_widget_show(GTK_WIDGET(dialog));
return FALSE;
}
return linphone_applet_fill (applet);
}
return FALSE;
}
#define GNOMELOCALEDIR PACKAGE_LOCALE_DIR
PANEL_APPLET_BONOBO_FACTORY ("OAFIID:GNOME_LinphoneApplet_Factory",
PANEL_TYPE_APPLET,
"linphone_applet",
"0",
linphone_applet_factory,
NULL)

View file

@ -1,695 +0,0 @@
/*
linphone
Copyright (C) 2000 Simon MORLAT (simon.morlat@free.fr)
callbacks.c -- gtk callbacks, and osipua callbacks.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "linphone.h"
#include <gdk/gdkkeysyms.h>
#define get_core() (uiobj->core)
#define get_main_window() (&uiobj->main_window)
#define get_uiobj() (uiobj)
void
on_about1_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
GtkWidget *about2;
about2 = create_about2 ();
gtk_widget_show (about2);
}
gint
on_prop1_close (GnomeDialog *gnomedialog,
gpointer user_data)
{
LinphoneMainWindow *obj=get_main_window();
gnome_appbar_clear_stack( GNOME_APPBAR(obj->status_bar));
return(FALSE);
}
void
on_parametres1_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
LinphoneGnomeUI *ui=get_uiobj();
linphone_property_box_init(&ui->propbox);
}
void
on_user_manual1_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
gnome_help_display("index.xml",NULL,NULL);
}
gboolean
on_play_vol_button_release_event (GtkWidget *widget,
GdkEventButton *event,
gpointer user_data)
{
int vol;
vol=(gtk_range_get_adjustment(GTK_RANGE(widget)))->value;
linphone_core_set_play_level(get_core(),vol);
return FALSE;
}
gboolean
on_rec_vol_button_release_event (GtkWidget *widget,
GdkEventButton *event,
gpointer user_data)
{
int vol;
vol=(gtk_range_get_adjustment(GTK_RANGE(widget)))->value;
linphone_core_set_rec_level(get_core(),vol);
return FALSE;
}
gboolean
on_ring_vol_button_release_event (GtkWidget *widget,
GdkEventButton *event,
gpointer user_data)
{
int vol;
vol=(gtk_range_get_adjustment(GTK_RANGE(widget)))->value;
linphone_core_set_ring_level(get_core(),vol);
return FALSE;
}
void
on_prop1_help (GnomePropertyBox *gnomepropertybox,
gint arg1,
gpointer user_data)
{
gnome_help_display("index.html",NULL,NULL);
}
void
on_fermer1_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
linphone_gnome_ui_hide(get_uiobj());
}
#if 0
/*this is when the panel size changes*/
void applet_change_pixel_size(GtkWidget *w, int size, gpointer data)
{
GtkWidget *pixmap,*button;
pixmap=gtk_object_get_data(GTK_OBJECT(applet),"applet_pixmap");
button=(GtkWidget*)gtk_object_get_data(GTK_OBJECT(applet),"applet_button");
if (button==NULL)
{
printf("Cannot find applet button\n");
return;
}
if (pixmap!=NULL) gtk_widget_destroy(pixmap);
pixmap = gnome_pixmap_new_from_xpm_d_at_size(linphone2_xpm,
size-4, size-4);
gtk_object_set_data(GTK_OBJECT(applet),"applet_pixmap",pixmap);
gtk_widget_show(pixmap);
gtk_container_add(GTK_CONTAINER(button), pixmap);
}
#endif
void
on_adresse_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
show_address_book();
}
void on_address_book_show(GtkWidget *widget,gpointer user_data)
{
}
void
on_showmore_toggled (GtkToggleButton *togglebutton,
gpointer user_data)
{
gint state;
GtkWidget *optioncontrols=get_main_window()->optioncontrols;
state=gtk_toggle_button_get_active(togglebutton);
if (state) gtk_widget_show(optioncontrols);
else {
gtk_widget_hide(optioncontrols);
}
}
void
on_useRPC_toggled (GtkToggleButton *togglebutton,
gpointer user_data)
{
#ifdef VINCENT_MAURY_RSVP
LinphoneCore *lc=get_core();
gboolean state;
state=gtk_toggle_button_get_active(togglebutton);
/* change RPC settings according to state */
if (state)
{
if (linphone_core_set_rpc_mode(lc,1)!=0) /* set rpc on */
{
printf("RPC error. unable to set rpc on !\n");
printf("Check to see if RPC server is running\n");
gtk_toggle_button_set_active(togglebutton,FALSE);
/*linphone_core_set_rpc_mode(lc,0);*/
}
}
else
{
if (linphone_core_set_rpc_mode(lc,0)!=0) /* set rpc off */
printf("RPC error. That's impossible !!\n");
}
#endif
}
void
on_useRSVP_toggled (GtkToggleButton *togglebutton,
gpointer user_data)
{
#ifdef VINCENT_MAURY_RSVP
LinphoneCore *lc=get_core();
LinphoneGnomeUI *ui=get_uiobj();
gboolean state;
state=gtk_toggle_button_get_active(togglebutton);
/* change the QoS settings function of the state */
if (state)
{
linphone_core_set_rsvp_mode(lc,1); /* set RSVP on */
gtk_widget_show(lookup_widget(ui->propbox.prop,"useRPC")); /* show RPC checkbox */
}
else
{
linphone_core_set_rsvp_mode(lc,0); /* set RSVP off */
/* uncheck RPC if necessary and hide RPC checkbox */
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(
lookup_widget(ui->propbox.prop,"useRPC")),FALSE);
gtk_widget_hide(lookup_widget(ui->propbox.prop,"useRPC"));
}
#endif
}
#ifdef VINCENT_MAURY_RSVP
/* callback called when you click the yes/no dialog box
* send yes or no to the core_change_qos which knows the question
* and will be able to ajust qos */
void dialog_click (GtkDialog *dialog,gint arg1,gpointer user_data)
{
LinphoneCore *lc=get_core();
if (lc->call==NULL)
return;
if (arg1==GTK_RESPONSE_YES)
{
printf("YES\n");
linphone_core_change_qos(lc, 1); /* 1 = yes */
}
else
{
printf("NO\n");
linphone_core_change_qos(lc, 0); /* 0 = no */
}
gtk_widget_destroy((GtkWidget*)dialog);
}
#endif
void
on_alt_href_clicked (GtkButton *button,
gpointer user_data)
{
gchar *url;
GtkWidget *label;
osip_from_t * from;
LinphoneGnomeUI *ui=get_uiobj();
label=GTK_BIN(button)->child;
gtk_label_get(GTK_LABEL(label),&url);
osip_from_init(&from);
if ( osip_from_parse(from,url) <0){
/* do something here */
}else
{ /* it was a sip url, so display it in the entry*/
gtk_entry_set_text(GTK_ENTRY(gnome_entry_gtk_entry(GNOME_ENTRY(ui->main_window.addressentry))),url);
}
osip_from_free(from);
}
void
on_alt_href_realize (GtkWidget *widget,
gpointer user_data)
{
GdkCursor *cursor = gdk_cursor_new(GDK_HAND2);
gdk_window_set_cursor(widget->window, cursor);
gdk_cursor_destroy(cursor);
}
void
on_dtmf_3_clicked (GtkButton *button,
gpointer user_data)
{
GtkWidget *dtmf_entry=get_main_window()->dtmfentry;
gtk_entry_append_text(GTK_ENTRY(dtmf_entry),"3");
}
void
on_dmtf_2_clicked (GtkButton *button,
gpointer user_data)
{
GtkWidget *dtmf_entry=get_main_window()->dtmfentry;
gtk_entry_append_text(GTK_ENTRY(dtmf_entry),"2");
}
void
on_dtmf_1_clicked (GtkButton *button,
gpointer user_data)
{
GtkWidget *dtmf_entry=get_main_window()->dtmfentry;
gtk_entry_append_text(GTK_ENTRY(dtmf_entry),"1");
}
void
on_dtmf_4_clicked (GtkButton *button,
gpointer user_data)
{
GtkWidget *dtmf_entry=get_main_window()->dtmfentry;
gtk_entry_append_text(GTK_ENTRY(dtmf_entry),"4");
}
void
on_dtmf_5_clicked (GtkButton *button,
gpointer user_data)
{
GtkWidget *dtmf_entry=get_main_window()->dtmfentry;
gtk_entry_append_text(GTK_ENTRY(dtmf_entry),"5");
}
void
on_dtmf_6_clicked (GtkButton *button,
gpointer user_data)
{
GtkWidget *dtmf_entry=get_main_window()->dtmfentry;
gtk_entry_append_text(GTK_ENTRY(dtmf_entry),"6");
}
void
on_dtmf_7_clicked (GtkButton *button,
gpointer user_data)
{
GtkWidget *dtmf_entry=get_main_window()->dtmfentry;
gtk_entry_append_text(GTK_ENTRY(dtmf_entry),"7");
}
void
on_dtmf_8_clicked (GtkButton *button,
gpointer user_data)
{
GtkWidget *dtmf_entry=get_main_window()->dtmfentry;
gtk_entry_append_text(GTK_ENTRY(dtmf_entry),"8");
}
void
on_dtmf_9_clicked (GtkButton *button,
gpointer user_data)
{
GtkWidget *dtmf_entry=get_main_window()->dtmfentry;
gtk_entry_append_text(GTK_ENTRY(dtmf_entry),"9");
}
void
on_dtmf_star_clicked (GtkButton *button,
gpointer user_data)
{
GtkWidget *dtmf_entry=get_main_window()->dtmfentry;
gtk_entry_append_text(GTK_ENTRY(dtmf_entry),"*");
}
void
on_dtmf_0_clicked (GtkButton *button,
gpointer user_data)
{
GtkWidget *dtmf_entry=get_main_window()->dtmfentry;
gtk_entry_append_text(GTK_ENTRY(dtmf_entry),"0");
}
void
on_dtmf_pound_clicked (GtkButton *button,
gpointer user_data)
{
GtkWidget *dtmf_entry=get_main_window()->dtmfentry;
gtk_entry_append_text(GTK_ENTRY(dtmf_entry),"#");
}
void
on_dtmf_entry_changed (GtkEditable *editable,
gpointer user_data)
{
gchar *dtmfs;
gint len;
/* get the last entry in the text box and plays it */
dtmfs=gtk_editable_get_chars(editable,0,-1);
g_return_if_fail(dtmfs!=NULL);
len=strlen(dtmfs);
if (len>0){
g_message("Sending dtmf %c",dtmfs[len-1]);
linphone_core_send_dtmf(get_uiobj()->core,dtmfs[len-1]);
}
g_free(dtmfs);
}
void
on_exit1_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
#ifdef LINPHONE_APPLET
#else
gtk_widget_destroy(get_uiobj()->main_window.window);
#endif
}
void on_app1_destroy(GtkWidget *app1, gpointer user_data)
{
#ifdef LINPHONE_APPLET
#else
gtk_main_quit();
#endif
}
void
on_display_ab_clicked (GtkButton *button,
gpointer user_data)
{
show_address_book();
}
void
on_inc_subscr_dialog_response (GtkDialog *dialog,
gint response_id,
gpointer user_data)
{
LinphoneFriend *lf=(LinphoneFriend*)g_object_get_data(G_OBJECT(dialog),"friend_ref");
switch(response_id){
case GTK_RESPONSE_ACCEPT:
subscriber_edit(lf);
break;
case GTK_RESPONSE_REJECT:
linphone_core_reject_subscriber(get_core(),lf);
break;
}
gtk_widget_destroy(GTK_WIDGET(dialog));
}
void authentication_dialog_ok(GtkWidget *w)
{
gchar *realm,*username,*userid,*passwd;
LinphoneAuthInfo *info;
realm=gtk_editable_get_chars(GTK_EDITABLE(lookup_widget(w,"realm")),0,-1);
username=gtk_editable_get_chars(GTK_EDITABLE(lookup_widget(w,"username")),0,-1);
userid=gtk_editable_get_chars(GTK_EDITABLE(lookup_widget(w,"userid")),0,-1);
passwd=gtk_editable_get_chars(GTK_EDITABLE(lookup_widget(w,"passwd")),0,-1);
info=linphone_auth_info_new(username,userid,passwd,NULL,realm);
linphone_core_add_auth_info(get_core(),info);
g_free(username);
g_free(userid);
g_free(passwd);
g_free(realm);
}
void
on_authentication_dialog_response (GtkDialog *dialog,
gint response_id,
gpointer user_data)
{
switch(response_id){
case GTK_RESPONSE_OK:
authentication_dialog_ok(GTK_WIDGET(dialog));
gtk_widget_destroy(GTK_WIDGET(dialog));
break;
}
}
void
on_clear_auth_info_clicked (GtkButton *button,
gpointer user_data)
{
linphone_core_clear_all_auth_info(get_core());
}
void
on_call_history_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
linphone_gnome_show_call_logs_window(get_uiobj());
}
void
on_call_logs_response (GtkDialog *dialog,
gint response_id,
gpointer user_data)
{
gtk_widget_destroy(GTK_WIDGET(dialog));
}
void
on_call_logs_destroy (GtkObject *object,
gpointer user_data)
{
get_uiobj()->logs=NULL;
}
static void completion_add_text(GtkEntry *entry, const char *text){
GtkTreeIter iter;
GtkTreeModel *model=gtk_entry_completion_get_model(gtk_entry_get_completion(entry));
if (gtk_tree_model_get_iter_first(model,&iter)){
do {
gchar *uri=NULL;
gtk_tree_model_get(model,&iter,0,&uri,-1);
if (uri!=NULL){
if (strcmp(uri,text)==0) {
/*remove text */
gtk_list_store_remove(GTK_LIST_STORE(model),&iter);
g_free(uri);
break;
}
g_free(uri);
}
}while (gtk_tree_model_iter_next(model,&iter));
}
/* and prepend it on top of the list */
gtk_list_store_prepend(GTK_LIST_STORE(model),&iter);
gtk_list_store_set(GTK_LIST_STORE(model),&iter,0,text,-1);
}
void
on_callbutton_clicked (GtkButton *button,
gpointer user_data)
{
LinphoneGnomeUI *ui=get_uiobj();
LinphoneCore *lc=get_core();
GtkEntry *entry=GTK_ENTRY(ui->main_window.addressentry);
if (lc->call==NULL){
const gchar *sipurl=NULL;
int err;
/* we have no dialog in progress */
/* get the url to call */
sipurl=gtk_entry_get_text(entry);
err=linphone_core_invite(lc,sipurl);
if (err==0) completion_add_text(entry,sipurl);
}else {
linphone_core_accept_call(lc,NULL);
}
}
void
on_hangup_clicked (GtkButton *button,
gpointer user_data)
{
LinphoneGnomeUI *ui=get_uiobj();
LinphoneCore *lc=get_core();
if (lc->call!=NULL){
/* same trick here as for linphone_core_accept_dialog: defer it to gtk's idle loop */
gtk_window_set_title(GTK_WINDOW(ui->main_window.window),"linphone");
linphone_core_terminate_call(lc,NULL);
}
}
GtkWidget *chatroom_new(const gchar *url, LinphoneChatRoom *cr){
GtkWidget *gcr=NULL;
if (cr==NULL)
cr=linphone_core_create_chat_room(get_core(),url);
if (cr!=NULL){
gchar *tmp;
gcr=create_chatroom();
g_object_set_data(G_OBJECT(gcr),"chatroom",(gpointer)cr);
linphone_chat_room_set_user_data(cr,(gpointer)gcr);
tmp=g_strdup_printf(_("Chat with %s"),url);
gtk_window_set_title(GTK_WINDOW(gcr),tmp);
g_free(tmp);
}
return gcr;
}
void chatroom_append(GtkWidget *gcr, const gchar *from, const gchar *message){
GtkTextBuffer *tb;
gchar *str;
GtkTextIter enditer;
GtkTextView *tv=GTK_TEXT_VIEW(lookup_widget(gcr,"chattext"));
tb=gtk_text_view_get_buffer(tv);
g_return_if_fail(tb!=NULL);
gtk_text_buffer_get_end_iter(tb,&enditer);
str=g_strdup_printf("[%s]\t:%s\n",from,message);
gtk_text_buffer_insert(tb,&enditer,str,strlen(str));
g_free(str);
}
void chatroom_close(GtkWidget *gcr){
LinphoneChatRoom *cr;
cr=(LinphoneChatRoom*)g_object_get_data(G_OBJECT(gcr),"chatroom");
linphone_chat_room_destroy(cr);
}
void
on_chat_clicked (GtkButton *button,
gpointer user_data)
{
gchar *sipurl;
sipurl=gtk_editable_get_chars(GTK_EDITABLE(get_main_window()->addressentry),0,-1);
GtkWidget *gcr=chatroom_new(sipurl,NULL);
if (gcr!=NULL) gtk_widget_show(gcr);
g_free(sipurl);
}
void
on_chatbox_clicked (GtkButton *button,
gpointer user_data)
{
gtk_widget_destroy(gtk_widget_get_toplevel(GTK_WIDGET(button)));
}
void
on_chatentry_activate (GtkEntry *entry,
gpointer user_data)
{
LinphoneChatRoom *cr;
gchar *text;
text=gtk_editable_get_chars(GTK_EDITABLE(entry),0,-1);
if (strlen(text)>0){
GtkWidget *gcr=gtk_widget_get_toplevel(GTK_WIDGET(entry));
cr=(LinphoneChatRoom*)g_object_get_data(G_OBJECT(gcr),"chatroom");
linphone_chat_room_send_message(cr,text);
chatroom_append(gcr,linphone_core_get_primary_contact(get_core()),text);
gtk_editable_delete_text(GTK_EDITABLE(entry),0,-1);
}
}
void
on_chatroom_destroy (GtkObject *object,
gpointer user_data)
{
chatroom_close(GTK_WIDGET(object));
}
void
on_addressentry_activate (GtkEntry *entry,
gpointer user_data)
{
on_callbutton_clicked(NULL,NULL);
}
void
on_addressentry_destroy (GtkObject *object,
gpointer user_data)
{
linphone_gnome_save_uri_history(get_uiobj());
}
void
on_video_enabled_toggled (GtkToggleButton *togglebutton,
gpointer user_data)
{
linphone_core_enable_video(get_core(),gtk_toggle_button_get_active(togglebutton));
}
void
on_echocancelation_toggled (GtkToggleButton *togglebutton,
gpointer user_data)
{
linphone_core_enable_echo_cancelation(get_core(),
gtk_toggle_button_get_active(togglebutton));
}

View file

@ -1,540 +0,0 @@
#include <gnome.h>
void
on_app1_destroy (GtkObject *object,
gpointer user_data);
void
on_adresse_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_parametres1_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_fermer1_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_exit1_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_about1_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_user_manual1_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_greenbutton_clicked (GtkButton *button,
gpointer user_data);
void
on_redbutton_clicked (GtkButton *button,
gpointer user_data);
void
on_showmore_toggled (GtkToggleButton *togglebutton,
gpointer user_data);
gboolean
on_play_vol_button_release_event (GtkWidget *widget,
GdkEventButton *event,
gpointer user_data);
gboolean
on_rec_vol_button_release_event (GtkWidget *widget,
GdkEventButton *event,
gpointer user_data);
gboolean
on_ring_vol_button_release_event (GtkWidget *widget,
GdkEventButton *event,
gpointer user_data);
void
on_reachable (GtkToggleButton *togglebutton,
gpointer user_data);
void
on_busy (GtkToggleButton *togglebutton,
gpointer user_data);
void
on_minutesaway_changed (GtkEditable *editable,
gpointer user_data);
void
on_away (GtkToggleButton *togglebutton,
gpointer user_data);
void
on_do_not_disturb (GtkToggleButton *togglebutton,
gpointer user_data);
void
on_moved_tmply (GtkToggleButton *togglebutton,
gpointer user_data);
void
on_alt_serv (GtkToggleButton *togglebutton,
gpointer user_data);
void
on_contact_field_changed (GtkEditable *editable,
gpointer user_data);
void
on_presence_validate_clicked (GtkButton *button,
gpointer user_data);
void
on_dtmf_entry_changed (GtkEditable *editable,
gpointer user_data);
void
on_dtmf_3_clicked (GtkButton *button,
gpointer user_data);
void
on_dmtf_2_clicked (GtkButton *button,
gpointer user_data);
void
on_dtmf_1_clicked (GtkButton *button,
gpointer user_data);
void
on_dtmf_4_clicked (GtkButton *button,
gpointer user_data);
void
on_dtmf_5_clicked (GtkButton *button,
gpointer user_data);
void
on_dtmf_6_clicked (GtkButton *button,
gpointer user_data);
void
on_dtmf_7_clicked (GtkButton *button,
gpointer user_data);
void
on_dtmf_8_clicked (GtkButton *button,
gpointer user_data);
void
on_dtmf_9_clicked (GtkButton *button,
gpointer user_data);
void
on_dtmf_star_clicked (GtkButton *button,
gpointer user_data);
void
on_dtmf_0_clicked (GtkButton *button,
gpointer user_data);
void
on_dtmf_pound_clicked (GtkButton *button,
gpointer user_data);
void
on_propertybox1_apply (GnomePropertyBox *propertybox,
gint page_num,
gpointer user_data);
gboolean
on_prop1_close (GnomeDialog *gnomedialog,
gpointer user_data);
void
on_prop1_help (GnomePropertyBox *propertybox,
gint page_num,
gpointer user_data);
gboolean
on_hscale1_button_release_event (GtkWidget *widget,
GdkEventButton *event,
gpointer user_data);
void
on_audioport_changed (GtkEditable *editable,
gpointer user_data);
void
on_sipport_changed (GtkEditable *editable,
gpointer user_data);
void
on_user_name_changed (GtkEditable *editable,
gpointer user_data);
void
on_domain_name_changed (GtkEditable *editable,
gpointer user_data);
void
on_registrar_checked_toggled (GtkToggleButton *togglebutton,
gpointer user_data);
void
on_rsvp_checked_toggled (GtkToggleButton *togglebutton,
gpointer user_data);
void
on_redirect_button_toggled (GtkToggleButton *togglebutton,
gpointer user_data);
void
on_proxy_button_toggled (GtkToggleButton *togglebutton,
gpointer user_data);
void
on_obproxy_button_toggled (GtkToggleButton *togglebutton,
gpointer user_data);
void
on_registrar_addr_changed (GtkEditable *editable,
gpointer user_data);
void
on_reg_passwd_changed (GtkEditable *editable,
gpointer user_data);
void
on_address_of_record_changed (GtkEditable *editable,
gpointer user_data);
void
on_aucodec_up_clicked (GtkButton *button,
gpointer user_data);
void
on_aucodec_down_clicked (GtkButton *button,
gpointer user_data);
void
on_aucodec_enable_clicked (GtkButton *button,
gpointer user_data);
void
on_aucodec_disable_clicked (GtkButton *button,
gpointer user_data);
void
on_sounddriver_changed (GtkEditable *editable,
gpointer user_data);
void
on_source_changed (GtkEditable *editable,
gpointer user_data);
void
on_autokill_button1_toggled (GtkToggleButton *togglebutton,
gpointer user_data);
void
on_address_book_show (GtkWidget *widget,
gpointer user_data);
void
on_add_address_clicked (GtkButton *button,
gpointer user_data);
void
on_remove_address_clicked (GtkButton *button,
gpointer user_data);
void
on_select_address_clicked (GtkButton *button,
gpointer user_data);
void
on_modify_address_clicked (GtkButton *button,
gpointer user_data);
void
on_alt_href_clicked (GtkButton *button,
gpointer user_data);
void
on_alt_href_realize (GtkWidget *widget,
gpointer user_data);
void
on_exit1_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
address_book_close (GtkButton *button,
gpointer user_data);
void
on_card_changed (GtkEditable *editable,
gpointer user_data);
void
on_audio_jittcomp_value_changed (GtkRange *range,
gpointer user_data);
void
on_enable_nat_toggled (GtkToggleButton *togglebutton,
gpointer user_data);
void
on_nat_address_changed (GtkEditable *editable,
gpointer user_data);
void
on_display_ab_clicked (GtkButton *button,
gpointer user_data);
void
on_ringfileentry_changed (GtkEditable *editable,
gpointer user_data);
void
on_ringpreview_clicked (GtkButton *button,
gpointer user_data);
gboolean
on_property_box_closed (GnomeDialog *gnomedialog,
gpointer user_data);
void
on_address_book_close (GtkObject *object,
gpointer user_data);
#ifndef VERSION
# define VERSION LINPHONE_VERSION
#endif
void
on_addfriend_clicked (GtkButton *button,
gpointer user_data);
void
on_removefriend_clicked (GtkButton *button,
gpointer user_data);
void
on_add_adbk_clicked (GtkButton *button,
gpointer user_data);
void
on_addfriend_dialog_response (GtkDialog *dialog,
gint response_id,
gpointer user_data);
void
on_friendlist_row_activated (GtkTreeView *treeview,
GtkTreePath *path,
GtkTreeViewColumn *column,
gpointer user_data);
void
on_useRSVP_toggled (GtkToggleButton *togglebutton,
gpointer user_data);
void
on_useRPC_toggled (GtkToggleButton *togglebutton,
gpointer user_data);
#ifdef VINCENT_MAURY_RSVP
void
dialog_click (GtkDialog *dialog,
gint arg1,
gpointer user_data);
#endif
void
on_proxy_config_box_response (GtkDialog *dialog,
gint response_id,
gpointer user_data);
void
on_removeproxy_button_clicked (GtkButton *button,
gpointer user_data);
void
on_addproxy_button_clicked (GtkButton *button,
gpointer user_data);
void
on_editproxy_button_clicked (GtkButton *button,
gpointer user_data);
void
on_contact_box_response (GtkDialog *dialog,
gint response_id,
gpointer user_data);
void
on_inc_subscr_dialog_response (GtkDialog *dialog,
gint response_id,
gpointer user_data);
void
on_ob_proxy_changed (GtkComboBox *combobox,
gpointer user_data);
void
on_authentication_dialog_response (GtkDialog *dialog,
gint response_id,
gpointer user_data);
void
on_clear_auth_info_clicked (GtkButton *button,
gpointer user_data);
void
on_use_sipinfo_toggled (GtkToggleButton *togglebutton,
gpointer user_data);
void
on_guess_hostname_toggled (GtkToggleButton *togglebutton,
gpointer user_data);
void
on_call_history_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_call_logs_response (GtkDialog *dialog,
gint response_id,
gpointer user_data);
void
on_call_logs_destroy (GtkObject *object,
gpointer user_data);
void
on_enable_ipv6_toggled (GtkToggleButton *togglebutton,
gpointer user_data);
void
on_play_card_changed (GtkComboBox *combobox,
gpointer user_data);
void
on_capt_card_changed (GtkComboBox *combobox,
gpointer user_data);
void
on_ring_card_changed (GtkComboBox *combobox,
gpointer user_data);
void
on_callbutton_clicked (GtkButton *button,
gpointer user_data);
void
on_chatbox_clicked (GtkButton *button,
gpointer user_data);
void
on_chatentry_activate (GtkEntry *entry,
gpointer user_data);
void
on_hangup_clicked (GtkButton *button,
gpointer user_data);
void
on_chat_clicked (GtkButton *button,
gpointer user_data);
void
on_chatroom_destroy (GtkObject *object,
gpointer user_data);
void
on_ring_card_changed (GtkComboBox *combobox,
gpointer user_data);
void
on_addressentry_editing_done (GtkCellEditable *celleditable,
gpointer user_data);
void
on_addressentry_destroy (GtkObject *object,
gpointer user_data);
gboolean
on_addressentry_key_pressed (GtkWidget *widget,
GdkEventKey *event,
gpointer user_data);
void
on_addressentry_changed (GtkComboBox *combobox,
gpointer user_data);
void
on_addressentry_activate (GtkEntry *entry,
gpointer user_data);
void
on_addressentry_destroy (GtkObject *object,
gpointer user_data);
void
on_download_bw_value_changed (GtkSpinButton *spinbutton,
gpointer user_data);
void
on_download_bw_editing_done (GtkCellEditable *celleditable,
gpointer user_data);
void
on_download_bw_changed (GtkEditable *editable,
gpointer user_data);
gboolean
on_upload_bw_output (GtkSpinButton *spinbutton,
gpointer user_data);
void
on_upload_bw_change_value (GtkSpinButton *spinbutton,
GtkScrollType scroll,
gpointer user_data);
void
on_upload_bw_value_changed (GtkSpinButton *spinbutton,
gpointer user_data);
gboolean
on_upload_bw_leave_notify_event (GtkWidget *widget,
GdkEventCrossing *event,
gpointer user_data);
void
on_video_enabled_toggled (GtkToggleButton *togglebutton,
gpointer user_data);
void
on_echocancelation_toggled (GtkToggleButton *togglebutton,
gpointer user_data);
void
on_no_nat_toggled (GtkToggleButton *togglebutton,
gpointer user_data);
void
on_use_stun_toggled (GtkToggleButton *togglebutton,
gpointer user_data);
void
on_static_nat_toggled (GtkToggleButton *togglebutton,
gpointer user_data);
void
on_stun_server_changed (GtkEditable *editable,
gpointer user_data);

View file

@ -1,127 +0,0 @@
/***************************************************************************
friends.c - display of friend's list
-------------------
begin : Mon Dec 17 2001
copyright : (C) 2001 by Simon Morlat
email : simon.morlat@linphone.org
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#include "linphone.h"
#define get_friend_list() (&uiobj->main_window.friendlist)
#define get_core() (uiobj->core)
#define get_main_window() (&uiobj->main_window)
enum{
FRIEND_PRESENCE_IMG,
FRIEND_SIP_ADDRESS,
FRIEND_PRESENCE_STATUS,
FRIEND_ID,
FRIEND_LIST_NCOL
};
void friend_list_set_friend_status(FriendList *fl, LinphoneFriend * fid, const gchar *url, const gchar *status, const gchar *img){
GtkTreeIter iter;
LinphoneFriend *tmp=0;
gboolean found=FALSE;
GtkTreeModel *model=gtk_tree_view_get_model(GTK_TREE_VIEW(fl->friendlist));
if (gtk_tree_model_get_iter_first(model,&iter)) {
do{
gtk_tree_model_get(model,&iter,FRIEND_ID,&tmp,-1);
//printf("tmp=%i, fid=%i",tmp,fid);
if (fid==tmp) {
GdkPixbuf *pixbuf;
gtk_list_store_set(GTK_LIST_STORE(model),&iter,FRIEND_PRESENCE_STATUS,status,-1);
pixbuf = create_pixbuf(img);
if (pixbuf)
{
gtk_list_store_set(GTK_LIST_STORE(model),&iter,FRIEND_PRESENCE_IMG, pixbuf,-1);
}
found=TRUE;
}
}while(gtk_tree_model_iter_next(model,&iter));
}
if (found==FALSE){
//printf("Adding new notifier\n");
GdkPixbuf *pixbuf;
gtk_list_store_append(GTK_LIST_STORE(model),&iter);
gtk_list_store_set(GTK_LIST_STORE(model),&iter,FRIEND_SIP_ADDRESS, url, FRIEND_PRESENCE_STATUS,status,FRIEND_ID,fid,-1);
pixbuf = create_pixbuf(img);
if (pixbuf) gtk_list_store_set(GTK_LIST_STORE(model),&iter,FRIEND_PRESENCE_IMG, pixbuf,-1);
}
}
void
on_friendlist_row_activated (GtkTreeView *treeview,
GtkTreePath *path,
GtkTreeViewColumn *column,
gpointer user_data)
{
GtkTreeSelection *select;
GtkTreeIter iter;
GtkTreeModel *model;
gchar* friend;
select = gtk_tree_view_get_selection (treeview);
if (gtk_tree_selection_get_selected (select, &model, &iter))
{
gtk_tree_model_get (model, &iter,FRIEND_SIP_ADDRESS , &friend, -1);
gtk_entry_set_text(GTK_ENTRY(get_main_window()->addressentry),friend);
g_free(friend);
}
}
void friend_list_init(FriendList *fl,LinphoneCore *lc,GtkWidget *mainwidget)
{
GtkListStore *store;
GtkCellRenderer *renderer;
GtkTreeViewColumn *column;
GtkTreeSelection *select;
store = gtk_list_store_new (FRIEND_LIST_NCOL, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_POINTER);
fl->lc=lc;
fl->friendlist=lookup_widget(mainwidget,"friendlist");
/* need to add friends to the store here ...*/
gtk_tree_view_set_model(GTK_TREE_VIEW(fl->friendlist),GTK_TREE_MODEL(store));
g_object_unref(G_OBJECT(store));
renderer = gtk_cell_renderer_pixbuf_new();
column = gtk_tree_view_column_new_with_attributes (NULL,
renderer,
"pixbuf", FRIEND_PRESENCE_IMG,
NULL);
gtk_tree_view_column_set_min_width (column, 29);
gtk_tree_view_append_column (GTK_TREE_VIEW (fl->friendlist), column);
renderer = gtk_cell_renderer_text_new ();
column = gtk_tree_view_column_new_with_attributes (_("Name"),
renderer,
"text", FRIEND_SIP_ADDRESS,
NULL);
g_object_set (G_OBJECT(column), "resizable", TRUE, NULL);
gtk_tree_view_append_column (GTK_TREE_VIEW (fl->friendlist), column);
column = gtk_tree_view_column_new_with_attributes (_("Presence status"),
renderer,
"text", FRIEND_PRESENCE_STATUS,
NULL);
g_object_set (G_OBJECT(column), "resizable", TRUE, NULL);
gtk_tree_view_append_column (GTK_TREE_VIEW (fl->friendlist), column);
select = gtk_tree_view_get_selection (GTK_TREE_VIEW (fl->friendlist));
gtk_tree_selection_set_mode (select, GTK_SELECTION_SINGLE);
}

View file

@ -1,29 +0,0 @@
/***************************************************************************
friends.h - display of friend's list
-------------------
begin : Mon Dec 17 2001
copyright : (C) 2001 by Simon Morlat
email : simon.morlat@linphone.org
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#include <interface.h>
struct _FriendList {
LinphoneCore *lc;
GtkWidget *friendlist;
};
typedef struct _FriendList FriendList;
void friend_list_init(FriendList *fl,LinphoneCore *lc,GtkWidget *mainwidget);
void friend_list_set_friend_status(FriendList *fl, LinphoneFriend * fid, const gchar *url, const gchar *status, const gchar *img);

View file

@ -1,102 +0,0 @@
/*
applet.c - some utils functions that cannot be set in interface.c.
Copyright (C) 2000 Simon MORLAT (simon.morlat@free.fr)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "linphone.h"
/* creates the applet button*
GtkWidget *create_applet()
{
GtkWidget *frame;
GtkWidget *button;
GtkWidget *vbox;
GtkWidget *applet;
applet = applet_widget_new("linphone_applet");
frame = gtk_frame_new(NULL);
gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_IN);
gtk_widget_show(frame);
vbox = gtk_vbox_new(FALSE, FALSE);
gtk_container_add(GTK_CONTAINER(frame), vbox);
gtk_widget_show(vbox);
button = gtk_button_new();
gtk_widget_ref(button);
GTK_WIDGET_UNSET_FLAGS(button, GTK_CAN_DEFAULT);
GTK_WIDGET_UNSET_FLAGS(button, GTK_CAN_FOCUS);
gtk_box_pack_start(GTK_BOX(vbox), button, FALSE, TRUE, 0);
gtk_widget_show(button);
applet_widget_add (APPLET_WIDGET (applet), frame);
gtk_object_set_data_full(GTK_OBJECT(applet),"applet_button",button,(GtkDestroyNotify)gtk_widget_unref);
gtk_signal_connect(GTK_OBJECT(button), "button_press_event",
GTK_SIGNAL_FUNC(on_applet_clicked), NULL);
gtk_signal_connect(GTK_OBJECT(applet), "change_pixel_size",
GTK_SIGNAL_FUNC(applet_change_pixel_size), NULL);
applet_widget_set_tooltip( APPLET_WIDGET (applet),_("linphone"));
gtk_widget_show(applet);
return(applet);
};
*/
/* this just sets level adjustements for startup*/
void set_levels(LinphoneGnomeUI *ui,gint reclev, gint playlev, gint ringlev)
{
GtkWidget *range;
GtkWidget *window=ui->main_window.window;
return;
if (window)
{
range=lookup_widget(window,"rec_vol");
gtk_adjustment_set_value (gtk_range_get_adjustment(GTK_RANGE(range)),(gfloat)reclev);
range=lookup_widget(window,"play_vol");
gtk_adjustment_set_value (gtk_range_get_adjustment(GTK_RANGE(range)),(gfloat)playlev);
range=lookup_widget(window,"ring_vol");
gtk_adjustment_set_value (gtk_range_get_adjustment(GTK_RANGE(range)),(gfloat)ringlev);
}
}
void alt_ressource_display(LinphoneGnomeUI *ui,const gchar *url)
{
GtkWidget *href;
GtkWidget *altdisplay;
GtkLabel *label;
gchar *pattern;
altdisplay=create_altressource();
g_object_set_data(G_OBJECT(altdisplay),"ui",(gpointer)ui);
href=lookup_widget(altdisplay,"alt_href");
label=GTK_LABEL(GTK_BIN(href)->child);
gtk_label_set_text(label,url);
/* pattern used to set underline for string */
pattern = g_strnfill(strlen(url), '_');
gtk_label_set_pattern(label,pattern);
g_free(pattern);
gtk_widget_show(altdisplay);
}

View file

@ -1,33 +0,0 @@
/*
applet.h - ome utils functions that cannot be set in interface.c.
Copyright (C) 2000 Simon MORLAT (simon.morlat@free.fr)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef GUI_UTILS_H
#define GUI_UTILS_H
#include "linphone.h"
/* set audio levels on the main window*/
void set_levels(LinphoneGnomeUI *ui,gint reclev, gint playlev, gint ringlev);
/* display an alternate url (used in 380 response) */
void alt_ressource_display(LinphoneGnomeUI *ui, const gchar *url);
#endif

File diff suppressed because it is too large Load diff

View file

@ -1,15 +0,0 @@
/*
* DO NOT EDIT THIS FILE - it is generated by Glade.
*/
GtkWidget* create_app1 (void);
GtkWidget* create_about2 (void);
GtkWidget* create_prop1 (void);
GtkWidget* create_address_book (void);
GtkWidget* create_altressource (void);
GtkWidget* create_proxy_config_box (void);
GtkWidget* create_contact_box (void);
GtkWidget* create_inc_subscr_dialog (void);
GtkWidget* create_authentication_dialog (void);
GtkWidget* create_call_logs (void);
GtkWidget* create_chatroom (void);

View file

@ -1,449 +0,0 @@
/***************************************************************************
linphone.c - Main code for linphone's gnome
interface
-------------------
begin : Mon Dec 17 2001
copyright : (C) 2001 by Simon Morlat
email : simon.morlat@linphone.org
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include "linphone.h"
#include "support.h"
#include "interface.h"
#include "callbacks.h"
#include "gui_utils.h"
#include "lpconfig.h"
LinphoneGnomeUI *uiobj=NULL;
#define get_uiobj() (uiobj)
#define get_core() (uiobj->core)
#define get_friend_list() (&uiobj->main_window.friendlist)
void linphone_gnome_ui_init(LinphoneGnomeUI *ui,LinphoneCore *core)
{
gdk_threads_init();
memset(ui,0,sizeof(LinphoneGnomeUI));
ui->core=core;
uiobj=ui;
ui->main_window.shown_once=FALSE;
}
static void restore_uri_history(GtkEntry *uribar, LpConfig *cfg){
char key[20];
int i;
GtkEntryCompletion *gep=gtk_entry_completion_new();
GtkListStore *model=gtk_list_store_new(1,G_TYPE_STRING);
for (i=0;;i++){
const char *uri;
snprintf(key,sizeof(key),"uri%i",i);
uri=lp_config_get_string(cfg,"GtkUi",key,NULL);
if (uri!=NULL) {
GtkTreeIter iter;
gtk_list_store_append(model,&iter);
gtk_list_store_set(model,&iter,0,uri,-1);
if (i==0) gtk_entry_set_text(uribar,uri);
}
else break;
}
gtk_entry_completion_set_model(gep,GTK_TREE_MODEL(model));
gtk_entry_completion_set_text_column(gep,0);
gtk_entry_set_completion(uribar,gep);
}
void linphone_gnome_save_uri_history(LinphoneGnomeUI *ui){
char key[20];
int i=0;
char *uri=NULL;
GtkTreeIter iter;
GtkEntry *uribar=GTK_ENTRY(ui->main_window.addressentry);
GtkTreeModel *model=gtk_entry_completion_get_model(gtk_entry_get_completion(uribar));
LpConfig *cfg=linphone_core_get_config(ui->core);
if (!gtk_tree_model_get_iter_first(model,&iter)) return;
do {
gtk_tree_model_get(model,&iter,0,&uri,-1);
if (uri) {
snprintf(key,sizeof(key),"uri%i",i);
lp_config_set_string(cfg,"GtkUi",key,uri);
g_free(uri);
}else break;
i++;
if (i>5) break;
}while(gtk_tree_model_iter_next(model,&iter));
}
void main_window_create(LinphoneGnomeUI *obj)
{
GtkWidget *child;
GtkWidget *window;
window=create_app1 ();
gnome_window_icon_set_from_default(GTK_WINDOW(window));
obj->main_window.status_bar=lookup_widget(window,"appbar1");
obj->main_window.addressentry=lookup_widget(window,"addressentry");
obj->main_window.optioncontrols=lookup_widget(window,"optioncontrols");
obj->main_window.dtmfentry=lookup_widget(window,"dtmf_entry");
obj->main_window.callbutton=lookup_widget(window,"callbutton");
child=lookup_widget(window,"showmore");
/* hide the optionnal controls at startup */
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(child),0);
#ifndef VIDEO_ENABLED
gtk_widget_hide(lookup_widget(child,"video_enabled"));
#endif
presence_box_init(&obj->main_window.presencebox,window,obj->core);
friend_list_init(&obj->main_window.friendlist,obj->core,window);
g_object_set_data(G_OBJECT(window),"ui",(gpointer)obj);
obj->main_window.window=window;
}
void linphone_gnome_ui_show(LinphoneGnomeUI *ui)
{
if (ui->main_window.window==NULL){
main_window_create(ui);
}
gtk_widget_show(ui->main_window.window);
gtk_window_present(GTK_WINDOW(ui->main_window.window));
ui->main_window.shown_once=TRUE;
}
void linphone_gnome_ui_hide(LinphoneGnomeUI *ui)
{
if (ui->main_window.window==NULL) return;
gtk_widget_hide(ui->main_window.window);
}
void linphone_gnome_ui_uninit(LinphoneGnomeUI *ui)
{
ui->main_window.window=NULL;
}
void linphone_gnome_ui_display_something(LinphoneGnomeUI *ui,GtkMessageType type,const gchar *message)
{
GtkWidget *dialog;
if (!linphone_core_is_in_main_thread(ui->core)) gdk_threads_enter();
linphone_gnome_ui_show(ui);
if (type==GTK_MESSAGE_QUESTION)
{
#ifdef VINCENT_MAURY_RSVP
/* draw a question box. link to dialog_click callback */
dialog = gtk_message_dialog_new (
GTK_WINDOW(ui->main_window.window),
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_QUESTION,
GTK_BUTTONS_YES_NO,
(const gchar*)message);
/* connect the click event to the callback */
g_signal_connect_swapped (G_OBJECT (dialog), "response",
G_CALLBACK (dialog_click),
G_OBJECT (dialog));
/* actually show the box */
gtk_widget_show(dialog);
#endif
}
else
{
dialog = gtk_message_dialog_new (GTK_WINDOW(ui->main_window.window),
GTK_DIALOG_DESTROY_WITH_PARENT,
type,
GTK_BUTTONS_CLOSE,
(const gchar*)message);
/* Destroy the dialog when the user responds to it (e.g. clicks a button) */
g_signal_connect_swapped (G_OBJECT (dialog), "response",
G_CALLBACK (gtk_widget_destroy),
G_OBJECT (dialog));
gtk_widget_show(dialog);
}
if (!linphone_core_is_in_main_thread(ui->core)) gdk_threads_leave();
}
/* these are the LinphoneCore virtual functions */
void linphone_gnome_display_message(LinphoneCore *lc, const char *message)
{
LinphoneGnomeUI *ui=(LinphoneGnomeUI*)lc->data;
linphone_gnome_ui_display_something(ui,GTK_MESSAGE_INFO,message);
}
#ifdef VINCENT_MAURY_RSVP
/* Question box with yes/no answer. */
void linphone_gnome_display_yes_no(LinphoneCore *lc,const char *message)
{
LinphoneGnomeUI *ui=(LinphoneGnomeUI*)lc->data;
if (strcmp(message,"With QoS")==0)
/* the caller asks for QoS, this function is called because, by default,
* you don't use QoS ! */
linphone_gnome_ui_display_something(ui,GTK_MESSAGE_QUESTION,
_("The caller asks for resource reservation. Do you agree ?"));
else
linphone_gnome_ui_display_something(ui,GTK_MESSAGE_QUESTION,
_("The caller doesn't use resource reservation. \
Do you wish to continue anyway ?"));
}
#endif
void linphone_gnome_display_warning(LinphoneCore *lc, const char *warning)
{
LinphoneGnomeUI *ui=(LinphoneGnomeUI*)lc->data;
linphone_gnome_ui_display_something(ui,GTK_MESSAGE_WARNING,warning);
}
void linphone_gnome_display_status(LinphoneCore *lc, const char *status)
{
LinphoneGnomeUI *ui=(LinphoneGnomeUI*)lc->data;
if (ui->main_window.window==NULL) return;
if (!ui->main_window.shown_once) return; /* avoid a gnome bug*/
gnome_appbar_push(GNOME_APPBAR(ui->main_window.status_bar),status);
}
void linphone_gnome_inv_recv(LinphoneCore *lc,const char *from)
{
LinphoneGnomeUI *ui=(LinphoneGnomeUI*)lc->data;
gchar *title;
if (ui->main_window.window==NULL) return;
gtk_entry_set_text(GTK_ENTRY(ui->main_window.addressentry),from);
title=g_strdup_printf(_("linphone - receiving call from %s"),from);
gtk_window_set_title(GTK_WINDOW(ui->main_window.window),title);
g_free(title);
}
void linphone_gnome_show(LinphoneCore *lc)
{
LinphoneGnomeUI *ui=(LinphoneGnomeUI*)lc->data;
linphone_gnome_ui_show(ui);
}
void linphone_gnome_display_url(LinphoneCore *lc, const char *message, const char *url)
{
LinphoneGnomeUI *ui=(LinphoneGnomeUI*)lc->data;
alt_ressource_display(ui,url);
}
void linphone_gnome_notify_received(LinphoneCore *lc,LinphoneFriend *fid, const char *from, const char *status, const char *img){
FriendList *fl=get_friend_list();
friend_list_set_friend_status(fl,fid,from,status, img);
}
void linphone_gnome_new_unknown_subscriber(LinphoneCore *lc, LinphoneFriend *lf, const char *url){
GtkWidget *d=create_inc_subscr_dialog();
gchar *text=g_strdup_printf(_("You have received a subscription from %s."
"This means that this person wishes to be notified of your presence information (online, busy, away...).\n"
"Do you agree ?"),url);
gtk_label_set_text(GTK_LABEL(lookup_widget(d,"subscr_label")),text);
g_object_set_data(G_OBJECT(d),"friend_ref",(gpointer)lf);
gtk_widget_show(d);
}
void linphone_gnome_prompt_authentication(LinphoneCore *lc, const gchar *realm, const gchar *username){
GtkWidget *w=create_authentication_dialog();
gchar *question=g_strdup_printf(_("Authentication required for realm %s"),realm);
gtk_label_set_text(GTK_LABEL(lookup_widget(w,"question")),question);
g_free(question);
gtk_entry_set_text(GTK_ENTRY(lookup_widget(w,"realm")),realm);
gtk_entry_set_text(GTK_ENTRY(lookup_widget(w,"username")),username);
gtk_widget_show(w);
}
void linphone_gnome_bye_recv(LinphoneCore *lc, const char *from){
LinphoneGnomeUI *ui=(LinphoneGnomeUI*)lc->data;
gtk_window_set_title(GTK_WINDOW(ui->main_window.window),"linphone");
}
void stub(){
}
void linphone_gnome_call_log_updated(LinphoneCore *lc, LinphoneCallLog *newcl){
LinphoneGnomeUI *ui=(LinphoneGnomeUI *)linphone_core_get_user_data(lc);
linphone_gnome_update_call_logs(ui);
}
void linphone_gnome_text_received(LinphoneCore *lc,LinphoneChatRoom *cr, const char *from, const char *msg){
GtkWidget *gcr=(GtkWidget*)linphone_chat_room_get_user_data(cr);
if (gcr==NULL){
gcr=chatroom_new(from,cr);
}
gtk_widget_show(gcr);
chatroom_append(gcr,from,msg);
}
LinphoneCoreVTable linphone_gnome_vtable=
{
show: linphone_gnome_show,
inv_recv: linphone_gnome_inv_recv,
bye_recv : linphone_gnome_bye_recv,
notify_recv: linphone_gnome_notify_received,
new_unknown_subscriber: linphone_gnome_new_unknown_subscriber,
auth_info_requested: linphone_gnome_prompt_authentication,
display_status : linphone_gnome_display_status,
display_message : linphone_gnome_display_message,
display_warning : linphone_gnome_display_warning,
#ifdef VINCENT_MAURY_RSVP
display_yes_no : linphone_gnome_display_yes_no,
#endif
display_url : linphone_gnome_display_url,
display_question : stub,
call_log_updated : linphone_gnome_call_log_updated,
text_received: linphone_gnome_text_received
};
gboolean linphone_gnome_iterate(LinphoneCore *lc)
{
linphone_core_iterate(lc);
return TRUE;
}
void proxy_changed(GtkWidget *combo){
LinphoneProxyConfig *pcfg=proxy_combo_box_get_selected(combo);
linphone_core_set_default_proxy(get_core(),pcfg);
}
void linphone_refresh_proxy_combo_box(GtkWidget *window){
LinphoneCore *lc=get_core();
GtkWidget *combo;
const MSList *elem=linphone_core_get_proxy_config_list(lc);
LinphoneProxyConfig *cfg=NULL;
GtkWidget *hbox=lookup_widget(window,"proxy_hbox");
linphone_core_get_default_proxy(lc,&cfg);
if (elem==NULL){
gtk_widget_hide(hbox);
return;
}
combo=(GtkWidget*)g_object_get_data(G_OBJECT(hbox),"proxy");
if (combo!=NULL){
gtk_widget_destroy(combo);
}
combo=proxy_combo_box_new(cfg);
g_object_set_data(G_OBJECT(hbox),"proxy",(gpointer)combo);
g_signal_connect(G_OBJECT(combo),"changed",G_CALLBACK(proxy_changed),NULL);
gtk_box_pack_start_defaults(GTK_BOX(hbox),combo);
gtk_widget_show(combo);
gtk_widget_show(hbox);
}
void linphone_gnome_init(LinphoneGnomeUI *ui,LinphoneCore *lc)
{
gchar *configfile_name =
g_strdup_printf ("%s/.gnome2/linphone", getenv ("HOME"));
linphone_gnome_ui_init(ui,lc);
linphone_gnome_ui_show(ui);
linphone_core_init(lc,&linphone_gnome_vtable,configfile_name,(gpointer)ui);
g_free(configfile_name);
set_levels(ui,linphone_core_get_rec_level(lc),linphone_core_get_play_level(lc),linphone_core_get_ring_level(lc));
/* get history of uri bar */
restore_uri_history(GTK_ENTRY(ui->main_window.addressentry), linphone_core_get_config(lc));
linphone_refresh_proxy_combo_box(ui->main_window.window);
ui->timeout_id=gtk_timeout_add(500,(GtkFunction)linphone_gnome_iterate,(gpointer)lc);
}
void linphone_gnome_uninit(LinphoneGnomeUI *ui)
{
LinphoneCore *lc=ui->core;
linphone_gnome_ui_uninit(ui);
linphone_core_uninit(lc);
gtk_timeout_remove (ui->timeout_id);
}
GtkWidget *proxy_combo_box_new(LinphoneProxyConfig *selected){
GtkWidget *combo;
const MSList *elem;
GtkListStore *store=gtk_list_store_new(2,G_TYPE_STRING,G_TYPE_POINTER);
GtkTreeIter iter;
GtkTreeIter prxiter;
GtkCellRenderer *renderer;
gboolean proxy_found=FALSE;
/* fill the store */
elem=linphone_core_get_proxy_config_list(get_core());
gtk_list_store_append(store,&iter);
gtk_list_store_set(store,&iter,0,_("None"),1,(gpointer)NULL,-1);
for(;elem!=NULL;elem=ms_list_next(elem)){
LinphoneProxyConfig *proxy=(LinphoneProxyConfig*)elem->data;
gtk_list_store_append(store,&iter);
gtk_list_store_set(store,&iter,0,proxy->reg_proxy,1,(gpointer)proxy,-1);
if (selected==proxy) {
prxiter=iter;
proxy_found=TRUE;
}
}
combo=gtk_combo_box_new_with_model(GTK_TREE_MODEL(store));
g_object_unref(G_OBJECT(store));
renderer = gtk_cell_renderer_text_new ();
gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo), renderer, TRUE);
gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combo), renderer,
"text", 0,
NULL);
if (proxy_found){
gtk_combo_box_set_active_iter(GTK_COMBO_BOX(combo),&prxiter);
}else{
/*else select "None" */
gtk_combo_box_set_active(GTK_COMBO_BOX(combo),0);
}
return combo;
}
LinphoneProxyConfig *proxy_combo_box_get_selected(GtkWidget *combo){
LinphoneProxyConfig *pcfg=NULL;
GtkTreeIter iter;
if (gtk_combo_box_get_active_iter(GTK_COMBO_BOX(combo),&iter)){
GtkTreeModel *model=gtk_combo_box_get_model(GTK_COMBO_BOX(combo));
gtk_tree_model_get(model,&iter,1,(gpointer)&pcfg,-1);
}
return pcfg;
}
void linphone_gnome_update_call_logs(LinphoneGnomeUI *ui){
LinphoneCore *lc=ui->core;
GtkTextView *tv;
GtkTextBuffer *tb;
GtkTextIter begin,end;
GtkTextTag *tag;
MSList *elem;
if (ui->logs==NULL) return;
tv=GTK_TEXT_VIEW(lookup_widget(ui->logs,"logview"));
tb=gtk_text_view_get_buffer(tv);
gtk_text_buffer_get_bounds(tb,&begin,&end);
gtk_text_buffer_delete(tb,&begin,&end);
gtk_text_buffer_get_end_iter(tb,&end);
for (elem=linphone_core_get_call_logs(lc);elem!=NULL;elem=ms_list_next(elem)){
LinphoneCallLog *cl=(LinphoneCallLog*)elem->data;
gchar *str=linphone_call_log_to_str(cl);
tag=NULL;
if (cl->status==LinphoneCallMissed){
tag=gtk_text_tag_table_lookup(gtk_text_buffer_get_tag_table(tb),"redforeground");
if (tag==NULL) tag = gtk_text_buffer_create_tag (tb, "redforeground",
"foreground", "red", NULL);
}
gtk_text_buffer_insert_with_tags(tb,&end,str,-1,tag,NULL);
gtk_text_buffer_insert(tb,&end,"\n",-1);
ms_free(str);
}
}
void linphone_gnome_show_call_logs_window(LinphoneGnomeUI *ui){
if (ui->logs==NULL) {
ui->logs=create_call_logs();
}
linphone_gnome_update_call_logs(ui);
gtk_widget_show(ui->logs);
}

View file

@ -1,66 +0,0 @@
#ifndef LINPHONE_H
#define LINPHONE_H
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <gnome.h>
#include <linphonecore.h>
#include "lpconfig.h"
#include "support.h"
#include "propertybox.h"
#include "presence.h"
#include "addressbook.h"
#include "friends.h"
typedef struct _LinphoneMainWindow
{
GtkWidget *window;
GtkWidget *status_bar;
GtkWidget *addressentry;
GtkWidget *optioncontrols;
GtkWidget *dtmfentry;
GtkWidget *callbutton;
PresenceBox presencebox;
FriendList friendlist;
gboolean shown_once;
}LinphoneMainWindow;
typedef struct _LinphoneGnomeUI
{
LinphoneMainWindow main_window;
LinphonePropertyBox propbox;
GtkWidget *ab; /*the address book */
GtkWidget *logs; /* the call logs window */
LinphoneCore *core;
guint timeout_id;
}LinphoneGnomeUI;
void linphone_gnome_ui_init(LinphoneGnomeUI *ui,LinphoneCore *core);
void linphone_gnome_ui_show(LinphoneGnomeUI *ui);
void linphone_gnome_ui_hide(LinphoneGnomeUI *ui);
void linphone_gnome_ui_uninit(LinphoneGnomeUI *ui);
void linphone_gnome_init(LinphoneGnomeUI *ui,LinphoneCore *lc);
void linphone_gnome_uninit(LinphoneGnomeUI *ui);
extern LinphoneGnomeUI *uiobj;
GtkWidget *proxy_combo_box_new(LinphoneProxyConfig *selected);
void linphone_refresh_proxy_combo_box(GtkWidget *window);
LinphoneProxyConfig *proxy_combo_box_get_selected(GtkWidget *combo);
void linphone_gnome_show_call_logs_window(LinphoneGnomeUI *ui);
void linphone_gnome_update_call_logs(LinphoneGnomeUI *ui);
void linphone_gnome_ui_display_something(LinphoneGnomeUI *ui,GtkMessageType type,const gchar *message);
void linphone_gnome_save_uri_history(LinphoneGnomeUI *ui);
GtkWidget *chatroom_new(const gchar *url, LinphoneChatRoom *cr);
void chatroom_append(GtkWidget *gcr, const gchar *from, const gchar *message);
void chatroom_close(GtkWidget *gcr);
#endif

View file

@ -1,70 +0,0 @@
/*
* Initial main.c file generated by Glade. Edit as required.
* Glade will not overwrite this file.
*/
#include "linphone.h"
/*
#include "../osipua/src/dbgalloc.h"
GMemVTable dbgtable={
smalloc,
srealloc,
sfree,
scalloc,
smalloc,
srealloc
};
*/
LinphoneCore core;
LinphoneGnomeUI ui;
static int verbose=0;
struct poptOption linphone_options[2]={
{
longName: "verbose",
shortName: '\0',
argInfo: POPT_ARG_NONE,
arg : (void*)&verbose,
val : 0,
descrip: "log to stdout some debug information while running.",
NULL
},
POPT_TABLEEND
};
int
main (int argc, char *argv[])
{
void *p;
//g_log_set_fatal_mask("GLib",G_LOG_LEVEL_WARNING);
//g_mem_set_vtable(glib_mem_profiler_table);
//g_mem_set_vtable(&dbgtable);
#ifdef ENABLE_NLS
p=bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
if (p==NULL) perror("bindtextdomain failed");
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
#else
printf("NLS disabled.\n");
#endif
gnome_program_init ("linphone", LINPHONE_VERSION, LIBGNOMEUI_MODULE,
argc, argv,
GNOME_PARAM_APP_DATADIR, PACKAGE_DATA_DIR,
GNOME_PARAM_POPT_TABLE,&linphone_options,NULL);
if (verbose) linphone_core_enable_logs(stdout);
else linphone_core_disable_logs();
linphone_gnome_init(&ui,&core);
linphone_gnome_ui_show(&ui);
gtk_main ();
gdk_threads_leave(); /* it appears that the gdk lock is hold while exiting from gtk_main() */
linphone_gnome_uninit(&ui);
//g_mem_profile();
exit(0);
return 0;
}

View file

@ -1,150 +0,0 @@
/***************************************************************************
presence.c - code for the presence box
-------------------
begin : Mon Dec 17 2001
copyright : (C) 2001 by Simon Morlat
email : simon.morlat@linphone.org
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#include "linphone.h"
#include "callbacks.h"
#include "support.h"
void presence_box_init(PresenceBox *p, GtkWidget *main_window,LinphoneCore *lc)
{
GtkWidget *r;
p->lc=lc;
p->contact_field=lookup_widget(main_window,"contact_field");
p->minutesaway=lookup_widget(main_window,"minutesaway");
r=lookup_widget(main_window,"presence_reachable");
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(r),TRUE);
r=lookup_widget(main_window,"presence_frame");
}
void presence_box_changed(PresenceBox *p)
{
presence_box_apply(p);
}
#define get_presence_box() (&(uiobj)->main_window.presencebox)
void
on_reachable (GtkToggleButton *togglebutton,gpointer user_data)
{
PresenceBox *p=get_presence_box();
if (!gtk_toggle_button_get_active(togglebutton)) return;
//gtk_widget_set_sensitive(p->contact_field,FALSE);
p->toggled_button=PRESENCE_MODE_REACHABLE;
//gtk_widget_set_sensitive(p->minutesaway,FALSE);
//gtk_widget_set_sensitive(p->contact_field,FALSE);
presence_box_changed(p);
}
void
on_busy (GtkToggleButton *togglebutton,gpointer user_data)
{
PresenceBox *p=get_presence_box();
if (!gtk_toggle_button_get_active(togglebutton)) return;
//gtk_widget_set_sensitive(p->contact_field,FALSE);
p->toggled_button=PRESENCE_MODE_BUSY;
//gtk_widget_set_sensitive(p->minutesaway,TRUE);
presence_box_changed(p);
}
void
on_minutesaway_changed (GtkEditable *editable,gpointer user_data)
{
PresenceBox *p=get_presence_box();
presence_box_changed(p);
}
void
on_away (GtkToggleButton *togglebutton,gpointer user_data)
{
PresenceBox *p=get_presence_box();
if (!gtk_toggle_button_get_active(togglebutton)) return;
//gtk_widget_set_sensitive(p->contact_field,FALSE);
//gtk_widget_set_sensitive(p->minutesaway,TRUE);
p->toggled_button=PRESENCE_MODE_AWAY;
presence_box_changed(p);
}
void
on_do_not_disturb (GtkToggleButton *togglebutton,gpointer user_data)
{
PresenceBox *p=get_presence_box();
if (!gtk_toggle_button_get_active(togglebutton)) return;
//gtk_widget_set_sensitive(p->contact_field,FALSE);
//gtk_widget_set_sensitive(p->minutesaway,FALSE);
p->toggled_button=PRESENCE_MODE_NOT_DISTURB;
presence_box_changed(p);
}
void
on_moved_tmply (GtkToggleButton *togglebutton,gpointer user_data)
{
PresenceBox *p=get_presence_box();
if (!gtk_toggle_button_get_active(togglebutton)) return;
//gtk_widget_set_sensitive(p->contact_field,TRUE);
//gtk_widget_set_sensitive(p->minutesaway,FALSE);
p->toggled_button=PRESENCE_MODE_MOVED;
presence_box_changed(p);
}
void
on_alt_serv (GtkToggleButton *togglebutton,gpointer user_data)
{
PresenceBox *p=get_presence_box();
if (!gtk_toggle_button_get_active(togglebutton)) return;
//gtk_widget_set_sensitive(p->contact_field,TRUE);
//gtk_widget_set_sensitive(p->minutesaway,FALSE);
p->toggled_button=PRESENCE_MODE_ALT_SERVICE;
presence_box_changed(p);
}
void
on_contact_field_changed (GtkEditable *entry,gpointer user_data)
{
PresenceBox *p=get_presence_box();
presence_box_changed(p);
}
void presence_box_apply(PresenceBox *p)
{
gchar *tmp,*contact=NULL;
int minutes_away=-1;
g_message("presence_box_apply");
/* retrieve the minutes away */
tmp = gtk_editable_get_chars (GTK_EDITABLE(p->minutesaway),0,-1);
if (tmp!=NULL && strlen(tmp)>0)
{
minutes_away = atoi(tmp);
g_free(tmp);
}
/* retrieve the alternate contact url */
tmp = gtk_editable_get_chars (GTK_EDITABLE(p->contact_field),0,-1);
if (tmp!=NULL && strlen(tmp)>0)
{
contact=tmp;
}
/* set presence mode */
linphone_core_set_presence_info(p->lc,minutes_away,contact,p->toggled_button);
if (tmp!=NULL) g_free(tmp);
}

View file

@ -1,43 +0,0 @@
/***************************************************************************
presence.h - code for the presence box
-------------------
begin : Mon Dec 17 2001
copyright : (C) 2001 by Simon Morlat
email : simon.morlat@linphone.org
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef PRESENCE_H
#define PRESENCE_H
enum { PRESENCE_MODE_REACHABLE=LINPHONE_STATUS_ONLINE,
PRESENCE_MODE_BUSY=LINPHONE_STATUS_BUSY,
PRESENCE_MODE_AWAY=LINPHONE_STATUS_AWAY,
PRESENCE_MODE_NOT_DISTURB=LINPHONE_STATUS_NOT_DISTURB,
PRESENCE_MODE_MOVED=LINPHONE_STATUS_MOVED,
PRESENCE_MODE_ALT_SERVICE=LINPHONE_STATUS_ALT_SERVICE
};
typedef struct _PresenceBox
{
LinphoneCore *lc;
GtkWidget *minutesaway;
GtkWidget *contact_field;
gint toggled_button; /* indicate which button is toggled*/
} PresenceBox;
void presence_box_init(PresenceBox *p, GtkWidget *main_window,LinphoneCore *lc);
void presence_box_changed(PresenceBox *p);
void presence_box_apply(PresenceBox *p);
#endif

File diff suppressed because it is too large Load diff

View file

@ -1,96 +0,0 @@
/***************************************************************************
propertybox.h - description
-------------------
begin : Wed Jan 30 2002
copyright : (C) 2002 by Simon Morlat
email : simon.morlat@linphone.org
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include "interface.h"
#include <gnome.h>
struct _NetSection
{
GtkWidget *interfaces;
gint if_sel;
GtkWidget *au_port;
GtkWidget *audio_jittcomp;
GtkWidget *enable_nat;
GtkWidget *nat_label;
GtkWidget *nat_address;
GtkWidget *use_sipinfo;
GtkWidget *enable_ipv6;
};
typedef struct _NetSection NetSection;
void net_section_init(NetSection *sec, GtkWidget *prop);
void net_section_apply(NetSection *sec, LinphoneCore *lp);
struct _SipSection
{
GtkWidget *port;
GtkWidget *username;
GtkWidget *hostname;
GtkWidget *proxy_list;
GtkWidget *guess_hostname;
};
typedef struct _SipSection SipSection;
void sip_section_enable_registrar(SipSection *sec, LinphoneCore *lp, gboolean state);
void sip_section_fill(SipSection *sec, LinphoneCore *lp);
void sip_section_init(SipSection *sec, GtkWidget *prop);
void sip_section_apply(SipSection *sec, LinphoneCore *lp);
struct _CodecSection
{
GtkWidget *au_codec_list;
GtkWidget *vi_codec_list;
GtkWidget *codec_info;
};
typedef struct _CodecSection CodecSection;
void codec_section_init(CodecSection *sec, GtkWidget *prop);
void codec_section_apply(CodecSection *sec, LinphoneCore *lc);
struct _SoundSection
{
GtkWidget *source_entry;
GtkWidget *autokill_button;
GtkWidget *ringfileentry;
GtkWidget *ringpreview;
};
typedef struct _SoundSection SoundSection;
void sound_section_init(SoundSection *sec,GtkWidget *prop);
void sound_section_apply(SoundSection *sec, LinphoneCore *lc);
struct _LinphonePropertyBox
{
GtkWidget *prop;
NetSection net;
SipSection sip;
CodecSection codec;
SoundSection sound;
};
typedef struct _LinphonePropertyBox LinphonePropertyBox;
void linphone_property_box_init(LinphonePropertyBox *box);
void linphone_property_box_apply(LinphonePropertyBox * box, LinphoneCore *lc, int page);
void linphone_property_box_uninit(LinphonePropertyBox *box);

View file

@ -1,115 +0,0 @@
/*
* DO NOT EDIT THIS FILE - it is generated by Glade.
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <string.h>
#include <stdio.h>
#include <gnome.h>
#include "support.h"
GtkWidget*
lookup_widget (GtkWidget *widget,
const gchar *widget_name)
{
GtkWidget *parent, *found_widget;
for (;;)
{
if (GTK_IS_MENU (widget))
parent = gtk_menu_get_attach_widget (GTK_MENU (widget));
else
parent = widget->parent;
if (!parent)
parent = (GtkWidget*) g_object_get_data (G_OBJECT (widget), "GladeParentKey");
if (parent == NULL)
break;
widget = parent;
}
found_widget = (GtkWidget*) g_object_get_data (G_OBJECT (widget),
widget_name);
if (!found_widget)
g_warning ("Widget not found: %s", widget_name);
return found_widget;
}
/* This is an internally used function to create pixmaps. */
GtkWidget*
create_pixmap (GtkWidget *widget,
const gchar *filename)
{
GtkWidget *pixmap;
gchar *pathname;
if (!filename || !filename[0])
return gtk_image_new ();
pathname = gnome_program_locate_file (NULL, GNOME_FILE_DOMAIN_APP_PIXMAP,
filename, TRUE, NULL);
if (!pathname)
{
g_warning (_("Couldn't find pixmap file: %s"), filename);
return gtk_image_new ();
}
pixmap = gtk_image_new_from_file (pathname);
g_free (pathname);
return pixmap;
}
/* This is an internally used function to create pixmaps. */
GdkPixbuf*
create_pixbuf (const gchar *filename)
{
gchar *pathname = NULL;
GdkPixbuf *pixbuf;
GError *error = NULL;
if (!filename || !filename[0])
return NULL;
pathname = gnome_program_locate_file (NULL, GNOME_FILE_DOMAIN_APP_PIXMAP,
filename, TRUE, NULL);
if (!pathname)
{
g_warning (_("Couldn't find pixmap file: %s"), filename);
return NULL;
}
pixbuf = gdk_pixbuf_new_from_file (pathname, &error);
if (!pixbuf)
{
fprintf (stderr, "Failed to load pixbuf file: %s: %s\n",
pathname, error->message);
g_error_free (error);
}
g_free (pathname);
return pixbuf;
}
/* This is used to set ATK action descriptions. */
void
glade_set_atk_action_description (AtkAction *action,
const gchar *action_name,
const gchar *description)
{
gint n_actions, i;
n_actions = atk_action_get_n_actions (action);
for (i = 0; i < n_actions; i++)
{
if (!strcmp (atk_action_get_name (action, i), action_name))
atk_action_set_description (action, i, description);
}
}

View file

@ -1,49 +0,0 @@
/*
* DO NOT EDIT THIS FILE - it is generated by Glade.
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <gnome.h>
#undef Q_
#ifdef ENABLE_NLS
# define Q_(String) g_strip_context ((String), gettext (String))
#else
# define Q_(String) g_strip_context ((String), (String))
#endif
/*
* Public Functions.
*/
/*
* This function returns a widget in a component created by Glade.
* Call it with the toplevel widget in the component (i.e. a window/dialog),
* or alternatively any widget in the component, and the name of the widget
* you want returned.
*/
GtkWidget* lookup_widget (GtkWidget *widget,
const gchar *widget_name);
/*
* Private Functions.
*/
/* This is used to create the pixmaps used in the interface. */
GtkWidget* create_pixmap (GtkWidget *widget,
const gchar *filename);
/* This is used to create the pixbufs used in the interface. */
GdkPixbuf* create_pixbuf (const gchar *filename);
/* This is used to set ATK action descriptions. */
void glade_set_atk_action_description (AtkAction *action,
const gchar *action_name,
const gchar *description);