Ignore:
Timestamp:
Jan 25, 2006, 4:35:17 PM (16 years ago)
Author:
joshe
Message:

Many small usability improvements.
Remove an ugly wart in the conf api.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/oneport/gtk/main.c

    r24 r49  
    11/*
    2   Copyright (c) 2005 Joshua Elsasser. All rights reserved.
     2  Copyright (c) 2005-2006 Joshua Elsasser. All rights reserved.
    33   
    44  Redistribution and use in source and binary forms, with or without
     
    171171  gtk_init(&argc, &argv);
    172172
     173  g_set_application_name("Transmission");
     174
    173175  tr = tr_init();
    174176
     
    273275
    274276  gtk_container_add(GTK_CONTAINER(wind), vbox);
     277  gtk_window_set_title(data->wind, g_get_application_name());
    275278  g_signal_connect(G_OBJECT(wind), "delete_event", G_CALLBACK(winclose), data);
    276279
     
    289292  gtk_widget_realize(wind);
    290293
    291   gtk_widget_size_request(wind, &req);
     294  gtk_widget_size_request(list, &req);
    292295  height = req.height;
    293296  gtk_widget_size_request(scroll, &req);
    294297  height -= req.height;
    295   gtk_widget_size_request(list, &req);
     298  gtk_widget_size_request(wind, &req);
    296299  height += req.height;
    297   gtk_window_set_default_size(GTK_WINDOW(wind), -1, MAX(height, 100));
     300  gtk_window_set_default_size(GTK_WINDOW(wind), -1, (height > req.width ?
     301     MIN(height, req.width * 8 / 5) : MAX(height, req.width * 5 / 8)));
    298302
    299303  gtk_widget_show(wind);
Note: See TracChangeset for help on using the changeset viewer.