Changeset 6c2a697e07ab35b23a0742386214d5c37bec6039
- Timestamp:
- 10/16/08 01:40:56 (5 years ago)
- Parents:
- 86c32c8ba885e66218f79923a22d968a37125468
- Children:
- b19be5b08bba0d162c3b6dd1990bb180f7f3c20e
- git-committer:
- Armin Burgmeier <armin@arbur.net> / 2008-10-16T01:40:56Z+0200
- Files:
-
- 12 modified
-
ChangeLog (modified) (1 diff)
-
Makefile.am (modified) (2 diffs)
-
README (modified) (1 diff)
-
code/core/Makefile.am (modified) (1 diff)
-
code/core/browser.cpp (modified) (3 diffs)
-
code/core/iconmanager.cpp (modified) (4 diffs)
-
code/core/statusbar.hpp (modified) (1 diff)
-
code/dialogs/preferencesdialog.cpp (modified) (1 diff)
-
code/operations/operation-open.cpp (modified) (1 diff)
-
code/operations/operation-save.cpp (modified) (1 diff)
-
code/util/resolv.cpp (modified) (2 diffs)
-
win32/gobby.rc (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
ChangeLog
r86c32c8 r6c2a697 1 2008-10-15 Armin Burgmeier <armin@arbur.net> 2 3 * code/core/Makefile.am: Added appicondir and pixmapdir back, so that 4 installed pixmaps can be found. 5 6 * code/util/resolv.cpp: Set all fields in getaddrinfo hint, otherwise 7 the Win32 implementation of getaddrinfo produces an error. 8 9 * code/core/browser.cpp: Commented-out the device name to device index 10 translation for %dev syntax on Windows. It won't be available for now. 11 12 * code/core/iconmanager.cpp: Don't load save-all.svg since GTK+ on 13 Win32 has no SVG loader by defualt. Also, locate pixbufs using the 14 non-deprecated g_win32_get_package_installation_directory_of_module 15 function. 16 17 * code/core/statusbar.cpp: Added code that undefs ERROR, because this 18 is used in an enum, and seems to be defined somewhere in a Windows 19 header. 20 21 * code/dialogs/preferencesdialog.cpp: Don't set current folder of 22 host directory file chooser (which is not shown currently anyway), 23 because this could produce an error message if the directory does not 24 exist. 25 26 * code/operations/operation-open.cpp: 27 * code/operations/operation-save.cpp: Use the C g_iconv API instead of 28 Glib::IConv::iconv, because iconv is a define to libiconv on Windows, 29 but Glib::IConv::libiconv does not exist. 30 31 * Makefile.am: Fixed linking order, link to stdc++ and ws2_32 on 32 Windows. 33 34 * win32/gobby.rc: Fixed path to gobby.res file. 35 1 36 2008-10-15 Armin Burgmeier <armin@arbur.net> 2 37 -
Makefile.am
rbd34be3 r6c2a697 8 8 bin_PROGRAMS = gobby-0.5 9 9 10 gobby_0_5_LDADD = $(gobby_LIBS)\10 gobby_0_5_LDADD = \ 11 11 code/libgobby.a \ 12 12 code/commands/libgobby-commands.a \ … … 14 14 code/dialogs/libgobby-dialogs.a \ 15 15 code/core/libgobby-core.a \ 16 code/util/libgobby-util.a 16 code/util/libgobby-util.a \ 17 $(gobby_LIBS) 17 18 18 19 if WIN32 19 gobby_0_5_LDADD += -lole32 -luuid 20 # For some reason it does not link against libstdc++ on Windows. Perhaps 21 # that's because we don't specify a source file here, so it guesses C. 22 gobby_0_5_LDADD += -lws2_32 -lstdc++ 20 23 gobby_0_5_LDFLAGS = \ 21 24 -Wl,--enable-runtime-pseudo-reloc \ -
README
r6649d0a r6c2a697 37 37 * Syntax highlighting, auto indentation, configurable tab 38 38 width 39 * Multiple docum nets in one session39 * Multiple documents in one session 40 40 * Document subscriptions 41 41 * Zeroconf support (optional) -
code/core/Makefile.am
r09f550a r6c2a697 37 37 userlist.hpp 38 38 39 appicondir = $(datadir)/pixmaps 40 pixmapdir = $(datadir)/pixmaps/gobby 41 39 42 libgobby_core_a_CPPFLAGS = $(gobby_CFLAGS) -I.. \ 40 43 -DAPPICON_DIR=\""$(appicondir)"\" \ -
code/core/browser.cpp
rd759de2 r6c2a697 26 26 #include <gtkmm/image.h> 27 27 28 #include <net/if.h> 28 #ifndef G_OS_WIN32 29 # include <net/if.h> 30 #endif 29 31 30 32 Gobby::Browser::Browser(Gtk::Window& parent, … … 194 196 str.erase(pos); 195 197 198 #ifdef G_OS_WIN32 199 // TODO: Implement 200 device_index = 0; 201 #else 196 202 device_index = if_nametoindex(device_name.c_str()); 197 203 if(device_index == 0) … … 203 209 device_name), 5); 204 210 } 211 #endif 205 212 } 206 213 -
code/core/iconmanager.cpp
rcdda99c r6c2a697 25 25 namespace 26 26 { 27 Glib::RefPtr<Gdk::Pixbuf> load_pixbuf(const char* dir, const char* file) 27 Glib::RefPtr<Gdk::Pixbuf> 28 load_pixbuf(const char* dir, const char* file) 28 29 { 29 30 try … … 44 45 else 45 46 subdir = "share/pixmaps/gobby"; 46 47 path = g_win32_get_package_installation_subdirectory( 48 subdir); 49 std::string path_str = path; 47 48 gchar* path = g_win32_get_package_installation_directory_of_module(NULL); 49 50 std::string path_str = 51 Glib::build_filename(path, subdir); 50 52 g_free(path); 51 53 … … 67 69 Gtk::StockID Gobby::IconManager::STOCK_SAVE_ALL("gobby-save-all"); 68 70 71 // TODO: The save-all icon does not match the save icon for toolbar 72 // or menu sized items. It is not yet enabled therefore. 69 73 Gobby::IconManager::IconManager(): 70 74 gobby(load_pixbuf(APPICON_DIR, "gobby.png") ), 71 75 userlist(load_pixbuf(PIXMAPS_DIR, "userlist.png") ), 72 76 doclist(load_pixbuf(PIXMAPS_DIR, "doclist.png") ), 73 save_all(load_pixbuf(PIXMAPS_DIR, "save-all.svg")),77 // save_all(load_pixbuf(PIXMAPS_DIR, "save-all.svg")), 74 78 m_is_userlist(userlist), 75 79 m_is_doclist(doclist), 76 m_is_save_all(save_all),80 // m_is_save_all(save_all), 77 81 m_icon_factory(Gtk::IconFactory::create() ) 78 82 { … … 84 88 85 89 Gtk::StockItem save_all_item(STOCK_SAVE_ALL, _("Save All")); 86 // TODO: The save-all icon does not match the save icon for toolbar87 // or menu sized items. This is not yet enabled therefore.88 90 //m_icon_factory->add(STOCK_SAVE_ALL, m_is_save_all); 89 91 -
code/core/statusbar.hpp
rbd34be3 r6c2a697 26 26 27 27 #include <glibmm/ustring.h> 28 29 /* ARGH!!! */ 30 #ifdef G_OS_WIN32 31 # ifdef ERROR 32 # undef ERROR 33 # endif 34 #endif 28 35 29 36 namespace Gobby -
code/dialogs/preferencesdialog.cpp
rbd34be3 r6c2a697 268 268 269 269 m_lbl_path_host_directory.show(); 270 m_btn_path_host_directory.set_current_folder( 270 // Don't call this as long as we are not showing the dialog, to 271 // prevent spurious error messages when the folder does not exist. 272 /*m_btn_path_host_directory.set_current_folder( 271 273 static_cast<const std::string&>( 272 preferences.user.host_directory)); 274 preferences.user.host_directory));*/ 273 275 m_btn_path_host_directory.show(); 274 276 connect_path_option(m_btn_path_host_directory, -
code/operations/operation-open.cpp
r6fbb20f r6c2a697 206 206 gsize outbytes = CONVERT_BUFFER_SIZE; 207 207 208 const std::size_t result = m_iconv->iconv( 208 /* iconv is defined as libiconv on Windows, or at least when using the 209 * binary packages from ftp.gnome.org. Therefore we can't propely 210 * call Glib::IConv::iconv. Therefore, we use the C API here. */ 211 const std::size_t result = g_iconv(m_iconv->gobj(), 209 212 &inbuf, &inbytes, &outbuf, &outbytes); 210 213 bool more_to_process = (inbytes != 0); -
code/operations/operation-save.cpp
r6fbb20f r6c2a697 203 203 gchar* preserve_inbuf = inbuf; 204 204 205 std::size_t retval = m_iconv.iconv(&inbuf, &inlen, &outbuf, &outlen); 205 /* iconv is defined as libiconv on Windows, or at least when using the 206 * binary packages from ftp.gnome.org. Therefore we can't propely 207 * call Glib::IConv::iconv. Therefore, we use the C API here. */ 208 std::size_t retval = g_iconv( 209 m_iconv.gobj(), &inbuf, &inlen, &outbuf, &outlen); 206 210 207 211 if(retval == static_cast<std::size_t>(-1)) -
code/util/resolv.cpp
rbd34be3 r6c2a697 22 22 #include <glibmm/thread.h> 23 23 24 #include <sys/types.h> 25 #include <sys/socket.h> 26 #include <netdb.h> 24 #ifdef G_OS_WIN32 25 /* This is required to be able to use getaddrinfo with MinGW 26 * I believe this means that we require Windows XP here. */ 27 # define _WIN32_WINNT 0x0501 28 # include <ws2tcpip.h> 29 #else 30 # include <sys/types.h> 31 # include <sys/socket.h> 32 # include <netdb.h> 33 #endif 27 34 28 35 struct Gobby::ResolvHandle … … 64 71 { 65 72 addrinfo hint; 73 #ifdef AI_ADDRCONFIG 66 74 hint.ai_flags = AI_ADDRCONFIG; 75 #else 76 hint.ai_flags = 0; 77 #endif 67 78 hint.ai_family = AF_UNSPEC; 68 79 hint.ai_socktype = SOCK_STREAM; 69 80 hint.ai_protocol = 0; 81 hint.ai_addrlen = 0; 82 hint.ai_canonname = NULL; 83 hint.ai_addr = NULL; 84 hint.ai_next = NULL; 70 85 71 86 addrinfo* res = NULL; -
win32/gobby.rc
rbcfd4df r6c2a697 1 A ICON MOVEABLE PURE LOADONCALL DISCARDABLE " win32/gobby.ico"1 A ICON MOVEABLE PURE LOADONCALL DISCARDABLE "gobby.ico"
