Skip to content

Commit

Permalink
remove MainWindow.accel
Browse files Browse the repository at this point in the history
  • Loading branch information
lidaobing committed Apr 20, 2024
1 parent 9b9ae9f commit 4fa2361
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
5 changes: 0 additions & 5 deletions src/iptux/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ MainWindow::MainWindow(Application* app, UiCoreThread& coreThread)
widset(NULL),
mdlset(NULL),
tmdllist(NULL),
accel(NULL),
timerid(0),
windowConfig(250, 510, "main_window"),
palPopupMenu(0) {
Expand Down Expand Up @@ -418,7 +417,6 @@ void MainWindow::InitSublayer() {
g_datalist_init(&widset);
g_datalist_init(&mdlset);

accel = gtk_accel_group_new();
CHECK_EQ(int(timerid), 0);
timerid = g_timeout_add(1000, GSourceFunc(UpdateUI), this);

Expand Down Expand Up @@ -455,8 +453,6 @@ void MainWindow::ClearSublayer() {
g_datalist_clear(&widset);
g_datalist_clear(&mdlset);
g_list_free(tmdllist);
if (accel)
g_object_unref(accel);
if (timerid > 0)
g_source_remove(timerid);
g_object_unref(builder);
Expand Down Expand Up @@ -489,7 +485,6 @@ GtkWidget* MainWindow::CreateMainWindow() {
windowConfig.GetHeight());
gtk_window_set_geometry_hints(GTK_WINDOW(window), window, &geometry, hints);
gtk_window_set_default_icon_name("iptux");
gtk_window_add_accel_group(GTK_WINDOW(window), accel);

g_signal_connect(window, "configure-event", G_CALLBACK(MWinConfigureEvent),
this);
Expand Down
5 changes: 2 additions & 3 deletions src/iptux/MainWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,8 @@ class MainWindow : public sigc::trackable {
GData* mdlset; // 数据model集
PalTreeModel* regular_model = 0;

GList* tmdllist; // model链表,用于构建model循环结构
GtkAccelGroup* accel; // 快捷键集组
guint timerid; // UI更新定时器ID
GList* tmdllist; // model链表,用于构建model循环结构
guint timerid; // UI更新定时器ID
WindowConfig windowConfig;
GtkBuilder* builder;
GtkMenu* palPopupMenu;
Expand Down

0 comments on commit 4fa2361

Please sign in to comment.