Commit Graph

9 Commits

Author SHA1 Message Date
Mike Fleetwood 2c10dd2caa Put Frame_Resizer_{Base,Extended} modules into GParted namespace (!20)
All the other modules are in the GParted namespace, except for main()
which has to be in the global namespace, so put these in the GParted
namespace too.

Closes !20 - Minor namespace and scope operator tidy-ups
2018-11-26 17:56:32 +00:00
Luca Bacci d17d129044 modern-gtk2: Use Cairo for drawing the partition resizer (!17)
GdkGC has been deprecated in the underlying C / GTK+ 2.22 library.  It
is less clearly stated but Gdk::GC is also deprecated in C++ / gtkmm.
Cairo based rendering should be used instead.
https://developer.gnome.org/gtk3/stable/gtk-migrating-2-to-3.html
https://gitlab.gnome.org/GNOME/gtk/blob/2.22.0/NEWS#L124
https://developer.gnome.org/gtkmm/2.24/classGdk_1_1GC.html

First commit in a series to convert Gdk::GC based drawing to Cairo based
drawing.  This specific commit makes the transition for the graphical
partition resizing widget that is used in the "Create New Partition",
"Paste" creating new partition and "Resize/Move" dialogs.

Cairo is not pixel based but instead uses a continuous coordinate space.
To draw in a pixel aligned way follow the guidance in the Cairo FAQ.
https://www.cairographics.org/FAQ/#sharp_lines

Additional references:
https://developer.gnome.org/gdk2/stable/gdk2-Drawing-Primitives.html#gdk-draw-line
https://developer.gnome.org/gdk2/stable/gdk2-Drawing-Primitives.html#gdk-draw-rectangle

Closes !17 - Gtk2 modernisation
2018-11-12 21:50:42 +00:00
Mike Fleetwood 8979913a3f Remove "../include/" from GParted header #includes
It made the code look a little messy, is easily resolved in the build
system and made the dependencies more complicated than needed.  Each
GParted header was tracked via multiple different names (different
numbers of "../include/" prefixes).  For example just looking at how
DialogFeatures.o depends on Utils.h:

    $ cd src
    $ make DialogFeatures.o
    $ egrep ' [^ ]*Utils.h' .deps/DialogFeatures.Po
     ../include/DialogFeatures.h ../include/../include/Utils.h \
     ../include/../include/../include/../include/../include/../include/Utils.h \
     ../include/../include/../include/Utils.h \

After removing "../include/" from the GParted header #includes, just
need to add "-I../include" to the compile command via the AM_CPPFLAGS in
src/Makefile.am.  Now the dependencies on GParted header files are
tracked under a single name (with a single "../include/" prefix).  Now
DialogFeatures.o only depends on a single name to Utils.h:

    $ make DialogFeatures.o
    $ egrep ' [^ ]*Utils.h' .deps/DialogFeatures.Po
     ../include/DialogFeatures.h ../include/Utils.h ../include/i18n.h \
2016-12-12 13:15:34 -07:00
Daniel Mustieles 3861b9257b Replace obsolete FSF postal address in copyright notices (#721565)
This is part of parent bug:
    Bug #721455 - Obsolete info in license text on multiple modules

and GNOME Goal:
    https://wiki.gnome.org/Initiatives/GnomeGoals/Proposals

    * verify all source files to make sure they have a license and a
      copyright, and that both are up-to-date

Bug #721565 -  License text contains obsolete FSF postal address
2014-01-26 10:53:23 +00:00
Mike Fleetwood 2b51d87147 Make include guards unique (#539297)
Include guards need to be unique within GParted code and all included
library header files.
    http://en.wikipedia.org/wiki/Include_guard#Difficulties

Use this model for all include guards:
    #ifndef GPARTED_FILE_NAME_H
    #define GPARTED_FILE_NAME_H
    ...
    #endif /* GPARTED_FILE_NAME_H */

Closes Bug #539297 - Make include guards unique
2013-06-05 10:57:39 -06:00
Bart Hakvoort 9830c8f63e did lots of work on the resizer, it's behaviour should be more natural and
* include/Frame_Resizer_Base.h,
  include/Frame_Resizer_Extended.h,
  src/Dialog_Base_Partition.cc,
  src/Dialog_Partition_Copy.cc,
  src/Dialog_Partition_New.cc,
  src/Dialog_Partition_Resize_Move.cc,
  src/Frame_Resizer_Base.cc,
  src/Frame_Resizer_Extended.cc: did lots of work on the resizer, it's
  behaviour should be more natural and satisfying now. (see also
  #331591)
* src/Win_GParted.cc: extended partition was resizable even when it's
  busy. fixed.
* src/ntfs.cc: made scan output more readable.
* src/FrameVisualDisk.cc: added FIXME
2006-03-01 19:16:13 +00:00
Bart Hakvoort d375f5bf4e finally got around to fix this annoying 'flickering' while using the
* include/Frame_Resizer_Base.h,
  include/Frame_Resizer_Extended.h,
  src/Frame_Resizer_Base.cc,
  src/Frame_Resizer_Extended.cc: finally got around to fix this annoying 'flickering' while using the resizer :)
2005-01-25 14:26:54 +00:00
Bart Hakvoort a1dfbee2b3 cosmetics (mostly tabfixes)
* almost all files: cosmetics (mostly tabfixes)
2004-10-01 21:09:19 +00:00
Bart Hakvoort 26d433260d Initial revision 2004-09-19 20:24:53 +00:00