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
36e5f736
Kaydet (Commit)
36e5f736
authored
Tem 29, 2014
tarafından
Andrzej Hunt
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
gtktiledviewer: show part names in selector.
Change-Id: I02ae5b729f96e36b3f226218b32495907cb63cf3
üst
366d8fb4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
5 deletions
+15
-5
gtktiledviewer.cxx
libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
+15
-5
No files found.
libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
Dosyayı görüntüle @
36e5f736
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
*/
#include <assert.h>
#include <stdio.h>
#include <stdio.h>
#include <string.h>
#include <string.h>
...
@@ -122,10 +123,17 @@ void changeQuadView( GtkWidget* /*pButton*/, gpointer /* pItem */ )
...
@@ -122,10 +123,17 @@ void changeQuadView( GtkWidget* /*pButton*/, gpointer /* pItem */ )
#if ( GTK_MAJOR_VERSION == 2 && GTK_MINOR_VERSION >= 24 ) || GTK_MAJOR_VERSION > 2
#if ( GTK_MAJOR_VERSION == 2 && GTK_MINOR_VERSION >= 24 ) || GTK_MAJOR_VERSION > 2
void
populatePartSelector
(
GtkComboBoxText
*
pSelector
,
LOKDocView
*
pView
)
void
populatePartSelector
(
GtkComboBoxText
*
pSelector
,
LOKDocView
*
pView
)
{
{
char
sText
[
10
];
const
int
nMaxLength
=
50
;
for
(
int
i
=
0
;
i
<
lok_docview_get_parts
(
pView
);
i
++
)
char
sText
[
nMaxLength
];
int
nParts
=
lok_docview_get_parts
(
pView
);
for
(
int
i
=
0
;
i
<
nParts
;
i
++
)
{
{
sprintf
(
sText
,
"%i"
,
i
+
1
);
char
*
pName
=
lok_docview_get_part_name
(
pView
,
i
);
assert
(
pName
);
snprintf
(
sText
,
nMaxLength
,
"%i (%s)"
,
i
+
1
,
pName
);
free
(
pName
);
gtk_combo_box_text_append_text
(
pSelector
,
sText
);
gtk_combo_box_text_append_text
(
pSelector
,
sText
);
}
}
gtk_combo_box_set_active
(
GTK_COMBO_BOX
(
pSelector
),
0
);
gtk_combo_box_set_active
(
GTK_COMBO_BOX
(
pSelector
),
0
);
...
@@ -219,8 +227,10 @@ int main( int argc, char* argv[] )
...
@@ -219,8 +227,10 @@ int main( int argc, char* argv[] )
gtk_widget_show_all
(
pWindow
);
gtk_widget_show_all
(
pWindow
);
pFileName
=
argv
[
2
];
pFileName
=
argv
[
2
];
lok_docview_open_document
(
LOK_DOCVIEW
(
pDocView
),
argv
[
2
]
);
assert
(
lok_docview_open_document
(
LOK_DOCVIEW
(
pDocView
),
argv
[
2
]
)
);
// GtkComboBox requires gtk 2.24 or later
assert
(
LOK_DOCVIEW
(
pDocView
)
->
pDocument
);
// GtkComboBox requires gtk 2.24 or later
#if ( GTK_MAJOR_VERSION == 2 && GTK_MINOR_VERSION >= 24 ) || GTK_MAJOR_VERSION > 2
#if ( GTK_MAJOR_VERSION == 2 && GTK_MINOR_VERSION >= 24 ) || GTK_MAJOR_VERSION > 2
populatePartSelector
(
GTK_COMBO_BOX_TEXT
(
pComboBox
),
LOK_DOCVIEW
(
pDocView
)
);
populatePartSelector
(
GTK_COMBO_BOX_TEXT
(
pComboBox
),
LOK_DOCVIEW
(
pDocView
)
);
#endif
#endif
...
...
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