*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
gboolean res;
GError *error = NULL;
+#ifdef G_OS_WIN32
+{
+ gchar *dir;
+
+ dir = g_win32_get_package_installation_directory_of_module (NULL);
+ argv[arg++] = g_build_filename (dir, "bin", "evince", NULL);
+ g_free (dir);
+}
+#else
argv[arg++] = g_build_filename (BINDIR, "evince", NULL);
+#endif
/* Page label */
if (dest) {
const gchar *search_string,
guint timestamp)
{
+#ifdef GDK_WINDOWING_X11
+ GdkWindow *gdk_window;
+#endif
+
if (screen) {
ev_stock_icons_set_screen (screen);
gtk_window_set_screen (GTK_WINDOW (ev_window), screen);
we can restore window size without flickering */
ev_window_open_uri (ev_window, uri, dest, mode, search_string);
- if (!GTK_WIDGET_REALIZED (GTK_WIDGET (ev_window)))
+ if (!gtk_widget_get_realized (GTK_WIDGET (ev_window)))
gtk_widget_realize (GTK_WIDGET (ev_window));
#ifdef GDK_WINDOWING_X11
+ gdk_window = gtk_widget_get_window (GTK_WIDGET (ev_window));
+
if (timestamp <= 0)
- timestamp = gdk_x11_get_server_time (GTK_WIDGET (ev_window)->window);
- gdk_x11_window_set_user_time (GTK_WIDGET (ev_window)->window, timestamp);
+ timestamp = gdk_x11_get_server_time (gdk_window);
+ gdk_x11_window_set_user_time (gdk_window, timestamp);
ev_document_fc_mutex_lock ();
gtk_window_present (GTK_WINDOW (ev_window));
guint32 timestamp)
{
GtkWidget *new_window = ev_window_new ();
+#ifdef GDK_WINDOWING_X11
+ GdkWindow *gdk_window;
+#endif
if (screen) {
ev_stock_icons_set_screen (screen);
gtk_window_set_screen (GTK_WINDOW (new_window), screen);
}
- if (!GTK_WIDGET_REALIZED (new_window))
+ if (!gtk_widget_get_realized (new_window))
gtk_widget_realize (new_window);
#ifdef GDK_WINDOWING_X11
+ gdk_window = gtk_widget_get_window (GTK_WIDGET (new_window));
+
if (timestamp <= 0)
- timestamp = gdk_x11_get_server_time (new_window->window);
- gdk_x11_window_set_user_time (new_window->window, timestamp);
+ timestamp = gdk_x11_get_server_time (gdk_window);
+ gdk_x11_window_set_user_time (gdk_window, timestamp);
gtk_window_present (GTK_WINDOW (new_window));
#else
ev_application_accel_map_save (application);
+ g_object_unref (application->scr_saver);
+ application->scr_saver = NULL;
+
#ifdef ENABLE_DBUS
if (application->keys) {
g_object_unref (application->keys);
"evince",
NULL);
- /* FIXME: why make this fatal? */
- if (!ev_dir_ensure_exists (ev_application->dot_dir, 0700, NULL))
- exit (1);
-
#ifdef G_OS_WIN32
{
gchar *dir;
ev_application_accel_map_load (ev_application);
+ ev_application->scr_saver = totem_scrsaver_new ();
+
#ifdef ENABLE_DBUS
ev_application->connection = dbus_g_bus_get (DBUS_BUS_STARTER, &error);
if (ev_application->connection) {
dbus_g_connection_register_g_object (ev_application->connection,
APPLICATION_DBUS_OBJECT_PATH,
G_OBJECT (ev_application));
- ev_application->scr_saver = totem_scrsaver_new (ev_application->connection);
} else {
g_warning ("Error connection to DBus: %s\n", error->message);
g_error_free (error);
void
ev_application_screensaver_enable (EvApplication *application)
{
- if (application->scr_saver)
- totem_scrsaver_enable (application->scr_saver);
+ totem_scrsaver_enable (application->scr_saver);
}
void
ev_application_screensaver_disable (EvApplication *application)
{
- if (application->scr_saver)
- totem_scrsaver_disable (application->scr_saver);
+ totem_scrsaver_disable (application->scr_saver);
}
const gchar *
-ev_application_get_dot_dir (EvApplication *application)
+ev_application_get_dot_dir (EvApplication *application,
+ gboolean create)
{
+ if (create)
+ g_mkdir_with_parents (application->dot_dir, 0700);
+
return application->dot_dir;
}