Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
8b3ea2ad
Kaydet (Commit)
8b3ea2ad
authored
Ock 24, 2017
tarafından
Pranav Kant
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
gtktiledviewer: Comment dialog when tiled annotations are off
Change-Id: I6762baac6c387d968dc6ee94d3494907c817214c
üst
7c2e96a4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
1 deletion
+44
-1
gtktiledviewer.cxx
libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
+44
-1
No files found.
libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
Dosyayı görüntüle @
8b3ea2ad
...
...
@@ -1438,7 +1438,50 @@ static void toggleToolItem(GtkWidget* pWidget, gpointer /*pData*/)
LOKDocView
*
pLOKDocView
=
LOK_DOC_VIEW
(
rWindow
.
m_pDocView
);
GtkToolItem
*
pItem
=
GTK_TOOL_ITEM
(
pWidget
);
const
std
::
string
&
rString
=
rWindow
.
m_aToolItemCommandNames
[
pItem
];
const
std
::
string
&
rArguments
=
rWindow
.
m_aToolItemCommandArgs
[
pItem
];
std
::
string
&
rArguments
=
rWindow
.
m_aToolItemCommandArgs
[
pItem
];
if
(
rString
==
".uno:InsertAnnotation"
)
{
LOKDocView
*
pDocView
=
LOK_DOC_VIEW
(
rWindow
.
m_pDocView
);
GtkWidget
*
pAnnotationDialog
=
gtk_dialog_new_with_buttons
(
"Insert Comment"
,
GTK_WINDOW
(
gtk_widget_get_toplevel
(
GTK_WIDGET
(
pDocView
))),
GTK_DIALOG_MODAL
,
"Insert"
,
GTK_RESPONSE_OK
,
nullptr
);
GtkWidget
*
pDialogMessageArea
=
gtk_dialog_get_content_area
(
GTK_DIALOG
(
pAnnotationDialog
));
GtkWidget
*
pHBox
=
gtk_box_new
(
GTK_ORIENTATION_HORIZONTAL
,
0
);
gtk_box_pack_start
(
GTK_BOX
(
pDialogMessageArea
),
pHBox
,
TRUE
,
TRUE
,
2
);
GtkWidget
*
pCommentLabel
=
gtk_label_new
(
"Comment text"
);
gtk_box_pack_start
(
GTK_BOX
(
pHBox
),
pCommentLabel
,
TRUE
,
TRUE
,
2
);
GtkWidget
*
pCommentText
=
gtk_entry_new
();
gtk_box_pack_start
(
GTK_BOX
(
pHBox
),
pCommentText
,
TRUE
,
TRUE
,
2
);
gtk_widget_show_all
(
pAnnotationDialog
);
gint
res
=
gtk_dialog_run
(
GTK_DIALOG
(
pAnnotationDialog
));
switch
(
res
)
{
case
GTK_RESPONSE_OK
:
const
gchar
*
sText
=
gtk_entry_get_text
(
GTK_ENTRY
(
pCommentText
));
boost
::
property_tree
::
ptree
aTree
;
aTree
.
put
(
boost
::
property_tree
::
ptree
::
path_type
(
g_strconcat
(
"Text"
,
"/"
,
"type"
,
nullptr
),
'/'
),
"string"
);
aTree
.
put
(
boost
::
property_tree
::
ptree
::
path_type
(
g_strconcat
(
"Text"
,
"/"
,
"value"
,
nullptr
),
'/'
),
sText
);
std
::
stringstream
aStream
;
boost
::
property_tree
::
write_json
(
aStream
,
aTree
);
rArguments
=
aStream
.
str
();
break
;
}
gtk_widget_destroy
(
pAnnotationDialog
);
}
g_info
(
"toggleToolItem: lok_doc_view_post_command('%s %s')"
,
rString
.
c_str
(),
rArguments
.
c_str
());
// notify about the finished Save
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment