Charles Kerr
b0e33117c5
Fix some gtk warnings ( #1038 )
...
* fix gtk deprecation warning: gtk_misc_set_alignment
* fix gtk deprecation warning: gtk_alignment_new
* fix gtk deprecation warning: gtk_tree_view_set_rules_hint
* fix gtk deprecation warning: gtk_image_new_from_stock
* fixup! fix gtk deprecation warning: gtk_alignment_new
* fix gtk deprecation warning: gtk_dialog_set_alternative_button_order
* fix gtk deprecation warning: gtk_show_uri
* fix gtk deprecation warning: gtk_widget_set_margin_left
* fix gtk deprecation warning: gtk_button_set_alignment
* fix gtk deprecation warning: g_type_class_add_private
* fix gtk deprecation warning: gtk_menu_popup
* fix gtk deprecation warning: gtk_misc_set_padding
* chore: uncrustify
* fix: silence G_TYPE_INSTANCE_GET_PRIVATE warning
Deprecaed starting in glib 2.58
* chore: uncrustify
2019-11-06 13:09:27 -06:00
Mike Gelfand
eef4799388
Update Uncrustify config to 0.69
2019-07-15 02:30:41 +03:00
Mike Gelfand
d3b8982195
Uppercase the literal suffixes
...
* MISRA C++:2008, 2-13-4 - Literal suffixes shall be upper case
* MISRA C:2012, 7.3 - The lowercase character "l" shall not be used in a
literal suffix
* CERT DCL16-C. - Use "L," not "l," to indicate a long value
* CERT, DCL50-J. - Use visually distinct identifiers
2019-03-17 07:07:48 +03:00
Mike Gelfand
1e3d20422a
Reduce for loop variables scope
2017-05-14 01:38:31 +03:00
Mike Gelfand
e1d53855f4
Avoid declaring multiple variables on the same line
2017-05-01 18:46:41 +03:00
Mike Gelfand
a762c770f2
Make conditional expressions explicitly boolean
2017-04-30 19:26:01 +03:00
Mike Gelfand
4f9d9ad92b
Code style change leftovers
...
For some reason, GTK client wasn't fully processed. All the rest of changes
are mostly in comments.
2017-04-21 10:40:57 +03:00
Mike Gelfand
dadffa2c0f
Align type qualifiers to the right (code style)
...
This way all the qualifiers (`const`, `volatile`, `mutable`) are grouped
together, e.g. `T const* const x` vs. `const T* const x`. Also helps reading
types right-to-left, e.g. "constant pointer to constant T" vs. "constant
pointer to T which is constant".
2017-04-20 19:53:20 +03:00
Mike Gelfand
d7930984ef
Adjust uncrustify config, reformat all but Mac client
...
There're places where manual intervention is still required as uncrustify
is not ideal (unfortunately), but at least one may rely on it to do the
right thing most of the time (e.g. when sending in a patch).
The style itself is quite different from what we had before but making it
uniform across all the codebase is the key. I also hope that it'll make the
code more readable (YMMV) and less sensitive to further changes.
2017-04-20 10:01:22 +03:00
Mike Gelfand
2248d3670f
Get rid of $Id$ SVN keywords in source files
2016-09-02 23:10:15 +03:00
Mike Gelfand
c955c04d8f
Explicitly compare result of str(n)cmp/memcmp to signify that it's not boolean
2016-03-13 22:11:01 +00:00
Mike Gelfand
363069ff97
#5930 : Fix style of Gtk+3.16 overshoot and undershoot (patch by nagisa)
2015-05-03 10:30:35 +00:00
Jordan Lee
cc1b1cd430
since Transmission supports older versions of glib, add a portability wrapper for G_DEFINE_QUARK
2013-07-24 00:13:31 +00:00
Jordan Lee
6a47b4a5d3
don't use a '-' character in the QN argument to G_DEFINE_QUARK. https://forum.transmissionbt.com/viewtopic.php?p=65548#p65548
2013-07-22 23:00:10 +00:00
Jordan Lee
f83ff36cd5
(trunk gtk) use G_SOURCE_REMOVE where appropriate
2013-07-20 16:37:59 +00:00
Jordan Lee
d244545979
use G_DEFINE_QUARK instead of rolling our own quark getters
2013-07-09 22:44:24 +00:00
Jordan Lee
d1571bda02
(gtk) use replace strcmp() with g_strcmp0() everywhere
2013-02-14 15:17:42 +00:00
Jordan Lee
cd09204a6e
(trunk) first draft of changing the FreeSpace API to behave as https://trac.transmissionbt.com/ticket/4076#comment:25 -- libT, rpc, qt, and gtk implementations.
2013-02-09 04:05:03 +00:00
Jordan Lee
d76d2a34d9
(gtk) match transmission-qt's way of showing up & down speeds in the statusbar
2013-02-08 01:34:59 +00:00
Jordan Lee
085c37584e
#4076 'free space indicator': in the Qt and GTK+ clients, add 'Free' to the freespace labels to give more context of what the number means
2013-02-01 21:02:40 +00:00
Jordan Lee
16d46a72a1
in the Qt and GTK+ clients, move the torrent count indicator from the statusbar to the filterbar
2013-02-01 20:58:55 +00:00
Jordan Lee
20fe66bccf
more experimentation with the shortTransferString
2013-01-30 00:22:52 +00:00
Jordan Lee
1d3bf93618
synchronize the Qt and GTK+ client's statusbars, including the new freespace indicator. Make the up/down speed ordering consistent between statusbar and torrent list.
2013-01-27 23:05:47 +00:00
Jordan Lee
29d6f5d934
(gtk) #5190 'Add borders instead of shadow on scrolled window': fixed, patch by nagisa
2013-01-21 17:05:55 +00:00
Jordan Lee
c1559f3cc4
(trunk, libT) first drop of the tr_quark patch.
2012-12-22 20:35:19 +00:00
Jordan Lee
6429093cd0
copyediting: indentation
2012-12-13 03:37:55 +00:00
Jordan Lee
61bc1eabd6
fewer redundant gobject dynamic casts
2012-12-13 03:00:57 +00:00
Jordan Lee
3d38723ad9
Follow more common whitespace style conventions in the C code (libtransmission, daemon, utils, cli, gtk).
2012-12-05 17:29:46 +00:00
Jordan Lee
6a3c7f34ec
(trunk, gtk) use GtkApplication and GtkApplicationWindow
2012-07-14 22:44:41 +00:00
Jordan Lee
dfbfdbc81b
(trunk, gtk) remove the pointless TrWindow typedef
2012-07-14 22:41:33 +00:00
Jordan Lee
cdd71c6427
(trunk gtk) #4970 remove deprecated GTK+ API calls, raise GTK+ dependency to 3.2
2012-07-14 19:26:55 +00:00
Jordan Lee
fbc7f3dc3c
(trunk) use base-10 units for network bandwidth (ie, speed) and disk sizes.
...
It looks like the Mac client is already doing this and it's clearly the trend in other apps as well. Even apt-get is using kB/s, ferchrissake... :)
Flame away.
2012-02-03 21:21:52 +00:00
Jordan Lee
55c84fa9ea
(trunk gtk) #4552 "mark primary toolbars" -- applied patch from fmuellner
2011-10-11 15:27:32 +00:00
Jordan Lee
f9388714b7
(trunk gtk) add portability wrappers for gtk_hbox_new() and gtk_vbox_new(), which are deprecated now in GTK+ 3.2
2011-10-11 04:11:08 +00:00
Jordan Lee
8bbc4c7b83
(trunk gtk) #4470 "Search in torrent list is broken" -- fixed.
2011-09-12 06:11:04 +00:00
Jordan Lee
8d89a16f4f
remove the gtr_idle_add() portability wrapper around gdk_threads_add_idle() -- it's unnecessary now that the minimum gtk version's been bumped.
2011-08-08 17:10:55 +00:00
Jordan Lee
0e48418f26
(trunk gtk) since we're bumping glib's requirement to 2.26 (27 Sept 2010), it's a good time to bump the gtk+ requirement to 2.22 (32 Sept 2010).
2011-08-07 18:41:13 +00:00
Jordan Lee
61174b007e
(trunk) #671 "torrent queuing" -- Preliminary implementation. Covers libtransmission; GTK+ and Qt clients, and rudimentary web client support.
2011-08-01 22:24:24 +00:00
Jordan Lee
9448bc5e88
(trunk gtk) #1477 "Launchpad translations need comment for strings with non-standard context" -- apply patch from okram.
2011-07-26 01:09:39 +00:00
Jordan Lee
ee20cc2b24
(trunk gtk) #4320 "Port GTK client to GTK 3." -- transmission-gtk now compiles cleanly & runs on GTK 3.
2011-07-26 01:02:32 +00:00
Jordan Lee
45bdc18210
(trunk gtk) use ngettext() instead of gtr_dngettext() to address https://bugs.launchpad.net/ubuntu/+source/transmission/+bug/760761
2011-05-02 17:58:27 +00:00
Jordan Lee
1d7a4eb528
(trunk gtk) more heap pruning: minor GtkTreeModel changes
...
Use gtk_tree_model_iter_nth_child() instead of gtk_tree_model_get_iter_first() to avoid an unnecessary gtk_tree_path object being created and destroyed. This is a very minor change and I'm not sure how useful it really is, but it doesn't hurt.
2011-04-13 22:00:55 +00:00
Jordan Lee
4a15899499
(trunk gtk) transmission-gtk requires GTK+ 2.8 or higher, so remove the `#if GTK_CHECK_VERSION(2,8,0)' checks because we already know the answer.
2011-04-12 11:13:41 +00:00
Jordan Lee
fb2ffbc542
(trunk gtk) use GQuarks instead of strings for keys in tr-icon and tr-window
2011-04-05 16:16:06 +00:00
Jordan Lee
eb06d81fb9
(trunk) fix a handful of small memory leaks that valgrind found.
2011-03-25 17:42:47 +00:00
Jordan Lee
b0379147d9
(trunk gtk) get everything except torrent-cell-renderer building under GTK+ 3.0.5
2011-03-25 07:32:30 +00:00
Jordan Lee
b4d36aeb54
(trunk) #4138 "use stdbool.h instead of tr_bool" -- done.
2011-03-22 15:19:54 +00:00
Jordan Lee
c7006ed8b3
(trunk gtk) remove the TrTorrent GObject subclass.
2011-03-03 01:59:25 +00:00
Jordan Lee
287d61197a
(trunk gtk) set GtkLabel's "single-line-mode" flag to TRUE in the toolbar, in the stats dialog, and in the details dialog's info tab.
...
According to the GTK+ documentation, this "can be an advantage in situations where resizing the label because of text changes would be distracting, e.g. in a statusbar." It doesn't seem to prevent relayout in GTK+ 2.20.1, but maybe other versions of GTK+ will make better use of the flag.
2011-01-21 17:31:35 +00:00
Jordan Lee
acd941f17a
(trunk gtk) companion commit to r11738 to reduce unnecessary re-rendering in the main window
...
The main window called gtk_tree_model_filter_refilter() once per second to refresh the torrent list's filtering. This is not an efficient approach: gtk_tree_model_filter_refilter() emits a "row changed" event for every row, causing unnecessary re-rendering.
I've removed the call to gtk_tree_model_filter_refilter() and expanded the model to includes all the fields necessary for filtering. That way we only fire "row changed" events for rows that actually change.
By reducing the number of renders in steady state, this might ameliorate https://bugs.launchpad.net/ubuntu/+source/transmission/+bug/655024
However it will *not* help the related "CPU spikes to 100% on scrolling" ticket at https://trac.transmissionbt.com/ticket/3887 because rendering paused torrents is still exceptionally expensive in the murrine theme.
2011-01-21 17:07:23 +00:00