| Yattm - unified GTK instant-messaging client | ![]() |
| [Generated for version 0.2-17 - Mon Jan 6 19:01:23 GMT+1 2003] |
#include "intl.h"#include <string.h>#include <time.h>#include <stdio.h>#include <stdlib.h>#include <gtk/gtk.h>#include <gdk/gdkkeysyms.h>#include <ctype.h>#include "util.h"#include "gtk_eb_html.h"#include "pixmaps/cancel.xpm"#include "info_window.h"#include "dialog.h"Include dependency graph for info_window.c:

Go to the source code of this file.
Functions | |
| void | iw_destroy_event (GtkWidget *widget, gpointer data) |
| void | iw_close_win (GtkWidget *widget, gpointer data) |
| info_window * | eb_info_window_new (eb_local_account *local, struct account *remote) |
| void | clear_info_window (info_window *iw) |
| void | eb_info_window_add_info (eb_account *remote_account, gchar *text, gint ignore_bg, gint ignore_fg, gint ignore_font) |
|
|
Definition at line 145 of file info_window.c. References _info_window::info.
00146 {
00147 gtk_editable_delete_text(GTK_EDITABLE(iw->info), 0, -1);
00148 }
|
|
||||||||||||||||||||||||
|
Definition at line 151 of file info_window.c. References EXT_GTK_TEXT, gtk_eb_html_add(), _info_window::info, and account::infowindow.
00151 {
00152 // struct contact * remote_contact = remote_account->account_contact;
00153
00154 if(remote_account->infowindow)
00155 {
00156 gtk_eb_html_add(EXT_GTK_TEXT(remote_account->infowindow->info), text,ignore_bg,ignore_fg,ignore_font);
00157 }
00158 }
|
|
||||||||||||
|
Definition at line 70 of file info_window.c. References _, eb_icon(), EXT_GTK_TEXT, ext_gtk_text_new(), gtk_eb_html_init(), account::handle, _info_window::info, _info_window::info_data, _info_window::info_type, iw_close_win(), iw_destroy_event(), _info_window::local_user, _info_window::remote_account, _info_window::scrollwindow, and _info_window::window.
00071 {
00072 GtkWidget *vbox;
00073 GtkWidget *hbox;
00074 GtkWidget *buttonbox;
00075 GtkWidget *label;
00076 GtkWidget *ok_button;
00077 GtkWidget *iconwid;
00078 GdkPixmap *icon;
00079 GdkBitmap *mask;
00080 info_window * iw;
00081
00082 vbox = gtk_vbox_new(FALSE,0);
00083 hbox = gtk_hbox_new(FALSE,0);
00084 buttonbox = gtk_hbox_new(FALSE,0);
00085
00086 iw = malloc(sizeof(info_window));
00087 iw->info_type = -1;
00088 iw->info_data = NULL;
00089 iw->remote_account = remote;
00090 iw->local_user = local;
00091
00092 iw->window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
00093 gtk_window_set_position(GTK_WINDOW(iw->window), GTK_WIN_POS_MOUSE);
00094 gtk_window_set_policy(GTK_WINDOW(iw->window), TRUE, TRUE, TRUE);
00095 gtk_widget_realize(iw->window);
00096
00097 iw->info = ext_gtk_text_new(NULL,NULL);
00098 gtk_eb_html_init(EXT_GTK_TEXT(iw->info));
00099 iw->scrollwindow = gtk_scrolled_window_new(NULL,NULL);
00100
00101 gtk_widget_realize(iw->window);
00102 gtk_window_set_title(GTK_WINDOW(iw->window), remote->handle);
00103 eb_icon(iw->window->window);
00104
00105 gtk_widget_set_usize(iw->scrollwindow, 375, 150);
00106 gtk_container_add(GTK_CONTAINER(iw->scrollwindow),iw->info);
00107 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(iw->scrollwindow),GTK_POLICY_NEVER, GTK_POLICY_ALWAYS);
00108
00109 gtk_box_pack_start(GTK_BOX(vbox), iw->scrollwindow, TRUE,TRUE, 5);
00110 gtk_widget_show(iw->scrollwindow);
00111
00112 gtk_container_set_border_width(GTK_CONTAINER(iw->window), 5);
00113
00114 gtk_signal_connect (GTK_OBJECT (iw->window), "destroy", GTK_SIGNAL_FUNC (iw_destroy_event), iw);
00115
00116 icon = gdk_pixmap_create_from_xpm_d(iw->window->window, &mask, NULL, cancel_xpm);
00117 iconwid = gtk_pixmap_new(icon, mask);
00118 gtk_widget_show(iconwid);
00119
00120 ok_button = gtk_button_new ();
00121 gtk_signal_connect (GTK_OBJECT (ok_button), "clicked", GTK_SIGNAL_FUNC (iw_close_win), iw);
00122
00123 gtk_box_pack_start (GTK_BOX (buttonbox), iconwid,TRUE,TRUE,0);
00124 label = gtk_label_new(_("Close"));
00125 gtk_box_pack_start (GTK_BOX (buttonbox), label,TRUE,TRUE,5);
00126 gtk_widget_show(buttonbox);
00127 gtk_container_add(GTK_CONTAINER(ok_button), buttonbox);
00128
00129 gtk_box_pack_start(GTK_BOX(hbox), ok_button, TRUE,FALSE, 0);
00130 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE,FALSE, 5);
00131
00132 gtk_container_add(GTK_CONTAINER(iw->window), vbox);
00133 gtk_widget_show(iw->info);
00134 gtk_widget_show(label);
00135 gtk_widget_show(ok_button);
00136 gtk_widget_show(hbox);
00137
00138 gtk_widget_show(vbox);
00139 gtk_widget_show(iw->window);
00140
00141 return iw;
00142 }
|
|
||||||||||||
|
Definition at line 62 of file info_window.c. References _info_window::window. Referenced by eb_info_window_new().
00063 {
00064 info_window * iw = (info_window *)data;
00065 gtk_widget_destroy(iw->window);
00066 }
|
|
||||||||||||
|
Definition at line 46 of file info_window.c. References _info_window::cleanup, _info_window::info, _info_window::info_data, account::infowindow, _info_window::remote_account, and _info_window::window. Referenced by eb_info_window_new().
00047 {
00048 info_window * iw = (info_window *)data;
00049
00050 if(iw->info_data != NULL) {
00051 iw->cleanup(iw);
00052 free(iw->info_data);
00053 iw->info_data = NULL;
00054 }
00055 iw->remote_account->infowindow = NULL;
00056 gtk_widget_destroy(iw->window);
00057 iw->window=NULL;
00058 iw->info = NULL;
00059 g_free(iw);
00060 }
|