Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merged changes necessary for windows functionality back into master and

added proper sauerbraten home directory searching.
  • Loading branch information...
commit b0707bb402755d0f8b5c29510d99c9cbae00032a 1 parent 41311f2
Morgan Borman authored

Showing 32 changed files with 213 additions and 63 deletions. Show diff stats Hide diff stats

  1. BIN  src/Icons/200px-Gnome-accessories-text-editor.png
  2. BIN  src/Icons/200px-Gnome-dialog-information.png
  3. BIN  src/Icons/200px-Gnome-edit-delete.png
  4. +11 1 src/Makefile
  5. +64 15 src/auth_model.cpp
  6. +52 10 src/authmanager.glade
  7. +1 1  src/cube2crypto.cpp
  8. +11 11 src/event_handlers.cpp
  9. +74 25 src/main.cpp
  10. BIN  src/w32dist/Icons/200px-Gnome-accessories-text-editor.png
  11. BIN  src/w32dist/Icons/200px-Gnome-dialog-information.png
  12. BIN  src/w32dist/Icons/200px-Gnome-edit-delete.png
  13. BIN  src/w32dist/freetype6.dll
  14. BIN  src/w32dist/intl.dll
  15. BIN  src/w32dist/libatk-1.0-0.dll
  16. BIN  src/w32dist/libcairo-2.dll
  17. BIN  src/w32dist/libexpat-1.dll
  18. BIN  src/w32dist/libfontconfig-1.dll
  19. BIN  src/w32dist/libgcc_s_dw2-1.dll
  20. BIN  src/w32dist/libgdk-win32-2.0-0.dll
  21. BIN  src/w32dist/libgdk_pixbuf-2.0-0.dll
  22. BIN  src/w32dist/libgio-2.0-0.dll
  23. BIN  src/w32dist/libglib-2.0-0.dll
  24. BIN  src/w32dist/libgmodule-2.0-0.dll
  25. BIN  src/w32dist/libgobject-2.0-0.dll
  26. BIN  src/w32dist/libgthread-2.0-0.dll
  27. BIN  src/w32dist/libgtk-win32-2.0-0.dll
  28. BIN  src/w32dist/libpangocairo-1.0-0.dll
  29. BIN  src/w32dist/libpangoft2-1.0-0.dll
  30. BIN  src/w32dist/libpangowin32-1.0-0.dll
  31. BIN  src/w32dist/libpng14-14.dll
  32. BIN  src/w32dist/libstdc++-6.dll
BIN  src/Icons/200px-Gnome-accessories-text-editor.png
BIN  src/Icons/200px-Gnome-dialog-information.png
BIN  src/Icons/200px-Gnome-edit-delete.png
12 src/Makefile
... ... @@ -1,8 +1,18 @@
1   -authmanager: main.cpp filebuffer.o cube2crypto.o
  1 +authmanager: main.o filebuffer.o cube2crypto.o
2 2 g++ -Wall -g -o $@ $^ `pkg-config --cflags --libs --static gtk+-2.0` -export-dynamic
3 3
  4 +main.o: main.cpp filebuffer.h auth_model.cpp event_handlers.cpp
  5 + g++ -c -Wall -g -o $@ $< `pkg-config --cflags --libs --static gtk+-2.0` -export-dynamic
  6 +
4 7 filebuffer.o: filebuffer.cpp filebuffer.h
5 8 g++ -c -Wall -g -o $@ $<
6 9
7 10 cube2crypto.o: cube2crypto.cpp shared/crypto.cpp shared/tools.h
8 11 g++ -c -Wall -g -o $@ $<
  12 +
  13 +w32dist: authmanager
  14 + cp authmanager w32dist/
  15 + cp -r Icons w32dist/
  16 +
  17 +clean:
  18 + rm -rf *.o authmanager
79 src/auth_model.cpp
@@ -30,36 +30,85 @@ void read_config_buffer(AuthManager *authManager, FileBuffer *fb)
30 30 }
31 31 }
32 32
33   -void load_auth_information(AuthManager *authManager)
  33 +bool load_auth_information(AuthManager *authManager)
