1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-01-31 03:12:44 +00:00

(trunk, gtk) remove the pointless TrWindow typedef

This commit is contained in:
Jordan Lee 2012-07-14 22:41:33 +00:00
parent 9b98c0fc2e
commit dfbfdbc81b
3 changed files with 13 additions and 15 deletions

View file

@ -476,7 +476,7 @@ signal_handler( int sig )
*****
****/
static void app_setup( TrWindow * wind, struct cbdata * cbdata );
static void app_setup( GtkWindow * wind, struct cbdata * cbdata );
static void
on_startup( GApplication * application, gpointer user_data )
@ -669,12 +669,12 @@ on_core_busy( TrCore * core UNUSED, gboolean busy, struct cbdata * c )
static void on_core_error( TrCore *, guint, const char *, struct cbdata * );
static void on_add_torrent( TrCore *, tr_ctor *, gpointer );
static void on_prefs_changed( TrCore * core, const char * key, gpointer );
static void main_window_setup( struct cbdata * cbdata, TrWindow * wind );
static void main_window_setup( struct cbdata * cbdata, GtkWindow * wind );
static gboolean update_model_loop( gpointer gdata );
static gboolean update_model_once( gpointer gdata );
static void
app_setup( TrWindow * wind, struct cbdata * cbdata )
app_setup( GtkWindow * wind, struct cbdata * cbdata )
{
if( cbdata->is_iconified )
gtr_pref_flag_set( PREF_KEY_SHOW_TRAY_ICON, TRUE );
@ -834,14 +834,14 @@ on_drag_data_received( GtkWidget * widget UNUSED,
}
static void
main_window_setup( struct cbdata * cbdata, TrWindow * wind )
main_window_setup( struct cbdata * cbdata, GtkWindow * wind )
{
GtkWidget * w;
GtkTreeModel * model;
GtkTreeSelection * sel;
g_assert( NULL == cbdata->wind );
cbdata->wind = GTK_WINDOW( wind );
cbdata->wind = wind;
cbdata->sel = sel = GTK_TREE_SELECTION( gtr_window_get_selection( cbdata->wind ) );
g_signal_connect( sel, "changed", G_CALLBACK( on_selection_changed ), cbdata );

View file

@ -76,7 +76,7 @@ get_private_data_key( void )
}
static PrivateData*
get_private_data( TrWindow * w )
get_private_data( GtkWindow * w )
{
return g_object_get_qdata ( G_OBJECT( w ), get_private_data_key( ) );
}
@ -215,7 +215,7 @@ prefsChanged( TrCore * core UNUSED,
}
else if( !strcmp( key, PREF_KEY_STATUSBAR_STATS ) )
{
gtr_window_refresh( (TrWindow*)wind );
gtr_window_refresh( wind );
}
else if( !strcmp( key, TR_PREFS_KEY_ALT_SPEED_ENABLED ) ||
!strcmp( key, TR_PREFS_KEY_ALT_SPEED_UP_KBps ) ||
@ -859,7 +859,7 @@ updateSpeeds( PrivateData * p )
}
void
gtr_window_refresh( TrWindow * self )
gtr_window_refresh( GtkWindow * self )
{
PrivateData * p = get_private_data( self );
@ -872,13 +872,13 @@ gtr_window_refresh( TrWindow * self )
}
GtkTreeSelection*
gtr_window_get_selection( TrWindow * w )
gtr_window_get_selection( GtkWindow * w )
{
return get_private_data( w )->selection;
}
void
gtr_window_set_busy( TrWindow * w, gboolean isBusy )
gtr_window_set_busy( GtkWindow * w, gboolean isBusy )
{
if( w && gtk_widget_get_realized( GTK_WIDGET( w ) ) )
{

View file

@ -28,11 +28,9 @@
#include <gtk/gtk.h>
#include "tr-core.h"
typedef GtkWindow TrWindow;
GtkWidget * gtr_window_new( GtkUIManager * uim, TrCore * core );
GtkTreeSelection * gtr_window_get_selection( TrWindow * );
void gtr_window_set_busy( TrWindow *, gboolean isBusy );
void gtr_window_refresh( TrWindow * );
GtkTreeSelection * gtr_window_get_selection( GtkWindow * );
void gtr_window_set_busy( GtkWindow *, gboolean isBusy );
void gtr_window_refresh( GtkWindow * );
#endif /* GTR_WINDOW_H */