]> git.tdb.fi Git - ext/subsurface.git/commitdiff
Merge git://github.com/sirowain/subsurface
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 20 Sep 2011 17:12:24 +0000 (10:12 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 20 Sep 2011 17:12:24 +0000 (10:12 -0700)
* git://github.com/sirowain/subsurface:
  Fix Segmentation fault when trying to print an empty plot.
  Provide an icon for subsurface.
  Added a comment about libusb dependency in Makefile.

1  2 
main.c

diff --combined main.c
index d125169e2898150bdddc46dd16a21a039ee0ee13,6e6bbd0842fd806e574881a1e2a804089c07f490..dfd1b1447e22c5dd2437a351e9dcdd24876017d3
--- 1/main.c
--- 2/main.c
+++ b/main.c
@@@ -14,6 -14,7 +14,6 @@@ GtkWidget *main_vbox
  GtkWidget *error_info_bar;
  GtkWidget *error_label;
  int        error_count;
 -struct DiveList   dive_list;
  
  GConfClient *gconf;
  struct units output_units;
@@@ -97,7 -98,7 +97,7 @@@ void update_dive(struct dive *new_dive
        if (old_dive) {
                flush_dive_info_changes(old_dive);
                flush_dive_equipment_changes(old_dive);
 -              flush_divelist(&dive_list, old_dive);
 +              flush_divelist(old_dive);
        }
        if (new_dive) {
                show_dive_info(new_dive);
@@@ -189,7 -190,7 +189,7 @@@ static void file_open(GtkWidget *w, gpo
                }
                g_slist_free(filenames);
                report_dives();
 -              dive_list_update_dives(dive_list);
 +              dive_list_update_dives();
        }
        gtk_widget_destroy(dialog);
  }
@@@ -315,7 -316,7 +315,7 @@@ static void unit_dialog(GtkWidget *w, g
                /* Make sure to flush any modified old dive data with old units */
                update_dive(NULL);
                output_units = menu_units;
 -              update_dive_list_units(&dive_list);
 +              update_dive_list_units();
                repaint_dive();
                gconf_client_set_bool(gconf, GCONF_NAME(feet), output_units.length == FEET, NULL);
                gconf_client_set_bool(gconf, GCONF_NAME(psi), output_units.pressure == PSI, NULL);
@@@ -364,8 -365,7 +364,8 @@@ static void renumber_dialog(GtkWidget *
  }
  
  static GtkActionEntry menu_items[] = {
 -      { "FileMenuAction", GTK_STOCK_FILE, "Log", NULL, NULL, NULL},
 +      { "FileMenuAction", GTK_STOCK_FILE, "File", NULL, NULL, NULL},
 +      { "LogMenuAction",  GTK_STOCK_FILE, "Log", NULL, NULL, NULL},
        { "OpenFile",       GTK_STOCK_OPEN, NULL,   "<control>O", NULL, G_CALLBACK(file_open) },
        { "SaveFile",       GTK_STOCK_SAVE, NULL,   "<control>S", NULL, G_CALLBACK(file_save) },
        { "Print",          GTK_STOCK_PRINT, NULL,  "<control>P", NULL, G_CALLBACK(do_print) },
@@@ -386,11 -386,10 +386,11 @@@ static const gchar* ui_string = " 
                                <separator name=\"Separator1\"/> \
                                <menuitem name=\"Import\" action=\"Import\" /> \
                                <separator name=\"Separator2\"/> \
 +                              <menuitem name=\"Quit\" action=\"Quit\" /> \
 +                      </menu> \
 +                      <menu name=\"LogMenu\" action=\"LogMenuAction\"> \
                                <menuitem name=\"Units\" action=\"Units\" /> \
                                <menuitem name=\"Renumber\" action=\"Renumber\" /> \
 -                              <separator name=\"Separator3\"/> \
 -                              <menuitem name=\"Quit\" action=\"Quit\" /> \
                        </menu> \
                </menubar> \
        </ui> \
@@@ -425,7 -424,6 +425,7 @@@ int main(int argc, char **argv
        GtkWidget *info_box;
        GtkWidget *notebook;
        GtkWidget *dive_info;
 +      GtkWidget *dive_list;
        GtkWidget *equipment;
        GtkWidget *menubar;
        GtkWidget *vbox;
  
        error_info_bar = NULL;
        win = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+       gtk_window_set_icon_from_file(GTK_WINDOW(win), "icon.svg", NULL);
        g_signal_connect(G_OBJECT(win), "destroy", G_CALLBACK(on_destroy), NULL);
        main_window = win;
  
  
        /* Create the actual divelist */
        dive_list = dive_list_create();
 -      gtk_paned_add2(GTK_PANED(paned), dive_list.container_widget);
 +      gtk_paned_add2(GTK_PANED(paned), dive_list);
  
        /* VBox for dive info, and tabs */
        info_box = gtk_vbox_new(FALSE, 6);
        }
  
        report_dives();
 -      dive_list_update_dives(dive_list);
 +      dive_list_update_dives();
  
        gtk_main();
        return 0;