(gtk) minor code cleanup
This commit is contained in:
parent
23f33e1bd1
commit
a4909bbd1b
19
gtk/main.c
19
gtk/main.c
|
@ -103,18 +103,18 @@ static const char * LICENSE =
|
||||||
|
|
||||||
struct cbdata
|
struct cbdata
|
||||||
{
|
{
|
||||||
|
gboolean minimized;
|
||||||
|
gboolean closing;
|
||||||
|
guint timer;
|
||||||
guint idle_hide_mainwindow_tag;
|
guint idle_hide_mainwindow_tag;
|
||||||
|
gpointer icon;
|
||||||
GtkWindow * wind;
|
GtkWindow * wind;
|
||||||
TrCore * core;
|
TrCore * core;
|
||||||
gpointer icon;
|
|
||||||
GtkWidget * msgwin;
|
GtkWidget * msgwin;
|
||||||
GtkWidget * prefs;
|
GtkWidget * prefs;
|
||||||
guint timer;
|
|
||||||
gboolean closing;
|
|
||||||
GList * errqueue;
|
GList * errqueue;
|
||||||
GHashTable * tor2details;
|
GHashTable * tor2details;
|
||||||
GHashTable * details2tor;
|
GHashTable * details2tor;
|
||||||
gboolean minimized;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#define CBDATA_PTR "callback-data-pointer"
|
#define CBDATA_PTR "callback-data-pointer"
|
||||||
|
@ -130,8 +130,6 @@ appsetup( TrWindow * wind, GList * args,
|
||||||
static void
|
static void
|
||||||
winsetup( struct cbdata * cbdata, TrWindow * wind );
|
winsetup( struct cbdata * cbdata, TrWindow * wind );
|
||||||
static void
|
static void
|
||||||
makeicon( struct cbdata * cbdata );
|
|
||||||
static void
|
|
||||||
wannaquit( void * vdata );
|
wannaquit( void * vdata );
|
||||||
static void
|
static void
|
||||||
setupdrag(GtkWidget *widget, struct cbdata *data);
|
setupdrag(GtkWidget *widget, struct cbdata *data);
|
||||||
|
@ -397,7 +395,7 @@ appsetup( TrWindow * wind, GList * args,
|
||||||
winsetup( cbdata, wind );
|
winsetup( cbdata, wind );
|
||||||
|
|
||||||
/* set up the system tray */
|
/* set up the system tray */
|
||||||
makeicon( cbdata );
|
cbdata->icon = tr_icon_new( cbdata->core );
|
||||||
|
|
||||||
/* start model update timer */
|
/* start model update timer */
|
||||||
cbdata->timer = g_timeout_add( UPDATE_INTERVAL, updatemodel, cbdata );
|
cbdata->timer = g_timeout_add( UPDATE_INTERVAL, updatemodel, cbdata );
|
||||||
|
@ -531,13 +529,6 @@ winsetup( struct cbdata * cbdata, TrWindow * wind )
|
||||||
setupdrag( GTK_WIDGET(wind), cbdata );
|
setupdrag( GTK_WIDGET(wind), cbdata );
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
makeicon( struct cbdata * cbdata )
|
|
||||||
{
|
|
||||||
if( cbdata->icon == NULL )
|
|
||||||
cbdata->icon = tr_icon_new( cbdata->core );
|
|
||||||
}
|
|
||||||
|
|
||||||
static gpointer
|
static gpointer
|
||||||
quitThreadFunc( gpointer gdata )
|
quitThreadFunc( gpointer gdata )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue