Commit graph

343 commits

Author SHA1 Message Date
Patrick Ohly 3f58a4ab2d GTK-UIs: avoid unnecessary variable initialization
In this case it is fairly obvious that new_active and old_active
will both be set before use. There is no need for setting old_active
to FALSE. cppcheck warned about this.
2014-01-17 16:15:15 +01:00
Patrick Ohly 5a0f5a9793 GTK/GTK3 UI: fix crash when a sync runs while no service is selected
Running a sync while the UI had no service selected caused a crash in
find_updated_source_progress() because the code dereferences the NULL
prog_data->data->current_service pointer. Affected both the GTK2 and
GTK3 UI.

Fix it by checking for NULL and not doing anything if NULL.
2013-10-01 09:28:39 +02:00
Patrick Ohly 918b07bb18 GTK-2/3 UI: avoid g_strcasecmp
g_strcasecmp() was deprecated and produces warnings with later glib,
which is fatal with -Werror. The method is used to relax an equal
comparison of the config name. Config names are not case sensitive and
SyncEvolution is using a similar "to lower" approach, so relaxing the
comparison is okay, although it is uncertain why exactly it is
necessary and/or whether it catches all cases.

All strings are expected to be UTF-8, but because SyncEvolution only
does primitive lowercasing itself, calling g_ascii_strcasecmp() seems
like a better match than the full UTF-8 aware case handling methods in
glib.
2012-04-24 15:42:09 +02:00
Patrick Ohly 8d4438394d Revert "Do not accept service config without a username (BMC#23106)"
This reverts commit 2e01af7e09.

The commit had the unintended side effect of also triggering when
a direct sync config for a phone was edited (but not when it was created?!).
The error message was controversial to start with, so instead of
making the code even more complicated, let's remove the error
message.
2012-03-30 07:31:59 +00:00
Patrick Ohly e3266d04e8 autotools: fixed UI translation
The old ui.glade was still being referenced by the list of translatable
files. The corresponding files from the GTK3 version were missing.

