Skip to content
This repository has been archived by the owner on Jul 7, 2023. It is now read-only.

修正个GTK3 crash 问题, 但直接改了源码 #83

Merged
merged 3 commits into from
Feb 20, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/gui/chatwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,5 @@ GType qq_chatwindow_get_type();
//
void qq_chatwindow_add_recv_message(GtkWidget *widget, QQRecvMsg *msg);
void qq_chatwindow_add_send_message(GtkWidget *widget, QQSendMsg *msg);
#endif

#endif /* __GTKQQ_CHATWINDOW_H */
13 changes: 5 additions & 8 deletions src/gui/facepopupwindow.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
#include <facepopupwindow.h>
#include <gqqconfig.h>

extern QQInfo *info;
extern GQQConfig *cfg;

static void qq_face_popup_window_init(QQFacePopupWindow *win);
static void qq_face_popup_windowclass_init(QQFacePopupWindowClass *klass);

Expand All @@ -22,8 +19,8 @@ static gint face_transfer_table[] = {14, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11
, 61, 89, 90, 31, 94, 65, 35, 66, 67, 68
, 69, 70, 15, 16, 17, 18, 19, 28, 30, 40
, 41, 43, 44, 48, 49};
typedef struct{
}QQFacePopupWindowPriv;
typedef struct {
} QQFacePopupWindowPriv;

GType qq_face_popup_window_get_type()
{
Expand Down Expand Up @@ -51,8 +48,7 @@ GType qq_face_popup_window_get_type()

GtkWidget* qq_face_popup_window_new()
{
return GTK_WIDGET(g_object_new(qq_face_popup_window_get_type()
, "type", GTK_WINDOW_TOPLEVEL, NULL));
return GTK_WIDGET(g_object_new(qq_face_popup_window_get_type(), NULL));
}
//
// Focus out event handler
Expand Down Expand Up @@ -115,7 +111,8 @@ static void qq_face_popup_window_init(QQFacePopupWindow *win)
gtk_window_set_default_size(GTK_WINDOW(win) , 450 , 250);
gtk_window_set_skip_taskbar_hint(GTK_WINDOW(win), TRUE);

g_signal_connect(win, "focus-out-event",

g_signal_connect(G_OBJECT(win), "focus-out-event",
G_CALLBACK(qq_face_popup_window_focus_out), win);

GtkWidget *table, *img, *eventbox, *frame;
Expand Down
4 changes: 2 additions & 2 deletions src/gui/facepopupwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ typedef struct __QQFacePopupWindow QQFacePopupWindow;
typedef struct __QQFacePopupWindowClass QQFacePopupWindowClass;

struct __QQFacePopupWindow{
GtkTextView parent;
GtkWindow parent;
};

struct __QQFacePopupWindowClass{
GtkTextViewClass parent;
GtkWindowClass parent;

void (*face_clicked_default_handler)(gpointer instance, gint face,
gpointer usrdata);
Expand Down
1 change: 1 addition & 0 deletions src/gui/statusbutton.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <statusbutton.h>
#include <config.h>

static const gchar *status_label[] = {"online", "hidden", "away", "offline"
, "callme", "busy", "silent", NULL};
Expand Down