34 34 {
35   - char autoexec_filename[512];
36   - char authcfg_filename[512];
  35 + const char **rel_prefix;
37 36
38   - #if defined __GNUC__
39   - const char *homeDir = getenv("HOME");
40   - #elif defined _WIN32
41   - const char homeDir[MAX_PATH];
42   - const DWORD ret = GetEnvironmentVariableA("USERPROFILE",buff,MAX_PATH);
  37 + int sauer_home_length;
  38 + char *sauer_home;
  39 +
  40 + char *autoexec_filename;
  41 + char *authcfg_filename;
  42 +
  43 + #if defined _WIN32 || defined _WIN64
  44 + char homeDir[MAX_PATH];
  45 + char progDir[MAX_PATH];
  46 + int ret = GetEnvironmentVariableA("USERPROFILE", homeDir, MAX_PATH);
43 47 if (ret==0 || ret>MAX_PATH)
44   - homeDir = 0;
  48 + return false;
  49 + ret = SHGetFolderPath(NULL, CSIDL_PROGRAM_FILES, NULL, 0, progDir);
  50 + if (ret==0 || ret>MAX_PATH)
  51 + return false;
  52 + #else
  53 + const char *homeDir = getenv("HOME");
  54 + const char *progDir = "";
45 55 #endif
46 56
47   - if(!homeDir) return;
48   -
49   - printf("Sauerbraten home dir = "SAUERBRATEN_HOME_PATH"\n", homeDir);
  57 + if(!homeDir || !progDir) return false;
50 58
51   - snprintf(autoexec_filename, 512, SAUERBRATEN_HOME_PATH"autoexec.cfg", homeDir);
52   - snprintf(authcfg_filename, 512, SAUERBRATEN_HOME_PATH"auth.cfg", homeDir);
  59 + for(unsigned int lx = 0; lx < NUMLOCATIONS; lx++) {
  60 + //home_locations[lx].relative_to
  61 + //home_locations[lx].path
  62 +
  63 + if(home_locations[lx].relative_to == PROGDIR)
  64 + rel_prefix = &progDir;
  65 + else if(home_locations[lx].relative_to == HOMEDIR)
  66 + rel_prefix = &homeDir;
  67 + else
  68 + return false;
  69 +
  70 + sauer_home_length = strlen(*rel_prefix) + strlen(FS_DELIM) + strlen(home_locations[lx].path) + 1;
  71 +
  72 +
  73 +
  74 + sauer_home = (char *)malloc(sizeof(char)*(sauer_home_length));
53 75
54   - readfb(&authManager->auth_cfg_buffer, authcfg_filename);
  76 + snprintf(sauer_home, sauer_home_length, "%s%s%s", *rel_prefix, FS_DELIM, home_locations[lx].path);
  77 +
  78 + printf("Checking for Sauerbraten home dir = '%s'\n", sauer_home);
  79 +
  80 + if(directory_exists(sauer_home)) break;
  81 +
  82 + free(sauer_home);
  83 + sauer_home = NULL;
  84 + }
  85 +
  86 + if(!sauer_home) return false;
  87 +
  88 + printf("Sauerbraten home dir = %s\n", sauer_home);
  89 +
  90 + int autoexec_filename_length = sauer_home_length + strlen(FS_DELIM) + strlen("autoexec.cfg") + 1;
  91 + int authcfg_filename_length = sauer_home_length + strlen(FS_DELIM) + strlen("auth.cfg") + 1;
  92 +
  93 + autoexec_filename = (char *)malloc(sizeof(char)*(autoexec_filename_length));
  94 + authcfg_filename = (char *)malloc(sizeof(char)*(authcfg_filename_length));
  95 +
  96 + snprintf(autoexec_filename, autoexec_filename_length, "%s%sautoexec.cfg", sauer_home, FS_DELIM);
  97 + snprintf(authcfg_filename, authcfg_filename_length, "%s%sauth.cfg", sauer_home, FS_DELIM);
  98 +
  99 + readfb(&authManager->auth_cfg_buffer, authcfg_filename);
55 100 readfb(&authManager->autoexec_cfg_buffer, autoexec_filename);
56 101
  102 + free(autoexec_filename);
  103 + free(authcfg_filename);
  104 +
57 105 printf("finished reading files.\n");
58 106
59 107 read_config_buffer(authManager, &authManager->auth_cfg_buffer);
60 108 read_config_buffer(authManager, &authManager->autoexec_cfg_buffer);
61 109
62 110 printf("finished reading auth keys.\n");
  111 + return true;
63 112 }
64 113
65 114 void write_row(AuthManager *authManager, GtkTreeIter *iter)
62 src/authmanager.glade
@@ -25,14 +25,14 @@
25 25 </columns>
26 26 </object>
27 27 <object class="GtkAction" id="action_close">
28   - <property name="label" translatable="yes">Close</property>
29   - <property name="short_label" translatable="yes">Close</property>
30   - <property name="tooltip" translatable="yes">Close the authManager</property>
  28 + <property name="label">Close</property>
  29 + <property name="short_label">Close</property>
  30 + <property name="tooltip">Close the authManager</property>
