Changeset 2182 for trunk/jons-gtk-gui

Show
Ignore:
Timestamp:
07/27/00 17:53:28 (8 years ago)
Author:
emojon
Message:

Fixed a few bugs.

Added a stats window, it shows licq's uptime and all the events for today and
totals if stats are saved.

Location:
trunk/jons-gtk-gui/src
Files:
1 added
6 modified

Legend:

Unmodified
Added
Removed
  • trunk/jons-gtk-gui/src/extras.cpp

    r2167 r2182  
    105105    /* Create the dialog */ 
    106106    dialog = gtk_dialog_new(); 
     107    gtk_container_set_border_width(GTK_CONTAINER(dialog), 3); 
    107108 
    108109    /* The label */ 
  • trunk/jons-gtk-gui/src/licq_gtk.h

    r2176 r2182  
    637637/* Functions in plugin_window.cpp */ 
    638638extern void create_plugin_window(); 
    639 extern void plugin_close_callback(GtkWidget *, gpointer); 
     639extern gboolean plugin_close_callback(GtkWidget *, gpointer); 
    640640extern void plugin_enable_callback(GtkWidget *, gpointer); 
    641641extern void plugin_disable_callback(GtkWidget *, gpointer); 
     
    686686extern void ok_user_security(GtkWidget *, gpointer); 
    687687extern void remove_user_security(GtkWidget *, GdkEventButton *, gpointer); 
     688 
     689 
     690/* Functions in stats.cpp */ 
     691extern void menu_daemon_stats(); 
     692extern void stats_ok_callback(GtkWidget *, gpointer); 
     693extern void stats_reset_callback(GtkWidget *, gpointer); 
    688694 
    689695 
  • trunk/jons-gtk-gui/src/Makefile.am

    r2176 r2182  
    3434                search_user_window.cpp \ 
    3535                security_window.cpp \ 
     36                stats_window.cpp \ 
    3637                status.cpp \ 
    3738                system_message.cpp \ 
  • trunk/jons-gtk-gui/src/menu.cpp

    r2176 r2182  
    160160    menu_separator(menu); 
    161161 
     162    item = menu_new_item(menu, "Daemon Stats", 
     163                GTK_SIGNAL_FUNC(menu_daemon_stats)); 
     164 
    162165    item = menu_new_item(menu, "About", 
    163166                GTK_SIGNAL_FUNC(create_about_window)); 
  • trunk/jons-gtk-gui/src/pipe.cpp

    r2128 r2182  
    7979        { 
    8080            ICQUser *u = gUserManager.FetchUser(sig->Uin(), LOCK_R); 
     81            if(u == NULL) 
     82            { 
     83                gUserManager.DropUser(u); 
     84                return; 
     85            } 
    8186            CUserEvent *ue = u->EventPeekLast(); 
    8287            gUserManager.DropUser(u); 
  • trunk/jons-gtk-gui/src/plugin_window.cpp

    r2176 r2182  
    1  
     1/* 
     2 * Licq GTK GUI Plugin 
     3 * 
     4 * Copyright (C) 2000, Jon Keating <jon@licq.org> 
     5 * 
     6 * This program is free software; you can redistribute it and/or 
     7 * modify it under the terms of the GNU General Public License 
     8 * as published by the Free Software Foundation; either version 2 
     9 * of the License, or (at your option) any later version. 
     10 * 
     11 * This program is distributed in the hope that it will be useful, 
     12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
     13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
     14 * GNU General Public License for more details. 
     15 * 
     16 * You should have received a copy of the GNU General Public License 
     17 * along with this program; if not, write to the Free Software 
     18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. 
     19 */ 
    220 
    321#include "licq_gtk.h" 
     
    3654    GtkWidget *scroll_win = gtk_scrolled_window_new(0, 0); 
    3755    gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scroll_win), 
    38         GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); 
     56        GTK_POLICY_ALWAYS, GTK_POLICY_AUTOMATIC); 
    3957 
    4058    // The loaded clist 
     
    4765    gtk_clist_set_column_width(GTK_CLIST(pw->l_clist), 3, 50); 
    4866    gtk_clist_set_column_width(GTK_CLIST(pw->l_clist), 4, 90); 
     67    gtk_widget_set_usize(pw->l_clist, 295, 100); 
    4968    gtk_container_add(GTK_CONTAINER(scroll_win), pw->l_clist); 
    50     gtk_widget_set_usize(scroll_win, 335, 100); 
    5169    gtk_box_pack_start(GTK_BOX(l_box), scroll_win, true, true, 5); 
    5270 
     
    7391 
    7492    // Pack the buttons into an hbox then pack the hbox into the vbox 
    75     GtkWidget *buttons_box = gtk_hbox_new(false, 0); 
     93    GtkWidget *buttons_box = gtk_hbox_new(true, 0); 
    7694    gtk_box_pack_start(GTK_BOX(buttons_box), enable, true, true, 5); 
    7795    gtk_box_pack_start(GTK_BOX(buttons_box), disable, true, true, 5); 
     
    133151} 
    134152 
    135 void plugin_close_callback(GtkWidget *widget, gpointer data) 
     153gboolean plugin_close_callback(GtkWidget *widget, gpointer data) 
    136154{ 
    137155    gtk_widget_destroy(pw->window); 
    138156    g_free(pw); 
    139157    pw = 0; 
     158    return true; 
    140159} 
    141160 
     
    280299        gtk_clist_append(GTK_CLIST(pw->l_clist), text); 
    281300 
    282         g_free(text[0]); 
     301        if(text[0]) 
     302            g_free(text[0]); 
    283303    } 
    284304