Commit 24275074 authored by Jody Goldberg's avatar Jody Goldberg Committed by Jody Goldberg

Enable/Disable the arrow contraction on the toolbars if the handlbox is



2004-01-06  Jody Goldberg <jody@gnome.org>

	* src/wbc-gtk.c (cb_add_menus_toolbars) : Enable/Disable the arrow
	  contraction on the toolbars if the handlbox is docked/undocked.
	  This avoids having floating toolbars with nothing but the collapse
	  arrow.

	* configure.in : re-enable the *DEPRECATED*
	and add a pile of #undef/#warning to make sure things still work
parent 34ac5ca9
......@@ -5,6 +5,9 @@
* Author: Zbigniew Chyla (cyba@gnome.pl)
*/
#undef GTK_DISABLE_DEPRECATED
#warning "This file uses GTK_DISABLE_DEPRECATED for GtkOptionMenu"
#include <gnumeric-config.h>
#include <string.h>
#include <glib.h>
......
......@@ -304,14 +304,14 @@ gnumeric_LDFLAGS = -export-dynamic
gnumeric_app_libs = \
dialogs/libdialogs.a \
widgets/libwidgets.a \
tools/libtools.a \
tools/solver/libsolver.a \
tools/solver/glpk/source/libglpk.a \
tools/solver/lp_solve/liblp_solve.a \
cut-n-paste-code/goffice/libgoffice.la \
cut-n-paste-code/pcre/libpcre.a \
cut-n-paste-code/foocanvas/libfoocanvas/libfoocanvas.a
cut-n-paste-code/foocanvas/libfoocanvas/libfoocanvas.a \
widgets/libwidgets.a
if ENABLE_BONOBO_COMPONENT
gnumeric_component_SOURCES = \
......
......@@ -65,6 +65,7 @@ noinst_HEADERS = \
foo-canvas-marshal.h \
foo-canvas-i18n.h \
foo-canvas-line.h \
foo-canvas-marshal.h \
foo-canvas-pixbuf.h \
foo-canvas-polygon.h \
foo-canvas-rect-ellipse.h \
......
......@@ -873,11 +873,11 @@ foo_canvas_line_get_property (GObject *object,
break;
case PROP_FILL_COLOR:
g_value_set_string_take_ownership (value,
g_strdup_printf ("#%02x%02x%02x",
line->fill_rgba >> 24,
(line->fill_rgba >> 16) & 0xff,
(line->fill_rgba >> 8) & 0xff));
g_value_take_string (value,
g_strdup_printf ("#%02x%02x%02x",
line->fill_rgba >> 24,
(line->fill_rgba >> 16) & 0xff,
(line->fill_rgba >> 8) & 0xff));
break;
case PROP_FILL_COLOR_GDK: {
......
......@@ -1228,11 +1228,11 @@ foo_canvas_text_get_property (GObject *object,
break;
case PROP_FILL_COLOR:
g_value_set_string_take_ownership (value,
g_strdup_printf ("#%02x%02x%02x",
text->rgba >> 24,
(text->rgba >> 16) & 0xff,
(text->rgba >> 8) & 0xff));
g_value_take_string (value,
g_strdup_printf ("#%02x%02x%02x",
text->rgba >> 24,
(text->rgba >> 16) & 0xff,
(text->rgba >> 8) & 0xff));
break;
case PROP_FILL_COLOR_GDK: {
......
......@@ -308,7 +308,7 @@ gog_axis_get_property (GObject *obj, guint param_id,
break;
case AXIS_PROP_ASSIGNED_FORMAT_STR_XL :
if (axis->assigned_format != NULL)
g_value_set_string_take_ownership (value,
g_value_take_string (value,
go_format_as_XL (axis->assigned_format, FALSE));
else
g_value_set_static_string (value, NULL);
......
......@@ -51,6 +51,7 @@
#include <gtk/gtkframe.h>
#include <gtk/gtkviewport.h>
#include <gtk/gtkvbox.h>
#include <gtk/gtkhbox.h>
#include <gtk/gtkcellrenderertext.h>
#include <gtk/gtkcellrendererpixbuf.h>
#include <gtk/gtkstock.h>
......
......@@ -36,7 +36,7 @@
#include <gsf/gsf-impl-utils.h>
#include <gtk/gtknotebook.h>
#include <gtk/gtklabel.h>
#include <gtk/gtkbox.h>
#include <gtk/gtkhbox.h>
struct _GogLabel {
GogOutlinedObject base;
......
......@@ -19,6 +19,9 @@
* USA
*/
#undef PANGO_DISABLE_DEPRECATED
#warning "This file uses PANGO_DISABLE_DEPRECATED for pango_ft2_get_context"
#include <gnumeric-config.h>
#include <goffice/graph/gog-renderer-svg.h>
#include <goffice/graph/gog-renderer-impl.h>
......
......@@ -19,6 +19,11 @@
* USA
*/
#undef GTK_DISABLE_DEPRECATED
#warning "This file uses GTK_DISABLE_DEPRECATED for GtkOptionMenu"
#undef GNOME_DISABLE_DEPRECATED
#warning "This file uses GNOME_DISABLE_DEPRECATED for GnomeColorPicker"
#include <gnumeric-config.h>
#include <goffice/graph/gog-style.h>
#include <goffice/graph/gog-styled-object.h>
......@@ -42,6 +47,8 @@
#include <widgets/preview-file-selection.h>
#include <gdk-pixbuf/gdk-pixdata.h>
#include <libgnomeui/gnome-color-picker.h>
#include <gsf/gsf-impl-utils.h>
#include <glib/gi18n.h>
#include <string.h>
......@@ -121,7 +128,7 @@ create_color_combo (StylePrefState *state,
&gdk_default, color_group_fetch (group, NULL));
color_combo_set_instant_apply (COLOR_COMBO (w), FALSE);
gnm_combo_box_set_tearable (GNM_COMBO_BOX (w), FALSE);
gnome_color_picker_set_use_alpha (COLOR_COMBO (w)->palette->picker, TRUE);
gnome_color_picker_set_use_alpha (GNOME_COLOR_PICKER (COLOR_COMBO (w)->palette->picker), TRUE);
gtk_label_set_mnemonic_widget (
GTK_LABEL (glade_xml_get_widget (state->gui, label_name)), w);
color_combo_set_gocolor (w, initial_val);
......
......@@ -27,6 +27,9 @@
* 02111-1307, USA.
*/
#undef GNOME_DISABLE_DEPRECATED
#warning "This file uses GNOME_DISABLE_DEPRECATED for GnomeColorPicker"
#include <gnumeric-config.h>
#include <libfoocanvas/foo-canvas.h>
#include <gdk/gdkcolor.h>
......@@ -35,9 +38,11 @@
#include <gsf/gsf-impl-utils.h>
#include "color-group.h"
#include "color-palette.h"
#include <gui-util.h>
#include <style-color.h>
#include <gtk/gtklabel.h>
#include <libgnomeui/gnome-color-picker.h>
#include <string.h>
......@@ -170,7 +175,7 @@ color_palette_change_custom_color (ColorPalette *P, GdkColor const *new_color)
}
if (next_swatch != NULL) {
next_swatch->style->bg[GTK_STATE_NORMAL] = *new_color;
gnome_color_picker_set_i16 (P->picker,
gnome_color_picker_set_i16 (GNOME_COLOR_PICKER (P->picker),
new_color->red, new_color->green, new_color->blue, 0);
}
}
......@@ -408,8 +413,9 @@ color_palette_setup (ColorPalette *P,
Keep a pointer to the picker so that we can update it's color
to keep it in synch with that of other members of the group
*/
P->picker = GNOME_COLOR_PICKER (gnome_color_picker_new ());
gnome_color_picker_set_title (P->picker, _("Choose Custom Color"));
P->picker = gnome_color_picker_new ();
gnome_color_picker_set_title (GNOME_COLOR_PICKER (P->picker),
_("Choose Custom Color"));
gtk_table_attach (GTK_TABLE (table), GTK_WIDGET (P->picker), ncols - 3, ncols,
row + 1, row + 2, GTK_FILL | GTK_EXPAND, 0, 0, 0);
g_signal_connect (P->picker, "color_set",
......@@ -457,7 +463,7 @@ color_palette_get_color_picker (ColorPalette *P)
{
g_return_val_if_fail (IS_COLOR_PALETTE (P), NULL);
return GTK_WIDGET (P->picker);
return P->picker;
}
......
......@@ -30,7 +30,6 @@
#ifndef GNUMERIC_COLOR_PALETTE_H
#define GNUMERIC_COLOR_PALETTE_H
#include <libgnomeui/gnome-color-picker.h>
#include <widgets/color-group.h>
#include <gtk/gtkvbox.h>
#include <gtk/gtktooltips.h>
......@@ -43,7 +42,7 @@ typedef struct _ColorNamePair ColorNamePair;
typedef struct _ColorPalette {
GtkVBox vbox;
GtkTooltips *tool_tip;
GnomeColorPicker *picker;
GtkWidget *picker;
/*
* Array of colors
*/
......
......@@ -19,9 +19,12 @@
* USA
*/
#undef GNOME_DISABLE_DEPRECATED
#warning "This file uses GNOME_DISABLE_DEPRECATED for GnomeColorPicker"
#include <gnumeric-config.h>
#include <goffice/utils/go-color.h>
#include <widgets/widget-color-combo.h>
#include <libgnomeui/gnome-color-picker.h>
#include <stdio.h>
......@@ -341,7 +344,7 @@ color_combo_get_gocolor (GtkWidget *cc, gboolean is_custom) /* , GOColor default
* stock combo interface loses the alpha by storing a GdkColor */
if (is_custom) {
guint8 r, g, b, a;
gnome_color_picker_get_i8 (COLOR_COMBO (cc)->palette->picker,
gnome_color_picker_get_i8 (GNOME_COLOR_PICKER (COLOR_COMBO (cc)->palette->picker),
&r, &g, &b, &a);
return RGBA_TO_UINT (r, g, b, a);
} else {
......@@ -364,7 +367,7 @@ color_combo_set_gocolor (GtkWidget *cc, GOColor c)
/* should not be necessary. The CC should do it for itself */
gdk_rgb_find_color (gtk_widget_get_colormap (cc), &gdk);
color_combo_set_color (COLOR_COMBO (cc), &gdk);
gnome_color_picker_set_i8 (COLOR_COMBO (cc)->palette->picker,
gnome_color_picker_set_i8 (GNOME_COLOR_PICKER (COLOR_COMBO (cc)->palette->picker),
UINT_RGBA_R (c), UINT_RGBA_G (c),
UINT_RGBA_B (c), UINT_RGBA_A (c));
} else
......
......@@ -39,8 +39,9 @@
#include <gtk/gtknotebook.h>
#include <gtk/gtkoptionmenu.h>
#include <gtk/gtktable.h>
#include <gtk/gtkbox.h>
const char *output_group[] = {
char const *output_group[] = {
"newsheet-button",
"newworkbook-button",
"outputrange-button",
......
......@@ -18,6 +18,9 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#undef GTK_DISABLE_DEPRECATED
#warning "This file uses GTK_DISABLE_DEPRECATED for GtkOptionMenu"
#include <gnumeric-config.h>
#include <glib/gi18n.h>
#include <gnumeric.h>
......
......@@ -24,6 +24,9 @@
* remove the disabling of new/edit/remove buttons!
*/
#undef GTK_DISABLE_DEPRECATED
#warning "This file uses GTK_DISABLE_DEPRECATED for GtkOptionMenu"
#include <gnumeric-config.h>
#include <glib/gi18n.h>
#include <gnumeric.h>
......
......@@ -21,6 +21,11 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
**/
#undef GTK_DISABLE_DEPRECATED
#warning "This file uses GTK_DISABLE_DEPRECATED for GtkOptionMenu"
#undef PANGO_DISABLE_DEPRECATED
#warning "This file uses PANGO_DISABLE_DEPRECATED for pango_ft2_get_context"
#include <gnumeric-config.h>
#include <glib/gi18n.h>
#include <gnumeric.h>
......
......@@ -20,6 +20,9 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#undef GTK_DISABLE_DEPRECATED
#warning "This file uses GTK_DISABLE_DEPRECATED for GtkOptionMenu"
#include <gnumeric-config.h>
#include <glib/gi18n.h>
#include <gnumeric.h>
......
......@@ -22,6 +22,11 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#undef GTK_DISABLE_DEPRECATED
#warning "This file uses GTK_DISABLE_DEPRECATED for GtkCombo in GnomeEntry"
#undef GNOME_DISABLE_DEPRECATED
#warning "This file uses GNOME_DISABLE_DEPRECATED for GnomeEntry"
#include <gnumeric-config.h>
#include <glib/gi18n.h>
#include <gnumeric.h>
......
......@@ -19,6 +19,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*/
#undef GTK_DISABLE_DEPRECATED
#warning "This file uses GTK_DISABLE_DEPRECATED for GtkOptionMenu"
#include <gnumeric-config.h>
#include <gnumeric.h>
#include "dialogs.h"
......@@ -38,6 +40,7 @@
#include <workbook-edit.h>
#include <glib/gi18n.h>
#include <gtk/gtkbox.h>
#include <gtk/gtkimage.h>
#include <gtk/gtklabel.h>
#include <gtk/gtksizegroup.h>
......
......@@ -36,6 +36,7 @@
#include <gtk/gtkstock.h>
#include <gtk/gtkframe.h>
#include <gtk/gtkvbox.h>
#include <gtk/gtkhbox.h>
#define BUTTON_PASTE_LINK 0
......
......@@ -20,6 +20,8 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#undef GTK_DISABLE_DEPRECATED
#warning "This file uses GTK_DISABLE_DEPRECATED for GtkOptionMenu"
#include <gnumeric-config.h>
#include <glib/gi18n.h>
#include <gnumeric.h>
......
......@@ -21,6 +21,8 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#undef GTK_DISABLE_DEPRECATED
#warning "This file uses GTK_DISABLE_DEPRECATED for GtkOptionMenu"
#include <gnumeric-config.h>
#include <glib/gi18n.h>
......
......@@ -19,6 +19,11 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#undef GTK_DISABLE_DEPRECATED
#warning "This file uses GTK_DISABLE_DEPRECATED for GtkCombo in GnomeEntry"
#undef GNOME_DISABLE_DEPRECATED
#warning "This file uses GNOME_DISABLE_DEPRECATED for GnomeEntry"
#include <gnumeric-config.h>
#include <glib/gi18n.h>
#include <gnumeric.h>
......
......@@ -19,6 +19,11 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#undef GTK_DISABLE_DEPRECATED
#warning "This file uses GTK_DISABLE_DEPRECATED for GtkCombo in GnomeEntry"
#undef GNOME_DISABLE_DEPRECATED
#warning "This file uses GNOME_DISABLE_DEPRECATED for GnomeEntry"
#include <gnumeric-config.h>
#include <glib/gi18n.h>
#include <gnumeric.h>
......@@ -164,11 +169,11 @@ search_get_value (gint row, gint column, gpointer _dd, GValue *value)
g_value_set_string (value, cell_comment_text_get (item->comment));
return;
case SRL_value:
g_value_set_string_take_ownership (value,
g_value_take_string (value,
value_get_as_string (cell->value));
return;
case SRL_contents:
g_value_set_string_take_ownership (value,
g_value_take_string (value,
cell_get_entered_text (cell));
return;
#ifndef DEBUG_SWITCH_ENUM
......
......@@ -19,10 +19,14 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#undef GTK_DISABLE_DEPRECATED
#warning "This file uses GTK_DISABLE_DEPRECATED for GtkCombo"
#include <gnumeric-config.h>
#include <gnumeric.h>
#include "dialog-stf.h"
#include "format.h"
#include <gtk/gtkcombo.h>
/*************************************************************************************************
* SIGNAL HANDLERS
......@@ -248,7 +252,7 @@ stf_dialog_csv_page_init (GladeXML *gui, StfDialogData *pagedata)
pagedata->csv.csv_custom = GTK_CHECK_BUTTON (glade_xml_get_widget (gui, "csv_custom"));
pagedata->csv.csv_customseparator = GTK_ENTRY (glade_xml_get_widget (gui, "csv_customseparator"));
pagedata->csv.csv_2x_indicator = GTK_CHECK_BUTTON (glade_xml_get_widget (gui, "csv_2x_indicator"));
pagedata->csv.csv_textindicator = GTK_COMBO (glade_xml_get_widget (gui, "csv_textindicator"));
pagedata->csv.csv_textindicator = glade_xml_get_widget (gui, "csv_textindicator");
pagedata->csv.csv_textfield = GTK_ENTRY (glade_xml_get_widget (gui, "csv_textfield"));
pagedata->csv.csv_duplicates = GTK_CHECK_BUTTON (glade_xml_get_widget (gui, "csv_duplicates"));
......
......@@ -19,6 +19,8 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#undef GTK_DISABLE_DEPRECATED
#warning "This file uses GTK_DISABLE_DEPRECATED for GtkOptionMenu"
#include <gnumeric-config.h>
#include <glib/gi18n.h>
#include <gnumeric.h>
......@@ -35,13 +37,12 @@
static void format_page_update_preview (StfDialogData *pagedata);
/** * main_page_trim_toggled: * @button: the toggle button the event handler is attached to * @data: mother struct * **/
static void
format_page_trim_menu_deactivate (G_GNUC_UNUSED GtkMenu *menu,
StfDialogData *data)
{
StfTrimType_t trim;
int trimtype = gtk_option_menu_get_history (data->format.format_trim);
int trimtype = gtk_option_menu_get_history (GTK_OPTION_MENU (data->format.format_trim));
switch (trimtype) {
case -1:
......@@ -545,7 +546,7 @@ stf_dialog_format_page_init (GladeXML *gui, StfDialogData *pagedata)
pagedata->format.format_selector = NUMBER_FORMAT_SELECTOR( number_format_selector_new ());
pagedata->format.format_data_container = glade_xml_get_widget (gui, "format_data_container");
pagedata->format.format_trim = GTK_OPTION_MENU (glade_xml_get_widget (gui, "format_trim"));
pagedata->format.format_trim = glade_xml_get_widget (gui, "format_trim");
format_hbox = glade_xml_get_widget (gui, "format_hbox");
gtk_box_pack_end_defaults (GTK_BOX (format_hbox), GTK_WIDGET (pagedata->format.format_selector));
......@@ -580,7 +581,7 @@ stf_dialog_format_page_init (GladeXML *gui, StfDialogData *pagedata)
"locale_changed",
G_CALLBACK (locale_changed_cb), pagedata);
menu = (GtkMenu *) gtk_option_menu_get_menu (pagedata->format.format_trim);
menu = (GtkMenu *) gtk_option_menu_get_menu (GTK_OPTION_MENU (pagedata->format.format_trim));
g_signal_connect (G_OBJECT (menu),
"deactivate",
G_CALLBACK (format_page_trim_menu_deactivate), pagedata);
......
......@@ -41,7 +41,7 @@ typedef struct {
GtkEntry *csv_customseparator;
GtkCheckButton *csv_duplicates;
GtkCheckButton *csv_2x_indicator;
GtkCombo *csv_textindicator;
GtkWidget *csv_textindicator;
GtkEntry *csv_textfield;
GtkWidget *csv_data_container;
......@@ -62,7 +62,7 @@ typedef struct {
/* for the format_page */
typedef struct {
GtkWidget *format_data_container;
GtkOptionMenu *format_trim;
GtkWidget *format_trim;
NumberFormatSelector *format_selector;
/* Page members that are created at run-time */
......
......@@ -49,6 +49,7 @@
#include "style-color.h"
#include <gtk/gtktable.h>
#include <gtk/gtkhbox.h>
#include <gtk/gtkradiobutton.h>
#include <string.h>
......
......@@ -27,6 +27,7 @@
#include <gui-util.h>
#include <workbook-control-gui.h>
#include <gtk/gtkradiobutton.h>
#include <gtk/gtkbox.h>
#define VIEW_DIALOG_KEY "view-dialog"
......
......@@ -7,6 +7,9 @@
* Zbigniew Chyla (cyba@gnome.pl)
* Andreas J. Guelzow (aguelzow@taliesin.ca)
*/
#undef GTK_DISABLE_DEPRECATED
#warning "This file uses GTK_DISABLE_DEPRECATED for GtkOptionMenu and GtkCombo"
#include <gnumeric-config.h>
#include <glib/gi18n.h>
#include "gnumeric.h"
......@@ -24,7 +27,11 @@
#include "gnumeric-gconf.h"
#include "widgets/widget-charmap-selector.h"
#include <gtk/gtk.h>
#include <gtk/gtkcombo.h>
#include <gtk/gtkoptionmenu.h>
#include <gtk/gtklabel.h>
#include <gtk/gtktable.h>
#include <gtk/gtkcombo.h>
#include <glade/glade.h>
#include <unistd.h>
#include <errno.h>
......
......@@ -5,6 +5,8 @@
* Author:
* Miguel de Icaza (miguel@gnu.org)
*/
#undef GTK_DISABLE_DEPRECATED
#warning "This file uses GTK_DISABLE_DEPRECATED for GtkCombo and some signal handling"
#include <gnumeric-config.h>
#include <glib/gi18n.h>
......@@ -1471,7 +1473,8 @@ void
gnm_widget_disable_focus (GtkWidget *w)
{
if (GTK_IS_CONTAINER (w))
gtk_container_foreach (GTK_CONTAINER (w), gnm_widget_disable_focus, NULL);
gtk_container_foreach (GTK_CONTAINER (w),
(GtkCallback) gnm_widget_disable_focus, NULL);
GTK_WIDGET_UNSET_FLAGS (w, GTK_CAN_FOCUS);
}
......@@ -786,6 +786,13 @@ wbc_gtk_style_feedback (WorkbookControl *wbc, GnmStyle const *changes)
extern void wbcg_register_actions (WorkbookControlGUI *wbcg, GtkActionGroup *group);;
static void
cb_handlebox_dock_status (G_GNUC_UNUSED GtkHandleBox *hb,
GtkToolbar *toolbar, gpointer attached)
{
gtk_toolbar_set_show_arrow (toolbar, GPOINTER_TO_INT (attached));
}
static void
cb_add_menus_toolbars (G_GNUC_UNUSED GtkUIManager *ui,
GtkWidget *w, WBCgtk *gtk)
......@@ -793,6 +800,12 @@ cb_add_menus_toolbars (G_GNUC_UNUSED GtkUIManager *ui,
if (GTK_IS_TOOLBAR (w)) {
GtkWidget *box = gtk_handle_box_new ();
gtk_container_add (GTK_CONTAINER (box), w);
g_signal_connect (box, "child_attached",
G_CALLBACK (cb_handlebox_dock_status),
GINT_TO_POINTER (TRUE));
g_signal_connect (box, "child_detached",
G_CALLBACK (cb_handlebox_dock_status),
GINT_TO_POINTER (FALSE));
gtk_toolbar_set_show_arrow (GTK_TOOLBAR (w), TRUE);
gtk_toolbar_set_style (GTK_TOOLBAR (w), GTK_TOOLBAR_ICONS);
gtk_box_pack_start (GTK_BOX (gtk->toolbar_zone), box, FALSE, FALSE, 0);
......@@ -831,7 +844,7 @@ wbc_gtk_init (GObject *obj)
gtk_window_set_title (wbcg->toplevel, "Gnumeric");
gtk_window_set_wmclass (wbcg->toplevel, "Gnumeric", "Gnumeric");
gtk->menu_zone = gtk_vbox_new (TRUE, 0);
gtk->toolbar_zone = gtk_vbox_new (TRUE, 0);
gtk->toolbar_zone = gtk_vbox_new (FALSE, 0);
gtk->everything = gtk_vbox_new (FALSE, 0);
gtk_box_pack_start (GTK_BOX (gtk->everything),
......
2004-01-06 Jody Goldberg <jody@gnome.org>
* color-palette.h : remove visible use of GnomeColorPicker
* color-palette.c : manage it internally
2003-12-28 Andreas J. Guelzow <aguelzow@taliesin.ca>
* gnm-dao.h (gnm_dao_new): add in-place argument
......
......@@ -27,6 +27,9 @@
* 02111-1307, USA.
*/
#undef GNOME_DISABLE_DEPRECATED
#warning "This file uses GNOME_DISABLE_DEPRECATED for GnomeColorPicker"
#include <gnumeric-config.h>
#include <libfoocanvas/foo-canvas.h>
#include <gdk/gdkcolor.h>
......@@ -35,9 +38,11 @@
#include <gsf/gsf-impl-utils.h>
#include "color-group.h"
#include "color-palette.h"
#include <gui-util.h>
#include <style-color.h>
#include <gtk/gtklabel.h>
#include <libgnomeui/gnome-color-picker.h>
#include <string.h>
......@@ -170,7 +175,7 @@ color_palette_change_custom_color (ColorPalette *P, GdkColor const *new_color)
}
if (next_swatch != NULL) {
next_swatch->style->bg[GTK_STATE_NORMAL] = *new_color;
gnome_color_picker_set_i16 (P->picker,
gnome_color_picker_set_i16 (GNOME_COLOR_PICKER (P->picker),
new_color->red, new_color->green, new_color->blue, 0);
}
}
......@@ -408,8 +413,9 @@ color_palette_setup (ColorPalette *P,
Keep a pointer to the picker so that we can update it's color
to keep it in synch with that of other members of the group
*/
P->picker = GNOME_COLOR_PICKER (gnome_color_picker_new ());
gnome_color_picker_set_title (P->picker, _("Choose Custom Color"));
P->picker = gnome_color_picker_new ();
gnome_color_picker_set_title (GNOME_COLOR_PICKER (P->picker),
_("Choose Custom Color"));
gtk_table_attach (GTK_TABLE (table), GTK_WIDGET (P->picker), ncols - 3, ncols,
row + 1, row + 2, GTK_FILL | GTK_EXPAND, 0, 0, 0);
g_signal_connect (P->picker, "color_set",
......@@ -457,7 +463,7 @@ color_palette_get_color_picker (ColorPalette *P)
{
g_return_val_if_fail (IS_COLOR_PALETTE (P), NULL);
return GTK_WIDGET (P->picker);
return P->picker;
}
......
......@@ -30,7 +30,6 @@
#ifndef GNUMERIC_COLOR_PALETTE_H
#define GNUMERIC_COLOR_PALETTE_H
#include <libgnomeui/gnome-color-picker.h>
#include <widgets/color-group.h>
#include <gtk/gtkvbox.h>
#include <gtk/gtktooltips.h>
......@@ -43,7 +42,7 @@ typedef struct _ColorNamePair ColorNamePair;
typedef struct _ColorPalette {
GtkVBox vbox;
GtkTooltips *tool_tip;
GnomeColorPicker *picker;
GtkWidget *picker;
/*
* Array of colors
*/
......
......@@ -19,10 +19,13 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
**/
#include "gnm-dao.h"
#undef GTK_DISABLE_DEPRECATED
#warning "This file uses GTK_DISABLE_DEPRECATED for GtkOptionMenu"
#include <gnumeric-config.h>
#include <glib/gi18n.h>
#include "gnm-dao.h"
#include "gnumeric-expr-entry.h"
#include "tools/dao.h"
#include "value.h"
......@@ -31,6 +34,7 @@
#include <gsf/gsf-impl-utils.h>
#include <gtk/gtkoptionmenu.h>
#include <gtk/gtktable.h>
#include <gtk/gtkhbox.h>
#include <gtk/gtktogglebutton.h>
struct _GnmDao {
......
......@@ -33,6 +33,7 @@
#include <gtk/gtkentry.h>
#include <gtk/gtkcelleditable.h>
#include <gtk/gtkimage.h>
#include <gtk/gtkhbox.h>
#include <gdk/gdkkeysyms.h>
#include <string.h>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment