#include "ut_compiler.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string>
#include <glib.h>
#include <gtk/gtk.h>
#include <gdk/gdk.h>
#include <gdk/gdkkeysyms.h>
#include <goffice/gtk/goffice-gtk.h>
#include "ut_debugmsg.h"
#include "ut_assert.h"
#include "ut_string.h"
#include "ut_std_string.h"
#include "xav_View.h"
#include "xap_Frame.h"
#include "xap_UnixFrameImpl.h"
#include "xap_App.h"
#include "xap_UnixDialogHelper.h"
#include "xap_Dialog.h"
#include "xap_Strings.h"
Functions | |
ABI_W_NO_CONST_QUAL static ABI_W_POP gboolean | focus_in_event (GtkWidget *widget, GdkEvent *, gpointer) |
static gboolean | destroy_event (GtkWidget *, GdkEvent *, gpointer) |
static gboolean | focus_out_event (GtkWidget *widget, GdkEvent *, gpointer) |
static gboolean | focus_out_event_Modeless (GtkWidget *widget, GdkEvent *, gpointer) |
static gboolean | focus_in_event_Modeless (GtkWidget *widget, GdkEvent *, gpointer) |
static gboolean | focus_in_event_ModelessOther (GtkWidget *widget, GdkEvent *, std::pointer_to_unary_function< int, gboolean > *other_function) |
GtkBuilder * | newDialogBuilder (const char *name) |
load a GtkBuilder for a dialog using the standard path. | |
void | connectFocus (GtkWidget *widget, const XAP_Frame *frame) |
void | connectFocusModelessOther (GtkWidget *widget, const XAP_App *pApp, std::pointer_to_unary_function< int, gboolean > *other_function) |
void | connectFocusModeless (GtkWidget *widget, const XAP_App *pApp) |
bool | isTransientWindow (GtkWindow *window, GtkWindow *parent) |
bool | helpLocalizeAndOpenURL (const char *pathBeforeLang, const char *pathAfterLang, const char *remoteURLbase) |
static void | sDoHelp (XAP_Dialog *pDlg) |
static gint | modal_keypress_cb (GtkWidget *, GdkEventKey *event, XAP_Dialog *pDlg) |
static gint | nonmodal_keypress_cb (GtkWidget *, GdkEventKey *event, XAP_Dialog *pDlg) |
static void | help_button_cb (GObject *, XAP_Dialog *pDlg) |
static void | sAddHelpButton (GtkDialog *me, XAP_Dialog *pDlg) |
void | centerDialog (GtkWidget *parent, GtkWidget *child, bool set_transient_for) |
void | abiSetupModalDialog (GtkDialog *dialog, XAP_Frame *pFrame, XAP_Dialog *pDlg, gint defaultResponse) |
gint | abiRunModalDialog (GtkDialog *me, bool destroyDialog, AtkRole role) |
gint | abiRunModalDialog (GtkDialog *me, XAP_Frame *pFrame, XAP_Dialog *pDlg, gint defaultResponse, bool destroyDialog, AtkRole role) |
void | abiSetupModelessDialog (GtkDialog *me, XAP_Frame *pFrame, XAP_Dialog *pDlg, gint defaultResponse, bool abi_modeless, AtkRole) |
GtkWidget * | abiDialogNew (const char *role, gboolean resizable) |
GtkWidget * | abiDialogNew (const char *role, gboolean resizable, const char *title,...) |
GtkWidget * | abiGtkMenuFromCStrVector (const UT_GenericVector< const char * > &vec, GCallback cb, gpointer data) |
void | abiDialogSetTitle (GtkWidget *dlg, const char *title,...) |
GtkWidget * | abiAddButton (GtkDialog *me, std::string label, gint response_id) |
void | abiDestroyWidget (GtkWidget *me) |
void | localizeLabel (GtkWidget *widget, const XAP_StringSet *pSS, XAP_String_Id id) |
void | convertMnemonics (gchar *s) |
std::string & | convertMnemonics (std::string &s) |
void | localizeLabelUnderline (GtkWidget *widget, const XAP_StringSet *pSS, XAP_String_Id id) |
void | localizeLabelMarkup (GtkWidget *widget, const XAP_StringSet *pSS, XAP_String_Id id) |
void | localizeButton (GtkWidget *widget, const XAP_StringSet *pSS, XAP_String_Id id) |
void | localizeButtonUnderline (GtkWidget *widget, const XAP_StringSet *pSS, XAP_String_Id id) |
void | localizeButtonMarkup (GtkWidget *widget, const XAP_StringSet *pSS, XAP_String_Id id) |
void | localizeMenuItem (GtkWidget *widget, const XAP_StringSet *pSS, XAP_String_Id id) |
void | setLabelMarkup (GtkWidget *widget, const gchar *str) |
void | messageBoxOK (const char *message) |
GdkWindow * | getRootWindow (GtkWidget *widget) |
static void | activate_button (GtkEntry *, gpointer user_data) |
void | abiSetActivateOnWidgetToActivateButton (GtkWidget *source, GtkWidget *button) |
When the source widget gets the activate signal, sent activate to the button. |
GtkWidget* abiAddButton | ( | GtkDialog * | me, | |
std::string | label, | |||
gint | response_id | |||
) |
Add this locale-sensitive button to the dialog and make it sensitive
References convertMnemonics(), and UT_return_val_if_fail.
Referenced by AP_UnixDialog_Styles::_constructGnomeModifyButtons(), XAP_UnixDialog_Insert_Symbol::_constructWindow(), XAP_UnixDialog_HTMLOptions::_constructWindow(), AP_UnixDialog_ToggleCase::_constructWindow(), AP_UnixDialog_SplitCells::_constructWindow(), AP_UnixDialog_Paragraph::_constructWindow(), AP_UnixDialog_PageSetup::_constructWindow(), AP_UnixDialog_MergeCells::_constructWindow(), AP_UnixDialog_Lists::_constructWindow(), AP_UnixDialog_InsertXMLID::_constructWindow(), AP_UnixDialog_InsertHyperlink::_constructWindow(), AP_UnixDialog_InsertBookmark::_constructWindow(), AP_UnixDialog_EpubExportOptions::_constructWindow(), AP_UnixDialog_Columns::_constructWindow(), AP_UnixDialog_Background::_constructWindow(), XAP_UnixDialog_FontChooser::constructWindow(), AP_UnixDialog_MarkRevisions::constructWindow(), AP_UnixDialog_ListRevisions::constructWindow(), and XAP_UnixDialog_ClipArt::runModal().
void abiDestroyWidget | ( | GtkWidget * | me | ) |
Calls gtk_widget_destroy on if is non-null and GTK_IS_WIDGET(me)
Referenced by abiRunModalDialog(), AP_UnixDialog_Lists::closeClicked(), AP_UnixDialog_Replace::destroy(), AP_UnixDialog_Lists::destroy(), AP_UnixDialog_Options::event_ChooseTransparentColor(), GDA_execSQL(), AP_UnixDialog_Styles::modifyRunModal(), XAP_UnixDialog_Zoom::runModal(), XAP_UnixDialog_WindowMore::runModal(), XAP_UnixDialog_Password::runModal(), XAP_UnixDialog_ListDocuments::runModal(), XAP_UnixDialog_Language::runModal(), XAP_UnixDialog_Image::runModal(), XAP_UnixDialog_HTMLOptions::runModal(), XAP_UnixDialog_History::runModal(), XAP_UnixDialog_Encoding::runModal(), XAP_UnixDialog_DocComparison::runModal(), XAP_UnixDialog_ClipArt::runModal(), AP_UnixDialog_Stylist::runModal(), AP_UnixDialog_Styles::runModal(), AP_UnixDialog_Spell::runModal(), AP_UnixDialog_Paragraph::runModal(), AP_UnixDialog_PageSetup::runModal(), AP_UnixDialog_PageNumbers::runModal(), AP_UnixDialog_Options::runModal(), AP_UnixDialog_New::runModal(), AP_UnixDialog_MetaData::runModal(), AP_UnixDialog_MarkRevisions::runModal(), AP_UnixDialog_Lists::runModal(), AP_UnixDialog_ListRevisions::runModal(), AP_UnixDialog_InsertXMLID::runModal(), AP_UnixDialog_InsertTable::runModal(), AP_UnixDialog_InsertHyperlink::runModal(), AP_UnixDialog_InsertBookmark::runModal(), AP_UnixDialog_Insert_DateTime::runModal(), AP_UnixDialog_GenericProgress::runModal(), AP_UnixDialog_GenericInput::runModal(), AP_UnixDialog_Field::runModal(), AP_UnixDialog_EpubExportOptions::runModal(), AP_UnixDialog_Columns::runModal(), AP_UnixDialog_CollaborationShare::runModal(), AP_UnixDialog_CollaborationJoin::runModal(), AP_UnixDialog_CollaborationEditAccount::runModal(), AP_UnixDialog_CollaborationAddBuddy::runModal(), AP_UnixDialog_CollaborationAddAccount::runModal(), AP_UnixDialog_CollaborationAccounts::runModal(), AP_UnixDialog_Break::runModal(), AP_UnixDialog_Background::runModal(), AP_UnixDialog_Annotation::runModal(), s_delete_clicked(), s_dlg_response(), AP_UnixDialog_WordCount::s_response(), s_response(), AP_UnixDialog_Replace::s_response_triggered(), and s_response_triggered().
GtkWidget* abiDialogNew | ( | const char * | role, | |
gboolean | resizable, | |||
const char * | title, | |||
... | ||||
) |
Create a new GtkDialog with this title
References abiDialogNew(), and UT_std_string_vprintf().
GtkWidget* abiDialogNew | ( | const char * | role, | |
gboolean | resizable | |||
) |
Create a new GtkDialog
Referenced by AP_UnixDialog_Styles::_constructModifyDialog(), XAP_UnixDialog_Insert_Symbol::_constructWindow(), XAP_UnixDialog_HTMLOptions::_constructWindow(), AP_UnixDialog_ToggleCase::_constructWindow(), AP_UnixDialog_SplitCells::_constructWindow(), AP_UnixDialog_Paragraph::_constructWindow(), AP_UnixDialog_MergeCells::_constructWindow(), AP_UnixDialog_Lists::_constructWindow(), AP_UnixDialog_InsertXMLID::_constructWindow(), AP_UnixDialog_InsertHyperlink::_constructWindow(), AP_UnixDialog_InsertBookmark::_constructWindow(), AP_UnixDialog_EpubExportOptions::_constructWindow(), AP_UnixDialog_Columns::_constructWindow(), AP_UnixDialog_Background::_constructWindow(), abiDialogNew(), XAP_UnixDialog_FontChooser::constructWindow(), AP_UnixDialog_MarkRevisions::constructWindow(), AP_UnixDialog_ListRevisions::constructWindow(), GDA_execSQL(), and XAP_UnixDialog_ClipArt::runModal().
void abiDialogSetTitle | ( | GtkWidget * | dlg, | |
const char * | title, | |||
... | ||||
) |
Set the title of a gtk dialog
References UT_String::c_str(), and UT_String_vprintf().
Referenced by XAP_UnixDialog_Zoom::_constructWindow(), XAP_UnixDialog_Image::_constructWindow(), AP_UnixDialog_Stylist::_constructWindow(), AP_UnixDialog_PageSetup::_constructWindow(), AP_UnixDialog_PageNumbers::_constructWindow(), AP_UnixDialog_Options::_constructWindow(), AP_UnixDialog_MetaData::_constructWindow(), AP_UnixDialog_MailMerge::_constructWindow(), AP_UnixDialog_InsertTable::_constructWindow(), AP_UnixDialog_Insert_DateTime::_constructWindow(), AP_UnixDialog_HdrFtr::_constructWindow(), AP_UnixDialog_GenericProgress::_constructWindow(), AP_UnixDialog_GenericInput::_constructWindow(), AP_UnixDialog_FormatTOC::_constructWindow(), AP_UnixDialog_FormatTable::_constructWindow(), AP_UnixDialog_FormatFrame::_constructWindow(), AP_UnixDialog_FormatFootnotes::_constructWindow(), AP_UnixDialog_Field::_constructWindow(), AP_UnixDialog_Break::_constructWindow(), AP_UnixDialog_Border_Shading::_constructWindow(), AP_UnixDialog_Annotation::_constructWindow(), and AP_UnixDialog_Options::event_ChooseTransparentColor().
GtkWidget* abiGtkMenuFromCStrVector | ( | const UT_GenericVector< const char * > & | vec, | |
GCallback | cb, | |||
gpointer | data | |||
) |
Returns a GtkMenu with items having label fetched from UTF-8 CStr from UT_Vector. All menu item will have the index of the item stored in its user-data
References UT_GenericVector< T >::getItemCount().
gint abiRunModalDialog | ( | GtkDialog * | me, | |
bool | destroyDialog, | |||
AtkRole | role | |||
) |
References abiDestroyWidget().
Referenced by abiRunModalDialog(), AP_UnixDialog_Options::event_ChooseTransparentColor(), GDA_execSQL(), AP_UnixDialog_Styles::modifyRunModal(), XAP_UnixDialog_Zoom::runModal(), XAP_UnixDialog_WindowMore::runModal(), XAP_UnixDialog_PluginManager::runModal(), XAP_UnixDialog_Password::runModal(), XAP_UnixDialog_MessageBox::runModal(), XAP_UnixDialog_ListDocuments::runModal(), XAP_UnixDialog_Language::runModal(), XAP_UnixDialog_Image::runModal(), XAP_UnixDialog_HTMLOptions::runModal(), XAP_UnixDialog_History::runModal(), XAP_UnixDialog_FontChooser::runModal(), XAP_UnixDialog_Encoding::runModal(), XAP_UnixDialog_DocComparison::runModal(), XAP_UnixDialog_ClipArt::runModal(), AP_UnixDialog_ToggleCase::runModal(), AP_UnixDialog_Tab::runModal(), AP_UnixDialog_Stylist::runModal(), AP_UnixDialog_Styles::runModal(), AP_UnixDialog_Spell::runModal(), AP_UnixDialog_Paragraph::runModal(), AP_UnixDialog_PageSetup::runModal(), AP_UnixDialog_PageNumbers::runModal(), AP_UnixDialog_Options::runModal(), AP_UnixDialog_New::runModal(), AP_UnixDialog_MetaData::runModal(), AP_UnixDialog_MarkRevisions::runModal(), AP_UnixDialog_Lists::runModal(), AP_UnixDialog_ListRevisions::runModal(), AP_UnixDialog_InsertXMLID::runModal(), AP_UnixDialog_InsertTable::runModal(), AP_UnixDialog_InsertHyperlink::runModal(), AP_UnixDialog_InsertBookmark::runModal(), AP_UnixDialog_Insert_DateTime::runModal(), AP_UnixDialog_HdrFtr::runModal(), AP_UnixDialog_GenericProgress::runModal(), AP_UnixDialog_GenericInput::runModal(), AP_UnixDialog_FormatFootnotes::runModal(), AP_UnixDialog_Field::runModal(), AP_UnixDialog_EpubExportOptions::runModal(), AP_UnixDialog_Columns::runModal(), AP_UnixDialog_CollaborationShare::runModal(), AP_UnixDialog_CollaborationJoin::runModal(), AP_UnixDialog_CollaborationEditAccount::runModal(), AP_UnixDialog_CollaborationAddBuddy::runModal(), AP_UnixDialog_CollaborationAddAccount::runModal(), AP_UnixDialog_CollaborationAccounts::runModal(), AP_UnixDialog_Break::runModal(), AP_UnixDialog_Background::runModal(), and AP_UnixDialog_Annotation::runModal().
gint abiRunModalDialog | ( | GtkDialog * | me, | |
XAP_Frame * | pFrame, | |||
XAP_Dialog * | pDlg, | |||
gint | defaultResponse, | |||
bool | destroyDialog, | |||
AtkRole | role | |||
) |
Runs the dialog as a modal dialog 1) Connect focus to toplevel frame 2) Centers dialog over toplevel window 3) Connects F1 to help system 4) Makes dialog modal 5) Sets the default button to defaultResponse, sets ESC to close 6) Returns value of gtk_dialog_run(me) 7) If is true, destroys the dialog, else you have to call abiDestroyWidget()
References abiRunModalDialog(), abiSetupModalDialog(), and XAP_Dialog::maybeReallowPopupPreviewBubbles().
void abiSetActivateOnWidgetToActivateButton | ( | GtkWidget * | source, | |
GtkWidget * | button | |||
) |
When the source widget gets the activate signal, sent activate to the button.
This allows GtkEntry widgets to explicitly close the dialog with the OK button when the user presses return while leaving the default dialog action to be CANCEL.
References activate_button().
Referenced by AP_UnixDialog_MarkRevisions::constructWindow().
void abiSetupModalDialog | ( | GtkDialog * | dialog, | |
XAP_Frame * | pFrame, | |||
XAP_Dialog * | pDlg, | |||
gint | defaultResponse | |||
) |
References centerDialog(), connectFocus(), XAP_Frame::getFrameImpl(), XAP_UnixFrameImpl::getTopLevelWindow(), modal_keypress_cb(), and sAddHelpButton().
Referenced by abiRunModalDialog(), AP_UnixDialog_Styles::modifyRunModal(), XAP_UnixDialog_FileOpenSaveAs::runModal(), AP_UnixDialog_Styles::runModal(), and AP_UnixDialog_Spell::runModal().
void abiSetupModelessDialog | ( | GtkDialog * | me, | |
XAP_Frame * | pFrame, | |||
XAP_Dialog * | pDlg, | |||
gint | defaultResponse, | |||
bool | abi_modeless, | |||
AtkRole | ||||
) |
Sets up the dialog as a modeless dialog 1) Connect focus to toplevel frame 2) Centers dialog over toplevel window 3) Makes the App remember this modeless dialog 4) Connects F1 to help system 5) Makes dialog non-modal (modeless)
6) Sets the default button to defaultResponse, sets ESC to close
References centerDialog(), connectFocusModeless(), XAP_App::getApp(), XAP_Dialog::getDialogId(), XAP_Frame::getFrameImpl(), XAP_UnixFrameImpl::getTopLevelWindow(), XAP_Dialog::maybeClosePopupPreviewBubbles(), nonmodal_keypress_cb(), XAP_App::rememberModelessId(), and sAddHelpButton().
Referenced by XAP_UnixDialog_Insert_Symbol::runModeless(), AP_UnixDialog_WordCount::runModeless(), AP_UnixDialog_Stylist::runModeless(), AP_UnixDialog_SplitCells::runModeless(), AP_UnixDialog_Replace::runModeless(), AP_UnixDialog_RDFQuery::runModeless(), AP_UnixDialog_RDFEditor::runModeless(), AP_UnixDialog_MergeCells::runModeless(), AP_UnixDialog_MailMerge::runModeless(), AP_UnixDialog_Lists::runModeless(), AP_UnixDialog_Latex::runModeless(), AP_UnixDialog_Goto::runModeless(), AP_UnixDialog_FormatTOC::runModeless(), AP_UnixDialog_FormatTable::runModeless(), AP_UnixDialog_FormatFrame::runModeless(), and AP_UnixDialog_Border_Shading::runModeless().
static void activate_button | ( | GtkEntry * | , | |
gpointer | user_data | |||
) | [static] |
Referenced by abiSetActivateOnWidgetToActivateButton().
void centerDialog | ( | GtkWidget * | parent, | |
GtkWidget * | child, | |||
bool | set_transient_for | |||
) |
Centers a dialog, makes it transient, sets up the right window icon
References UT_return_if_fail, and xxx_UT_DEBUGMSG.
Referenced by abiSetupModalDialog(), abiSetupModelessDialog(), GDict_dlg_create(), and XAP_UnixDialog_FileOpenSaveAs::runModal().
void connectFocus | ( | GtkWidget * | widget, | |
const XAP_Frame * | frame | |||
) |
References destroy_event(), focus_in_event(), and focus_out_event().
Referenced by abiSetupModalDialog(), and XAP_UnixDialog_ClipArt::runModal().
void connectFocusModeless | ( | GtkWidget * | widget, | |
const XAP_App * | pApp | |||
) |
References destroy_event(), focus_in_event_Modeless(), and focus_out_event_Modeless().
Referenced by abiSetupModelessDialog().
void connectFocusModelessOther | ( | GtkWidget * | widget, | |
const XAP_App * | pApp, | |||
std::pointer_to_unary_function< int, gboolean > * | other_function | |||
) |
References focus_in_event_ModelessOther(), and focus_out_event_Modeless().
Referenced by AP_UnixDialog_Lists::runModeless().
void convertMnemonics | ( | gchar * | s | ) |
References UT_return_if_fail.
Referenced by abiAddButton(), AbiGOComponent_Create(), localizeButtonMarkup(), localizeButtonUnderline(), localizeLabelUnderline(), XAP_UnixDialog_MessageBox::runModal(), XAP_UnixDialog_FileOpenSaveAs::runModal(), sAddHelpButton(), and AP_RDFSemanticItemGTKInjected< AP_RDFContact >::showEditorWindow().
std::string& convertMnemonics | ( | std::string & | s | ) |
static gboolean destroy_event | ( | GtkWidget * | , | |
GdkEvent * | , | |||
gpointer | ||||
) | [static] |
Referenced by connectFocus(), and connectFocusModeless().
ABI_W_NO_CONST_QUAL static ABI_W_POP gboolean focus_in_event | ( | GtkWidget * | widget, | |
GdkEvent * | , | |||
gpointer | ||||
) | [static] |
References AV_FOCUS_NEARBY, AV_View::focusChange(), and XAP_Frame::getCurrentView().
Referenced by connectFocus().
static gboolean focus_in_event_Modeless | ( | GtkWidget * | widget, | |
GdkEvent * | , | |||
gpointer | ||||
) | [static] |
References AV_FOCUS_MODELESS, AV_View::focusChange(), XAP_Frame::getCurrentView(), XAP_App::getFrame(), XAP_App::getFrameCount(), and XAP_App::getLastFocussedFrame().
Referenced by connectFocusModeless().
static gboolean focus_in_event_ModelessOther | ( | GtkWidget * | widget, | |
GdkEvent * | , | |||
std::pointer_to_unary_function< int, gboolean > * | other_function | |||
) | [static] |
References AV_FOCUS_MODELESS, AV_View::focusChange(), XAP_Frame::getCurrentView(), XAP_App::getFrame(), XAP_App::getFrameCount(), and XAP_App::getLastFocussedFrame().
Referenced by connectFocusModelessOther().
static gboolean focus_out_event | ( | GtkWidget * | widget, | |
GdkEvent * | , | |||
gpointer | ||||
) | [static] |
References AV_FOCUS_NONE, AV_View::focusChange(), and XAP_Frame::getCurrentView().
Referenced by connectFocus().
static gboolean focus_out_event_Modeless | ( | GtkWidget * | widget, | |
GdkEvent * | , | |||
gpointer | ||||
) | [static] |
GdkWindow* getRootWindow | ( | GtkWidget * | widget | ) |
References UT_return_val_if_fail.
static void help_button_cb | ( | GObject * | , | |
XAP_Dialog * | pDlg | |||
) | [static] |
References sDoHelp().
Referenced by sAddHelpButton().
bool helpLocalizeAndOpenURL | ( | const char * | pathBeforeLang, | |
const char * | pathAfterLang, | |||
const char * | remoteURLbase | |||
) |
bool isTransientWindow | ( | GtkWindow * | window, | |
GtkWindow * | parent | |||
) |
Referenced by AP_UnixFrame::_setViewFocus().
void localizeButton | ( | GtkWidget * | widget, | |
const XAP_StringSet * | pSS, | |||
XAP_String_Id | id | |||
) |
Localizes a button given the string id
References FREEP, gchar, XAP_StringSet::getValueUTF8(), s, and UT_XML_cloneNoAmpersands().
Referenced by XAP_UnixDialog_Zoom::_constructWindow(), XAP_UnixDialog_PluginManager::_constructWindow(), XAP_UnixDialog_Image::_constructWindow(), AP_UnixDialog_Styles::_constructWindow(), AP_UnixDialog_RDFQuery::_constructWindow(), AP_UnixDialog_RDFEditor::_constructWindow(), AP_UnixDialog_PageNumbers::_constructWindow(), AP_UnixDialog_New::_constructWindow(), AP_UnixDialog_InsertTable::_constructWindow(), AP_UnixDialog_HdrFtr::_constructWindow(), AP_UnixDialog_FormatTOC::_constructWindow(), AP_UnixDialog_FormatFrame::_constructWindow(), AP_UnixDialog_FormatFootnotes::_constructWindow(), AP_UnixDialog_Break::_constructWindow(), AP_UnixDialog_Border_Shading::_constructWindow(), XAP_UnixDialog_History::_populateWindowData(), PD_RDFDialogsGTK::runInsertReferenceDialog(), and PD_RDFDialogsGTK::runSemanticStylesheetsDialog().
void localizeButtonMarkup | ( | GtkWidget * | widget, | |
const XAP_StringSet * | pSS, | |||
XAP_String_Id | id | |||
) |
Localizes a button given the string id It formats its label using the current button label as a format string. It is assumed to be something like "<span size="larger">%s</span>". Note that in addition to doing markup, ampersands will be converted to underscores/mnemonic since this makes sense for buttons
References convertMnemonics(), FREEP, gchar, XAP_StringSet::getValueUTF8(), s, UT_ASSERT, and UT_std_string_sprintf().
Referenced by AP_UnixDialog_FormatTOC::_constructWindow(), and AP_UnixDialog_Options::_constructWindowContents().
void localizeButtonUnderline | ( | GtkWidget * | widget, | |
const XAP_StringSet * | pSS, | |||
XAP_String_Id | id | |||
) |
Localizes a button given the string id Ampersands will be converted to underscores/mnemonics
References convertMnemonics(), FREEP, gchar, XAP_StringSet::getValueUTF8(), s, and UT_ASSERT.
Referenced by XAP_UnixDialog_WindowMore::_constructWindow(), AP_UnixDialog_Spell::_constructWindow(), AP_UnixDialog_PageNumbers::_constructWindow(), AP_UnixDialog_MailMerge::_constructWindow(), AP_UnixDialog_InsertTable::_constructWindow(), AP_UnixDialog_Insert_DateTime::_constructWindow(), AP_UnixDialog_FormatTOC::_constructWindow(), AP_UnixDialog_FormatFrame::_constructWindow(), AP_UnixDialog_Field::_constructWindow(), AP_UnixDialog_Break::_constructWindow(), AP_UnixDialog_Options::_constructWindowContents(), and AP_UnixDialog_Latex::constructDialog().
void localizeLabel | ( | GtkWidget * | widget, | |
const XAP_StringSet * | pSS, | |||
XAP_String_Id | id | |||
) |
Localizes a label given the string id
References FREEP, gchar, XAP_StringSet::getValueUTF8(), s, and UT_XML_cloneNoAmpersands().
Referenced by XAP_UnixDialog_PluginManager::_constructWindow(), XAP_UnixDialog_Password::_constructWindow(), XAP_UnixDialog_Image::_constructWindow(), AP_UnixDialog_Tab::_constructWindow(), AP_UnixDialog_RDFEditor::_constructWindow(), AP_UnixDialog_MetaData::_constructWindow(), AP_UnixDialog_MailMerge::_constructWindow(), AP_UnixDialog_InsertTable::_constructWindow(), AP_UnixDialog_HdrFtr::_constructWindow(), AP_UnixDialog_Goto::_constructWindow(), AP_UnixDialog_FormatTOC::_constructWindow(), AP_UnixDialog_FormatTable::_constructWindow(), AP_UnixDialog_FormatFrame::_constructWindow(), AP_UnixDialog_FormatFootnotes::_constructWindow(), AP_UnixDialog_Border_Shading::_constructWindow(), AP_UnixDialog_Annotation::_constructWindow(), AP_UnixDialog_Options::_constructWindowContents(), AP_UnixDialog_Latex::constructDialog(), and PD_RDFDialogsGTK::runSemanticStylesheetsDialog().
void localizeLabelMarkup | ( | GtkWidget * | widget, | |
const XAP_StringSet * | pSS, | |||
XAP_String_Id | id | |||
) |
Localizes the label of a widget given the string id It formats the label using the current label of the widget as a format string. The current label is assumed to be something like "<span size="larger">%s</span>".
References FREEP, gchar, XAP_StringSet::getValueUTF8(), s, UT_std_string_sprintf(), and UT_XML_cloneNoAmpersands().
Referenced by XAP_UnixDialog_Zoom::_constructWindow(), XAP_UnixDialog_WindowMore::_constructWindow(), XAP_UnixDialog_PluginManager::_constructWindow(), XAP_UnixDialog_Image::_constructWindow(), XAP_UnixDialog_Encoding::_constructWindow(), AP_UnixDialog_Tab::_constructWindow(), AP_UnixDialog_Styles::_constructWindow(), AP_UnixDialog_PageNumbers::_constructWindow(), AP_UnixDialog_MailMerge::_constructWindow(), AP_UnixDialog_InsertTable::_constructWindow(), AP_UnixDialog_Insert_DateTime::_constructWindow(), AP_UnixDialog_HdrFtr::_constructWindow(), AP_UnixDialog_FormatTOC::_constructWindow(), AP_UnixDialog_FormatTable::_constructWindow(), AP_UnixDialog_FormatFrame::_constructWindow(), AP_UnixDialog_FormatFootnotes::_constructWindow(), AP_UnixDialog_Field::_constructWindow(), AP_UnixDialog_Break::_constructWindow(), AP_UnixDialog_Border_Shading::_constructWindow(), AP_UnixDialog_Options::_constructWindowContents(), AP_UnixDialog_Lists::_constructWindowContents(), XAP_UnixDialog_History::_populateWindowData(), XAP_UnixDialog_DocComparison::_populateWindowData(), AP_UnixDialog_Latex::constructDialog(), and XAP_UnixDialog_Language::constructWindow().
void localizeLabelUnderline | ( | GtkWidget * | widget, | |
const XAP_StringSet * | pSS, | |||
XAP_String_Id | id | |||
) |
Localizes the label of a widget given the string id Ampersands will be converted to underscores/mnemonics
References convertMnemonics(), FREEP, gchar, XAP_StringSet::getValueUTF8(), s, and UT_ASSERT.
Referenced by AP_UnixDialog_Spell::_constructWindow(), AP_UnixDialog_FormatTOC::_constructWindow(), and AP_UnixDialog_Options::_constructWindowContents().
void localizeMenuItem | ( | GtkWidget * | widget, | |
const XAP_StringSet * | pSS, | |||
XAP_String_Id | id | |||
) |
Localizes the label of a Menu Item widget given the string id
References FREEP, gchar, XAP_StringSet::getValueUTF8(), s, and UT_XML_cloneConvAmpersands().
Referenced by AP_UnixDialog_RDFEditor::_constructWindow().
void messageBoxOK | ( | const char * | message | ) |
This is a small message box for startup warnings and/or errors. Please do NOT use this for normal system execution user messages; use the XAP_UnixDialog_MessageBox class for that. We can't use that here because there is no parent frame, etc.
Referenced by AP_UnixDialog_Styles::_populateModify(), and AP_UnixDialog_Styles::new_styleName().
static gint modal_keypress_cb | ( | GtkWidget * | , | |
GdkEventKey * | event, | |||
XAP_Dialog * | pDlg | |||
) | [static] |
Catch F1 keypress over a dialog and open up the help file, if any
References sDoHelp().
Referenced by abiSetupModalDialog().
GtkBuilder* newDialogBuilder | ( | const char * | name | ) |
load a GtkBuilder for a dialog using the standard path.
name | the filename of the dialog (no path) |
References XAP_App::getApp(), and UT_ASSERT.
Referenced by XAP_UnixDialog_Zoom::_constructWindow(), XAP_UnixDialog_WindowMore::_constructWindow(), XAP_UnixDialog_PluginManager::_constructWindow(), XAP_UnixDialog_Password::_constructWindow(), XAP_UnixDialog_ListDocuments::_constructWindow(), XAP_UnixDialog_Image::_constructWindow(), XAP_UnixDialog_History::_constructWindow(), XAP_UnixDialog_Encoding::_constructWindow(), AP_UnixDialog_Tab::_constructWindow(), AP_UnixDialog_Stylist::_constructWindow(), AP_UnixDialog_Styles::_constructWindow(), AP_UnixDialog_Spell::_constructWindow(), AP_UnixDialog_Replace::_constructWindow(), AP_UnixDialog_RDFQuery::_constructWindow(), AP_UnixDialog_RDFEditor::_constructWindow(), AP_UnixDialog_PageSetup::_constructWindow(), AP_UnixDialog_PageNumbers::_constructWindow(), AP_UnixDialog_Options::_constructWindow(), AP_UnixDialog_New::_constructWindow(), AP_UnixDialog_MetaData::_constructWindow(), AP_UnixDialog_MailMerge::_constructWindow(), AP_UnixDialog_InsertTable::_constructWindow(), AP_UnixDialog_Insert_DateTime::_constructWindow(), AP_UnixDialog_HdrFtr::_constructWindow(), AP_UnixDialog_Goto::_constructWindow(), AP_UnixDialog_GenericProgress::_constructWindow(), AP_UnixDialog_GenericInput::_constructWindow(), AP_UnixDialog_FormatTOC::_constructWindow(), AP_UnixDialog_FormatTable::_constructWindow(), AP_UnixDialog_FormatFrame::_constructWindow(), AP_UnixDialog_FormatFootnotes::_constructWindow(), AP_UnixDialog_Field::_constructWindow(), AP_UnixDialog_CollaborationShare::_constructWindow(), AP_UnixDialog_CollaborationJoin::_constructWindow(), AP_UnixDialog_CollaborationEditAccount::_constructWindow(), AP_UnixDialog_CollaborationAddBuddy::_constructWindow(), AP_UnixDialog_CollaborationAddAccount::_constructWindow(), AP_UnixDialog_CollaborationAccounts::_constructWindow(), AP_UnixDialog_Break::_constructWindow(), AP_UnixDialog_Border_Shading::_constructWindow(), AP_UnixDialog_Annotation::_constructWindow(), AP_UnixDialog_WordCount::constructDialog(), AP_UnixDialog_Latex::constructDialog(), XAP_UnixDialog_Language::constructWindow(), XAP_UnixDialog_DocComparison::constructWindow(), AP_RDFLocationGTK::createEditor(), AP_RDFEventGTK::createEditor(), AP_RDFContactGTK::createEditor(), AP_UnixDialog_Options::event_ChooseTransparentColor(), PD_RDFDialogsGTK::runInsertReferenceDialog(), and PD_RDFDialogsGTK::runSemanticStylesheetsDialog().
static gint nonmodal_keypress_cb | ( | GtkWidget * | , | |
GdkEventKey * | event, | |||
XAP_Dialog * | pDlg | |||
) | [static] |
Catch F1 keypress over a dialog and open up the help file, if any
References sDoHelp().
Referenced by abiSetupModelessDialog().
static void sAddHelpButton | ( | GtkDialog * | me, | |
XAP_Dialog * | pDlg | |||
) | [static] |
References convertMnemonics(), XAP_App::getApp(), XAP_Dialog::getHelpUrl(), XAP_App::getStringSet(), XAP_StringSet::getValueUTF8(), help_button_cb(), s, and UT_String::size().
Referenced by abiSetupModalDialog(), and abiSetupModelessDialog().
static void sDoHelp | ( | XAP_Dialog * | pDlg | ) | [static] |
References UT_String::c_str(), XAP_Dialog::getHelpUrl(), helpLocalizeAndOpenURL(), UT_String::size(), and UT_DEBUGMSG.
Referenced by help_button_cb(), modal_keypress_cb(), and nonmodal_keypress_cb().
void setLabelMarkup | ( | GtkWidget * | widget, | |
const gchar * | str | |||
) |
Sets the label of "widget" to "str". It formats the label using the current label of the widget as a format string. The current label is assumed to be something like "<span size="larger">%s</span>".
References UT_std_string_sprintf().
Referenced by XAP_UnixDialog_ListDocuments::_constructWindow(), and XAP_UnixDialog_History::_populateWindowData().