automake doesn't seem to handle conditional _DATA files correctly. In contrast
to source files, they end up not being distributed when disabled. To solve
this, src/gtk*-ui/gtk-ui.am must be included unconditionally in src.am and
contain unconditional EXTRA_DIST entries for the two ui.xml files.
2012-03-30 07:31:59 +00:00
Patrick Ohly 53b2ea878c GTK2 ui: fix compiler warnings
Some variables were set but not used.
2012-03-27 15:30:20 +02:00
Jussi Kukkonen f1454948b8 gtk-ui: fork gtk3-version of the ui
We want to support both GTK+-2.0 and GTK+-3.0 for the time being
(even if the former is just maintenance). This is not possible in
the same codebase without large amounts of ifdefs so we fork the UI.
2012-03-27 15:30:20 +02:00
Jussi Kukkonen a8ee160ce5 gtk-ui: refactor MuxFrame to remove duplicate code 2012-03-27 15:30:20 +02:00
Jussi Kukkonen 96d7516f66 gtk-ui: remove uses of GTK features deprecated in 3.0
All of the new functions should have been added in GTK 2.18 or earlier
2012-03-27 15:30:20 +02:00
Jussi Kukkonen 2314724acc gtk-ui: Use gtkbuilder xml file as canonical source for UI
Stop running gtkbuilder-convert on build. This was done to workaround
a glade bug but is not necessary anymore
2012-03-27 15:30:19 +02:00
Patrick Ohly 4f0254c801 Merge branch 'syncevolution-1-2-branch' 2012-01-10 11:49:43 +01:00
Jussi Kukkonen 2e01af7e09 Do not accept service config without a username (BMC#23106) 2011-12-13 14:08:27 +01:00
Patrick Ohly 52fab84ebe GTK UI: commented resp. removed dead code
Several variables were set but never used. In some cases this
was obviously harmless (copied boiler plate code), in others
it is less certain (missing error checking?). Might be worth checking.
The goal for now is to get the code to compile with gcc 4.6 and
the "set-but-not-used" warning enabled.
2011-11-30 08:43:57 +00:00
Patrick Ohly 4fc6c3e2c4 Merge remote-tracking branch 'origin/syncevolution-1-2-branch'
Conflicts:
	configure.ac
	src/syncevo-dbus-server.cpp
	src/syncevo/Cmdline.cpp
	test/ClientTest.cpp
	test/ClientTest.h
	test/generate-html.xsl
	test/runtests.py

Conflicts caused by backporting + merging back slightly modified
backports.
2011-11-28 10:16:57 +01:00
Patrick Ohly e56c2b245a glib: avoid including glib/*.h headers directly
Recent glib deprecates the direct inclusion of some of its headers,
in favor of including glib.h. Doing that here whenever possible. gi18n.h
still needs to be included directly (otherwise it doesn't compile
on Debian Testing with glib 2.28).

Not sure about gio. I'm keeping the gio/ includes because they
are relevant on platforms where gio was not yet part of glib.
2011-11-25 14:19:06 +00:00
Murray Cumming 0f641b9f13 GTK+ UI: Avoid warnings due to null settings_btn.
This widget pointer is null for the GTK+ UI, so calling a function
on it causes a warning.
Also ifdef-out the widget pointers that are really not used in the
Moblin/Meego UI, to avoid them being used unintentionally.
2011-10-21 09:43:45 +02:00
Patrick Ohly a7f7c8eacf Merge remote branch 'origin/syncevolution-1-2-branch'
Conflicts:
	configure.ac
	test/ClientTest.cpp
	test/testcases/eds_event.ics.funambol.tem.patch

Conflicts because of version number and updated test cases resp. local
delete optimization.

ActiveSync backend had to be adapted to modified InsertItemResult: now
it requests a merge when it detects duplicates, like the CalDAV backend
already did on the 1.2 branch.
2011-10-17 13:16:33 +02:00
Alban Crequy 6498092e58 GTK sync-ui: wrap sync service descriptions (BMC #7199)
Descriptions of different sync services are not fully visible unless
word-wrapping gets enabled.
2011-09-14 15:07:31 +02:00
Krzesimir Nowak a7ad98fabc Port build system to non-recursive Automake.
All but toplevel Makefile.am are replaced with their non-recursive
counterparts. The generation of configure.in was removed (and thus
configure-{pre,post}.in are also removed) in favor of configure.ac
and m4 macros adding backend specific configure parts.

Version number is generated like in old build system.

There are still many things to improve, but for now there are no
immediate regressions. AUTOTOOLS-TODO contains a list of possible
improvements and fixes. AUTOTOOLS-TESTING contains what was tested
with current build system (configure flags, make options).
2011-08-30 16:38:34 +02:00
Jussi Kukkonen cfa5f08a31 GTK sync UI: Fix WebDAV config ignoring
Fix my own amateurish g_strcmp0() mistake. Also check url existence
to avoid g_str_prefix() complaining.
2011-06-14 08:47:30 +02:00
Jussi Kukkonen c1618a0b87 GTK sync UI: Ignore Webdav-related configs temporarily
Ignore "peerType = WebDAV" configurations as well as the
configurations with syncURL starting with "local://@" temporarily
(before we actually support WebDAV in the UI).
2011-06-08 19:22:09 +02:00
Patrick Ohly 08c6a3221b D-Bus: cleaned up file layout
This patch moves the files for the glib-based SyncEvolution client library
into src/dbus/glib. This will make it possible to add src/dbus/qt and
enable/disable various D-Bus related components in a sane way.wq
2011-05-16 18:46:01 +08:00
Patrick Ohly 7433b445a6 GTK sync-ui: selection of individual sources was broken (BMC #17113)
Because the UI checked for the no-longer existing "type" property,
it didn't handle any sources at all. Replacing with the new
"backend" property name solves the problem.
2011-05-05 15:34:06 +02:00
Patrick Ohly c46b5a1867 GTK sync-UI: fixed compile problem (gcc 4.5.2)
gcc 4.5.2 complained that a "case" value is not among those valid for
the "switch" enum. That's correct, the enum might be smaller than the
value. The root cause is an incorrect use of the enum type in the
callback: the signal itself is defined with gint.
2011-03-28 09:17:21 +02:00
Patrick Ohly 51714dfcd9 GTK sync UI: English language fixes
"backup" and "setup" are not verbs. Has to be "back up" and "set up".
Translation files are also patched, so no re-translation necessary.
2011-02-07 13:56:34 +01:00
Patrick Ohly 5be653afae GTK sync ui: made some strings translatable
One of them ("We don't know what this device...") was already
translated elsewhere. It might be that it is already translated in the
UI. The other ("Use these settings") was not and thus really showed up
as untranslated.
2011-02-07 13:40:42 +01:00
Patrick Ohly 4ad063f94e sync-ui: ignore configs without ConsumerReady = 1
Previously, existing configs did not need the ConsumerReady flag to be
shown to users in the UI. This was (intentionally?) inconsistent with
templates, perhaps reasoning that users configuring unsupported peers
shouldn't have to bother with setting the flag.

This patch makes templates and configs behave alike: they are ignored
by the GTK sync-ui unless the ConsumerReady flag is explicitly set to
1. The reason is that removing that flag is used to hide backup copies
(*.old) of migrated configs.

It might also be a worthwhile feature by itself: I have a lot of
experimental configs, but only very few that actually need to show up
in the GUI.

Users who configured peers without that flag must add it manually if
the sync UI is meant to show them.
2011-01-17 15:09:33 +01:00
Jussi Kukkonen fcd932e16f gtk-ui: Use "no-sync" flag on non syncing StartSession
Also fix incorrect Session.GetFlags and Server.StartSessionWithFlags
param  in dbus xml definitions
2010-12-20 11:29:57 +01:00
Jussi Kukkonen 4c65ee6f84 gtk-ui: Update GetPresence handlers to match current API
the sync-ui code and dbus wrapper hadn't been updated when GetPresence()
signature changed. The changed parts weren't actually used.
2010-12-20 11:29:57 +01:00
Jussi Kukkonen 771b3f9bf7 gtk-ui: match config names insensitively
server_presence_changed_cb compares a config name with a value that
comes from defaultPeer -- latter is not necessarily lowercase.
2010-12-20 11:29:57 +01:00
Jussi Kukkonen 27506b1be0 gtk-ui: Use hyphen instead of underscore in signal names
Apparently both are acceptable but it seems some version of glib
requires the same one to be used  in signal definition and connection.
2010-12-20 11:29:57 +01:00
Patrick Ohly bff517156c sync-ui: wrong direction of data transfer when talking to device (BMC #7091)
The settings for a device sync shows two checkboxes, one to "Send
changes to MYPHONE" the other to "Receive changes from MYPHONE". The
meaning of these two buttons are interchanged.

The settings are the same as in a web service. They were not mapped
correctly for a device because "refresh/one-way-from-server/client"
implies different data transfer directions depending on whether the
peer is a client or a server.

The solution for this issue is to switch the sync mode depending on
whether the config refers to a client ("PeerIsClient"). Added
an utility function and adapted:
- displaying existing configs
- changing configs
- refresh syncs in the emergency dialog
2010-09-24 17:51:27 -07:00
Patrick Ohly 5285051e3a sync-gtk.desktop.in: fixed syntax in non-MeeGo desktop file
Syntax error introduced in latest release: trailing ; missing.
2010-09-16 13:24:52 +02:00
Patrick Ohly 4e72438e8f sync-ui (GTK version): updated .desktop file
As commented by Pietro Battiston, the generic "Sync (GTK)" name, "Up
to date" comment and "Internet" category inherited from Moblin/MeeGo
are not quite suitable for a general purpose Linux desktop.

This patch changes the non-Moblin/MeeGo .desktop file. The MeeGo
installation is not modified.

We did not have a good idea for a generic name and thus kept the GTK
part to distinguish this SyncEvolution GUI from future other ones.
Category and comment were easier: "Synchronize PIM data" and
"Office;PDA;GTK", with GTK likely to be ignored.
2010-09-08 13:44:33 +02:00
Jussi Kukkonen 88ea231145 canonize new device config names (MBC #1194)
Fixes the second half of bug 1194: only allow "-_[a-z][A-Z][0-9]"
characters in the name.
2010-07-16 16:13:17 +02:00
Jussi Kukkonen f616f35084 prevent overwriting device configs by accident (MBC #3566,1194)
Currently the configuration name for a new config is the
fingerPrint and it overwrites any existing configuration.
This commit starts using deviceName as the base name and adds a
incremental number to the end if a configuration already exists
for that name.
2010-07-16 16:12:42 +02:00
Jussi Kukkonen 2eeefbf723 gtk-ui: make "Sync now" always translatable (MBC #3052) 2010-06-14 17:34:33 +02:00
Patrick Ohly 8a1c26e3d2 sync-ui: renamed local sync() to do_sync() to avoid name collision with system sync()
As reported by Peter Robison, the source code no longer compiles on
Fedora Core 13. The root cause is a name collision of a static
function with the previously defined system call sync().
2010-06-04 08:03:49 +02:00
Jussi Kukkonen b9fd541cea gtk-ui: explicitly set names for glade widgets (MBC #1372)
GtkBuilder no longer sets widget name based on ui definition id. This
breaks name-based styling on all widgets originating from Glade, as
Glade does not take the GtkBuilder change into account.

Work around this by explixitly setting the widget names for the widgets
that are referenced by name in the rc-file.
2010-05-11 20:03:55 +02:00
Jussi Kukkonen c12057d981 gtk-ui: update toolbar style for MeeGo 1.0 (MB #1970) 2010-05-11 20:03:44 +02:00
Jussi Kukkonen 1f60171e53 gtk-ui: preserve configuration names on save (BME #1266)
use the name of a saved config (and not the the template) when saving
the config again.
2010-05-03 15:24:41 +03:00
Jussi Kukkonen d4e05b2531 gtk-ui: put emergency view in scrolledwindow (BME #1296)
Use a vertical scrollbar when needed.

The commit looks extensive, but it's just glade re-indenting
everything inside the scrolledwindow.
2010-05-03 15:24:41 +03:00
Jussi Kukkonen 92e830be27 gtk-ui: set "settings"-btn insensitive when syncing (MB #10482) 2010-04-20 11:34:07 +03:00
Jussi Kukkonen 1404b78d9a gtk-ui: fix mx-gtk >= 0.99.1 header location (BME #892) 2010-04-19 11:49:05 +02:00
Jussi Kukkonen 03f649c459 gtk-ui: fix crasher and wrong UI state (MB #10473)
Going to configuration view and back without selecting any
configuration would set "sync now" button sensitive. Clicking
the button would crash the ui.

This commit fixes both issues.
2010-04-13 16:42:56 +03:00
Jussi Kukkonen e8127ae836 gtk-ui: never show non-consumerReady templates (MB #10472) 2010-04-09 14:55:44 +03:00
Jussi Kukkonen 5589ba9d5d gtk-ui: fix device template autoselection (MB #10469)
A template in the device configuration template list can currently get
autoselected even if there are several templates with equally good scores.
2010-04-09 10:18:57 +03:00
Jussi Kukkonen 11f286e738 gtk-ui: revert to old widgets names for Toolbar
new names are broken in moblin gtk theme, and the old ones have been
added back to the moblin gtk theme...
2010-03-31 20:34:54 +02:00
Jussi Kukkonen a75ac70bbe gtk-ui: start using GtkToolbar for Meego window
This gets rid of MuxWindow (and the related icon code and images)
for good: Now a specially named GtkToolbar and buttons inside it get
a special treatment from meego gtk theme engine, and end up looking
like Mx window title bar

The meego build will look a bit odd with other gtk themes, though
2010-03-31 20:34:54 +02:00
Jussi Kukkonen 975d0eb677 gtk-ui: fix source order in emergency view (MB #9714) 2010-03-31 17:23:07 +03:00