31 31 <property name="stock_id">gtk-close</property>
32 32 </object>
33 33 <object class="GtkAction" id="action_new">
34   - <property name="label" translatable="yes">New</property>
35   - <property name="tooltip" translatable="yes">Add a new auth key</property>
  34 + <property name="label">New</property>
  35 + <property name="tooltip">Add a new auth key</property>
36 36 <property name="stock_id">gtk-add</property>
37 37 </object>
38 38 <object class="GtkWindow" id="editdialog_window">
@@ -199,6 +199,47 @@
199 199 </object>
200 200 </child>
201 201 </object>
  202 + <object class="GtkMessageDialog" id="errordialog_nodir">
  203 + <property name="can_focus">False</property>
  204 + <property name="border_width">5</property>
  205 + <property name="title" translatable="yes">Fatal error</property>
  206 + <property name="resizable">False</property>
  207 + <property name="modal">True</property>
  208 + <property name="type_hint">dialog</property>
  209 + <property name="skip_taskbar_hint">True</property>
  210 + <property name="message_type">error</property>
  211 + <property name="buttons">close</property>
  212 + <property name="text" translatable="yes">authManager could not locate the sauerbraten configuration directory. Will now exit.</property>
  213 + <child internal-child="vbox">
  214 + <object class="GtkVBox" id="dialog-vbox">
  215 + <property name="visible">True</property>
  216 + <property name="can_focus">False</property>
  217 + <property name="spacing">2</property>
  218 + <child internal-child="action_area">
  219 + <object class="GtkHButtonBox" id="dialog-action_area">
  220 + <property name="visible">True</property>
  221 + <property name="can_focus">False</property>
  222 + <property name="layout_style">end</property>
  223 + <child>
  224 + <placeholder/>
  225 + </child>
  226 + <child>
  227 + <placeholder/>
  228 + </child>
  229 + </object>
  230 + <packing>
  231 + <property name="expand">False</property>
  232 + <property name="fill">True</property>
  233 + <property name="pack_type">end</property>
  234 + <property name="position">0</property>
  235 + </packing>
  236 + </child>
  237 + <child>
  238 + <placeholder/>
  239 + </child>
  240 + </object>
  241 + </child>
  242 + </object>
202 243 <object class="GtkWindow" id="infodialog_window">
203 244 <property name="can_focus">False</property>
204 245 <property name="border_width">20</property>
@@ -430,6 +471,7 @@
430 471 <property name="label" translatable="yes">Close</property>
431 472 <property name="use_underline">True</property>
432 473 <signal name="clicked" handler="gtk_main_quit" swapped="no"/>
  474 + <signal name="clicked" handler="gtk_false" swapped="no"/>
433 475 </object>
434 476 <packing>
435 477 <property name="expand">False</property>
@@ -451,7 +493,7 @@
451 493 <signal name="button-press-event" handler="on_KeyView_button_press_event" swapped="no"/>
452 494 <child>
453 495 <object class="GtkTreeViewColumn" id="treeviewcolumn_enabled">
454   - <property name="title" translatable="yes">Enabled</property>
  496 + <property name="title">Enabled</property>
