Verified Commit 862a6747 authored by Zander's avatar Zander 💥

Move sheet dialog to a folder, style updates

parent c53e55ba
Pipeline #84257 canceled with stage
......@@ -67,7 +67,7 @@
#include "autosave.h"
#include "dynamic_refresh.h"
#include "persistence.h"
#include "sheets.h"
#include "sheet-editor/sheets.h"
#include "exit_dialog.h"
#include "dialib.h"
#include "diaerror.h"
......
......@@ -46,9 +46,10 @@ dia_sources = [
'diagram_tree_model.c',
'diagram_tree_view.c',
'sheets.c',
'sheets_dialog.c',
'sheets_dialog_callbacks.c',
'sheet-editor/sheets.c',
'sheet-editor/sheets_dialog.c',
'sheet-editor/sheets_dialog_callbacks.c',
'autosave.c',
'dynamic_refresh.c',
'navigation.c',
......
This diff is collapsed.
......@@ -69,17 +69,19 @@ struct _SheetMod
extern GtkWidget *sheets_dialog;
extern GtkWidget *sheets_dialog_optionmenu_menu;
SheetObjectMod *sheets_append_sheet_object_mod(SheetObject *so, SheetMod *sm);
SheetMod *sheets_append_sheet_mods(Sheet *sheet);
void sheets_optionmenu_create(GtkWidget *option_menu, GtkWidget *wrapbox,
gchar *sheet_name);
void create_object_pixmap(SheetObject *so, GtkWidget *parent,
GdkPixmap **pixmap, GdkBitmap **mask);
gchar *sheet_object_mod_get_type_string(SheetObjectMod *som);
gboolean sheets_dialog_create(void);
GtkWidget *lookup_widget(GtkWidget *widget,
SheetObjectMod *sheets_append_sheet_object_mod (SheetObject *so,
SheetMod *sm);
SheetMod *sheets_append_sheet_mods (Sheet *sheet);
void sheets_optionmenu_create (GtkWidget *option_menu,
GtkWidget *wrapbox,
char *sheet_name);
void create_object_pixmap (SheetObject *so,
GtkWidget *parent,
GdkPixmap **pixmap,
GdkBitmap **mask);
gchar *sheet_object_mod_get_type_string (SheetObjectMod *som);
gboolean sheets_dialog_create (void);
GtkWidget *lookup_widget (GtkWidget *widget,
const gchar *widget_name);
#endif /* SHEETS_H */
......@@ -20,12 +20,6 @@
*
*/
/*
* DO NOT EDIT THIS FILE - it is generated by Glade and then hand-coded
* to make GNOME optional and add the underline
* for accelerated buttons.
*/
#include <config.h>
#include <sys/types.h>
......@@ -49,10 +43,11 @@
static void
sheets_dialog_destroyed (GtkWidget *widget, gpointer user_data)
{
GObject *builder = g_object_get_data (G_OBJECT(widget), "_sheet_dialogs_builder");
if (builder)
GObject *builder = g_object_get_data (G_OBJECT (widget), "_sheet_dialogs_builder");
if (builder) {
g_object_unref (builder);
g_object_set_data (G_OBJECT(widget), "_sheet_dialogs_builder", NULL);
}
g_object_set_data (G_OBJECT (widget), "_sheet_dialogs_builder", NULL);
}
/* FIXME: header? */
......@@ -65,11 +60,11 @@ builder_new_from_file (const char *filename)
gchar *uifile;
GtkBuilder *builder;
builder = gtk_builder_new();
builder = gtk_builder_new ();
uifile = build_ui_filename (filename);
if (!gtk_builder_add_from_file (builder, uifile, &error)) {
g_warning ("Couldn't load builder file: %s", error->message);
g_error_free(error);
g_error_free (error);
}
g_free (uifile);
return builder;
......@@ -86,7 +81,7 @@ create_sheets_main_dialog (void)
builder = builder_new_from_file ("ui/sheets-main-dialog.xml");
sheets_main_dialog = GTK_WIDGET (gtk_builder_get_object (builder, "sheets_main_dialog"));
g_object_set_data (G_OBJECT(sheets_main_dialog), "_sheet_dialogs_builder", builder);
g_object_set_data (G_OBJECT (sheets_main_dialog), "_sheet_dialogs_builder", builder);
g_signal_connect (G_OBJECT (sheets_main_dialog), "destroy",
G_CALLBACK (sheets_dialog_destroyed), NULL);
......@@ -102,47 +97,47 @@ create_sheets_main_dialog (void)
gtk_menu_append (GTK_MENU (optionmenu_left_menu), glade_menuitem);
gtk_option_menu_set_menu (GTK_OPTION_MENU (optionmenu_left), optionmenu_left_menu);
g_signal_connect (gtk_builder_get_object (builder,"sheets_main_dialog"), "delete_event",
g_signal_connect (gtk_builder_get_object (builder, "sheets_main_dialog"), "delete_event",
G_CALLBACK (on_sheets_main_dialog_delete_event),
NULL);
g_signal_connect (gtk_builder_get_object (builder,"button_copy"), "clicked",
g_signal_connect (gtk_builder_get_object (builder, "button_copy"), "clicked",
G_CALLBACK (on_sheets_dialog_button_copy_clicked),
NULL);
g_signal_connect (gtk_builder_get_object (builder,"button_copy_all"), "clicked",
g_signal_connect (gtk_builder_get_object (builder, "button_copy_all"), "clicked",
G_CALLBACK (on_sheets_dialog_button_copy_all_clicked),
NULL);
g_signal_connect (gtk_builder_get_object (builder,"button_move"), "clicked",
g_signal_connect (gtk_builder_get_object (builder, "button_move"), "clicked",
G_CALLBACK (on_sheets_dialog_button_move_clicked),
NULL);
g_signal_connect (gtk_builder_get_object (builder,"button_move_all"), "clicked",
g_signal_connect (gtk_builder_get_object (builder, "button_move_all"), "clicked",
G_CALLBACK (on_sheets_dialog_button_move_all_clicked),
NULL);
g_signal_connect (gtk_builder_get_object (builder,"button_new"), "clicked",
g_signal_connect (gtk_builder_get_object (builder, "button_new"), "clicked",
G_CALLBACK (on_sheets_dialog_button_new_clicked),
NULL);
g_signal_connect (gtk_builder_get_object (builder,"button_move_up"), "clicked",
g_signal_connect (gtk_builder_get_object (builder, "button_move_up"), "clicked",
G_CALLBACK (on_sheets_dialog_button_move_up_clicked),
NULL);
g_signal_connect (gtk_builder_get_object (builder,"button_move_down"), "clicked",
g_signal_connect (gtk_builder_get_object (builder, "button_move_down"), "clicked",
G_CALLBACK (on_sheets_dialog_button_move_down_clicked),
NULL);
g_signal_connect (gtk_builder_get_object (builder,"button_edit"), "clicked",
g_signal_connect (gtk_builder_get_object (builder, "button_edit"), "clicked",
G_CALLBACK (on_sheets_dialog_button_edit_clicked),
NULL);
g_signal_connect (gtk_builder_get_object (builder,"button_remove"), "clicked",
g_signal_connect (gtk_builder_get_object (builder, "button_remove"), "clicked",
G_CALLBACK (on_sheets_dialog_button_remove_clicked),
NULL);
g_signal_connect (gtk_builder_get_object (builder,"button_apply"), "clicked",
g_signal_connect (gtk_builder_get_object (builder, "button_apply"), "clicked",
G_CALLBACK (on_sheets_dialog_button_apply_clicked),
NULL);
g_signal_connect (gtk_builder_get_object (builder,"button_revert"), "clicked",
g_signal_connect (gtk_builder_get_object (builder, "button_revert"), "clicked",
G_CALLBACK (on_sheets_dialog_button_revert_clicked),
NULL);
g_signal_connect (gtk_builder_get_object (builder,"button_close"), "clicked",
g_signal_connect (gtk_builder_get_object (builder, "button_close"), "clicked",
G_CALLBACK (on_sheets_dialog_button_close_clicked),
NULL);
persistence_register_window(GTK_WINDOW(sheets_main_dialog));
persistence_register_window (GTK_WINDOW (sheets_main_dialog));
return sheets_main_dialog;
}
......@@ -155,24 +150,24 @@ create_sheets_new_dialog (void)
builder = builder_new_from_file ("ui/sheets-new-dialog.xml");
sheets_new_dialog = GTK_WIDGET (gtk_builder_get_object (builder, "sheets_new_dialog"));
g_object_set_data (G_OBJECT(sheets_new_dialog), "_sheet_dialogs_builder", builder);
g_object_set_data (G_OBJECT (sheets_new_dialog), "_sheet_dialogs_builder", builder);
g_signal_connect (G_OBJECT (sheets_new_dialog), "destroy",
G_CALLBACK (sheets_dialog_destroyed), NULL);
g_signal_connect (gtk_builder_get_object (builder,"radiobutton_svg_shape"), "toggled",
g_signal_connect (gtk_builder_get_object (builder, "radiobutton_svg_shape"), "toggled",
G_CALLBACK (on_sheets_new_dialog_radiobutton_svg_shape_toggled),
NULL);
g_signal_connect (gtk_builder_get_object (builder,"radiobutton_sheet"), "toggled",
g_signal_connect (gtk_builder_get_object (builder, "radiobutton_sheet"), "toggled",
G_CALLBACK (on_sheets_new_dialog_radiobutton_sheet_toggled),
NULL);
g_signal_connect (gtk_builder_get_object (builder,"radiobutton_line_break"), "toggled",
g_signal_connect (gtk_builder_get_object (builder, "radiobutton_line_break"), "toggled",
G_CALLBACK (on_sheets_new_dialog_radiobutton_line_break_toggled),
NULL);
g_signal_connect (gtk_builder_get_object (builder,"button_ok"), "clicked",
g_signal_connect (gtk_builder_get_object (builder, "button_ok"), "clicked",
G_CALLBACK (on_sheets_new_dialog_button_ok_clicked),
NULL);
g_signal_connect (gtk_builder_get_object (builder,"button_cancel"), "clicked",
g_signal_connect (gtk_builder_get_object (builder, "button_cancel"), "clicked",
G_CALLBACK (on_sheets_new_dialog_button_cancel_clicked),
NULL);
......@@ -187,7 +182,7 @@ create_sheets_edit_dialog (void)
builder = builder_new_from_file ("ui/sheets-edit-dialog.xml");
sheets_edit_dialog = GTK_WIDGET (gtk_builder_get_object (builder,"sheets_edit_dialog"));
g_object_set_data (G_OBJECT(sheets_edit_dialog), "_sheet_dialogs_builder", builder);
g_object_set_data (G_OBJECT (sheets_edit_dialog), "_sheet_dialogs_builder", builder);
g_signal_connect (G_OBJECT (sheets_edit_dialog), "destroy",
G_CALLBACK (sheets_dialog_destroyed), NULL);
......@@ -219,11 +214,11 @@ create_sheets_remove_dialog (void)
builder = builder_new_from_file ("ui/sheets-remove-dialog.xml");
sheets_remove_dialog = GTK_WIDGET (gtk_builder_get_object (builder, "sheets_remove_dialog"));
g_object_set_data (G_OBJECT(sheets_remove_dialog), "_sheet_dialogs_builder", builder);
g_object_set_data (G_OBJECT (sheets_remove_dialog), "_sheet_dialogs_builder", builder);
g_signal_connect (G_OBJECT (sheets_remove_dialog), "destroy",
G_CALLBACK (sheets_dialog_destroyed), NULL);
g_signal_connect (gtk_builder_get_object (builder,"radiobutton_object"), "toggled",
g_signal_connect (gtk_builder_get_object (builder, "radiobutton_object"), "toggled",
G_CALLBACK (on_sheets_remove_dialog_radiobutton_object_toggled),
NULL);
g_signal_connect (gtk_builder_get_object (builder, "radiobutton_sheet"), "toggled",
......
GtkWidget* create_sheets_main_dialog (void);
GtkWidget* create_sheets_new_dialog (void);
GtkWidget* create_sheets_edit_dialog (void);
GtkWidget* create_sheets_remove_dialog (void);
GtkWidget* create_sheets_shapeselection_dialog (void);
This diff is collapsed.
/* Dia -- a diagram creation/manipulation program
* Copyright (C) 1998 Alexander Larsson
*
* sheets_dialog_callbacks.c : a sheets and objects dialog
* Copyright (C) 2002 M.C. Nelson
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#include <gtk/gtk.h>
gboolean on_sheets_main_dialog_delete_event (GtkWidget *widget,
GdkEvent *event,
gpointer user_data);
void on_sheets_dialog_optionmenu_activate (GtkMenuItem *menuitem,
gpointer user_data);
void on_sheets_dialog_button_move_up_clicked (GtkButton *button,
gpointer user_data);
void on_sheets_dialog_button_move_up_clicked (GtkButton *button,
gpointer user_data);
void on_sheets_dialog_button_new_clicked (GtkButton *button,
gpointer user_data);
void on_sheets_dialog_button_new_clicked (GtkButton *button,
gpointer user_data);
void on_sheets_dialog_button_close_clicked (GtkButton *button,
gpointer user_data);
void on_sheets_dialog_button_close_clicked (GtkButton *button,
gpointer user_data);
void on_sheets_new_dialog_button_cancel_clicked (GtkButton *button,
gpointer user_data);
void on_sheets_dialog_button_edit_clicked (GtkButton *button,
gpointer user_data);
void on_sheets_edit_dialog_button_cancel_clicked (GtkButton *button,
gpointer user_data);
void on_sheets_dialog_button_remove_clicked (GtkButton *button,
gpointer user_data);
void on_sheets_dialog_button_remove_clicked (GtkButton *button,
gpointer user_data);
void on_sheets_remove_dialog_button_cancel_clicked (GtkButton *button,
gpointer user_data);
void on_sheets_new_dialog_radiobutton_svg_shape_toggled (GtkToggleButton *togglebutton,
gpointer user_data);
void on_sheets_new_dialog_radiobutton_line_break_toggled (GtkToggleButton *togglebutton,
gpointer user_data);
void on_sheets_new_dialog_radiobutton_sheet_toggled (GtkToggleButton *togglebutton,
gpointer user_data);
void on_sheets_remove_dialog_radiobutton_object_toggled (GtkToggleButton *togglebutton,
gpointer user_data);
void on_sheets_remove_dialog_radiobutton_sheet_toggled (GtkToggleButton *togglebutton,
gpointer user_data);
void on_sheets_dialog_button_move_down_clicked (GtkButton *button,
gpointer user_data);
void on_sheets_new_dialog_button_ok_clicked (GtkButton *button,
gpointer user_data);
void on_sheets_new_dialog_radiobutton_line_break_toggled (GtkToggleButton *togglebutton,
gpointer user_data);
void on_sheets_remove_dialog_button_ok_clicked (GtkButton *button,
gpointer user_data);
void on_sheets_edit_dialog_button_ok_clicked (GtkButton *button,
gpointer user_data);
void on_sheets_edit_dialog_entry_object_description_changed (GtkEditable *editable,
gpointer user_data);
void on_sheets_edit_dialog_entry_sheet_description_changed (GtkEditable *editable,
gpointer user_data);
void on_sheets_edit_dialog_entry_sheet_name_changed (GtkEditable *editable,
gpointer user_data);
void on_sheets_dialog_button_copy_clicked (GtkButton *button,
gpointer user_data);
void on_sheets_dialog_button_copy_all_clicked (GtkButton *button,
gpointer user_data);
void on_sheets_dialog_button_move_clicked (GtkButton *button,
gpointer user_data);
void on_sheets_dialog_button_move_all_clicked (GtkButton *button,
gpointer user_data);
void on_sheets_dialog_button_apply_clicked (GtkButton *button,
gpointer user_data);
void on_sheets_dialog_button_revert_clicked (GtkButton *button,
gpointer user_data);
void on_sheets_shapeselection_dialog_button_ok_clicked (GtkButton *button,
gpointer user_data);
void on_sheets_shapeselection_dialog_button_cancel_clicked (GtkButton *button,
gpointer user_data);
GtkWidget *sheets_dialog_get_active_button (GtkWidget **wrapbox,
GList **button_list);
/*
* DO NOT EDIT THIS FILE - it is generated by Glade.
*/
GtkWidget* create_sheets_main_dialog (void);
GtkWidget* create_sheets_new_dialog (void);
GtkWidget* create_sheets_edit_dialog (void);
GtkWidget* create_sheets_remove_dialog (void);
GtkWidget* create_sheets_shapeselection_dialog (void);
This diff is collapsed.
/* Dia -- a diagram creation/manipulation program
* Copyright (C) 1998 Alexander Larsson
*
* sheets_dialog_callbacks.c : a sheets and objects dialog
* Copyright (C) 2002 M.C. Nelson
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#include <gtk/gtk.h>
gboolean
on_sheets_main_dialog_delete_event (GtkWidget *widget,
GdkEvent *event,
gpointer user_data);
void
on_sheets_dialog_optionmenu_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_sheets_dialog_button_move_up_clicked
(GtkButton *button,
gpointer user_data);
void
on_sheets_dialog_button_move_up_clicked
(GtkButton *button,
gpointer user_data);
void
on_sheets_dialog_button_new_clicked (GtkButton *button,
gpointer user_data);
void
on_sheets_dialog_button_new_clicked (GtkButton *button,
gpointer user_data);
void
on_sheets_dialog_button_close_clicked (GtkButton *button,
gpointer user_data);
void
on_sheets_dialog_button_close_clicked (GtkButton *button,
gpointer user_data);
void
on_sheets_new_dialog_button_cancel_clicked
(GtkButton *button,
gpointer user_data);
void
on_sheets_dialog_button_edit_clicked (GtkButton *button,
gpointer user_data);
void
on_sheets_edit_dialog_button_cancel_clicked
(GtkButton *button,
gpointer user_data);
void
on_sheets_dialog_button_remove_clicked (GtkButton *button,
gpointer user_data);
void
on_sheets_dialog_button_remove_clicked (GtkButton *button,
gpointer user_data);
void
on_sheets_remove_dialog_button_cancel_clicked
(GtkButton *button,
gpointer user_data);
void
on_sheets_new_dialog_radiobutton_svg_shape_toggled
(GtkToggleButton *togglebutton,
gpointer user_data);
void
on_sheets_new_dialog_radiobutton_line_break_toggled
(GtkToggleButton *togglebutton,
gpointer user_data);
void
on_sheets_new_dialog_radiobutton_sheet_toggled
(GtkToggleButton *togglebutton,
gpointer user_data);
void
on_sheets_remove_dialog_radiobutton_object_toggled
(GtkToggleButton *togglebutton,
gpointer user_data);
void
on_sheets_remove_dialog_radiobutton_sheet_toggled
(GtkToggleButton *togglebutton,
gpointer user_data);
void
on_sheets_dialog_button_move_down_clicked
(GtkButton *button,
gpointer user_data);
void
on_sheets_new_dialog_button_ok_clicked (GtkButton *button,
gpointer user_data);
void
on_sheets_new_dialog_radiobutton_line_break_toggled
(GtkToggleButton *togglebutton,
gpointer user_data);
void
on_sheets_remove_dialog_button_ok_clicked
(GtkButton *button,
gpointer user_data);
void
on_sheets_edit_dialog_button_ok_clicked
(GtkButton *button,
gpointer user_data);
void
on_sheets_edit_dialog_entry_object_description_changed
(GtkEditable *editable,
gpointer user_data);
void
on_sheets_edit_dialog_entry_sheet_description_changed
(GtkEditable *editable,
gpointer user_data);
void
on_sheets_edit_dialog_entry_sheet_name_changed
(GtkEditable *editable,
gpointer user_data);
void
on_sheets_dialog_button_copy_clicked (GtkButton *button,
gpointer user_data);
void
on_sheets_dialog_button_copy_all_clicked
(GtkButton *button,
gpointer user_data);
void
on_sheets_dialog_button_move_clicked (GtkButton *button,
gpointer user_data);
void
on_sheets_dialog_button_move_all_clicked
(GtkButton *button,
gpointer user_data);
void
on_sheets_dialog_button_apply_clicked (GtkButton *button,
gpointer user_data);
void
on_sheets_dialog_button_revert_clicked (GtkButton *button,
gpointer user_data);
void
on_sheets_shapeselection_dialog_button_ok_clicked
(GtkButton *button,
gpointer user_data);
void
on_sheets_shapeselection_dialog_button_cancel_clicked
(GtkButton *button,
gpointer user_data);
GtkWidget *
sheets_dialog_get_active_button(GtkWidget **wrapbox, GList **button_list);
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