Changeset 13391


Ignore:
Timestamp:
Jul 14, 2012, 10:44:41 PM (9 years ago)
Author:
jordan
Message:

(trunk, gtk) use GtkApplication? and GtkApplicationWindow?

Location:
trunk/gtk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/gtk/main.c

    r13390 r13391  
    513513
    514514    /* create main window now to be a parent to any error dialogs */
    515     win = GTK_WINDOW( gtr_window_new( ui_manager, cbdata->core ) );
     515    win = GTK_WINDOW( gtr_window_new( GTK_APPLICATION( application ), ui_manager, cbdata->core ) );
    516516    g_signal_connect( win, "size-allocate", G_CALLBACK( on_main_window_size_allocated ), cbdata );
    517517    g_application_hold( application );
     
    588588    struct stat sb;
    589589    char * application_id;
    590     GApplication * app;
     590    GtkApplication * app;
    591591    GOptionContext * option_context;
    592592    bool show_version = false;
     
    651651    stat( cbdata.config_dir, &sb );
    652652    application_id = g_strdup_printf( "com.transmissionbt.transmission_%lu_%lu", (unsigned long)sb.st_dev, (unsigned long)sb.st_ino );
    653     app = g_application_new( application_id, G_APPLICATION_HANDLES_OPEN );
     653    app = gtk_application_new( application_id, G_APPLICATION_HANDLES_OPEN );
    654654    g_signal_connect( app, "open", G_CALLBACK(on_open), &cbdata );
    655655    g_signal_connect( app, "startup", G_CALLBACK(on_startup), &cbdata );
    656656    g_signal_connect( app, "activate", G_CALLBACK(on_activate), &cbdata );
    657     ret = g_application_run (app, argc, argv);
     657    ret = g_application_run( G_APPLICATION( app ), argc, argv);
    658658    g_object_unref( app );
    659659    g_free( application_id );
  • trunk/gtk/tr-window.c

    r13390 r13391  
    581581
    582582GtkWidget *
    583 gtr_window_new( GtkUIManager * ui_mgr, TrCore * core )
     583gtr_window_new( GtkApplication * app, GtkUIManager * ui_mgr, TrCore * core )
    584584{
    585585    int           i, n;
     
    594594
    595595    /* make the window */
    596     self = gtk_window_new ( GTK_WINDOW_TOPLEVEL );
     596    self = gtk_application_window_new ( app );
    597597    g_object_set_qdata_full( G_OBJECT(self), get_private_data_key( ), p, privateFree );
    598598    win = GTK_WINDOW( self );
  • trunk/gtk/tr-window.h

    r13390 r13391  
    2929#include "tr-core.h"
    3030
    31 GtkWidget        * gtr_window_new( GtkUIManager * uim, TrCore * core );
     31GtkWidget        * gtr_window_new( GtkApplication * app, GtkUIManager * uim, TrCore * core );
    3232GtkTreeSelection * gtr_window_get_selection( GtkWindow * );
    3333void               gtr_window_set_busy( GtkWindow *, gboolean isBusy );
Note: See TracChangeset for help on using the changeset viewer.