455 497 <child>
456 498 <object class="GtkCellRendererToggle" id="cellrenderertoggle_enabled"/>
457 499 <attributes>
@@ -463,7 +505,7 @@
463 505 <child>
464 506 <object class="GtkTreeViewColumn" id="treeviewcolumn_authname">
465 507 <property name="resizable">True</property>
466   - <property name="title" translatable="yes">Auth Name</property>
  508 + <property name="title">Auth Name</property>
467 509 <child>
468 510 <object class="GtkCellRendererText" id="cellrenderertext1"/>
469 511 <attributes>
@@ -475,7 +517,7 @@
475 517 <child>
476 518 <object class="GtkTreeViewColumn" id="treeviewcolumn_privkey">
477 519 <property name="resizable">True</property>
478   - <property name="title" translatable="yes">Private Key</property>
  520 + <property name="title">Private Key</property>
479 521 <property name="expand">True</property>
480 522 <child>
481 523 <object class="GtkCellRendererText" id="cellrenderertext2"/>
@@ -488,7 +530,7 @@
488 530 <child>
489 531 <object class="GtkTreeViewColumn" id="treeviewcolumn_domain">
490 532 <property name="resizable">True</property>
491   - <property name="title" translatable="yes">Domain</property>
  533 + <property name="title">Domain</property>
492 534 <child>
493 535 <object class="GtkCellRendererText" id="cellrenderertext3"/>
494 536 <attributes>
@@ -499,7 +541,7 @@
499 541 </child>
500 542 <child>
501 543 <object class="GtkTreeViewColumn" id="treeviewcolumn_actions">
502   - <property name="title" translatable="yes">Actions</property>
  544 + <property name="title">Actions</property>
