You can subscribe to this list here.
| 2003 |
Jan
|
Feb
(4) |
Mar
(5) |
Apr
|
May
(5) |
Jun
(30) |
Jul
(2) |
Aug
(18) |
Sep
(14) |
Oct
(7) |
Nov
(21) |
Dec
(44) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(63) |
Feb
(94) |
Mar
(54) |
Apr
(39) |
May
(34) |
Jun
(25) |
Jul
(10) |
Aug
(33) |
Sep
(16) |
Oct
(62) |
Nov
(12) |
Dec
(2) |
| 2005 |
Jan
(71) |
Feb
(8) |
Mar
(50) |
Apr
|
May
(2) |
Jun
(12) |
Jul
(19) |
Aug
(8) |
Sep
(3) |
Oct
(2) |
Nov
|
Dec
(8) |
| 2006 |
Jan
(10) |
Feb
(1) |
Mar
(301) |
Apr
(232) |
May
(26) |
Jun
(20) |
Jul
(26) |
Aug
(79) |
Sep
(92) |
Oct
(174) |
Nov
(17) |
Dec
(93) |
| 2007 |
Jan
(27) |
Feb
(179) |
Mar
(37) |
Apr
(81) |
May
(20) |
Jun
(5) |
Jul
|
Aug
(40) |
Sep
(68) |
Oct
(8) |
Nov
(47) |
Dec
(34) |
| 2008 |
Jan
(154) |
Feb
(15) |
Mar
(5) |
Apr
(21) |
May
(4) |
Jun
(1) |
Jul
(4) |
Aug
(6) |
Sep
(8) |
Oct
(9) |
Nov
(35) |
Dec
(50) |
| 2009 |
Jan
(8) |
Feb
(10) |
Mar
(6) |
Apr
(9) |
May
(7) |
Jun
(40) |
Jul
(7) |
Aug
(5) |
Sep
(2) |
Oct
(16) |
Nov
(42) |
Dec
(5) |
| 2010 |
Jan
(3) |
Feb
(15) |
Mar
(32) |
Apr
(18) |
May
(6) |
Jun
(9) |
Jul
|
Aug
(11) |
Sep
(16) |
Oct
|
Nov
(4) |
Dec
(35) |
| 2011 |
Jan
(24) |
Feb
(6) |
Mar
(27) |
Apr
(119) |
May
(72) |
Jun
(20) |
Jul
(31) |
Aug
(88) |
Sep
(86) |
Oct
(14) |
Nov
(11) |
Dec
(30) |
| 2012 |
Jan
(4) |
Feb
(3) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2017 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <gi...@gp...> - 2011-09-12 02:11:29
|
The branch, master has been updated
via be3aec15d207ca92ee23553c93cce957751343eb (commit)
via 732e10a394d7d3210f7b70dcfafc08b6c40c5210 (commit)
from cb95aa44bfde8231ab80ae3642a2f380636b4f8d (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
doc/Makefile.am | 2 +-
src/hid/gtk/gtkhid-main.c | 16 ++++++++++++++++
2 files changed, 17 insertions(+), 1 deletions(-)
=================
Commit Messages
=================
commit be3aec15d207ca92ee23553c93cce957751343eb
Author: DJ Delorie <dj...@de...>
Commit: DJ Delorie <dj...@de...>
[windows] set GDK_PIXBUF_MODULE_FILE
If we're using a local gdk-pixbuf installation, we need to set this env
variable to point to it.
:100644 100644 1957be6... 79987ff... M src/hid/gtk/gtkhid-main.c
commit 732e10a394d7d3210f7b70dcfafc08b6c40c5210
Author: Bdale Garbee <bd...@ga...>
Commit: DJ Delorie <dj...@de...>
Invoke eps2png in $(srcdir), no .
:100644 100644 55f8fed... e6e7593... M doc/Makefile.am
=========
Changes
=========
commit be3aec15d207ca92ee23553c93cce957751343eb
Author: DJ Delorie <dj...@de...>
Commit: DJ Delorie <dj...@de...>
[windows] set GDK_PIXBUF_MODULE_FILE
If we're using a local gdk-pixbuf installation, we need to set this env
variable to point to it.
diff --git a/src/hid/gtk/gtkhid-main.c b/src/hid/gtk/gtkhid-main.c
index 1957be6..79987ff 100644
--- a/src/hid/gtk/gtkhid-main.c
+++ b/src/hid/gtk/gtkhid-main.c
@@ -2101,15 +2101,31 @@ hid_gtk_init ()
#ifdef WIN32
char * tmps;
char * share_dir;
+ char *loader_cache;
+ FILE *loader_file;
#endif
#ifdef WIN32
tmps = g_win32_get_package_installation_directory (PACKAGE "-" VERSION, NULL);
#define REST_OF_PATH G_DIR_SEPARATOR_S "share" G_DIR_SEPARATOR_S PACKAGE
+#define REST_OF_CACHE G_DIR_SEPARATOR_S "loaders.cache"
share_dir = (char *) malloc(strlen(tmps) +
strlen(REST_OF_PATH) +
1);
sprintf (share_dir, "%s%s", tmps, REST_OF_PATH);
+
+ /* Point to our gdk-pixbuf loader cache. */
+ loader_cache = (char *) malloc (strlen (bindir) +
+ strlen (REST_OF_CACHE) +
+ 1);
+ sprintf (loader_cache, "%s%s", bindir, REST_OF_CACHE);
+ loader_file = fopen (loader_cache, "r");
+ if (loader_file)
+ {
+ fclose (loader_file);
+ g_setenv ("GDK_PIXBUF_MODULE_FILE", loader_cache, TRUE);
+ }
+
free (tmps);
#undef REST_OF_PATH
printf ("\"Share\" installation path is \"%s\"\n", share_dir);
commit 732e10a394d7d3210f7b70dcfafc08b6c40c5210
Author: Bdale Garbee <bd...@ga...>
Commit: DJ Delorie <dj...@de...>
Invoke eps2png in $(srcdir), no .
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 55f8fed..e6e7593 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -171,4 +171,4 @@ else
endif
.eps.png:
- ${PERL} eps2png --png $< > $@
+ ${PERL} $(srcdir)/eps2png --png $< > $@
|
|
From: <gi...@gp...> - 2011-09-12 00:50:06
|
The branch, master has been updated
via cb95aa44bfde8231ab80ae3642a2f380636b4f8d (commit)
from 2aeb72bfcee45672651a9bcf2950785e67b578a6 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
src/hid/common/hidgl.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
=================
Commit Messages
=================
commit cb95aa44bfde8231ab80ae3642a2f380636b4f8d
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/common: Remove #include "draw.h" from hidgl.c (twice!)
:100644 100644 6bd48c3... 0bbd621... M src/hid/common/hidgl.c
=========
Changes
=========
commit cb95aa44bfde8231ab80ae3642a2f380636b4f8d
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/common: Remove #include "draw.h" from hidgl.c (twice!)
diff --git a/src/hid/common/hidgl.c b/src/hid/common/hidgl.c
index 6bd48c3..0bbd621 100644
--- a/src/hid/common/hidgl.c
+++ b/src/hid/common/hidgl.c
@@ -44,11 +44,9 @@
#include "action.h"
#include "crosshair.h"
#include "data.h"
-#include "draw.h"
#include "error.h"
#include "global.h"
#include "mymem.h"
-#include "draw.h"
#include "clip.h"
#include "hid.h"
|
|
From: <gi...@gp...> - 2011-09-11 15:42:58
|
The branch, master has been updated
via 2aeb72bfcee45672651a9bcf2950785e67b578a6 (commit)
via 59ee4898847f16cec5e08a40229c5108290fc1f8 (commit)
from c62863b2b6e8da2c60c9a7d0d5464582563f7b58 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
src/hid/gtk/ghid-route-style-selector.c | 18 +++++++++---------
src/hid/gtk/ghid-route-style-selector.h | 4 ++--
src/hid/gtk/gtkhid-main.c | 4 ++--
3 files changed, 13 insertions(+), 13 deletions(-)
=================
Commit Messages
=================
commit 2aeb72bfcee45672651a9bcf2950785e67b578a6
Author: Dima Kogan <di...@se...>
Commit: Andrew Poelstra (local) <apo...@wp...>
Re-ordered all references in the style selector dialog to have one consistent ordering.
Everything that refers to the settings in the style selector dialog now does so
in order of
Line thickness
Hole size
Hole thickness (hole + annular ring)
keepaway region size
This wasn't 100% consistent previously, which resulted in a bug (fixed in a
previous patch). This patch doesn't touch the functionality, but improves the
style to avoid future bugs.
Modified to apply on recent route style selector changes by Bert Timmerman.
Signed-off-by: Andrew Poelstra (local) <apo...@wp...>
Affects-bug: lp-844635
:100644 100644 f67d45c... 6c5e26f... M src/hid/gtk/ghid-route-style-selector.c
:100644 100644 6e934b9... b357fe0... M src/hid/gtk/ghid-route-style-selector.h
:100644 100644 2cb94be... 1957be6... M src/hid/gtk/gtkhid-main.c
commit 59ee4898847f16cec5e08a40229c5108290fc1f8
Author: Dima Kogan <di...@se...>
Commit: Andrew Poelstra (local) <apo...@wp...>
Swap via-hole and -ring size connection in route style selector dialog
Closes-bug: lp-844635
Signed-off-by: Andrew Poelstra (local) <apo...@wp...>
:100644 100644 9f8f190... f67d45c... M src/hid/gtk/ghid-route-style-selector.c
=========
Changes
=========
commit 2aeb72bfcee45672651a9bcf2950785e67b578a6
Author: Dima Kogan <di...@se...>
Commit: Andrew Poelstra (local) <apo...@wp...>
Re-ordered all references in the style selector dialog to have one consistent ordering.
Everything that refers to the settings in the style selector dialog now does so
in order of
Line thickness
Hole size
Hole thickness (hole + annular ring)
keepaway region size
This wasn't 100% consistent previously, which resulted in a bug (fixed in a
previous patch). This patch doesn't touch the functionality, but improves the
style to avoid future bugs.
Modified to apply on recent route style selector changes by Bert Timmerman.
Signed-off-by: Andrew Poelstra (local) <apo...@wp...>
Affects-bug: lp-844635
diff --git a/src/hid/gtk/ghid-route-style-selector.c b/src/hid/gtk/ghid-route-style-selector.c
index f67d45c..6c5e26f 100644
--- a/src/hid/gtk/ghid-route-style-selector.c
+++ b/src/hid/gtk/ghid-route-style-selector.c
@@ -127,10 +127,10 @@ dialog_style_changed_cb (GtkComboBox *combo, struct _dialog *dialog)
gtk_entry_set_text (GTK_ENTRY (dialog->name_entry), style->rst->Name);
ghid_coord_entry_set_value (GHID_COORD_ENTRY (dialog->line_entry),
style->rst->Thick);
- ghid_coord_entry_set_value (GHID_COORD_ENTRY (dialog->via_size_entry),
- style->rst->Diameter);
ghid_coord_entry_set_value (GHID_COORD_ENTRY (dialog->via_hole_entry),
style->rst->Hole);
+ ghid_coord_entry_set_value (GHID_COORD_ENTRY (dialog->via_size_entry),
+ style->rst->Diameter);
ghid_coord_entry_set_value (GHID_COORD_ENTRY (dialog->clearance_entry),
style->rst->Keepaway);
@@ -575,14 +575,14 @@ ghid_route_style_selector_get_accel_group (GHidRouteStyleSelector *rss)
*
* \param [in] rss The selector to be acted on
* \param [in] Thick Coord to match selection to
- * \param [in] Diameter Coord to match selection to
* \param [in] Hole Coord to match selection to
+ * \param [in] Diameter Coord to match selection to
* \param [in] Keepaway Coord to match selection to
*/
void
ghid_route_style_selector_sync (GHidRouteStyleSelector *rss,
- Coord Thick, Coord Diameter,
- Coord Hole, Coord Keepaway)
+ Coord Thick, Coord Hole,
+ Coord Diameter, Coord Keepaway)
{
GtkTreeIter iter;
gtk_tree_model_get_iter_first (GTK_TREE_MODEL (rss->model), &iter);
@@ -592,8 +592,8 @@ ghid_route_style_selector_sync (GHidRouteStyleSelector *rss,
gtk_tree_model_get (GTK_TREE_MODEL (rss->model),
&iter, DATA_COL, &style, -1);
if (style->rst->Thick == Thick &&
- style->rst->Diameter == Diameter &&
style->rst->Hole == Hole &&
+ style->rst->Diameter == Diameter &&
style->rst->Keepaway == Keepaway)
{
g_signal_handler_block (G_OBJECT (style->action), style->sig_id);
diff --git a/src/hid/gtk/ghid-route-style-selector.h b/src/hid/gtk/ghid-route-style-selector.h
index 6e934b9..b357fe0 100644
--- a/src/hid/gtk/ghid-route-style-selector.h
+++ b/src/hid/gtk/ghid-route-style-selector.h
@@ -34,8 +34,8 @@ GtkAccelGroup *ghid_route_style_selector_get_accel_group
(GHidRouteStyleSelector *rss);
void ghid_route_style_selector_sync (GHidRouteStyleSelector *rss,
- Coord Thick, Coord Diameter,
- Coord Hole, Coord Keepaway);
+ Coord Thick, Coord Hole,
+ Coord Diameter, Coord Keepaway);
void ghid_route_style_selector_empty (GHidRouteStyleSelector *rss);
G_END_DECLS /* keep c++ happy */
diff --git a/src/hid/gtk/gtkhid-main.c b/src/hid/gtk/gtkhid-main.c
index 2cb94be..1957be6 100644
--- a/src/hid/gtk/gtkhid-main.c
+++ b/src/hid/gtk/gtkhid-main.c
@@ -1154,8 +1154,8 @@ RouteStylesChanged (int argc, char **argv, Coord x, Coord y)
ghid_route_style_selector_sync
(GHID_ROUTE_STYLE_SELECTOR (ghidgui->route_style_selector),
- Settings.LineThickness, Settings.ViaThickness,
- Settings.ViaDrillingHole, Settings.Keepaway);
+ Settings.LineThickness, Settings.ViaDrillingHole,
+ Settings.ViaThickness, Settings.Keepaway);
return 0;
}
commit 59ee4898847f16cec5e08a40229c5108290fc1f8
Author: Dima Kogan <di...@se...>
Commit: Andrew Poelstra (local) <apo...@wp...>
Swap via-hole and -ring size connection in route style selector dialog
Closes-bug: lp-844635
Signed-off-by: Andrew Poelstra (local) <apo...@wp...>
diff --git a/src/hid/gtk/ghid-route-style-selector.c b/src/hid/gtk/ghid-route-style-selector.c
index 9f8f190..f67d45c 100644
--- a/src/hid/gtk/ghid-route-style-selector.c
+++ b/src/hid/gtk/ghid-route-style-selector.c
@@ -256,10 +256,10 @@ ghid_route_style_selector_edit_dialog (GHidRouteStyleSelector *rss)
(gtk_entry_get_text (GTK_ENTRY (dialog_data.name_entry)));
rst->Thick = ghid_coord_entry_get_value
(GHID_COORD_ENTRY (dialog_data.line_entry));
- rst->Diameter = ghid_coord_entry_get_value
- (GHID_COORD_ENTRY (dialog_data.via_hole_entry));
rst->Hole = ghid_coord_entry_get_value
- (GHID_COORD_ENTRY (dialog_data.via_size_entry));
+ (GHID_COORD_ENTRY (dialog_data.via_hole_entry));
+ rst->Diameter = ghid_coord_entry_get_value
+ (GHID_COORD_ENTRY (dialog_data.via_size_entry));
rst->Keepaway = ghid_coord_entry_get_value
(GHID_COORD_ENTRY (dialog_data.clearance_entry));
save = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (check_box));
|
|
From: <gi...@gp...> - 2011-09-11 06:45:52
|
The branch, master has been updated
via c62863b2b6e8da2c60c9a7d0d5464582563f7b58 (commit)
via 8876712e765a81629d8437664565fedd0945ecb8 (commit)
via 499fe7a6b88a526f6b48d671107ac3d9ec725290 (commit)
from 9dde48253c590a80a18d4a0f12e3f90c1cfedb26 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
src/hid/gtk/ghid-route-style-selector.c | 53 +++++++++++++++++++++++++++++-
src/hid/gtk/ghid-route-style-selector.h | 1 +
src/hid/gtk/gtkhid-main.c | 9 +++++
src/hid/gtk/gui-top-window.c | 2 +-
src/hid/gtk/gui.h | 1 +
5 files changed, 63 insertions(+), 3 deletions(-)
=================
Commit Messages
=================
commit c62863b2b6e8da2c60c9a7d0d5464582563f7b58
Author: Andrew Poelstra (local) <apo...@wp...>
Commit: Andrew Poelstra (local) <apo...@wp...>
Repopulate route style selector on PCBChanged action
When loading a new pcb, Bad Things happen to the route style
selector because pcb's route style data is freed. This patch
removes all styles from the route style selector and re-adds
them whenever a new pcb is loaded.
:100644 100644 a855aa7... 2cb94be... M src/hid/gtk/gtkhid-main.c
:100644 100644 97746ad... 35bdc69... M src/hid/gtk/gui-top-window.c
:100644 100644 6de2578... dede39c... M src/hid/gtk/gui.h
commit 8876712e765a81629d8437664565fedd0945ecb8
Author: Andrew Poelstra (local) <apo...@wp...>
Commit: Andrew Poelstra (local) <apo...@wp...>
Add ghid_route_style_selector_empty to GHidRouteStyleSelector
:100644 100644 e2588b2... 9f8f190... M src/hid/gtk/ghid-route-style-selector.c
:100644 100644 53c481f... 6e934b9... M src/hid/gtk/ghid-route-style-selector.h
commit 499fe7a6b88a526f6b48d671107ac3d9ec725290
Author: Andrew Poelstra (local) <apo...@wp...>
Commit: Andrew Poelstra (local) <apo...@wp...>
Add finalize function to GHidRouteStyleSelector
:100644 100644 4bc4748... e2588b2... M src/hid/gtk/ghid-route-style-selector.c
=========
Changes
=========
commit c62863b2b6e8da2c60c9a7d0d5464582563f7b58
Author: Andrew Poelstra (local) <apo...@wp...>
Commit: Andrew Poelstra (local) <apo...@wp...>
Repopulate route style selector on PCBChanged action
When loading a new pcb, Bad Things happen to the route style
selector because pcb's route style data is freed. This patch
removes all styles from the route style selector and re-adds
them whenever a new pcb is loaded.
diff --git a/src/hid/gtk/gtkhid-main.c b/src/hid/gtk/gtkhid-main.c
index a855aa7..2cb94be 100644
--- a/src/hid/gtk/gtkhid-main.c
+++ b/src/hid/gtk/gtkhid-main.c
@@ -1172,7 +1172,16 @@ PCBChanged (int argc, char **argv, Coord x, Coord y)
if (!gport->pixmap)
return 0;
+
+ if (ghidgui->route_style_selector)
+ {
+ ghid_route_style_selector_empty
+ (GHID_ROUTE_STYLE_SELECTOR (ghidgui->route_style_selector));
+ make_route_style_buttons
+ (GHID_ROUTE_STYLE_SELECTOR (ghidgui->route_style_selector));
+ }
RouteStylesChanged (0, NULL, 0, 0);
+
ghid_port_ranges_scale ();
ghid_zoom_view_fit ();
ghid_sync_with_new_layout ();
diff --git a/src/hid/gtk/gui-top-window.c b/src/hid/gtk/gui-top-window.c
index 97746ad..35bdc69 100644
--- a/src/hid/gtk/gui-top-window.c
+++ b/src/hid/gtk/gui-top-window.c
@@ -894,7 +894,7 @@ route_style_changed_cb (GHidRouteStyleSelector *rss, RouteStyleType *rst,
}
/*! \brief Configure the route style selector */
-static void
+void
make_route_style_buttons (GHidRouteStyleSelector *rss)
{
int i;
diff --git a/src/hid/gtk/gui.h b/src/hid/gtk/gui.h
index 6de2578..dede39c 100644
--- a/src/hid/gtk/gui.h
+++ b/src/hid/gtk/gui.h
@@ -343,6 +343,7 @@ void ghid_notify_save_pcb (const char *file, bool done);
void ghid_notify_filename_changed (void);
void ghid_install_accel_groups (GtkWindow *window, GhidGui *gui);
void ghid_remove_accel_groups (GtkWindow *window, GhidGui *gui);
+void make_route_style_buttons (GHidRouteStyleSelector *rss);
/* gui-utils.c
*/
commit 8876712e765a81629d8437664565fedd0945ecb8
Author: Andrew Poelstra (local) <apo...@wp...>
Commit: Andrew Poelstra (local) <apo...@wp...>
Add ghid_route_style_selector_empty to GHidRouteStyleSelector
diff --git a/src/hid/gtk/ghid-route-style-selector.c b/src/hid/gtk/ghid-route-style-selector.c
index e2588b2..9f8f190 100644
--- a/src/hid/gtk/ghid-route-style-selector.c
+++ b/src/hid/gtk/ghid-route-style-selector.c
@@ -334,26 +334,9 @@ ghid_route_style_selector_class_init (GHidRouteStyleSelectorClass *klass)
static void
ghid_route_style_selector_finalize (GObject *object)
{
- GtkTreeIter iter;
GHidRouteStyleSelector *rss = (GHidRouteStyleSelector *) object;
- gtk_tree_model_get_iter_first (GTK_TREE_MODEL (rss->model), &iter);
- do
- {
- struct _route_style *rsdata;
- gtk_tree_model_get (GTK_TREE_MODEL (rss->model),
- &iter, DATA_COL, &rsdata, -1);
- if (rsdata->action)
- {
- gtk_action_disconnect_accelerator (GTK_ACTION (rsdata->action));
- gtk_action_group_remove_action (rss->action_group,
- GTK_ACTION (rsdata->action));
- g_object_unref (G_OBJECT (rsdata->action));
- }
- gtk_tree_row_reference_free (rsdata->rref);
- free (rsdata);
- }
- while (gtk_tree_model_iter_next (GTK_TREE_MODEL (rss->model), &iter));
+ ghid_route_style_selector_empty (rss);
g_object_unref (rss->accel_group);
g_object_unref (rss->action_group);
@@ -623,3 +606,31 @@ ghid_route_style_selector_sync (GHidRouteStyleSelector *rss,
while (gtk_tree_model_iter_next (GTK_TREE_MODEL (rss->model), &iter));
}
+/*! \brief Removes all styles from a route style selector */
+void
+ghid_route_style_selector_empty (GHidRouteStyleSelector *rss)
+{
+ GtkTreeIter iter;
+ gtk_tree_model_get_iter_first (GTK_TREE_MODEL (rss->model), &iter);
+ do
+ {
+ struct _route_style *rsdata;
+ gtk_tree_model_get (GTK_TREE_MODEL (rss->model),
+ &iter, DATA_COL, &rsdata, -1);
+ if (rsdata->action)
+ {
+ gtk_action_disconnect_accelerator (GTK_ACTION (rsdata->action));
+ gtk_action_group_remove_action (rss->action_group,
+ GTK_ACTION (rsdata->action));
+ g_object_unref (G_OBJECT (rsdata->action));
+ }
+ if (rsdata->button)
+ gtk_widget_destroy (GTK_WIDGET (rsdata->button));;
+ gtk_tree_row_reference_free (rsdata->rref);
+ free (rsdata);
+ }
+ while (gtk_list_store_remove (rss->model, &iter));
+ rss->action_radio_group = NULL;
+ rss->button_radio_group = NULL;
+}
+
diff --git a/src/hid/gtk/ghid-route-style-selector.h b/src/hid/gtk/ghid-route-style-selector.h
index 53c481f..6e934b9 100644
--- a/src/hid/gtk/ghid-route-style-selector.h
+++ b/src/hid/gtk/ghid-route-style-selector.h
@@ -36,6 +36,7 @@ GtkAccelGroup *ghid_route_style_selector_get_accel_group
void ghid_route_style_selector_sync (GHidRouteStyleSelector *rss,
Coord Thick, Coord Diameter,
Coord Hole, Coord Keepaway);
+void ghid_route_style_selector_empty (GHidRouteStyleSelector *rss);
G_END_DECLS /* keep c++ happy */
#endif
commit 499fe7a6b88a526f6b48d671107ac3d9ec725290
Author: Andrew Poelstra (local) <apo...@wp...>
Commit: Andrew Poelstra (local) <apo...@wp...>
Add finalize function to GHidRouteStyleSelector
diff --git a/src/hid/gtk/ghid-route-style-selector.c b/src/hid/gtk/ghid-route-style-selector.c
index 4bc4748..e2588b2 100644
--- a/src/hid/gtk/ghid-route-style-selector.c
+++ b/src/hid/gtk/ghid-route-style-selector.c
@@ -4,8 +4,6 @@
* Please write description here.
*/
-/* TODO: write finalize function */
-
#include <glib.h>
#include <glib-object.h>
#include <gdk/gdkkeysyms.h>
@@ -22,6 +20,7 @@
struct _route_style;
struct _route_style *ghid_route_style_selector_real_add_route_style
(GHidRouteStyleSelector *, RouteStyleType *, gboolean temp);
+static void ghid_route_style_selector_finalize (GObject *object);
/*! \brief Global action creation counter */
static gint action_count;
@@ -40,6 +39,7 @@ enum {
N_COLS
};
+static GtkVBox *ghid_route_style_selector_parent_class;
static guint ghid_route_style_selector_signals[LAST_SIGNAL] = { 0 };
struct _GHidRouteStyleSelector
@@ -305,6 +305,10 @@ ghid_route_style_selector_init (GHidRouteStyleSelector *rss)
static void
ghid_route_style_selector_class_init (GHidRouteStyleSelectorClass *klass)
{
+ GObjectClass *object_class = (GObjectClass *) klass;
+
+ ghid_route_style_selector_parent_class = g_type_class_peek_parent (klass);
+
ghid_route_style_selector_signals[SELECT_STYLE_SIGNAL] =
g_signal_new ("select-style",
G_TYPE_FROM_CLASS (klass),
@@ -321,6 +325,40 @@ ghid_route_style_selector_class_init (GHidRouteStyleSelectorClass *klass)
NULL, NULL,
g_cclosure_marshal_VOID__BOOLEAN, G_TYPE_NONE,
1, G_TYPE_BOOLEAN);
+
+ object_class->finalize = ghid_route_style_selector_finalize;
+}
+
+/*! \brief Clean up object before garbage collection
+ */
+static void
+ghid_route_style_selector_finalize (GObject *object)
+{
+ GtkTreeIter iter;
+ GHidRouteStyleSelector *rss = (GHidRouteStyleSelector *) object;
+
+ gtk_tree_model_get_iter_first (GTK_TREE_MODEL (rss->model), &iter);
+ do
+ {
+ struct _route_style *rsdata;
+ gtk_tree_model_get (GTK_TREE_MODEL (rss->model),
+ &iter, DATA_COL, &rsdata, -1);
+ if (rsdata->action)
+ {
+ gtk_action_disconnect_accelerator (GTK_ACTION (rsdata->action));
+ gtk_action_group_remove_action (rss->action_group,
+ GTK_ACTION (rsdata->action));
+ g_object_unref (G_OBJECT (rsdata->action));
+ }
+ gtk_tree_row_reference_free (rsdata->rref);
+ free (rsdata);
+ }
+ while (gtk_tree_model_iter_next (GTK_TREE_MODEL (rss->model), &iter));
+
+ g_object_unref (rss->accel_group);
+ g_object_unref (rss->action_group);
+
+ G_OBJECT_CLASS (ghid_route_style_selector_parent_class)->finalize (object);
}
/* PUBLIC FUNCTIONS */
|
|
From: <gi...@gp...> - 2011-09-09 18:20:04
|
The branch, master has been updated
via 9dde48253c590a80a18d4a0f12e3f90c1cfedb26 (commit)
from 7d7b21bc0a770553fdf6cd70bb3eeab4c06f7071 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
po/POTFILES.in | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
=================
Commit Messages
=================
commit 9dde48253c590a80a18d4a0f12e3f90c1cfedb26
Author: Bert Timmerman <ber...@xs...>
Commit: DJ Delorie <dj...@de...>
Remove the src/hid/gtk/gui-dialog-size.c entry from the translatable files list.
This is a completion of commit:
a914d5ba58104d8559395b66798b35761afb991a
"Replace old route style selector with GHidRouteStyleSelector"
dated 20110903 11:09 PM
:100644 100644 8d62595... c3eb4ea... M po/POTFILES.in
=========
Changes
=========
commit 9dde48253c590a80a18d4a0f12e3f90c1cfedb26
Author: Bert Timmerman <ber...@xs...>
Commit: DJ Delorie <dj...@de...>
Remove the src/hid/gtk/gui-dialog-size.c entry from the translatable files list.
This is a completion of commit:
a914d5ba58104d8559395b66798b35761afb991a
"Replace old route style selector with GHidRouteStyleSelector"
dated 20110903 11:09 PM
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 8d62595..c3eb4ea 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -25,7 +25,6 @@ src/hid/gtk/gtkhid-main.c
src/hid/gtk/gui-command-window.c
src/hid/gtk/gui-config.c
src/hid/gtk/gui-dialog-print.c
-src/hid/gtk/gui-dialog-size.c
src/hid/gtk/gui-dialog.c
src/hid/gtk/gui-drc-window.c
src/hid/gtk/gui-keyref-window.c
|
|
From: <gi...@gp...> - 2011-09-09 00:59:28
|
The branch, master has been updated
via 7d7b21bc0a770553fdf6cd70bb3eeab4c06f7071 (commit)
from a3b303c83ceb535e6068623b77eb10b14c0ca97a (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
src/hid/gtk/ghid-layer-selector.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
=================
Commit Messages
=================
commit 7d7b21bc0a770553fdf6cd70bb3eeab4c06f7071
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Filter out double clicks on the layer selector widget
This makes things behave a little nicer if you click to toggle a layer's
visibility twice in quick succession. Previously, this would be
interpreted as a double-click, causing an extra synthetic click event
which would toggle the visibility an extra time.
:100644 100644 a2bb3ff... 639e2be... M src/hid/gtk/ghid-layer-selector.c
=========
Changes
=========
commit 7d7b21bc0a770553fdf6cd70bb3eeab4c06f7071
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Filter out double clicks on the layer selector widget
This makes things behave a little nicer if you click to toggle a layer's
visibility twice in quick succession. Previously, this would be
interpreted as a double-click, causing an extra synthetic click event
which would toggle the visibility an extra time.
diff --git a/src/hid/gtk/ghid-layer-selector.c b/src/hid/gtk/ghid-layer-selector.c
index a2bb3ff..639e2be 100644
--- a/src/hid/gtk/ghid-layer-selector.c
+++ b/src/hid/gtk/ghid-layer-selector.c
@@ -193,8 +193,11 @@ button_press_cb (GHidLayerSelector *ls, GdkEventButton *event)
GtkTreeViewColumn *column;
GtkTreePath *path;
- /* Ignore all but left-clicks */
- if (event->button != 1)
+ /* Ignore the synthetic presses caused by double and tripple clicks, and
+ * also ignore all but left-clicks
+ */
+ if (event->type != GDK_BUTTON_PRESS ||
+ event->button != 1)
return TRUE;
if (gtk_tree_view_get_path_at_pos (GTK_TREE_VIEW (ls),
|
|
From: <gi...@gp...> - 2011-09-07 20:24:20
|
The branch, master has been updated
via a3b303c83ceb535e6068623b77eb10b14c0ca97a (commit)
via ba4c4e33a07491a0b1952d600f4166c89f4b54ab (commit)
from 6762885654463db6b39e6a6dfbc1911d196146fc (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
src/hid/gtk/gtkhid-main.c | 3 +
src/hid/gtk/gui-top-window.c | 299 +++++++++++++++++++++++++-----------------
src/hid/gtk/gui.h | 5 +-
3 files changed, 188 insertions(+), 119 deletions(-)
=================
Commit Messages
=================
commit a3b303c83ceb535e6068623b77eb10b14c0ca97a
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Update file-changed notification bar to match gedit a bit more
1. Add a stock "refresh" image to the "Reload" button.
2. Change the message text when the board has modifications.
3. Reload without further prompting if the user presses "Reload",
even if the board is modified. (We already warned them due to 2.)
:100644 100644 e598d46... 97746ad... M src/hid/gtk/gui-top-window.c
commit ba4c4e33a07491a0b1952d600f4166c89f4b54ab
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Reimplement file-change monitor without GFileMonitor
I must have had a brain-fail when I hooked up setting up the file-changed
monitor in the function which sets the window title.
NB: That also gets called after every menu operation!
A better place to hook up the monitor would be ghid_sync_with_new_layout(),
however changing this alone revealed another issue - we would get notified
for changes WE make to the files. We were avoiding those events as the
file-monitor was being reset before it could pop up, at the end of the
menu action which invoked the save).
However - due to a race condition bug in GLib / GIO, we would sometimes
see change notify events for changes we made, even when we hooked up
the GFileMonitor AFTER having saved (and synced) our changes to disk.
Rather than attempt to work around this bug, implement the file-change
notification in a much more simple way - look at the file mtime when we
update the layout, and at each time the mouse pointer enters the main
window. FWIW, this is how gedit currently achieves the same feature.
:100644 100644 89d50be... a855aa7... M src/hid/gtk/gtkhid-main.c
:100644 100644 73bada5... e598d46... M src/hid/gtk/gui-top-window.c
:100644 100644 dfed2c6... 6de2578... M src/hid/gtk/gui.h
=========
Changes
=========
commit a3b303c83ceb535e6068623b77eb10b14c0ca97a
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Update file-changed notification bar to match gedit a bit more
1. Add a stock "refresh" image to the "Reload" button.
2. Change the message text when the board has modifications.
3. Reload without further prompting if the user presses "Reload",
even if the board is modified. (We already warned them due to 2.)
diff --git a/src/hid/gtk/gui-top-window.c b/src/hid/gtk/gui-top-window.c
index e598d46..97746ad 100644
--- a/src/hid/gtk/gui-top-window.c
+++ b/src/hid/gtk/gui-top-window.c
@@ -220,7 +220,7 @@ info_bar_response_cb (GtkInfoBar *info_bar,
_gui->info_bar = NULL;
if (response_id == GTK_RESPONSE_ACCEPT)
- hid_actionl ("LoadFrom", "revert", "none", NULL);
+ RevertPCB ();
}
static void
@@ -234,39 +234,49 @@ close_file_modified_externally_prompt (void)
static void
show_file_modified_externally_prompt (void)
{
+ GtkWidget *button;
+ GtkWidget *button_image;
GtkWidget *icon;
GtkWidget *label;
GtkWidget *content_area;
char *file_path_utf8;
+ char *secondary_text;
char *markup;
close_file_modified_externally_prompt ();
- ghidgui->info_bar = gtk_info_bar_new_with_buttons (_("Reload"),
- GTK_RESPONSE_ACCEPT,
- GTK_STOCK_CANCEL,
- GTK_RESPONSE_CANCEL,
- NULL);
+ ghidgui->info_bar = gtk_info_bar_new ();
+
+ button = gtk_info_bar_add_button (GTK_INFO_BAR (ghidgui->info_bar),
+ _("Reload"),
+ GTK_RESPONSE_ACCEPT);
+ button_image = gtk_image_new_from_stock (GTK_STOCK_REFRESH,
+ GTK_ICON_SIZE_BUTTON);
+ gtk_button_set_image (GTK_BUTTON (button), button_image);
+
+ gtk_info_bar_add_button (GTK_INFO_BAR (ghidgui->info_bar),
+ GTK_STOCK_CANCEL,
+ GTK_RESPONSE_CANCEL);
+ gtk_info_bar_set_message_type (GTK_INFO_BAR (ghidgui->info_bar),
+ GTK_MESSAGE_WARNING);
gtk_box_pack_start (GTK_BOX (ghidgui->vbox_middle),
ghidgui->info_bar, FALSE, FALSE, 0);
gtk_box_reorder_child (GTK_BOX (ghidgui->vbox_middle), ghidgui->info_bar, 0);
- gtk_info_bar_set_message_type (GTK_INFO_BAR (ghidgui->info_bar),
- GTK_MESSAGE_WARNING);
g_signal_connect (ghidgui->info_bar, "response",
G_CALLBACK (info_bar_response_cb), ghidgui);
file_path_utf8 = g_filename_to_utf8 (PCB->Filename, -1, NULL, NULL, NULL);
- markup =
- g_markup_printf_escaped (_("<b>The file %s has changed on disk</b>\n"
- "\n"
- "Do you want to reload the file?"),
- file_path_utf8);
+
+ secondary_text = PCB->Changed ? "Do you want to drop your changes and reload the file?" :
+ "Do you want to reload the file?";
+
+ markup = g_markup_printf_escaped (_("<b>The file %s has changed on disk</b>\n\n%s"),
+ file_path_utf8, secondary_text);
g_free (file_path_utf8);
- content_area =
- gtk_info_bar_get_content_area (GTK_INFO_BAR (ghidgui->info_bar));
+ content_area = gtk_info_bar_get_content_area (GTK_INFO_BAR (ghidgui->info_bar));
icon = gtk_image_new_from_stock (GTK_STOCK_DIALOG_WARNING,
GTK_ICON_SIZE_DIALOG);
commit ba4c4e33a07491a0b1952d600f4166c89f4b54ab
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Reimplement file-change monitor without GFileMonitor
I must have had a brain-fail when I hooked up setting up the file-changed
monitor in the function which sets the window title.
NB: That also gets called after every menu operation!
A better place to hook up the monitor would be ghid_sync_with_new_layout(),
however changing this alone revealed another issue - we would get notified
for changes WE make to the files. We were avoiding those events as the
file-monitor was being reset before it could pop up, at the end of the
menu action which invoked the save).
However - due to a race condition bug in GLib / GIO, we would sometimes
see change notify events for changes we made, even when we hooked up
the GFileMonitor AFTER having saved (and synced) our changes to disk.
Rather than attempt to work around this bug, implement the file-change
notification in a much more simple way - look at the file mtime when we
update the layout, and at each time the mouse pointer enters the main
window. FWIW, this is how gedit currently achieves the same feature.
diff --git a/src/hid/gtk/gtkhid-main.c b/src/hid/gtk/gtkhid-main.c
index 89d50be..a855aa7 100644
--- a/src/hid/gtk/gtkhid-main.c
+++ b/src/hid/gtk/gtkhid-main.c
@@ -2170,6 +2170,9 @@ hid_gtk_init ()
ghid_hid.flush_debug_draw = ghid_flush_debug_draw;
ghid_hid.finish_debug_draw = ghid_finish_debug_draw;
+ ghid_hid.notify_save_pcb = ghid_notify_save_pcb;
+ ghid_hid.notify_filename_changed = ghid_notify_filename_changed;
+
hid_register_hid (&ghid_hid);
#include "gtk_lists.h"
}
diff --git a/src/hid/gtk/gui-top-window.c b/src/hid/gtk/gui-top-window.c
index 73bada5..e598d46 100644
--- a/src/hid/gtk/gui-top-window.c
+++ b/src/hid/gtk/gui-top-window.c
@@ -211,6 +211,126 @@ top_window_configure_event_cb (GtkWidget * widget, GdkEventConfigure * ev,
return FALSE;
}
+static void
+info_bar_response_cb (GtkInfoBar *info_bar,
+ gint response_id,
+ GhidGui *_gui)
+{
+ gtk_widget_destroy (_gui->info_bar);
+ _gui->info_bar = NULL;
+
+ if (response_id == GTK_RESPONSE_ACCEPT)
+ hid_actionl ("LoadFrom", "revert", "none", NULL);
+}
+
+static void
+close_file_modified_externally_prompt (void)
+{
+ if (ghidgui->info_bar != NULL)
+ gtk_widget_destroy (ghidgui->info_bar);
+ ghidgui->info_bar = NULL;
+}
+
+static void
+show_file_modified_externally_prompt (void)
+{
+ GtkWidget *icon;
+ GtkWidget *label;
+ GtkWidget *content_area;
+ char *file_path_utf8;
+ char *markup;
+
+ close_file_modified_externally_prompt ();
+
+ ghidgui->info_bar = gtk_info_bar_new_with_buttons (_("Reload"),
+ GTK_RESPONSE_ACCEPT,
+ GTK_STOCK_CANCEL,
+ GTK_RESPONSE_CANCEL,
+ NULL);
+ gtk_box_pack_start (GTK_BOX (ghidgui->vbox_middle),
+ ghidgui->info_bar, FALSE, FALSE, 0);
+ gtk_box_reorder_child (GTK_BOX (ghidgui->vbox_middle), ghidgui->info_bar, 0);
+
+ gtk_info_bar_set_message_type (GTK_INFO_BAR (ghidgui->info_bar),
+ GTK_MESSAGE_WARNING);
+
+ g_signal_connect (ghidgui->info_bar, "response",
+ G_CALLBACK (info_bar_response_cb), ghidgui);
+
+ file_path_utf8 = g_filename_to_utf8 (PCB->Filename, -1, NULL, NULL, NULL);
+ markup =
+ g_markup_printf_escaped (_("<b>The file %s has changed on disk</b>\n"
+ "\n"
+ "Do you want to reload the file?"),
+ file_path_utf8);
+ g_free (file_path_utf8);
+
+ content_area =
+ gtk_info_bar_get_content_area (GTK_INFO_BAR (ghidgui->info_bar));
+
+ icon = gtk_image_new_from_stock (GTK_STOCK_DIALOG_WARNING,
+ GTK_ICON_SIZE_DIALOG);
+ gtk_box_pack_start (GTK_BOX (content_area),
+ icon, FALSE, FALSE, 0);
+
+ label = gtk_label_new ("");
+ gtk_box_pack_start (GTK_BOX (content_area),
+ label, TRUE, TRUE, 6);
+
+ gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
+ gtk_label_set_markup (GTK_LABEL (label), markup);
+ g_free (markup);
+
+ gtk_misc_set_alignment (GTK_MISC (label), 0., 0.5);
+
+ gtk_widget_show_all (ghidgui->info_bar);
+}
+
+static bool
+check_externally_modified (void)
+{
+ GFile *file;
+ GFileInfo *info;
+ GTimeVal timeval;
+
+ /* Treat zero time as a flag to indicate we've not got an mtime yet */
+ if (PCB->Filename == NULL ||
+ (ghidgui->our_mtime.tv_sec == 0 &&
+ ghidgui->our_mtime.tv_usec == 0))
+ return false;
+
+ file = g_file_new_for_path (PCB->Filename);
+ info = g_file_query_info (file, G_FILE_ATTRIBUTE_TIME_MODIFIED,
+ G_FILE_QUERY_INFO_NONE, NULL, NULL);
+ g_object_unref (file);
+
+ if (info == NULL ||
+ !g_file_info_has_attribute (info, G_FILE_ATTRIBUTE_TIME_MODIFIED))
+ return false;
+
+ g_file_info_get_modification_time (info, &timeval); //&ghidgui->last_seen_mtime);
+ g_object_unref (info);
+
+ /* Ignore when the file on disk is the same age as when we last looked */
+ if (timeval.tv_sec == ghidgui->last_seen_mtime.tv_sec &&
+ timeval.tv_usec == ghidgui->last_seen_mtime.tv_usec)
+ return false;
+
+ ghidgui->last_seen_mtime = timeval;
+
+ return (ghidgui->last_seen_mtime.tv_sec > ghidgui->our_mtime.tv_sec) ||
+ (ghidgui->last_seen_mtime.tv_sec == ghidgui->our_mtime.tv_sec &&
+ ghidgui->last_seen_mtime.tv_usec > ghidgui->our_mtime.tv_usec);
+}
+
+static gboolean
+top_window_enter_cb (GtkWidget *widget, GdkEvent *event, GHidPort *port)
+{
+ if (check_externally_modified ())
+ show_file_modified_externally_prompt ();
+
+ return FALSE;
+}
/*! \brief Menu action callback function
* \par Function Description
@@ -262,6 +382,34 @@ void ghid_hotkey_cb (int which)
(gpointer) ghid_hotkey_actions[which].node);
}
+static void
+update_board_mtime_from_disk (void)
+{
+ GFile *file;
+ GFileInfo *info;
+
+ ghidgui->our_mtime.tv_sec = 0;
+ ghidgui->our_mtime.tv_usec = 0;
+ ghidgui->last_seen_mtime = ghidgui->our_mtime;
+
+ if (PCB->Filename == NULL)
+ return;
+
+ file = g_file_new_for_path (PCB->Filename);
+ info = g_file_query_info (file, G_FILE_ATTRIBUTE_TIME_MODIFIED,
+ G_FILE_QUERY_INFO_NONE, NULL, NULL);
+ g_object_unref (file);
+
+ if (info == NULL ||
+ !g_file_info_has_attribute (info, G_FILE_ATTRIBUTE_TIME_MODIFIED))
+ return;
+
+ g_file_info_get_modification_time (info, &ghidgui->our_mtime);
+ g_object_unref (info);
+
+ ghidgui->last_seen_mtime = ghidgui->our_mtime;
+}
+
/* Sync toggle states that were saved with the layout and notify the
| config code to update Settings values it manages.
*/
@@ -277,6 +425,27 @@ ghid_sync_with_new_layout (void)
ghid_window_set_name_label (PCB->Name);
ghid_set_status_line_label ();
+ close_file_modified_externally_prompt ();
+ update_board_mtime_from_disk ();
+}
+
+void
+ghid_notify_save_pcb (const char *filename, bool done)
+{
+ /* Do nothing if it is not the active PCB file that is being saved.
+ */
+ if (PCB->Filename == NULL || strcmp (filename, PCB->Filename) != 0)
+ return;
+
+ if (done)
+ update_board_mtime_from_disk ();
+}
+
+void
+ghid_notify_filename_changed (void)
+{
+ /* Pick up the mtime of the new PCB file */
+ update_board_mtime_from_disk ();
}
/* ---------------------------------------------------------------------------
@@ -467,119 +636,6 @@ ghid_remove_accel_groups (GtkWindow *window, GhidGui *gui)
(GHID_ROUTE_STYLE_SELECTOR (gui->route_style_selector)));
}
-static void
-info_bar_response_cb (GtkInfoBar *info_bar,
- gint response_id,
- gpointer user_data)
-{
- GhidGui *_gui = (GhidGui *)user_data;
-
- gtk_widget_destroy (_gui->info_bar);
- _gui->info_bar = NULL;
-
- if (response_id == GTK_RESPONSE_ACCEPT)
- hid_actionl ("LoadFrom", "revert", "none", NULL);
-}
-
-static void
-file_changed_cb (GFileMonitor *monitor,
- GFile *file,
- GFile *other_file,
- GFileMonitorEvent event_type,
- gpointer user_data)
-{
- GhidGui *_gui = (GhidGui *)user_data;
- GtkWidget *icon;
- GtkWidget *label;
- GtkWidget *content_area;
- char *file_path;
- char *file_path_utf8;
- char *markup;
-
- if (event_type != G_FILE_MONITOR_EVENT_CHANGED)
- return;
-
- /* File has changed on disk */
-
- if (_gui->info_bar)
- gtk_widget_destroy (_gui->info_bar);
-
- _gui->info_bar = gtk_info_bar_new_with_buttons (_("Reload"),
- GTK_RESPONSE_ACCEPT,
- GTK_STOCK_CANCEL,
- GTK_RESPONSE_CANCEL,
- NULL);
- gtk_box_pack_start (GTK_BOX (_gui->vbox_middle),
- _gui->info_bar, FALSE, FALSE, 0);
- gtk_box_reorder_child (GTK_BOX (_gui->vbox_middle), _gui->info_bar, 0);
-
- gtk_info_bar_set_message_type (GTK_INFO_BAR (_gui->info_bar),
- GTK_MESSAGE_WARNING);
-
- g_signal_connect (_gui->info_bar, "response",
- G_CALLBACK (info_bar_response_cb), _gui);
-
- file_path = g_file_get_path (file);
- file_path_utf8 = g_filename_to_utf8 (file_path, -1, NULL, NULL, NULL);
- g_free (file_path);
- markup =
- g_markup_printf_escaped (_("<b>The file %s has changed on disk</b>\n"
- "\n"
- "Do you want to reload the file?"),
- file_path_utf8);
- g_free (file_path_utf8);
-
- content_area =
- gtk_info_bar_get_content_area (GTK_INFO_BAR (_gui->info_bar));
-
- icon = gtk_image_new_from_stock (GTK_STOCK_DIALOG_WARNING,
- GTK_ICON_SIZE_DIALOG);
- gtk_box_pack_start (GTK_BOX (content_area),
- icon, FALSE, FALSE, 0);
-
- label = gtk_label_new ("");
- gtk_box_pack_start (GTK_BOX (content_area),
- label, TRUE, TRUE, 6);
-
- gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
- gtk_label_set_markup (GTK_LABEL (label), markup);
- g_free (markup);
-
- gtk_misc_set_alignment (GTK_MISC (label), 0., 0.5);
-
- gtk_widget_show_all (_gui->info_bar);
-}
-
-static void
-connect_file_change_monitor (GhidGui *_gui, char *filename)
-{
- GFile *file;
-
- if (_gui->file_monitor != NULL)
- g_object_unref (_gui->file_monitor);
- _gui->file_monitor = NULL;
-
- if (_gui->info_bar != NULL)
- gtk_widget_destroy (_gui->info_bar);
- _gui->info_bar = NULL;
-
- if (filename == NULL)
- return;
-
- file = g_file_new_for_path (filename);
-
- /* XXX: Could hook up more error handling for g_file_monitor_file */
- _gui->file_monitor = g_file_monitor_file (file,
- G_FILE_MONITOR_NONE,
- NULL,
- NULL);
- g_object_unref (file);
-
- g_signal_connect (_gui->file_monitor, "changed",
- G_CALLBACK (file_changed_cb), _gui);
-}
-
-
/* Refreshes the window title bar and sets the PCB name to the
* window title bar or to a seperate label
*/
@@ -608,11 +664,6 @@ ghid_window_set_name_label (gchar * name)
gtk_window_set_title (GTK_WINDOW (gport->top_window), str);
g_free (str);
g_free (filename);
-
- if (PCB->Filename && *PCB->Filename)
- connect_file_change_monitor (ghidgui, PCB->Filename);
- else
- connect_file_change_monitor (ghidgui, NULL);
}
static void
@@ -1319,6 +1370,8 @@ ghid_build_pcb_top_window (void)
port);
g_signal_connect (G_OBJECT (gport->top_window), "configure_event",
G_CALLBACK (top_window_configure_event_cb), port);
+ g_signal_connect (gport->top_window, "enter-notify-event",
+ G_CALLBACK (top_window_enter_cb), port);
g_signal_connect (G_OBJECT (gport->drawing_area), "configure_event",
G_CALLBACK (ghid_port_drawing_area_configure_event_cb),
port);
diff --git a/src/hid/gtk/gui.h b/src/hid/gtk/gui.h
index dfed2c6..6de2578 100644
--- a/src/hid/gtk/gui.h
+++ b/src/hid/gtk/gui.h
@@ -115,7 +115,8 @@ typedef struct
GtkWidget *vbox_middle;
GtkWidget *info_bar;
- GFileMonitor *file_monitor;
+ GTimeVal our_mtime;
+ GTimeVal last_seen_mtime;
GtkWidget *h_range, *v_range;
GtkObject *h_adjustment, *v_adjustment;
@@ -338,6 +339,8 @@ int ghid_drc_window_throw_dialog (void);
/* In gui-top-window.c */
void ghid_update_toggle_flags (void);
+void ghid_notify_save_pcb (const char *file, bool done);
+void ghid_notify_filename_changed (void);
void ghid_install_accel_groups (GtkWindow *window, GhidGui *gui);
void ghid_remove_accel_groups (GtkWindow *window, GhidGui *gui);
|
|
From: <gi...@gp...> - 2011-09-07 03:43:06
|
The branch, master has been updated
via 6762885654463db6b39e6a6dfbc1911d196146fc (commit)
from d46ff633fa3f700c3314a4043dc60fa40b4d827f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
src/action.c | 17 +++++++++++++++--
1 files changed, 15 insertions(+), 2 deletions(-)
=================
Commit Messages
=================
commit 6762885654463db6b39e6a6dfbc1911d196146fc
Author: DJ Delorie <dj...@de...>
Commit: DJ Delorie <dj...@de...>
Warn user if footprints can't be found on import
Since the message log doesn't make it obvious, add a pop-up dialog
whenever there are missing footprints during an import.
Affects-bug: lp-828388
:100644 100644 4d545fe... 1923cf9... M src/action.c
=========
Changes
=========
commit 6762885654463db6b39e6a6dfbc1911d196146fc
Author: DJ Delorie <dj...@de...>
Commit: DJ Delorie <dj...@de...>
Warn user if footprints can't be found on import
Since the message log doesn't make it obvious, add a pop-up dialog
whenever there are missing footprints during an import.
Affects-bug: lp-828388
diff --git a/src/action.c b/src/action.c
index 4d545fe..1923cf9 100644
--- a/src/action.c
+++ b/src/action.c
@@ -6958,6 +6958,8 @@ them.
%end-doc */
+static int number_of_footprints_not_found;
+
static int
parse_layout_attribute_units (char *name, int def)
{
@@ -6987,6 +6989,7 @@ ActionElementList (int argc, char **argv, Coord x, Coord y)
}
END_LOOP;
element_cache = NULL;
+ number_of_footprints_not_found = 0;
return 0;
}
@@ -7005,6 +7008,10 @@ ActionElementList (int argc, char **argv, Coord x, Coord y)
}
}
END_LOOP;
+ if (number_of_footprints_not_found > 0)
+ gui->confirm_dialog ("Not all requested footprints were found.\n"
+ "See the message log for details",
+ "Ok", NULL);
return 0;
}
@@ -7042,7 +7049,10 @@ ActionElementList (int argc, char **argv, Coord x, Coord y)
#endif
/* Not on board, need to add it. */
if (LoadFootprint(argc, args, x, y))
- return 1;
+ {
+ number_of_footprints_not_found ++;
+ return 1;
+ }
nx = PCB->MaxWidth / 2;
ny = PCB->MaxHeight / 2;
@@ -7083,7 +7093,10 @@ ActionElementList (int argc, char **argv, Coord x, Coord y)
/* Different footprint, we need to swap them out. */
if (LoadFootprint(argc, args, x, y))
- return 1;
+ {
+ number_of_footprints_not_found ++;
+ return 1;
+ }
er = ElementOrientation (e);
pe = PASTEBUFFER->Data->Element->data;
|
|
From: <gi...@gp...> - 2011-09-06 05:58:58
|
The branch, master has been updated
via d46ff633fa3f700c3314a4043dc60fa40b4d827f (commit)
from 23fdbee2cd45accc1f11856e47508cc49251687e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
src/search.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
=================
Commit Messages
=================
commit d46ff633fa3f700c3314a4043dc60fa40b4d827f
Author: DJ Delorie <dj...@de...>
Commit: DJ Delorie <dj...@de...>
Fix math error in IsPointOnLine()
The math in C didn't match the math in the comment (and, apparently,
hasn't for quite some time).
To test: Draw three lines, from 1000,3000 to 1500,2500, then to
2000,3000, then back to the start at 1000,3000. Without this patch, the
first and last lines are removed and replaced with a copy of the second
line.
:100644 100644 f12f473... 60e8dde... M src/search.c
=========
Changes
=========
commit d46ff633fa3f700c3314a4043dc60fa40b4d827f
Author: DJ Delorie <dj...@de...>
Commit: DJ Delorie <dj...@de...>
Fix math error in IsPointOnLine()
The math in C didn't match the math in the comment (and, apparently,
hasn't for quite some time).
To test: Draw three lines, from 1000,3000 to 1500,2500, then to
2000,3000, then back to the start at 1000,3000. Without this patch, the
first and last lines are removed and replaced with a copy of the second
line.
diff --git a/src/search.c b/src/search.c
index f12f473..60e8dde 100644
--- a/src/search.c
+++ b/src/search.c
@@ -727,7 +727,7 @@ IsPointOnLine (Coord X, Coord Y, Coord Radius, LineTypePtr Line)
else D1 = 0;
/* Get distance from (X, Y) to Q */
D2 = ((double) (X - Line->Point1.X) * (Line->Point2.Y - Line->Point1.Y)
- + (double) (Y - Line->Point1.Y) * (Line->Point2.X - Line->Point1.X)) / L;
+ - (double) (Y - Line->Point1.Y) * (Line->Point2.X - Line->Point1.X)) / L;
/* Total distance is then the pythagorean sum of these */
return sqrt (D1*D1 + D2*D2) <= Radius + Line->Thickness / 2;
}
|
|
From: <gi...@gp...> - 2011-09-06 00:22:21
|
The branch, master has been updated
via 23fdbee2cd45accc1f11856e47508cc49251687e (commit)
from 84ae26807325c8d2d95cd3ec3c2a6e61c217626e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
src/action.c | 4 +---
src/file.c | 41 ++++++++++++++++++++++++++++++++++-------
src/file.h | 1 +
src/hid/common/actions.c | 6 ++++--
4 files changed, 40 insertions(+), 12 deletions(-)
=================
Commit Messages
=================
commit 23fdbee2cd45accc1f11856e47508cc49251687e
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
Implement a new RevertPCB() call, sharing code with LoadPCB()
The RevertPCB() takes no filename parameter, and aside from that,
the only difference to LoadPCB is that when it calls the GUI's
"PCBChanged" action, it passes a new "revert" argument. This should
let the GUIs optionally do less work resetting the view state for a
board being reverted.
:100644 100644 55825a9... 4d545fe... M src/action.c
:100644 100644 7769057... be7f6a5... M src/file.c
:100644 100644 6cf7a99... 4056bc9... M src/file.h
:100644 100644 da3bbfd... 13bb129... M src/hid/common/actions.c
=========
Changes
=========
commit 23fdbee2cd45accc1f11856e47508cc49251687e
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
Implement a new RevertPCB() call, sharing code with LoadPCB()
The RevertPCB() takes no filename parameter, and aside from that,
the only difference to LoadPCB is that when it calls the GUI's
"PCBChanged" action, it passes a new "revert" argument. This should
let the GUIs optionally do less work resetting the view state for a
board being reverted.
diff --git a/src/action.c b/src/action.c
index 55825a9..4d545fe 100644
--- a/src/action.c
+++ b/src/action.c
@@ -5816,7 +5816,6 @@ ActionLoadFrom (int argc, char **argv, Coord x, Coord y)
{
char *function;
char *name;
- char fname[256];
if (argc < 2)
AFAIL (loadfrom);
@@ -5860,8 +5859,7 @@ ActionLoadFrom (int argc, char **argv, Coord x, Coord y)
&& (!PCB->Changed
|| gui->confirm_dialog (_("OK to override changes?"), 0)))
{
- strcpy (fname, PCB->Filename); /*Calling LoadPCB(PCB->Filename) changes the content of PCB->Filename. */
- LoadPCB (fname);
+ RevertPCB ();
}
return 0;
diff --git a/src/file.c b/src/file.c
index 7769057..be7f6a5 100644
--- a/src/file.c
+++ b/src/file.c
@@ -383,11 +383,15 @@ set_some_route_style ()
* load PCB
* parse the file with enabled 'PCB mode' (see parser)
* if successful, update some other stuff
+ *
+ * If revert is true, we pass "revert" as a parameter
+ * to the HID's PCBChanged action.
*/
-int
-LoadPCB (char *Filename)
+static int
+real_load_pcb (char *Filename, bool revert)
{
const char *unit_suffix;
+ char *new_filename;
PCBTypePtr newPCB = CreateNewPCB (false);
PCBTypePtr oldPCB;
#ifdef DEBUG
@@ -397,6 +401,8 @@ LoadPCB (char *Filename)
start = clock ();
#endif
+ new_filename = strdup (Filename);
+
oldPCB = PCB;
PCB = newPCB;
@@ -404,7 +410,7 @@ LoadPCB (char *Filename)
newPCB->Font.Valid = false;
/* new data isn't added to the undo list */
- if (!ParsePCB (PCB, Filename))
+ if (!ParsePCB (PCB, new_filename))
{
RemovePCB (oldPCB);
@@ -423,13 +429,13 @@ LoadPCB (char *Filename)
{
Message (_
("File '%s' has no font information, using default font\n"),
- Filename);
+ new_filename);
PCB->Font.Valid = true;
}
/* clear 'changed flag' */
SetChangedFlag (false);
- PCB->Filename = strdup (Filename);
+ PCB->Filename = new_filename;
/* just in case a bad file saved file is loaded */
/* Use attribute PCB::grid::unit as unit, if we can */
@@ -446,13 +452,16 @@ LoadPCB (char *Filename)
set_some_route_style ();
- hid_action ("PCBChanged");
+ if (revert)
+ hid_actionl ("PCBChanged", "revert", NULL);
+ else
+ hid_action ("PCBChanged");
#ifdef DEBUG
end = clock ();
elapsed = ((double) (end - start)) / CLOCKS_PER_SEC;
gui->log ("Loading file %s took %f seconds of CPU time\n",
- Filename, elapsed);
+ new_filename, elapsed);
#endif
return (0);
@@ -466,6 +475,24 @@ LoadPCB (char *Filename)
}
/* ---------------------------------------------------------------------------
+ * Load PCB
+ */
+int
+LoadPCB (char *file)
+{
+ return real_load_pcb (file, false);
+}
+
+/* ---------------------------------------------------------------------------
+ * Revert PCB
+ */
+int
+RevertPCB (void)
+{
+ return real_load_pcb (PCB->Filename, true);
+}
+
+/* ---------------------------------------------------------------------------
* functions for loading elements-as-pcb
*/
diff --git a/src/file.h b/src/file.h
index 6cf7a99..4056bc9 100644
--- a/src/file.h
+++ b/src/file.h
@@ -37,6 +37,7 @@ FILE *CheckAndOpenFile (char *, bool, bool, bool *, bool *);
FILE *OpenConnectionDataFile (void);
int SavePCB (char *);
int LoadPCB (char *);
+int RevertPCB (void);
void EnableAutosave (void);
void Backup (void);
void SaveInTMP (void);
diff --git a/src/hid/common/actions.c b/src/hid/common/actions.c
index da3bbfd..13bb129 100644
--- a/src/hid/common/actions.c
+++ b/src/hid/common/actions.c
@@ -438,9 +438,11 @@ these directly.
static const char pcbchanged_syntax[] =
- "PCBChanged()";
+ "PCBChanged([revert])";
static const char pcbchanged_help[] =
- "Tells the GUI that the whole PCB has changed.";
+ "Tells the GUI that the whole PCB has changed. The optional \"revert\""
+ "parameter can be used as a hint to the GUI that the same design is being"
+ "reloaded, and that it might keep some viewport settings";
/* %start-doc actions PCBChanged
|
|
From: <gi...@gp...> - 2011-09-06 00:21:24
|
The branch, master has been updated
via 84ae26807325c8d2d95cd3ec3c2a6e61c217626e (commit)
via 60e84badc0b51f9f00840b66feee759951ce89c1 (commit)
via c95bd50c671fd43127aa8e5fa8cb3b92dc2c1f11 (commit)
from 596fa244e208faf3e0e81a7309e73d300c34a6d1 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
src/action.c | 14 ++++++++++----
src/command.c | 14 ++++++++++++--
src/file.c | 23 +++++++++--------------
src/hid.h | 13 +++++++++++++
4 files changed, 44 insertions(+), 20 deletions(-)
=================
Commit Messages
=================
commit 84ae26807325c8d2d95cd3ec3c2a6e61c217626e
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
Add a HID API call, notify_pcb_filename_change()
This is so the core can tell the GUI when the PCB being edited is saved
into a different file.
:100644 100644 9e47690... 55825a9... M src/action.c
:100644 100644 009d373... 963ed85... M src/command.c
:100644 100644 d1c7c8e... 2266b6c... M src/hid.h
commit 60e84badc0b51f9f00840b66feee759951ce89c1
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
Add a HID API call, notify_save_pcb() called around saving the PCB
The intention of this API is so that GUIs monitoring the active PCB
file on disk for changes, can filter out changes which occur as we
save the file ourselves.
:100644 100644 edd1f26... 7769057... M src/file.c
:100644 100644 b1f532f... d1c7c8e... M src/hid.h
commit c95bd50c671fd43127aa8e5fa8cb3b92dc2c1f11
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
file.c: Don't set the PCB filename or changed flags inside SavePCB (Filename)
Save this for the caller to do. (action.c already set the filename for the
SaveAs case anyway).
:100644 100644 faa1f21... 9e47690... M src/action.c
:100644 100644 4c3a419... 009d373... M src/command.c
:100644 100644 1c68abc... edd1f26... M src/file.c
=========
Changes
=========
commit 84ae26807325c8d2d95cd3ec3c2a6e61c217626e
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
Add a HID API call, notify_pcb_filename_change()
This is so the core can tell the GUI when the PCB being edited is saved
into a different file.
diff --git a/src/action.c b/src/action.c
index 9e47690..55825a9 100644
--- a/src/action.c
+++ b/src/action.c
@@ -5687,6 +5687,8 @@ ActionSaveTo (int argc, char **argv, Coord x, Coord y)
SetChangedFlag (false);
free (PCB->Filename);
PCB->Filename = strdup (name);
+ if (gui->notify_filename_changed != NULL)
+ gui->notify_filename_changed ();
}
return 0;
}
diff --git a/src/command.c b/src/command.c
index 009d373..963ed85 100644
--- a/src/command.c
+++ b/src/command.c
@@ -354,6 +354,8 @@ CommandSaveLayout (int argc, char **argv, Coord x, Coord y)
SetChangedFlag (false);
free (PCB->Filename);
PCB->Filename = strdup (argv[0]);
+ if (gui->notify_filename_changed != NULL)
+ gui->notify_filename_changed ();
}
break;
diff --git a/src/hid.h b/src/hid.h
index d1c7c8e..2266b6c 100644
--- a/src/hid.h
+++ b/src/hid.h
@@ -577,6 +577,9 @@ typedef enum
* our deliberate changes.
*/
void (*notify_save_pcb) (const char *filename, bool done);
+
+ /* Notification to the GUI that the PCB file has been renamed. */
+ void (*notify_filename_changed) (void);
};
/* Call this as soon as possible from main(). No other HID calls are
commit 60e84badc0b51f9f00840b66feee759951ce89c1
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
Add a HID API call, notify_save_pcb() called around saving the PCB
The intention of this API is so that GUIs monitoring the active PCB
file on disk for changes, can filter out changes which occur as we
save the file ourselves.
diff --git a/src/file.c b/src/file.c
index edd1f26..7769057 100644
--- a/src/file.c
+++ b/src/file.c
@@ -349,9 +349,18 @@ SaveBufferElements (char *Filename)
* save PCB
*/
int
-SavePCB (char *Filename)
+SavePCB (char *file)
{
- return WritePipe (Filename, true);
+ int retcode;
+
+ if (gui->notify_save_pcb == NULL)
+ return WritePipe (file, true);
+
+ gui->notify_save_pcb (file, false);
+ retcode = WritePipe (file, true);
+ gui->notify_save_pcb (file, true);
+
+ return retcode;
}
/* ---------------------------------------------------------------------------
diff --git a/src/hid.h b/src/hid.h
index b1f532f..d1c7c8e 100644
--- a/src/hid.h
+++ b/src/hid.h
@@ -567,6 +567,16 @@ typedef enum
* Any remaining rendering will be flushed to the screen.
*/
void (*finish_debug_draw) (void);
+
+ /* Notification to the GUI around saving the PCB file.
+ *
+ * Called with a false parameter before the save, called again
+ * with true after the save.
+ *
+ * Allows GUIs which watch for file-changes on disk to ignore
+ * our deliberate changes.
+ */
+ void (*notify_save_pcb) (const char *filename, bool done);
};
/* Call this as soon as possible from main(). No other HID calls are
commit c95bd50c671fd43127aa8e5fa8cb3b92dc2c1f11
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
file.c: Don't set the PCB filename or changed flags inside SavePCB (Filename)
Save this for the caller to do. (action.c already set the filename for the
SaveAs case anyway).
diff --git a/src/action.c b/src/action.c
index faa1f21..9e47690 100644
--- a/src/action.c
+++ b/src/action.c
@@ -5672,7 +5672,8 @@ ActionSaveTo (int argc, char **argv, Coord x, Coord y)
if (strcasecmp (function, "Layout") == 0)
{
- SavePCB (PCB->Filename);
+ if (SavePCB (PCB->Filename) == 0)
+ SetChangedFlag (false);
return 0;
}
@@ -5681,9 +5682,12 @@ ActionSaveTo (int argc, char **argv, Coord x, Coord y)
if (strcasecmp (function, "LayoutAs") == 0)
{
- free (PCB->Filename);
- PCB->Filename = strdup (name);
- SavePCB (PCB->Filename);
+ if (SavePCB (name) == 0)
+ {
+ SetChangedFlag (false);
+ free (PCB->Filename);
+ PCB->Filename = strdup (name);
+ }
return 0;
}
diff --git a/src/command.c b/src/command.c
index 4c3a419..009d373 100644
--- a/src/command.c
+++ b/src/command.c
@@ -340,13 +340,21 @@ CommandSaveLayout (int argc, char **argv, Coord x, Coord y)
{
case 0:
if (PCB->Filename)
- SavePCB (PCB->Filename);
+ {
+ if (SavePCB (PCB->Filename) == 0)
+ SetChangedFlag (false);
+ }
else
Message ("No filename to save to yet\n");
break;
case 1:
- SavePCB (argv[0]);
+ if (SavePCB (argv[0]) == 0)
+ {
+ SetChangedFlag (false);
+ free (PCB->Filename);
+ PCB->Filename = strdup (argv[0]);
+ }
break;
default:
diff --git a/src/file.c b/src/file.c
index 1c68abc..edd1f26 100644
--- a/src/file.c
+++ b/src/file.c
@@ -351,21 +351,7 @@ SaveBufferElements (char *Filename)
int
SavePCB (char *Filename)
{
- int retcode;
- char *copy;
-
- if (!(retcode = WritePipe (Filename, true)))
- {
- /* thanks to Nick Bailey for the bug-fix;
- * first of all make a copy of the passed filename because
- * it might be identical to 'PCB->Filename'
- */
- copy = strdup (Filename);
- free (PCB->Filename);
- PCB->Filename = copy;
- SetChangedFlag (false);
- }
- return (retcode);
+ return WritePipe (Filename, true);
}
/* ---------------------------------------------------------------------------
|
|
From: <gi...@gp...> - 2011-09-06 00:19:13
|
The branch, master has been updated
via 596fa244e208faf3e0e81a7309e73d300c34a6d1 (commit)
from 75b5710f6a232752ad6edef416ab0578939dbad0 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
src/hid/gtk/gtkhid-main.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
=================
Commit Messages
=================
commit 596fa244e208faf3e0e81a7309e73d300c34a6d1
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
Revert "hid/gtk: Avoid the deprecated gdk_drawable_get_display()"
This reverts commit c6d6ca16e58b5c7f2248c21e3248825f54e52374.
Turns out the replacement API I used was only introduced in GTK 2.24,
which is still a little new for us here.
:100644 100644 3e253cb... 89d50be... M src/hid/gtk/gtkhid-main.c
=========
Changes
=========
commit 596fa244e208faf3e0e81a7309e73d300c34a6d1
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
Revert "hid/gtk: Avoid the deprecated gdk_drawable_get_display()"
This reverts commit c6d6ca16e58b5c7f2248c21e3248825f54e52374.
Turns out the replacement API I used was only introduced in GTK 2.24,
which is still a little new for us here.
diff --git a/src/hid/gtk/gtkhid-main.c b/src/hid/gtk/gtkhid-main.c
index 3e253cb..89d50be 100644
--- a/src/hid/gtk/gtkhid-main.c
+++ b/src/hid/gtk/gtkhid-main.c
@@ -1542,8 +1542,9 @@ Benchmark (int argc, char **argv, Coord x, Coord y)
{
int i = 0;
time_t start, end;
- GdkWindow *window = gtk_widget_get_window (gport->drawing_area);
- GdkDisplay *display = gdk_window_get_display (window);
+ GdkDisplay *display;
+
+ display = gdk_drawable_get_display (gport->drawable);
gdk_display_sync (display);
time (&start);
|
|
From: <gi...@gp...> - 2011-09-05 19:56:02
|
The branch, master has been updated
discards 8ef7b4b33178969b030df5cb9214b0c3c49ea593 (commit)
via 75b5710f6a232752ad6edef416ab0578939dbad0 (commit)
from 8ef7b4b33178969b030df5cb9214b0c3c49ea593 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
src/hid/gtk/gui-utils.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
=================
Commit Messages
=================
commit 75b5710f6a232752ad6edef416ab0578939dbad0
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Remove usage of deprecated gtk_range_set_update_policy()
We only set this to the default value anyway, and the API has been
removed with no replacements.
:100644 100644 cf05e4b... 73bada5... M src/hid/gtk/gui-top-window.c
:100644 100644 3be7931... 7136fbb... M src/hid/gtk/gui-utils.c
=========
Changes
=========
commit 75b5710f6a232752ad6edef416ab0578939dbad0
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Remove usage of deprecated gtk_range_set_update_policy()
We only set this to the default value anyway, and the API has been
removed with no replacements.
diff --git a/src/hid/gtk/gui-top-window.c b/src/hid/gtk/gui-top-window.c
index cf05e4b..73bada5 100644
--- a/src/hid/gtk/gui-top-window.c
+++ b/src/hid/gtk/gui-top-window.c
@@ -1280,8 +1280,6 @@ ghid_build_pcb_top_window (void)
ghidgui->v_range =
gtk_vscrollbar_new (GTK_ADJUSTMENT (ghidgui->v_adjustment));
- gtk_range_set_update_policy (GTK_RANGE (ghidgui->v_range),
- GTK_UPDATE_CONTINUOUS);
gtk_box_pack_start (GTK_BOX (hbox), ghidgui->v_range, FALSE, FALSE, 0);
g_signal_connect (G_OBJECT (ghidgui->v_adjustment), "value_changed",
@@ -1291,8 +1289,6 @@ ghid_build_pcb_top_window (void)
10.0, 10.0, 10.0);
ghidgui->h_range =
gtk_hscrollbar_new (GTK_ADJUSTMENT (ghidgui->h_adjustment));
- gtk_range_set_update_policy (GTK_RANGE (ghidgui->h_range),
- GTK_UPDATE_CONTINUOUS);
gtk_box_pack_start (GTK_BOX (ghidgui->vbox_middle),
ghidgui->h_range, FALSE, FALSE, 0);
diff --git a/src/hid/gtk/gui-utils.c b/src/hid/gtk/gui-utils.c
index 3be7931..7136fbb 100644
--- a/src/hid/gtk/gui-utils.c
+++ b/src/hid/gtk/gui-utils.c
@@ -479,7 +479,6 @@ ghid_range_control (GtkWidget * box, GtkWidget ** scale_res,
gtk_scale_set_value_pos (GTK_SCALE (scale), pos);
gtk_scale_set_draw_value (GTK_SCALE (scale), set_draw_value);
gtk_scale_set_digits (GTK_SCALE (scale), digits);
- gtk_range_set_update_policy (GTK_RANGE (scale), GTK_UPDATE_CONTINUOUS);
/* Increments don't make sense, use -1,1 because that does closest to
| what I want: scroll down decrements slider value.
|
|
From: <gi...@gp...> - 2011-09-05 19:53:09
|
The branch, master has been updated
via 8ef7b4b33178969b030df5cb9214b0c3c49ea593 (commit)
via d7d467baa898c03fbbe1016063b37e94f8bbba88 (commit)
from 52e26d712cb5a640e11884b6cf663d9025f15fdc (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
src/hid/gtk/gui-top-window.c | 8 ++------
src/hid/gtk/gui-utils.c | 4 ++--
2 files changed, 4 insertions(+), 8 deletions(-)
=================
Commit Messages
=================
commit 8ef7b4b33178969b030df5cb9214b0c3c49ea593
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Remove usage of deprecated gtk_range_set_update_policy()
We only set this to the default value anyway, and the API has been
removed with no replacements.
:100644 100644 cf05e4b... 73bada5... M src/hid/gtk/gui-top-window.c
commit d7d467baa898c03fbbe1016063b37e94f8bbba88
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Replace gtk_container_border_width with gtk_container_set_border_width
Replaces the old deprecated API.
:100644 100644 2c76a0a... cf05e4b... M src/hid/gtk/gui-top-window.c
:100644 100644 0ea661b... 3be7931... M src/hid/gtk/gui-utils.c
=========
Changes
=========
commit 8ef7b4b33178969b030df5cb9214b0c3c49ea593
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Remove usage of deprecated gtk_range_set_update_policy()
We only set this to the default value anyway, and the API has been
removed with no replacements.
diff --git a/src/hid/gtk/gui-top-window.c b/src/hid/gtk/gui-top-window.c
index cf05e4b..73bada5 100644
--- a/src/hid/gtk/gui-top-window.c
+++ b/src/hid/gtk/gui-top-window.c
@@ -1280,8 +1280,6 @@ ghid_build_pcb_top_window (void)
ghidgui->v_range =
gtk_vscrollbar_new (GTK_ADJUSTMENT (ghidgui->v_adjustment));
- gtk_range_set_update_policy (GTK_RANGE (ghidgui->v_range),
- GTK_UPDATE_CONTINUOUS);
gtk_box_pack_start (GTK_BOX (hbox), ghidgui->v_range, FALSE, FALSE, 0);
g_signal_connect (G_OBJECT (ghidgui->v_adjustment), "value_changed",
@@ -1291,8 +1289,6 @@ ghid_build_pcb_top_window (void)
10.0, 10.0, 10.0);
ghidgui->h_range =
gtk_hscrollbar_new (GTK_ADJUSTMENT (ghidgui->h_adjustment));
- gtk_range_set_update_policy (GTK_RANGE (ghidgui->h_range),
- GTK_UPDATE_CONTINUOUS);
gtk_box_pack_start (GTK_BOX (ghidgui->vbox_middle),
ghidgui->h_range, FALSE, FALSE, 0);
commit d7d467baa898c03fbbe1016063b37e94f8bbba88
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Replace gtk_container_border_width with gtk_container_set_border_width
Replaces the old deprecated API.
diff --git a/src/hid/gtk/gui-top-window.c b/src/hid/gtk/gui-top-window.c
index 2c76a0a..cf05e4b 100644
--- a/src/hid/gtk/gui-top-window.c
+++ b/src/hid/gtk/gui-top-window.c
@@ -676,7 +676,7 @@ make_cursor_position_labels (GtkWidget * hbox, GHidPort * port)
*/
frame = gtk_frame_new (NULL);
gtk_box_pack_end (GTK_BOX (hbox), frame, FALSE, TRUE, 0);
- gtk_container_border_width (GTK_CONTAINER (frame), 2);
+ gtk_container_set_border_width (GTK_CONTAINER (frame), 2);
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_OUT);
label = gtk_label_new ("");
@@ -690,7 +690,7 @@ make_cursor_position_labels (GtkWidget * hbox, GHidPort * port)
*/
frame = gtk_frame_new (NULL);
gtk_box_pack_end (GTK_BOX (hbox), frame, FALSE, TRUE, 0);
- gtk_container_border_width (GTK_CONTAINER (frame), 2);
+ gtk_container_set_border_width (GTK_CONTAINER (frame), 2);
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_OUT);
label = gtk_label_new (" __.__ __.__ ");
gtk_container_add (GTK_CONTAINER (frame), label);
diff --git a/src/hid/gtk/gui-utils.c b/src/hid/gtk/gui-utils.c
index 0ea661b..3be7931 100644
--- a/src/hid/gtk/gui-utils.c
+++ b/src/hid/gtk/gui-utils.c
@@ -534,7 +534,7 @@ ghid_framed_vbox (GtkWidget * box, gchar * label, gint frame_border_width,
gtk_container_set_border_width (GTK_CONTAINER (frame), frame_border_width);
gtk_box_pack_start (GTK_BOX (box), frame, frame_expand, frame_expand, 0);
vbox = gtk_vbox_new (FALSE, vbox_pad);
- gtk_container_border_width (GTK_CONTAINER (vbox), vbox_border_width);
+ gtk_container_set_border_width (GTK_CONTAINER (vbox), vbox_border_width);
gtk_container_add (GTK_CONTAINER (frame), vbox);
return vbox;
}
@@ -551,7 +551,7 @@ ghid_framed_vbox_end (GtkWidget * box, gchar * label, gint frame_border_width,
gtk_container_set_border_width (GTK_CONTAINER (frame), frame_border_width);
gtk_box_pack_end (GTK_BOX (box), frame, frame_expand, frame_expand, 0);
vbox = gtk_vbox_new (FALSE, vbox_pad);
- gtk_container_border_width (GTK_CONTAINER (vbox), vbox_border_width);
+ gtk_container_set_border_width (GTK_CONTAINER (vbox), vbox_border_width);
gtk_container_add (GTK_CONTAINER (frame), vbox);
return vbox;
}
|
|
From: <gi...@gp...> - 2011-09-05 19:21:34
|
The branch, master has been updated
via 52e26d712cb5a640e11884b6cf663d9025f15fdc (commit)
from f25fc1e7997dcf3979bdefa693704d59571824b2 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
src/hid/gtk/gui-utils.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
=================
Commit Messages
=================
commit 52e26d712cb5a640e11884b6cf663d9025f15fdc
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Use g_signal_connect(), not gtk_signal_connect()
gtk_signal_connect() is deprecated.
:100644 100644 a4d7b12... 0ea661b... M src/hid/gtk/gui-utils.c
=========
Changes
=========
commit 52e26d712cb5a640e11884b6cf663d9025f15fdc
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Use g_signal_connect(), not gtk_signal_connect()
gtk_signal_connect() is deprecated.
diff --git a/src/hid/gtk/gui-utils.c b/src/hid/gtk/gui-utils.c
index a4d7b12..0ea661b 100644
--- a/src/hid/gtk/gui-utils.c
+++ b/src/hid/gtk/gui-utils.c
@@ -228,8 +228,7 @@ ghid_check_button_connected (GtkWidget * box,
gtk_box_pack_end (GTK_BOX (box), b, expand, fill, pad);
if (cb_func)
- gtk_signal_connect (GTK_OBJECT (b), "clicked",
- GTK_SIGNAL_FUNC (cb_func), data);
+ g_signal_connect (b, "clicked", G_CALLBACK (cb_func), data);
if (button)
*button = b;
}
@@ -251,8 +250,7 @@ ghid_button_connected (GtkWidget * box, GtkWidget ** button,
gtk_box_pack_end (GTK_BOX (box), b, expand, fill, pad);
if (cb_func)
- gtk_signal_connect (GTK_OBJECT (b), "clicked",
- GTK_SIGNAL_FUNC (cb_func), data);
+ g_signal_connect (b, "clicked", G_CALLBACK (cb_func), data);
if (button)
*button = b;
}
|
|
From: <gi...@gp...> - 2011-09-05 17:20:16
|
The branch, master has been updated
via f25fc1e7997dcf3979bdefa693704d59571824b2 (commit)
via dc62f672ee70361cdbf7213f97097377fcfddc36 (commit)
via da8dffc2d49dff3b3067c729321ac23d51ae5cc7 (commit)
via c6d6ca16e58b5c7f2248c21e3248825f54e52374 (commit)
via 6967a2d93334b62ca211be048427a0ee0de94eab (commit)
from c9b505b52f912541674fdd1aabda43e7c0702f10 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
src/hid/gtk/gtkhid-main.c | 11 ++++-----
src/hid/gtk/gui-dialog-print.c | 46 ++++++++++---------------------------
src/hid/gtk/gui-dialog.c | 2 +-
src/hid/gtk/gui-drc-window.c | 2 +-
src/hid/gtk/gui-library-window.c | 2 +-
src/hid/gtk/gui-log-window.c | 2 +-
src/hid/gtk/gui-netlist-window.c | 2 +-
src/hid/gtk/gui-pinout-window.c | 2 +-
src/hid/gtk/gui-top-window.c | 2 +-
9 files changed, 25 insertions(+), 46 deletions(-)
=================
Commit Messages
=================
commit f25fc1e7997dcf3979bdefa693704d59571824b2
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Re-write the tool-tip handling code to use newer tooltip API
Use the gtk_widget_set_tooltip* API introduced in GTK 2.12. This avoids
the APIs deprecated in GTK 2.12, and also avoids the requirement to pack
GTK_WIDGET_NO_WINDOW widgets inside gtk_event_box() widgets to make their
tooltips work.
:100644 100644 13da605... 5d7d003... M src/hid/gtk/gui-dialog-print.c
commit dc62f672ee70361cdbf7213f97097377fcfddc36
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Replace usage of the deprecated gtk_widget_set_uposition() call
The closest replacement is gtk_window_move(), and looking at the GTK
sources, appears to be what gtk_widget_set_uposition() calls internally.
We are still rather at the mercy of the user's window manager as to
whether it will honour the request we make, and arguably we ought to
remove this (mis-)feature anyway.
:100644 100644 4ab38b1... ce0210c... M src/hid/gtk/gui-drc-window.c
:100644 100644 a1e1a53... 74b55e9... M src/hid/gtk/gui-library-window.c
:100644 100644 41571e0... 01daaee... M src/hid/gtk/gui-log-window.c
:100644 100644 e05ae57... 35b5427... M src/hid/gtk/gui-netlist-window.c
:100644 100644 5b0feef... 6433fb1... M src/hid/gtk/gui-pinout-window.c
:100644 100644 06eab4d... 2c76a0a... M src/hid/gtk/gui-top-window.c
commit da8dffc2d49dff3b3067c729321ac23d51ae5cc7
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Replace deprecated function call gtk_box_pack_start_defaults()
:100644 100644 93cea47... 1770bba... M src/hid/gtk/gui-dialog.c
commit c6d6ca16e58b5c7f2248c21e3248825f54e52374
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Avoid the deprecated gdk_drawable_get_display()
Grab the active display using gdk_window_get_display() on the window
belonging to the drawing area.
:100644 100644 89d50be... 3e253cb... M src/hid/gtk/gtkhid-main.c
commit 6967a2d93334b62ca211be048427a0ee0de94eab
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Use the g_timeout_add() function, not the deprecated GTK one.
:100644 100644 e201d3c... 89d50be... M src/hid/gtk/gtkhid-main.c
=========
Changes
=========
commit f25fc1e7997dcf3979bdefa693704d59571824b2
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Re-write the tool-tip handling code to use newer tooltip API
Use the gtk_widget_set_tooltip* API introduced in GTK 2.12. This avoids
the APIs deprecated in GTK 2.12, and also avoids the requirement to pack
GTK_WIDGET_NO_WINDOW widgets inside gtk_event_box() widgets to make their
tooltips work.
diff --git a/src/hid/gtk/gui-dialog-print.c b/src/hid/gtk/gui-dialog-print.c
index 13da605..5d7d003 100644
--- a/src/hid/gtk/gui-dialog-print.c
+++ b/src/hid/gtk/gui-dialog-print.c
@@ -113,11 +113,8 @@ ghid_attribute_dialog (HID_Attribute * attrs,
GtkWidget *widget;
GHidPort *out = &ghid_port;
int i, j, n;
- GtkTooltips *tips;
int rc = 0;
- tips = gtk_tooltips_new ();
-
dialog = gtk_dialog_new_with_buttons (_(title),
GTK_WINDOW (out->top_window),
(GtkDialogFlags)(GTK_DIALOG_MODAL
@@ -151,7 +148,7 @@ ghid_attribute_dialog (HID_Attribute * attrs,
case HID_Label:
widget = gtk_label_new (attrs[j].name);
gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE, FALSE, 0);
- gtk_tooltips_set_tip (tips, widget, attrs[j].help_text, NULL);
+ gtk_widget_set_tooltip_text (widget, attrs[j].help_text);
break;
case HID_Integer:
@@ -167,8 +164,7 @@ ghid_attribute_dialog (HID_Attribute * attrs,
attrs[j].min_val, attrs[j].max_val, 1.0, 1.0, 0, 0,
intspinner_changed_cb,
&(attrs[j].default_val.int_value), FALSE, NULL);
-
- gtk_tooltips_set_tip (tips, widget, attrs[j].help_text, NULL);
+ gtk_widget_set_tooltip_text (widget, attrs[j].help_text);
widget = gtk_label_new (attrs[j].name);
gtk_box_pack_start (GTK_BOX (hbox), widget, FALSE, FALSE, 0);
@@ -185,7 +181,7 @@ ghid_attribute_dialog (HID_Attribute * attrs,
if(attrs[j].default_val.str_value != NULL)
gtk_entry_set_text (GTK_ENTRY (entry),
attrs[j].default_val.str_value);
- gtk_tooltips_set_tip (tips, entry, attrs[j].help_text, NULL);
+ gtk_widget_set_tooltip_text (entry, attrs[j].help_text);
g_signal_connect (G_OBJECT (entry), "changed",
G_CALLBACK (coordentry_changed_cb),
&(attrs[j].default_val.coord_value));
@@ -209,7 +205,7 @@ ghid_attribute_dialog (HID_Attribute * attrs,
dblspinner_changed_cb,
&(attrs[j].default_val.real_value), FALSE, NULL);
- gtk_tooltips_set_tip (tips, widget, attrs[j].help_text, NULL);
+ gtk_widget_set_tooltip_text (widget, attrs[j].help_text);
widget = gtk_label_new (attrs[j].name);
gtk_box_pack_start (GTK_BOX (hbox), widget, FALSE, FALSE, 0);
@@ -224,7 +220,7 @@ ghid_attribute_dialog (HID_Attribute * attrs,
if(attrs[j].default_val.str_value != NULL)
gtk_entry_set_text (GTK_ENTRY (entry),
attrs[j].default_val.str_value);
- gtk_tooltips_set_tip (tips, entry, attrs[j].help_text, NULL);
+ gtk_widget_set_tooltip_text (entry, attrs[j].help_text);
g_signal_connect (G_OBJECT (entry), "changed",
G_CALLBACK (entry_changed_cb),
&(attrs[j].default_val.str_value));
@@ -240,7 +236,7 @@ ghid_attribute_dialog (HID_Attribute * attrs,
TRUE, FALSE, FALSE, 0, set_flag_cb,
&(attrs[j].default_val.int_value),
attrs[j].name);
- gtk_tooltips_set_tip (tips, widget, attrs[j].help_text, NULL);
+ gtk_widget_set_tooltip_text (widget, attrs[j].help_text);
break;
case HID_Enum:
@@ -248,16 +244,9 @@ ghid_attribute_dialog (HID_Attribute * attrs,
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
do_enum:
- /*
- * We have to put the combo_box inside of an event_box in
- * order for tooltips to work.
- */
- widget = gtk_event_box_new ();
- gtk_tooltips_set_tip (tips, widget, attrs[j].help_text, NULL);
- gtk_box_pack_start (GTK_BOX (hbox), widget, FALSE, FALSE, 0);
-
combo = gtk_combo_box_new_text ();
- gtk_container_add (GTK_CONTAINER (widget), combo);
+ gtk_widget_set_tooltip_text (combo, attrs[j].help_text);
+ gtk_box_pack_start (GTK_BOX (hbox), combo, FALSE, FALSE, 0);
g_signal_connect (G_OBJECT (combo), "changed",
G_CALLBACK (enum_changed_cb),
&(attrs[j].default_val.int_value));
@@ -294,7 +283,7 @@ ghid_attribute_dialog (HID_Attribute * attrs,
0,
dblspinner_changed_cb,
&(attrs[j].default_val.real_value), FALSE, NULL);
- gtk_tooltips_set_tip (tips, widget, attrs[j].help_text, NULL);
+ gtk_widget_set_tooltip_text (widget, attrs[j].help_text);
goto do_enum;
break;
@@ -309,7 +298,7 @@ ghid_attribute_dialog (HID_Attribute * attrs,
G_CALLBACK (entry_changed_cb),
&(attrs[j].default_val.str_value));
- gtk_tooltips_set_tip (tips, entry, attrs[j].help_text, NULL);
+ gtk_widget_set_tooltip_text (entry, attrs[j].help_text);
break;
case HID_Unit:
@@ -318,16 +307,10 @@ ghid_attribute_dialog (HID_Attribute * attrs,
hbox = gtk_hbox_new (FALSE, 4);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
- /*
- * We have to put the combo_box inside of an event_box in
- * order for tooltips to work.
- */
- widget = gtk_event_box_new ();
- gtk_tooltips_set_tip (tips, widget, attrs[j].help_text, NULL);
- gtk_box_pack_start (GTK_BOX (hbox), widget, FALSE, FALSE, 0);
combo = gtk_combo_box_new_text ();
- gtk_container_add (GTK_CONTAINER (widget), combo);
+ gtk_widget_set_tooltip_text (combo, attrs[j].help_text);
+ gtk_box_pack_start (GTK_BOX (hbox), combo, FALSE, FALSE, 0);
g_signal_connect (G_OBJECT (combo), "changed",
G_CALLBACK (enum_changed_cb),
&(attrs[j].default_val.int_value));
@@ -433,11 +416,8 @@ ghid_dialog_export (void)
GHidPort *out = &ghid_port;
int i;
HID **hids;
- GtkTooltips *tips;
gboolean no_exporter = TRUE;
- tips = gtk_tooltips_new ();
-
export_dialog = gtk_dialog_new_with_buttons (_("PCB Export Layout"),
GTK_WINDOW (out->top_window),
(GtkDialogFlags)(GTK_DIALOG_MODAL
@@ -467,7 +447,7 @@ ghid_dialog_export (void)
{
no_exporter = FALSE;
button = gtk_button_new_with_label (hids[i]->name);
- gtk_tooltips_set_tip (tips, button, hids[i]->description, NULL);
+ gtk_widget_set_tooltip_text (button, hids[i]->description);
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
g_signal_connect (G_OBJECT (button), "clicked",
G_CALLBACK (exporter_clicked_cb), hids[i]);
commit dc62f672ee70361cdbf7213f97097377fcfddc36
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Replace usage of the deprecated gtk_widget_set_uposition() call
The closest replacement is gtk_window_move(), and looking at the GTK
sources, appears to be what gtk_widget_set_uposition() calls internally.
We are still rather at the mercy of the user's window manager as to
whether it will honour the request we make, and arguably we ought to
remove this (mis-)feature anyway.
diff --git a/src/hid/gtk/gui-drc-window.c b/src/hid/gtk/gui-drc-window.c
index 4ab38b1..ce0210c 100644
--- a/src/hid/gtk/gui-drc-window.c
+++ b/src/hid/gtk/gui-drc-window.c
@@ -931,7 +931,7 @@ ghid_drc_window_show (gboolean raise)
gtk_widget_realize (drc_window);
if (Settings.AutoPlace)
- gtk_widget_set_uposition (GTK_WIDGET (drc_window), 10, 10);
+ gtk_window_move (GTK_WINDOW (drc_window), 10, 10);
gtk_widget_show_all (drc_window);
}
diff --git a/src/hid/gtk/gui-library-window.c b/src/hid/gtk/gui-library-window.c
index a1e1a53..74b55e9 100644
--- a/src/hid/gtk/gui-library-window.c
+++ b/src/hid/gtk/gui-library-window.c
@@ -176,7 +176,7 @@ ghid_library_window_create (GHidPort * out)
gtk_widget_realize (library_window);
if (Settings.AutoPlace)
- gtk_widget_set_uposition (GTK_WIDGET (library_window), 10, 10);
+ gtk_window_move (GTK_WINDOW (library_window), 10, 10);
gtk_editable_select_region (GTK_EDITABLE
(GHID_LIBRARY_WINDOW (library_window)->
diff --git a/src/hid/gtk/gui-log-window.c b/src/hid/gtk/gui-log-window.c
index 41571e0..01daaee 100644
--- a/src/hid/gtk/gui-log-window.c
+++ b/src/hid/gtk/gui-log-window.c
@@ -110,7 +110,7 @@ ghid_log_window_create ()
gtk_widget_realize (log_window);
if (Settings.AutoPlace)
- gtk_widget_set_uposition (GTK_WIDGET (log_window), 10, 10);
+ gtk_window_move (GTK_WINDOW (log_window), 10, 10);
}
void
diff --git a/src/hid/gtk/gui-netlist-window.c b/src/hid/gtk/gui-netlist-window.c
index e05ae57..35b5427 100644
--- a/src/hid/gtk/gui-netlist-window.c
+++ b/src/hid/gtk/gui-netlist-window.c
@@ -838,7 +838,7 @@ ghid_netlist_window_create (GHidPort * out)
gtk_widget_realize (netlist_window);
if (Settings.AutoPlace)
- gtk_widget_set_uposition (GTK_WIDGET (netlist_window), 10, 10);
+ gtk_window_move (GTK_WINDOW (netlist_window), 10, 10);
}
diff --git a/src/hid/gtk/gui-pinout-window.c b/src/hid/gtk/gui-pinout-window.c
index 5b0feef..6433fb1 100644
--- a/src/hid/gtk/gui-pinout-window.c
+++ b/src/hid/gtk/gui-pinout-window.c
@@ -102,6 +102,6 @@ ghid_pinout_window_show (GHidPort * out, ElementType * element)
gtk_widget_realize (top_window);
if (Settings.AutoPlace)
- gtk_widget_set_uposition (top_window, 10, 10);
+ gtk_window_move (GTK_WINDOW (top_window), 10, 10);
gtk_widget_show_all (top_window);
}
diff --git a/src/hid/gtk/gui-top-window.c b/src/hid/gtk/gui-top-window.c
index 06eab4d..2c76a0a 100644
--- a/src/hid/gtk/gui-top-window.c
+++ b/src/hid/gtk/gui-top-window.c
@@ -1685,7 +1685,7 @@ ghid_parse_arguments (int *argc, char ***argv)
ghidgui->top_window_width, ghidgui->top_window_height);
if (Settings.AutoPlace)
- gtk_widget_set_uposition (GTK_WIDGET (window), 10, 10);
+ gtk_window_move (GTK_WINDOW (window), 10, 10);
gtk_widget_show_all (gport->top_window);
ghidgui->creating = TRUE;
commit da8dffc2d49dff3b3067c729321ac23d51ae5cc7
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Replace deprecated function call gtk_box_pack_start_defaults()
diff --git a/src/hid/gtk/gui-dialog.c b/src/hid/gtk/gui-dialog.c
index 93cea47..1770bba 100644
--- a/src/hid/gtk/gui-dialog.c
+++ b/src/hid/gtk/gui-dialog.c
@@ -76,7 +76,7 @@ ghid_dialog_input (const char * prompt, const char * initial)
gtk_entry_set_text (GTK_ENTRY (entry), initial);
gtk_entry_set_activates_default (GTK_ENTRY (entry), TRUE);
- gtk_box_pack_start_defaults (GTK_BOX (vbox), entry);
+ gtk_box_pack_start (GTK_BOX (vbox), entry, TRUE, TRUE, 0);
content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
gtk_container_add (GTK_CONTAINER (content_area), vbox);
commit c6d6ca16e58b5c7f2248c21e3248825f54e52374
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Avoid the deprecated gdk_drawable_get_display()
Grab the active display using gdk_window_get_display() on the window
belonging to the drawing area.
diff --git a/src/hid/gtk/gtkhid-main.c b/src/hid/gtk/gtkhid-main.c
index 89d50be..3e253cb 100644
--- a/src/hid/gtk/gtkhid-main.c
+++ b/src/hid/gtk/gtkhid-main.c
@@ -1542,9 +1542,8 @@ Benchmark (int argc, char **argv, Coord x, Coord y)
{
int i = 0;
time_t start, end;
- GdkDisplay *display;
-
- display = gdk_drawable_get_display (gport->drawable);
+ GdkWindow *window = gtk_widget_get_window (gport->drawing_area);
+ GdkDisplay *display = gdk_window_get_display (window);
gdk_display_sync (display);
time (&start);
commit 6967a2d93334b62ca211be048427a0ee0de94eab
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Use the g_timeout_add() function, not the deprecated GTK one.
diff --git a/src/hid/gtk/gtkhid-main.c b/src/hid/gtk/gtkhid-main.c
index e201d3c..89d50be 100644
--- a/src/hid/gtk/gtkhid-main.c
+++ b/src/hid/gtk/gtkhid-main.c
@@ -372,7 +372,7 @@ ghid_set_crosshair (int x, int y, int action)
typedef struct
{
void (*func) (hidval);
- gint id;
+ guint id;
hidval user_data;
}
GuiTimer;
@@ -397,7 +397,7 @@ ghid_add_timer (void (*func) (hidval user_data),
timer->func = func;
timer->user_data = user_data;
- timer->id = gtk_timeout_add (milliseconds, (GtkFunction) ghid_timer, timer);
+ timer->id = g_timeout_add (milliseconds, (GSourceFunc) ghid_timer, timer);
ret.ptr = (void *) timer;
return ret;
}
@@ -407,7 +407,7 @@ ghid_stop_timer (hidval timer)
{
void *ptr = timer.ptr;
- gtk_timeout_remove (((GuiTimer *) ptr)->id);
+ g_source_remove (((GuiTimer *) ptr)->id);
g_free( ptr );
}
|
|
From: <gi...@gp...> - 2011-09-05 16:29:46
|
The branch, master has been updated
via c9b505b52f912541674fdd1aabda43e7c0702f10 (commit)
from 3f09eea65bc65eeb69bf36443ce33d14b14fb4dc (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
src/hid/gtk/ghid-main-menu.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
=================
Commit Messages
=================
commit c9b505b52f912541674fdd1aabda43e7c0702f10
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Fix not accessing GtkMenuShell's children harder
I missed a critical part of the fix from
commit 3584101f67f6ca2f0a252c312cb0c6c9c4fa016f
:100644 100644 6c0ca01... 4ae8c9a... M src/hid/gtk/ghid-main-menu.c
=========
Changes
=========
commit c9b505b52f912541674fdd1aabda43e7c0702f10
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Fix not accessing GtkMenuShell's children harder
I missed a critical part of the fix from
commit 3584101f67f6ca2f0a252c312cb0c6c9c4fa016f
diff --git a/src/hid/gtk/ghid-main-menu.c b/src/hid/gtk/ghid-main-menu.c
index 6c0ca01..4ae8c9a 100644
--- a/src/hid/gtk/ghid-main-menu.c
+++ b/src/hid/gtk/ghid-main-menu.c
@@ -347,7 +347,7 @@ ghid_main_menu_real_add_resource (GHidMainMenu *menu, GtkMenuShell *shell,
int pos;
children = gtk_container_get_children (GTK_CONTAINER (shell));
- pos = g_list_length (shell->children);
+ pos = g_list_length (children);
g_list_free (children);
if (strcmp (res->v[i].value, "@layerview") == 0)
|
|
From: <gi...@gp...> - 2011-09-05 16:16:16
|
The branch, master has been updated
via 3f09eea65bc65eeb69bf36443ce33d14b14fb4dc (commit)
via d9f4e9d25110f47b750df6b4259b9c4e02e7b94f (commit)
via 09d3ccc2c43c2e1bbb8f625d39e6f587403af858 (commit)
via 3584101f67f6ca2f0a252c312cb0c6c9c4fa016f (commit)
via e04f041cfd56000414c2b167e03bcc2ed0e1a1d1 (commit)
from 8cc3e88ce5df28718eac576bc1d1f28616658a9e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
src/hid/gtk/ghid-main-menu.c | 58 +++++++++++++++++++++-----------------
src/hid/gtk/gui-command-window.c | 2 +-
src/hid/gtk/gui-config.c | 2 +-
src/hid/gtk/gui-pinout-preview.c | 6 ++--
4 files changed, 37 insertions(+), 31 deletions(-)
=================
Commit Messages
=================
commit 3f09eea65bc65eeb69bf36443ce33d14b14fb4dc
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Replace GTK_WIDGET_REALIZED() test with a check for window != NULL
This avoids the use of the deprecated GTK_WIDGET_REALIZED macro, without
needing to use the GTK2.20 function gtk_widget_get_realized(). The check
for a NULL window should be sufficient here I hope.
:100644 100644 c4bef20... 79fc0f2... M src/hid/gtk/gui-pinout-preview.c
commit d9f4e9d25110f47b750df6b4259b9c4e02e7b94f
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Use gtk_bin_get_child() accessor
In GTK3.0, direct access to bin->child will be impossible.
:100644 100644 310ace8... d913cae... M src/hid/gtk/gui-command-window.c
commit 09d3ccc2c43c2e1bbb8f625d39e6f587403af858
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Use gtk_notebook_get_n_pages() rather than diving in and counting
In GTK3.0, direct access to notebook->children will be impossible.
:100644 100644 851571a... 698f57a... M src/hid/gtk/gui-config.c
commit 3584101f67f6ca2f0a252c312cb0c6c9c4fa016f
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Don't access a GtkMenuShell's children directly
In GTK3.0, direct access to shell->children will be impossible.
:100644 100644 d816498... 6c0ca01... M src/hid/gtk/ghid-main-menu.c
commit e04f041cfd56000414c2b167e03bcc2ed0e1a1d1
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Free list returned from gtk_container_get_children()
We can (and should) g_list_free() the list of children returned when
we are finished with it.
Whilst we are at it, convert the while loop to a for loop and use a
tighter condition on the loop termination test. The existing test worked,
but would leave a negative number in the object counter we test against.
This would not work if the object counters were ever unsigned integers
(as they might plausibly be).
:100644 100644 9ac0367... d816498... M src/hid/gtk/ghid-main-menu.c
=========
Changes
=========
commit 3f09eea65bc65eeb69bf36443ce33d14b14fb4dc
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Replace GTK_WIDGET_REALIZED() test with a check for window != NULL
This avoids the use of the deprecated GTK_WIDGET_REALIZED macro, without
needing to use the GTK2.20 function gtk_widget_get_realized(). The check
for a NULL window should be sufficient here I hope.
diff --git a/src/hid/gtk/gui-pinout-preview.c b/src/hid/gtk/gui-pinout-preview.c
index c4bef20..79fc0f2 100644
--- a/src/hid/gtk/gui-pinout-preview.c
+++ b/src/hid/gtk/gui-pinout-preview.c
@@ -191,14 +191,14 @@ ghid_pinout_preview_set_property (GObject * object, guint property_id,
const GValue * value, GParamSpec * pspec)
{
GhidPinoutPreview *pinout = GHID_PINOUT_PREVIEW (object);
+ GdkWindow *window = gtk_widget_get_window (GTK_WIDGET (pinout));
switch (property_id)
{
case PROP_ELEMENT_DATA:
pinout_set_data (pinout, (ElementType *)g_value_get_pointer (value));
- if (GTK_WIDGET_REALIZED (GTK_WIDGET (pinout)))
- gdk_window_invalidate_rect (
- gtk_widget_get_window (GTK_WIDGET (pinout)), NULL, FALSE);
+ if (window != NULL)
+ gdk_window_invalidate_rect (window, NULL, FALSE);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
commit d9f4e9d25110f47b750df6b4259b9c4e02e7b94f
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Use gtk_bin_get_child() accessor
In GTK3.0, direct access to bin->child will be impossible.
diff --git a/src/hid/gtk/gui-command-window.c b/src/hid/gtk/gui-command-window.c
index 310ace8..d913cae 100644
--- a/src/hid/gtk/gui-command-window.c
+++ b/src/hid/gtk/gui-command-window.c
@@ -236,7 +236,7 @@ command_combo_box_entry_create (void)
{
ghidgui->command_combo_box = gtk_combo_box_entry_new_text ();
ghidgui->command_entry =
- GTK_ENTRY (GTK_BIN (ghidgui->command_combo_box)->child);
+ GTK_ENTRY (gtk_bin_get_child (GTK_BIN (ghidgui->command_combo_box)));
gtk_entry_set_width_chars (ghidgui->command_entry, 40);
gtk_entry_set_activates_default (ghidgui->command_entry, TRUE);
commit 09d3ccc2c43c2e1bbb8f625d39e6f587403af858
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Use gtk_notebook_get_n_pages() rather than diving in and counting
In GTK3.0, direct access to notebook->children will be impossible.
diff --git a/src/hid/gtk/gui-config.c b/src/hid/gtk/gui-config.c
index 851571a..698f57a 100644
--- a/src/hid/gtk/gui-config.c
+++ b/src/hid/gtk/gui-config.c
@@ -1980,7 +1980,7 @@ config_page_create (GtkTreeStore * tree, GtkTreeIter * iter,
vbox = gtk_vbox_new (FALSE, 0);
gtk_notebook_append_page (notebook, vbox, NULL);
- page = g_list_length (notebook->children) - 1;
+ page = gtk_notebook_get_n_pages (notebook) - 1;
gtk_tree_store_set (tree, iter, CONFIG_PAGE_COLUMN, page, -1);
return vbox;
}
commit 3584101f67f6ca2f0a252c312cb0c6c9c4fa016f
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Don't access a GtkMenuShell's children directly
In GTK3.0, direct access to shell->children will be impossible.
diff --git a/src/hid/gtk/ghid-main-menu.c b/src/hid/gtk/ghid-main-menu.c
index d816498..6c0ca01 100644
--- a/src/hid/gtk/ghid-main-menu.c
+++ b/src/hid/gtk/ghid-main-menu.c
@@ -343,20 +343,27 @@ ghid_main_menu_real_add_resource (GHidMainMenu *menu, GtkMenuShell *shell,
/* If we get here, the resource is "-" or "@foo" for some foo */
if (res->v[i].value[0] == '@')
{
+ GList *children;
+ int pos;
+
+ children = gtk_container_get_children (GTK_CONTAINER (shell));
+ pos = g_list_length (shell->children);
+ g_list_free (children);
+
if (strcmp (res->v[i].value, "@layerview") == 0)
{
menu->layer_view_shell = shell;
- menu->layer_view_pos = g_list_length (shell->children);
+ menu->layer_view_pos = pos;
}
else if (strcmp (res->v[i].value, "@layerpick") == 0)
{
menu->layer_pick_shell = shell;
- menu->layer_pick_pos = g_list_length (shell->children);
+ menu->layer_pick_pos = pos;
}
else if (strcmp (res->v[i].value, "@routestyles") == 0)
{
menu->route_style_shell = shell;
- menu->route_style_pos = g_list_length (shell->children);
+ menu->route_style_pos = pos;
}
else
Message (_("GTK GUI currently ignores \"%s\" in the menu\n"
commit e04f041cfd56000414c2b167e03bcc2ed0e1a1d1
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Free list returned from gtk_container_get_children()
We can (and should) g_list_free() the list of children returned when
we are finished with it.
Whilst we are at it, convert the while loop to a for loop and use a
tighter condition on the loop termination test. The existing test worked,
but would leave a negative number in the object counter we test against.
This would not work if the object counters were ever unsigned integers
(as they might plausibly be).
diff --git a/src/hid/gtk/ghid-main-menu.c b/src/hid/gtk/ghid-main-menu.c
index 9ac0367..d816498 100644
--- a/src/hid/gtk/ghid-main-menu.c
+++ b/src/hid/gtk/ghid-main-menu.c
@@ -519,7 +519,7 @@ void
ghid_main_menu_install_layer_selector (GHidMainMenu *mm,
GHidLayerSelector *ls)
{
- GList *children;
+ GList *children, *iter;
/* @layerview */
if (mm->layer_view_shell)
@@ -527,13 +527,13 @@ ghid_main_menu_install_layer_selector (GHidMainMenu *mm,
/* Remove old children */
children = gtk_container_get_children
(GTK_CONTAINER (mm->layer_view_shell));
- children = g_list_nth (children, mm->layer_view_pos);
- while (children && mm->n_layer_views--)
- {
- gtk_container_remove (GTK_CONTAINER (mm->layer_view_shell),
- children->data);
- children = g_list_next (children);
- }
+ for (iter = g_list_nth (children, mm->layer_view_pos);
+ iter != NULL && mm->n_layer_views > 0;
+ iter = g_list_next (iter), mm->n_layer_views --)
+ gtk_container_remove (GTK_CONTAINER (mm->layer_view_shell),
+ iter->data);
+ g_list_free (children);
+
/* Install new ones */
mm->n_layer_views = ghid_layer_selector_install_view_items
(ls, mm->layer_view_shell, mm->layer_view_pos);
@@ -545,13 +545,13 @@ ghid_main_menu_install_layer_selector (GHidMainMenu *mm,
/* Remove old children */
children = gtk_container_get_children
(GTK_CONTAINER (mm->layer_pick_shell));
- children = g_list_nth (children, mm->layer_pick_pos);
- while (children && mm->n_layer_picks--)
- {
- gtk_container_remove (GTK_CONTAINER (mm->layer_pick_shell),
- children->data);
- children = g_list_next (children);
- }
+ for (iter = g_list_nth (children, mm->layer_pick_pos);
+ iter != NULL && mm->n_layer_picks > 0;
+ iter = g_list_next (iter), mm->n_layer_picks --)
+ gtk_container_remove (GTK_CONTAINER (mm->layer_pick_shell),
+ iter->data);
+ g_list_free (children);
+
/* Install new ones */
mm->n_layer_picks = ghid_layer_selector_install_pick_items
(ls, mm->layer_pick_shell, mm->layer_pick_pos);
@@ -563,20 +563,19 @@ void
ghid_main_menu_install_route_style_selector (GHidMainMenu *mm,
GHidRouteStyleSelector *rss)
{
- GList *children;
+ GList *children, *iter;
/* @routestyles */
if (mm->route_style_shell)
{
/* Remove old children */
children = gtk_container_get_children
(GTK_CONTAINER (mm->route_style_shell));
- children = g_list_nth (children, mm->route_style_pos);
- while (children && mm->n_route_styles--)
- {
- gtk_container_remove (GTK_CONTAINER (mm->route_style_shell),
- children->data);
- children = g_list_next (children);
- }
+ for (iter = g_list_nth (children, mm->route_style_pos);
+ iter != NULL && mm->n_route_styles > 0;
+ iter = g_list_next (iter), mm->n_route_styles --)
+ gtk_container_remove (GTK_CONTAINER (mm->route_style_shell),
+ iter->data);
+ g_list_free (children);
/* Install new ones */
mm->n_route_styles = ghid_route_style_selector_install_items
(rss, mm->route_style_shell, mm->route_style_pos);
|
|
From: <gi...@gp...> - 2011-09-05 15:07:57
|
The branch, master has been updated
via 8cc3e88ce5df28718eac576bc1d1f28616658a9e (commit)
from 03eb7fd68481ec1f471ce08d7def9774c10d58af (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
src/hid/gtk/ghid-route-style-selector.c | 8 +++++---
src/hid/gtk/gtkhid-main.c | 11 +++++++----
src/hid/gtk/gui-dialog-print.c | 13 ++++++++++---
src/hid/gtk/gui-dialog.c | 15 +++++++++++----
src/hid/gtk/gui-library-window.c | 10 +++++-----
src/hid/gtk/gui-utils.c | 6 ++++--
6 files changed, 42 insertions(+), 21 deletions(-)
=================
Commit Messages
=================
commit 8cc3e88ce5df28718eac576bc1d1f28616658a9e
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Use accessors to get the vbox from GtkDialog
In GTK3.0, direct access to dialog->vbox will be impossible.
:100644 100644 ad8c26f... 4bc4748... M src/hid/gtk/ghid-route-style-selector.c
:100644 100644 6df553e... e201d3c... M src/hid/gtk/gtkhid-main.c
:100644 100644 ce98f13... 13da605... M src/hid/gtk/gui-dialog-print.c
:100644 100644 c079464... 93cea47... M src/hid/gtk/gui-dialog.c
:100644 100644 c709dbc... a1e1a53... M src/hid/gtk/gui-library-window.c
:100644 100644 e4e97fa... a4d7b12... M src/hid/gtk/gui-utils.c
=========
Changes
=========
commit 8cc3e88ce5df28718eac576bc1d1f28616658a9e
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Use accessors to get the vbox from GtkDialog
In GTK3.0, direct access to dialog->vbox will be impossible.
diff --git a/src/hid/gtk/ghid-route-style-selector.c b/src/hid/gtk/ghid-route-style-selector.c
index ad8c26f..4bc4748 100644
--- a/src/hid/gtk/ghid-route-style-selector.c
+++ b/src/hid/gtk/ghid-route-style-selector.c
@@ -160,7 +160,9 @@ ghid_route_style_selector_edit_dialog (GHidRouteStyleSelector *rss)
struct _dialog dialog_data;
GtkCellRenderer *renderer = gtk_cell_renderer_text_new ();
GtkWidget *window = gtk_widget_get_toplevel (GTK_WIDGET (rss));
- GtkWidget *dialog, *vbox, *hbox, *sub_vbox, *table;
+ GtkWidget *dialog;
+ GtkWidget *content_area;
+ GtkWidget *vbox, *hbox, *sub_vbox, *table;
GtkWidget *label, *select_box, *check_box;
/* Build dialog */
@@ -178,10 +180,10 @@ ghid_route_style_selector_edit_dialog (GHidRouteStyleSelector *rss)
gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT(select_box), renderer,
"text", TEXT_COL, NULL);
- vbox = GTK_DIALOG (dialog)->vbox;
+ content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
hbox = gtk_hbox_new (FALSE, 4);
- gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE, 4);
+ gtk_box_pack_start (GTK_BOX (content_area), hbox, TRUE, TRUE, 4);
vbox = gtk_vbox_new (FALSE, 4);
gtk_box_pack_start (GTK_BOX (hbox), vbox, TRUE, TRUE, 4);
diff --git a/src/hid/gtk/gtkhid-main.c b/src/hid/gtk/gtkhid-main.c
index 6df553e..e201d3c 100644
--- a/src/hid/gtk/gtkhid-main.c
+++ b/src/hid/gtk/gtkhid-main.c
@@ -717,6 +717,7 @@ static struct progress_dialog *
make_progress_dialog (void)
{
struct progress_dialog *pd;
+ GtkWidget *content_area;
GtkWidget *alignment;
GtkWidget *vbox;
@@ -751,8 +752,8 @@ make_progress_dialog (void)
gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 8, 8, 8, 8);
gtk_container_add (GTK_CONTAINER (alignment), vbox);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (pd->dialog)->vbox),
- alignment, true, true, 0);
+ content_area = gtk_dialog_get_content_area (GTK_DIALOG (pd->dialog));
+ gtk_box_pack_start (GTK_BOX (content_area), alignment, true, true, 0);
gtk_widget_show_all (alignment);
@@ -984,6 +985,7 @@ attributes_delete_callback (GtkWidget *w, void *v)
static void
ghid_attributes (char *owner, AttributeListType *attrs)
{
+ GtkWidget *content_area;
int response;
attributes_list = attrs;
@@ -1001,8 +1003,9 @@ ghid_attributes (char *owner, AttributeListType *attrs)
attr_table = gtk_table_new (attrs->Number, 3, 0);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (attributes_dialog)->vbox), attr_table, FALSE, FALSE, 0);
-
+ content_area = gtk_dialog_get_content_area (GTK_DIALOG (attributes_dialog));
+ gtk_box_pack_start (GTK_BOX (content_area), attr_table, FALSE, FALSE, 0);
+
gtk_widget_show (attr_table);
ghid_attributes_revert ();
diff --git a/src/hid/gtk/gui-dialog-print.c b/src/hid/gtk/gui-dialog-print.c
index ce98f13..13da605 100644
--- a/src/hid/gtk/gui-dialog-print.c
+++ b/src/hid/gtk/gui-dialog-print.c
@@ -106,7 +106,9 @@ ghid_attribute_dialog (HID_Attribute * attrs,
const char * title,
const char * descr)
{
- GtkWidget *dialog, *main_vbox, *vbox, *vbox1, *hbox, *entry;
+ GtkWidget *dialog;
+ GtkWidget *content_area;
+ GtkWidget *main_vbox, *vbox, *vbox1, *hbox, *entry;
GtkWidget *combo;
GtkWidget *widget;
GHidPort *out = &ghid_port;
@@ -124,9 +126,11 @@ ghid_attribute_dialog (HID_Attribute * attrs,
GTK_STOCK_OK, GTK_RESPONSE_OK, NULL);
gtk_window_set_wmclass (GTK_WINDOW (dialog), "PCB_attribute_editor", "PCB");
+ content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
+
main_vbox = gtk_vbox_new (FALSE, 6);
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 6);
- gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), main_vbox);
+ gtk_container_add (GTK_CONTAINER (content_area), main_vbox);
vbox = ghid_category_vbox (main_vbox, descr != NULL ? descr : "",
4, 2, TRUE, TRUE);
@@ -424,6 +428,7 @@ ghid_dialog_print (HID *hid)
void
ghid_dialog_export (void)
{
+ GtkWidget *content_area;
GtkWidget *vbox, *button;
GHidPort *out = &ghid_port;
int i;
@@ -442,9 +447,11 @@ ghid_dialog_export (void)
GTK_RESPONSE_CANCEL, NULL);
gtk_window_set_wmclass (GTK_WINDOW (export_dialog), "PCB_Export", "PCB");
+ content_area = gtk_dialog_get_content_area (GTK_DIALOG (export_dialog));
+
vbox = gtk_vbox_new (FALSE, 6);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
- gtk_container_add (GTK_CONTAINER (GTK_DIALOG (export_dialog)->vbox), vbox);
+ gtk_container_add (GTK_CONTAINER (content_area), vbox);
/*
* Iterate over all the export HID's and build up a dialog box that
diff --git a/src/hid/gtk/gui-dialog.c b/src/hid/gtk/gui-dialog.c
index c079464..93cea47 100644
--- a/src/hid/gtk/gui-dialog.c
+++ b/src/hid/gtk/gui-dialog.c
@@ -48,7 +48,9 @@ RCSID ("$Id$");
gchar *
ghid_dialog_input (const char * prompt, const char * initial)
{
- GtkWidget *dialog, *vbox, *label, *entry;
+ GtkWidget *dialog;
+ GtkWidget *content_area;
+ GtkWidget *vbox, *label, *entry;
gchar *string;
gboolean response;
GHidPort *out = &ghid_port;
@@ -75,7 +77,9 @@ ghid_dialog_input (const char * prompt, const char * initial)
gtk_entry_set_activates_default (GTK_ENTRY (entry), TRUE);
gtk_box_pack_start_defaults (GTK_BOX (vbox), entry);
- gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), vbox);
+
+ content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
+ gtk_container_add (GTK_CONTAINER (content_area), vbox);
gtk_widget_show_all (dialog);
response = gtk_dialog_run (GTK_DIALOG (dialog));
@@ -109,7 +113,9 @@ ghid_dialog_about (void)
gint
ghid_dialog_confirm_all (gchar * all_message)
{
- GtkWidget *dialog, *label, *vbox;
+ GtkWidget *dialog;
+ GtkWidget *content_area;
+ GtkWidget *label, *vbox;
gint response;
GHidPort *out = &ghid_port;
@@ -122,7 +128,8 @@ ghid_dialog_confirm_all (gchar * all_message)
"Sequence OK",
GUI_DIALOG_RESPONSE_ALL, NULL);
- vbox = ghid_framed_vbox (GTK_DIALOG (dialog)->vbox, NULL, 6, FALSE, 4, 6);
+ content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
+ vbox = ghid_framed_vbox (content_area, NULL, 6, FALSE, 4, 6);
label = gtk_label_new (all_message);
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 3);
diff --git a/src/hid/gtk/gui-library-window.c b/src/hid/gtk/gui-library-window.c
index c709dbc..a1e1a53 100644
--- a/src/hid/gtk/gui-library-window.c
+++ b/src/hid/gtk/gui-library-window.c
@@ -782,7 +782,7 @@ library_window_constructor (GType type,
{
GObject *object;
GhidLibraryWindow *library_window;
-
+ GtkWidget *content_area;
GtkWidget *hpaned, *notebook;
GtkWidget *libview;
GtkWidget *preview;
@@ -803,7 +803,7 @@ library_window_constructor (GType type,
"modal", FALSE, "window-position", GTK_WIN_POS_NONE,
/* GtkDialog */
"has-separator", TRUE, NULL);
- g_object_set (GTK_DIALOG (library_window)->vbox,
+ g_object_set (gtk_dialog_get_content_area (GTK_DIALOG (library_window)),
"homogeneous", FALSE, NULL);
/* horizontal pane containing selection and preview */
@@ -850,9 +850,9 @@ library_window_constructor (GType type,
gtk_paned_pack2 (GTK_PANED (hpaned), frame, FALSE, FALSE);
- /* add the hpaned to the dialog vbox */
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (library_window)->vbox), hpaned,
- TRUE, TRUE, 0);
+ /* add the hpaned to the dialog content area */
+ content_area = gtk_dialog_get_content_area (GTK_DIALOG (library_window));
+ gtk_box_pack_start (GTK_BOX (content_area), hpaned, TRUE, TRUE, 0);
gtk_widget_show_all (hpaned);
diff --git a/src/hid/gtk/gui-utils.c b/src/hid/gtk/gui-utils.c
index e4e97fa..a4d7b12 100644
--- a/src/hid/gtk/gui-utils.c
+++ b/src/hid/gtk/gui-utils.c
@@ -655,6 +655,7 @@ ghid_dialog_report (gchar * title, gchar * message)
{
GtkWidget *top_win;
GtkWidget *dialog;
+ GtkWidget *content_area;
GtkWidget *scrolled;
GtkWidget *vbox, *vbox1;
GtkWidget *label;
@@ -675,10 +676,11 @@ ghid_dialog_report (gchar * title, gchar * message)
GTK_OBJECT (dialog));
gtk_window_set_wmclass (GTK_WINDOW (dialog), "PCB_Dialog", "PCB");
+ content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
+
vbox = gtk_vbox_new (FALSE, 0);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), vbox,
- FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (content_area), vbox, FALSE, FALSE, 0);
label = gtk_label_new (message);
gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT);
|
|
From: <gi...@gp...> - 2011-09-05 15:06:31
|
The branch, master has been updated
via 03eb7fd68481ec1f471ce08d7def9774c10d58af (commit)
from cddceda9372314d504f3eb65668ae831b0a23d27 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
src/hid/gtk/gui-output-events.c | 31 +++++++++++++++++++------------
1 files changed, 19 insertions(+), 12 deletions(-)
=================
Commit Messages
=================
commit 03eb7fd68481ec1f471ce08d7def9774c10d58af
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Use accessor functions for handling GtkAdjustments
In GTK3.0, direct access to these member variables will be impossible.
:100644 100644 22dd54e... c483c3c... M src/hid/gtk/gui-output-events.c
=========
Changes
=========
commit 03eb7fd68481ec1f471ce08d7def9774c10d58af
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Use accessor functions for handling GtkAdjustments
In GTK3.0, direct access to these member variables will be impossible.
diff --git a/src/hid/gtk/gui-output-events.c b/src/hid/gtk/gui-output-events.c
index 22dd54e..c483c3c 100644
--- a/src/hid/gtk/gui-output-events.c
+++ b/src/hid/gtk/gui-output-events.c
@@ -60,8 +60,8 @@ ghid_port_ranges_changed (void)
h_adj = gtk_range_get_adjustment (GTK_RANGE (ghidgui->h_range));
v_adj = gtk_range_get_adjustment (GTK_RANGE (ghidgui->v_range));
- gport->view.x0 = h_adj->value;
- gport->view.y0 = v_adj->value;
+ gport->view.x0 = gtk_adjustment_get_value (h_adj);
+ gport->view.y0 = gtk_adjustment_get_value (v_adj);
ghid_invalidate_all ();
}
@@ -73,6 +73,7 @@ void
ghid_port_ranges_scale (void)
{
GtkAdjustment *adj;
+ gdouble page_size;
/* Update the scrollbars with PCB units. So Scale the current
| drawing area size in pixels to PCB units and that will be
@@ -82,18 +83,24 @@ ghid_port_ranges_scale (void)
gport->view.height = gport->height * gport->view.coord_per_px;
adj = gtk_range_get_adjustment (GTK_RANGE (ghidgui->h_range));
- adj->page_size = MIN (gport->view.width, PCB->MaxWidth);
- adj->page_increment = adj->page_size / 10.0;
- adj->step_increment = adj->page_size / 100.0;
- adj->lower = -gport->view.width;
- adj->upper = PCB->MaxWidth + adj->page_size;
+ page_size = MIN (gport->view.width, PCB->MaxWidth);
+ gtk_adjustment_configure (adj,
+ gtk_adjustment_get_value (adj), /* value */
+ -gport->view.width, /* lower */
+ PCB->MaxWidth + page_size, /* upper */
+ page_size / 100.0, /* step_increment */
+ page_size / 10.0, /* page_increment */
+ page_size); /* page_size */
adj = gtk_range_get_adjustment (GTK_RANGE (ghidgui->v_range));
- adj->page_size = MIN (gport->view.height, PCB->MaxHeight);
- adj->page_increment = adj->page_size / 10.0;
- adj->step_increment = adj->page_size / 100.0;
- adj->lower = -gport->view.height;
- adj->upper = PCB->MaxHeight + adj->page_size;
+ page_size = MIN (gport->view.height, PCB->MaxHeight);
+ gtk_adjustment_configure (adj,
+ gtk_adjustment_get_value (adj), /* value */
+ -gport->view.height, /* lower */
+ PCB->MaxHeight + page_size, /* upper */
+ page_size / 100.0, /* step_increment */
+ page_size / 10.0, /* page_increment */
+ page_size); /* page_size */
}
|
|
From: <gi...@gp...> - 2011-09-05 14:51:01
|
The branch, master has been updated
via cddceda9372314d504f3eb65668ae831b0a23d27 (commit)
from d96be87abe6b84c40814c71d719c136a79533a58 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
src/hid/gtk/gui-config.c | 2 +-
src/hid/gtk/gui-top-window.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
=================
Commit Messages
=================
commit cddceda9372314d504f3eb65668ae831b0a23d27
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Don't use GTK_WIDGET_SET_FLAGS()
Call the appropriate setter function instead. (For GTK3.0 compatibility).
:100644 100644 0833486... 851571a... M src/hid/gtk/gui-config.c
:100644 100644 9c22ea2... 06eab4d... M src/hid/gtk/gui-top-window.c
=========
Changes
=========
commit cddceda9372314d504f3eb65668ae831b0a23d27
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Don't use GTK_WIDGET_SET_FLAGS()
Call the appropriate setter function instead. (For GTK3.0 compatibility).
diff --git a/src/hid/gtk/gui-config.c b/src/hid/gtk/gui-config.c
index 0833486..851571a 100644
--- a/src/hid/gtk/gui-config.c
+++ b/src/hid/gtk/gui-config.c
@@ -2174,7 +2174,7 @@ ghid_config_window_show (void)
gtk_box_pack_start (GTK_BOX (main_vbox), hbox, FALSE, FALSE, 0);
button = gtk_button_new_from_stock (GTK_STOCK_OK);
- GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
+ gtk_widget_set_can_default (button, TRUE);
g_signal_connect (G_OBJECT (button), "clicked",
G_CALLBACK (config_close_cb), NULL);
gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0);
diff --git a/src/hid/gtk/gui-top-window.c b/src/hid/gtk/gui-top-window.c
index 9c22ea2..06eab4d 100644
--- a/src/hid/gtk/gui-top-window.c
+++ b/src/hid/gtk/gui-top-window.c
@@ -1271,7 +1271,7 @@ ghid_build_pcb_top_window (void)
* enter and button press callbacks grab focus to be sure we have it
* when in the drawing_area.
*/
- GTK_WIDGET_SET_FLAGS (gport->drawing_area, GTK_CAN_FOCUS);
+ gtk_widget_set_can_focus (gport->drawing_area, TRUE);
gtk_box_pack_start (GTK_BOX (hbox), gport->drawing_area, TRUE, TRUE, 0);
|
|
From: <gi...@gp...> - 2011-09-05 14:47:09
|
The branch, master has been updated
via d96be87abe6b84c40814c71d719c136a79533a58 (commit)
from 3073ecedc2ea25b2f1f65b54032d2ae3b444671c (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
src/hid/gtk/gui-library-window.c | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
=================
Commit Messages
=================
commit d96be87abe6b84c40814c71d719c136a79533a58
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Don't test for NOOP before calling gtk_widget_set_sensitive()
We were using a deprecated test macro anyway, GTK already does a NOOP
test inside gtk_widget_set_sensitive().
:100644 100644 2cda08e... c709dbc... M src/hid/gtk/gui-library-window.c
=========
Changes
=========
commit d96be87abe6b84c40814c71d719c136a79533a58
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Don't test for NOOP before calling gtk_widget_set_sensitive()
We were using a deprecated test macro anyway, GTK already does a NOOP
test inside gtk_widget_set_sensitive().
diff --git a/src/hid/gtk/gui-library-window.c b/src/hid/gtk/gui-library-window.c
index 2cda08e..c709dbc 100644
--- a/src/hid/gtk/gui-library-window.c
+++ b/src/hid/gtk/gui-library-window.c
@@ -474,10 +474,7 @@ library_window_callback_filter_entry_changed (GtkEditable * editable,
sensitive =
(g_ascii_strcasecmp (gtk_entry_get_text (library_window->entry_filter),
"") != 0);
- if (GTK_WIDGET_IS_SENSITIVE (button) != sensitive)
- {
- gtk_widget_set_sensitive (button, sensitive);
- }
+ gtk_widget_set_sensitive (button, sensitive);
/* Cancel any pending update of the footprint list filter */
if (library_window->filter_timeout != 0)
|
|
From: <gi...@gp...> - 2011-09-05 14:41:14
|
The branch, master has been updated
via 3073ecedc2ea25b2f1f65b54032d2ae3b444671c (commit)
via 29c9c84b025f13687f99974b255ef3c365a129ef (commit)
from 9b803f2740021a18ae37f89b341efb87fad39786 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
src/hid/gtk/gui-utils.c | 15 ---------------
src/hid/gtk/gui.h | 2 --
2 files changed, 0 insertions(+), 17 deletions(-)
=================
Commit Messages
=================
commit 3073ecedc2ea25b2f1f65b54032d2ae3b444671c
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Remove unused function ghid_button_set_text()
:100644 100644 605d1a4... e4e97fa... M src/hid/gtk/gui-utils.c
:100644 100644 73e970e... dfed2c6... M src/hid/gtk/gui.h
commit 29c9c84b025f13687f99974b255ef3c365a129ef
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Remove unused function ghid_button_active()
:100644 100644 db61f77... 605d1a4... M src/hid/gtk/gui-utils.c
:100644 100644 4fa67a7... 73e970e... M src/hid/gtk/gui.h
=========
Changes
=========
commit 3073ecedc2ea25b2f1f65b54032d2ae3b444671c
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Remove unused function ghid_button_set_text()
diff --git a/src/hid/gtk/gui-utils.c b/src/hid/gtk/gui-utils.c
index 605d1a4..e4e97fa 100644
--- a/src/hid/gtk/gui-utils.c
+++ b/src/hid/gtk/gui-utils.c
@@ -191,15 +191,6 @@ ghid_map_color_string (char *color_string, GdkColor * color)
}
-void
-ghid_button_set_text (GtkWidget * button, gchar * text)
-{
- GtkWidget *label = gtk_bin_get_child (GTK_BIN (button));
-
- gtk_label_set_text (GTK_LABEL (label), text);
-}
-
-
gchar *
ghid_entry_get_text (GtkWidget * entry)
{
diff --git a/src/hid/gtk/gui.h b/src/hid/gtk/gui.h
index 73e970e..dfed2c6 100644
--- a/src/hid/gtk/gui.h
+++ b/src/hid/gtk/gui.h
@@ -357,7 +357,6 @@ gboolean ghid_shift_is_pressed (void);
void ghid_draw_area_update (GHidPort * out, GdkRectangle * rect);
gchar *ghid_get_color_name (GdkColor * color);
void ghid_map_color_string (gchar * color_string, GdkColor * color);
-void ghid_button_set_text (GtkWidget * button, gchar * text);
gchar *ghid_entry_get_text (GtkWidget * entry);
void ghid_check_button_connected (GtkWidget * box, GtkWidget ** button,
gboolean active, gboolean pack_start,
commit 29c9c84b025f13687f99974b255ef3c365a129ef
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Remove unused function ghid_button_active()
diff --git a/src/hid/gtk/gui-utils.c b/src/hid/gtk/gui-utils.c
index db61f77..605d1a4 100644
--- a/src/hid/gtk/gui-utils.c
+++ b/src/hid/gtk/gui-utils.c
@@ -200,12 +200,6 @@ ghid_button_set_text (GtkWidget * button, gchar * text)
}
-gboolean
-ghid_button_active (GtkWidget * widget)
-{
- return GTK_TOGGLE_BUTTON (widget)->active;
-}
-
gchar *
ghid_entry_get_text (GtkWidget * entry)
{
diff --git a/src/hid/gtk/gui.h b/src/hid/gtk/gui.h
index 4fa67a7..73e970e 100644
--- a/src/hid/gtk/gui.h
+++ b/src/hid/gtk/gui.h
@@ -358,7 +358,6 @@ void ghid_draw_area_update (GHidPort * out, GdkRectangle * rect);
gchar *ghid_get_color_name (GdkColor * color);
void ghid_map_color_string (gchar * color_string, GdkColor * color);
void ghid_button_set_text (GtkWidget * button, gchar * text);
-gboolean ghid_button_active (GtkWidget * widget);
gchar *ghid_entry_get_text (GtkWidget * entry);
void ghid_check_button_connected (GtkWidget * box, GtkWidget ** button,
gboolean active, gboolean pack_start,
|
|
From: <gi...@gp...> - 2011-09-05 14:34:31
|
The branch, master has been updated
via 9b803f2740021a18ae37f89b341efb87fad39786 (commit)
from 718b9c34a4c2e4070436cf8abf756f22c5c74cec (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
src/hid/gtk/gtkhid-gdk.c | 6 ++++--
src/hid/gtk/gui-drc-window.c | 3 ++-
2 files changed, 6 insertions(+), 3 deletions(-)
=================
Commit Messages
=================
commit 9b803f2740021a18ae37f89b341efb87fad39786
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Use gtk_widget_get_style() accessor, rather than direct access
In GTK3.0, direct access to widget->style will be impossible.
Swap out the GTK_WIDGET_STATE() macro for gtk_widget_get_state(), which
does not directly access the GSeal'd member widget->state.
:100644 100644 85fd1d6... 96e54a6... M src/hid/gtk/gtkhid-gdk.c
:100644 100644 e7f5c46... 4ab38b1... M src/hid/gtk/gui-drc-window.c
=========
Changes
=========
commit 9b803f2740021a18ae37f89b341efb87fad39786
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Use gtk_widget_get_style() accessor, rather than direct access
In GTK3.0, direct access to widget->style will be impossible.
Swap out the GTK_WIDGET_STATE() macro for gtk_widget_get_state(), which
does not directly access the GSeal'd member widget->state.
diff --git a/src/hid/gtk/gtkhid-gdk.c b/src/hid/gtk/gtkhid-gdk.c
index 85fd1d6..96e54a6 100644
--- a/src/hid/gtk/gtkhid-gdk.c
+++ b/src/hid/gtk/gtkhid-gdk.c
@@ -1025,6 +1025,7 @@ show_crosshair (gboolean paint_new_location)
{
render_priv *priv = gport->render_priv;
GdkWindow *window = gtk_widget_get_window (gport->drawing_area);
+ GtkStyle *style = gtk_widget_get_style (gport->drawing_area);
gint x, y;
static gint x_prev = -1, y_prev = -1;
static gboolean draw_markers, draw_markers_prev = FALSE;
@@ -1037,7 +1038,7 @@ show_crosshair (gboolean paint_new_location)
if (!xor_gc)
{
xor_gc = gdk_gc_new (window);
- gdk_gc_copy (xor_gc, ghid_port.drawing_area->style->white_gc);
+ gdk_gc_copy (xor_gc, style->white_gc);
gdk_gc_set_function (xor_gc, GDK_XOR);
gdk_gc_set_clip_origin (xor_gc, 0, 0);
set_clip (priv, xor_gc);
@@ -1332,6 +1333,7 @@ static void
draw_lead_user (render_priv *priv)
{
GdkWindow *window = gtk_widget_get_window (gport->drawing_area);
+ GtkStyle *style = gtk_widget_get_style (gport->drawing_area);
int i;
Coord radius = priv->lead_user_radius;
Coord width = MM_TO_COORD (LEAD_USER_WIDTH);
@@ -1345,7 +1347,7 @@ draw_lead_user (render_priv *priv)
if (lead_gc == NULL)
{
lead_gc = gdk_gc_new (window);
- gdk_gc_copy (lead_gc, ghid_port.drawing_area->style->white_gc);
+ gdk_gc_copy (lead_gc, style->white_gc);
gdk_gc_set_function (lead_gc, GDK_XOR);
gdk_gc_set_clip_origin (lead_gc, 0, 0);
lead_color.pixel = 0;
diff --git a/src/hid/gtk/gui-drc-window.c b/src/hid/gtk/gui-drc-window.c
index e7f5c46..4ab38b1 100644
--- a/src/hid/gtk/gui-drc-window.c
+++ b/src/hid/gtk/gui-drc-window.c
@@ -719,6 +719,7 @@ ghid_violation_renderer_render (GtkCellRenderer *cell,
GtkCellRendererState flags)
{
GdkDrawable *mydrawable;
+ GtkStyle *style = gtk_widget_get_style (widget);
GhidViolationRenderer *renderer = GHID_VIOLATION_RENDERER (cell);
GhidDrcViolation *violation = renderer->violation;
int pixmap_size = VIOLATION_PIXMAP_PIXEL_SIZE - 2 * VIOLATION_PIXMAP_PIXEL_BORDER;
@@ -751,7 +752,7 @@ ghid_violation_renderer_render (GtkCellRenderer *cell,
mydrawable = GDK_DRAWABLE (violation->pixmap);
- gdk_draw_drawable (window, widget->style->fg_gc[GTK_WIDGET_STATE (widget)],
+ gdk_draw_drawable (window, style->fg_gc[gtk_widget_get_state (widget)],
mydrawable, 0, 0,
cell_area->x + cell_area->width + VIOLATION_PIXMAP_PIXEL_BORDER,
cell_area->y + VIOLATION_PIXMAP_PIXEL_BORDER, -1, -1);
|
|
From: <gi...@gp...> - 2011-09-05 14:31:07
|
The branch, master has been updated
discards 9ad2e6ef8da1118911462daf29778dbaf5216312 (commit)
from 9ad2e6ef8da1118911462daf29778dbaf5216312 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
src/hid/gtk/gui-drc-window.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
=================
Commit Messages
=================
=========
Changes
=========
|