Commit graph

11 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
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
978854fcb0 GTK3 UI: fixed compiler warnings
Some variables were set but never used. Commented them out.
2012-03-30 07:31:58 +00:00
Jussi Kukkonen
f49beff2c2 gtk3-ui: Make sure we don't overflow horizontally
If the font size is large, the UI may end up overflowing horizontally
on small screens. Make sure that does not happen by limiting info
label size and setting proper expand/fill properties. Also set info
label font size in application css so we don't get nasty surprises
if default is massive.
2012-03-30 07:31:58 +00:00
Jussi Kukkonen
f5b72fbe2c gtk3-ui: Use CSS styling 2012-03-27 15:30:20 +02:00
Jussi Kukkonen
aceb1e5df2 gtk3-ui: be explicit about expands/fills
gtk3 widgets "inherit" expand and fill from their containers, this is
not always what we want.
2012-03-27 15:30:20 +02:00
Jussi Kukkonen
46c3148b8f gtk3-ui: ui.xml saved with new glade (no functional changes) 2012-03-27 15:30:20 +02:00
Jussi Kukkonen
12774661cc gtk3 changes
* drawing rewrite for home made widgets
* size request rewrite for home made widgets
* don't use direct access to widget structs
* explicitly set expand to FALSE on some widgets
  (children now inherit expand=TRUE)
* use gio to start bluetooth-wizard
* use GtkSwitch instead of MxGtkLightSwitch
  (this needs to be done now as mx-gtk is not available for gtk3)
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