503 545 <child>
504 546 <object class="GtkCellRendererPixbuf" id="cellrendererpixbuf_info"/>
505 547 <attributes>
2  src/cube2crypto.cpp
@@ -16,7 +16,7 @@ extern "C"
16 16 {
17 17 char *cube2crypto_hashstring(const char *str, int hashlen)
18 18 {
19   - char *hash = (char*)malloc(sizeof(char[hashlen+1]));
  19 + char *hash = (char*)malloc(sizeof(char)*(hashlen+1));
20 20 if(!crypto::hashstring(str, hash, hashlen)) *hash = '\0';
21 21 return hash;
22 22 }
22 src/event_handlers.cpp
... ... @@ -1,23 +1,23 @@
1 1 extern "C"
2 2 {
3   - void on_newdialog_entry_changed(GtkObject *object, AuthManager *authManager)
  3 + G_MODULE_EXPORT void on_newdialog_entry_changed(GtkObject *object, AuthManager *authManager)
4 4 {
5 5
6 6
7 7 }
8 8
9   - void on_editdialog_entry_changed(GtkObject *object, AuthManager *authManager)
  9 + G_MODULE_EXPORT void on_editdialog_entry_changed(GtkObject *object, AuthManager *authManager)
10 10 {
11 11
12 12
13 13 }
14 14
15   - void on_infodialog_button_ok_clicked(GtkObject *object, AuthManager *authManager)
  15 + G_MODULE_EXPORT void on_infodialog_button_ok_clicked(GtkObject *object, AuthManager *authManager)
16 16 {
17 17 gtk_widget_hide(authManager->infodialog.window);
18 18 }
19 19
20   - void on_editdialog_button_update_clicked(GtkObject *object, AuthManager *authManager)
  20 + G_MODULE_EXPORT void on_editdialog_button_update_clicked(GtkObject *object, AuthManager *authManager)
21 21 {
22 22 gtk_widget_hide(authManager->editdialog.window);
23 23
@@ -35,12 +35,12 @@ extern "C"
35 35 write_row(authManager, &iter);
36 36 }
37 37
38   - void on_editdialog_button_cancel_clicked(GtkObject *object, AuthManager *authManager)
  38 + G_MODULE_EXPORT void on_editdialog_button_cancel_clicked(GtkObject *object, AuthManager *authManager)
39 39 {
40 40 gtk_widget_hide(authManager->editdialog.window);
41 41 }
42 42
43   - void on_toolbutton_new_clicked(GtkObject *object, AuthManager *authManager)
  43 + G_MODULE_EXPORT void on_toolbutton_new_clicked(GtkObject *object, AuthManager *authManager)
44 44 {
45 45 gtk_entry_set_text(authManager->newdialog.entry_authname, "");
46 46 gtk_entry_set_text(authManager->newdialog.entry_privkey, "");
@@ -48,7 +48,7 @@ extern "C"
48 48 gtk_widget_show(authManager->newdialog.window);
49 49 }
50 50
51   - void on_newdialog_button_add_clicked(GtkObject *object, AuthManager *authManager)
  51 + G_MODULE_EXPORT void on_newdialog_button_add_clicked(GtkObject *object, AuthManager *authManager)
52 52 {
53 53 gtk_widget_hide(authManager->newdialog.window);
54 54 create_row(authManager, gtk_entry_get_text(authManager->newdialog.entry_authname),
@@ -56,12 +56,12 @@ extern "C"
56 56 gtk_entry_get_text(authManager->newdialog.entry_domain));
57 57 }
58 58
59   - void on_newdialog_button_cancel_clicked(GtkObject *object, AuthManager *authManager)
  59 + G_MODULE_EXPORT void on_newdialog_button_cancel_clicked(GtkObject *object, AuthManager *authManager)
60 60 {
61 61 gtk_widget_hide(authManager->newdialog.window);
62 62 }
63 63
64   - void on_newdialog_clipboard_received(GtkClipboard *clipboard, const char *text_data, AuthManager *authManager)
  64 + G_MODULE_EXPORT void on_newdialog_clipboard_received(GtkClipboard *clipboard, const char *text_data, AuthManager *authManager)
65 65 {
66 66 char authname[512];
67 67 char privkey[51];
@@ -86,13 +86,13 @@ extern "C"
86 86 }
87 87 }
88 88
89   - void on_newdialog_button_fromclip_clicked(GtkObject *object, AuthManager *authManager)
  89 + G_MODULE_EXPORT void on_newdialog_button_fromclip_clicked(GtkObject *object, AuthManager *authManager)
90 90 {
91 91 GtkClipboard *clipboard = gtk_clipboard_get(GDK_SELECTION_CLIPBOARD);
92 92 gtk_clipboard_request_text(clipboard, (GtkClipboardTextReceivedFunc)on_newdialog_clipboard_received, authManager);
93 93 }
94 94
95   - bool on_KeyView_button_press_event(GtkObject *object, GdkEventButton *event, AuthManager *authManager)
  95 + G_MODULE_EXPORT bool on_KeyView_button_press_event(GtkObject *object, GdkEventButton *event, AuthManager *authManager)
96 96 {
97 97 GtkCellRenderer *renderer = NULL;
98 98 GtkTreeIter iter;
99 src/main.cpp
@@ -2,30 +2,66 @@
2 2 #include <stdio.h>
3 3 #include <stdlib.h>
4 4 #include <string.h>
  5 +#include <sys/types.h>
  6 +#include <sys/stat.h>
5 7
6 8 #include "filebuffer.h"
7 9 #include "cube2crypto.h"
8 10
9   -#ifdef _WIN32
10   - // windows (32-bit)
11   - #define SAUERBRATEN_HOME_PATH "%s\\My Games\\Sauerbraten\\"
12   -#elif _WIN64
13   - // windows (64-bit)
14   - #define SAUERBRATEN_HOME_PATH "%s\\My Games\Sauerbraten\\"
  11 +#if defined _WIN32 || defined _WIN64
  12 + #define FS_DELIM "\\"
  13 + #include <Windows.h>
  14 + #include <shlobj.h>
  15 +#else
  16 + #define FS_DELIM "/"
  17 +#endif
  18 +
  19 +enum{PROGDIR, HOMEDIR};
  20 +
  21 +typedef struct {
  22 + int relative_to;
  23 + char *path;
  24 +} HomeLocation;
  25 +
  26 +#if defined _WIN32 || defined _WIN64
  27 +
  28 +/* Array of sauerbraten home directories and what they're relative to. */
  29 +static HomeLocation home_locations[] = {
  30 + {HOMEDIR, "My Games\Sauerbraten"},
  31 + {PROGDIR, "Sauerbraten\\"}
  32 +};
  33 +
15 34 #elif __APPLE__
16   - // osx
17   - #define SAUERBRATEN_HOME_PATH "%s/Library/Application Support/sauerbraten/"
18   -#elif __linux
19   - // linux
20   - #define SAUERBRATEN_HOME_PATH "%s/.sauerbraten/"
21   -#elif __unix // all unices not caught above
22   - // unix
23   - #define SAUERBRATEN_HOME_PATH "%s/.sauerbraten/"
24   -#elif __posix
25   - // posix
26   - #define SAUERBRATEN_HOME_PATH "%s/.sauerbraten/"
  35 +
  36 +static HomeLocation home_locations[] = {
  37 + {HOMEDIR, "Library/Application Support/sauerbraten"}
  38 +};
  39 +
  40 +#else
  41 +
  42 +static HomeLocation home_locations[] = {
  43 + {HOMEDIR, ".sauerbraten"}
  44 +};
  45 +
27 46 #endif
28 47
  48 +#define NUMLOCATIONS sizeof(home_locations)/sizeof(HomeLocation)
  49 +
  50 +bool directory_exists(const char *path)
  51 +{
  52 + struct stat stat_data;
  53 + if(stat(path, &stat_data)) return false;
  54 +
  55 + if (stat_data.st_mode & S_IFDIR)
  56 + {
  57 + return true;
  58 + }
  59 + else
  60 + {
  61 + return false;
  62 + }
  63 +}
  64 +
29 65 enum
30 66 {
31 67 COL_ENABLED = 0, /* gboolean */
@@ -71,6 +107,8 @@ typedef struct {
71 107 typedef struct
72 108 {
73 109 GtkWidget *window;
  110 + GtkWidget *errordialog_nodir;
  111 +
74 112 GtkListStore *key_store;
75 113 GtkTreeView *key_view;
76 114
@@ -97,9 +135,9 @@ GdkPixbuf *get_stock_icon(GtkIconTheme *icon_theme, const char *icon_name, int s
97 135 GError *error = NULL;
98 136 GdkPixbuf *return_pixbuf = NULL;
99 137
100   - return_pixbuf = gtk_icon_theme_load_icon(icon_theme, icon_name, size /*px*/, (GtkIconLookupFlags)0, &error);
  138 + return_pixbuf = gdk_pixbuf_new_from_file_at_size(icon_name, size /*px*/, size /*px*/, &error);
101 139 if(!return_pixbuf) {
102   - g_print("Couldn't load icon: %s", error->message);
  140 + g_print("Couldn't load icon: %s\n", error->message);
103 141 g_free(error);
104 142 return NULL;
105 143 }
@@ -147,6 +185,8 @@ int main (int argc, char *argv[])
147 185 authManager->key_store = GTK_LIST_STORE(gtk_builder_get_object(builder, "KeyStore"));
148 186 authManager->key_view = GTK_TREE_VIEW(gtk_builder_get_object(builder, "KeyView"));
149 187
  188 + authManager->errordialog_nodir = GTK_WIDGET(gtk_builder_get_object(builder, "errordialog_nodir"));
  189 +
150 190 authManager->enabled_renderer = GTK_CELL_RENDERER(gtk_builder_get_object(builder, "cellrenderertoggle_enabled"));
151 191 authManager->info_renderer = GTK_CELL_RENDERER(gtk_builder_get_object(builder, "cellrendererpixbuf_info"));
152 192 authManager->edit_renderer = GTK_CELL_RENDERER(gtk_builder_get_object(builder, "cellrendererpixbuf_edit"));
@@ -180,9 +220,9 @@ int main (int argc, char *argv[])
180 220
181 221 GtkIconTheme *icon_theme = gtk_icon_theme_get_default();
182 222
183   - authManager->info_icon_pixbuf = get_stock_icon(icon_theme, "gtk-dialog-info");
184   - authManager->edit_icon_pixbuf = get_stock_icon(icon_theme, "gtk-edit");
185   - authManager->delete_icon_pixbuf = get_stock_icon(icon_theme, "gtk-delete");
  223 + authManager->info_icon_pixbuf = get_stock_icon(icon_theme, "Icons"FS_DELIM"200px-Gnome-dialog-information.png");
  224 + authManager->edit_icon_pixbuf = get_stock_icon(icon_theme, "Icons"FS_DELIM"200px-Gnome-accessories-text-editor.png");
  225 + authManager->delete_icon_pixbuf = get_stock_icon(icon_theme, "Icons"FS_DELIM"200px-Gnome-edit-delete.png");
186 226
187 227 if(!authManager->info_icon_pixbuf || !authManager->edit_icon_pixbuf || !authManager->delete_icon_pixbuf)
188 228 {
@@ -193,13 +233,22 @@ int main (int argc, char *argv[])
193 233 return(1);
194 234 }
195 235
196   - load_auth_information(authManager);
197   -
198   - gtk_main();
  236 + if(!load_auth_information(authManager))
  237 + {
  238 + gtk_dialog_run(GTK_DIALOG(authManager->errordialog_nodir));
  239 + }
  240 + else
  241 + {
  242 + gtk_main();
  243 + }
199 244
200 245 freefb(&authManager->auth_cfg_buffer);
201 246 freefb(&authManager->autoexec_cfg_buffer);
202 247
  248 + if(authManager->info_icon_pixbuf) g_object_unref(authManager->info_icon_pixbuf);
  249 + if(authManager->edit_icon_pixbuf) g_object_unref(authManager->edit_icon_pixbuf);
  250 + if(authManager->delete_icon_pixbuf) g_object_unref(authManager->delete_icon_pixbuf);
  251 +
203 252 g_slice_free(AuthManager, authManager);
204 253 return 0;
205 254 }
BIN  src/w32dist/Icons/200px-Gnome-accessories-text-editor.png
BIN  src/w32dist/Icons/200px-Gnome-dialog-information.png
BIN  src/w32dist/Icons/200px-Gnome-edit-delete.png
BIN  src/w32dist/freetype6.dll
Binary file not shown
BIN  src/w32dist/intl.dll
Binary file not shown
BIN  src/w32dist/libatk-1.0-0.dll
Binary file not shown
BIN  src/w32dist/libcairo-2.dll
Binary file not shown
BIN  src/w32dist/libexpat-1.dll
Binary file not shown
BIN  src/w32dist/libfontconfig-1.dll
Binary file not shown
BIN  src/w32dist/libgcc_s_dw2-1.dll
Binary file not shown
BIN  src/w32dist/libgdk-win32-2.0-0.dll
Binary file not shown
BIN  src/w32dist/libgdk_pixbuf-2.0-0.dll
Binary file not shown
BIN  src/w32dist/libgio-2.0-0.dll
Binary file not shown
BIN  src/w32dist/libglib-2.0-0.dll
Binary file not shown
BIN  src/w32dist/libgmodule-2.0-0.dll
Binary file not shown
BIN  src/w32dist/libgobject-2.0-0.dll
Binary file not shown
BIN  src/w32dist/libgthread-2.0-0.dll
Binary file not shown
BIN  src/w32dist/libgtk-win32-2.0-0.dll
Binary file not shown
BIN  src/w32dist/libpangocairo-1.0-0.dll
Binary file not shown
BIN  src/w32dist/libpangoft2-1.0-0.dll
Binary file not shown
BIN  src/w32dist/libpangowin32-1.0-0.dll
Binary file not shown
BIN  src/w32dist/libpng14-14.dll
Binary file not shown
BIN  src/w32dist/libstdc++-6.dll
Binary file not shown

0 comments on commit b0707bb

Please sign in to comment.
Something went wrong with that request. Please try again.